/* Incognito Support panel — brand neon dark theme (purple #b26bff / cyan #3de3ff), Manrope */
@font-face { font-family: Manrope; src: url(/fonts/Manrope-Medium.ttf); font-weight: 500; font-display: swap; }
@font-face { font-family: Manrope; src: url(/fonts/Manrope-Bold.ttf); font-weight: 700; font-display: swap; }
@font-face { font-family: Manrope; src: url(/fonts/Manrope-ExtraBold.ttf); font-weight: 800; font-display: swap; }

:root {
  --bg: #07060f;
  --panel: #110e21;
  --panel-2: #171330;
  --border: #2c2350;
  --text: #f1effb;
  --muted: #9a96bd;
  --purple: #b26bff;
  --cyan: #3de3ff;
  --pink: #ff5ec8;
  --green: #43e6a0;
  --radius: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: Manrope, -apple-system, "Segoe UI", Roboto, sans-serif; font-weight: 500;
  background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.5;
  background-image:
    radial-gradient(900px 500px at 100% -10%, rgba(178, 107, 255, .16), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, rgba(61, 227, 255, .08), transparent 60%);
  background-attachment: fixed;
}
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; }
code { background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; color: var(--cyan); }
h1 { font-weight: 800; font-size: 28px; margin: 4px 0 18px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
h2 { font-weight: 800; font-size: 17px; margin: 0 0 14px; display: flex; justify-content: space-between; }
h3 { font-weight: 700; font-size: 14px; margin: 18px 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.right { margin-left: auto; }
.cyan { color: var(--cyan); }
.pink { color: var(--pink); }

/* layout */
.layout { display: flex; min-height: 100vh; }
.side {
  width: 236px; flex-shrink: 0; padding: 22px 16px; border-right: 1px solid var(--border);
  background: rgba(17, 14, 33, .75); backdrop-filter: blur(8px);
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
}
.brand { display: flex; flex-direction: column; line-height: 1.05; margin: 0 8px 26px; text-decoration: none !important; }
.brand .b1 { font-weight: 800; font-size: 20px; color: var(--text); }
.brand .b2 { font-weight: 800; font-size: 20px; color: var(--purple); text-shadow: 0 0 18px rgba(178, 107, 255, .6); }
.brand.big .b1, .brand.big .b2 { font-size: 34px; }
.side nav { display: flex; flex-direction: column; gap: 4px; }
.side nav a { color: var(--text); padding: 10px 12px; border-radius: 12px; font-weight: 700; }
.side nav a:hover { background: var(--panel-2); text-decoration: none; }
.side nav a.on { background: linear-gradient(90deg, rgba(178, 107, 255, .25), rgba(61, 227, 255, .08)); box-shadow: inset 2px 0 0 var(--purple); }
.me { margin-top: auto; padding: 12px; border-top: 1px solid var(--border); font-size: 13px; }
.me-name { margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; }
main { flex: 1; padding: 28px 32px 60px; max-width: 1280px; min-width: 0; }
main.center { display: flex; align-items: center; justify-content: center; }

/* cards */
.card {
  background: linear-gradient(180deg, rgba(23, 19, 48, .9), rgba(17, 14, 33, .9));
  border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 18px;
}
.card.flush { padding: 0; overflow: hidden; }
.card.glow { box-shadow: 0 0 60px rgba(178, 107, 255, .15); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid2.wide-left { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); }
.grid2 > * { min-width: 0; }
.login { max-width: 520px; padding: 34px; }
.login ol { padding-left: 20px; }

/* kpis */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; color: var(--text); display: block; }
a.kpi:hover { border-color: var(--purple); text-decoration: none; }
.kpi.hot { border-color: rgba(255, 94, 200, .55); box-shadow: 0 0 24px rgba(255, 94, 200, .12); }
.kpi-v { font-weight: 800; font-size: 34px; line-height: 1.1; }
.kpi-l { color: var(--muted); font-size: 13px; margin-top: 4px; }

/* charts */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 180px; padding-top: 18px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; position: relative; }
.bar-fill { width: 100%; min-height: 2px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, var(--purple), rgba(61, 227, 255, .6)); }
.bar-n { position: absolute; top: 0; font-size: 11px; color: var(--muted); }
.bar-d { font-size: 11px; color: var(--muted); margin-top: 6px; }
.hbar { display: grid; grid-template-columns: 1.3fr 2fr 36px; gap: 10px; align-items: center; margin: 7px 0; font-size: 14px; }
.hbar-track { height: 8px; background: var(--panel-2); border-radius: 6px; overflow: hidden; }
.hbar-fill { height: 100%; background: linear-gradient(90deg, var(--cyan), var(--purple)); border-radius: 6px; }
.hbar b { text-align: right; }

/* chips & badges */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { background: var(--panel-2); border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; font-size: 12px; }
.chip.tool { color: var(--cyan); }
.badge { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 10px; border: 1px solid var(--border); vertical-align: middle; }
.badge.auto { color: var(--green); border-color: rgba(67, 230, 160, .4); }
.badge.draft { color: var(--purple); border-color: rgba(178, 107, 255, .5); }
.badge.off { color: var(--muted); }
.badge.hot { color: var(--pink); border-color: rgba(255, 94, 200, .5); }
.badge.lvl { color: var(--cyan); border-color: rgba(61, 227, 255, .4); }

/* tables */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; color: var(--muted); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.table td { padding: 12px 14px; border-bottom: 1px solid rgba(44, 35, 80, .6); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tr.high td:first-child { box-shadow: inset 3px 0 0 var(--pink); }
/* long text in table cells: shown in full, wrapped (never clipped mid-line) */
.fulltext { min-width: 260px; max-width: 520px; white-space: pre-line; overflow-wrap: anywhere; }
.fulltext.wide { max-width: 680px; }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.tabs a { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border); color: var(--text); font-weight: 700; }
.tabs a.on { background: var(--purple); border-color: var(--purple); color: #0b0716; }
.row-line { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(44, 35, 80, .6); }
.row-line:last-child { border-bottom: 0; }
.more { font-size: 13px; font-weight: 700; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 14px; }
.kv span:first-child { color: var(--muted); }
.back { display: inline-block; margin-bottom: 6px; font-size: 14px; }

/* chat */
.chat { display: flex; flex-direction: column; gap: 10px; }
.msg { border-radius: 14px; padding: 10px 14px; white-space: pre-wrap; word-wrap: break-word; max-width: 85%; border: 1px solid var(--border); }
.msg .who { font-size: 12px; color: var(--muted); margin-bottom: 4px; white-space: normal; }
.msg.user { background: var(--panel-2); align-self: flex-start; }
.msg.ai { background: rgba(61, 227, 255, .07); border-color: rgba(61, 227, 255, .28); align-self: flex-end; }
.msg.op { background: rgba(178, 107, 255, .12); border-color: rgba(178, 107, 255, .4); align-self: flex-end; }
.msg.draft { background: rgba(255, 94, 200, .07); border: 1px dashed rgba(255, 94, 200, .55); align-self: stretch; max-width: none;  white-space: normal; }
.msg .text { white-space: pre-wrap; }
.actions form { display: inline-flex; }
.answer .msg { max-width: none; margin-top: 8px; }
.answer-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 14px; }
.summary pre, pre.wrap { white-space: pre-wrap; word-wrap: break-word; margin: 8px 0 0; font-family: inherit; font-size: 14px; }
pre.prompt { color: var(--muted); }
details summary { cursor: pointer; }

/* forms */
textarea, input[type=text], input:not([type]), input[type=number], select {
  width: 100%; background: #0c0a19; color: var(--text); border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 12px; font: inherit; font-size: 14px;
}
textarea:focus, input:focus, select:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(178, 107, 255, .2); }
textarea { resize: vertical; }
textarea.mono { font-size: 13px; line-height: 1.55; }
.num { max-width: 220px; }
.btn {
  background: var(--panel-2); color: var(--text); border: 1px solid var(--border); border-radius: 12px;
  padding: 9px 16px; font: inherit; font-weight: 700; cursor: pointer;
}
.btn:hover { border-color: var(--purple); }
.btn.primary { background: linear-gradient(90deg, var(--purple), #8f5bff); border-color: transparent; color: #fff; box-shadow: 0 0 20px rgba(178, 107, 255, .35); }
.linkbtn { background: none; border: 0; color: var(--cyan); cursor: pointer; padding: 0; font: inherit; }
.form-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; }
.form-actions .btn { margin-left: auto; }
.actions { display: flex; gap: 8px; margin: 10px 0 4px; flex-wrap: wrap; }
.actions-col { display: flex; flex-direction: column; gap: 8px; }
.actions-col .btn { width: 100%; }
.reply { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.reply .btn { align-self: flex-end; }
.filters { display: flex; gap: 10px; margin-bottom: 16px; max-width: 460px; }
.checks { display: flex; flex-direction: column; gap: 6px; }
.checks label { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.checks.tools label { flex-wrap: wrap; }
.checks.tools label span { flex-basis: 100%; padding-left: 24px; color: var(--muted); font-size: 12px; margin-top: -4px; }
.checks label.locked { opacity: .7; cursor: default; }
.radio { display: flex; gap: 8px; margin: 6px 0; cursor: pointer; }
.switch { display: flex; gap: 6px; align-items: center; font-weight: 700; white-space: nowrap; cursor: pointer; }
.dept-head { display: flex; gap: 12px; align-items: center; }
.title-input { font-weight: 800; font-size: 18px !important; max-width: 340px; }
.dept.disabled { opacity: .6; }
.preview { width: 100%; border-radius: 12px; border: 1px solid var(--border); }

/* flash */
.flash { border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; font-weight: 700; }
.flash.ok { background: rgba(67, 230, 160, .1); border: 1px solid rgba(67, 230, 160, .4); }
.flash.err { background: rgba(255, 94, 200, .1); border: 1px solid rgba(255, 94, 200, .45); }

/* mobile */
@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .side { width: auto; height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--border); }
  .brand { margin: 0 12px 0 0; flex-direction: row; gap: 6px; }
  .side nav { flex-direction: row; overflow-x: auto; flex: 1 1 100%; order: 3; }
  .side nav a { white-space: nowrap; padding: 8px 10px; }
  .me { margin: 0 0 0 auto; border: 0; padding: 0; display: flex; gap: 10px; align-items: center; }
  .me-name { margin: 0; }
  main { padding: 18px 16px 48px; }
  .grid2, .grid2.wide-left { grid-template-columns: 1fr; }
  .msg { max-width: 100%; }
  /* tables become stacked cards on phones: every field readable, nothing squeezed */
  .table.stack thead { display: none; }
  .table.stack tr { display: block; padding: 12px 14px; border-bottom: 1px solid rgba(44, 35, 80, .6); }
  .table.stack tr:last-child { border-bottom: 0; }
  .table.stack td { display: block; padding: 2px 0; border: 0; max-width: none; min-width: 0; }
  .table.stack td:empty { display: none; }
  .table.stack tr.high { box-shadow: inset 3px 0 0 var(--pink); }
  .table tr.high td:first-child { box-shadow: none; }
  .dept-head { flex-wrap: wrap; }
}

/* ---------- live updates, roles, quick replies ---------- */
.nav-badge { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 6px; border-radius: 999px; font-size: 12px;
  line-height: 20px; text-align: center; background: var(--panel-2); border: 1px solid var(--border); color: var(--purple); }
.nav-badge.hot { background: var(--pink); border-color: var(--pink); color: #14061a; box-shadow: 0 0 12px rgba(255, 94, 200, .6); }
.live { font-size: 12px; color: var(--green); font-weight: 700; letter-spacing: .04em; animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
tr.row-link { cursor: pointer; transition: background .15s; }
tr.row-link:hover td { background: rgba(178, 107, 255, .07); }
tr.waiting td { background: rgba(255, 94, 200, .05); }
tr.waiting td:first-child b { color: var(--pink); }
#messages { display: flex; flex-direction: column; gap: 10px; }
.msg.fresh { animation: fresh 2.5s ease-out; }
@keyframes fresh { from { box-shadow: 0 0 0 2px var(--cyan), 0 0 24px rgba(61, 227, 255, .45); } to { box-shadow: none; } }
.banner { border: 1px solid rgba(61, 227, 255, .45); background: rgba(61, 227, 255, .08); border-radius: 12px; padding: 10px 14px; font-weight: 700; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; }
.quick .chip { cursor: pointer; font: inherit; font-size: 13px; color: var(--text); padding: 5px 12px; }
.quick .chip:hover { border-color: var(--purple); background: rgba(178, 107, 255, .12); text-decoration: none; }
.quick .chip.edit { color: var(--muted); }
.team-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 12px 0;
  border-bottom: 1px solid rgba(44, 35, 80, .6); flex-wrap: wrap; }
.team-row:last-child { border-bottom: 0; }
.team-row.off { opacity: .55; }
.team-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.team-actions form, form.inline { display: flex; gap: 6px; align-items: center; }
.team-actions select { width: auto; }
.hot-card { border-color: rgba(255, 94, 200, .5); box-shadow: 0 0 30px rgba(255, 94, 200, .1); }
.form-grid { display: grid; grid-template-columns: 1.2fr 1fr 180px auto; gap: 10px; margin-bottom: 8px; }
.form-grid.qr { grid-template-columns: 1fr 120px; }
.quick-form textarea { margin-top: 0; }
@media (max-width: 900px) { .form-grid { grid-template-columns: 1fr; } .form-grid.qr { grid-template-columns: 1fr 100px; } }
.me-name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.badge.role-superadmin { color: var(--purple); border-color: rgba(178, 107, 255, .5); }
.badge.role-admin { color: var(--cyan); border-color: rgba(61, 227, 255, .4); }
.badge.role-operator { color: var(--green); border-color: rgba(67, 230, 160, .4); }
.nav-badge[hidden], [hidden] { display: none !important; }

/* ---------- ticket composer: one-click messages and templates live in their own box, apart from the reply field ---------- */
.ticket-client { margin: -8px 0 18px; color: var(--muted); font-weight: 700; }
.toolbox { margin-top: 18px; border: 1px solid var(--border); border-radius: 14px; background: rgba(7, 6, 15, .55);
  padding: 12px 14px; display: flex; flex-direction: column; gap: 12px; }
.tool-group + .tool-group { border-top: 1px dashed var(--border); padding-top: 12px; }
.tool-label { font-size: 12px; font-weight: 800; letter-spacing: .02em; margin-bottom: 8px; display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.tool-label .muted { font-weight: 500; }
.tool-label .more { margin-left: auto; font-weight: 700; }
.tool-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tool-row .chip { cursor: pointer; font: inherit; font-size: 13px; color: var(--text); padding: 6px 12px; }
.tool-row .chip.quick-btn:hover { border-color: var(--purple); background: rgba(178, 107, 255, .12); }
.tool-row .chip.send-btn { border-color: rgba(61, 227, 255, .45); background: rgba(61, 227, 255, .07); }
.tool-row .chip.send-btn:hover { background: rgba(61, 227, 255, .16); box-shadow: 0 0 14px rgba(61, 227, 255, .3); }
.reply { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--border); }
.reply-label { font-size: 13px; font-weight: 800; color: var(--purple); }
.reply textarea { border-color: rgba(178, 107, 255, .45); min-height: 110px; }
.reply textarea:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(178, 107, 255, .18); }
.reply-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.reply-bar .btn { align-self: auto; margin-left: auto; }
kbd { font: inherit; font-size: 11px; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 6px; padding: 0 5px; background: var(--panel-2); color: var(--text); }
@media (hover: none) { .reply-bar .kbd-hint { display: none; } }

/* subscription card */
.sub-sep { border-top: 1px dashed var(--border); margin-top: 10px; padding-top: 10px; }
.kv b { text-align: right; }
.meter { height: 6px; border-radius: 999px; background: var(--panel-2); overflow: hidden; margin: 2px 0 6px; }
.meter-fill { height: 100%; background: linear-gradient(90deg, var(--cyan), var(--purple)); }
.meter-fill.warn { background: var(--pink); }
.problem { margin-top: 8px; padding: 8px 10px; border-radius: 10px; font-size: 13px; font-weight: 700;
  background: rgba(255, 94, 200, .08); border: 1px solid rgba(255, 94, 200, .4); }

/* operator names (internal) + toasts */
.msg .who .author { color: var(--text); }
.msg .who .badge { font-size: 10px; padding: 0 6px; vertical-align: 1px; }
.name-input { width: 170px !important; }
#toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 50; max-width: min(420px, calc(100vw - 32px)); }
.toast { border-radius: 12px; padding: 10px 14px; font-weight: 700; font-size: 14px; background: var(--panel);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .5); animation: toast-in .2s ease-out; }
.toast.ok { border: 1px solid rgba(67, 230, 160, .5); }
.toast.err { border: 1px solid rgba(255, 94, 200, .6); }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

/* ---------- ticket page: actions always at hand ----------
   header bar (number, client, Take / Close) sticks to the top on PC and phone;
   on PC the right column follows the scroll too (own scroll if taller than the screen). */
.ticket-bar { position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center;
  gap: 10px 16px; flex-wrap: wrap; margin: 0 -14px 16px; padding: 10px 14px; border-radius: 0 0 14px 14px;
  background: rgba(9, 8, 19, .97);   /* solid, no backdrop blur: blur on a sticky bar repaints every frame and flickers */
  border: 1px solid transparent; border-top: 0; transition: border-color .2s, box-shadow .2s; }
/* the stuck state changes only colour/shadow — never size, or the page would jump and the state flip back and forth */
.ticket-bar.stuck { border-color: var(--border); box-shadow: 0 10px 28px rgba(0, 0, 0, .45); }
#bar-sentinel { height: 1px; margin-bottom: -1px; }
.ticket-bar h1 { margin: 0; font-size: 26px; }
.ticket-bar .ticket-client { margin: 2px 0 0; }
.tb-main { min-width: 0; }
.tb-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tb-actions form { margin: 0; }
.tb-actions .btn { white-space: nowrap; }
.tb-actions .close-btn:hover { border-color: var(--green); box-shadow: 0 0 14px rgba(67, 230, 160, .25); }
.tb-actions .short { display: none; }
.grid2.wide-left { align-items: start; }
.ticket-side { position: sticky; top: var(--bar-h, 96px); max-height: calc(100vh - var(--bar-h, 96px) - 12px);
  overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; display: flex; flex-direction: column; gap: 18px; }
.ticket-side > .card { margin: 0; }
@media (max-width: 900px) {
  .ticket-bar { margin: 0 -16px 12px; padding: 8px 16px; border-radius: 0; gap: 8px; flex-wrap: nowrap; }
  .ticket-bar h1 { font-size: 18px; gap: 6px; }
  .ticket-bar .badge { font-size: 11px; padding: 1px 8px; }
  .ticket-bar .ticket-client { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tb-actions { flex-wrap: nowrap; flex-shrink: 0; }
  .tb-actions .btn { padding: 8px 10px; font-size: 13px; }
  .tb-actions .long { display: none; }
  .ticket-bar .h-long { display: none; }
  .tb-main { flex: 1 1 auto; }
  .tb-actions .short { display: inline; }
  .ticket-side { position: static; max-height: none; overflow: visible; }
}

/* client attachments in the chat */
.att { margin: 4px 0 6px; }
.att img { display: block; max-width: min(320px, 100%); max-height: 360px; border-radius: 10px; border: 1px solid var(--border); cursor: zoom-in; background: var(--bg); }
.att audio { width: min(300px, 100%); }
.att video { max-width: min(320px, 100%); max-height: 360px; border-radius: 10px; }
.msg .seen { margin-top: 6px; padding: 6px 10px; border-radius: 10px; font-size: 12px; color: var(--muted); white-space: normal;
  background: rgba(61, 227, 255, .06); border: 1px dashed rgba(61, 227, 255, .3); }
.msg .seen.off { background: rgba(255, 94, 200, .06); border-color: rgba(255, 94, 200, .35); }

/* client card: profile + devices (collapsed by default) */
.sub-h { font-size: 13px; font-weight: 800; color: var(--muted); margin: 14px 0 4px; padding-top: 12px; border-top: 1px dashed var(--border); }
.kv.stack { flex-direction: column; gap: 2px; }
.kv.stack b { text-align: left; font-weight: 600; }
details.devices > summary { list-style: none; cursor: pointer; border-radius: 8px; }
details.devices > summary::-webkit-details-marker { display: none; }
details.devices > summary:hover b { color: var(--cyan); }
details.devices .caret { display: inline-block; color: var(--cyan); transition: transform .15s; }
details.devices[open] .caret { transform: rotate(180deg); }
.dev-list { list-style: none; margin: 4px 0 8px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.dev-list li { background: rgba(7, 6, 15, .5); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; }
.dev-name { font-weight: 700; font-size: 14px; }
.dev-meta { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 12px; color: var(--muted); margin-top: 2px; }
.dev-meta code { font-size: 12px; user-select: all; }

/* «Сводка»: the short summary comes first, the facts below */
.summary-text { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; font-size: 14px; line-height: 1.45;
  background: rgba(178, 107, 255, .07); border-left: 3px solid var(--purple); }
