/* ============================================================
   CapitalFlow — control room UI
   Электрический синий · стекло · сетка · живой фон
   Светлая / тёмная тема
   ============================================================ */

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

:root {
    --bg:            #eaf0fb;
    --bg-deep:       #dbe6fa;
    --grid-line:     rgba(47, 107, 255, 0.06);
    --glow-1:        rgba(64, 130, 255, 0.30);
    --glow-2:        rgba(120, 90, 255, 0.16);

    --surface:       rgba(255, 255, 255, 0.78);
    --surface-solid: #ffffff;
    --surface-2:     #f2f6ff;
    --surface-3:     #e9f0ff;
    --border:        rgba(47, 107, 255, 0.14);
    --border-strong: rgba(47, 107, 255, 0.26);

    --text:          #101a33;
    --text-2:        #3a486b;
    --text-muted:    #7a86a6;

    --primary:       #2f6bff;
    --primary-2:     #5b8cff;
    --primary-deep:  #1a4fe0;
    --accent:        #00d4ff;
    --violet:        #7b5cff;
    --primary-soft:  rgba(47, 107, 255, 0.10);

    --success:       #12b76a;
    --success-soft:  rgba(18, 183, 106, 0.12);
    --danger:        #f0454b;
    --danger-soft:   rgba(240, 69, 75, 0.12);
    --warning:       #ff9f0a;
    --warning-soft:  rgba(255, 159, 10, 0.14);

    --shadow:        0 20px 50px -20px rgba(26, 79, 224, 0.35);
    --shadow-sm:     0 8px 24px -12px rgba(26, 79, 224, 0.28);
    --shadow-glow:   0 0 0 1px var(--border), 0 18px 40px -18px rgba(47, 107, 255, 0.45);

    --radius:        18px;
    --radius-sm:     12px;
    --radius-lg:     26px;

    --font-display:  'Sora', sans-serif;
    --font-body:     'Inter', sans-serif;
    --font-mono:     'JetBrains Mono', monospace;
}

[data-theme="dark"] {
    --bg:            #070b16;
    --bg-deep:       #04070f;
    --grid-line:     rgba(90, 140, 255, 0.055);
    --glow-1:        rgba(47, 107, 255, 0.28);
    --glow-2:        rgba(123, 92, 255, 0.20);

    --surface:       rgba(20, 28, 48, 0.72);
    --surface-solid: #121a2e;
    --surface-2:     #172038;
    --surface-3:     rgba(29, 40, 67, 0.54);
    --border:        rgba(120, 160, 255, 0.13);
    --border-strong: rgba(120, 160, 255, 0.26);

    --text:          #eaf1ff;
    --text-2:        #b3c0e0;
    --text-muted:    #7d8bb3;

    --primary:       #4d82ff;
    --primary-2:     #6f9bff;
    --primary-deep:  #3a70f5;
    --accent:        #22e0ff;
    --violet:        #9a7dff;
    --primary-soft:  rgba(77, 130, 255, 0.14);

    --success:       #2ee88a;
    --success-soft:  rgba(46, 232, 138, 0.13);
    --danger:        #ff5c60;
    --danger-soft:   rgba(255, 92, 96, 0.14);
    --warning:       #ffb339;
    --warning-soft:  rgba(255, 179, 57, 0.13);

    --shadow:        0 26px 60px -24px rgba(0, 0, 0, 0.8);
    --shadow-sm:     0 12px 30px -16px rgba(0, 0, 0, 0.7);
    --shadow-glow:   0 0 0 1px var(--border), 0 22px 50px -20px rgba(0, 0, 0, 0.75);
}

* { box-sizing: border-box; }

html, body {
    margin: 0; padding: 0;
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    letter-spacing: 0.1px;
}

body::before {
    content: '';
    position: fixed; inset: 0; z-index: -2;
    background:
        linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 46px 46px,
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 46px 46px,
        var(--bg);
    -webkit-mask-image: radial-gradient(ellipse 130% 100% at 50% 0%, #000 55%, transparent 100%);
            mask-image: radial-gradient(ellipse 130% 100% at 50% 0%, #000 55%, transparent 100%);
}
body::after {
    content: '';
    position: fixed; inset: -20%; z-index: -3;
    background:
        radial-gradient(38% 40% at 18% 12%, var(--glow-1), transparent 60%),
        radial-gradient(34% 38% at 85% 20%, var(--glow-2), transparent 62%),
        radial-gradient(40% 45% at 70% 95%, var(--glow-1), transparent 60%);
    filter: blur(20px);
    animation: drift 22s ease-in-out infinite alternate;
}
@keyframes drift {
    0%   { transform: translate3d(0,0,0) scale(1); }
    100% { transform: translate3d(-3%, 2%, 0) scale(1.08); }
}
@media (prefers-reduced-motion: reduce) {
    body::after { animation: none; }
    * { animation-duration: .001ms !important; transition: none !important; }
}

a { color: var(--primary); text-decoration: none; }
.ico { flex-shrink: 0; }

/* ============================ КНОПКИ ============================ */
.btn {
    position: relative;
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    border: none; cursor: pointer;
    font-family: var(--font-display);
    font-size: 14.5px; font-weight: 600; letter-spacing: 0.2px;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-deep));
    box-shadow: 0 8px 20px -10px var(--primary), inset 0 1px 0 rgba(255,255,255,.25);
    transition: transform .12s cubic-bezier(.34,1.56,.64,1), box-shadow .2s ease, filter .2s ease;
    overflow: hidden;
}
.btn::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
    transform: translateX(-120%);
    transition: transform .55s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 26px -10px var(--primary), inset 0 1px 0 rgba(255,255,255,.3); }
.btn:hover::after { transform: translateX(120%); }
.btn:active { transform: translateY(0); }
.btn-block { width: 100%; }
.btn-outline {
    background: var(--surface-2); color: var(--primary);
    box-shadow: inset 0 0 0 1.5px var(--border-strong);
}
.btn-outline:hover { box-shadow: inset 0 0 0 1.5px var(--primary); }
.btn-outline::after { display: none; }
.btn-ghost {
    background: var(--surface-2); color: var(--text-2);
    box-shadow: inset 0 0 0 1px var(--border);
}
.btn-ghost:hover { color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }
.btn-ghost::after { display: none; }
.btn-danger { background: linear-gradient(135deg, #ff6b6f, var(--danger)); box-shadow: 0 8px 20px -10px var(--danger); }
.btn-success { background: linear-gradient(135deg, #2fe08f, var(--success)); box-shadow: 0 8px 20px -10px var(--success); }
.btn-warning { background: linear-gradient(135deg, #ffc04d, var(--warning)); color: #3a2600; box-shadow: 0 8px 20px -10px var(--warning); }
.btn-sm { padding: 9px 15px; font-size: 13px; }

/* ============================ ПОЛЯ ============================ */
.field { margin-bottom: 17px; }
.field label {
    display: flex; align-items: center; gap: 7px;
    font-family: var(--font-display);
    font-size: 12.5px; font-weight: 600;
    color: var(--text-muted); margin-bottom: 8px;
    text-transform: uppercase; letter-spacing: .6px;
}
input[type=text], input[type=password], input[type=date], select, textarea {
    width: 100%;
    background: var(--surface-2);
    border: 1.5px solid var(--border);
    color: var(--text);
    border-radius: var(--radius-sm);
    padding: 13px 15px;
    font-size: 15px; font-family: var(--font-body);
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
input::placeholder, textarea::placeholder { color: var(--text-muted); opacity: .7; }
input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-soft);
    background: var(--surface-solid);
}
textarea { resize: vertical; line-height: 1.6; }
input[readonly] { color: var(--text-2); cursor: default; }

select {
    -webkit-appearance: none; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%237a86a6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 15px center;
    padding-right: 42px;
}

/* ============================ ЛОГОТИП ============================ */
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
    width: 40px; height: 40px; border-radius: 12px;
    display: grid; place-items: center; color: #fff;
    background: linear-gradient(140deg, var(--primary-2), var(--primary-deep));
    box-shadow: 0 8px 20px -8px var(--primary), inset 0 1px 0 rgba(255,255,255,.4);
    position: relative;
}
.brand-mark::before {
    content: ''; position: absolute; inset: 0; border-radius: inherit;
    background: radial-gradient(circle at 30% 25%, rgba(255,255,255,.5), transparent 55%);
}
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: -0.4px; }
.brand-name b { color: var(--primary); }

.theme-toggle {
    position: fixed; top: 20px; right: 20px; z-index: 60;
    width: 46px; height: 46px; border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--surface); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    color: var(--text); cursor: pointer;
    display: grid; place-items: center;
    box-shadow: var(--shadow-sm);
    transition: transform .2s ease, color .2s ease;
}
.theme-toggle:hover { transform: rotate(-12deg) scale(1.06); color: var(--primary); }
.theme-toggle .ico-sun { display: none; }
[data-theme="dark"] .theme-toggle .ico-sun { display: block; }
[data-theme="dark"] .theme-toggle .ico-moon { display: none; }

/* ============================ ВХОД — ПОЛНОЭКРАННЫЙ СПЛИТ ============================ */
.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
}

/* ---------- Левая визуальная панель ---------- */
.login-visual {
    position: relative;
    overflow: hidden;
    padding: 56px 64px 44px;
    display: flex; flex-direction: column; justify-content: center;
    background:
        radial-gradient(120% 90% at 100% 0%, rgba(120,90,255,.16), transparent 55%),
        linear-gradient(160deg, var(--primary-deep) 0%, var(--primary) 46%, var(--violet) 100%);
    color: #fff;
}
[data-theme="dark"] .login-visual {
    background:
        radial-gradient(120% 90% at 100% 0%, rgba(120,90,255,.28), transparent 55%),
        linear-gradient(160deg, #0a1230 0%, #14265f 46%, #2c1d6b 100%);
}
.lv-grid {
    position: absolute; inset: -10%; z-index: 0;
    background:
        linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px) 0 0 / 52px 52px,
        linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px) 0 0 / 52px 52px;
    -webkit-mask-image: radial-gradient(ellipse 90% 80% at 30% 30%, #000 40%, transparent 90%);
            mask-image: radial-gradient(ellipse 90% 80% at 30% 30%, #000 40%, transparent 90%);
}
.lv-glow {
    position: absolute; z-index: 0; border-radius: 50%;
    width: 620px; height: 620px; right: -220px; bottom: -260px;
    background: radial-gradient(circle, rgba(0,212,255,.35), transparent 68%);
    filter: blur(10px);
    animation: drift 22s ease-in-out infinite alternate;
}
.login-visual::after {
    content: ''; position: absolute; inset: 0; z-index: 0;
    background: radial-gradient(140% 70% at 8% 100%, rgba(0,0,0,.28), transparent 60%);
}
.lv-content { position: relative; z-index: 1; max-width: 560px; }

.brand-onvisual { margin-bottom: 40px; }
.brand-onvisual .brand-mark { background: rgba(255,255,255,.16); box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
.brand-onvisual .brand-mark::before { display: none; }
.brand-onvisual .brand-name { color: #fff; }
.brand-onvisual .brand-name b { color: #bfe0ff; }

.lv-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--font-display); font-weight: 700; font-size: 12.5px;
    letter-spacing: .4px; text-transform: uppercase;
    color: #d9e6ff; background: rgba(255,255,255,.12);
    padding: 7px 14px; border-radius: 20px; margin-bottom: 18px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}
.lv-headline h2 {
    font-family: var(--font-display); font-weight: 800;
    font-size: clamp(28px, 3vw, 38px); line-height: 1.18;
    letter-spacing: -0.6px; margin: 0 0 16px;
}
.lv-headline h2 span { color: #8fe9ff; }
.lv-headline p {
    font-size: 16px; line-height: 1.65; color: rgba(255,255,255,.82);
    margin: 0 0 34px; max-width: 500px;
}

.lv-stats {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
    padding: 18px 0; margin-bottom: 34px;
    border-top: 1px solid rgba(255,255,255,.18);
    border-bottom: 1px solid rgba(255,255,255,.18);
}
.lv-stat-num { display: block; font-family: var(--font-display); font-weight: 800; font-size: 25px; letter-spacing: -0.5px; }
.lv-stat-lbl { display: block; font-size: 12px; color: rgba(255,255,255,.72); margin-top: 4px; line-height: 1.4; }

.lv-feats { list-style: none; margin: 0 0 34px; padding: 0; display: grid; gap: 18px; }
.lv-feats li { display: flex; align-items: flex-start; gap: 14px; }
.lv-fico {
    flex-shrink: 0; width: 38px; height: 38px; border-radius: 11px;
    background: rgba(255,255,255,.14); color: #fff;
    display: grid; place-items: center;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.2);
}
.lv-feats b { display: block; font-family: var(--font-display); font-weight: 700; font-size: 14.5px; margin-bottom: 3px; }
.lv-feats small { display: block; font-size: 13px; line-height: 1.55; color: rgba(255,255,255,.72); font-weight: 400; }

.lv-quote {
    background: rgba(255,255,255,.09);
    border: 1px solid rgba(255,255,255,.16);
    border-radius: var(--radius);
    padding: 20px 22px; margin-bottom: 30px;
    position: relative;
}
.lv-quote .ico { color: #8fe9ff; margin-bottom: 8px; }
.lv-quote p { margin: 0 0 10px; font-size: 14.5px; line-height: 1.6; color: rgba(255,255,255,.92); font-style: italic; }
.lv-quote span { font-size: 12.5px; color: rgba(255,255,255,.62); }

.lv-foot { display: flex; flex-wrap: wrap; gap: 20px; font-size: 12.5px; color: rgba(255,255,255,.68); }
.lv-foot span { display: inline-flex; align-items: center; gap: 7px; }

/* ---------- Правая панель — форма ---------- */
.login-panel {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 48px 40px; gap: 26px;
    position: relative;
}
.brand-oncard { display: none; margin-bottom: 22px; }

.login-card {
    width: 100%; max-width: 460px;
    background: var(--surface); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 46px 42px;
    box-shadow: var(--shadow);
    position: relative; overflow: hidden;
    animation: rise .6s cubic-bezier(.22,1,.36,1);
}
.login-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--violet));
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.login-title { font-family: var(--font-display); font-size: 25px; font-weight: 700; margin: 4px 0 8px; }
.login-sub { color: var(--text-muted); font-size: 15px; margin: 0 0 26px; line-height: 1.55; }
.alert {
    display: flex; align-items: center; gap: 10px;
    background: var(--danger-soft); color: var(--danger);
    border: 1px solid rgba(240,69,75,.25);
    padding: 12px 15px; border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 500; margin-bottom: 18px;
}
.login-hint { margin-top: 22px; text-align: center; font-size: 12.5px; color: var(--text-muted); font-family: var(--font-mono); }

.login-panel-under {
    width: 100%; max-width: 460px;
    display: flex; flex-direction: column; gap: 10px;
}
.lpu-item {
    display: flex; align-items: center; gap: 10px;
    font-size: 13px; color: var(--text-muted);
}
.lpu-item .ico { flex-shrink: 0; color: var(--success); }

@media (max-width: 980px) {
    .login-page { grid-template-columns: 1fr; }
    .login-visual { padding: 46px 28px; }
    .lv-stats { grid-template-columns: repeat(3, 1fr); }
    .lv-feats { display: none; }
    .lv-quote { display: none; }
    .login-panel { padding: 40px 22px 56px; }
}
@media (max-width: 620px) {
    .login-visual { display: none; }
    .brand-oncard { display: flex; }
}

/* ============================ МАКЕТ ============================ */
.layout { display: grid; grid-template-columns: 292px 1fr; min-height: 100vh; }

.sidebar {
    padding: 26px 20px;
    display: flex; flex-direction: column; gap: 22px;
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
    border-right: 1px solid var(--border);
    background: linear-gradient(180deg, var(--surface), transparent);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.sidebar::before {
    content: ''; position: absolute; top: -60px; left: -80px; z-index: -1;
    width: 260px; height: 260px; border-radius: 50%;
    background: radial-gradient(circle, var(--primary-soft), transparent 70%);
    pointer-events: none;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 6px; }

.account-box {
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    position: relative; overflow: hidden;
}
.account-box::before {
    content: ''; position: absolute; top: -40px; right: -40px;
    width: 120px; height: 120px; border-radius: 50%;
    background: radial-gradient(circle, var(--primary-soft), transparent 70%);
}
.account-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; position: relative; }
.account-avatar {
    width: 46px; height: 46px; border-radius: 14px;
    background: linear-gradient(140deg, var(--primary-2), var(--violet));
    color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 19px;
    display: grid; place-items: center;
    box-shadow: 0 6px 16px -6px var(--primary);
}
.account-login { font-family: var(--font-display); font-weight: 700; font-size: 16px; }
.account-role { font-size: 12px; color: var(--text-muted); }

.plan-strip {
    display: flex; align-items: center; justify-content: space-between;
    background: var(--surface-2); border-radius: var(--radius-sm);
    padding: 11px 13px; margin-bottom: 9px; position: relative;
}
.plan-strip .lbl { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-muted); }
.plan-strip .lbl .ico { color: var(--primary); }
.plan-strip .val { font-family: var(--font-display); font-weight: 700; font-size: 13.5px; }
.plan-chip {
    font-family: var(--font-display); font-weight: 700; font-size: 12px;
    color: #fff; padding: 4px 11px; border-radius: 20px;
    background: linear-gradient(135deg, var(--primary), var(--violet));
}

.nav { display: flex; flex-direction: column; gap: 5px; }
.nav-title {
    font-family: var(--font-display);
    font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px;
    color: var(--text-muted); font-weight: 700; margin: 6px 8px 4px;
}
.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px; border-radius: var(--radius-sm);
    color: var(--text-2); font-family: var(--font-display);
    font-weight: 600; font-size: 14.5px; cursor: pointer;
    position: relative; transition: color .15s ease, background .15s ease;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { color: var(--primary); background: var(--primary-soft); }
.nav-item.active::before {
    content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 3px; height: 20px; border-radius: 3px;
    background: linear-gradient(var(--primary), var(--accent));
}
.nav-item .ico { transition: transform .2s ease; }
.nav-item:hover .ico { transform: scale(1.12); }

.side-tip {
    display: flex; align-items: flex-start; gap: 11px;
    background: var(--primary-soft); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 14px;
}
.side-tip-ico {
    flex-shrink: 0; width: 30px; height: 30px; border-radius: 9px;
    background: var(--surface-solid); color: var(--primary);
    display: grid; place-items: center;
}
.side-tip b { display: block; font-family: var(--font-display); font-size: 12.5px; font-weight: 700; margin-bottom: 3px; color: var(--primary); }
.side-tip p { margin: 0; font-size: 12px; line-height: 1.5; color: var(--text-2); }

.sidebar-foot { margin-top: auto; }

.main { padding: 34px 42px 100px; position: relative; }
.main::before {
    content: ''; position: absolute; top: -10px; right: 0; z-index: -1;
    width: 480px; height: 320px;
    background: radial-gradient(50% 50% at 100% 0%, var(--glow-1), transparent 70%);
    filter: blur(6px); pointer-events: none;
}
.page-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 30px; gap: 20px; }
.page-eyebrow {
    display: flex; align-items: center; gap: 8px;
    font-family: var(--font-mono); font-size: 12px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 1.5px; color: var(--primary);
    margin-bottom: 8px;
}
.page-eyebrow::before { content: ''; width: 22px; height: 1.5px; background: var(--primary); }
.page-head h1 { font-family: var(--font-display); font-size: 32px; font-weight: 800; margin: 0 0 10px; letter-spacing: -0.8px; }
.page-sub { margin: 0; max-width: 640px; font-size: 15px; line-height: 1.6; color: var(--text-muted); }

.card {
    background: var(--surface); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 18px; }
.card-title {
    display: flex; align-items: center; gap: 10px;
    font-family: var(--font-display); font-size: 16px; font-weight: 700; margin: 0 0 18px;
}
.card-title .ico { color: var(--primary); }

.notice {
    display: flex; align-items: center; gap: 10px;
    background: var(--success-soft); color: var(--success);
    border: 1px solid rgba(18,183,106,.25);
    padding: 12px 16px; border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 600; margin-bottom: 18px;
    animation: rise .4s ease;
}

.calls-grid { display: grid; grid-template-columns: minmax(340px, 0.9fr) 1.1fr; gap: 20px; align-items: stretch; }
.script-card { display: flex; flex-direction: column; }
.script-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.char-count { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }
.script-card textarea { flex: 1; min-height: 440px; font-size: 15px; }

.steps-card { margin-top: 18px; }
.steps-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step-item { position: relative; padding-left: 2px; }
.step-num {
    display: inline-block; font-family: var(--font-display); font-weight: 800;
    font-size: 13px; color: var(--primary); background: var(--primary-soft);
    padding: 4px 10px; border-radius: 20px; margin-bottom: 12px;
}
.step-item b { display: block; font-family: var(--font-display); font-size: 14.5px; font-weight: 700; margin-bottom: 6px; }
.step-item p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--text-muted); }

.faq-card { margin-top: 20px; }
.faq-list { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 26px; }
.faq-item b {
    display: flex; align-items: center; gap: 8px;
    font-family: var(--font-display); font-size: 14px; font-weight: 700; margin-bottom: 6px;
}
.faq-item b .ico { flex-shrink: 0; color: var(--primary); }
.faq-item p { margin: 0 0 0 22px; font-size: 13px; line-height: 1.55; color: var(--text-muted); }

.status-line {
    display: flex; align-items: center; gap: 12px;
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 20px;
}
.status-orb { position: relative; width: 12px; height: 12px; flex-shrink: 0; }
.status-orb .core { position: absolute; inset: 0; border-radius: 50%; }
.status-orb.on  .core { background: var(--success); }
.status-orb.off .core { background: var(--text-muted); }
.status-orb.on::after {
    content: ''; position: absolute; inset: 0; border-radius: 50%;
    background: var(--success); animation: pulse 1.8s ease-out infinite;
}
@keyframes pulse { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(3); opacity: 0; } }
.status-text { font-family: var(--font-display); font-weight: 600; font-size: 14px; }
.status-text small { display: block; font-family: var(--font-body); font-weight: 400; font-size: 12px; color: var(--text-muted); }

.mono-field {
    display: flex; align-items: center; gap: 10px;
    background: var(--surface-2); border: 1.5px solid var(--border);
    border-radius: var(--radius-sm); padding: 13px 15px;
    font-family: var(--font-mono); font-size: 15px; font-weight: 600; color: var(--text);
}
.mono-field .ico { color: var(--primary); }

/* ==================== КАСТОМНЫЙ АУДИОПЛЕЕР ==================== */
.aplayer {
    display: flex; align-items: center; gap: 13px;
    background: linear-gradient(135deg, var(--surface-2), var(--surface-3));
    border: 1px solid var(--border);
    border-radius: 40px;
    padding: 8px 18px 8px 8px;
    box-shadow: var(--shadow-sm);
    user-select: none;
}
.aplayer.compact { padding: 6px 16px 6px 6px; border-radius: 34px; }
.ap-btn {
    flex-shrink: 0;
    width: 44px; height: 44px; border-radius: 50%;
    border: none; cursor: pointer; color: #fff;
    background: linear-gradient(140deg, var(--primary-2), var(--primary-deep));
    display: grid; place-items: center;
    box-shadow: 0 6px 16px -6px var(--primary), inset 0 1px 0 rgba(255,255,255,.3);
    transition: transform .12s cubic-bezier(.34,1.56,.64,1);
}
.aplayer.compact .ap-btn { width: 38px; height: 38px; }
.ap-btn:hover { transform: scale(1.08); }
.ap-btn:active { transform: scale(.94); }
.ap-btn .ico-pause { display: none; }
.aplayer.playing .ap-btn .ico-play { display: none; }
.aplayer.playing .ap-btn .ico-pause { display: block; }

.ap-body { flex: 1; min-width: 0; }
.ap-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.ap-label { display: flex; align-items: center; gap: 6px; font-family: var(--font-display); font-size: 12.5px; font-weight: 600; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-label .ico { color: var(--primary); width: 15px; height: 15px; }
.ap-time { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-muted); flex-shrink: 0; }

.ap-track { position: relative; height: 26px; cursor: pointer; display: flex; align-items: center; }
.ap-wave { position: absolute; inset: 0; display: flex; align-items: center; gap: 2.5px; overflow: hidden; pointer-events: none; }
.ap-wave i { flex: 1; min-width: 2px; border-radius: 3px; background: var(--border-strong); transition: background .1s linear; }
.ap-wave i.lit { background: linear-gradient(var(--primary), var(--accent)); }
.aplayer.playing .ap-wave i.lit { animation: bar 1s ease-in-out infinite; }
.aplayer.playing .ap-wave i.lit:nth-child(2n)  { animation-delay: .15s; }
.aplayer.playing .ap-wave i.lit:nth-child(3n)  { animation-delay: .3s; }
.aplayer.playing .ap-wave i.lit:nth-child(4n)  { animation-delay: .45s; }
@keyframes bar { 0%,100% { transform: scaleY(.5); } 50% { transform: scaleY(1); } }

/* ==================== ЗАЯВКИ ==================== */
.orders-feed { display: grid; gap: 18px; }
.order-card {
    background: var(--surface); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 24px 22px 28px;
    box-shadow: var(--shadow-sm);
    position: relative; overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease;
    animation: rise .5s ease backwards;
}
.order-card::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
    background: linear-gradient(var(--primary), var(--accent));
}
.order-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.order-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; gap: 12px; }
.order-client { display: flex; align-items: center; gap: 12px; }
.order-client .ava {
    width: 44px; height: 44px; border-radius: 13px;
    background: linear-gradient(140deg, var(--primary-2), var(--violet));
    color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 18px;
    display: grid; place-items: center; box-shadow: 0 6px 14px -6px var(--primary);
}
.order-client .who { font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.order-client .who small { display: block; font-family: var(--font-body); font-weight: 400; font-size: 12px; color: var(--text-muted); }
.order-badges { display: flex; align-items: center; gap: 8px; }
.order-id { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); background: var(--surface-2); padding: 5px 11px; border-radius: 20px; }

.prob-badge {
    display: inline-flex; align-items: center; gap: 7px;
    font-family: var(--font-display); font-weight: 700; font-size: 12.5px;
    padding: 6px 13px; border-radius: 20px;
}
.prob-badge .ico { width: 15px; height: 15px; }
.prob-high { background: var(--success-soft); color: var(--success); }
.prob-mid  { background: var(--warning-soft); color: var(--warning); }
.prob-low  { background: var(--danger-soft); color: var(--danger); }

.order-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 26px; margin-bottom: 18px; }
.order-field { display: flex; align-items: flex-start; gap: 11px; }
.order-field .fico {
    flex-shrink: 0; width: 34px; height: 34px; border-radius: 10px;
    background: var(--primary-soft); color: var(--primary);
    display: grid; place-items: center;
}
.order-field .fico .ico { width: 17px; height: 17px; }
.order-field .fmeta .k { font-size: 11.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }
.order-field .fmeta .v { font-family: var(--font-display); font-weight: 600; font-size: 14.5px; margin-top: 2px; }
.order-field.full { grid-column: 1 / -1; }
.order-field.full .v { font-family: var(--font-body); font-weight: 500; line-height: 1.5; }

.order-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 18px; border-top: 1px dashed var(--border); }
.order-foot .aplayer { flex: 1; min-width: 240px; }

.empty {
    text-align: center; color: var(--text-muted);
    padding: 70px 20px;
    display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.empty .empty-ico {
    width: 76px; height: 76px; border-radius: 22px;
    background: var(--primary-soft); color: var(--primary);
    display: grid; place-items: center;
}
.empty .empty-ico .ico { width: 36px; height: 36px; }
.empty h3 { font-family: var(--font-display); font-size: 18px; margin: 0; color: var(--text-2); }
.empty p { margin: 0; font-size: 14px; }

/* ==================== ТАРИФЫ ==================== */
.plans-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.plan-card {
    background: var(--surface); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 30px 26px;
    display: flex; flex-direction: column;
    box-shadow: var(--shadow-sm);
    position: relative; overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.plan-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.plan-card.featured { border-color: var(--primary); box-shadow: var(--shadow-glow); }
.plan-card.featured::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--violet));
}
.plan-tag {
    align-self: flex-start;
    display: inline-flex; align-items: center; gap: 6px;
    background: linear-gradient(135deg, var(--primary), var(--violet)); color: #fff;
    font-family: var(--font-display); font-size: 11.5px; font-weight: 700;
    padding: 5px 12px; border-radius: 20px; margin-bottom: 16px;
}
.plan-tag .ico { width: 14px; height: 14px; }
.plan-name { font-family: var(--font-display); font-size: 14px; font-weight: 800; letter-spacing: 1px; color: var(--text-muted); }
.plan-price { font-family: var(--font-display); font-size: 38px; font-weight: 800; margin: 10px 0 2px; letter-spacing: -1.5px; }
.plan-price small { font-size: 15px; font-weight: 500; color: var(--text-muted); letter-spacing: 0; }
.plan-calls { display: flex; align-items: center; gap: 9px; color: var(--text-2); font-size: 14.5px; font-weight: 600; margin: 6px 0 22px; }
.plan-calls .ico { color: var(--primary); }
.plan-feats { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 11px; }
.plan-feats li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--text-2); }
.plan-feats .check {
    flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%;
    background: var(--success-soft); color: var(--success);
    display: grid; place-items: center;
}
.plan-feats .check .ico { width: 13px; height: 13px; }
.plan-card .btn { margin-top: auto; }
.current-mark {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--success); font-family: var(--font-display); font-weight: 700; font-size: 12.5px;
    margin-bottom: 12px;
}
.current-mark .ico { width: 15px; height: 15px; }

/* ==================== ПЛАШКА ПОДПИСКИ ==================== */
.sub-banner {
    position: fixed; left: 292px; right: 0; bottom: 0; z-index: 40;
    display: flex; align-items: center; justify-content: space-between; gap: 18px;
    padding: 14px 26px;
    background: var(--surface); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
    border-top: 1px solid var(--warning);
    box-shadow: 0 -10px 30px -12px rgba(0,0,0,.15);
    animation: slideUp .5s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: none; } }
.sub-banner .msg { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 14px; }
.sub-banner .warn-ico { width: 38px; height: 38px; border-radius: 11px; background: var(--warning-soft); color: var(--warning); display: grid; place-items: center; flex-shrink: 0; }
.sub-banner .msg small { display: block; font-weight: 400; color: var(--text-muted); font-size: 12.5px; }

/* ==================== АДМИНКА ==================== */
.admin-wrap { max-width: 1040px; margin: 0 auto; padding: 40px 26px 90px; }
.admin-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; gap: 16px; }
.admin-head .brand-name { font-size: 24px; }
.admin-actions { display: flex; gap: 10px; }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 26px; }
.stat {
    background: var(--surface); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 18px 20px; box-shadow: var(--shadow-sm);
    display: flex; align-items: center; gap: 14px;
}
.stat .s-ico { width: 44px; height: 44px; border-radius: 13px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; }
.stat .s-num { font-family: var(--font-display); font-size: 24px; font-weight: 800; line-height: 1; }
.stat .s-lbl { font-size: 12.5px; color: var(--text-muted); margin-top: 3px; }

.list-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.list-head h2 { font-family: var(--font-display); font-size: 19px; margin: 0; }

.user-list { display: grid; gap: 11px; }
.user-row {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    background: var(--surface); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 15px 18px; box-shadow: var(--shadow-sm);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.user-row:hover { transform: translateX(3px); border-color: var(--border-strong); }
.user-row .u-left { display: flex; align-items: center; gap: 13px; min-width: 0; }
.user-row .u-ava {
    width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
    background: linear-gradient(140deg, var(--primary-2), var(--violet)); color: #fff;
    font-family: var(--font-display); font-weight: 700; display: grid; place-items: center;
}
.user-row .u-login { font-family: var(--font-display); font-weight: 700; font-size: 15px; }
.user-row .u-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.u-tag { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); background: var(--surface-2); padding: 3px 9px; border-radius: 20px; }
.u-tag.on { color: var(--success); background: var(--success-soft); }
.u-actions { display: flex; gap: 8px; flex-shrink: 0; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.section-divider { border: none; border-top: 1px solid var(--border); margin: 4px 0 20px; }
.orders-admin { display: grid; gap: 14px; }
.order-admin-block { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 18px; }
.order-admin-block h4 { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); margin: 0 0 14px; font-size: 14px; color: var(--primary); }
.check-field { display: flex; align-items: center; gap: 11px; cursor: pointer; font-family: var(--font-display); font-weight: 600; font-size: 14px; padding: 6px 0; }
.check-field input { width: auto; }

@media (max-width: 1200px) {
    .steps-row { grid-template-columns: repeat(2, 1fr); }
    .faq-list { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
    .layout { grid-template-columns: 1fr; }
    .sidebar { position: relative; height: auto; border-right: none; border-bottom: 1px solid var(--border); }
    .calls-grid, .plans-grid, .order-grid, .grid-2, .stat-row, .steps-row, .faq-list { grid-template-columns: 1fr; }
    .sub-banner { left: 0; }
    .main { padding: 24px 18px 100px; }
    .page-head h1 { font-size: 24px; }
}
