@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Sora:wght@600;700;800&display=swap');

:root {
    --auth-bg: #f8fafc;
    --auth-bg-soft: #f1f5f9;
    --auth-card: #ffffff;
    --auth-line: #e2e8f0;
    --auth-line-strong: #cbd5e1;
    --auth-text: #0f172a;
    --auth-text-soft: #475569;
    --auth-primary: #0f172a;
    --auth-primary-hover: #1e293b;
    --auth-accent: #fbbf24;
    --auth-accent-strong: #f59e0b;
    --auth-success: #10b981;
    --auth-danger: #e11d48;
    --auth-shadow-soft: 0 20px 55px rgba(15, 23, 42, 0.08);
    --auth-shadow-lift: 0 30px 85px rgba(15, 23, 42, 0.14);
    --auth-radius-xl: 36px;
    --auth-radius-lg: 28px;
    --auth-radius-md: 18px;
    --auth-radius-sm: 14px;
    --auth-ring: 0 0 0 4px rgba(251, 191, 36, 0.28);
}

body.login-page {
    margin: 0;
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--auth-bg) !important;
    color: var(--auth-text) !important;
    overflow-x: hidden;
}

body.login-page .layout {
    display: none;
}

body.login-page .notification-sidebar,
body.login-page .ns-overlay {
    display: none !important;
}

.auth-page {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 26px;
    background:
        radial-gradient(570px 380px at 8% 6%, rgba(251, 191, 36, 0.17), transparent 68%),
        radial-gradient(560px 380px at 96% 92%, rgba(14, 165, 233, 0.11), transparent 70%),
        linear-gradient(180deg, #ffffff, #f8fafc 45%, #eef2f7);
    isolation: isolate;
}

.auth-bg {
    position: absolute;
    border-radius: 999px;
    filter: blur(80px);
    opacity: 0.62;
    pointer-events: none;
    z-index: 0;
}

.auth-bg-top {
    width: 480px;
    height: 480px;
    top: -200px;
    right: -180px;
    background: rgba(251, 191, 36, 0.32);
}

.auth-bg-bottom {
    width: 420px;
    height: 420px;
    left: -170px;
    bottom: -190px;
    background: rgba(56, 189, 248, 0.26);
}

.auth-controls {
    position: absolute;
    top: 30px;
    right: 26px;
    z-index: 4;
    display: inline-flex;
    gap: 10px;
    align-items: center;
}

.lang-pill-switch {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--auth-line);
    padding: 4px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.lang-pill {
    border: 0;
    background: transparent;
    color: #64748b;
    min-width: 40px;
    height: 34px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.4px;
    transition: all 0.18s ease;
    cursor: pointer;
}

.lang-pill:hover {
    color: var(--auth-text);
    background: #f8fafc;
}

.lang-pill.is-active {
    background: var(--auth-primary);
    color: #ffffff;
}

.theme-pill {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid var(--auth-line);
    background: rgba(255, 255, 255, 0.92);
    color: #334155;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.theme-pill:hover {
    transform: translateY(-1px);
    background: #ffffff;
}

.theme-pill i {
    font-size: 16px;
}

#themeSun {
    display: none;
}

.auth-shell {
    position: relative;
    z-index: 1;
    width: min(1280px, 100%);
    margin: 0 auto;
    min-height: calc(100vh - 28px);
    min-height: calc(100dvh - 28px);
    display: grid;
    grid-template-columns: minmax(0, 1.06fr) minmax(420px, 0.94fr);
    gap: 34px;
    align-items: start;
    padding-top: 22px;
}

.auth-promo {
    padding: 0 14px 34px;
}

.hero-announcement {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #fde68a;
    background: #fffbeb;
    color: #b45309;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.2px;
}

.hero-announcement .dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--auth-accent-strong);
}

.auth-promo h1 {
    margin: 18px 0 14px;
    max-width: 14ch;
    font-family: 'Sora', 'Manrope', sans-serif;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.06;
    color: var(--auth-text);
    font-size: clamp(38px, 4.2vw, 66px);
}

.auth-promo-subtitle {
    margin: 0;
    max-width: 56ch;
    font-size: 18px;
    line-height: 1.65;
    color: var(--auth-text-soft);
    font-weight: 600;
}

.promo-actions {
    margin-top: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btn {
    border: 1px solid transparent;
    border-radius: 999px;
    min-height: 48px;
    padding: 0 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.1px;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:focus-visible,
.lang-pill:focus-visible,
.theme-pill:focus-visible,
.mode-tab:focus-visible,
.password-toggle:focus-visible,
.forgot-link:focus-visible {
    outline: none;
    box-shadow: var(--auth-ring);
}

.btn-dark {
    background: var(--auth-primary);
    color: #ffffff;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.2);
}

.btn-dark:hover {
    background: var(--auth-primary-hover);
}

.btn-light {
    background: #ffffff;
    color: var(--auth-primary);
    border-color: var(--auth-line);
}

.btn-light:hover {
    border-color: #f5cf93;
    background: #fffbf4;
}

.promo-benefits {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.promo-benefits > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    font-weight: 700;
    color: #475569;
}

.promo-benefits i {
    color: var(--auth-success);
}

.mini-chip-row {
    margin-top: 26px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mini-chip {
    border-radius: 999px;
    padding: 9px 14px;
    border: 1px solid #dbe6f3;
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    color: #334155;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.3px;
}

.auth-form-area {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 12px;
}

.auth-card {
    width: min(560px, 100%);
    min-height: 0;
    border-radius: 34px;
    border: 1px solid var(--auth-line);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--auth-shadow-soft);
    padding: 28px;
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
}

.auth-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.logo-lockup {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: linear-gradient(145deg, var(--auth-accent), var(--auth-accent-strong));
    color: #0b1220;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 12px 24px rgba(245, 158, 11, 0.26);
}

.brand-name {
    margin: 0;
    font-family: 'Sora', 'Manrope', sans-serif;
    font-size: 19px;
    font-weight: 700;
    color: var(--auth-text);
    letter-spacing: -0.02em;
}

.brand-caption {
    margin: 2px 0 0;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.secure-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 7px 11px;
    border: 1px solid #d1fae5;
    background: #f0fdf4;
    color: #047857;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.45px;
}

.auth-card h2 {
    margin: 6px 0 2px;
    font-family: 'Sora', 'Manrope', sans-serif;
    font-size: clamp(26px, 2.7vw, 34px);
    line-height: 1.16;
    color: var(--auth-text);
    letter-spacing: -0.03em;
}

.auth-card-subtitle {
    margin: 0;
    color: var(--auth-text-soft);
    font-size: 14px;
    font-weight: 600;
}

.flash-stack {
    margin-top: 14px;
    display: grid;
    gap: 8px;
}

.mode-tabs {
    margin-top: 18px;
    border: 1px solid var(--auth-line);
    border-radius: 16px;
    background: #f8fafc;
    padding: 4px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

.mode-tab {
    border: 0;
    min-height: 40px;
    border-radius: 12px;
    background: transparent;
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.18s ease;
}

.mode-tab.is-active {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.auth-form {
    margin-top: 10px;
    display: grid;
    gap: 10px;
    align-content: start;
}

.field-shell {
    display: grid;
    gap: 6px;
}

.field-shell label {
    margin-left: 3px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: #64748b;
}

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 52px;
    border-radius: 15px;
    border: 2px solid var(--auth-line);
    background: #ffffff;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.input-wrap:hover {
    border-color: var(--auth-line-strong);
}

.input-wrap:focus-within {
    border-color: var(--auth-accent);
    box-shadow: var(--auth-ring);
}

.input-icon {
    width: 46px;
    display: inline-flex;
    justify-content: center;
    color: #94a3b8;
    font-size: 17px;
    flex-shrink: 0;
}

.field-shell input {
    width: 100%;
    border: 0;
    outline: none;
    background: transparent;
    color: #0f172a;
    font-size: 16px;
    font-weight: 700;
    padding: 0 14px 0 0;
}

.field-shell input::placeholder {
    color: #64748b;
    font-weight: 700;
}

.password-toggle {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    margin-right: 5px;
    background: transparent;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.18s ease, background-color 0.18s ease;
}

.password-toggle:hover {
    color: #334155;
    background: #f8fafc;
}

#eyeOffIcon {
    display: none;
}

.field-shell.is-error label {
    color: #be123c;
}

.field-shell.is-error .input-wrap {
    border-color: #fb7185;
    background: #fff1f2;
}

.field-shell.is-error .input-icon,
.field-shell.is-error input,
.field-shell.is-error input::placeholder {
    color: #be123c;
}

.field-shell.is-success .input-wrap {
    border-color: #34d399;
    background: #ecfdf5;
}

.form-message {
    border-radius: 14px;
    border: 1px solid var(--auth-line);
    padding: 10px 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
}

.form-message.is-error {
    color: #be123c;
    border-color: #fecdd3;
    background: #fff1f2;
}

.form-message.is-success {
    color: #047857;
    border-color: #a7f3d0;
    background: #ecfdf5;
}

.btn-submit {
    margin-top: 4px;
    position: relative;
    width: 100%;
    min-height: 52px;
    border: 0;
    border-radius: 15px;
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.24);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    overflow: hidden;
}

.btn-submit:hover {
    background: linear-gradient(135deg, #111f38, #29374f);
}

.btn-submit:disabled {
    opacity: 0.78;
    cursor: not-allowed;
    transform: none;
}

.btn-submit .btn-text {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.85px;
    font-weight: 800;
}

.btn-submit .btn-arrow {
    display: inline-flex;
    transition: transform 0.2s ease;
}

.btn-submit:hover .btn-arrow {
    transform: translateX(2px);
}

.btn-spinner {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    animation: login-spin 0.8s linear infinite;
    display: none;
}

.btn-submit.is-loading .btn-arrow,
.btn-submit.is-loading .btn-text {
    display: none;
}

.btn-submit.is-loading .btn-spinner {
    display: inline-flex;
}

@keyframes login-spin {
    to {
        transform: rotate(360deg);
    }
}

.auth-card-foot {
    margin-top: 12px;
    padding-top: 10px;
    display: grid;
    gap: 12px;
}

.auth-insight {
    margin-top: 14px;
    border-radius: 16px;
    border: 1px solid var(--auth-line);
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    padding: 12px 12px 10px;
}

.auth-insight-title {
    margin: 0 0 10px;
    color: #334155;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.75px;
}

.auth-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.auth-kpi-card {
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    padding: 10px 8px;
    text-align: center;
}

.auth-kpi-card strong {
    display: block;
    margin: 0;
    font-family: 'Sora', 'Manrope', sans-serif;
    color: #0f172a;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.05;
}

.auth-kpi-card p {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: 0.2px;
}

.btn-telegram {
    width: 100%;
    min-height: 50px;
    border-radius: 15px;
    border: 1px solid #cfe0f8;
    background: #f8fbff;
    color: #0f3f72;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 800;
}

.btn-telegram:hover {
    background: #eff6ff;
    border-color: #b8d3f2;
}

.btn-telegram i {
    color: #0ea5e9;
    font-size: 16px;
}

.forgot-link {
    justify-self: center;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.75px;
    text-decoration: none;
    transition: color 0.18s ease;
}

.forgot-link:hover {
    color: #b45309;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.auth-page.theme-night {
    background:
        radial-gradient(560px 420px at 8% 6%, rgba(245, 158, 11, 0.2), transparent 72%),
        radial-gradient(520px 360px at 92% 85%, rgba(14, 116, 144, 0.23), transparent 74%),
        linear-gradient(180deg, #0f172a, #1e293b 58%, #26364f);
}

.auth-page.theme-night .lang-pill-switch,
.auth-page.theme-night .theme-pill,
.auth-page.theme-night .auth-card,
.auth-page.theme-night .mini-chip,
.auth-page.theme-night .mode-tabs,
.auth-page.theme-night .input-wrap,
.auth-page.theme-night .auth-insight,
.auth-page.theme-night .auth-kpi-card,
.auth-page.theme-night .btn-telegram {
    border-color: rgba(148, 163, 184, 0.28);
}

.auth-page.theme-night .auth-promo h1,
.auth-page.theme-night .auth-card h2,
.auth-page.theme-night .brand-name,
.auth-page.theme-night .mode-tab.is-active,
.auth-page.theme-night .btn-light,
.auth-page.theme-night .field-shell input,
.auth-page.theme-night .btn-telegram {
    color: #f8fafc;
}

.auth-page.theme-night .auth-promo-subtitle,
.auth-page.theme-night .promo-benefits > span,
.auth-page.theme-night .brand-caption,
.auth-page.theme-night .auth-card-subtitle,
.auth-page.theme-night .auth-insight-title,
.auth-page.theme-night .field-shell label,
.auth-page.theme-night .field-shell input::placeholder,
.auth-page.theme-night .forgot-link,
.auth-page.theme-night .mini-chip,
.auth-page.theme-night .auth-kpi-card p,
.auth-page.theme-night .lang-pill,
.auth-page.theme-night .mode-tab {
    color: #cbd5e1;
}

.auth-page.theme-night .auth-card,
.auth-page.theme-night .mini-chip,
.auth-page.theme-night .mode-tabs,
.auth-page.theme-night .input-wrap,
.auth-page.theme-night .auth-insight,
.auth-page.theme-night .auth-kpi-card,
.auth-page.theme-night .lang-pill-switch,
.auth-page.theme-night .theme-pill,
.auth-page.theme-night .btn-telegram {
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 16px 34px rgba(2, 6, 23, 0.35);
}

.auth-page.theme-night .btn-light {
    background: rgba(148, 163, 184, 0.14);
}

.auth-page.theme-night .btn-light:hover {
    background: rgba(148, 163, 184, 0.22);
}

.auth-page.theme-night .auth-insight {
    background: rgba(15, 23, 42, 0.58);
}

.auth-page.theme-night .auth-kpi-card strong {
    color: #f8fafc;
}

.auth-page.theme-night .auth-kpi-card {
    background: rgba(15, 23, 42, 0.9);
}

.auth-page.theme-night .mode-tab.is-active,
.auth-page.theme-night .password-toggle:hover {
    background: rgba(148, 163, 184, 0.16);
}

.auth-page.theme-night .field-shell.is-success .input-wrap {
    background: rgba(16, 185, 129, 0.15);
}

.auth-page.theme-night .field-shell.is-error .input-wrap {
    background: rgba(225, 29, 72, 0.18);
}

.auth-page.theme-night #themeMoon {
    display: none;
}

.auth-page.theme-night #themeSun {
    display: inline-flex;
    color: #fbbf24;
}

@media (max-width: 1360px) {
    .auth-shell {
        width: min(1200px, 100%);
        grid-template-columns: minmax(0, 1fr) minmax(400px, 0.92fr);
        gap: 26px;
    }

    .auth-promo h1 {
        max-width: 15ch;
    }
}

@media (max-width: 1180px) {
    .auth-page {
        padding: 20px;
    }

    .auth-shell {
        min-height: calc(100vh - 40px);
        min-height: calc(100dvh - 40px);
        grid-template-columns: minmax(0, 1fr) minmax(370px, 0.95fr);
        gap: 20px;
    }

    .auth-card {
        padding: 24px;
        border-radius: 30px;
        min-height: 0;
    }

}

@media (max-width: 1024px) {
    .auth-controls {
        top: 22px;
        right: 18px;
    }

    .auth-shell {
        grid-template-columns: 1fr;
        align-items: start;
        min-height: auto;
        padding-top: 62px;
        gap: 22px;
    }

    .auth-form-area {
        order: 1;
        padding-top: 0;
    }

    .auth-promo {
        order: 2;
        padding: 0 4px 8px;
    }

    .auth-card {
        width: min(560px, 100%);
        min-height: 0;
    }

    .auth-promo h1 {
        max-width: 18ch;
        font-size: clamp(34px, 6vw, 52px);
    }

    .mini-chip-row {
        margin-top: 14px;
    }
}

@media (max-width: 768px) {
    .auth-page {
        padding: 14px;
    }

    .auth-shell {
        padding-top: 58px;
        gap: 18px;
    }

    .auth-card {
        border-radius: 24px;
        padding: 20px;
        min-height: 0;
    }

    .auth-card h2 {
        font-size: 28px;
    }

    .hero-announcement {
        font-size: 11px;
    }

    .auth-promo-subtitle {
        font-size: 16px;
    }

    .promo-actions {
        width: 100%;
    }

    .promo-actions .btn {
        min-width: 0;
        flex: 1 1 0;
        padding-inline: 15px;
    }

    .field-shell input,
    .btn-submit,
    .btn-telegram,
    .mode-tab,
    .lang-pill {
        font-size: 14px;
    }
}

@media (max-width: 560px) {
    .auth-controls {
        top: 20px;
        right: 12px;
        gap: 8px;
    }

    .theme-pill {
        width: 38px;
        height: 38px;
        border-radius: 12px;
    }

    .lang-pill {
        min-width: 35px;
        height: 30px;
        font-size: 11px;
    }

    .auth-promo h1 {
        font-size: clamp(29px, 8.4vw, 38px);
        max-width: 100%;
    }

    .auth-promo-subtitle {
        font-size: 15px;
    }

    .promo-benefits {
        gap: 9px;
    }

    .promo-benefits > span {
        width: 100%;
        font-size: 13px;
    }

    .auth-card {
        padding: 18px;
    }

    .auth-kpi-card strong {
        font-size: 20px;
    }

    .auth-kpi-card p {
        font-size: 10px;
    }

    .mode-tabs {
        grid-template-columns: 1fr;
    }

    .mode-tab {
        justify-content: flex-start;
        padding-inline: 14px;
    }

    .btn-submit,
    .btn-telegram,
    .input-wrap {
        min-height: 50px;
    }
}

@media (max-width: 480px) {
    .auth-page {
        padding: 10px;
    }

    .auth-shell {
        padding-top: 56px;
    }

    .promo-actions {
        gap: 9px;
    }

    .promo-actions .btn {
        width: 100%;
        flex: 1 1 100%;
    }

    .auth-card h2 {
        font-size: 24px;
    }

    .auth-card-subtitle {
        font-size: 13px;
    }

    .brand-name {
        font-size: 18px;
    }

    .secure-pill {
        font-size: 10px;
        padding: 6px 9px;
    }

    .forgot-link {
        font-size: 11px;
    }
}
