/* Стиль админки app.koduarve.ee (telset-apps/internal/web/static/app.css) — общая часть без витрины. */

:root, [data-theme="dark"] {
  --cc-void: #070b18;
  --cc-base: #0a1024;
  --cc-panel: #101836;
  --cc-inset: #080d1e;
  --cc-hover: #1d2853;
  --cc-line-soft: #1a2447;
  --cc-line: #26325e;
  --cc-line-strong: #36457e;
  --cc-text-hi: #f0f4ff;
  --cc-text: #c3cbe6;
  --cc-text-dim: #8b95bb;
  --cc-text-faint: #7a84ad;
  --cc-accent: #3b6ef6;
  --cc-accent-hot: #6d92ff;
  --cc-up: #35d6a0;
  --cc-up-fill: #0f7a55;
  --cc-down: #ff4d6d;
  --cc-down-fill: #c11c3c;
  --cc-warn: #ffa53d;
  --cc-info: #7b8cff;
  --cc-band: rgb(255 255 255 / 0.028);
  --cc-halo: rgb(59 110 246 / 0.10);
  --cc-shadow: 0 18px 44px rgb(0 0 0 / 0.55);
  /* категории (платформы): проверены валидатором, в т.ч. на различимость для дальтоников */
  --cat-1: #3b6ef6; --cat-2: #1da67a; --cat-3: #d47610; --cat-4: #9a6cf0;
  color-scheme: dark;
}
[data-theme="light"] {
  --cc-void: #eef1f8;
  --cc-base: #ffffff;
  --cc-panel: #ffffff;
  --cc-inset: #eef1f7;
  --cc-hover: #eff3fb;
  --cc-line-soft: #e4e9f2;
  --cc-line: #d3dae8;
  --cc-line-strong: #b6c1d6;
  --cc-text-hi: #0f172a;
  --cc-text: #35405a;
  --cc-text-dim: #5b6683;
  --cc-text-faint: #67718c;
  --cc-accent: #3b6ef6;
  --cc-accent-hot: #2450cc;
  --cc-up: #0f9d6e;
  --cc-down: #dc2f43;
  --cc-warn: #d97706;
  --cc-info: #5b68d8;
  --cc-band: rgb(15 23 42 / 0.022);
  --cc-halo: rgb(59 110 246 / 0.07);
  --cc-shadow: 0 18px 44px rgb(15 23 42 / 0.16);
  --cat-1: #3b6ef6; --cat-2: #0f9d6e; --cat-3: #d97706; --cat-4: #8b5cf6;
  color-scheme: light;
}
:root {
  --r-sm: 6px; --r-md: 10px; --r-lg: 16px;
  --fast: 160ms; --med: 420ms; --out: cubic-bezier(0.22, 1, 0.36, 1);
  --side-w: 236px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { background: var(--cc-void); }
[hidden] { display: none !important; }
body {
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--cc-text);
  background:
    radial-gradient(1200px 500px at 50% -10%, var(--cc-halo), transparent 70%),
    linear-gradient(180deg, var(--cc-base), var(--cc-void) 900px);
  background-repeat: no-repeat;
  background-color: var(--cc-void);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--cc-accent-hot); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; font-weight: 600; color: var(--cc-text-hi); letter-spacing: -0.02em; margin: 0 0 4px; }
h2 { font-size: 15px; font-weight: 600; color: var(--cc-text-hi); letter-spacing: -0.01em; margin: 0 0 12px; }
h3 { font-size: 13.5px; font-weight: 600; color: var(--cc-text-hi); margin: 0 0 8px; }
p { margin: 0 0 10px; }
strong, b { color: var(--cc-text-hi); font-weight: 600; }
:focus-visible { outline: 2px solid var(--cc-accent); outline-offset: 2px; border-radius: 6px; }
.num, td, .mono { font-variant-numeric: tabular-nums; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px; }
.muted { color: var(--cc-text-dim); }
.faint { color: var(--cc-text-faint); }
.small { font-size: 12px; }
.r { text-align: right; }
.sp { height: 16px; }
.spacer { flex: 1; }
.up { color: var(--cc-up); } .down { color: var(--cc-down); } .warnc { color: var(--cc-warn); }

/* ------------------------------------------------------------- каркас */
.shell { display: grid; grid-template-columns: var(--side-w) 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 6px;
  padding: 18px 12px;
  border-right: 1px solid var(--cc-line-soft);
  background: color-mix(in srgb, var(--cc-base) 70%, transparent);
  backdrop-filter: blur(8px);
  z-index: 30;
}
.logo { display: flex; align-items: center; gap: 10px; padding: 4px 10px 16px; color: var(--cc-text-hi); }
.logo .mark {
  width: 32px; height: 32px; border-radius: 10px; flex: none;
  display: grid; place-items: center;
  background: var(--cc-accent); color: #fff; font-weight: 700; font-size: 15px;
}
/* логотип — иконка приложения Telset */
.mark.logo-img { background: none; padding: 0; overflow: hidden; }
.mark.logo-img img { display: block; width: 100%; height: 100%; }
.logo .name { font-weight: 600; font-size: 14.5px; line-height: 1.2; }
.logo .sub { font-size: 11.5px; color: var(--cc-text-faint); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 10px; border-radius: var(--r-md);
  color: var(--cc-text-dim); font-weight: 500; font-size: 13.5px;
  transition: background var(--fast) var(--out), color var(--fast) var(--out);
}
.nav a svg { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav a:hover { background: var(--cc-hover); color: var(--cc-text-hi); text-decoration: none; }
.nav a.active { background: var(--cc-hover); color: var(--cc-text-hi); }
.nav a.active svg { stroke: var(--cc-accent-hot); }
.nav .badge { margin-left: auto; font-size: 11px; color: var(--cc-up); }
.side .foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding: 0 2px; }
.side .who { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r-md); border: 1px solid var(--cc-line-soft); }
.side .who .ava { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--cc-inset); color: var(--cc-text-hi); font-weight: 600; font-size: 12.5px; }
.side .who .nm { font-size: 13px; color: var(--cc-text-hi); font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 28px;
  border-bottom: 1px solid var(--cc-line-soft);
  background: color-mix(in srgb, var(--cc-base) 72%, transparent);
  backdrop-filter: blur(8px);
}
.topbar .crumb { font-size: 13px; color: var(--cc-text-dim); }
.topbar .crumb b { color: var(--cc-text-hi); }
.content { padding: 24px 28px 48px; max-width: 1480px; width: 100%; }
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head .lead { color: var(--cc-text-dim); font-size: 13px; margin: 0; }

/* Свёрнутое меню (кнопка в верхней панели): узкая полоса с иконками, подписи — в подсказках. */
.shell { transition: grid-template-columns var(--med) var(--out); }
html.side-mini .shell { grid-template-columns: 68px 1fr; }
html.side-mini .side { padding: 18px 10px; align-items: center; }
html.side-mini .side .tx { display: none; }
html.side-mini .logo { padding: 4px 0 16px; justify-content: center; }
html.side-mini .nav { width: 100%; }
html.side-mini .nav a { justify-content: center; padding: 10px 0; }
html.side-mini .side .foot { width: 100%; padding: 0; }
html.side-mini .side .who { flex-direction: column; gap: 6px; padding: 8px 0; border: none; }

/* ------------------------------------------------------------- элементы */
.card {
  background: var(--cc-panel);
  border: 1px solid var(--cc-line-soft);
  border-radius: 14px;
  padding: 18px 20px;
  min-width: 0;
}
.card.flush { padding: 0; overflow: auto; }
.card > h2:first-child { margin-top: 0; }
.card .card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.card .card-head h2 { margin: 0; }

.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > .field { flex: 1 1 200px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--cc-line);
  background: var(--cc-inset);
  color: var(--cc-text-hi);
  font: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: background var(--fast) var(--out), border-color var(--fast) var(--out);
}
.btn:hover { background: var(--cc-hover); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.sm { height: 30px; padding: 0 11px; font-size: 12.5px; }
.btn.lg { height: 46px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.btn.primary { background: var(--cc-accent); border-color: var(--cc-accent); color: #fff; }
.btn.primary:hover { background: var(--cc-accent-hot); border-color: var(--cc-accent-hot); }
.btn.danger { background: transparent; border-color: color-mix(in srgb, var(--cc-down) 45%, transparent); color: var(--cc-down); }
.btn.danger:hover { background: color-mix(in srgb, var(--cc-down) 12%, transparent); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--cc-text-dim); }
.btn.ghost:hover { background: var(--cc-hover); color: var(--cc-text-hi); }
.btn.icon { width: 36px; padding: 0; }
.btn.icon.sm { width: 30px; }
.btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; min-width: 0; }
.field label, label.lbl { font-size: 12px; color: var(--cc-text-dim); font-weight: 500; }
input, select, textarea {
  font: inherit; font-size: 13.5px;
  color: var(--cc-text-hi);
  background: var(--cc-inset);
  border: 1px solid var(--cc-line-soft);
  border-radius: var(--r-md);
  padding: 9px 12px;
  width: 100%;
  transition: border-color var(--fast) var(--out);
}
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--cc-accent); }
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--cc-accent); padding: 0; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--cc-text); cursor: pointer; padding: 6px 0; }
select.btn { height: 30px; padding: 0 28px 0 10px; width: auto; }

/* Плашки статусов: тонированная подложка и цветной текст, без насыщенной заливки. */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
  color: var(--cc-text-dim);
  background: color-mix(in srgb, var(--cc-text-dim) 12%, transparent);
}
.pill.ok { color: var(--cc-up); background: color-mix(in srgb, var(--cc-up) 13%, transparent); }
.pill.bad { color: var(--cc-down); background: color-mix(in srgb, var(--cc-down) 13%, transparent); }
.pill.warn { color: var(--cc-warn); background: color-mix(in srgb, var(--cc-warn) 13%, transparent); }
.pill.info { color: var(--cc-accent-hot); background: color-mix(in srgb, var(--cc-accent) 15%, transparent); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--cc-text-faint); flex: none; }
.dot.on { background: var(--cc-up); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cc-up) 22%, transparent); }

.flash {
  padding: 11px 14px; border-radius: var(--r-md);
  border: 1px solid var(--cc-line-soft); background: var(--cc-inset);
  font-size: 13px; color: var(--cc-text);
}
.flash.ok { border-color: color-mix(in srgb, var(--cc-up) 35%, transparent); background: color-mix(in srgb, var(--cc-up) 9%, transparent); color: var(--cc-text-hi); }
.flash.warn { border-color: color-mix(in srgb, var(--cc-warn) 35%, transparent); background: color-mix(in srgb, var(--cc-warn) 9%, transparent); color: var(--cc-text-hi); }
.flash.bad { border-color: color-mix(in srgb, var(--cc-down) 35%, transparent); background: color-mix(in srgb, var(--cc-down) 9%, transparent); color: var(--cc-text-hi); }

/* Таблицы: тихая шапка, строки через тонкую линию. */
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
  color: var(--cc-text-faint); padding: 10px 12px; border-bottom: 1px solid var(--cc-line-soft); white-space: nowrap;
}
td { padding: 11px 12px; border-bottom: 1px solid var(--cc-line-soft); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background var(--fast) var(--out); }
tbody tr:hover { background: var(--cc-hover); }
tr.link { cursor: pointer; }
.card.flush table th:first-child, .card.flush table td:first-child { padding-left: 20px; }
.card.flush table th:last-child, .card.flush table td:last-child { padding-right: 20px; }
.empty { padding: 36px 20px; text-align: center; color: var(--cc-text-dim); }
.empty h3 { margin-bottom: 4px; }

/* Сегментированный переключатель (период, фильтры). */
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 11px; background: var(--cc-inset); border: 1px solid var(--cc-line-soft); }
.seg a, .seg button {
  font: inherit; font-size: 12.5px; font-weight: 500; color: var(--cc-text-dim);
  padding: 5px 12px; border-radius: 8px; border: none; background: none; cursor: pointer;
}
.seg a:hover, .seg button:hover { background: var(--cc-hover); color: var(--cc-text-hi); text-decoration: none; }
.seg .on { background: var(--cc-accent); color: #fff; }
.seg .on:hover { background: var(--cc-accent); color: #fff; }

/* Модальные окна. */
.modal {
  position: fixed; inset: 0; z-index: 100;
  display: none; align-items: flex-start; justify-content: center;
  padding: 6vh 16px; overflow-y: auto;
  background: rgb(3 6 16 / 0.62);
  backdrop-filter: blur(3px);
}
.modal.open { display: flex; animation: fade var(--fast) var(--out); }
.modal .box {
  width: min(640px, 100%);
  background: var(--cc-panel); border: 1px solid var(--cc-line);
  border-radius: var(--r-lg); padding: 22px 24px;
  box-shadow: var(--cc-shadow);
  animation: rise var(--med) var(--out);
}
.modal .box.wide { width: min(860px, 100%); }
.modal h2 { font-size: 17px; margin-bottom: 16px; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

.toast-wrap { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 500; } /* поверх диалогов, плавающей панели снимков и просмотра */
.toast {
  padding: 11px 16px; border-radius: var(--r-md);
  background: var(--cc-panel); border: 1px solid var(--cc-line); color: var(--cc-text-hi);
  box-shadow: var(--cc-shadow); font-size: 13px; max-width: 360px;
  animation: rise var(--med) var(--out);
}

/* Ключ — значение (карточки устройства, выпуска). */
.kv { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 0; }
.kv > div { padding: 9px 0; border-bottom: 1px solid var(--cc-line-soft); min-width: 0; overflow-wrap: anywhere; }
.kv > div:nth-last-child(-n+2) { border-bottom: none; }
.kv .k { color: var(--cc-text-dim); font-size: 12.5px; }
.kv .v { color: var(--cc-text-hi); }

/* Горизонтальные полосы распределения (версии, модели, ОС). */
.dist { display: flex; flex-direction: column; gap: 7px; }
.dist .ln { display: grid; grid-template-columns: minmax(70px, 38%) 1fr 44px; align-items: center; gap: 10px; font-size: 12.5px; }
.dist .nm { color: var(--cc-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dist .tr { display: block; height: 6px; border-radius: 3px; background: var(--cc-inset); overflow: hidden; }
.dist .fl { display: block; height: 100%; border-radius: 3px; background: var(--cc-accent); }
.dist .ct { text-align: right; color: var(--cc-text-dim); font-variant-numeric: tabular-nums; }

/* Медиа приложения (иконка и скриншоты) в админке. */
.media-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.media-tile { position: relative; flex: none; border-radius: 12px; overflow: hidden; border: 1px solid var(--cc-line-soft); background: var(--cc-inset); }
.media-tile img { display: block; height: 180px; width: auto; }
.media-tile.icon img { height: 96px; width: 96px; object-fit: cover; }
.media-tile .acts { position: absolute; inset: auto 6px 6px 6px; display: flex; gap: 4px; justify-content: center; opacity: 0; transition: opacity var(--fast) var(--out); }
.media-tile:hover .acts, .media-tile:focus-within .acts { opacity: 1; }
.media-add {
  flex: none; width: 110px; height: 180px; border-radius: 12px;
  border: 1.5px dashed var(--cc-line); color: var(--cc-text-dim);
  display: grid; place-items: center; text-align: center; font-size: 12px; cursor: pointer; padding: 10px;
}
.media-add.icon { width: 96px; height: 96px; }
.media-tile.wide img, .media-add.wide { width: 320px; height: 180px; object-fit: cover; }
.bg-meta { font-size: 12px; color: var(--cc-text-dim); line-height: 1.6; }
/* заставки главного экрана ТВ-приложения: плитки библиотеки и расписание */
.ss-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin: 10px 0 18px; }
.ss-tile { border: 1px solid var(--cc-line-soft); border-radius: 12px; padding: 8px; background: var(--cc-inset); min-width: 0; }
.ss-tile.on { border-color: var(--cc-accent); box-shadow: 0 0 0 1px var(--cc-accent); }
.ss-pic { position: relative; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #000; }
.ss-pic img, .ss-pic video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ss-pic video { opacity: 0; transition: opacity var(--fast) var(--out); }
.ss-pic .acts { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; opacity: 0; transition: opacity var(--fast) var(--out); }
.ss-tile:hover .acts, .ss-tile:focus-within .acts { opacity: 1; }
.ss-state { position: absolute; inset: 0; display: grid; place-items: center; padding: 8px; text-align: center;
  font-size: 12.5px; color: #fff; background: rgba(0, 0, 0, .55); }
.ss-state.err { background: rgba(140, 20, 20, .7); }
.ss-name { margin-top: 7px; font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss-meta { font-size: 12px; color: var(--cc-text-dim); }
.ss-add { display: grid; place-items: center; min-height: 120px; border: 1.5px dashed var(--cc-line); border-radius: 12px;
  color: var(--cc-text-dim); cursor: pointer; font-weight: 600; padding: 10px; text-align: center; }
.ss-add:hover { color: var(--cc-accent-hot); border-color: var(--cc-accent); }
.ss-add.busy { cursor: progress; }
.ss-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-bottom: 8px; }
.ss-plan { border: 1px solid var(--cc-line-soft); border-radius: 12px; padding: 12px; min-width: 0; }
.ss-now { color: var(--cc-text-dim); margin: 2px 0 8px; }
.ss-periods { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 8px; }
.ss-period { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 6px 8px; border-radius: 8px; background: var(--cc-inset); font-size: 12.5px; }
.ss-period select { flex: 1 1 140px; min-width: 0; }
.ss-period input[type=date] { width: auto; }
.bg-meta .mono { color: var(--cc-text); }
.media-add:hover { border-color: var(--cc-accent); color: var(--cc-text-hi); }
.app-icon { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; background: var(--cc-inset); border: 1px solid var(--cc-line-soft); flex: none; display: grid; place-items: center; color: var(--cc-text-dim); font-weight: 700; overflow: hidden; }
.app-icon img { width: 100%; height: 100%; object-fit: cover; }

/* ------------------------------------------------------------- вход */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth .box {
  width: min(380px, 100%);
  background: var(--cc-panel); border: 1px solid var(--cc-line-soft);
  border-radius: var(--r-lg); padding: 28px;
}
.auth .logo { padding: 0 0 22px; }
.auth .tools { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; gap: 8px; }

/* ------------------------------------------------------------- адаптив */
@media (max-width: 1100px) { .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cols-3 { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .shell, html.side-mini .shell { grid-template-columns: 1fr; }
  html.side-mini .side .tx { display: revert; }
  html.side-mini .side { align-items: stretch; padding: 18px 12px; }
  html.side-mini .nav a { justify-content: flex-start; padding: 9px 10px; }
  html.side-mini .logo { justify-content: flex-start; padding: 4px 10px 16px; }
  html.side-mini .side .who { flex-direction: row; border: 1px solid var(--cc-line-soft); padding: 8px; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: var(--side-w); transform: translateX(-100%); transition: transform var(--med) var(--out); background: var(--cc-base); }
  .side.open { transform: none; box-shadow: var(--cc-shadow); }
  .burger { display: inline-flex; }
  .topbar, .content { padding-left: 16px; padding-right: 16px; }
  .cols-2, .cols-4 { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; }
  .kv .k { border-bottom: none !important; padding-bottom: 0; }
  .hide-sm { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.cc-stat { display: flex; align-items: center; gap: 13px; padding: 6px 8px; margin: -6px -8px; border-radius: var(--r-md); color: inherit; }
a.cc-stat:hover { background: var(--cc-hover); text-decoration: none; }
.cc-stat .ic { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--cc-inset); border: 1px solid var(--cc-line-soft); color: var(--cc-text-dim); }
.cc-stat .ic svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cc-stat .ic.on { background: var(--cc-accent); border-color: var(--cc-accent); color: #fff; }
.cc-stat .lb { font-size: 12px; color: var(--cc-text-dim); }
.cc-stat .vl { font-size: 20px; font-weight: 600; color: var(--cc-text-hi); line-height: 1.15; }
.cc-stat .sb { font-size: 11px; color: var(--cc-text-faint); }

/* ------------------------------------------------------------- коннектор почты */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-bottom: 16px; }
.stats .card { padding: 16px 18px; }
.cc-stat { margin: 0; padding: 0; }
.cc-stat .ic.bad { background: color-mix(in srgb, var(--cc-down) 16%, transparent); border-color: transparent; color: var(--cc-down); }
.cc-stat .ic.warn { background: color-mix(in srgb, var(--cc-warn) 16%, transparent); border-color: transparent; color: var(--cc-warn); }
.wrap-any { overflow-wrap: anywhere; }
td.nowrap, th.nowrap { white-space: nowrap; }
.log td { font-size: 12.5px; vertical-align: top; }
.log .det { color: var(--cc-text-dim); max-width: 560px; overflow-wrap: anywhere; }
.inline { display: inline; margin: 0; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.filters .field { margin: 0; flex: 1 1 180px; }
.filters .field.narrow { flex: 0 1 200px; }
.pager { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 20px; }
.switch-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--cc-line-soft); }
.switch-row:last-child { border-bottom: none; }
.switch-row input[type=checkbox] { margin-top: 3px; }
.switch-row .t { font-weight: 600; color: var(--cc-text-hi); }
.switch-row .d { font-size: 12.5px; color: var(--cc-text-dim); }
.burger { display: none; }
@media (max-width: 860px) { .card.flush table { min-width: 680px; } }
/* вход как в админке KlarScan (foodscan/server/internal/admin/static/admin.css) */
.btn.block { width: 100%; margin-top: 6px; }
input.otp { letter-spacing: .2em; font-size: 16px; }
.flash.mb { margin-bottom: 14px; }
.auth .h-login { font-size: 19px; }
.auth .lead { margin-bottom: 18px; }
.auth .secure { display: flex; gap: 8px; align-items: flex-start; margin: 16px 0 0; line-height: 1.45; }
.auth .secure svg { width: 14px; height: 14px; flex: none; margin-top: 2px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
