/* =============================================
   AUTH PAGES — Login
   Overlapping card layout: tour left, login right.
   SRC Crisp Formula cards on cool marble ground.
   ============================================= */

/* --- Page Shell --- */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--src-space-10);
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #e8eef3 0%, #f4f7f9 50%, #edf2f6 100%);
}

.auth-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('/core/design-system/images/4.png');
    background-size: cover;
    background-position: center;
    opacity: 0.35;
    pointer-events: none;
}

.auth-page::after {
    content: '';
    position: absolute;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(2, 36, 60, 0.03) 0%, transparent 60%);
    top: -200px;
    right: -200px;
    pointer-events: none;
}

/* --- Cards Container --- */

.auth-cards {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1060px;
    height: 620px;
}

/* --- Page Brand (top-left) --- */

.auth-page-brand {
    position: absolute;
    top: var(--src-space-8);
    left: var(--src-space-10);
    z-index: 10;
}

.auth-page-brand-logo {
    width: 140px;
    height: auto;
}

.auth-page-brand-name {
    font-family: var(--src-font-body);
    font-size: var(--src-text-2xl);
    font-weight: var(--src-weight-semibold);
    color: var(--src-text-heading);
    letter-spacing: var(--src-tracking-tight);
}

.auth-page-brand-sub {
    font-size: var(--src-text-xs);
    color: var(--src-text-tertiary);
    letter-spacing: var(--src-tracking-wide);
    text-transform: uppercase;
    margin-top: 2px;
}

/* --- Login Card (right, SRC Crisp Formula) --- */

.auth-login-card {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    width: 400px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 28px;
    padding: 48px 40px;
    box-shadow:
        0 24px 80px rgba(2, 36, 60, 0.12),
        inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    z-index: 2;
}

.auth-login-header {
    margin-bottom: var(--src-space-8);
}

.auth-login-title {
    font-size: var(--src-text-3xl);
    font-weight: var(--src-weight-semibold);
    color: var(--src-text-heading);
    margin-bottom: var(--src-space-1);
}

.auth-login-subtitle {
    font-size: var(--src-text-base);
    color: var(--src-text-tertiary);
}

/* --- Login Form Overrides (larger inputs for auth) --- */

.auth-login-card .form-input {
    padding: var(--src-space-3) var(--src-space-4);
    font-size: var(--src-text-base);
    border-radius: var(--src-radius-interactive);
    min-height: 48px;
    background: var(--src-surface-glass);
    border: 1px solid var(--src-gray-300);
}

.auth-login-card .form-input:focus {
    background: var(--src-surface-solid);
    border-color: var(--src-primary);
    box-shadow: 0 0 0 3px rgba(2, 36, 60, 0.1);
}

.auth-login-card .form-label {
    font-size: var(--src-text-sm);
    font-weight: var(--src-weight-semibold);
    letter-spacing: var(--src-tracking-wide);
    text-transform: uppercase;
}

.auth-login-card .btn-primary {
    min-height: 48px;
    font-size: var(--src-text-base);
    border-radius: var(--src-radius-interactive);
    background: var(--src-primary);
    border: none;
}

.auth-login-card .btn-primary:hover {
    background: var(--src-primary-hover);
    transform: translateY(-1px);
}

/* --- Login Footer --- */

.auth-login-footer {
    margin-top: var(--src-space-6);
    text-align: center;
}

.auth-login-footer a {
    color: var(--src-text-link);
    text-decoration: none;
    font-size: var(--src-text-sm);
    font-weight: var(--src-weight-medium);
}

.auth-login-footer a:hover {
    text-decoration: underline;
}

/* --- Tour Card (left, SRC Crisp Formula) --- */

.auth-tour-card {
    position: absolute;
    left: 0;
    top: 20px;
    bottom: 20px;
    width: 640px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 28px;
    padding: 40px;
    box-shadow:
        0 32px 80px rgba(2, 36, 60, 0.10),
        inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    z-index: 1;
    display: flex;
    flex-direction: column;
}

.auth-tour-header {
    margin-bottom: var(--src-space-6);
}

.auth-tour-title {
    font-size: var(--src-text-3xl);
    font-weight: var(--src-weight-semibold);
    color: var(--src-text-heading);
    line-height: var(--src-leading-tight);
    margin-bottom: var(--src-space-1);
}

.auth-tour-subtitle {
    font-size: var(--src-text-base);
    color: var(--src-text-tertiary);
}

/* --- Tour Content (tower + explainer) --- */

.auth-tour-content {
    flex: 1;
    display: flex;
    gap: var(--src-space-6);
    align-items: center;
}

/* --- Module Tower --- */

.auth-tower {
    flex-shrink: 0;
}

.auth-tower-frame {
    position: relative;
    width: 240px;
    background: linear-gradient(180deg, var(--src-surface-solid) 0%, var(--src-surface-page) 100%);
    border-radius: var(--src-radius-structural);
    padding: var(--src-space-3);
    box-shadow: var(--src-shadow-card);
}

.auth-tower-drawers {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.auth-tower-drawer {
    height: 52px;
    background: linear-gradient(180deg, var(--src-surface-raised) 0%, var(--src-surface-page) 100%);
    border-radius: var(--src-radius-medium);
    display: flex;
    align-items: center;
    padding: 0 var(--src-space-3);
    gap: var(--src-space-3);
    cursor: pointer;
    transition: all var(--src-transition-structural);
    position: relative;
    border: 1px solid var(--src-border-subtle);
}

.auth-tower-drawer::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 14px;
    background: linear-gradient(180deg, var(--src-border), var(--src-border-strong));
    border-radius: 1px;
}

.auth-tower-drawer:hover {
    transform: translateX(6px);
    background: linear-gradient(180deg, var(--src-surface-solid) 0%, var(--src-surface-raised) 100%);
    box-shadow: 0 2px 8px rgba(2, 36, 60, 0.06);
}

.auth-tower-drawer.active {
    transform: translateX(12px);
    background: var(--src-surface-solid);
    border-color: var(--src-border-medium);
    box-shadow: 0 4px 16px rgba(2, 36, 60, 0.10);
}

.auth-drawer-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: var(--src-space-2);
    color: var(--src-text-secondary);
}

.auth-drawer-icon svg {
    width: 16px;
    height: 16px;
}

.auth-drawer-icon.status-live {
    background: var(--src-success-bg);
    color: var(--src-success);
}

.auth-drawer-icon.status-beta {
    background: var(--src-sapphire-light);
    color: var(--src-sapphire);
}

.auth-drawer-icon.status-alpha {
    background: var(--src-info-bg);
    color: var(--src-info);
}

.auth-drawer-icon.status-planned {
    background: rgba(2, 36, 60, 0.05);
    color: var(--src-text-tertiary);
}

.auth-drawer-name {
    font-size: var(--src-text-base);
    font-weight: var(--src-weight-semibold);
    color: var(--src-text-heading);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Explainer Panel --- */

.auth-explainer {
    flex: 1;
    background: var(--src-surface-glass-thick);
    border: 1px solid var(--src-border);
    border-radius: var(--src-radius-structural);
    padding: var(--src-space-8);
    min-height: 280px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--src-shadow-card);
}

.auth-explainer-header {
    display: flex;
    align-items: center;
    gap: var(--src-space-4);
    margin-bottom: var(--src-space-4);
}

.auth-explainer-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--src-radius-medium);
    background: linear-gradient(135deg, var(--src-sandstone), var(--src-sandstone-hover));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--src-text-on-dark);
    box-shadow: 0 4px 12px rgba(2, 36, 60, 0.15);
}

.auth-explainer-icon svg {
    width: 24px;
    height: 24px;
}

.auth-explainer-title {
    font-size: var(--src-text-xl);
    font-weight: var(--src-weight-semibold);
    color: var(--src-text-heading);
}

.auth-explainer-status {
    font-size: var(--src-text-xs);
    font-weight: var(--src-weight-bold);
    text-transform: uppercase;
    letter-spacing: var(--src-tracking-wide);
    color: var(--src-sandstone);
    margin-top: 2px;
}

.auth-explainer-desc {
    font-size: var(--src-text-base);
    color: var(--src-text-secondary);
    line-height: var(--src-leading-relaxed);
    margin-bottom: var(--src-space-5);
    flex: 1;
}

.auth-explainer-features {
    display: flex;
    flex-wrap: wrap;
    gap: var(--src-space-2);
}

.auth-feature-tag {
    padding: var(--src-space-1) var(--src-space-3);
    border-radius: var(--src-radius-micro);
    font-size: var(--src-text-xs);
    font-weight: var(--src-weight-semibold);
}

.auth-feature-tag.built {
    background: var(--src-sandstone-tint);
    color: var(--src-sandstone-hover);
}

.auth-feature-tag.pending {
    background: rgba(2, 36, 60, 0.05);
    color: var(--src-text-tertiary);
}

/* --- CTA Card (bottom, overlapping) --- */

.auth-cta {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid var(--src-border-ice);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: var(--src-radius-structural);
    padding: var(--src-space-4) var(--src-space-6);
    display: flex;
    align-items: center;
    gap: var(--src-space-4);
    box-shadow: var(--src-shadow-card);
    z-index: 3;
    white-space: nowrap;
}

.auth-cta-title {
    font-size: var(--src-text-base);
    font-weight: var(--src-weight-semibold);
    color: var(--src-text-heading);
}

.auth-cta-sub {
    font-size: var(--src-text-xs);
    color: var(--src-text-tertiary);
}

.auth-cta-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--src-radius-circle);
    background: linear-gradient(135deg, var(--src-sandstone), var(--src-sandstone-hover));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--src-text-on-dark);
    font-size: var(--src-text-md);
}

/* --- Responsive --- */

@media (max-width: 1050px) {
    .auth-cards {
        max-width: 440px;
        height: auto;
    }

    .auth-tour-card {
        display: none;
    }

    .auth-login-card {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        width: 100%;
    }

    .auth-cta {
        display: none;
    }

    .auth-page-brand {
        position: relative;
        top: auto;
        left: auto;
        text-align: center;
        margin-bottom: var(--src-space-8);
    }
}

@media (max-width: 480px) {
    .auth-page {
        padding: var(--src-space-5);
    }

    .auth-login-card {
        padding: var(--src-space-8) var(--src-space-6);
    }
}


/* --- Single-Card Layout (404, Set Password, etc.) --- */

.auth-single-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 28px;
    padding: 48px 40px;
    box-shadow:
        0 24px 80px rgba(2, 36, 60, 0.12),
        inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    text-align: center;
}

.auth-single-header {
    margin-bottom: var(--src-space-8);
}

.auth-single-title {
    font-size: var(--src-text-2xl);
    font-weight: var(--src-weight-bold);
    color: var(--src-text-heading);
    margin: 0 0 var(--src-space-2);
}

.auth-single-subtitle {
    font-size: var(--src-text-base);
    color: var(--src-text-secondary);
    margin: 0;
    line-height: var(--src-leading-relaxed);
}

.auth-single-card .form-group {
    text-align: left;
}

.auth-single-footer {
    margin-top: var(--src-space-6);
}

.auth-single-footer a {
    font-size: var(--src-text-sm);
    color: var(--src-text-secondary);
    text-decoration: none;
}

.auth-single-footer a:hover {
    color: var(--src-primary);
}

@media (max-width: 480px) {
    .auth-single-card {
        padding: var(--src-space-8) var(--src-space-6);
    }
}
