/* ══════════════════════════════════════════════════════════════
   AUTH — Authentication pages (login, register, etc.)
   ══════════════════════════════════════════════════════════════ */

/* ── Layout ───────────────────────────────────────────────── */
.auth-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100dvh;
    margin: 0;
}

/* ── Left Panel (decorative) ──────────────────────────────── */
.auth-panel-left {
    position: relative;
    background: linear-gradient(145deg, var(--c-sidebar-from) 0%, var(--c-sidebar-to) 50%, #262626 100%);
    overflow: hidden;
    display: flex;
}

.auth-panel-left-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.5rem;
    width: 100%;
    z-index: 1;
}

/* Decorative shapes */
.auth-shape {
    position: absolute;
    border-radius: 50%;
    opacity: .06;
    background: #fff;
}
.auth-shape-1 {
    width: 28rem;
    height: 28rem;
    top: -8rem;
    right: -6rem;
}
.auth-shape-2 {
    width: 18rem;
    height: 18rem;
    bottom: 6rem;
    left: -4rem;
}
.auth-shape-3 {
    width: 10rem;
    height: 10rem;
    bottom: -2rem;
    right: 4rem;
    opacity: .04;
}

/* Grid pattern overlay */
.auth-panel-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
    background-size: 3rem 3rem;
    z-index: 0;
}

.auth-panel-left .z-10 { position: relative; z-index: 1; }

/* Brand */
.auth-panel-left .auth-brand-logo {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-4);
    color: #fff;
    font-size: 1.125rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: -.02em;
}
.auth-panel-left .auth-brand-logo svg {
    width: 1.25rem;
    height: 1.25rem;
    stroke-width: 2.5;
    color: var(--c-primary);
}

/* Center content */
.auth-panel-left h2 {
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.03em;
    margin: 0 0 var(--sp-6);
    max-width: 22rem;
}
.auth-panel-left .subtitle {
    color: rgba(255,255,255,.55);
    font-size: .9375rem;
    line-height: 1.5;
    margin: 0;
    max-width: 20rem;
}
.auth-panel-left .copyright {
    color: rgba(255,255,255,.3);
    font-size: var(--text-sm);
    margin: 0;
}

/* Feature list */
.auth-features {
    list-style: none;
    padding: 0;
    margin: var(--sp-12) 0 0;
    display: flex;
    flex-direction: column;
    gap: var(--sp-6);
}
.auth-features li {
    display: flex;
    align-items: center;
    gap: var(--sp-5);
    color: rgba(255,255,255,.6);
    font-size: var(--text-base);
}
.auth-features li svg {
    width: 1rem;
    height: 1rem;
    stroke-width: 2;
    color: var(--c-primary);
    flex-shrink: 0;
}

/* ── Right Panel (form) ───────────────────────────────────── */
.auth-right {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--sp-16);
    position: relative;
}

.auth-right-inner {
    width: 100%;
    max-width: 24rem;
}

/* Top-right controls (language + theme) */
.auth-controls {
    position: absolute;
    top: var(--sp-8);
    right: var(--sp-10);
    display: flex;
    align-items: center;
    gap: var(--sp-2);
}

/* Theme toggle button */
.auth-controls .theme-toggle {
    width: 2rem;
    height: 2rem;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    color: var(--c-text-muted);
    border-radius: var(--radius-md);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-colors);
}
.auth-controls .theme-toggle:hover {
    color: var(--c-text);
    background: var(--c-surface-alt);
}
.auth-controls .theme-toggle svg {
    width: 1rem;
    height: 1rem;
    stroke-width: 2;
}

/* ── Mobile Brand (visible when left panel is hidden) ─────── */
.auth-mobile-brand {
    display: none;
    align-items: center;
    gap: var(--sp-4);
    margin-bottom: var(--sp-16);
    color: var(--c-text);
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -.02em;
}
.auth-mobile-brand svg {
    width: 1.25rem;
    height: 1.25rem;
    stroke-width: 2.5;
    color: var(--c-primary);
}

/* ── Heading ──────────────────────────────────────────────── */
.auth-heading {
    margin-bottom: 1.75rem;
}
.auth-heading h2 {
    font-size: var(--text-xl);
    font-weight: 700;
    margin: 0 0 var(--sp-2);
    letter-spacing: -.02em;
    line-height: 1.2;
}
.auth-heading p {
    font-size: var(--text-md);
    color: var(--c-text-muted);
    margin: 0;
}

/* ── Form ─────────────────────────────────────────────────── */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: var(--sp-1);
}
.auth-form label {
    margin-bottom: var(--sp-4);
}
.auth-form label > span {
    display: block;
    font-size: var(--text-base);
    font-weight: 500;
    margin-bottom: var(--sp-2);
}

/* Forgot password link */
.forgot-link {
    text-align: right;
    margin: -.25rem 0 var(--sp-4);
    font-size: var(--text-base);
}
.forgot-link a {
    color: var(--c-text-muted);
    text-decoration: none;
    transition: color var(--duration-fast);
}
.forgot-link a:hover {
    color: var(--c-primary);
}

/* ── Primary Button ───────────────────────────────────────── */
.auth-btn-primary {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-4);
    padding: var(--sp-4) var(--sp-10);
    font-size: var(--text-md);
    font-weight: 600;
    color: #fff;
    background: var(--c-primary);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-opacity);
    margin-top: var(--sp-4);
}
.auth-btn-primary:hover {
    opacity: .9;
}

/* ── Social Buttons ───────────────────────────────────────── */
button.auth-btn-social[class] {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-4);
    padding: var(--sp-4) var(--sp-10);
    font-size: var(--text-base);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-colors);
    color: var(--c-text);
    background-color: transparent;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-md);
}
button.auth-btn-social[class]:hover {
    background-color: var(--c-surface-alt);
    border-color: var(--c-text);
}

/* ── Divider ──────────────────────────────────────────────── */
.auth-divider {
    display: flex;
    align-items: center;
    gap: var(--sp-6);
    margin: var(--sp-10) 0;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--c-border);
}
.auth-divider span {
    font-size: var(--text-sm);
    color: var(--c-text-muted);
    text-transform: lowercase;
}

/* ── Footer Link ──────────────────────────────────────────── */
.auth-footer {
    text-align: center;
    font-size: var(--text-base);
    color: var(--c-text-muted);
    margin-top: var(--sp-12);
}
.auth-footer a {
    color: var(--c-primary);
    font-weight: 500;
    text-decoration: none;
    margin-left: var(--sp-2);
}
.auth-footer a:hover {
    text-decoration: underline;
}

/* ── Alerts (inside auth) ─────────────────────────────────── */
.auth-right-inner [role="alert"] {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    padding: var(--sp-5) var(--sp-6);
    margin: 0 0 var(--sp-8);
    font-size: var(--text-base);
    border-radius: var(--radius-md);
    border: 1px solid var(--c-border);
    background: var(--c-surface-alt);
}

/* ── Password Strength Meter ──────────────────────────────── */
.strength-meter-wrapper {
    margin-top: var(--sp-4);
}
.strength-bars {
    display: flex;
    gap: .1875rem;
}
.strength-bar {
    flex: 1;
    height: .1875rem;
    border-radius: var(--radius-full);
    background: var(--c-border);
    transition: background-color var(--duration-normal);
}
.strength-meter-wrapper p {
    font-size: var(--text-xs);
    font-weight: 500;
    margin: var(--sp-2) 0 0;
}
.strength-rules {
    list-style: none;
    padding: 0;
    margin: var(--sp-4) 0 0;
    display: flex;
    flex-direction: column;
    gap: var(--sp-1);
}
.strength-rules li {
    font-size: var(--text-xs);
    display: flex;
    align-items: center;
    gap: var(--sp-2);
}
.strength-rules .rule-pass {
    color: var(--c-success);
}
.strength-rules .rule-fail {
    color: var(--c-text-muted);
}
.rule-icon {
    font-size: var(--text-2xs);
    width: var(--text-sm);
    text-align: center;
    flex-shrink: 0;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 767px) {
    .auth-split {
        grid-template-columns: 1fr;
    }
    .auth-panel-left {
        display: none;
    }
    .auth-right {
        padding: var(--sp-12);
        align-items: flex-start;
        padding-top: 4rem;
    }
    .auth-mobile-brand {
        display: flex;
    }
}
