/* ===== БАЗА (светлая тема) ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --bg: #eef1f6;
    --sidebar: #ffffff;
    --card: #ffffff;
    --line: #e3e8ef;
    --text: #1f2a37;
    --muted: #6b7685;
    --accent: #2b7fd4;
    --accent-soft: rgba(43,127,212,.10);
    --ok: #1f9d57;
    --soon: #c77f12;
    --err: #d94436;
    --shadow: 0 1px 3px rgba(16,24,40,.06), 0 1px 2px rgba(16,24,40,.04);
    --shadow-hover: 0 6px 18px rgba(16,24,40,.10);
}
html, body { height: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

/* ===== КАРКАС ===== */
.app { display: flex; min-height: 100vh; }

/* ===== БОКОВОЕ МЕНЮ ===== */
.sidebar {
    width: 264px;
    flex-shrink: 0;
    background: var(--sidebar);
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    padding: 18px 14px;
    position: sticky;
    top: 0;
    height: 100vh;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 10px;
    margin-bottom: 14px;
    font-size: 19px;
    font-weight: 700;
    color: var(--text);
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: background .15s;
}
.brand:hover { background: rgba(0,0,0,.03); }
.brand__logo { font-size: 22px; }

.nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 11px 12px;
    border: none;
    background: transparent;
    color: var(--muted);
    font-size: 15px;
    text-align: left;
    border-radius: 10px;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: background .15s, color .15s;
    font-family: inherit;
}
.nav-item:hover { background: rgba(0,0,0,.03); color: var(--text); }
.nav-item.active {
    background: var(--accent-soft);
    color: var(--accent);
    border-left-color: var(--accent);
    font-weight: 600;
}
.nav-item__icon { font-size: 18px; width: 22px; text-align: center; }
.nav-item__label { flex: 1; min-width: 0; }
.nav-item__badge {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 2px 7px;
    border-radius: 100px;
}
.nav-item__badge--ok { background: rgba(31,157,87,.13); color: var(--ok); }
.nav__sep { height: 1px; background: var(--line); margin: 10px 12px; }

.sidebar__footer {
    padding: 14px 10px 4px;
    border-top: 1px solid var(--line);
    margin-top: 14px;
}
.sidebar__user { font-size: 13px; color: var(--muted); }

/* ===== ЗАТЕМНЕНИЕ (мобила) ===== */
.overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(20,28,40,.4);
    z-index: 40;
}
.overlay.show { display: block; }

/* ===== РАБОЧАЯ ОБЛАСТЬ ===== */
.content {
    flex: 1;
    min-width: 0;
    background: var(--bg);
    display: flex;
    flex-direction: column;
}
.topbar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 28px;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    background: rgba(255,255,255,.85);
    backdrop-filter: blur(8px);
    z-index: 20;
}
.topbar__title { font-size: 20px; font-weight: 700; }
.burger {
    display: none;
    background: transparent;
    border: 1px solid var(--line);
    color: var(--text);
    font-size: 18px;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    cursor: pointer;
}

.screens { padding: 28px; max-width: 900px; }

/* ===== ЭКРАН ===== */
.screen { display: none; animation: fade .2s ease; }
.screen.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.screen__head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.screen__head h2 { font-size: 24px; font-weight: 700; }
.status { font-size: 12px; padding: 4px 12px; border-radius: 100px; white-space: nowrap; }
.status--ok { background: rgba(31,157,87,.13); color: var(--ok); }
.status--soon { background: rgba(199,127,18,.13); color: var(--soon); }
.screen__desc { color: var(--muted); font-size: 15px; line-height: 1.6; margin-bottom: 22px; max-width: 640px; }

/* ===== ГЛАВНАЯ: ПЛИТКИ ===== */
.home-intro { color: var(--muted); font-size: 15px; line-height: 1.6; margin-bottom: 24px; max-width: 640px; }
.home-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
}
.tile {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 22px 20px;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    box-shadow: var(--shadow);
    transition: transform .15s, box-shadow .15s;
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
}
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.tile__thumb {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 10px;
}
.tile__thumb--transcribe { background: #e3f0ff; }
.tile__thumb--instagram  { background: #fde6f3; }
.tile__thumb--twogis     { background: #e2f7ea; }
.tile__thumb--images     { background: #fff0e0; }
.tile__thumb--copywriter { background: #efe7fc; }
.tile__title { font-size: 17px; font-weight: 700; color: var(--text); }
.tile__desc { font-size: 13px; color: var(--muted); line-height: 1.45; }
.tile__status {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 11px;
    padding: 3px 9px;
    border-radius: 100px;
}
.tile__status--ok { background: rgba(31,157,87,.13); color: var(--ok); }
.tile__status--soon { background: rgba(199,127,18,.13); color: var(--soon); }

/* ===== КАРТОЧКА ФОРМЫ ===== */
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 22px;
    box-shadow: var(--shadow);
}
.card--mock { display: flex; flex-direction: column; gap: 16px; }
.card__note { font-size: 13px; color: var(--muted); margin-top: 4px; }

.field { display: flex; flex-direction: column; gap: 7px; flex: 1; }
.field__label { font-size: 13px; color: var(--muted); }
.field input, .field textarea {
    width: 100%;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 12px 14px;
    color: var(--text);
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
}
.field input::placeholder, .field textarea::placeholder { color: #9aa6b4; }
.field-row { display: flex; gap: 14px; }

.dropzone {
    border: 1.5px dashed var(--line);
    border-radius: 11px;
    padding: 30px;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
    background: #f8fafc;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}
.dropzone:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.btn {
    display: inline-block;
    padding: 12px 22px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    align-self: flex-start;
    transition: opacity .15s;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { opacity: .9; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ===== ВЫБОР ДВИЖКА (внутри агента) ===== */
.engine-picker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}
.engine-card {
    background: var(--card);
    border: 1.5px solid var(--line);
    border-radius: 12px;
    padding: 14px 16px;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: border-color .15s, background .15s;
    position: relative;
}
.engine-card:hover { border-color: var(--accent); }
.engine-card.active { border-color: var(--accent); background: var(--accent-soft); }
.engine-card__top { display: flex; align-items: center; gap: 8px; }
.engine-card__name { font-size: 15px; font-weight: 700; color: var(--text); }
.engine-card__tag {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .4px;
    padding: 2px 7px;
    border-radius: 100px;
    background: rgba(43,127,212,.13);
    color: var(--accent);
}
.engine-card__tag--free { background: rgba(31,157,87,.13); color: var(--ok); }
.engine-card__tag--main { background: rgba(31,157,87,.16); color: var(--ok); }
.engine-card__desc { font-size: 12px; color: var(--muted); line-height: 1.4; }
.engine-card__price { font-size: 13px; font-weight: 600; color: var(--text); margin-top: 4px; }
.picker-label { font-size: 13px; color: var(--muted); margin-bottom: 8px; display: block; }

/* бейдж движка в таблице расходов */
.engine-badge {
    display: inline-block;
    font-size: 12px;
    padding: 2px 9px;
    border-radius: 100px;
    background: #eef2f7;
    color: #3d4a5c;
    white-space: nowrap;
}

/* ===== ШАГИ ПРОЦЕССА ===== */
.step-label {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--accent);
    background: var(--accent-soft);
    padding: 4px 12px;
    border-radius: 100px;
    margin-bottom: 14px;
}
.proc-block {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px dashed var(--line);
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.proc-block__hint { font-size: 13px; color: var(--muted); line-height: 1.6; margin: -4px 0 0; }
.proc-progress {
    margin-top: 12px;
    padding: 12px 16px;
    background: var(--accent-soft);
    border: 1px solid rgba(43,127,212,.25);
    border-radius: 10px;
    font-size: 14px;
    color: var(--text);
}
.field select {
    width: 100%;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 12px 14px;
    color: var(--text);
    font-size: 16px;
    font-family: inherit;
}

/* ===== ПРЕВЬЮ ИТОГОВОЙ СТОИМОСТИ ===== */
.cost-preview {
    background: var(--accent-soft);
    border: 1px solid rgba(43,127,212,.25);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 13px;
    color: var(--muted);
    line-height: 1.7;
    margin-bottom: 4px;
}
.cost-preview b { color: var(--text); }
.cost-preview__total { color: var(--accent); font-size: 16px; font-weight: 700; }
.cost-preview__note { color: var(--muted); font-size: 12px; }

/* ===== РЕЗУЛЬТАТ ТРАНСКРИБАЦИИ ===== */
.result-block { margin-top: 22px; }
.proc-tabs { align-self: flex-start; flex-wrap: wrap; }
.result-tabs { margin-bottom: 10px; display: inline-flex; flex-wrap: wrap; }
.result-area {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 18px 20px;
    max-height: 320px;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.7;
    box-shadow: var(--shadow);
    white-space: pre-wrap;
}
.result-area .r-time { color: var(--accent); font-weight: 600; }
.result-area .r-speaker { font-weight: 700; }
.result-area .r-event { color: var(--soon); font-style: italic; }

.export-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}
.export-row__label { font-size: 13px; color: var(--muted); margin-right: 4px; min-width: 100%; }
.btn-export {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--text);
    border-radius: 9px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.btn-export:hover { border-color: var(--accent); background: var(--accent-soft); }
.btn-export--cloud { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.btn-export:disabled { opacity: .55; cursor: not-allowed; }
.cloud-link {
    margin-top: 10px;
    font-size: 13px;
    color: var(--muted);
    background: var(--accent-soft);
    border: 1px dashed var(--accent);
    border-radius: 8px;
    padding: 10px 14px;
    word-break: break-all;
}

/* ===== РАСХОДЫ: СВОДКА ===== */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 16px;
}
.summary-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px 18px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.summary-card__label { font-size: 13px; color: var(--muted); }
.summary-card__value { font-size: 26px; font-weight: 700; }
.summary-card__usd { font-size: 14px; color: var(--muted); }

.breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    padding: 14px 16px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--muted);
    box-shadow: var(--shadow);
}
.breakdown__item b { color: var(--text); font-weight: 600; margin-left: 4px; }

/* ===== РАСХОДЫ: ГРАФИК ПО ДНЯМ ===== */
.chart {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 20px 20px 14px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}
.chart__title { font-size: 14px; font-weight: 600; margin-bottom: 18px; }
.chart__plot { display: flex; align-items: flex-end; gap: 10px; height: 170px; }
.chart__col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 7px; height: 100%; }
.chart__val { font-size: 11px; color: var(--muted); }
.chart__bar {
    width: 70%;
    max-width: 42px;
    background: linear-gradient(180deg, var(--accent), #5ba3e8);
    border-radius: 6px 6px 0 0;
    min-height: 4px;
    transition: filter .15s;
}
.chart__col:hover .chart__bar { filter: brightness(1.08); }
.chart__day { font-size: 11px; color: var(--muted); }

/* ===== РАСХОДЫ: ФИЛЬТРЫ ===== */
.filters-bar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.period-tabs { display: flex; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 4px; box-shadow: var(--shadow); }
.period-tab {
    border: none;
    background: transparent;
    color: var(--muted);
    font-size: 14px;
    padding: 7px 14px;
    border-radius: 7px;
    cursor: pointer;
    font-family: inherit;
}
.period-tab:hover { color: var(--text); }
.period-tab.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.filters-bar__note { font-size: 12px; color: var(--muted); }

/* ===== РАСХОДЫ: ТАБЛИЦА ===== */
.table-wrap {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow-x: auto;
    box-shadow: var(--shadow);
}
.usage-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
.usage-table th, .usage-table td { padding: 13px 16px; text-align: left; white-space: nowrap; }
.usage-table thead th {
    color: var(--muted);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .4px;
    border-bottom: 1px solid var(--line);
}
.usage-table tbody tr { border-bottom: 1px solid var(--line); }
.usage-table tbody tr:last-child { border-bottom: none; }
.usage-table tbody tr:hover { background: #f6f9fc; }
.ta-right { text-align: right; }
.cost-usd { color: var(--muted); font-size: 12px; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 7px; vertical-align: middle; }
.dot--ok { background: var(--ok); }
.dot--err { background: var(--err); }

/* ===== АДАПТИВ ===== */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 0; left: 0;
        z-index: 50;
        transform: translateX(-100%);
        transition: transform .25s ease;
        box-shadow: 2px 0 24px rgba(16,24,40,.18);
    }
    .sidebar.open { transform: translateX(0); }
    .burger { display: inline-flex; align-items: center; justify-content: center; }
    .topbar { padding: 14px 18px; }
    .screens { padding: 20px 18px; }
    .screen__head h2 { font-size: 21px; }
    .field-row { flex-direction: column; gap: 16px; }
    .summary-cards { grid-template-columns: 1fr; gap: 10px; }
    .summary-card__value { font-size: 22px; }
    .home-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .tile { padding: 16px 14px; }
    .tile__thumb { width: 48px; height: 48px; font-size: 24px; }
}
@media (max-width: 420px) {
    .home-grid { grid-template-columns: 1fr; }
}

/* ===== БАЛАНС ПО АККАУНТАМ ===== */
.balance-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 22px;
}
.balance-card {
    background: var(--card);
    border: 1px solid rgba(0,0,0,.07);
    border-left: 3px solid var(--muted);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.balance-card--ok { border-left-color: var(--ok); }
.balance-card--spent { border-left-color: var(--accent); }
.balance-card--err { border-left-color: var(--err); color: var(--err); }
.balance-card--load { color: var(--muted); border-left-color: rgba(0,0,0,.1); }
.balance-card__name { font-weight: 700; font-size: 15px; color: var(--text); }
.balance-card__role { font-size: 12px; color: var(--muted); }
.balance-card__value { font-size: 19px; font-weight: 700; color: var(--text); margin-top: 4px; }
.balance-card--ok .balance-card__value { color: var(--ok); }
.balance-card__note { font-size: 11px; color: var(--muted); line-height: 1.4; }

/* Компактная строка остатка под движками транскрибатора */
.balance-mini {
    font-size: 13px;
    color: var(--muted);
    margin: 4px 0 18px;
    font-weight: 600;
}
.balance-mini:empty { display: none; }

/* Плавное приглушение таблицы расходов при смене периода (без скачков высоты) */
#usageRows { transition: opacity .15s ease; }

/* Архив расшифровок (Последние расшифровки) */
.archive-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.archive-item {
    position: relative;
    text-align: left;
    width: 100%;
    background: var(--card);
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 10px;
    padding: 12px 40px 12px 14px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: border-color .15s ease, background .15s ease;
}
.archive-item__del {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 26px;
    height: 26px;
    line-height: 26px;
    text-align: center;
    border-radius: 7px;
    color: var(--muted);
    font-size: 14px;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.archive-item__del:hover { background: var(--err); color: #fff; }
.archive-item:hover { border-color: var(--accent); background: var(--accent-soft); }
.archive-item__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.archive-item__head b { font-size: 14px; color: var(--text); word-break: break-word; }
.archive-item__meta { font-size: 12px; color: var(--muted); white-space: nowrap; }
.archive-item__preview { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.archive-empty { color: var(--muted); font-size: 14px; padding: 14px; text-align: center; }
@media (max-width: 600px) {
    .archive-item__meta { white-space: normal; }
}

/* Неактивная модель/таб (в разработке) */
.period-tab--soon {
    opacity: 0.5;
    cursor: not-allowed !important;
    color: var(--muted) !important;
}
.period-tab--soon:hover { background: transparent; }

/* ===== ФРИЛАНС ===== */

/* Счётчик непрочитанных в меню */
.nav-item__count {
    min-width: 20px;
    height: 20px;
    line-height: 20px;
    padding: 0 6px;
    border-radius: 100px;
    background: var(--err);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}
.nav-item__count[hidden] { display: none; }

/* Счётчик на плитке (красный кружок) */
.tile { position: relative; }
.tile__count {
    position: absolute;
    top: 10px;
    left: 10px;
    min-width: 22px;
    height: 22px;
    line-height: 22px;
    padding: 0 6px;
    border-radius: 100px;
    background: var(--err);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.tile__count[hidden] { display: none; }
.tile__thumb--freelance { background: #e6f0e2; }

/* Панель сверху: расход ИИ + действия */
.fl-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.fl-cost { display: flex; gap: 14px; flex-wrap: wrap; align-items: baseline; font-size: 13px; color: var(--muted); }
.fl-cost__label { font-weight: 600; color: var(--text); }
.fl-cost__item b { color: var(--text); }
.fl-toolbar__actions { display: flex; gap: 8px; }

.btn-mini {
    border: 1px solid rgba(0,0,0,.12);
    background: var(--card);
    color: var(--text);
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.btn-mini:hover { border-color: var(--accent); background: var(--accent-soft); }
.btn-mini--go {
    border-color: var(--accent);
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
}

/* Список заданий */
.fl-list { display: flex; flex-direction: column; gap: 10px; }
.fl-card {
    position: relative;
    background: var(--card);
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 12px;
    padding: 14px 44px 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
/* Непрочитанное — синяя полоса слева */
.fl-card--new { border-left: 3px solid var(--accent); }
.fl-card__del {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    border: none;
    background: transparent;
    border-radius: 8px;
    color: var(--muted);
    font-size: 15px;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.fl-card__del:hover { background: var(--err); color: #fff; }
.fl-card__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.fl-card__title { font-size: 16px; font-weight: 700; color: var(--text); word-break: break-word; }
.fl-card__price { font-size: 15px; font-weight: 700; color: var(--ok); white-space: nowrap; }
.fl-card__desc { font-size: 14px; color: var(--muted); line-height: 1.5; white-space: pre-line; }
.fl-card__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 2px; }
.fl-card__meta { font-size: 12px; color: var(--muted); }
.fl-card__agent {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-soft);
    padding: 2px 8px;
    border-radius: 100px;
}
.fl-empty { color: var(--muted); font-size: 14px; padding: 18px; text-align: center; line-height: 1.6; }

/* Блок «Как бот определяет задания» */
.fl-rules {
    background: var(--card);
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 12px;
    padding: 0 16px;
    margin-bottom: 16px;
}
.fl-rules summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--accent);
    padding: 14px 0;
    list-style: none;
    user-select: none;
}
.fl-rules summary::-webkit-details-marker { display: none; }
.fl-rules summary::before { content: "▸ "; }
.fl-rules[open] summary::before { content: "▾ "; }
.fl-rules__body { padding-bottom: 14px; font-size: 14px; color: var(--text); line-height: 1.6; }
.fl-rules__body p { color: var(--muted); margin: 0 0 10px; }
.fl-rules__body ul { margin: 0 0 10px; padding-left: 18px; display: flex; flex-direction: column; gap: 7px; }
.fl-rules__body li { color: var(--text); }
.fl-rules__skip { font-size: 13px; }

/* Фильтр по агенту — переносится/скроллится на узких экранах */
.fl-filter { flex-wrap: wrap; margin-bottom: 14px; }
@media (max-width: 600px) {
    .fl-filter { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .fl-filter .period-tab { white-space: nowrap; }
}

@media (max-width: 600px) {
    .fl-toolbar { flex-direction: column; align-items: flex-start; }
    .fl-card__foot { flex-direction: column; align-items: flex-start; }
    .btn-mini--go { width: 100%; text-align: center; }
}

/* Неактивные движки (в разработке) */
.engine-card--soon {
    opacity: 0.55;
    cursor: not-allowed !important;
    filter: grayscale(0.35);
}
.engine-card--soon:hover { border-color: rgba(0,0,0,.08); }
.engine-card__tag--soon {
    background: rgba(0,0,0,.07);
    color: var(--muted);
}

/* Кнопка «Скопировать» рядом со ссылкой облака */
.btn-copy {
    border: 1px solid var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: 7px;
    padding: 4px 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    margin: 0 4px;
}
.btn-copy:hover { background: var(--accent); color: #fff; }
.cloud-link__hint { color: var(--muted); font-size: 13px; }

/* Выбор формата для выгрузки в облако */
.cloud-format-pick {
    font-size: 13px;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 6px;
}
.cloud-format {
    padding: 6px 10px;
    border: 1px solid rgba(0,0,0,.12);
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    color: var(--text);
    cursor: pointer;
}

/* Подзаголовки секций (Баланс / Расходы) */
.section-sub {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    margin: 26px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0,0,0,.07);
}

/* Курсор-палец на всех кликабельных элементах (и текущих, и будущих) */
button, select, .btn, .tile, .nav-item, .brand, .engine-card, .period-tab,
.dropzone, #trSpeakers,
[data-target], [data-engine], [data-format], [data-mode], [data-model],
[data-view], [data-period] {
    cursor: pointer;
}
