:root {
  color-scheme: light;
  --bg: #f6f5f9;
  --surface: #ffffff;
  --surface-2: #f1eff7;
  --border: #e4e1ee;
  --text: #221c3d;
  --text-2: #6b6585;
  --accent: #5b47c9;
  --accent-2: #ece8fb;
  --good: #0a8a23;
  --bad: #c9302f;
  --warn-bg: #fff5dc;
  --warn-text: #7a5300;
  --grid: #ece9f3;
  --side: #2c244c;
  --side-text: #d9d4f0;
  --shadow: 0 1px 2px rgba(34, 28, 61, .06), 0 1px 8px rgba(34, 28, 61, .04);
  font-family: Inter, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --bg: #15121f; --surface: #1e1a2c; --surface-2: #272237; --border: #343048; --text: #ece9f7; --text-2: #a39dbb;
    --accent: #9887ef; --accent-2: #2e2850; --good: #3cc35a; --bad: #f07373; --warn-bg: #3a2f12; --warn-text: #f3cf7a; --grid: #2c2840; --side: #120f1c;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #15121f; --surface: #1e1a2c; --surface-2: #272237; --border: #343048; --text: #ece9f7; --text-2: #a39dbb;
  --accent: #9887ef; --accent-2: #2e2850; --good: #3cc35a; --bad: #f07373; --warn-bg: #3a2f12; --warn-text: #f3cf7a; --grid: #2c2840; --side: #120f1c;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
h1 { font-size: 22px; margin: 0 0 2px; font-weight: 650; letter-spacing: -.01em; }
h3 { font-size: 14px; margin: 0; font-weight: 600; }
button, input, select { font: inherit; color: inherit; }
code, .mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }
.muted { color: var(--text-2); }
.small { font-size: 12px; }
.good { color: var(--good); }
.bad { color: var(--bad); }
.pad { padding: 8px 0 0; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Layout */
.layout { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side { background: var(--side); color: var(--side-text); display: flex; flex-direction: column; padding: 18px 12px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 15px; color: #fff; padding: 0 8px 18px; }
.brand.big { color: var(--text); font-size: 20px; padding: 0 0 6px; }
.logo { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, #8b6cff, #4f3bd1); color: #fff; display: grid; place-items: center; font-weight: 700; }
.side nav { display: flex; flex-direction: column; gap: 2px; }
.nav-sep { height: 1px; background: rgba(255, 255, 255, .1); margin: 8px 6px; }
.org-switch { display: flex; flex-direction: column; gap: 4px; padding: 0 8px 14px; font-size: 11px; color: #9d96bd; text-transform: uppercase; letter-spacing: .04em; }
.org-switch select { height: 32px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .15); background: rgba(255, 255, 255, .06); color: #fff; padding: 0 8px; text-transform: none; letter-spacing: 0; font-size: 13px; }
.org-switch select option { color: #221c3d; }
.org-name { padding: 0 8px 14px; margin-top: -8px; color: #c7bff3; font-size: 13px; }
.side nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--side-text); text-decoration: none; }
.side nav a:hover { background: rgba(255, 255, 255, .06); }
.side nav a.active { background: rgba(152, 135, 239, .22); color: #fff; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; font-size: 12px; }
.side-foot .muted { color: #9d96bd; }
.side-foot .link { color: #c7bff3; }
.side .bad { color: #ff9a9a; }
.me { padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .1); color: #fff; }
.fresh { line-height: 1.5; }
.main { min-width: 0; }
.page { padding: 24px 28px 48px; max-width: 1400px; display: flex; flex-direction: column; gap: 16px; }
.page-h { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.burger { display: none; }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 30; width: 250px; transform: translateX(-100%); transition: transform .2s; }
  .menu-open .side { transform: none; }
  .burger { display: block; position: fixed; top: 10px; left: 10px; z-index: 31; border: 0; background: var(--side); color: #fff; border-radius: 8px; width: 38px; height: 38px; font-size: 18px; }
  .page { padding: 60px 14px 40px; }
}

/* Controls */
.input, .select { height: 34px; border: 1px solid var(--border); background: var(--surface); border-radius: 8px; padding: 0 10px; outline: none; min-width: 0; }
.input:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-2); }
select.select { padding-right: 26px; }
button.select { text-align: left; min-width: 170px; cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%); background-position: calc(100% - 14px) 15px, calc(100% - 10px) 15px; background-size: 4px 4px; background-repeat: no-repeat; padding-right: 26px; }
.btn { height: 34px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--accent); background: var(--accent); color: #fff; font-weight: 550; cursor: pointer; white-space: nowrap; }
.btn:hover { filter: brightness(1.07); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.ghost { background: transparent; color: var(--accent); border-color: var(--border); }
.btn.ghost:hover { background: var(--accent-2); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn.danger { color: var(--bad); }
.btn.wide { width: 100%; height: 40px; }
.link { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.icon-btn { border: 0; background: none; font-size: 22px; cursor: pointer; color: var(--text-2); line-height: 1; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field > span { font-size: 12px; font-weight: 600; color: var(--text-2); }
.check { display: flex; align-items: center; gap: 8px; margin: 6px 0 10px; }
.checks { display: flex; flex-direction: column; gap: 6px; }
.checks label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.checks.inline { flex-direction: row; gap: 16px; flex-wrap: wrap; }
.checks.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; max-height: 220px; overflow: auto; padding: 4px 0; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: var(--surface); padding: 7px 2px; cursor: pointer; border-right: 1px solid var(--border); font-size: 13px; }
.seg button:last-child { border-right: 0; }
.seg button.active { background: var(--accent-2); color: var(--accent); font-weight: 600; }
.seg.small button { padding: 5px 4px; font-size: 12px; }
.swatches { display: flex; gap: 8px; }
.swatches button { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border); cursor: pointer; }
.swatches button.active { box-shadow: 0 0 0 2px var(--text); }

.filterbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px; position: sticky; top: 0; z-index: 10; box-shadow: var(--shadow); }
.ms { position: relative; }
.ms-pop { position: absolute; top: 38px; left: 0; z-index: 20; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 30px rgba(0, 0, 0, .15); padding: 6px; min-width: 240px; max-height: 340px; overflow: auto; }
.ms-opt { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.ms-opt:hover { background: var(--surface-2); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; vertical-align: 0; flex: none; }

.tabs { display: flex; gap: 2px; background: var(--surface-2); padding: 3px; border-radius: 9px; flex-wrap: wrap; width: fit-content; }
.tabs button { border: 0; background: transparent; padding: 6px 12px; border-radius: 7px; cursor: pointer; color: var(--text-2); font-size: 13px; }
.tabs button.active { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow); }

/* Cards & KPIs */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; box-shadow: var(--shadow); min-width: 0; }
.card-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-2.tight { gap: 10px; }
@media (max-width: 1100px) { .grid-2 { grid-template-columns: 1fr; } }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); }
.card .kpi { box-shadow: none; background: var(--surface-2); border-color: transparent; }
.kpi-label { font-size: 12px; color: var(--text-2); font-weight: 550; }
.kpi-value { font-size: 22px; font-weight: 650; margin: 4px 0 6px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi-foot { display: flex; gap: 8px; align-items: center; font-size: 12px; flex-wrap: wrap; }
.delta { font-size: 12px; font-weight: 600; white-space: nowrap; }
.delta.up { color: var(--good); }
.delta.down { color: var(--bad); }
.delta.flat { color: var(--text-2); }

.loading { display: flex; align-items: center; gap: 10px; color: var(--text-2); padding: 24px; justify-content: center; }
.spinner { width: 14px; height: 14px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { color: var(--text-2); padding: 28px; text-align: center; }
.empty.big { background: var(--surface); border: 1px dashed var(--border); border-radius: 12px; padding: 48px; }
.error-box, .warn-box, .info-box, .ok-box { border-radius: 10px; padding: 10px 12px; font-size: 13px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.error-box { background: #fde8e8; color: #8a1d1d; }
.warn-box { background: var(--warn-bg); color: var(--warn-text); }
.info-box { background: var(--accent-2); color: var(--text); }
.ok-box { background: #e3f6e7; color: #145c22; }
:root[data-theme="dark"] .error-box { background: #3d1c1f; color: #ffb4b4; }
:root[data-theme="dark"] .ok-box { background: #17331d; color: #a6e8b4; }
.tag { display: inline-block; margin-left: 8px; font-size: 11px; padding: 1px 7px; border-radius: 10px; background: var(--surface-2); color: var(--text-2); }
.status { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: 1px; }
.status.ok { background: var(--good); }
.status.bad { background: var(--bad); }
.status.unknown { background: #a7a3b8; }

/* Tables */
.table-wrap { overflow: auto; max-height: 640px; border: 1px solid var(--border); border-radius: 10px; }
.table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.table th { position: sticky; top: 0; background: var(--surface-2); text-align: left; font-size: 12px; font-weight: 600; color: var(--text-2); padding: 8px 10px; cursor: pointer; white-space: nowrap; user-select: none; z-index: 1; }
.table td { padding: 8px 10px; border-top: 1px solid var(--border); vertical-align: top; }
.table .num { text-align: right; white-space: nowrap; }
.table tfoot td { font-weight: 650; background: var(--surface-2); position: sticky; bottom: 0; }
.table tr.click { cursor: pointer; }
.table tbody tr:hover td { background: var(--surface-2); }
.table tr.selected td { background: var(--accent-2); }
.table tr.inactive td { opacity: .55; }
.table.pnl tr.strong td { font-weight: 650; background: var(--surface-2); }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions .btn { margin-left: 4px; }

/* Charts */
.chart { width: 100%; position: relative; }
.chart svg { display: block; overflow: visible; }
.grid { stroke: var(--grid); stroke-width: 1; }
.axis { fill: var(--text-2); font-size: 11px; }
.crosshair { stroke: var(--text-2); stroke-width: 1; stroke-dasharray: 3 3; }
.ring { stroke: var(--surface); stroke-width: 2; }
.tt { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 6px 24px rgba(0, 0, 0, .14); border-radius: 8px; padding: 8px 10px; font-size: 12px; min-width: 160px; z-index: 5; }
.tt b { display: block; margin-bottom: 4px; }
.tt-row { display: flex; align-items: center; gap: 6px; }
.tt-row span { margin-left: auto; padding-left: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tt-row i { width: 8px; height: 8px; border-radius: 50%; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--text-2); margin-bottom: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }
.legend.vertical { flex-direction: column; gap: 6px; min-width: 0; flex: 1; max-width: 320px; }
.legend.vertical span { cursor: default; }
.legend.vertical b { margin-left: auto; padding-left: 10px; color: var(--text); font-weight: 600; }
.donut { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.donut-v { fill: var(--text); font-size: 18px; font-weight: 650; }
.barlist { display: flex; flex-direction: column; gap: 4px; }
.barlist-row { display: grid; grid-template-columns: minmax(90px, 32%) 1fr auto; gap: 10px; align-items: center; padding: 3px 4px; border-radius: 6px; }
.barlist-row.click { cursor: pointer; }
.barlist-row:hover { background: var(--surface-2); }
.barlist-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.barlist-track { height: 12px; background: var(--surface-2); border-radius: 0 4px 4px 0; }
.barlist-bar { height: 100%; border-radius: 0 4px 4px 0; min-width: 2px; }
.barlist-value { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.barlist-value small { display: block; font-weight: 400; color: var(--text-2); font-size: 11px; }
.heat-wrap { overflow: auto; }
.heat { border-collapse: separate; border-spacing: 2px; width: 100%; font-size: 11px; font-variant-numeric: tabular-nums; }
.heat th { color: var(--text-2); font-weight: 500; padding: 2px 4px; }
.heat td { text-align: center; padding: 8px 2px; border-radius: 4px; color: #1d3550; min-width: 38px; cursor: default; background: var(--surface-2); }
.heat td.dark { color: #fff; }
.heat-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 12px; margin-top: 8px; }
.heat-scale { display: inline-flex; align-items: center; gap: 2px; color: var(--text-2); }
.heat-scale i { width: 14px; height: 10px; border-radius: 2px; display: inline-block; }

.abc { display: inline-block; width: 22px; height: 22px; line-height: 22px; text-align: center; border-radius: 6px; font-weight: 700; font-size: 12px; }
.abc-A { background: #d7f2dd; color: #11622a; }
.abc-B { background: #fdeccc; color: #7a4d00; }
.abc-C { background: #fbdcdc; color: #8a1d1d; }
.abc-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.abc-card { border-radius: 10px; padding: 12px 14px; background: var(--surface-2); }
.abc-card-h { display: flex; align-items: center; gap: 8px; font-size: 15px; margin-bottom: 4px; }

/* Builder */
.builder { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
.builder-side { position: sticky; top: 72px; max-height: calc(100vh - 90px); overflow: auto; }
.builder-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (max-width: 1000px) { .builder { grid-template-columns: 1fr; } .builder-side { position: static; max-height: none; } }

/* Modal & toasts */
.modal-bg { position: fixed; inset: 0; background: rgba(20, 16, 36, .45); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: var(--surface); border-radius: 14px; width: 520px; max-width: 100%; max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.modal.wide { width: 760px; }
.modal header { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px 8px; }
.modal-body { padding: 8px 18px; overflow: auto; }
.modal footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px 16px; border-top: 1px solid var(--border); }
.toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { background: #221c3d; color: #fff; padding: 10px 14px; border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); max-width: 420px; font-size: 13px; }
.toast.err { background: #a52828; }

/* Login */
.login-bg { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(circle at 30% 20%, #3a2f6b, #1a1530 70%); padding: 16px; }
.login { background: var(--surface); border-radius: 16px; padding: 28px; width: 380px; max-width: 100%; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); display: flex; flex-direction: column; gap: 4px; }
.login p { margin: 0 0 16px; }

@media print {
  .side, .filterbar, .burger, .btn, .tabs { display: none !important; }
  .layout { display: block; }
  .card, .kpi { box-shadow: none; break-inside: avoid; }
}

/* Restaurants */
.dot.big { width: 12px; height: 12px; margin-right: 10px; vertical-align: 2px; }
.rest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.rest-card { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; color: inherit; text-decoration: none; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.rest-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.rest-card-h { display: flex; align-items: center; margin-bottom: 8px; }
.rest-card-v { font-size: 22px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.rest-card-ops { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-2); }
.rest-card-ops.has { color: var(--text); }
.rest-layout { align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* Control operations block (shift report) */
.card.ops { background: linear-gradient(180deg, #2c244c, #231d3d); color: #f1eefc; border-color: #3a3163; }
.ops h3 { font-size: 20px; font-weight: 650; color: #fff; }
.ops-h { margin-bottom: 14px; }
.ops-sub { font-style: italic; color: #c9c2ec; margin-top: 4px; }
.ops .muted { color: #b3abd8; }
.ops-table { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid #463d73; border-radius: 12px; overflow: hidden; font-variant-numeric: tabular-nums; margin-bottom: 6px; }
.ops-table th { background: #3a3166; color: #e3ddff; font-weight: 600; padding: 10px 12px; text-align: center; }
.ops-table td { padding: 10px 12px; border-top: 1px solid #463d73; }
.ops-table .num { text-align: right; white-space: nowrap; }
.ops-table th + th, .ops-table td + td { border-left: 1px solid #463d73; }
.ops-table tfoot td { font-weight: 700; background: #352c5e; }
.ops-table tr.click { cursor: pointer; }
.ops-table tbody tr:hover td { background: rgba(255, 255, 255, .05); }
.ops-table tr.selected td { background: rgba(152, 135, 239, .25); }
.ops-table.plain { border: 0; }
.ops-table.plain td + td, .ops-table.plain th + th { border-left: 0; }
.ops-table.plain tbody tr:nth-child(even) td { background: rgba(255, 255, 255, .04); }
.ops-ico { margin-right: 8px; }
.ops-section { margin: 18px 0 10px; font-size: 16px; color: #fff; }
.ops .link { color: #c7bff3; }
.ops-btn { width: 100%; margin-top: 16px; height: 44px; background: #1f6f3a; border-color: #2a8a4b; color: #c8f5d5; font-size: 15px; }
.ops-detail { margin-top: 14px; background: var(--surface); color: var(--text); border-radius: 10px; padding: 10px; }
.ops-detail .tag { display: inline-flex; gap: 6px; align-items: center; }
.nowrap { white-space: nowrap; }

/* Equipment */
.st { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.st b { font-size: 11px; }
.st.sm { margin-left: 10px; font-size: 11px; }
.st-up { color: var(--good); }
.st-warn { color: #b26a00; }
.st-down { color: var(--bad); }
.st-unknown { color: var(--text-2); }
:root[data-theme="dark"] .st-warn { color: #f3b14a; }
.kpi-btn { text-align: left; cursor: pointer; font: inherit; color: inherit; }
.kpi-btn.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-2); }
.kpi-btn.alarm { border-color: var(--bad); }
.kpi-btn.alarm .kpi-value { color: var(--bad); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.chips button { border: 1px solid var(--border); background: var(--surface); border-radius: 16px; padding: 5px 10px; cursor: pointer; font-size: 12px; }
.chips button b { margin-left: 4px; color: var(--text-2); font-weight: 600; }
.chips button.active { background: var(--accent-2); border-color: var(--accent); color: var(--accent); }
.strip { display: inline-flex; gap: 2px; vertical-align: middle; }
.strip i { width: 5px; height: 16px; border-radius: 2px; background: var(--good); }
.strip i.s-warn { background: #f2a600; }
.strip i.s-bad { background: var(--bad); }
.strip i.s-empty { background: var(--surface-2); }
.table.devices tr.row-down td { background: rgba(201, 48, 47, .06); }
.link.strong { font-weight: 600; text-decoration: none; color: var(--text); }
.link.strong:hover { text-decoration: underline; }
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
.type-grid button { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); background: var(--surface); border-radius: 8px; padding: 8px; cursor: pointer; text-align: left; font-size: 12px; }
.type-grid button span { font-size: 16px; }
.type-grid button.active { border-color: var(--accent); background: var(--accent-2); color: var(--accent); font-weight: 600; }
.textarea { height: auto; padding: 8px 10px; resize: vertical; width: 100%; }
.dev-mini { display: flex; flex-direction: column; gap: 4px; }
.dev-mini-row { display: grid; grid-template-columns: 22px 1fr auto 56px; gap: 8px; align-items: center; padding: 4px 6px; border-radius: 6px; }
.dev-mini-row.st-down { background: rgba(201, 48, 47, .07); }
.dev-mini-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dev-mini-row .muted { text-align: right; }
.howto { margin: 0; padding-left: 20px; line-height: 1.6; }
.howto pre { background: var(--surface-2); border-radius: 8px; padding: 10px; overflow: auto; font-size: 12px; margin: 6px 0 10px; }
.table.devices { table-layout: fixed; min-width: 1050px; }
.table.devices th:nth-child(1) { width: 120px; }
.table.devices th:nth-child(2) { width: 22%; }
.table.devices th:nth-child(3) { width: 120px; }
.table.devices th:nth-child(4) { width: 13%; }
.table.devices th:nth-child(5), .table.devices th:nth-child(6) { width: 80px; }
.table.devices th:nth-child(7) { width: 110px; }
.table.devices th:nth-child(8) { width: 180px; }
.table.devices th:nth-child(9) { width: 210px; }
.table.devices td { overflow: hidden; text-overflow: ellipsis; }

.login-org { margin: 0 0 16px; font-size: 16px; font-weight: 600; color: var(--accent); }
.org-name .link { color: #c7bff3; font-size: 11px; }
.slug-field { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); overflow: hidden; }
.slug-field input { border: 0; flex: 1; height: 32px; padding: 0 10px; outline: none; background: transparent; font-family: ui-monospace, Menlo, Consolas, monospace; }
.slug-field span { padding: 0 10px; color: var(--text-2); background: var(--surface-2); height: 32px; line-height: 32px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }
.host-link { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }
