
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    :root {
      --bg: #0f1117; --surface: #1a1d27; --surface2: #222536;
      --border: #2a2d3e; --accent: #6c63ff; --danger: #e74c3c;
      --warn: #f39c12; --ok: #2ecc71; --text: #e0e0e0; --muted: #6b7280;
    }
    body { background: var(--bg); color: var(--text); font-family: 'Segoe UI', system-ui, sans-serif; font-size: 13px; }
    #login-screen {
      display: none;
      position: fixed; inset: 0;
      background: var(--bg);
      align-items: center; justify-content: center;
      z-index: 200;
    }
    #login-screen.visible { display: flex; }
    .login-box {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 36px 32px;
      width: 340px;
      max-width: 95vw;
    }
    .login-box h2 { color: #fff; font-size: 20px; margin-bottom: 6px; }
    .login-box .login-subtitle { font-size: 12px; color: var(--muted); margin-bottom: 24px; }
    #app { display: none; }
    input, select, textarea { width:100%; background:var(--bg); border:1px solid var(--border); border-radius:6px; color:var(--text); padding:7px 10px; font-size:13px; outline:none; }
    input:focus, select:focus, textarea:focus { border-color:var(--accent); }
    button { cursor:pointer; border:none; border-radius:6px; padding:7px 14px; font-size:13px; transition:opacity .15s; }
    button:hover { opacity:.85; }
    button:disabled { opacity:.4; cursor:not-allowed; }
    .btn-primary { background:var(--accent); color:#fff; }
    .btn-danger  { background:var(--danger); color:#fff; }
    .btn-ok      { background:var(--ok); color:#000; }
    .btn-warn    { background:var(--warn); color:#000; }
    .btn-ghost   { background:var(--surface2); color:var(--text); border:1px solid var(--border); }
    .btn-sm      { padding:3px 9px; font-size:12px; }

    .app { display:flex; flex-direction:column; height:100vh; }
    nav { background:var(--surface); border-bottom:1px solid var(--border); display:flex; flex-direction:column; align-items:stretch; gap:0; flex-shrink:0; }
    .app-nav__top { display:flex; align-items:center; gap:8px; min-height:50px; padding:0 16px; }
    .app-nav__menu { display:flex; align-items:center; gap:4px; min-height:44px; padding:6px 16px; border-top:1px solid var(--border); overflow-x:auto; }
    .app-nav__menu button { flex-shrink:0; white-space:nowrap; }
    .app-nav__menu #msk-tabs, .app-nav__menu #white-tabs { flex-shrink:0; }
    nav h1 { font-size:15px; font-weight:700; color:#fff; margin-right:20px; }
    nav button { background:transparent; color:var(--muted); padding:5px 12px; border-radius:6px; }
    nav button.active { background:var(--accent); color:#fff; }

    .page { display:none; flex:1; overflow:auto; padding:16px; }
    .page.active { display:block; }

    /* Stats */
    .stats { display:flex; gap:12px; flex-wrap:wrap; margin-bottom:16px; }
    .stat-card { background:var(--surface); border:1px solid var(--border); border-radius:10px; padding:12px 20px; }
    .stat-card .val { font-size:24px; font-weight:700; color:#fff; }
    .stat-card .label { font-size:11px; color:var(--muted); margin-top:2px; }

    /* Filters */
    .filters { display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-bottom:12px; }
    .filters input, .filters select { width:auto; min-width:150px; }

    /* Table */
    .table-wrap { overflow-x:auto; border:1px solid var(--border); border-radius:8px; }
    table { width:100%; border-collapse:collapse; }
    th { background:var(--surface); color:var(--muted); text-align:left; padding:8px 10px; font-weight:600; font-size:11px; border-bottom:1px solid var(--border); white-space:nowrap; user-select:none; }
    th.sortable { cursor:pointer; }
    /* Прибыль скрыта от роли viewer (класс ставит applyRole); сервер её такой роли не отдаёт */
    body.role-viewer .col-profit { display:none; }
    th.sortable:hover { color:var(--text); }
    /* Мульти-сортировка: клик по колонке добавляет её в цепочку (номер = приоритет),
       повторный клик по той же колонке убирает её из цепочки. */
    th.sort-active::after { content:' ↑' attr(data-sort-num); color:var(--accent); font-weight:700; }
    td { padding:6px 10px; border-bottom:1px solid var(--border); vertical-align:middle; }
    tr:last-child td { border-bottom:none; }
    tr:hover td { background:rgba(255,255,255,.02); }

    /* Inline edit */
    .editable { cursor:pointer; border-radius:4px; padding:2px 4px; transition:background .1s; }
    .editable:hover { background:rgba(108,99,255,.2); }
    .editable.editing { padding:0; }
    .editable.editing input, .editable.editing select {
      width:100%; min-width:60px; padding:2px 6px; font-size:12px;
      background:var(--surface2); border:1px solid var(--accent);
    }

    /* Badge */
    .badge { display:inline-block; font-size:10px; padding:2px 6px; border-radius:8px; font-weight:600; white-space:nowrap; }
    .badge-ok   { background:rgba(46,204,113,.15); color:var(--ok); }
    .badge-warn { background:rgba(243,156,18,.15); color:var(--warn); }
    .badge-off  { background:rgba(255,255,255,.07); color:var(--muted); }
    .badge-purple { background:rgba(108,99,255,.15); color:#a29bfe; }

    /* Toggle */
    .toggle { position:relative; display:inline-block; width:34px; height:18px; flex-shrink: 0;}
    .toggle input { opacity:0; width:0; height:0; }
    .slider { position:absolute; inset:0; background:#3a3d4e; border-radius:20px; transition:.2s; cursor:pointer; }
    .slider::before { content:''; position:absolute; width:12px; height:12px; left:3px; bottom:3px; background:#fff; border-radius:50%; transition:.2s; }
    input:checked + .slider { background:var(--accent); }
    input:checked + .slider::before { transform:translateX(16px); }

    /* Log */
    .log-entry { background:var(--surface); border:1px solid var(--border); border-radius:8px; padding:12px; margin-bottom:8px; }
    .log-entry pre { white-space:pre-wrap; word-break:break-all; color:var(--muted); margin-top:6px; font-family:monospace; font-size:11px; max-height:120px; overflow:auto; }
    .parsed-ok      { border-left:4px solid #22c55e; }
    .parsed-err     { border-left:4px solid var(--danger); }
    .parsed-pending { border-left:4px solid #f59e0b; }
    .parsed-reject  { border-left:4px solid #94a3b8; }
    .log-status { display:inline-block; padding:2px 8px; border-radius:10px; font-size:11px; font-weight:600; }
    .log-status.ok      { background:#dcfce7; color:#166534; }
    .log-status.pending { background:#fef3c7; color:#92400e; }
    .log-status.reject  { background:#f1f5f9; color:#64748b; }
    .log-status.err     { background:#fee2e2; color:#991b1b; }

    /* Modal */
    .modal-overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,.75); z-index:100; align-items:center; justify-content:center; }
    .modal-overlay.open { display:flex; }
    .modal { background:var(--surface); border:1px solid var(--border); border-radius:12px; padding:24px; width:480px; max-width:95vw; max-height:90vh; overflow-y:auto; }
    .modal h3 { margin-bottom:16px; color:#fff; font-size:16px; }
    .form-group { margin-bottom:12px; }
    .form-group label { display:block; font-size:11px; color:var(--muted); margin-bottom:4px; }
    .form-row { display:flex; gap:8px; margin-top:16px; justify-content:flex-end; }

    /* Products page */
    .product-card { background:var(--surface); border:1px solid var(--border); border-radius:8px; padding:14px; margin-bottom:8px; }
    .product-card h4 { color:#fff; margin-bottom:4px; }
    .product-card .meta { font-size:11px; color:var(--muted); }
    .variants-table td, .variants-table th { padding:5px 8px; font-size:12px; }

    .context-text { font-size:10px; color:var(--muted); font-family:monospace; background:rgba(0,0,0,.3); padding:4px 6px; border-radius:4px; margin-top:4px; white-space:pre-wrap; word-break:break-all; }

    /* Review Queue v2 */
    .rcv { background:var(--surface); border:1px solid var(--border); border-radius:10px; padding:0; margin-bottom:10px; overflow:hidden; outline:none; }
    .rcv:focus { border-color:var(--accent); }
    .rcv-header { display:flex; justify-content:space-between; align-items:center; padding:10px 14px; border-bottom:1px solid var(--border); gap:8px; }
    .rcv-header h4 { color:#fff; margin:0; font-size:14px; }
    .rcv-body { display:grid; grid-template-columns:minmax(160px,220px) 1fr; gap:0; }
    .rcv-context { padding:10px 12px; border-right:1px solid var(--border); background:rgba(0,0,0,.15); }
    .rcv-context .ctx-label { font-size:10px; color:var(--muted); margin-bottom:4px; text-transform:uppercase; letter-spacing:.05em; }
    .rcv-context pre { font-size:10px; color:var(--muted); font-family:monospace; white-space:pre-wrap; word-break:break-all; line-height:1.5; max-height:120px; overflow-y:auto; }
    .rcv-variants { padding:8px 12px; }
    .rv-table { width:100%; border-collapse:collapse; }
    .rv-table th { font-size:10px; color:var(--muted); font-weight:600; padding:3px 6px; text-align:left; border-bottom:1px solid var(--border); }
    .rv-table td { padding:3px 4px; border-bottom:1px solid rgba(255,255,255,.04); font-size:12px; }
    .rv-table tr:last-child td { border-bottom:none; }
    .rv-table input { width:100%; background:var(--surface2); border:1px solid transparent; border-radius:4px; color:var(--text); padding:2px 5px; font-size:12px; }
    .rv-table input:focus { border-color:var(--accent); outline:none; }

    .rcv-confirm {
        padding: 12px 14px 14px;
        border-top: 1px solid var(--border);
        background: rgba(0, 0, 0, .1);
    }

    .rcv-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        align-items: stretch;
        gap: 12px;
    }

    .rcv-action {
        min-width: 0;
        padding: 10px;
        border: 1px solid var(--border);
        border-radius: 8px;
    }

    .rcv-action--link {
        background: rgba(46, 204, 113, .04);
        border-color: rgba(46, 204, 113, .22);
    }

    .rcv-action--create {
        background: rgba(108, 99, 255, .05);
        border-color: rgba(108, 99, 255, .28);
    }

    .rcv-action__title {
        margin-bottom: 8px;
        font-size: 11px;
        font-weight: 600;
        color: var(--text);
    }

    .rcv-action__controls {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .rcv-action__controls > input {
        width: 100%;
        max-width: none;
    }

    .rcv-action__row {
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .rcv-action__row select {
        flex: 1;
        min-width: 0;
    }

    .rcv-action__button {
        flex-shrink: 0;
        white-space: nowrap;
    }

    .rcv-actions__or {
        align-self: center;
        padding: 0 2px;
        font-size: 11px;
        color: var(--muted);
    }

    .rcv-suggestions__label {
        font-size: 11px;
        color: var(--muted);
        white-space: nowrap;
    }

    @media (max-width: 900px) {
        .rcv-actions {
            grid-template-columns: 1fr;
            gap: 8px;
        }

        .rcv-actions__or {
            text-align: center;
        }
    }
    
    .undo-bar { display:flex; align-items:center; gap:10px; background:rgba(243,156,18,.12); border:1px solid rgba(243,156,18,.35); border-radius:8px; padding:8px 14px; margin-bottom:10px; font-size:13px; }
    .undo-bar span { flex:1; color:var(--text); }
    .rcv-suggestions { display:flex; gap:5px; align-items:center; flex-wrap:wrap; width:100%; padding-bottom:6px; border-bottom:1px solid var(--border); margin-bottom:2px; }
    .btn-suggest { background:rgba(52,152,219,.15); border:1px solid rgba(52,152,219,.4); color:var(--accent); border-radius:12px; padding:3px 10px; font-size:11px; cursor:pointer; white-space:nowrap; max-width:220px; overflow:hidden; text-overflow:ellipsis; }
    .btn-suggest:hover { background:rgba(52,152,219,.3); }

    /* Price alert */
    .price-alert-badge { display:inline-block; font-size:9px; font-weight:700; background:rgba(231,76,60,.2); color:#e74c3c; border:1px solid rgba(231,76,60,.4); border-radius:4px; padding:1px 4px; margin-left:3px; vertical-align:middle; }

    /* Price history */
    .price-up   { color: var(--ok); }
    .price-down { color: var(--danger); }
    .price-dir  { font-size:11px; margin-left:3px; }
    .price-hist-btn { background:none; border:none; cursor:pointer; color:var(--muted); font-size:10px; padding:0 2px; line-height:1; vertical-align:middle; }
    .price-hist-btn:hover { color:var(--accent); opacity:1; }
    .history-row { display:flex; justify-content:space-between; align-items:center; padding:8px 0; border-bottom:1px solid var(--border); }
    .history-row:last-child { border-bottom:none; }
    .history-price { font-size:14px; font-weight:700; }
    .history-diff  { font-size:12px; font-weight:600; min-width:60px; text-align:center; }
    .history-date  { font-size:11px; color:var(--muted); }

    /* MSK mode */
    .price-fast { color:var(--ok);   font-weight:700; font-size:13px; }
    .price-slow { color:#a29bfe; font-weight:700; font-size:13px; }
    .price-sup  { color:var(--muted); font-size:11px; }

/* ============================================================
   Utilities migrated from former inline style="" attributes.
   Kept at the end to preserve the original visual priority.
   ============================================================ */
html body .u-w-100pct.u-w-100pct { width: 100%; }
html body .u-mt-8.u-mt-8 { margin-top: 8px; }
html body .u-text-danger.u-text-danger { color: var(--danger); }
html body .u-mt-10.u-mt-10 { margin-top: 10px; }
html body .u-text-center.u-text-center { text-align: center; }
html body .u-fs-12.u-fs-12 { font-size: 12px; }
html body .u-flex.u-flex { display: flex; }
html body .u-items-center.u-items-center { align-items: center; }
html body .u-gap-2.u-gap-2 { gap: 2px; }
html body .u-mr-14.u-mr-14 { margin-right: 14px; }
html body .u-bg-surface-2.u-bg-surface-2 { background: var(--surface2); }
html body .u-border.u-border { border: 1px solid var(--border); }
html body .u-radius-8.u-radius-8 { border-radius: 8px; }
html body .u-p-3.u-p-3 { padding: 3px; }
html body .u-bg-accent.u-bg-accent { background: var(--accent); }
html body .u-text-white.u-text-white { color: #fff; }
html body .u-radius-6.u-radius-6 { border-radius: 6px; }
html body .u-p-4-12.u-p-4-12 { padding: 4px 12px; }
html body .u-fw-600.u-fw-600 { font-weight: 600; }
html body .u-nowrap.u-nowrap { white-space: nowrap; }
html body .u-bg-transparent.u-bg-transparent { background: transparent; }
html body .u-text-muted.u-text-muted { color: var(--muted); }
html body .u-contents.u-contents { display: contents; }
html body .u-text-warn.u-text-warn { color: var(--warn); }
html body .u-hidden.u-hidden { display: none; }
html body .u-gap-4.u-gap-4 { gap: 4px; }
html body .u-ml-auto.u-ml-auto { margin-left: auto; }
html body .u-gap-10.u-gap-10 { gap: 10px; }
html body .u-fs-11.u-fs-11 { font-size: 11px; }
html body .u-p-5-10.u-p-5-10 { padding: 5px 10px; }
html body .u-justify-center.u-justify-center { justify-content: center; }
html body .u-gap-12.u-gap-12 { gap: 12px; }
html body .u-p-12-0.u-p-12-0 { padding: 12px 0; }
html body .u-text-ok.u-text-ok { color: var(--ok); }
html body .u-mb-12.u-mb-12 { margin-bottom: 12px; }
html body .u-mr-4.u-mr-4 { margin-right: 4px; }
html body .u-min-w-160.u-min-w-160 { min-width: 160px; }
html body .u-min-w-180.u-min-w-180 { min-width: 180px; }
html body .u-justify-between.u-justify-between { justify-content: space-between; }
html body .u-mb-14.u-mb-14 { margin-bottom: 14px; }
html body .u-gap-8.u-gap-8 { gap: 8px; }
html body .u-margin-0.u-margin-0 { margin: 0; }
html body .u-bg-surface.u-bg-surface { background: var(--surface); }
html body .u-radius-10.u-radius-10 { border-radius: 10px; }
html body .u-p-14.u-p-14 { padding: 14px; }
html body .u-flex-1.u-flex-1 { flex: 1; }
html body .u-mb-10.u-mb-10 { margin-bottom: 10px; }
html body .u-min-w-200.u-min-w-200 { min-width: 200px; }
html body .u-min-w-130.u-min-w-130 { min-width: 130px; }
html body .u-gap-6.u-gap-6 { gap: 6px; }
html body .u-mb-16.u-mb-16 { margin-bottom: 16px; }
html body .u-flex-wrap.u-flex-wrap { flex-wrap: wrap; }
html body .u-p-10-14.u-p-10-14 { padding: 10px 14px; }
html body .u-min-w-260.u-min-w-260 { min-width: 260px; }
html body .u-fs-13.u-fs-13 { font-size: 13px; }
html body .u-min-w-220.u-min-w-220 { min-width: 220px; }
html body .u-margin-24-0-10.u-margin-24-0-10 { margin: 24px 0 10px; }
html body .u-items-start.u-items-start { align-items: flex-start; }
html body .u-margin-0-0-4.u-margin-0-0-4 { margin: 0 0 4px; }
html body .u-mb-28.u-mb-28 { margin-bottom: 28px; }
html body .u-margin-0-0-2.u-margin-0-0-2 { margin: 0 0 2px; }
html body .u-mb-20.u-mb-20 { margin-bottom: 20px; }
html body .u-max-w-480.u-max-w-480 { max-width: 480px; }
html body .u-flex-column.u-flex-column { flex-direction: column; }
html body .u-gap-16.u-gap-16 { gap: 16px; }
html body .u-mb-8.u-mb-8 { margin-bottom: 8px; }
html body .u-block.u-block { display: block; }
html body .u-p-10-16.u-p-10-16 { padding: 10px 16px; }
html body .u-min-w-140.u-min-w-140 { min-width: 140px; }
html body .u-mb-2.u-mb-2 { margin-bottom: 2px; }
html body .u-fs-20.u-fs-20 { font-size: 20px; }
html body .u-fw-700.u-fw-700 { font-weight: 700; }
html body .u-w-90.u-w-90 { width: 90px; }
html body .u-fs-14.u-fs-14 { font-size: 14px; }
html body .u-p-2-6.u-p-2-6 { padding: 2px 6px; }
html body .u-fs-10.u-fs-10 { font-size: 10px; }
html body .u-mt-4.u-mt-4 { margin-top: 4px; }
html body .u-mt-6.u-mt-6 { margin-top: 6px; }
html body .u-mt-24.u-mt-24 { margin-top: 24px; }
html body .u-mt-14.u-mt-14 { margin-top: 14px; }
html body .u-overflow-auto.u-overflow-auto { overflow: auto; }
html body .u-p-16.u-p-16 { padding: 16px; }
html body .u-text-purple.u-text-purple { color: #a29bfe; }
html body .u-pointer.u-pointer { cursor: pointer; }
html body .u-p-4-8.u-p-4-8 { padding: 4px 8px; }
html body .u-bg-page.u-bg-page { background: var(--bg); }
html body .u-text-default.u-text-default { color: var(--text); }
html body .u-items-end.u-items-end { align-items: flex-end; }
html body .u-w-150.u-w-150 { width: 150px; }
html body .u-mb-4.u-mb-4 { margin-bottom: 4px; }
html body .u-w-110.u-w-110 { width: 110px; }
html body .u-pb-8.u-pb-8 { padding-bottom: 8px; }
html body .u-p-30.u-p-30 { padding: 30px; }
html body .u-gap-5.u-gap-5 { gap: 5px; }
html body .u-mb-5.u-mb-5 { margin-bottom: 5px; }
html body .u-p-8.u-p-8 { padding: 8px; }
html body .u-resize-y.u-resize-y { resize: vertical; }
html body .u-font-inherit.u-font-inherit { font-family: inherit; }
html body .u-max-h-300.u-max-h-300 { max-height: 300px; }
html body .u-overflow-y-auto.u-overflow-y-auto { overflow-y: auto; }
html body .u-w-520.u-w-520 { width: 520px; }
html body .u-p-10.u-p-10 { padding: 10px; }
html body .u-max-h-160.u-max-h-160 { max-height: 160px; }
html body .u-w-900.u-w-900 { width: 900px; }
html body .u-max-w-96vw.u-max-w-96vw { max-width: 96vw; }
html body .u-max-h-460.u-max-h-460 { max-height: 460px; }
html body .u-w-400.u-w-400 { width: 400px; }
html body .u-gap-24.u-gap-24 { gap: 24px; }
html body .u-fs-24.u-fs-24 { font-size: 24px; }
html body .u-fs-22.u-fs-22 { font-size: 22px; }
html body .u-w-420.u-w-420 { width: 420px; }
html body .u-max-h-400.u-max-h-400 { max-height: 400px; }
html body .u-max-h-220.u-max-h-220 { max-height: 220px; }
html body .u-w-700.u-w-700 { width: 700px; }
html body .u-mt-12.u-mt-12 { margin-top: 12px; }
html body .u-w-500.u-w-500 { width: 500px; }
html body .u-border-box.u-border-box { box-sizing: border-box; }
html body .u-max-h-340.u-max-h-340 { max-height: 340px; }


/* white */
.mode-tabs {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.is-hidden {
    display: none !important;
}

.white-settings {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px;
    margin-bottom: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.white-settings__field {
    width: 150px;
}

.white-settings__field--small {
    width: 110px;
}

.white-settings__field label {
    display: block;
    margin-bottom: 4px;
    font-size: 11px;
    color: var(--muted);
}

.white-settings__formula {
    padding-bottom: 8px;
    font-size: 11px;
    color: var(--muted);
}

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

.section-head h2 {
    margin: 0 0 4px;
    color: #fff;
}

.section-hint {
    font-size: 11px;
    color: var(--muted);
}

.table-empty {
    padding: 30px;
    text-align: center;
    color: var(--muted);
}

.text-muted-small {
    font-size: 11px;
    color: var(--muted);
    white-space: nowrap;
}
/* App categories */
.app-categories-empty {
    padding: 12px 0;
    color: var(--muted);
}

.app-category {
    padding: 7px 4px 7px calc(var(--app-category-depth) * 24px + 4px);
    border-bottom: 1px solid var(--border);
}

.app-category__head {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 28px;
}

.app-category__title {
    display: flex;
    align-items: baseline;
    gap: 5px;
    min-width: 0;
    flex: 1;
    font-size: 13px;
}

.app-category__title-en {
    color: var(--muted);
    font-size: 11px;
}

.app-category__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.app-category__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.app-category__action:hover:not(:disabled) {
    color: var(--text);
    border-color: var(--accent);
}

.app-category__action--delete:hover:not(:disabled) {
    color: var(--danger);
    border-color: var(--danger);
}

.app-category__action:disabled {
    opacity: .25;
    cursor: default;
}

.app-category-models {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 26px;
    margin-top: 5px;
    padding: 3px;
    border: 1px dashed transparent;
    border-radius: 8px;
}

.app-category-models:empty::after {
    content: 'перетащить модель сюда';
    align-self: center;
    padding: 2px 5px;
    color: var(--muted);
    font-size: 10px;
    opacity: .45;
}

.app-category-models.sortable-drag-over,
.app-category-models:has(.app-model--ghost) {
    border-color: var(--accent);
}

.app-model {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 360px;
    padding: 5px 8px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--surface2);
    cursor: grab;
    user-select: none;
}

.app-model:active {
    cursor: grabbing;
}

.app-model__handle {
    color: var(--muted);
    font-size: 11px;
    letter-spacing: -2px;
}

.app-model__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
}

.app-model__count {
    padding: 1px 5px;
    border-radius: 99px;
    background: rgba(0, 184, 148, .12);
    color: var(--ok);
    font-size: 9px;
    font-weight: 700;
}

.app-model--chosen {
    border-color: var(--accent);
}

.app-model--ghost {
    opacity: .25;
}

.app-model--drag {
    opacity: .9;
}


/* Publication */
.publication-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    max-width: 1280px;
}

.publication-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
}

.publication-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.publication-card__head h3 {
    margin: 0 0 4px;
    color: #fff;
    font-size: 15px;
}

.publication-card__hint,
.publication-status,
.publication-loading {
    font-size: 11px;
    color: var(--muted);
}

.publication-status {
    padding: 8px 10px;
    margin-bottom: 12px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 6px;
}

.publication-status.is-running { color: var(--warn); }
.publication-status.is-error { color: var(--danger); }

.publication-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

@media (max-width: 1050px) {
    .publication-grid { grid-template-columns: 1fr; }
}
