/* Oreh Bots — кабинет. Хвойный + электрический лайм, Unbounded / IBM Plex. */

@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@500;700;900&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap&subset=cyrillic');

:root {
    --paper:     #F4F3EC;
    --card:      #FFFFFF;
    --ink:       #13201B;
    --muted:     #5F6B62;
    --line:      #DDDACB;
    --pine:      #0E3B2E;
    --pine-2:    #14523F;
    --pine-soft: #E3EBE2;
    --lime:      #C9F73A;
    --lime-dark: #9FD406;
    --lime-ink:  #1E2B00;
    --red:       #C73E1D;
    --shadow:    0 4px 0 rgba(19, 32, 27, .14);
    --radius:    14px;
    --font-display: 'Unbounded', sans-serif;
    --font-body:    'IBM Plex Sans', sans-serif;
    --font-mono:    'IBM Plex Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-body);
    background: var(--paper);
    color: var(--ink);
    font-size: 15px;
    line-height: 1.55;
    /* лёгкое зерно, чтобы фон не был «пластиковым» */
    background-image: radial-gradient(rgba(19,32,27,.035) 1px, transparent 1px);
    background-size: 22px 22px;
}

a { color: var(--pine-2); }

h1, h2, h3, .display { font-family: var(--font-display); font-weight: 700; line-height: 1.15; letter-spacing: -.01em; }

.mono { font-family: var(--font-mono); }

/* ─── Каркас кабинета ─────────────────────────────────────── */

.app { display: flex; min-height: 100vh; }

.sidebar {
    width: 232px; flex-shrink: 0;
    background: var(--pine);
    color: #DCE8DC;
    display: flex; flex-direction: column;
    padding: 22px 14px;
    position: sticky; top: 0; height: 100vh;
}

.logo {
    font-family: var(--font-display); font-weight: 900; font-size: 17px;
    color: #fff; text-decoration: none; padding: 0 10px 22px;
    letter-spacing: .02em;
}
.logo b { color: var(--lime); }

.nav a {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; margin-bottom: 4px;
    border-radius: 10px; text-decoration: none;
    color: #C2D4C4; font-weight: 500; font-size: 14px;
    transition: background .15s, color .15s;
}
.nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav a.active { background: var(--lime); color: var(--lime-ink); font-weight: 600; }
.nav a.soon { opacity: .38; pointer-events: none; }
.nav a.soon::after { content: 'скоро'; font-size: 10px; margin-left: auto; font-family: var(--font-mono); }

.sidebar .bottom { margin-top: auto; padding: 10px 12px; font-size: 12.5px; color: #8FA893; }
.sidebar .bottom a { color: #C2D4C4; }

.main { flex: 1; padding: 28px 36px 64px; max-width: 1060px; }

.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 30px; }
.topbar h1 { font-size: 24px; }

.badge-trial {
    font-family: var(--font-mono); font-size: 12px;
    background: var(--pine-soft); color: var(--pine);
    border: 1px solid var(--pine-2); border-radius: 99px; padding: 5px 12px;
}

/* ─── Карточки и кнопки ───────────────────────────────────── */

.card {
    background: var(--card);
    border: 1.5px solid var(--ink);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
}

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-family: var(--font-body); font-weight: 600; font-size: 14.5px;
    border-radius: 11px; padding: 11px 20px;
    border: 1.5px solid var(--ink);
    cursor: pointer; text-decoration: none;
    transition: transform .12s, box-shadow .12s;
    box-shadow: 0 3px 0 var(--ink);
    background: #fff; color: var(--ink);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 5px 0 var(--ink); }
.btn:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--ink); }
.btn-lime { background: var(--lime); color: var(--lime-ink); }
.btn-pine { background: var(--pine); color: #fff; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ─── Формы ───────────────────────────────────────────────── */

label { display: block; font-weight: 600; font-size: 13.5px; margin: 16px 0 6px; }

input[type=text], input[type=email], input[type=password], input[type=number], textarea {
    width: 100%; padding: 11px 14px;
    border: 1.5px solid var(--line); border-radius: 10px;
    font-family: var(--font-body); font-size: 15px;
    background: #fff; color: var(--ink);
    transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus {
    outline: none; border-color: var(--pine-2);
    box-shadow: 0 0 0 3px rgba(20, 82, 63, .14);
}
input.mono { font-family: var(--font-mono); font-size: 14px; }

.error {
    background: #FDEEE9; color: var(--red);
    border: 1.5px solid var(--red); border-radius: 10px;
    padding: 10px 14px; font-size: 14px; margin-bottom: 14px;
}
.hint { font-size: 13px; color: var(--muted); margin-top: 6px; }

/* ─── Страницы авторизации ────────────────────────────────── */

.auth-wrap {
    min-height: 100vh; display: flex; flex-direction: column;
    align-items: center; justify-content: center; padding: 32px 16px;
}
.auth-logo {
    font-family: var(--font-display); font-weight: 900; font-size: 22px;
    margin-bottom: 26px; color: var(--pine);
}
.auth-logo b { background: var(--lime); padding: 2px 8px; border-radius: 8px; color: var(--lime-ink); }
.auth-card { width: 100%; max-width: 420px; animation: rise .45s ease both; }
.auth-card h1 { font-size: 21px; margin-bottom: 4px; }
.auth-sub { color: var(--muted); font-size: 14px; margin-bottom: 10px; }
.auth-foot { margin-top: 20px; font-size: 14px; text-align: center; color: var(--muted); }

.code-input {
    font-family: var(--font-mono); font-size: 30px !important;
    letter-spacing: 14px; text-align: center;
}

/* ─── Онбординг-чеклист ───────────────────────────────────── */

.checklist { display: flex; flex-direction: column; gap: 12px; }

.step {
    display: flex; align-items: center; gap: 18px;
    background: var(--card);
    border: 1.5px solid var(--ink); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 18px 22px;
    animation: rise .45s ease both;
}
.step:nth-child(2) { animation-delay: .08s; }
.step:nth-child(3) { animation-delay: .16s; }

.step-num {
    font-family: var(--font-display); font-weight: 900; font-size: 30px;
    color: var(--line); width: 44px; flex-shrink: 0; text-align: center;
}
.step.done .step-num { color: var(--lime-dark); }

.step-body { flex: 1; }
.step-title { font-weight: 600; font-size: 16px; }
.step.done .step-title { text-decoration: line-through; color: var(--muted); }
.step-desc { font-size: 13.5px; color: var(--muted); }

.step-check {
    width: 30px; height: 30px; border: 2px solid var(--ink); border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 900; flex-shrink: 0;
    background: #fff; color: transparent;
}
.step.done .step-check { background: var(--lime); color: var(--lime-ink); }

/* ─── Список ботов ────────────────────────────────────────── */

.bots-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-top: 14px; }
.bot-card { text-decoration: none; color: var(--ink); display: block; }
.bot-card .username { font-family: var(--font-mono); font-weight: 500; font-size: 16px; }
.bot-card .name { color: var(--muted); font-size: 13.5px; margin-top: 2px; }

.status { font-family: var(--font-mono); font-size: 11.5px; padding: 3px 10px; border-radius: 99px; border: 1.5px solid; }
.status.active { color: var(--pine-2); border-color: var(--pine-2); background: var(--pine-soft); }
.status.draft  { color: var(--muted); border-color: var(--line); }
.status.paused { color: var(--red); border-color: var(--red); }

/* ─── Мастер подключения ──────────────────────────────────── */

.wizard-steps { counter-reset: wstep; display: flex; flex-direction: column; gap: 14px; margin: 18px 0; }
.wstep {
    counter-increment: wstep;
    display: flex; gap: 16px; align-items: flex-start;
    padding: 16px 0; border-bottom: 1.5px dashed var(--line);
}
.wstep:last-child { border-bottom: none; }
.wstep::before {
    content: counter(wstep);
    font-family: var(--font-display); font-weight: 900; font-size: 20px;
    color: var(--pine); background: var(--lime);
    width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    border: 1.5px solid var(--ink); box-shadow: 0 2px 0 var(--ink);
}
.wstep b { display: block; margin-bottom: 2px; }
.wstep p  { color: var(--muted); font-size: 14px; }
.wstep code {
    font-family: var(--font-mono); background: var(--pine-soft);
    padding: 1px 7px; border-radius: 6px; font-size: 13.5px;
}

.token-check { margin-top: 8px; font-size: 14px; }
.token-check.ok { color: var(--pine-2); font-weight: 600; }
.token-check.fail { color: var(--red); }

/* ─── Карточка бота ───────────────────────────────────────── */

.bot-hero { display: flex; gap: 28px; align-items: flex-start; flex-wrap: wrap; }
.bot-hero .qr {
    width: 168px; height: 168px; border: 1.5px solid var(--ink);
    border-radius: var(--radius); box-shadow: var(--shadow); background: #fff; padding: 10px;
}
.bot-link {
    font-family: var(--font-mono); font-size: 15px;
    background: var(--pine-soft); border: 1.5px dashed var(--pine-2);
    border-radius: 10px; padding: 10px 14px; display: inline-block; margin: 10px 0;
}
.bot-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

.kpi-row { display: flex; gap: 14px; margin-top: 26px; flex-wrap: wrap; }
.kpi {
    background: var(--card); border: 1.5px solid var(--ink); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 14px 22px; min-width: 140px;
}
.kpi .v { font-family: var(--font-display); font-weight: 700; font-size: 26px; }
.kpi .l { font-size: 12.5px; color: var(--muted); }

/* ─── Пустые состояния, анимации ──────────────────────────── */

.empty {
    text-align: center; padding: 48px 24px; color: var(--muted);
    border: 1.5px dashed var(--line); border-radius: var(--radius); margin-top: 14px;
}

@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.section-label {
    font-family: var(--font-mono); font-size: 11.5px; text-transform: uppercase;
    letter-spacing: .14em; color: var(--muted); margin: 34px 0 10px;
}

@media (max-width: 760px) {
    .app { flex-direction: column; }
    .sidebar { width: 100%; height: auto; position: static; flex-direction: row; align-items: center; }
    .sidebar .nav { display: flex; } .sidebar .bottom { display: none; }
    .main { padding: 20px 16px 48px; }
}

/* ─── Этап 2: заявки, шаблоны, редактор ───────────────────── */

.tabs { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.tab {
    font-family: var(--font-mono); font-size: 13px; text-decoration: none;
    color: var(--muted); padding: 7px 14px; border-radius: 99px;
    border: 1.5px solid var(--line); background: #fff;
}
.tab b { color: var(--pine-2); }
.tab.active { border-color: var(--ink); color: var(--ink); background: var(--lime); }
.tab.active b { color: var(--lime-ink); }

.leads-list { display: flex; flex-direction: column; gap: 12px; max-width: 720px; }
.lead-card { padding: 18px 22px; animation: rise .4s ease both; }
.lead-card.lead-done { opacity: .65; }
.lead-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.lead-id { color: var(--muted); font-size: 13px; }
.lead-name { font-weight: 600; font-size: 16px; flex: 1; }
.lead-row { font-size: 14.5px; margin: 3px 0; }
.lead-row a { text-decoration: none; font-weight: 500; }
.lead-meta { font-size: 12px; color: var(--muted); margin-top: 8px; }
.lead-actions { display: flex; gap: 8px; margin-top: 12px; }
.lead-actions .btn { padding: 7px 14px; font-size: 13.5px; }

.presets-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 18px; }
.preset-card {
    display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
    width: 100%; text-align: left; cursor: pointer; font-family: var(--font-body);
    transition: transform .12s, box-shadow .12s;
}
.preset-card:hover { transform: translateY(-3px); box-shadow: 0 7px 0 rgba(19,32,27,.14); }
.preset-emoji { font-size: 30px; }
.preset-title { font-family: var(--font-display); font-weight: 700; font-size: 15px; }
.preset-desc { font-size: 13px; color: var(--muted); }
.preset-cta { font-family: var(--font-mono); font-size: 12px; color: var(--pine-2); margin-top: 6px; }

.flow-preview { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.flow-btn {
    font-size: 13.5px; padding: 7px 14px; border-radius: 9px;
    background: var(--pine-soft); border: 1.5px solid var(--pine-2); color: var(--pine);
}

.menu-item { border-color: var(--line) !important; }
select {
    padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px;
    font-family: var(--font-body); font-size: 14px; background: #fff;
}
.btn-del { padding: 8px 12px; color: var(--red); }

/* ─── Этап 3: AI ──────────────────────────────────────────── */
.ai-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.ai-tab {
    font-family: var(--font-body); font-weight: 600; font-size: 14px;
    padding: 9px 16px; border-radius: 10px; cursor: pointer;
    border: 1.5px solid var(--line); background: #fff; color: var(--muted);
}
.ai-tab.active { border-color: var(--ink); background: var(--pine); color: #fff; }
#preview { animation: rise .4s ease both; }
details summary { font-size: 13.5px; }

/* ─── Этап 4: тарифы ──────────────────────────────────────── */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; max-width: 680px; }
.plan-card { position: relative; display: flex; flex-direction: column; }
.plan-pro { border-width: 2px; box-shadow: 0 6px 0 var(--lime-dark); }
.plan-badge {
    position: absolute; top: -11px; right: 18px;
    background: var(--lime); color: var(--lime-ink); font-family: var(--font-mono);
    font-size: 11px; padding: 3px 12px; border-radius: 99px; border: 1.5px solid var(--ink);
}
.plan-name { font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.plan-price { font-family: var(--font-display); font-weight: 900; font-size: 34px; margin: 6px 0 14px; }
.plan-price span { font-size: 15px; font-weight: 500; color: var(--muted); }
.plan-feats { list-style: none; flex: 1; margin-bottom: 16px; }
.plan-feats li { padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 14.5px; }
.plan-feats li:last-child { border-bottom: none; }

/* ─── Этап 6: аналитика ───────────────────────────────────── */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding-top: 10px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.bar { width: 100%; max-width: 28px; background: var(--lime); border: 1.5px solid var(--ink);
       border-radius: 6px 6px 0 0; min-height: 4px; transition: background .15s; }
.bar-col:hover .bar { background: var(--lime-dark); }
.bar-x { font-family: var(--font-mono); font-size: 10px; color: var(--muted); margin-top: 6px; transform: rotate(-45deg); white-space: nowrap; }
