* {
    box-sizing: border-box;
}

* {
    box-sizing: border-box;
}

.auth-layout {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* ... (skipping unchanged parts) ... */

.form-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    /* Allow wrapping on small screens */
}

/* Background Pattern */
.auth-layout::before {
    content: '';
    position: absolute;
    width: 120%;
    height: 120%;
    background: radial-gradient(circle at 50% 50%, rgba(10, 35, 81, 0.03) 0%, transparent 50%);
    z-index: 0;
}

.auth-card {
    width: 100%;
    max-width: 480px;
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.05);
    padding: 40px;
    position: relative;
    z-index: 1;
}

/* Header */
.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    margin-bottom: 8px;
}

.logo-icon {
    font-size: 2rem;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0a2351;
    letter-spacing: -0.5px;
}

.auth-subtitle {
    color: #64748b;
    font-size: 0.95rem;
}

/* Tabs */
.auth-tabs {
    display: flex;
    position: relative;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 12px;
    margin-bottom: 32px;
}

.tab-btn {
    flex: 1;
    padding: 10px;
    background: none;
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    position: relative;
    z-index: 2;
    transition: color 0.3s ease;
}

.tab-btn.active {
    color: #0a2351;
}

.tab-indicator {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

/* Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 140px;
    /* Force wrap if less than this space */
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    font-size: 1.1rem;
    pointer-events: none;
}

.input-wrapper input,
.simple-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.95rem;
    color: #1e293b;
    transition: all 0.2s ease;
    outline: none;
    background: #f8fafc;
}

.input-wrapper input {
    padding-left: 48px;
}

.input-wrapper input:focus,
.simple-input:focus {
    border-color: #0a2351;
    background: white;
    box-shadow: 0 0 0 4px rgba(10, 35, 81, 0.05);
}

.input-validation-error {
    border-color: #e2e8f0;
    /* Default, rely on span text */
}

.field-validation-error {
    color: #dc2626;
    font-size: 0.8rem;
    margin-top: 4px;
    display: block;
}

.verified-icon {
    position: absolute;
    right: 16px;
    color: #22c55e;
    font-weight: 800;
}

.forgot-link {
    display: block;
    text-align: right;
    margin-top: 8px;
    font-size: 0.85rem;
    color: #0a2351;
    text-decoration: none;
    font-weight: 500;
}

.forgot-link:hover {
    text-decoration: underline;
}

.btn-submit {
    margin-top: 12px;
    width: 100%;
    padding: 14px;
    background: #0a2351;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(10, 35, 81, 0.2);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.auth-footer {
    margin-top: 32px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
    font-size: 0.8rem;
    color: #94a3b8;
}

.auth-footer a {
    color: #0a2351;
    text-decoration: none;
    font-weight: 600;
}

.alert {
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.alert-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fee2e2;
}

.alert-success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #dcfce7;
}

/* Responsive */
@media (max-width: 480px) {
    .auth-card {
        padding: 24px;
    }

    .auth-header {
        margin-bottom: 24px;
    }

    .form-row {
        flex-direction: column;
        gap: 20px;
    }
}

.auth-panel {
    display: none;
}

    .auth-panel.active {
        display: block !important;
    }
/* Password Toggle Button */
.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: color 0.2s ease;
    z-index: 10;
}

.password-toggle:hover {
    color: #0a2351;
}

.password-toggle:focus {
    outline: none;
}

.eye-icon {
    display: block;
    transition: opacity 0.2s ease;
}
