/* ORIN license cabinet. Light, ORIN colours (src/ORIN.App/Ui/Orin.cs): teal header, amber primary actions.
   Phone first: bottom tab bar, cards instead of wide tables, 44 px touch targets; sidebar from 960 px. */
:root {
  color-scheme: light;
  --bg: #EDF0F3;
  --surface: #FFFFFF;
  --surface-2: #F6F7F9;
  --border: #D3D9DF;
  --border-strong: #A4ABB2;
  --text: #111418;
  --text-2: #4A5561;
  --teal: #299BAF;
  --teal-dark: #1E7A8B;
  --amber: #FFB020;
  --amber-hover: #FFC14D;
  --amber-tint: #FFF1D1;
  --amber-text: #6B5320;
  --green-tint: #DDF3E6;
  --green-text: #0F5132;
  --red: #D92D2F;
  --red-tint: #FBE1E1;
  --red-text: #8E1517;
  --blue-tint: #DCEBFA;
  --blue-text: #1D4F86;
  --grey-tint: #E8EBEE;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 32, .06), 0 2px 8px rgba(16, 24, 32, .05);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "SFMono-Regular", Menlo, monospace;
  --topbar: 56px;
  --tabbar: 64px;
  --sidebar: 236px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
a { color: var(--teal-dark); }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-size: 1.5rem; letter-spacing: -.01em; }
h2 { font-size: 1.1rem; }
p { margin: 0; }
.muted { color: var(--text-2); }
.mono { font-family: var(--mono); }
:focus-visible { outline: 3px solid rgba(41, 155, 175, .5); outline-offset: 2px; }
.icon { flex: none; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: linear-gradient(180deg, var(--teal) 0 220px, var(--bg) 220px); }
.login-card { width: min(420px, 100%); background: var(--surface); border-radius: 16px; padding: 28px 24px; box-shadow: 0 10px 30px rgba(16, 24, 32, .15); display: grid; gap: 10px; }
.login-card h1 { margin-top: 4px; }
.login-hint { margin-top: 8px; font-size: .9rem; color: var(--text-2); }
.brand-mark { font: 800 1rem/1 var(--mono); letter-spacing: .12em; color: var(--teal-dark); }
.stack { display: grid; gap: 14px; margin-top: 10px; }

/* ---------- shell ---------- */
.app { min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 20; height: var(--topbar); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 16px; background: var(--teal); color: #fff; }
.brand { display: flex; align-items: baseline; gap: 10px; color: #fff; text-decoration: none; min-width: 0; }
.brand .brand-mark { color: #fff; font-size: 1.1rem; }
.brand-text { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account { display: flex; align-items: center; gap: 12px; min-width: 0; }
.account-name { opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
.balance { background: rgba(255, 255, 255, .18); border-radius: 999px; padding: 4px 12px; font-weight: 700; white-space: nowrap; }
.main { padding: 20px 16px calc(var(--tabbar) + 28px + env(safe-area-inset-bottom)); outline: none; max-width: 1180px; }
.sidebar { display: none; }

.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; height: calc(var(--tabbar) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--border); }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 0; border: 0; background: none; color: var(--text-2); font: 600 .72rem/1.1 var(--sans); text-decoration: none; cursor: pointer; padding: 6px 2px; }
.tab span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tab.active { color: var(--text); }
.tab.active .icon { color: var(--amber-text); background: var(--amber-tint); border-radius: 999px; padding: 3px 14px; width: 52px; height: 28px; }
.more-backdrop { position: fixed; inset: 0; z-index: 31; background: rgba(16, 24, 32, .35); }
.more-sheet { position: fixed; left: 8px; right: 8px; bottom: calc(var(--tabbar) + 8px + env(safe-area-inset-bottom)); z-index: 32; background: var(--surface); border-radius: 16px; padding: 8px; box-shadow: 0 10px 30px rgba(16, 24, 32, .25); display: grid; }
.more-user { padding: 10px 12px; font-weight: 700; display: grid; }
.more-user span, .side-user span { font-weight: 400; color: var(--text-2); font-size: .85rem; }
.more-link { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 12px; border: 0; border-radius: 10px; background: none; color: var(--text); font: inherit; font-weight: 600; text-decoration: none; text-align: left; cursor: pointer; }
.more-link.active, .more-link:hover { background: var(--surface-2); }

@media (min-width: 960px) {
  .app { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); grid-template-rows: var(--topbar) 1fr; }
  .topbar { grid-column: 1 / -1; }
  .sidebar { display: flex; flex-direction: column; justify-content: space-between; position: sticky; top: var(--topbar); height: calc(100vh - var(--topbar)); padding: 14px 10px; background: var(--surface); border-right: 1px solid var(--border); }
  .sidebar nav { display: grid; gap: 2px; }
  .side-link { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: none; color: var(--text-2); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; width: 100%; }
  .side-link:hover { background: var(--surface-2); color: var(--text); }
  .side-link.active { background: var(--amber-tint); color: var(--text); box-shadow: inset 3px 0 0 var(--amber); }
  .side-foot { display: grid; gap: 4px; border-top: 1px solid var(--border); padding-top: 10px; }
  .side-user { padding: 4px 12px 6px; font-weight: 700; display: grid; }
  .main { padding: 28px 32px 48px; }
  .tabbar, .more-sheet, .more-backdrop { display: none !important; }
}

/* ---------- page ---------- */
.page { display: grid; gap: 18px; }
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); text-decoration: none; font-weight: 600; min-height: 32px; width: fit-content; }
.back-link:hover { color: var(--text); }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 20px; }
.page-title { display: grid; gap: 4px; min-width: 0; }
.page-title h1 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; overflow-wrap: anywhere; }
.page-subtitle { color: var(--text-2); }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); display: grid; gap: 14px; min-width: 0; }
.card-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 16px; }
.card-description { color: var(--text-2); margin-top: 4px; }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.card.danger-zone { border-color: #EBB4B5; }
.grid-2 { display: grid; gap: 18px; }
@media (min-width: 1100px) { .grid-2 { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); align-items: start; } }
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile { display: grid; gap: 2px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--text); text-decoration: none; min-height: 84px; }
a.tile:hover { border-color: var(--border-strong); }
.tile-value { font-size: 1.7rem; font-weight: 800; line-height: 1.1; }
.tile-label { color: var(--text-2); font-weight: 600; }

/* ---------- buttons ---------- */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: 600 .95rem/1 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap; }
.button:hover { background: var(--surface-2); }
.button.primary { background: var(--amber); border-color: #E39A10; color: #111; }
.button.primary:hover { background: var(--amber-hover); }
.button.danger { background: var(--red); border-color: var(--red); color: #fff; }
.button.danger:hover { background: #F03A3C; }
.button.danger-outline { color: var(--red-text); border-color: #E5A3A4; }
.button.danger-outline:hover { background: var(--red-tint); }
.button.ghost { border-color: transparent; background: none; color: var(--teal-dark); padding: 0 8px; }
.button.ghost:hover { background: var(--surface-2); }
.button.small { min-height: 36px; padding: 0 12px; font-size: .88rem; }
.button.wide { width: 100%; }
.button:disabled { opacity: .55; cursor: not-allowed; }
.button.is-busy { cursor: progress; }
.button.is-busy::after { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }

/* ---------- forms ---------- */
.form { display: grid; gap: 16px; }
.form-grid { display: grid; gap: 16px; }
@media (min-width: 720px) { .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .form-grid .full { grid-column: 1 / -1; } }
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field-label { font-weight: 600; }
.optional { font-weight: 400; color: var(--text-2); }
.field-hint { color: var(--text-2); font-size: .88rem; }
.field-error { color: var(--red-text); font-weight: 600; min-height: 0; }
.field-error:empty { display: none; }
input, select, textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; }
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(41, 155, 175, .2); }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; min-height: 0; margin: 2px 0 0; accent-color: var(--teal-dark); flex: none; }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; min-width: 0; }
legend { font-weight: 700; padding: 0; margin-bottom: 8px; }
.input-row { display: flex; gap: 8px; align-items: center; }
.input-row > input { flex: 1; }

/* Choice cards: modules with their functions, terms, roles. */
.choices { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); cursor: pointer; min-height: 48px; }
.choice:hover { border-color: var(--border-strong); }
.choice:has(input:checked) { border-color: var(--amber); background: var(--amber-tint); }
.choice:has(input:disabled) { cursor: not-allowed; opacity: .5; }
.choice-text { display: grid; gap: 2px; }
.choice-text strong { font-weight: 700; }
.choice-text small { color: var(--text-2); font-size: .85rem; line-height: 1.35; }
.module-group { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); padding: 12px; display: grid; gap: 10px; }
.module-group.is-off .features { display: none; }
.features { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.features .choice { background: var(--surface); }
.features-note { color: var(--text-2); font-size: .9rem; padding: 0 4px; }
.segmented { display: flex; flex-wrap: wrap; gap: 8px; }
.segmented label { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); font-weight: 600; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label:has(input:checked) { background: var(--text); border-color: var(--text); color: #fff; }
.segmented label:has(input:focus-visible) { outline: 3px solid rgba(41, 155, 175, .5); }

/* Bottom bar of a form: what will happen + the one primary action. */
.action-bar { position: sticky; bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 8px); z-index: 10; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: 0 6px 20px rgba(16, 24, 32, .14); }
.action-bar-text { display: grid; gap: 2px; min-width: 0; }
.action-bar-text strong { font-size: 1.02rem; }
.action-bar-text span { color: var(--text-2); font-size: .9rem; }
.action-bar .buttons { display: flex; gap: 8px; flex-wrap: wrap; }
@media (min-width: 960px) { .action-bar { bottom: 12px; } }

/* ---------- lists ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.search { position: relative; flex: 1 1 240px; }
.search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-2); }
.search input { padding-left: 40px; }
.toolbar select { width: auto; flex: 1 1 160px; max-width: 260px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); color: var(--text); font: 600 .88rem/1 var(--sans); text-decoration: none; cursor: pointer; }
.chip .count { color: var(--text-2); font-weight: 500; }
.chip.active { background: var(--text); border-color: var(--text); color: #fff; }
.chip.active .count { color: #D5DAE0; }
.list { display: grid; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; container-type: inline-size; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; padding: 14px 16px; border-top: 1px solid var(--border); color: var(--text); text-decoration: none; align-items: center; }
.row:first-child { border-top: 0; }
a.row:hover { background: var(--surface-2); }
.row-main { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
.row-title { font-weight: 700; overflow-wrap: anywhere; }
.row-meta { flex-basis: 100%; color: var(--text-2); font-size: .9rem; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 14px; }
.row-side { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.row-chevron { color: var(--text-2); }
.row-side { justify-content: flex-end; flex-wrap: wrap; }
/* In a narrow list (a phone, a side column) rows with buttons put them under the text. */
@container (max-width: 560px) { .row:has(.row-side .button) { grid-template-columns: minmax(0, 1fr); } .row:has(.row-side .button) .row-side { justify-content: flex-start; } }
.list-foot { color: var(--text-2); font-size: .9rem; padding: 4px 2px; }
.key-text { font-family: var(--mono); font-weight: 700; letter-spacing: .02em; }

/* ---------- small pieces ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font: 700 .78rem/1.3 var(--sans); white-space: nowrap; }
.badge-ok { background: var(--green-tint); color: var(--green-text); }
.badge-warn { background: var(--amber-tint); color: var(--amber-text); }
.badge-danger { background: var(--red-tint); color: var(--red-text); }
.badge-info { background: var(--blue-tint); color: var(--blue-text); }
.badge-neutral { background: var(--grey-tint); color: #39434D; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 2px 8px; border-radius: 6px; background: var(--grey-tint); font: 700 .78rem/1.4 var(--mono); }
.summary { display: grid; margin: 0; container-type: inline-size; }
.summary-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.summary-row:first-child { border-top: 0; padding-top: 0; }
.summary-row dt { grid-column: 1 / -1; color: var(--text-2); font-size: .88rem; font-weight: 600; }
.summary-row dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.summary-action { align-self: center; }
@container (min-width: 520px) {
  .summary-row { grid-template-columns: 200px minmax(0, 1fr) auto; align-items: center; }
  .summary-row dt { grid-column: auto; font-size: .95rem; }
}
.empty { display: grid; gap: 8px; justify-items: start; padding: 22px 18px; border: 1px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface); color: var(--text-2); }
.empty-title { color: var(--text); font-weight: 700; }
.loading { display: flex; align-items: center; gap: 10px; color: var(--text-2); padding: 24px 4px; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--border-strong); border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.notice { padding: 12px 14px; border-radius: 10px; background: var(--blue-tint); color: var(--blue-text); }
.notice.warn { background: var(--amber-tint); color: var(--amber-text); }
.notice.danger { background: var(--red-tint); color: var(--red-text); }
.timeline { display: grid; }
.timeline-item { display: grid; gap: 2px; padding: 10px 0; border-top: 1px solid var(--border); }
.timeline-item:first-child { border-top: 0; }
.timeline-item time { color: var(--text-2); font-size: .85rem; }
details.more > summary { cursor: pointer; font-weight: 700; min-height: 32px; display: flex; align-items: center; }
.amount-plus { color: var(--green-text); font-weight: 700; }
.amount-minus { color: var(--red-text); font-weight: 700; }
.key-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.key-hero .key-text { font-size: 1.3rem; }
.result-keys { display: grid; gap: 8px; }
.result-keys .row { grid-template-columns: minmax(0, 1fr) auto; }
.modules-table { display: grid; gap: 14px; }
.module-card { display: grid; gap: 14px; }
.module-card .form-grid { align-items: end; }
.split { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- dialog & toasts ---------- */
.dialog { width: min(480px, calc(100% - 24px)); border: 0; border-radius: 16px; padding: 0; color: var(--text); box-shadow: 0 20px 50px rgba(16, 24, 32, .3); }
.dialog::backdrop { background: rgba(16, 24, 32, .45); }
.dialog-body { display: grid; gap: 14px; padding: 22px 20px 18px; }
.dialog-text { color: var(--text-2); white-space: pre-line; }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.toasts { position: fixed; z-index: 60; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar) + 14px + env(safe-area-inset-bottom)); display: grid; gap: 8px; width: min(520px, calc(100% - 24px)); pointer-events: none; }
@media (min-width: 960px) { .toasts { bottom: 20px; } }
.toast { padding: 12px 16px; border-radius: 12px; background: #1F2A33; color: #fff; font-weight: 600; box-shadow: 0 8px 24px rgba(16, 24, 32, .25); transition: opacity .3s, transform .3s; }
.toast-error { background: var(--red-text); }
.toast.leaving { opacity: 0; transform: translateY(8px); }

/* Narrow phones: the header keeps ORIN and the balance; the name is in «Ще». */
@media (max-width: 600px) {
  .brand-text { display: none; }
  .account:has(.balance) .account-name { display: none; }
}

/* ---------- clients: dialogs, fleet, statistics ---------- */
.nav-count { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--red); color: #fff; font: 700 .75rem/1.4 var(--sans); text-align: center; }
.tab { position: relative; }
.tab .nav-count { position: absolute; top: 4px; left: calc(50% + 8px); margin: 0; }
button.tile { font: inherit; text-align: left; cursor: pointer; }
.tile.is-selected { border-color: var(--amber); box-shadow: inset 0 0 0 1px var(--amber); }
.tile-danger .tile-value { color: var(--red-text); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); flex: none; }
.dot-running { background: #2EAD5B; }
.dot-paused, .dot-idle { background: var(--teal); }
.dot-alarm { background: var(--red); }
.dot-offline { background: #B4BBC2; }
.progress { flex-basis: 100%; height: 8px; border-radius: 999px; background: var(--grey-tint); overflow: hidden; }
.progress span { display: block; height: 100%; background: #2EAD5B; border-radius: 999px; }
.progress.is-paused span { background: var(--amber); }
.progress.is-bad span { background: var(--red); }
.file-name { overflow-wrap: anywhere; }
.avatar { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; font: 700 .9rem/1 var(--sans); color: #fff; }
.avatar-0 { background: #299BAF; } .avatar-1 { background: #2F7FD0; } .avatar-2 { background: #8E5BC2; }
.avatar-3 { background: #C2734B; } .avatar-4 { background: #2E9C6A; } .avatar-5 { background: #5F6B76; }
.dialog-row .row-main { flex-wrap: nowrap; align-items: flex-start; }
.dialog-text { display: grid; gap: 2px; min-width: 0; flex: 1; }
.dialog-head { display: flex; justify-content: space-between; gap: 10px; }
.dialog-head time { color: var(--text-2); font-size: .85rem; white-space: nowrap; }
.dialog-last { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dialog-row.is-unread .row-title, .dialog-row.is-unread .dialog-last { color: var(--text); font-weight: 700; }
.contact-bar { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; padding: 10px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.chat { display: grid; gap: 10px; }
.bubble { display: grid; gap: 8px; max-width: min(640px, 92%); padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); }
.bubble-client { justify-self: start; border-top-left-radius: 4px; }
.bubble-client.is-target { border-color: var(--amber); box-shadow: inset 0 0 0 1px var(--amber); }
.bubble-me { justify-self: end; background: #E1F1F4; border-color: #B9DDE4; border-top-right-radius: 4px; }
.bubble-head { display: flex; gap: 8px; align-items: center; }
.bubble-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; color: var(--text-2); font-size: .85rem; }
.composer { position: sticky; bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 8px); z-index: 10; display: grid; gap: 8px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: 0 6px 20px rgba(16, 24, 32, .14); }
@media (min-width: 960px) { .composer { bottom: 12px; } }
.composer-row { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { min-height: 48px; max-height: 40vh; }
.reply-to { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .9rem; min-height: 28px; }
.dialog.wide { width: min(960px, calc(100% - 24px)); }
.shot-host { max-height: 70vh; overflow: auto; border-radius: 10px; border: 1px solid var(--border); }
.shot { display: block; max-width: 100%; }
.log { max-height: 60vh; overflow: auto; margin: 0; padding: 10px 12px; border-radius: 10px; background: #14191F; color: #DCE3EA; font: .82rem/1.45 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.log-line time { color: #8A96A3; }
.log-error { color: #FF8F8F; }
.log-ok { color: #7EE2A0; }
.log-command { color: #FFD27A; }
.bars { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; align-items: end; height: 140px; padding-top: 6px; }
.bar-col { display: grid; grid-template-rows: 1fr auto; align-items: end; height: 100%; gap: 4px; }
.bar { width: 100%; border-radius: 4px 4px 0 0; background: var(--teal); min-height: 2px; }
.bar-problem { background: linear-gradient(var(--red) 0 4px, var(--teal) 4px); }
.bar-label { color: var(--text-2); font-size: .72rem; text-align: center; }
.meters { display: grid; gap: 8px; }
.meter { display: grid; grid-template-columns: minmax(80px, 140px) 1fr auto; gap: 10px; align-items: center; }
.meter-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meter-track { height: 10px; border-radius: 999px; background: var(--grey-tint); overflow: hidden; }
.meter-fill { display: block; height: 100%; background: var(--teal); border-radius: 999px; }
.meter-value { color: var(--text-2); font-size: .9rem; white-space: nowrap; }
.subhead { font-size: .95rem; margin: 4px 0 8px; }
.tag-ok { background: var(--green-tint); color: var(--green-text); }
