@font-face{font-family:Manrope;src:url(/assets/manrope-400.ttf) format("truetype");font-weight:400;font-display:swap}
@font-face{font-family:Manrope;src:url(/assets/manrope-700.ttf) format("truetype");font-weight:700;font-display:swap}
@font-face{font-family:Manrope;src:url(/assets/manrope-800.ttf) format("truetype");font-weight:800;font-display:swap}

:root {
    --auth-font: "Manrope", "Segoe UI", Arial, sans-serif;
    --auth-bg-1: #050b15;
    --auth-bg-2: #08111f;
    --auth-bg-3: #0b1b32;
    --auth-card: rgba(14, 27, 48, .84);
    --auth-card-2: rgba(15, 23, 42, .42);
    --auth-border: rgba(148, 163, 184, .16);
    --auth-border-strong: rgba(56, 189, 248, .36);
    --auth-text: #e7eefb;
    --auth-soft: #9babc1;
    --auth-muted: #64748b;
    --auth-blue: #2563eb;
    --auth-cyan: #38bdf8;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body.crm-auth-body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    font-family: var(--auth-font);
    background:
        radial-gradient(circle at 12% 12%, rgba(37, 99, 235, .28), transparent 30rem),
        radial-gradient(circle at 88% 22%, rgba(6, 182, 212, .16), transparent 28rem),
        linear-gradient(135deg, var(--auth-bg-1), var(--auth-bg-2) 42%, var(--auth-bg-3));
    color: var(--auth-text);
    text-rendering: geometricPrecision;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.crm-auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr);
}

.crm-auth-left {
    position: relative;
    min-height: 100vh;
    padding: 44px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.crm-auth-left::before {
    content: "";
    position: absolute;
    inset: 26px;
    border: 1px solid rgba(148, 163, 184, .14);
    border-radius: 34px;
    background: linear-gradient(135deg, rgba(255,255,255,.045), rgba(255,255,255,.015));
    pointer-events: none;
}

.crm-auth-left::after {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    right: -120px;
    bottom: -130px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56,189,248,.18), transparent 68%);
    pointer-events: none;
}

.crm-auth-logo {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 13px;
    width: fit-content;
}

.crm-logo-mark {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(56, 189, 248, .95), rgba(37, 99, 235, .95));
    color: white;
    font-weight: 900;
    font-size: 20px;
    box-shadow: 0 14px 28px rgba(37, 99, 235, .32);
}

.crm-auth-logo > span:last-child {
    display: grid;
    gap: 3px;
}

.crm-auth-logo strong {
    color: white;
    font-size: 18px;
    font-weight: 900;
}

.crm-auth-logo small {
    color: #93a4bd;
    font-size: 12px;
    font-weight: 750;
}

.crm-auth-hero {
    position: relative;
    z-index: 1;
    max-width: 720px;
}

.crm-kicker {
    display: inline-flex;
    color: var(--auth-cyan);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .12em;
    margin-bottom: 12px;
}

.crm-auth-hero h1 {
    margin: 0;
    font-size: clamp(38px, 5vw, 68px);
    line-height: 1.02;
    letter-spacing: .03em;
    font-weight: 900;
}

.crm-auth-hero p {
    max-width: 620px;
    margin: 22px 0 0;
    color: #a8b7cc;
    font-size: 17px;
    line-height: 1.55;
}

.crm-auth-benefits {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    max-width: 680px;
}

.crm-auth-benefits div {
    min-height: 92px;
    border: 1px solid rgba(148, 163, 184, .15);
    border-radius: 22px;
    background: rgba(15, 23, 42, .36);
    backdrop-filter: blur(18px);
    padding: 16px;
    display: grid;
    align-content: center;
    gap: 5px;
}

.crm-auth-benefits b {
    color: var(--auth-cyan);
    font-size: 24px;
    line-height: 1;
}

.crm-auth-benefits span {
    color: #98a9c1;
    font-size: 13px;
    font-weight: 750;
}

.crm-auth-right {
    min-height: 100vh;
    padding: 34px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 18px;
}

.crm-auth-card {
    width: min(460px, 100%);
    border: 1px solid var(--auth-border);
    border-radius: 30px;
    background:
        radial-gradient(circle at top left, rgba(56, 189, 248, .10), transparent 18rem),
        var(--auth-card);
    box-shadow: 0 30px 90px rgba(0,0,0,.36);
    backdrop-filter: blur(24px);
    padding: 28px;
}

.crm-auth-card-head {
    margin-bottom: 22px;
}

.crm-auth-badge {
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    color: #93c5fd;
    background: rgba(59, 130, 246, .14);
    border: 1px solid rgba(59, 130, 246, .22);
    font-size: 12px;
    font-weight: 900;
    margin-bottom: 14px;
}

.crm-auth-card h2 {
    margin: 0;
    color: white;
    font-size: 34px;
    line-height: 1;
    letter-spacing: -.03em;
}

.crm-auth-card p {
    margin: 10px 0 0;
    color: var(--auth-soft);
    line-height: 1.45;
}

.crm-auth-form {
    display: grid;
    gap: 16px;
}

.crm-auth-step {
    display: none;
    gap: 16px;
}

.crm-auth-step.active {
    display: grid;
}

.crm-auth-field {
    display: grid;
    gap: 8px;
}

.crm-auth-field > span {
    color: #9fb0c8;
    font-size: 13px;
    font-weight: 850;
}

.crm-auth-field > div:not(.crm-auth-real-otp) {
    min-height: 52px;
    border: 1px solid rgba(148, 163, 184, .15);
    border-radius: 18px;
    background: var(--auth-card-2);
    display: grid;
    grid-template-columns: 22px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    transition: .16s ease;
}

.crm-auth-field > div:not(.crm-auth-real-otp):focus-within {
    border-color: var(--auth-blue);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, .15);
    background: rgba(15, 23, 42, .62);
}

.crm-auth-field svg {
    width: 20px;
    height: 20px;
    fill: var(--auth-cyan);
}

.crm-auth-field input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--auth-text);
    font-weight: 750;
}

#authPhone {
    letter-spacing: .02em;
}

.crm-auth-real-otp {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    border: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.crm-auth-real-otp input {
    width: 100%;
    height: 68px;
    border: 1px solid rgba(148,163,184,.18);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(15,23,42,.62), rgba(15,23,42,.42));
    color: #ffffff;
    text-align: center;
    font-size: 30px;
    line-height: 1;
    font-weight: 950;
    outline: none;
    padding: 0;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.06),
        0 10px 24px rgba(0,0,0,.18);
    caret-color: var(--auth-cyan);
    transition: .16s ease;
}

.crm-auth-real-otp input:focus {
    border-color: var(--auth-cyan);
    box-shadow:
        0 0 0 4px rgba(56,189,248,.16),
        0 14px 30px rgba(37,99,235,.22),
        inset 0 1px 0 rgba(255,255,255,.08);
    transform: translateY(-1px);
}

.crm-auth-real-otp input.filled {
    border-color: rgba(56,189,248,.36);
    background:
        radial-gradient(circle at top left, rgba(56,189,248,.22), transparent 120%),
        rgba(15,23,42,.62);
}

.crm-auth-code-info {
    margin-top: 2px;
    border: 1px dashed rgba(148,163,184,.18);
    border-radius: 16px;
    background: rgba(15,23,42,.20);
    padding: 12px 14px;
    display: grid;
    gap: 4px;
}

.crm-auth-code-info p {
    margin: 0;
    color: #b8c5d8;
    font-size: 15px;
    font-weight: 750;
    line-height: 1.5;
}

.crm-auth-code-info a {
    color: #93c5fd;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
}

.crm-auth-submit {
    min-height: 52px;
    border: 0;
    border-radius: 18px;
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    color: white;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 16px 36px rgba(37, 99, 235, .28);
    transition: .16s ease;
    text-decoration: none;
}

.crm-auth-countdown {
    display: grid;
    gap: 9px;
    min-width: 0;
}

.crm-auth-countdown-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--auth-soft);
    font-size: 12px;
}

.crm-auth-countdown-meta strong {
    flex: 0 0 5ch;
    color: var(--auth-cyan);
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.crm-auth-countdown-track {
    height: 5px;
    overflow: hidden;
    border-radius: 4px;
    background: rgba(148, 163, 184, .16);
}

.crm-auth-countdown-track > span {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: var(--auth-cyan);
    transform-origin: left center;
    transition: transform .25s linear;
}

@media (prefers-reduced-motion: reduce) {
    .crm-auth-countdown-track > span {
        transition: none;
    }
}

.crm-auth-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 42px rgba(37, 99, 235, .34);
}

.crm-auth-submit svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.crm-auth-back {
    min-height: 42px;
    border: 1px solid rgba(148,163,184,.16);
    border-radius: 16px;
    background: rgba(15,23,42,.32);
    color: var(--auth-cyan);
    font-weight: 900;
}

.crm-auth-note {
    border: 1px solid rgba(148, 163, 184, .13);
    border-radius: 18px;
    background: rgba(15, 23, 42, .32);
    padding: 13px;
    display: grid;
    gap: 4px;
}

.crm-auth-note strong {
    color: white;
    font-size: 13px;
}

.crm-auth-note span {
    color: #8fa0b9;
    font-size: 12px;
    line-height: 1.35;
}

.crm-auth-footer {
    width: min(460px, 100%);
    display: grid;
    justify-items: center;
    gap: 7px;
    color: var(--auth-muted);
    font-size: 12px;
    font-weight: 750;
    text-align: center;
}

.crm-auth-legal-caption {
    color: #8fa0b9;
    line-height: 1.35;
}

.crm-auth-legal-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 7px;
    border: 1px solid rgba(148, 163, 184, .13);
    border-radius: 16px;
    background: rgba(15, 23, 42, .28);
}

.crm-auth-footer a {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    border-radius: 11px;
    color: #93c5fd;
    padding: 0 10px;
    line-height: 1.2;
    transition: .16s ease;
}

.crm-auth-footer a:hover {
    color: #bfdbfe;
    background: rgba(59, 130, 246, .12);
}

@media (max-width: 980px) {
    .crm-auth-page {
        min-height: 100vh;
        grid-template-columns: 1fr;
        place-items: center;
        padding: 16px;
    }

    .crm-auth-left {
        display: none;
    }

    .crm-auth-right {
        width: 100%;
        min-height: auto;
        padding: 0;
    }

    .crm-auth-card,
    .crm-auth-footer {
        width: min(460px, 100%);
    }
}

@media (max-width: 520px) {
    .crm-auth-page {
        padding: 0;
        place-items: stretch;
        align-items: center;
    }

    .crm-auth-right {
        padding: 14px;
    }

    .crm-auth-card {
        width: 100%;
        border-radius: 24px;
        padding: 20px;
    }

    .crm-auth-card h2 {
        font-size: 30px;
    }

    .crm-auth-footer {
        display: grid;
        gap: 8px;
        padding: 0 4px;
        font-size: 11px;
    }

    .crm-auth-legal-links {
        width: 100%;
        gap: 5px;
        padding: 6px;
    }

    .crm-auth-footer a {
        min-height: 28px;
        padding: 0 8px;
        font-size: 11px;
    }

    .crm-auth-real-otp {
        gap: 9px;
    }

    .crm-auth-real-otp input {
        height: 62px;
        border-radius: 18px;
        font-size: 27px;
    }
}


/* ==========================
   AUTH ALERTS
   ========================== */

   .crm-auth-message {
    display: none;
    border-radius: 16px;
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.4;
}

.crm-auth-message.show {
    display: block;
}

.crm-auth-message.error {
    color: #fecaca;
    background: rgba(127, 29, 29, .25);
    border: 1px solid rgba(248, 113, 113, .25);
}

.crm-auth-message.success {
    color: #bbf7d0;
    background: rgba(20, 83, 45, .25);
    border: 1px solid rgba(34, 197, 94, .25);
}

.crm-auth-submit:disabled {
    opacity: .7;
    cursor: not-allowed;
}

.crm-auth-submit:disabled:hover {
    transform: none;
}

.crm-cookie-notice {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 40;
    width: min(720px, calc(100vw - 48px));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 22px;
    background: rgba(8, 17, 31, .92);
    box-shadow: 0 22px 70px rgba(0, 0, 0, .38);
    backdrop-filter: blur(20px);
    padding: 16px 18px;
    transform: translate(-50%, 18px);
    opacity: 0;
    transition: .18s ease;
}

.crm-cookie-notice.show {
    transform: translate(-50%, 0);
    opacity: 1;
}

.crm-cookie-notice strong {
    display: block;
    color: #fff;
    font-size: 15px;
    font-weight: 900;
    margin-bottom: 4px;
}

.crm-cookie-notice p {
    margin: 0;
    color: var(--auth-soft);
    font-size: 13px;
    line-height: 1.45;
    font-weight: 750;
}

.crm-cookie-notice button {
    flex: 0 0 auto;
    min-height: 42px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--auth-blue), var(--auth-cyan));
    color: #fff;
    padding: 0 18px;
    font-size: 13px;
    font-weight: 900;
    box-shadow: 0 12px 28px rgba(37, 99, 235, .28);
}

.crm-cookie-notice button:hover {
    transform: translateY(-1px);
}

/* Красивый placeholder */

.crm-auth-field input::placeholder {
    color: rgba(155, 171, 193, .6);
}

/* Небольшой shake для ошибок */

.crm-auth-message.error.show {
    animation: authShake .25s linear;
}

@keyframes authShake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    50% { transform: translateX(3px); }
    75% { transform: translateX(-3px); }
    100% { transform: translateX(0); }
}

@media (max-width: 980px) {
    .crm-cookie-notice {
        display: none;
    }
}

.dashboard{max-width:1120px;margin:auto;padding:30px 38px}.dashboard header{display:flex;justify-content:space-between;align-items:center;padding-bottom:28px;border-bottom:1px solid var(--line)}.dashboard main{padding-top:46px}.dash-intro h1{font-size:32px;letter-spacing:-.035em;margin:10px 0}.dash-intro p{font-size:14px}.dash-intro .kicker{margin-bottom:10px}.dash-grid{display:grid;grid-template-columns:1fr 1fr;gap:22px;margin-top:32px}.panel{padding:27px;border:1px solid var(--line);border-radius:20px;background:var(--panel);margin-bottom:22px}.panel h2{font-size:18px;letter-spacing:-.02em;margin:0 0 18px}.panel p{font-size:12px}.panel dl{margin:0;display:grid;gap:6px}.panel dt{font-size:10px;color:var(--soft);margin-top:10px}.panel dd{margin:0;font-size:13px;overflow-wrap:anywhere}.mono{font-family:monospace;font-size:11px!important}.secondary{padding:11px 15px;background:#142740;color:#a8c5e8;border:1px solid #8dbbf126;border-radius:10px;font-size:11px;font-weight:700}.danger{color:#fda4af;background:#fb71850a;border-color:#fb71852e}.service-link{display:flex;align-items:center;gap:14px;border:1px solid var(--line);border-radius:13px;padding:17px;margin:22px 0}.service-link>span:nth-child(2){flex:1}.service-link strong{font-size:14px}.service-link small{display:block;font-size:10px;color:var(--soft);margin-top:5px}.service-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:12px;background:#2563eb33;color:#93c5fd;font-size:21px;font-weight:800}.security-note{display:flex;gap:9px;align-items:center;font-size:11px;color:#a8c5e8;margin-top:30px}.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:20px}.panel-heading h2{margin-bottom:7px}.panel-heading p{margin:0 0 18px}.session-row{display:flex;align-items:center;gap:15px;padding:17px 0;border-top:1px solid var(--line)}.session-row>span:nth-child(2){flex:1}.session-row strong{display:block;font-size:12px}.session-row small{display:block;color:var(--soft);font-size:10px;margin-top:5px}.device-icon{font-size:25px;color:#93c5fd}.events>div{display:flex;justify-content:space-between;gap:20px;padding:14px 0;border-top:1px solid var(--line);font-size:12px}.events small{color:var(--soft);font-size:10px}.dashboard footer{margin-top:30px}
