/* ═══════════════════════════════════════════════════════════════════════════
   DS2 Auth Pages CSS

   Extracted from pages-v2.css Phase C refactoring.
   Authentication pages: login, register, get-started, forgot-password

   Scope: body.ds2 prefix on every rule ensures zero impact on old pages.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Page layout: centered card ──────────────────────────────────────── */
body.ds2 .auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--ds2-space-6);
}

/* ── Logo ─────────────────────────────────────────────────────────────── */
body.ds2 .auth-logo {
    display: flex;
    align-items: center;
    gap: var(--ds2-space-2);
    margin-bottom: var(--ds2-space-8);
}

body.ds2 .auth-logo-mark {
    width: 32px;
    height: 32px;
    background: var(--ds2-indigo-500);
    border-radius: var(--ds2-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

body.ds2 .auth-logo-text {
    font-family: var(--ds2-font-heading);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    line-height: 1;
}

/* ── Card ─────────────────────────────────────────────────────────────── */
body.ds2 .auth-card {
    background: var(--bg-nested);
    border: none;
    box-shadow: 0 0 0 1px var(--border-default);
    border-radius: 16px;
    padding: var(--ds2-space-8);
    width: 100%;
    max-width: min(420px, calc(100% - 2rem));
}

body.ds2 .auth-heading {
    font-family: var(--ds2-font-heading);
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: var(--ds2-space-1);
    letter-spacing: -0.02em;
}

body.ds2 .auth-subheading {
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: var(--ds2-space-6);
}

/* ── Social login row (icon-only buttons) ────────────────────────────── */
body.ds2 .auth-social-row {
    display: flex;
    gap: var(--ds2-space-2);
    justify-content: center;
    margin-bottom: var(--ds2-space-4);
}

body.ds2 .auth-social-btn {
    flex: 1 1 0;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-nested);
    border: none;
    box-shadow: 0 0 0 1px var(--border-default);
    border-radius: var(--ds2-radius-md);
    color: var(--text-muted);
    text-decoration: none;
    transition: box-shadow 0.2s ease, background 0.2s ease;
    cursor: pointer;
}

body.ds2 .auth-social-btn:hover {
    box-shadow: 0 0 0 1px var(--border-strong);
    background: var(--bg-surface-raised);
}

body.ds2 .auth-social-text {
    font-family: var(--ds2-font-body);
    font-weight: 700;
    font-size: 13px;
    color: inherit;
}

/* ── OR divider ───────────────────────────────────────────────────────── */
body.ds2 .auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: var(--ds2-space-5);
}

body.ds2 .auth-divider::before,
body.ds2 .auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-default);
}

body.ds2 .auth-divider span {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

/* ── Form ─────────────────────────────────────────────────────────────── */
body.ds2 .auth-form {
    display: flex;
    flex-direction: column;
    gap: var(--ds2-space-4);
}

body.ds2 .auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

body.ds2 .auth-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

body.ds2 .auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

body.ds2 .auth-input-icon {
    position: absolute;
    left: 12px;
    color: var(--text-disabled);
    pointer-events: none;
    z-index: 1;
}

body.ds2 .auth-input {
    width: 100%;
    height: 40px;
    padding: 0 40px;
    background: var(--bg-nested);
    border: 1px solid var(--border-default);
    border-radius: var(--ds2-radius-md);
    color: var(--text-primary);
    font-size: 0.8125rem;
    font-family: var(--ds2-font-body);
    outline: none;
    transition: border-color 0.2s ease;
}

body.ds2 .auth-input::placeholder {
    color: rgba(237, 237, 240, 0.5);
}

body.ds2 .auth-input:focus {
    border-color: var(--ds2-indigo-500);
    box-shadow: var(--focus-ring);
    outline: none;
}

body.ds2 .auth-input.field-error {
    border-color: var(--status-error);
}

body.ds2 .auth-input-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
}

body.ds2 .auth-input-toggle:hover {
    color: var(--text-secondary);
}

body.ds2 .auth-field-hint {
    font-size: 12px;
    color: var(--text-muted);
    min-height: 0;
    margin: 0;
}

body.ds2 .auth-field-hint.error {
    color: var(--status-error);
}

/* ── Remember me / forgot password row ───────────────────────────────── */
body.ds2 .auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

body.ds2 .auth-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
    cursor: pointer;
}

body.ds2 .auth-checkbox {
    width: 13px;
    height: 13px;
    accent-color: var(--ds2-indigo-500);
}

body.ds2 .auth-link-accent {
    font-size: 13px;
    color: var(--interactive-link);
    text-decoration: underline;
    text-underline-offset: 2px;
}

body.ds2 .auth-link-accent:hover {
    text-decoration: underline;
}

/* ── Primary button (indigo for auth pages) ──────────────────────────── */
body.ds2 .auth-btn-primary {
    width: 100%;
    height: 44px;
    background: var(--interactive-primary);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    font-family: var(--ds2-font-body);
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

body.ds2 .auth-btn-primary:hover {
    background: var(--ds2-indigo-600);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.25);
}

body.ds2 .auth-btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

body.ds2 .auth-btn-primary.auth-btn-loading {
    opacity: 0.8;
}

/* ── Error box ────────────────────────────────────────────────────────── */
body.ds2 .auth-form .form-error {
    color: var(--status-error);
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: var(--ds2-text-sm);
}

/* ── Footer text ──────────────────────────────────────────────────────── */
body.ds2 .auth-footer-text {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: var(--ds2-space-6);
}

/* ── Choice cards (Get Started page) ─────────────────────────────────── */
body.ds2 .auth-choice-list {
    display: flex;
    flex-direction: column;
    gap: var(--ds2-space-3);
}

body.ds2 .auth-choice-item {
    display: flex;
    align-items: center;
    gap: var(--ds2-space-4);
    padding: var(--ds2-space-5);
    background: var(--bg-nested);
    border: none;
    box-shadow: 0 0 0 1px var(--border-default);
    border-radius: var(--ds2-radius-xl);
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s ease, background 0.2s ease, transform 0.2s ease;
    cursor: pointer;
}

body.ds2 .auth-choice-item:hover {
    box-shadow: 0 0 0 1px var(--border-strong);
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-1px);
}

body.ds2 .auth-choice-icon {
    flex-shrink: 0;
    color: var(--text-secondary);
}

body.ds2 .auth-choice-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

body.ds2 .auth-choice-text strong {
    font-family: var(--ds2-font-heading);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

body.ds2 .auth-choice-text span {
    font-size: 12px;
    color: var(--text-muted);
}

body.ds2 .auth-choice-arrow {
    flex-shrink: 0;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

body.ds2 .auth-choice-item:hover .auth-choice-arrow {
    transform: translateX(4px);
    color: var(--text-secondary);
}

/* ── Footer on auth pages (pages-public.css not loaded) ──────────────── */
body.ds2 .hp-footer {
    border-top: 1px solid var(--border-default);
    padding: var(--ds2-space-12) 0 var(--ds2-space-8);
}

body.ds2 .hp-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--ds2-space-6);
}

body.ds2 .hp-footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--ds2-space-8);
    margin-bottom: var(--ds2-space-10);
}

body.ds2 .hp-footer-col {
    display: flex;
    flex-direction: column;
    gap: var(--ds2-space-3);
}

body.ds2 .hp-footer-heading {
    font-family: var(--ds2-font-heading);
    font-size: var(--ds2-text-sm);
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.02em;
    margin-bottom: var(--ds2-space-1);
}

body.ds2 .hp-footer-link {
    font-size: var(--ds2-text-sm);
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.15s;
}

body.ds2 .hp-footer-link:hover {
    color: var(--text-primary);
}

body.ds2 .hp-footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--ds2-space-6);
    border-top: 1px solid var(--border-subtle);
}

body.ds2 .hp-footer-brand {
    display: flex;
    align-items: center;
    gap: var(--ds2-space-2);
    font-family: var(--ds2-font-heading);
    font-size: var(--ds2-text-sm);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.05em;
}

body.ds2 .hp-footer-logo-mark {
    width: 24px;
    height: 24px;
    border-radius: var(--ds2-radius-sm);
    background: var(--interactive-primary);
}

body.ds2 .hp-footer-copy {
    font-size: var(--ds2-text-xs);
    color: var(--text-muted);
}

/* ── Auth page responsive ─────────────────────────────────────────────── */
@media (max-width: 640px) {
    body.ds2 .auth-card {
        padding: var(--ds2-space-6);
    }

    body.ds2 .auth-page {
        padding: var(--ds2-space-4);
        justify-content: flex-start;
        padding-top: 80px;
    }

    body.ds2 .hp-footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--ds2-space-6);
    }
}
