/* =============================================================
   Litapdimas — Auth Pages (Editorial Split Layout, Light & Dark)
   ============================================================= */

body.auth-page {
    min-height: 100vh;
    margin: 0;
    font-family: var(--font-sans, "Inter", system-ui, -apple-system, "Segoe UI", sans-serif);
    background-color: var(--surface-card, #ffffff);
    color: var(--text-primary, #334155);
    overflow-x: hidden;
}

.auth-split {
    display: grid;
    grid-template-columns: minmax(420px, 46%) minmax(0, 1fr);
    min-height: 100vh;
    width: 100%;
}

/* =============================================================
   Left Showcase Panel
   ============================================================= */
.auth-showcase {
    position: relative;
    display: flex;
    flex-direction: column;
    background-color: #024926;
    background-image:
        radial-gradient(circle at 12% 14%, rgba(249, 168, 37, 0.14), transparent 38%),
        radial-gradient(circle at 88% 86%, rgba(16, 185, 129, 0.18), transparent 44%),
        linear-gradient(155deg, #045b30 0%, #014322 54%, #012e17 100%);
    color: #f8fafc;
    overflow: hidden;
}

/* Subtle architectural grid texture */
.auth-showcase::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

.auth-showcase__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2.5rem;
    min-height: 100%;
    max-width: 560px;
    width: 100%;
    margin-inline: auto;
    padding: clamp(2rem, 4vw, 3.25rem);
}

.auth-showcase__brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.auth-logos {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.65rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
    flex-shrink: 0;
}

.auth-logo {
    height: 30px;
    width: auto;
    object-fit: contain;
    display: block;
}

.auth-showcase__brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.auth-showcase__brand-name {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.auth-showcase__brand-org {
    color: rgba(226, 232, 240, 0.78);
    font-size: 0.76rem;
    font-weight: 500;
    line-height: 1.3;
}

.auth-showcase__content {
    margin-block: auto;
}

.auth-showcase__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
    color: #fcd34d;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-showcase__rule {
    width: 24px;
    height: 2px;
    border-radius: 2px;
    background: #f9a825;
}

.auth-showcase__headline {
    margin: 0 0 0.9rem;
    color: #ffffff !important;
    font-size: clamp(1.65rem, 1.25rem + 1.25vw, 2.25rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.auth-showcase__desc {
    max-width: 46ch;
    margin: 0 0 2rem;
    color: rgba(241, 245, 249, 0.84);
    font-size: 0.95rem;
    line-height: 1.65;
}

.auth-pillars {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1rem;
}

.auth-pillar {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding-top: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-pillar:first-child {
    padding-top: 0;
    border-top: 0;
}

.auth-pillar__icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #fde68a;
    font-size: 0.95rem;
}

.auth-pillar__title {
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 0.15rem;
}

.auth-pillar__text {
    color: rgba(226, 232, 240, 0.76);
    font-size: 0.8rem;
    line-height: 1.5;
}

.auth-showcase__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(226, 232, 240, 0.72);
    font-size: 0.76rem;
}

.auth-showcase__roles {
    letter-spacing: 0.03em;
}

/* =============================================================
   Right Form Workspace
   ============================================================= */
.auth-workspace {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background-color: var(--surface-card, #ffffff);
}

.auth-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem clamp(1.25rem, 3.5vw, 2.5rem);
}

.auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.42rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--border-subtle, #e2e8f0);
    background: var(--surface-sunken, #f8fafc);
    color: var(--text-secondary, #475569);
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color var(--motion-fast, 120ms) ease-out,
                border-color var(--motion-fast, 120ms) ease-out,
                color var(--motion-fast, 120ms) ease-out;
}

.auth-back-link:hover {
    background: var(--surface-inset, #f1f5f9);
    border-color: var(--border-strong, #cbd5e1);
    color: var(--text-strong, #0f172a);
}

.auth-theme-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    height: 36px;
    padding: 0 0.85rem;
    border: 1px solid var(--border-subtle, #e2e8f0);
    border-radius: 999px;
    background: var(--surface-sunken, #f8fafc);
    color: var(--text-secondary, #475569);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--motion-fast, 120ms) ease-out,
                border-color var(--motion-fast, 120ms) ease-out,
                color var(--motion-fast, 120ms) ease-out;
}

.auth-theme-btn:hover {
    background: var(--surface-inset, #f1f5f9);
    border-color: var(--border-strong, #cbd5e1);
    color: var(--text-strong, #0f172a);
}

.auth-workspace__body {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem clamp(1.25rem, 4vw, 3rem) 2.5rem;
}

.auth-form-shell {
    width: 100%;
    max-width: 408px;
}

.auth-form-header {
    margin-bottom: 1.75rem;
}

.auth-form-title {
    margin: 0 0 0.4rem;
    color: var(--text-strong, #0f172a);
    font-size: 1.625rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.auth-form-subtitle {
    margin: 0;
    color: var(--text-secondary, #475569);
    font-size: 0.9rem;
    line-height: 1.55;
}

.auth-field {
    margin-bottom: 1.15rem;
}

.auth-label {
    display: block;
    margin-bottom: 0.45rem;
    color: var(--text-strong, #0f172a);
    font-size: 0.8125rem;
    font-weight: 600;
}

.auth-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.45rem;
}

.auth-inline-help {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--brand-700, #006837);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.auth-inline-help:hover {
    text-decoration: underline;
}

.auth-help-callout {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 0.55rem;
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--border-subtle, #e2e8f0);
    border-radius: 10px;
    background: var(--surface-sunken, #f8fafc);
    color: var(--text-secondary, #475569);
    font-size: 0.78rem;
    line-height: 1.45;
}

.auth-help-callout i {
    color: var(--brand-700, #006837);
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.auth-input {
    min-height: 44px;
    height: 44px;
    padding: 0.55rem 0.875rem;
    border: 1px solid var(--border-strong, #cbd5e1);
    border-radius: 10px;
    background-color: var(--surface-sunken, #f8fafc);
    color: var(--text-strong, #0f172a);
    font-size: 0.9rem;
    font-weight: 500;
    transition: border-color var(--motion-fast, 120ms) ease-out,
                background-color var(--motion-fast, 120ms) ease-out,
                box-shadow var(--motion-fast, 120ms) ease-out;
}

.auth-input::placeholder {
    color: var(--text-muted, #94a3b8);
    font-weight: 400;
}

.auth-input:focus {
    background-color: var(--surface-card, #ffffff);
    border-color: var(--brand-700, #006837);
    box-shadow: 0 0 0 3px rgba(0, 104, 55, 0.14);
}

.auth-password-wrap {
    position: relative;
}

.auth-input--password {
    padding-right: 2.75rem;
}

.auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 0.25rem;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted, #64748b);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color var(--motion-fast, 120ms) ease-out,
                background-color var(--motion-fast, 120ms) ease-out;
}

.auth-password-toggle:hover {
    color: var(--text-strong, #0f172a);
    background: var(--surface-inset, #f1f5f9);
}

/* Captcha row */
.auth-captcha-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.65rem;
    align-items: stretch;
}

.auth-captcha-box {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.35rem 0.25rem 0.25rem;
    border: 1px solid var(--border-strong, #cbd5e1);
    border-radius: 10px;
    background: #ffffff;
}

.auth-captcha-img {
    width: 132px;
    height: 36px;
    border-radius: 7px;
    object-fit: cover;
    display: block;
}

.auth-captcha-refresh {
    width: 32px;
    height: 36px;
    border: 0;
    border-radius: 7px;
    background: #f1f5f9;
    color: #334155;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color var(--motion-fast, 120ms) ease-out,
                color var(--motion-fast, 120ms) ease-out;
}

.auth-captcha-refresh:hover {
    background: #e2e8f0;
    color: #006837;
}

.auth-captcha-input {
    text-align: center;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.auth-options-row {
    margin-bottom: 1.35rem;
}

.auth-remember-label {
    color: var(--text-secondary, #475569);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
}

.btn-auth-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    border: 0;
    border-radius: 10px;
    background: var(--action-primary-bg, #006837);
    color: #ffffff;
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
    transition: background-color var(--motion-fast, 120ms) ease-out,
                box-shadow var(--motion-fast, 120ms) ease-out,
                transform var(--motion-fast, 120ms) ease-out;
}

.btn-auth-submit:hover,
.btn-auth-submit:focus-visible {
    background: var(--action-primary-bg-hover, #004d29);
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(0, 104, 55, 0.18);
}

.btn-auth-submit:active {
    transform: translateY(1px);
}

.auth-form-footer {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-subtle, #e2e8f0);
    text-align: center;
    color: var(--text-secondary, #475569);
    font-size: 0.85rem;
}

.auth-link {
    color: var(--brand-700, #006837);
    font-weight: 700;
    text-decoration: none;
}

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

.alert-auth {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.auth-workspace__mobile-footer {
    display: none;
    padding: 1rem 1.25rem 1.5rem;
    text-align: center;
    color: var(--text-muted, #64748b);
    font-size: 0.78rem;
}

/* =============================================================
   Dark Mode Overrides
   ============================================================= */
[data-bs-theme="dark"] body.auth-page {
    background-color: var(--surface-page, #0b1220);
}

[data-bs-theme="dark"] .auth-showcase {
    background-color: #061c13;
    background-image:
        radial-gradient(circle at 14% 16%, rgba(249, 168, 37, 0.1), transparent 36%),
        radial-gradient(circle at 86% 84%, rgba(74, 222, 128, 0.1), transparent 44%),
        linear-gradient(160deg, #08271a 0%, #051911 58%, #03110b 100%);
    border-right: 1px solid rgba(125, 211, 168, 0.14);
}

[data-bs-theme="dark"] .auth-logos {
    background: rgba(255, 255, 255, 0.92);
}

[data-bs-theme="dark"] .auth-workspace {
    background-color: var(--surface-page, #0b1220);
}

[data-bs-theme="dark"] .auth-back-link,
[data-bs-theme="dark"] .auth-theme-btn {
    background: var(--surface-card, #111c2e);
    border-color: var(--border-subtle, rgba(226, 232, 240, 0.14));
    color: var(--text-secondary, #cbd5e1);
}

[data-bs-theme="dark"] .auth-back-link:hover,
[data-bs-theme="dark"] .auth-theme-btn:hover {
    background: #16233a;
    border-color: var(--border-strong, rgba(226, 232, 240, 0.24));
    color: var(--text-strong, #f1f5f9);
}

[data-bs-theme="dark"] .auth-form-title,
[data-bs-theme="dark"] .auth-label {
    color: var(--text-strong, #f1f5f9);
}

[data-bs-theme="dark"] .auth-form-subtitle,
[data-bs-theme="dark"] .auth-remember-label,
[data-bs-theme="dark"] .auth-form-footer {
    color: var(--text-secondary, #cbd5e1);
}

[data-bs-theme="dark"] .auth-inline-help,
[data-bs-theme="dark"] .auth-link,
[data-bs-theme="dark"] .auth-help-callout i {
    color: #4ade80;
}

[data-bs-theme="dark"] .auth-help-callout {
    background: var(--surface-card, #111c2e);
    border-color: var(--border-subtle, rgba(226, 232, 240, 0.14));
    color: var(--text-secondary, #cbd5e1);
}

[data-bs-theme="dark"] .auth-input {
    background-color: var(--surface-card, #111c2e);
    border-color: var(--border-subtle, rgba(226, 232, 240, 0.18));
    color: var(--text-strong, #f1f5f9);
}

[data-bs-theme="dark"] .auth-input:focus {
    background-color: #16233a;
    border-color: var(--brand-600, #4ade80);
    box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.18);
}

[data-bs-theme="dark"] .auth-password-toggle {
    color: var(--text-muted, #94a3b8);
}

[data-bs-theme="dark"] .auth-password-toggle:hover {
    color: var(--text-strong, #f1f5f9);
    background: rgba(255, 255, 255, 0.06);
}

[data-bs-theme="dark"] .auth-captcha-box {
    border-color: var(--border-subtle, rgba(226, 232, 240, 0.2));
    background: #f8fafc;
}

[data-bs-theme="dark"] .btn-auth-submit {
    background: #15803d;
}

[data-bs-theme="dark"] .btn-auth-submit:hover,
[data-bs-theme="dark"] .btn-auth-submit:focus-visible {
    background: #16a34a;
    box-shadow: 0 6px 20px rgba(22, 163, 74, 0.25);
}

[data-bs-theme="dark"] .auth-form-footer {
    border-top-color: var(--border-subtle, rgba(226, 232, 240, 0.14));
}

/* =============================================================
   Responsive Breakpoints
   ============================================================= */
@media (max-width: 991.98px) {
    .auth-split {
        grid-template-columns: minmax(0, 1fr);
    }

    .auth-showcase {
        border-right: 0 !important;
    }

    .auth-showcase__inner {
        padding: 1.5rem 1.5rem 1.75rem;
        gap: 1.25rem;
        max-width: 100%;
    }

    .auth-showcase__desc,
    .auth-pillars,
    .auth-showcase__footer {
        display: none;
    }

    .auth-showcase__eyebrow {
        margin-bottom: 0.5rem;
    }

    .auth-showcase__headline {
        margin-bottom: 0;
        font-size: 1.35rem;
    }

    .auth-workspace__body {
        padding-top: 1.5rem;
        align-items: flex-start;
    }

    .auth-workspace__mobile-footer {
        display: block;
    }
}

@media (max-width: 575.98px) {
    .auth-captcha-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .auth-captcha-box {
        justify-content: space-between;
    }

    .auth-captcha-img {
        width: 160px;
    }

    .auth-captcha-input {
        text-align: left;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-back-link,
    .auth-theme-btn,
    .auth-input,
    .auth-password-toggle,
    .auth-captcha-refresh,
    .btn-auth-submit {
        transition: none;
    }
}
