/* Form Grid Layout */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* Floating Label Inputs (Glass Design) */
.form-group-float {
    position: relative;
    display: flex;
    flex-direction: column;
}

.form-group-float input {
    width: 100%;
    padding: 1.2rem 1.2rem 0.6rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: white;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-group-float label {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group-float input:focus,
.form-group-float input:not(:placeholder-shown) {
    outline: none;
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(52, 211, 153, 0.6);
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.2);
}

.form-group-float input:focus ~ label,
.form-group-float input:not(:placeholder-shown) ~ label {
    top: 0.4rem;
    transform: translateY(0);
    font-size: 0.7rem;
    color: var(--emerald-400);
    font-weight: 600;
}

/* Dropdown styling */
.form-group-select {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group-select label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group-select select {
    width: 100%;
    padding: 0.9rem 1.2rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: white;
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    appearance: none;
    transition: all 0.3s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
}

.form-group-select select:focus {
    outline: none;
    border-color: var(--emerald-400);
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.2);
    background-color: rgba(0, 0, 0, 0.4);
}

.form-group-select select option {
    background-color: #0f172a;
    color: white;
}

.select-input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 1px solid rgba(16, 185, 129, 0.1);
    border-radius: var(--radius-md);
    background: var(--surface-soft);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-primary);
    cursor: pointer;
    appearance: none;
    transition: all 0.3s var(--transition-base);
}

.select-input:focus {
    outline: none;
    border-color: var(--emerald-400);
    background: var(--surface-elevated);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.08);
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1rem;
}

.btn-cancel-glass {
    padding: 0.8rem 1.8rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 99px;
    color: white;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel-glass:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
    color: #fca5a5;
}

.btn-save-glass {
    padding: 0.8rem 2rem;
    background: var(--emerald-500);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 99px;
    color: white;
    font-family: inherit;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-save-glass:hover {
    transform: scale(1.05);
    background: var(--emerald-400);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.5);
}

.btn-save-glass:active {
    transform: scale(0.95);
}

/* Checklist & table form controls */
.status-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-checkbox input[type="checkbox"] {
    display: none;
}

.status-checkbox label {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    border: 2px solid var(--gray-300);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
    position: relative;
    background: var(--white);
}

.status-checkbox label:hover {
    border-color: var(--emerald-400);
    background: rgba(16, 185, 129, 0.05);
    transform: scale(1.05);
}

.status-checkbox input[type="checkbox"]:checked + label {
    background: linear-gradient(135deg, var(--emerald-500), var(--emerald-600));
    border-color: var(--emerald-500);
    animation: checkPop 0.3s ease-out;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.status-checkbox input[type="checkbox"]:checked + label::after {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.7rem;
    color: var(--white);
}

.link-input {
    width: 100%;
    padding: 8px 14px;
    background: var(--surface-soft);
    border: 1px solid var(--divider-soft);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: "Inter", sans-serif;
    font-size: 0.78rem;
    transition: var(--transition-base);
    outline: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.link-input::placeholder {
    color: var(--text-muted);
}

.link-input:focus {
    border-color: var(--emerald-400);
    background: var(--surface-elevated);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1), 0 1px 3px rgba(0, 0, 0, 0.04);
}

.link-input.has-value {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.02);
}

.link-input-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.link-input-group .link-input {
    flex: 1;
    margin-bottom: 0 !important;
}

.btn-table-open {
    width: 34px;
    height: 34px;
    background: #052F20;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(5, 47, 32, 0.15);
}

.btn-table-open i {
    font-size: 0.8rem;
}

.btn-table-open:hover {
    background: #0a4d36;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(5, 47, 32, 0.25);
}

.btn-table-open:active {
    transform: translateY(0);
}

@media (max-width: 640px) {
    .btn-table-open {
        width: 44px;
        height: 44px;
        border-radius: 10px;
    }
}

.notes-input {
    width: 100%;
    padding: 8px 14px;
    background: var(--surface-soft);
    border: 1px solid var(--divider-soft);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: "Inter", sans-serif;
    font-size: 0.78rem;
    resize: vertical;
    min-height: 32px;
    max-height: 80px;
    transition: var(--transition-base);
    outline: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.notes-input::placeholder {
    color: var(--text-muted);
}

.notes-input:focus {
    border-color: var(--emerald-500);
    background: var(--surface-elevated);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1), 0 1px 3px rgba(0, 0, 0, 0.04);
}
