/* ═══════════════════════════════════════════════════════════════════
   Worksheet Wizard — Auth Pages (Login & Register)
   Split-panel layout: indigo left / white right
   ═══════════════════════════════════════════════════════════════════ */

/* Full-viewport split wrapper */
.auth-page {
    min-height: 100vh;
    display: flex;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ── LEFT PANEL ──────────────────────────────────────────────────── */
.auth-left {
    width: 45%;
    flex-shrink: 0;
    background: #4F46E5;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.auth-left__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.auth-left__logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #fff;
    flex-shrink: 0;
    line-height: 1;
}
.auth-left__logo-text {
    font-size: 15px;
    font-weight: 500;
    color: #fff;
}

.auth-left__middle {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.5rem 0;
}
.auth-left__heading {
    font-size: 22px;
    font-weight: 500;
    color: #fff;
    line-height: 1.3;
    margin: 0 0 0.75rem;
}
.auth-left__sub {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin: 0 0 2rem;
}
.auth-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.auth-features__item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.auth-features__dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}
.auth-features__dot::after {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
}
.auth-features__text {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
}

.auth-left__footer {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
}

/* ── RIGHT PANEL ─────────────────────────────────────────────────── */
.auth-right {
    flex: 1;
    background: #fff;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
    overflow-y: auto;
}
.auth-right__inner {
    max-width: 380px;
    width: 100%;
    margin: 0 auto;
}

/* Tab switcher */
.auth-tabs {
    display: flex;
    border: 0.5px solid #E5E7EB;
    border-radius: 8px;
    padding: 3px;
    margin-bottom: 1.75rem;
    background: #fff;
}
.auth-tab {
    flex: 1;
    text-align: center;
    padding: 7px 12px;
    font-size: 13px;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    font-family: inherit;
    font-weight: 400;
    cursor: pointer;
    color: #6B7280;
    background: transparent;
    border: none;
    display: block;
}
.auth-tab:hover { color: #374151; }
.auth-tab--active {
    background: #4F46E5;
    color: #fff;
    font-weight: 500;
}
.auth-tab--active:hover { color: #fff; }

/* Form heading */
.auth-form-title {
    font-size: 20px;
    font-weight: 500;
    color: #111827;
    margin: 0 0 0.25rem;
}
.auth-form-sub {
    font-size: 13px;
    color: #6B7280;
    margin: 0 0 1.5rem;
}
.auth-form-sub a {
    color: #4F46E5;
    text-decoration: none;
}
.auth-form-sub a:hover { text-decoration: underline; }

/* Flash messages inside auth */
.auth-flash {
    margin-bottom: 1rem;
}
.auth-flash .alert {
    display: block;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
}
.auth-flash .alert-success {
    background: #F0FDF4;
    color: #15803D;
    border: 0.5px solid #86EFAC;
}
.auth-flash .alert-error {
    background: #FEF2F2;
    color: #B91C1C;
    border: 0.5px solid #FCA5A5;
}
.auth-flash .alert-warning {
    background: #FFFBEB;
    color: #B45309;
    border: 0.5px solid #FCD34D;
}
.auth-flash .alert-info {
    background: #EFF6FF;
    color: #1D4ED8;
    border: 0.5px solid #93C5FD;
}

/* Google button */
.auth-google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 10px;
    background: #fff;
    border: 0.5px solid #D1D5DB;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    font-family: inherit;
    margin-bottom: 1.25rem;
}
.auth-google-btn:hover {
    background: #F9FAFB;
    border-color: #9CA3AF;
    color: #111827;
}
.auth-google-btn svg { flex-shrink: 0; }

/* Or divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.25rem;
}
.auth-divider__line {
    flex: 1;
    height: 0;
    border-top: 0.5px solid #E5E7EB;
}
.auth-divider__text {
    font-size: 11px;
    color: #9CA3AF;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Form fields */
.auth-field {
    margin-bottom: 1rem;
}
.auth-field:last-of-type { margin-bottom: 0; }
.auth-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px;
}
.auth-label {
    font-size: 12px;
    font-weight: 500;
    color: #6B7280;
    display: block;
    margin-bottom: 5px;
}
.auth-label-link {
    font-size: 11px;
    color: #4F46E5;
    text-decoration: none;
}
.auth-label-link:hover { text-decoration: underline; }
.auth-input-wrap {
    position: relative;
}
.auth-input {
    width: 100%;
    padding: 9px 12px;
    font-size: 13px;
    font-family: inherit;
    border: 0.5px solid #D1D5DB;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    color: #111827;
    background: #fff;
    box-sizing: border-box;
}
.auth-input:focus {
    border-color: #818CF8;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}
.auth-input.is-error {
    border-color: #E02424;
}
/* Extra right padding when show/hide toggle is present */
.auth-input--has-toggle {
    padding-right: 52px;
}
.auth-pw-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    color: #4F46E5;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    user-select: none;
    font-weight: 500;
}
.auth-pw-toggle:hover { color: #4338CA; }

/* Live password rules panel */
.auth-pw-rules {
    background: #F9FAFB;
    border-radius: 8px;
    padding: 10px 12px;
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.auth-pw-rule {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #9CA3AF;
    transition: color 0.15s;
}
.auth-pw-rule__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #D1D5DB;
    flex-shrink: 0;
    transition: background 0.15s;
}
.auth-pw-rule.is-met .auth-pw-rule__dot { background: #22C55E; }
.auth-pw-rule.is-met { color: #6B7280; }

/* Submit button */
.auth-submit {
    display: block;
    width: 100%;
    padding: 10px;
    background: #4F46E5;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    margin-top: 1.25rem;
    text-align: center;
}
.auth-submit:hover { background: #4338CA; }

/* Below-button note */
.auth-below-btn {
    font-size: 12px;
    color: #6B7280;
    text-align: center;
    margin-top: 0.75rem;
    line-height: 1.6;
}
.auth-below-btn a { color: #4F46E5; text-decoration: none; }
.auth-below-btn a:hover { text-decoration: underline; }
.auth-terms {
    font-size: 11px;
    color: #9CA3AF;
    text-align: center;
    margin-top: 0.75rem;
    line-height: 1.6;
}
.auth-terms a { color: #9CA3AF; text-decoration: underline; }
.auth-terms a:hover { color: #6B7280; }

/* ── RESPONSIVE — hide left panel on mobile ──────────────────────── */
@media (max-width: 768px) {
    .auth-left { display: none; }
    .auth-right {
        min-height: 100vh;
        padding: 2rem 1.5rem;
    }
    .auth-right__inner {
        max-width: 100%;
    }
}
