/* Deskmetry panel: device-screen style (the Gllai standard, ADR 0008).
   Everything is in DESIGN PIXELS (the Gllai 1600 x 600 panel): `.screen` is sized to the design
   screen and scaled to the window by src/panel/screen.rs. Never use vw/vh/clamp or text-overflow:
   a bigger window shows more cards instead (src/panel/views/perf.rs). Brand fonts and logo come
   from tokens.css (synced copy of brand/tokens/tokens.css). */

@font-face { font-family: "Figtree"; font-weight: 400; font-display: swap; src: url("fonts/figtree-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 500; font-display: swap; src: url("fonts/figtree-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 600; font-display: swap; src: url("fonts/figtree-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 700; font-display: swap; src: url("fonts/figtree-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-display: swap; src: url("fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); }

/* Device palette (Gllai): black screen, graphite cards. */
:root {
  --scr: #000000;
  --rail: #0E0E10;
  --card: #1C1C1E;
  --card-2: #2C2C2E;
  --pill: #2C2C2E;
  --pill-on: #636366;
  --line: rgba(255, 255, 255, 0.08);
  --text: #F2F2F7;
  --dim: #A0A0A6;
  --faint: #6E6E73;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; background: var(--scr); color: var(--text); overflow: hidden; }
body { font: 500 16px/1.3 var(--dm-font-display); letter-spacing: -0.005em; -webkit-font-smoothing: antialiased; user-select: none; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; touch-action: none; }
button, input { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
:focus-visible { outline: 2px solid var(--dm-lime); outline-offset: 3px; border-radius: 8px; }
h1, h2 { margin: 0; font-weight: 500; }
p { margin: 0; }
a { color: var(--dm-lime); text-decoration: none; }
.muted, .dim { color: var(--dim); }
.mono { font-family: var(--dm-font-mono); font-variant-numeric: tabular-nums; }
.empty { color: var(--dim); font-size: 18px; }
.hint { color: var(--faint); font-size: 14px; }
.icon { width: 1em; height: 1em; display: block; }

/* ---------------- Screen and rail ---------------- */
.screen { position: fixed; left: 0; top: 0; transform-origin: 0 0; display: grid; grid-template-columns: 100px minmax(0, 1fr); background: var(--scr); overflow: hidden; }
.rail { background: var(--rail); display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 18px 0; min-height: 0; }
.rail-logo { width: 44px; height: auto; margin-bottom: 8px; }
.rail-btn { width: 70px; height: 64px; border-radius: 18px; display: grid; place-items: center; color: #C7C7CC; font-size: 36px; transition: background 160ms ease, color 160ms ease; }
.rail-btn:hover { color: #fff; }
.rail-btn.active { background: #3A3A3C; color: #fff; }
.rail-sep { width: 44px; height: 1px; background: #3A3A3C; margin: 2px 0; flex: none; }
.rail-fill { flex: 1; }

.stage { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.stage > section:not(.stack) { position: absolute; inset: 0; }
.stage > section { animation: fade 220ms ease both; }

/* ---------------- Header (y 14..64; cards start at 78) ---------------- */
.head { position: absolute; z-index: 2; left: 24px; right: 24px; top: 14px; height: 50px; display: flex; align-items: center; gap: 26px; }
.head h1 { font-size: 36px; font-weight: 500; white-space: nowrap; }
.status { display: inline-flex; align-items: center; gap: 10px; color: var(--dim); font-size: 21px; white-space: nowrap; }
.dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.dot.live { background: var(--dm-lime); box-shadow: 0 0 10px rgba(204, 251, 97, 0.6); }
.dot.stale { background: var(--faint); }
.head-fill { flex: 1; }
.head-date { font-size: 21px; white-space: nowrap; }
.pills { display: flex; gap: 10px; flex: none; }
/* Narrow (standing) screens: tabs on their own row under the title, cards start at 136. */
.head.narrow { height: 108px; flex-wrap: wrap; align-content: space-between; row-gap: 10px; }
.head.narrow .head-fill { display: none; }
.head.narrow .pills { width: 100%; }
.head.narrow .pill { flex: 1; padding: 0 10px; }
.pill { height: 48px; padding: 0 26px; border-radius: 24px; background: var(--pill); color: var(--text); font-size: 20px; white-space: nowrap; transition: background 160ms ease; }
.pill:hover { background: #3A3A3C; }
.pill.active { background: var(--pill-on); }

/* ---------------- Cards ---------------- */
.cards { position: absolute; inset: 0; pointer-events: none; }
.cards > * { pointer-events: auto; }
.cards.from-right { animation: slide-right 240ms cubic-bezier(.2, .8, .2, 1) both; }
.cards.from-left { animation: slide-left 240ms cubic-bezier(.2, .8, .2, 1) both; }
.tile, .card { background: var(--card); border-radius: 24px; padding: 18px 20px; display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
.cards > .tile { position: absolute; }
.tile-title { display: flex; align-items: center; gap: 12px; font-size: 20px; color: var(--dim); white-space: nowrap; flex: none; }
.tile-icon { font-size: 26px; flex: none; display: grid; }
.tile-strong { color: var(--text); font-weight: 500; margin-left: 14px; }
.big { font-size: 46px; font-weight: 500; line-height: 1.05; margin-top: 10px; letter-spacing: -0.015em; font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; color: var(--text); flex: none; }
.big small { font-size: inherit; font-weight: inherit; margin-left: 0.22em; }
.sub { font-size: 16px; color: var(--dim); margin-top: 6px; white-space: nowrap; font-variant-numeric: tabular-nums; flex: none; }
/* Canvases fill what is left; height 0 + flex-grow keeps the backing store out of the layout. */
.chart { display: block; width: 100%; flex: 1 1 0; height: 0; min-height: 20px; margin-top: 12px; }
.foot { display: flex; justify-content: space-between; gap: 12px; font-size: 16px; color: var(--dim); margin-top: 8px; white-space: nowrap; flex: none; }
.meter { height: 10px; border-radius: 5px; background: var(--card-2); overflow: hidden; margin-top: 12px; flex: none; }
.meter span { display: block; height: 100%; border-radius: 5px; }
.meter.thin { height: 6px; border-radius: 3px; margin-top: 8px; }

/* CPU card: wide = chart beside the number, cores below; narrow = stacked (Gllai K_CPU) */
.cpu-wide, .cpu-narrow { flex: 1; min-height: 0; display: grid; }
.cpu-wide { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: 112px minmax(0, 1fr); grid-template-areas: "info chart" "cores cores"; column-gap: 20px; }
.cpu-narrow { grid-template-rows: auto minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "info" "chart" "cores"; }
.cpu-info { grid-area: info; min-width: 0; }
.cpu-chart { grid-area: chart; display: flex; flex-direction: column; min-height: 0; }
.cpu-wide .cpu-chart .chart { margin-top: 4px; }
.cpu-cores { grid-area: cores; min-height: 0; padding-top: 10px; display: flex; }
.cores { display: block; width: 100%; height: 100%; }

.dual { display: flex; gap: 96px; margin-top: 10px; flex: none; }
.dual-item { display: inline-flex; align-items: center; gap: 12px; font-size: 34px; font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dual-item .icon { font-size: 24px; flex: none; }
.dual-item small { font-size: inherit; margin-left: 0.2em; }

.stat { display: flex; flex-direction: column; }
.stat .tile-title { font-size: 16px; }
.stat .tile-icon { font-size: 22px; }
.stat-big { font-size: 32px; margin-top: 6px; }

.prows { flex: 1; min-height: 0; display: flex; flex-direction: column; margin-top: 4px; }
.prow { height: 48px; flex: none; display: flex; flex-direction: column; justify-content: center; }
.prow.hidden { visibility: hidden; }
.prow-line { display: flex; justify-content: space-between; gap: 16px; font-size: 19px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.disks { display: flex; flex-direction: column; gap: 16px; margin-top: 14px; }
/* Device lists (Conexões): 58 px rows, only as many as fit. */
.drows { flex: 1; min-height: 0; display: flex; flex-direction: column; margin-top: 8px; }
.drow { height: 58px; flex: none; display: flex; align-items: center; gap: 14px; }
.drow-icon { width: 40px; height: 40px; border-radius: 12px; background: var(--card-2); display: grid; place-items: center; font-size: 22px; flex: none; }
.drow-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.drow-name { font-size: 18px; color: var(--text); white-space: nowrap; overflow: hidden; }
.drow-sub { font-size: 14px; color: var(--dim); white-space: nowrap; overflow: hidden; }
.drow-right { font-size: 15px; white-space: nowrap; flex: none; font-variant-numeric: tabular-nums; }
.legend { display: flex; gap: 22px; font-size: 16px; margin-top: 10px; flex: none; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.axis { display: flex; justify-content: space-between; font-size: 15px; color: var(--dim); margin-top: 6px; flex: none; }

/* ---------------- Home ---------------- */
.home { display: flex; flex-direction: column; padding: 14px 24px 24px; }
.clock { flex: 1; display: grid; place-items: center; font-weight: 400; line-height: 0.9; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.clock-date { text-align: center; color: var(--dim); font-size: 21px; margin: -6px 0 18px; }
.home-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 28px; flex: none; }
.home-cards > .tile { height: 190px; }
.tile-button { text-align: left; transition: background 160ms ease, transform 160ms ease; }
.tile-button:hover { background: #232325; }
.tile-button:active { transform: scale(0.99); }
.minis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: auto; }
.mini { display: grid; gap: 4px; }
.mini-label { font-size: 16px; white-space: nowrap; }
.mini-value { font-size: 40px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mini-value small { font-size: 0.6em; color: var(--dim); margin-left: 0.15em; }

/* ---------------- Apps (Gllai 270 x 210 tiles) ---------------- */
.apps-page .apps { position: absolute; left: 24px; right: 24px; top: 92px; bottom: 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); grid-auto-rows: 210px; gap: 18px; align-content: start; overflow: hidden; }
.app { position: relative; text-align: left; background: var(--card); border: 1px solid #2A2A2C; border-radius: 26px; padding: 22px; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; transition: background 160ms ease, transform 160ms ease; }
.app:hover { background: #232325; }
.app:active { transform: scale(0.985); }
.app-icon { position: absolute; top: 22px; left: 22px; width: 60px; height: 60px; border-radius: 16px; background: var(--card-2); display: grid; place-items: center; font-size: 30px; }
.app-dot { position: absolute; top: 30px; right: 30px; width: 10px; height: 10px; border-radius: 50%; background: var(--faint); }
.app-dot.on { background: var(--dm-lime); box-shadow: 0 0 8px rgba(204, 251, 97, 0.6); }
.app-name { font-size: 26px; color: var(--text); white-space: nowrap; }
.app-line { font-size: 16px; color: var(--dim); white-space: nowrap; }

/* ---------------- Settings, system and forms ---------------- */
.stack { position: absolute; left: 24px; right: 24px; top: 78px; bottom: 14px; display: grid; gap: 14px; align-content: start; }
/* Long settings scroll inside the screen, without a browser scrollbar (like LVGL lists). */
.scroll { overflow-y: auto; scrollbar-width: none; touch-action: pan-y; user-select: text; }
.scroll::-webkit-scrollbar { display: none; }
.card { gap: 12px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-head h2 { font-size: 20px; font-weight: 500; color: var(--text); }
.card-sub { font-size: 16px; color: var(--dim); }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 12px 28px; margin: 6px 0 0; font-size: 18px; }
.kv dt { color: var(--dim); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.table { width: 100%; border-collapse: collapse; font-size: 16px; table-layout: fixed; }
.table th { text-align: left; font-size: 14px; font-weight: 500; color: var(--faint); padding: 0 8px 8px; border-bottom: 1px solid var(--line); }
.table td { padding: 10px 8px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.table tr:last-child td { border-bottom: 0; }
.addresses { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.addresses a { display: inline-flex; height: 40px; align-items: center; padding: 0 16px; border-radius: 20px; background: var(--card-2); font-size: 16px; }
.checks { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; }
.checks legend { font-size: 16px; color: var(--dim); margin-bottom: 8px; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 16px; background: var(--card-2); cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--dm-lime); flex: none; }
.check strong { display: block; font-size: 17px; font-weight: 500; }
.check small { display: block; color: var(--dim); font-size: 14px; }
.row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.actions { display: flex; align-items: center; gap: 12px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-size: 15px; color: var(--dim); }
.input { height: 52px; width: 100%; border-radius: 14px; background: var(--card-2); border: 1px solid transparent; padding: 0 16px; font-size: 18px; user-select: text; }
.input:focus { outline: none; border-color: var(--dm-lime); }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 52px; padding: 0 26px; border-radius: 26px; font-weight: 600; font-size: 18px; transition: background 160ms ease; }
.btn-primary { background: var(--dm-lime); color: #000; }
.btn-primary:hover { background: var(--dm-lime-hover); }
.btn-secondary { background: var(--pill); }
.btn-secondary:hover { background: #3A3A3C; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.form-error { color: #FF8A82; font-size: 16px; }
.ok-line { color: var(--dm-lime); font-size: 16px; }

/* ---------------- Sign-in (CSS pixels, outside the scaled screen) ---------------- */
.center { position: fixed; inset: 0; display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(440px, 100%); background: var(--card); border-radius: 28px; padding: 32px; display: grid; gap: 16px; }
.auth-card .symbol { width: 44px; height: auto; }
.auth-card h1 { font-size: 30px; font-weight: 500; line-height: 1.1; }
.auth-card p { font-size: 15px; }
.auth-card .input { height: 48px; font-size: 16px; }
.auth-card .btn { height: 48px; font-size: 16px; }


/* ---------------- Activation (same look as the installer) ---------------- */
.gate { position: fixed; inset: 0; overflow: hidden auto; scrollbar-width: none; color: #F5F5F7;
  background: #090A0C url("/deskmetry-setup-hero.svg") right center / cover no-repeat;
  font-family: var(--dm-font-display); }
.gate::before { content: ""; position: fixed; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(9,10,12,0.94) 0%, rgba(9,10,12,0.86) 45%, rgba(9,10,12,0.55) 100%); }
.gate-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; padding: 44px 56px 0; }
.gate-brand img { width: 34px; }
.gate-brand span { font-weight: 700; font-size: 22px; letter-spacing: -0.02em; }
.gate-brand b { color: var(--dm-lime); }
.gate-main { position: relative; z-index: 1; min-height: calc(100% - 80px); display: flex; align-items: center; justify-content: center; padding: 24px 56px 80px; }
.gate-screen { width: min(440px, 100%); text-align: center; animation: gate-rise 320ms cubic-bezier(.2,.8,.2,1) both; }
@keyframes gate-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.gate-eyebrow { color: var(--dm-lime); font-weight: 600; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 12px; }
.gate h1 { font-weight: 700; font-size: 38px; line-height: 1.08; letter-spacing: -0.02em; margin-bottom: 12px; }
.gate-lead { color: #C9C9CE; font-size: 16px; line-height: 1.45; margin: 0 auto 26px; max-width: 400px; }
.gate-form { display: grid; gap: 14px; }
.gate-field { display: grid; gap: 7px; text-align: left; font-size: 13px; color: #9A9AA1; font-weight: 600; }
.gate-field input { height: 50px; padding: 0 18px; border-radius: 14px; border: 1px solid rgba(255,255,255,0.10);
  background: rgba(18,20,24,0.82); color: #F5F5F7; font: 500 16px var(--dm-font-display); outline: none;
  transition: border-color 160ms ease, background 160ms ease; }
.gate-field input.mono { font-family: "JetBrains Mono", monospace; font-size: 15px; letter-spacing: 0.02em; }
.gate-field input::placeholder { color: #5A5A60; }
.gate-field input:focus { border-color: var(--dm-lime); background: rgba(18,20,24,0.95); }
.gate-actions { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 12px; margin-top: 8px; }
.gate-btn { width: 100%; height: 54px; padding: 0 20px; white-space: nowrap; border: 0; border-radius: 27px; font: 600 17px var(--dm-font-display); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  transition: background 160ms ease, transform 160ms ease, opacity 160ms ease; }
.gate-btn:active { transform: scale(0.98); }
.gate-btn[disabled] { opacity: 0.55; pointer-events: none; }
.gate-primary { background: var(--dm-lime); color: #000; }
.gate-primary:hover { background: #D8FF80; }
.gate-quiet { background: rgba(255,255,255,0.08); color: #F5F5F7; }
.gate-quiet:hover { background: rgba(255,255,255,0.14); }
.gate-google svg { width: 20px; height: 20px; display: block; }
.gate-link { background: none; border: 0; color: #9A9AA1; font: 500 14px var(--dm-font-display); cursor: pointer; padding: 6px 2px; margin-top: 18px; }
.gate-link:hover { color: #F5F5F7; }
.gate-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 24px; margin-top: 18px; }
.gate-links .gate-link { margin-top: 0; }
.gate-error { color: #FF6B6B; font-size: 15px; }
.gate-wait { display: flex; align-items: center; justify-content: center; gap: 12px; color: #C9C9CE; font-size: 15px; margin-bottom: 22px; }
.gate-spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(204,251,97,0.25); border-top-color: var(--dm-lime); animation: gate-spin 900ms linear infinite; }
@keyframes gate-spin { to { transform: rotate(360deg); } }
.gate-done { width: 56px; height: 56px; border-radius: 28px; background: var(--dm-lime); display: grid; place-items: center; margin: 0 auto 20px; }
.gate-done svg { width: 28px; height: 28px; }
@media (max-width: 600px), (max-height: 560px) {
  .gate-brand { padding: 24px 24px 0; }
  .gate-main { padding: 24px; }
  .gate h1 { font-size: 30px; }
  .gate-actions { grid-auto-flow: row; }
}
@media (prefers-reduced-motion: reduce) { .gate-screen, .gate-spinner { animation: none; } }

.settings-workspace {
  grid-template-columns: clamp(145px, 20%, 230px) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  align-content: stretch;
  gap: 1px;
  border: 1px solid var(--card-2);
  border-radius: 14px;
  overflow: hidden;
  background: var(--card-2);
}
.settings-nav { display: flex; flex-direction: column; gap: 4px; padding: 10px; background: #151517; }
.settings-nav button { display: flex; align-items: center; gap: 10px; text-align: left; width: 100%; padding: 10px 12px; border: 1px solid transparent; border-radius: 8px; }
.settings-nav button:hover { background: var(--card); }
.settings-nav button.active { background: var(--card-2); border-color: #444447; }
.settings-nav button svg { width: 19px; height: 19px; flex: none; }
.settings-content { min-width: 0; height: 100%; background: var(--card); }
.settings-group { display: grid; gap: 14px; padding: 18px 20px; }
.settings-heading { border-bottom: 1px solid var(--card-2); padding-bottom: 12px; }
.settings-heading h2 { font-size: 23px; font-weight: 600; }
.settings-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.settings-row > .field { min-width: 0; flex: 0 1 320px; }
.settings-row > .field ~ .btn { align-self: end; }
.settings-row > .check { width: 100%; }
.settings-facts { display: grid; gap: 0; margin: 0; }
.settings-facts > div { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; padding: 9px 0; border-bottom: 1px solid var(--card-2); }
.settings-facts dd { margin: 0; }
.settings-section { display: grid; gap: 10px; min-width: 0; padding-bottom: 12px; border-bottom: 1px solid var(--card-2); }
.settings-section .checks { margin-block: 0; }
.settings-section .check { padding: 9px 12px; border-radius: 8px; }
.settings-audit summary { cursor: pointer; padding-block: 6px; }
.settings-confirm { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 12px; background: var(--card-2); border-radius: 8px; }
.settings-confirm p { flex: 1 1 280px; }


/* ---------------- Motion ---------------- */
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide-right { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes slide-left { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .stage > section, .cards.from-right, .cards.from-left { animation: none; }
}

/* Tabs shrink on very narrow screens (Gllai: 16 px labels under 120 px per tab) */
.pills.tight .pill { font-size: 16px; padding: 0 4px; }

/* Sensores: the raw list, paged to the screen (Gllai perf_detail) */
.sensors { position: absolute; display: flex; flex-direction: column; }
.sensor-notice { height: 84px; flex: none; margin-bottom: 14px; background: var(--card); border-radius: 24px; padding: 0 20px; display: flex; align-items: center; gap: 16px; }
.sensor-notice-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.sensor-notice-text strong { font-size: 20px; font-weight: 500; white-space: nowrap; }
.sensor-notice-text span { font-size: 16px; color: var(--dim); white-space: nowrap; }
.sensor-rows { display: flex; flex-direction: column; gap: 5px; flex: none; }
.sensor-row { height: 44px; flex: none; background: var(--card); border-radius: 10px; padding: 0 20px 0 14px; display: flex; align-items: center; gap: 16px; }
.sensor-row.hidden { visibility: hidden; }
.sensor-name { flex: 1; min-width: 0; font-size: 16px; color: var(--dim); white-space: nowrap; overflow: hidden; }
.sensor-value { font-size: 20px; white-space: nowrap; font-variant-numeric: tabular-nums; flex: none; }
.sensor-foot { margin-top: auto; height: 52px; flex: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 20px; color: var(--dim); white-space: nowrap; }
.sensor-pager { display: flex; gap: 12px; }
.sensor-pager .btn { gap: 8px; height: 49px; font-weight: 500; font-size: 20px; color: var(--text); }
.sensor-pager .icon { width: 22px; height: 22px; }

/* App window title bar (only inside the Deskmetry window, outside the scaled screen) */
.titlebar { position: fixed; left: 0; right: 0; top: 0; height: 40px; z-index: 50; display: flex; align-items: center; gap: 10px; padding-left: 16px; background: var(--rail); border-bottom: 1px solid #1C1C1E; }
.titlebar-logo { width: 20px; height: auto; pointer-events: none; }
.titlebar-name { font-size: 15px; font-weight: 600; color: var(--text); letter-spacing: -0.01em; pointer-events: none; }
.titlebar-dot { color: var(--dm-lime); }
.titlebar-fill { flex: 1; align-self: stretch; }
.titlebar-btn { width: 48px; height: 40px; display: grid; place-items: center; color: #C7C7CC; font-size: 17px; transition: background 120ms ease, color 120ms ease; }
.titlebar-btn:hover { background: #2C2C2E; color: #fff; }
.titlebar-btn.close:hover { background: #C42B1C; color: #fff; }
.titlebar-monitor-wrapper { position: relative; display: flex; align-items: center; }
.titlebar-backdrop { position: fixed; inset: 0; z-index: 95; }
.titlebar-dropdown { position: absolute; top: 40px; right: 0; min-width: 260px; background: #141416; border: 1px solid #2C2C2E; border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6); padding: 6px; z-index: 100; display: flex; flex-direction: column; gap: 2px; }
.titlebar-dropdown-header { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: #8E8E93; padding: 6px 10px 4px; }
.titlebar-dropdown-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border-radius: 6px; background: transparent; color: var(--text); font-size: 13px; text-align: left; cursor: pointer; transition: background 120ms ease, color 120ms ease; }
.titlebar-dropdown-item:hover { background: #2C2C2E; color: var(--dm-lime); }
.titlebar-dropdown-icon { display: grid; place-items: center; width: 16px; height: 16px; color: #8E8E93; }
.titlebar-dropdown-item:hover .titlebar-dropdown-icon { color: var(--dm-lime); }
.titlebar-dropdown-text { flex: 1; white-space: nowrap; overflow: hidden; }
.check.indent { margin-left: 34px; }

/* ---------------- Mídia: now playing in the CarPlay style ---------------- */
.media-body { position: absolute; top: 78px; left: 24px; right: 24px; bottom: 18px; display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; }
.np-card, .side-card { position: relative; min-width: 0; min-height: 0; background: var(--card, #1C1C1E); border-radius: 24px; overflow: hidden; }
.fade, .np-artist, .src-title, .src-sub, .mix-name { white-space: nowrap; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); }

/* Player */
.np { position: relative; height: 100%; display: flex; flex-direction: column; padding: 28px 32px 22px; isolation: isolate; }
.np-backdrop { position: absolute; inset: -80px; z-index: -2; background-position: center; background-size: cover; filter: blur(64px) saturate(1.5); opacity: 0.5; transform: scale(1.15); transition: opacity 400ms ease; }
.np::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(20, 20, 22, 0.35) 0%, rgba(20, 20, 22, 0.8) 100%); }
.np.paused .np-backdrop { opacity: 0.32; }
.np-main { flex: 1; min-height: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 40px; align-items: center; }
.np-art { position: relative; width: 300px; height: 300px; border-radius: 18px; overflow: hidden; background: #2C2C2E; display: grid; place-items: center; cursor: pointer; transition: width 200ms ease, height 200ms ease, transform 120ms ease; }
.np-art.wide { width: 480px; height: 270px; }
.np-art:active { transform: scale(0.98); }
.np-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.np-art-empty { font-size: 96px; color: var(--dim); opacity: 0.5; }
.np.paused .np-art { transform: scale(0.96); }
.np-info { min-width: 0; display: flex; flex-direction: column; }
.np-source { display: flex; align-items: center; gap: 10px; font-size: 17px; color: var(--dim); white-space: nowrap; overflow: hidden; margin-bottom: 10px; }
.np-source-icon { font-size: 20px; flex: none; }
.np-title { font-size: 32px; font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; max-height: 3.45em; overflow: hidden; white-space: normal; overflow-wrap: anywhere; }
.np-artist { font-size: 22px; color: var(--dim); margin-top: 6px; min-height: 1.3em; }
.np-timeline { margin-top: 20px; }
.np-times { display: flex; justify-content: space-between; font-size: 15px; color: var(--dim); font-variant-numeric: tabular-nums; }
.np-transport { display: flex; align-items: center; justify-content: center; gap: 34px; margin-top: 14px; }
.np-btn { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 28px; color: var(--text); background: rgba(255, 255, 255, 0.1); transition: background 120ms ease, transform 120ms ease, opacity 120ms ease; }
.np-btn .icon { fill: currentColor; }
.np-btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.18); }
.np-btn:active:not(:disabled) { transform: scale(0.92); }
.np-btn:disabled { opacity: 0.3; cursor: default; }
.np-btn.np-play { width: 88px; height: 88px; font-size: 38px; background: var(--dm-lime); color: #000; }
.np-btn.np-play:hover:not(:disabled) { background: #D8FF80; }
.np-volume { display: flex; align-items: center; gap: 14px; margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--line); flex: none; }
.np-mute { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; color: var(--text); background: rgba(255, 255, 255, 0.08); flex: none; transition: background 120ms ease, color 120ms ease; }
.np-mute:hover { background: rgba(255, 255, 255, 0.16); }
.np-mute.on, .mix-mute.on { color: #FF453A; background: rgba(255, 69, 58, 0.16); }
.np-vol { flex: 1; }
.np-vol-pct { width: 58px; text-align: right; font-size: 17px; color: var(--dim); font-variant-numeric: tabular-nums; flex: none; }

/* Slider: thin track that thickens while touched */
.bar { position: relative; height: 28px; display: flex; align-items: center; cursor: pointer; touch-action: none; border-radius: 6px; }
.bar-track { width: 100%; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.18); overflow: hidden; transition: height 120ms ease, border-radius 120ms ease; }
.bar-fill { height: 100%; background: #fff; border-radius: inherit; }
.bar:hover .bar-track, .bar.dragging .bar-track { height: 10px; border-radius: 5px; }
.bar.off { cursor: default; }
.bar.off .bar-track { height: 6px; }
.bar.off .bar-fill, .np.paused .np-seek .bar-fill { opacity: 0.55; }
.bar:focus-visible { outline: 2px solid var(--dm-lime); outline-offset: 3px; }

/* Full screen */
.np-full { position: absolute; inset: 0; z-index: 10; background: #000; animation: fade 200ms ease both; }
.np-full-exit { position: absolute; top: 22px; right: 26px; z-index: 3; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 24px; color: var(--text); background: rgba(255, 255, 255, 0.1); }
.np-full-exit:hover { background: rgba(255, 255, 255, 0.18); }
.np.big { padding: 56px 72px 36px; }
.np.big .np-main { gap: 64px; }
.np.big .np-art { width: 420px; height: 420px; border-radius: 24px; }
.np.big .np-art.wide { width: 720px; height: 405px; }
.np.big .np-source { font-size: 20px; }
.np.big .np-title { font-size: 48px; }
.np.big .np-artist { font-size: 28px; }
.np.big .np-times { font-size: 17px; }
.np.big .np-btn { width: 76px; height: 76px; font-size: 32px; }
.np.big .np-btn.np-play { width: 108px; height: 108px; font-size: 46px; }

/* Nothing playing */
.np-empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 32px; text-align: center; opacity: 0; transition: opacity 200ms ease; }
.np-empty.ready { opacity: 1; }
.np-empty-icon { font-size: 64px; color: var(--dim); opacity: 0.4; }
.np-empty h2 { font-size: 26px; font-weight: 600; }
.np-empty p { font-size: 17px; color: var(--dim); max-width: 460px; line-height: 1.45; }

/* Side card: sources and mixer */
.side-card { display: flex; flex-direction: column; padding: 14px; }
.side-tabs { display: flex; gap: 8px; flex: none; }
.side-tab { height: 44px; padding: 0 18px; border-radius: 22px; display: inline-flex; align-items: center; gap: 8px; font-size: 18px; color: var(--dim); transition: background 160ms ease, color 160ms ease; }
.side-tab:hover { color: var(--text); }
.side-tab.active { background: #3A3A3C; color: var(--text); }
.side-count { min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; background: rgba(255, 255, 255, 0.1); font-size: 14px; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.side-list { flex: 1; min-height: 0; margin-top: 12px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; scrollbar-width: none; }
.side-list::-webkit-scrollbar { display: none; }
.side-empty { padding: 28px 12px; text-align: center; color: var(--dim); font-size: 16px; }

.src-row { width: 100%; display: flex; align-items: center; gap: 14px; padding: 10px; border-radius: 16px; background: rgba(255, 255, 255, 0.04); border: 1px solid transparent; text-align: left; flex: none; transition: background 120ms ease, border-color 120ms ease; }
.src-row:hover { background: rgba(255, 255, 255, 0.08); }
.src-row.active { background: rgba(204, 251, 97, 0.08); border-color: rgba(204, 251, 97, 0.4); }
.src-thumb { width: 56px; height: 56px; border-radius: 10px; overflow: hidden; background: #2C2C2E; display: grid; place-items: center; flex: none; }
.src-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.src-thumb-icon { font-size: 24px; color: var(--dim); }
.src-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.src-title { font-size: 17px; font-weight: 500; }
.src-sub { font-size: 14px; color: var(--dim); }
.eq { width: 18px; height: 18px; display: flex; align-items: flex-end; gap: 3px; flex: none; opacity: 0; transition: opacity 160ms ease; }
.eq.on { opacity: 1; }
.eq i { width: 4px; height: 30%; border-radius: 1px; background: var(--dm-lime); }
.eq.on i { animation: eq 900ms ease-in-out infinite alternate; }
.eq.on i:nth-child(2) { animation-delay: -300ms; }
.eq.on i:nth-child(3) { animation-delay: -600ms; }
@keyframes eq { from { height: 25%; } to { height: 100%; } }

.mix-row { padding: 12px 14px; border-radius: 16px; background: rgba(255, 255, 255, 0.04); display: flex; flex-direction: column; gap: 6px; flex: none; transition: opacity 160ms ease; }
.mix-row.muted { opacity: 0.55; }
.mix-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.mix-name { font-size: 16px; font-weight: 500; flex: 1; min-width: 0; }
.mix-pct { font-size: 15px; color: var(--dim); font-variant-numeric: tabular-nums; flex: none; }
.mix-controls { display: flex; align-items: center; gap: 10px; }
.mix-mute { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: 18px; color: var(--text); background: rgba(255, 255, 255, 0.08); flex: none; }
.mix-bar { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mix-vol { height: 22px; }
.mix-vu { display: block; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.mix-vu span { display: block; height: 100%; background: #34D399; }

/* Standing screens: player on top, the side card under it, the page scrolls inside */
.media.tall .media-body { grid-template-columns: minmax(0, 1fr); grid-auto-rows: max-content; overflow-y: auto; scrollbar-width: none; }
.media.tall .media-body::-webkit-scrollbar { display: none; }
.media.tall .np { height: auto; padding: 24px; }
.media.tall .np-main { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 24px; }
.media.tall .np-art { width: 340px; height: 340px; }
.media.tall .np-art.wide { width: 100%; max-width: 560px; height: auto; aspect-ratio: 16 / 9; }
.media.tall .np-info { width: 100%; }
.media.tall .np-empty { min-height: 360px; }
.media.tall .side-card { min-height: 420px; }

@media (prefers-reduced-motion: reduce) {
  .np-art, .np-backdrop, .bar-track, .np-empty, .np-full { transition: none; animation: none; }
  .eq.on i { animation: none; height: 70%; }
}

/* Update question and progress (ADR 0017): over every screen of the app window. */
.update-backdrop { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.72); }
.update-card { width: 560px; max-width: calc(100% - 48px); padding: 36px; border-radius: 28px; background: var(--card); border: 1px solid var(--dm-border); }
.update-card .eyebrow { font-size: 14px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dm-lime); }
.update-card h2 { margin: 10px 0 8px; font-size: 28px; font-weight: 600; color: var(--text); }
.update-card .muted { font-size: 18px; margin: 0; }
.update-actions { display: flex; gap: 12px; margin-top: 28px; }
.update-note { margin: 18px 0 0; font-size: 15px; color: var(--dim); }
.update-error { margin: 16px 0 0; font-size: 15px; color: var(--dm-critical); }
.update-meter { height: 8px; margin-top: 26px; border-radius: 4px; background: var(--card-2); overflow: hidden; }
.update-meter span { display: block; height: 100%; width: 0; background: var(--dm-lime); border-radius: 4px; transition: width 300ms ease; }
.update-meter.indeterminate span { width: 35%; animation: update-slide 1.2s ease-in-out infinite; }
@keyframes update-slide { from { transform: translateX(-100%); } to { transform: translateX(290%); } }

/* Desempenho > Rede: speed test, quality, network check, connection, history */
.net-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: none; }
.net-btn { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 20px; border-radius: 21px; background: var(--pill); color: var(--text); font-size: 17px; font-weight: 600; white-space: nowrap; flex: none; transition: background 160ms ease; }
.net-btn:hover { background: #3A3A3C; }
.net-btn.primary { background: var(--dm-lime); color: #000; }
.net-btn.primary:hover { background: var(--dm-lime-hover); }
.net-btn[disabled] { opacity: 0.6; pointer-events: none; }
.net-btn .icon { font-size: 18px; }
.net-cols { display: flex; gap: 28px; margin-top: 12px; flex: none; }
.net-col { display: flex; flex-direction: column; flex: 1 1 0; min-width: 0; }
.net-label { font-size: 16px; }
.net-num { font-size: 40px; font-weight: 500; line-height: 1.1; white-space: nowrap; font-variant-numeric: tabular-nums lining-nums; }
.net-num small { font-size: 18px; color: var(--dim); margin-left: 0.3em; }
.net-status { white-space: normal; }
.net-error { color: #FF453A; }
.net-curve { width: 100%; flex: 1 1 auto; min-height: 30px; margin-top: 8px; }
.net-curve path { fill: none; stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.net-curve-mid { stroke: #2C2C2E; stroke-width: 1; vector-effect: non-scaling-stroke; }
.net-hint { color: var(--dim); font-size: 16px; margin-top: 14px; line-height: 1.45; }
.net-rows { display: grid; grid-template-columns: 1fr; gap: 4px 28px; margin-top: 12px; align-content: start; min-height: 0; }
.net-rows.two { grid-template-columns: 1fr 1fr; }
.net-row { display: flex; align-items: center; gap: 10px; font-size: 16px; min-height: 23px; min-width: 0; white-space: nowrap; overflow: hidden; }
.net-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.net-key { color: var(--dim); flex: none; min-width: 112px; }
.net-val { color: var(--text); font-variant-numeric: tabular-nums; overflow: hidden; }
.q-main { display: flex; align-items: center; gap: 18px; margin-top: 14px; flex: none; }
.q-bars { display: flex; align-items: flex-end; gap: 5px; height: 44px; flex: none; }
.q-bars span { width: 10px; border-radius: 3px; transition: background 300ms ease; }
.q-text { min-width: 0; }
.q-title { font-size: 36px; font-weight: 500; line-height: 1.05; }
.q-text .sub { white-space: normal; }
.net-hist { display: flex; align-items: flex-end; gap: 10px; flex: 1 1 auto; min-height: 40px; margin-top: 12px; }
.net-hist-col { display: flex; align-items: flex-end; gap: 3px; flex: 1 1 0; height: 100%; }
.net-hist-col span { flex: 1 1 0; border-radius: 4px 4px 0 0; min-height: 3px; }
.net-note { margin-top: 8px; font-size: 15px; color: var(--dm-lime); }

/* Tempo de Uso (ADR 0021, 0022; Gllai ui.c "Tempo de Uso"): summary + stacked chart left,
   now + lists right. Selecting hours filters the lists; an app opens its own page. */
.st-head .seg { margin-left: 4px; }
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 24px; background: var(--pill); flex: none; }
.seg button { height: 40px; padding: 0 22px; border-radius: 20px; font-size: 18px; color: var(--dim); white-space: nowrap; transition: background 160ms ease, color 160ms ease; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--pill-on); color: var(--text); }
.st-nav { display: flex; align-items: center; gap: 8px; flex: none; }
.st-arrow { width: 48px; height: 48px; border-radius: 24px; background: var(--pill); display: grid; place-items: center; font-size: 24px; transition: background 160ms ease, opacity 160ms ease; }
.st-arrow:hover { background: #3A3A3C; }
.st-arrow.off { opacity: 0.3; pointer-events: none; }
.st-period { min-width: 170px; text-align: center; font-size: 20px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.head.narrow.st-head .st-nav { margin-left: auto; }

.st-body { position: absolute; left: 24px; right: 24px; top: 78px; bottom: 14px; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 14px; }
.st.narrow .st-body { top: 136px; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1.05fr) minmax(0, 0.95fr); }

/* Summary head: total on the left, facts on the right */
.st-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex: none; }
.st-top-main { min-width: 0; }
.st-caption { display: flex; align-items: center; gap: 8px; font-size: 18px; color: var(--dim); white-space: nowrap; min-height: 30px; }
.st-caption.picked { color: var(--text); }
.st-chip-x { width: 26px; height: 26px; border-radius: 13px; background: var(--card-2); color: var(--dim); display: grid; place-items: center; font-size: 15px; flex: none; transition: background 160ms ease, color 160ms ease; }
.st-chip-x:hover { background: #3A3A3C; color: var(--text); }
.st-open-day { height: 28px; padding: 0 12px; border-radius: 14px; background: rgba(10, 132, 255, 0.18); color: #64B5FF; font-size: 14px; }
.st-open-day:hover { background: rgba(10, 132, 255, 0.3); }
.st-total { font-size: 56px; font-weight: 500; line-height: 1.05; margin-top: 2px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.st-sub { font-size: 16px; color: var(--dim); margin-top: 6px; white-space: nowrap; overflow: hidden; }
.st-facts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; max-width: 54%; padding-top: 4px; }
.st.narrow .st-top { flex-direction: column; gap: 10px; }
.st.narrow .st-facts { justify-content: flex-start; max-width: none; padding-top: 0; }
.st-fact { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border-radius: 12px; background: #141416; border: 1px solid var(--line); min-width: 92px; }
.st-fact small { font-size: 12px; color: var(--faint); white-space: nowrap; }
.st-fact b { font-size: 16px; font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }
.st-fact.up b { color: #FF9F0A; }
.st-fact.down b { color: #30D158; }

/* Legend: the stacked apps, each opens its page */
.st-legend { display: flex; flex-wrap: nowrap; gap: 8px; margin-top: 12px; flex: none; overflow: hidden; }
.st-legend-item { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px 0 10px; border-radius: 16px; background: #141416; border: 1px solid var(--line); font-size: 14px; transition: background 160ms ease, border-color 160ms ease; }
button.st-legend-item:hover { background: #232325; border-color: #3A3A3C; }
.st-legend-name { color: var(--text); white-space: nowrap; max-width: 150px; overflow: hidden; }
.st-legend-value { color: var(--dim); white-space: nowrap; font-variant-numeric: tabular-nums; }
.stc-dot { width: 10px; height: 10px; border-radius: 3px; flex: none; display: inline-block; }
.st-help { font-size: 13px; color: var(--faint); margin-top: 6px; white-space: nowrap; overflow: hidden; flex: none; }

/* Chart (views/screen_time/chart.rs) */
.stc { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; margin-top: 14px; }
.stc-plot { position: relative; flex: 1 1 0; min-height: 80px; margin-right: 70px; padding-top: 0; background: #111113; border-radius: 14px 14px 0 0; touch-action: none; cursor: crosshair; outline: none; }
.stc-plot:focus-visible { box-shadow: 0 0 0 2px var(--dm-lime); }
.stc-grid { position: absolute; left: 0; right: -70px; height: 0; border-top: 1px dashed rgba(255, 255, 255, 0.10); pointer-events: none; }
.stc-grid.base { border-top: 1px solid #48484A; }
.stc-axis { position: absolute; right: -70px; width: 64px; transform: translateY(50%); font-size: 13px; color: var(--dim); white-space: nowrap; text-align: right; pointer-events: none; }
.stc-slot { position: absolute; top: 0; bottom: 0; display: flex; align-items: flex-end; justify-content: center; transition: opacity 160ms ease; }
.stc-slot::before { content: ""; position: absolute; inset: 0 1px; border-radius: 8px; background: transparent; transition: background 120ms ease; }
.stc-slot.hov::before { background: rgba(255, 255, 255, 0.05); }
.stc-slot.sel::before { background: rgba(255, 255, 255, 0.09); }
.stc-slot.dim { opacity: 0.32; }
.stc-slot.future { opacity: 0.4; }
.stc-stack { position: relative; width: 66%; max-width: 46px; display: flex; flex-direction: column-reverse; gap: 1px; transition: height 300ms cubic-bezier(.2, .8, .2, 1); }
.stc-seg { display: block; width: 100%; min-height: 2px; border-radius: 2px; }
.stc-seg:last-child { border-radius: 6px 6px 2px 2px; }
.stc-slot.now .stc-stack { filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.18)); }
.stc-slot.sel .stc-stack { filter: brightness(1.12); }
.stc-peak { position: absolute; left: 50%; bottom: 100%; transform: translate(-50%, -6px); font-size: 12px; color: var(--text); white-space: nowrap; background: #2C2C2E; padding: 2px 7px; border-radius: 8px; pointer-events: none; }
.stc-avg { position: absolute; left: 0; right: 0; height: 0; border-top: 2px dashed rgba(255, 214, 10, 0.75); pointer-events: none; }
.stc-avg span { position: absolute; right: 6px; bottom: 4px; font-size: 12px; color: #FFD60A; background: #111113; padding: 1px 6px; border-radius: 6px; white-space: nowrap; }
.stc-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 0 30px; color: var(--dim); font-size: 16px; pointer-events: none; }
.stc-labels { position: relative; height: 40px; margin-right: 70px; flex: none; border-top: 0; }
.stc-label { position: absolute; top: 8px; font-size: 14px; color: var(--dim); white-space: nowrap; display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.stc-label.center { align-items: center; }
.stc-label small { font-size: 12px; color: var(--faint); }
.stc-label.now { color: var(--text); font-weight: 600; }
.stc-label.sel { color: var(--text); }

/* Tooltip */
.stc-tip { position: absolute; top: 8px; transform: translateX(-50%); z-index: 3; min-width: 210px; max-width: 280px; background: rgba(28, 28, 30, 0.97); border: 1px solid #3A3A3C; border-radius: 14px; padding: 10px 12px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55); pointer-events: none; display: flex; flex-direction: column; gap: 6px; }
.stc-tip-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--dim); white-space: nowrap; }
.stc-tip-head strong { font-size: 17px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.stc-tip-row { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.stc-tip-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; }
.stc-tip-value { color: var(--dim); white-space: nowrap; font-variant-numeric: tabular-nums; }
.stc-tip-hint { font-size: 12px; color: var(--faint); }

/* App page */
.st-app-head { display: flex; align-items: center; gap: 14px; flex: none; margin-bottom: 8px; }
.st-back { width: 40px; height: 40px; border-radius: 20px; background: var(--card-2); display: grid; place-items: center; font-size: 22px; flex: none; transition: background 160ms ease; }
.st-back:hover { background: #3A3A3C; }
.st-app-title { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.st-app-name { font-size: 26px; white-space: nowrap; overflow: hidden; }
.st-app-title .st-caption { font-size: 15px; min-height: 26px; }

/* Right card */
.st-now { display: flex; align-items: center; gap: 16px; min-height: 76px; padding-bottom: 14px; border-bottom: 1px solid var(--line); flex: none; }
.st-now-btn { display: flex; align-items: center; gap: 16px; text-align: left; width: 100%; border-radius: 16px; padding: 4px; margin: -4px; transition: background 160ms ease; }
.st-now-btn:hover { background: #232325; }
.st-now-text { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.st-now-top { display: flex; align-items: center; gap: 8px; font-size: 15px; white-space: nowrap; }
.st-now-name { display: flex; align-items: center; gap: 10px; font-size: 24px; white-space: nowrap; overflow: hidden; }
.st-now-sub { font-size: 15px; color: var(--dim); white-space: nowrap; }
.st-now-sub.warn { color: var(--dm-warning); }
.st-badge { flex: none; font-size: 13px; padding: 3px 10px; border-radius: 12px; background: rgba(10, 132, 255, 0.18); color: #64B5FF; }
.st-live-dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; flex: none; display: inline-block; }
.st-live-dot.small { width: 7px; height: 7px; margin-right: 6px; }

.st-tile { width: 40px; height: 40px; border-radius: 10px; background: var(--card-2); display: grid; place-items: center; flex: none; overflow: hidden; }
.st-tile.big { width: 60px; height: 60px; border-radius: 14px; }
.st-tile.warn { color: var(--dm-warning); }
.st-tile img { width: 32px; height: 32px; image-rendering: auto; }
.st-tile.big img { width: 44px; height: 44px; }
.st-glyph { font-size: 22px; color: var(--dim); display: grid; }
.st-tile.big .st-glyph { font-size: 30px; }
.st-tile.warn .st-glyph { color: inherit; }

.st-tabs { margin-top: 14px; align-self: flex-start; }
.st-tabs button { white-space: pre; }
.st-selbar { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 8px 8px 8px 14px; border-radius: 12px; background: rgba(10, 132, 255, 0.14); border: 1px solid rgba(10, 132, 255, 0.35); font-size: 15px; flex: none; }
.st-selbar span { flex: 1; color: var(--text); white-space: nowrap; }
.st-selbar b { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.st-list { flex: 1 1 0; min-height: 0; margin-top: 8px; overflow-y: auto; scrollbar-width: none; touch-action: pan-y; display: flex; flex-direction: column; }
.st-list::-webkit-scrollbar { display: none; }
.st-row { display: flex; align-items: center; gap: 12px; padding: 9px 8px; border-radius: 12px; border-bottom: 1px solid var(--line); flex: none; text-align: left; width: 100%; transition: background 140ms ease; }
.st-row:hover { background: #232325; }
.st-row.on { background: #2A2A2D; box-shadow: inset 3px 0 0 var(--dm-lime); }
.st-row:last-child { border-bottom: 0; }
.st-rank { width: 20px; text-align: right; font-size: 14px; color: var(--faint); font-variant-numeric: tabular-nums; flex: none; }
.st-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.st-row-line { display: flex; align-items: baseline; gap: 12px; }
.st-row-name { flex: 1; min-width: 0; font-size: 18px; white-space: nowrap; overflow: hidden; }
.st-row-value { font-size: 18px; white-space: nowrap; font-variant-numeric: tabular-nums; flex: none; }
.st-row-value.dim { color: var(--dim); }
.st-row-sub { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--faint); white-space: nowrap; }
.st-trend { font-size: 13px; }
.st-trend.up { color: #FF9F0A; }
.st-trend.down { color: #30D158; }
.st-row-bar { height: 5px; border-radius: 3px; background: var(--card-2); overflow: hidden; margin-top: 3px; }
.st-row-bar span { display: block; height: 100%; border-radius: 3px; }
.st-hint { color: var(--dim); font-size: 16px; padding: 18px 2px; }
@media (prefers-reduced-motion: reduce) { .stc-stack, .stc-slot { transition: none; } }

/* ---------------------------------------------------------------- Atalhos (deck, ADR 0024) */
/* Pager: previous, "2 / 7" and the page name (opens the list), next, list. */
.dk-nav { display: flex; align-items: center; gap: 8px; flex: 0 1 auto; min-width: 0; }
.dk-nav-btn { width: 48px; height: 48px; border-radius: 24px; background: var(--pill); color: var(--text); display: grid; place-items: center; font-size: 24px; flex: none; transition: background 160ms ease, opacity 160ms ease; }
.dk-nav-btn:hover:not(:disabled) { background: #3A3A3C; }
.dk-nav-btn:disabled { opacity: 0.35; cursor: default; }
.dk-nav-current { height: 48px; padding: 0 22px; border-radius: 24px; background: var(--pill-on); color: var(--text); display: inline-flex; align-items: center; gap: 12px; min-width: 0; max-width: 420px; font-size: 20px; transition: background 160ms ease; }
.dk-nav-num { font: 500 16px/1 var(--dm-font-mono); font-variant-numeric: tabular-nums; color: var(--dim); flex: none; }
.dk-nav-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
/* Narrow header: the pager and the edit button share the second line. */
.deck .head.narrow .dk-nav { flex: 1 1 60%; }
.deck .head.narrow .dk-nav-current { flex: 1; max-width: none; }

/* Page list. */
.dk-plist-backdrop { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.72); }
.dk-plist-card { width: 560px; max-width: calc(100% - 48px); max-height: calc(100% - 64px); display: flex; flex-direction: column; gap: 10px; padding: 26px 24px 20px; border-radius: 28px; background: var(--card); border: 1px solid var(--dm-border); }
.dk-plist-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dk-plist-head h2 { font-size: 26px; font-weight: 600; color: var(--text); }
.dk-plist { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; min-height: 0; }
.dk-prow { position: relative; display: flex; align-items: center; border-radius: 18px; background: var(--card-2); transition: transform 160ms ease, background 160ms ease; }
.dk-prow.active { background: color-mix(in srgb, var(--dm-lime) 14%, var(--card-2)); }
.dk-plist.dragging .dk-prow.lifted { transition: none; z-index: 2; outline: 2px solid var(--dm-lime); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55); }
.dk-prow-go { flex: 1; min-width: 0; height: 60px; padding: 0 18px; display: flex; align-items: center; gap: 14px; text-align: left; font-size: 20px; color: var(--text); }
.dk-prow-num { width: 34px; flex: none; text-align: right; font: 500 17px/1 var(--dm-font-mono); font-variant-numeric: tabular-nums; color: var(--dim); }
.dk-prow.active .dk-prow-num { color: var(--dm-lime); }
.dk-prow-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.dk-prow-grip { width: 56px; height: 60px; flex: none; display: grid; place-items: center; font-size: 22px; color: var(--dim); cursor: grab; touch-action: none; }
.dk-plist.dragging .dk-prow-grip { cursor: grabbing; }
@media (prefers-reduced-motion: reduce) { .dk-prow { transition: none; } }
.deck .head.narrow .dk-edit { padding: 0 16px; }
.dk-edit { height: 48px; padding: 0 22px 0 18px; border-radius: 24px; background: var(--pill); display: inline-flex; align-items: center; gap: 10px; font-size: 19px; flex: none; transition: background 160ms ease, color 160ms ease; }
.dk-edit .icon { font-size: 22px; }
.dk-edit:hover { background: #3A3A3C; }
.dk-edit.on { background: var(--dm-lime); color: #000; }

.dk-body { position: absolute; left: 24px; right: 24px; top: 86px; bottom: 22px; display: flex; gap: 20px; }
.deck.narrow .dk-body { top: 140px; }
.dk-empty { flex: 1; display: grid; place-items: center; font-size: 20px; }
.dk-stage { flex: 1; min-width: 0; min-height: 0; display: flex; }
.dk-stage.from-right { animation: slide-right 260ms cubic-bezier(.2, .8, .2, 1) both; }
.dk-stage.from-left { animation: slide-left 260ms cubic-bezier(.2, .8, .2, 1) both; }
.dk-grid { flex: 1; min-width: 0; min-height: 0; display: grid; gap: 16px; touch-action: none; }

/* A control: --c is its color. */
.dk-ctl { --c: var(--dm-lime); position: relative; min-width: 0; min-height: 0; display: flex; border-radius: 26px; container-type: size; }
.dk-key { flex: 1; min-width: 0; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 14px; border-radius: 26px; background: var(--card); border: 1px solid #2A2A2C; overflow: hidden; transition: transform 120ms ease, background 200ms ease, border-color 200ms ease, box-shadow 200ms ease; }
.dk-key:hover { background: #232325; }
.dk-key.pressed { transform: scale(0.955); }
.dk-key::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(circle at center, color-mix(in srgb, var(--c) 45%, transparent) 0%, transparent 70%); opacity: 0; transform: scale(0.4); pointer-events: none; }
.dk-key.pressed::after { animation: dk-ripple 520ms ease-out; }
.dk-glyph { width: 76px; height: 76px; border-radius: 22px; display: grid; place-items: center; font-size: 38px; color: var(--c); background: color-mix(in srgb, var(--c) 14%, var(--card-2)); flex: none; transition: background 200ms ease, color 200ms ease; }
.dk-app-icon { width: 52px; height: 52px; display: block; }
.dk-label { font-size: 20px; line-height: 1.3; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; text-align: center; flex: none; }
.dk-sub { font: 500 13px/1.2 var(--dm-font-mono); color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; flex: none; }
/* Short keys (edit mode adds a row; phones have small cells): drop the action line first, then
   shrink the glyph, so the label is never cut. */
@container (max-height: 178px) { .dk-sub { display: none; } }
@container (max-height: 146px) {
  .dk-key { gap: 8px; }
  .dk-glyph { width: 56px; height: 56px; border-radius: 16px; font-size: 28px; }
  .dk-glyph .dk-app-icon { width: 38px; height: 38px; }
}
@container (max-height: 112px) {
  .dk-key { gap: 6px; padding: 10px; }
  .dk-glyph { width: 40px; height: 40px; border-radius: 12px; font-size: 22px; }
  .dk-glyph .dk-app-icon { width: 28px; height: 28px; }
  .dk-label { font-size: 16px; }
}
@container (max-height: 76px) { .dk-glyph { display: none; } }
/* Narrow keys (portrait tablets and phones): less padding and a smaller label before it is cut. */
@container (max-width: 130px) {
  .dk-key { padding: 8px 6px; }
  .dk-label { font-size: 15px; }
  .dk-sub { font-size: 11px; }
}
@container (max-width: 96px) {
  .dk-label { font-size: 16px; white-space: normal; hyphens: auto; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
  .dk-glyph { width: 56px; height: 56px; border-radius: 16px; font-size: 28px; }
  .dk-glyph .dk-app-icon { width: 38px; height: 38px; }
}

/* Toggle on: lit with its color, like a hardware key. */
.dk-ctl.toggle .dk-key.on { background: color-mix(in srgb, var(--c) 16%, var(--card)); border-color: color-mix(in srgb, var(--c) 70%, transparent); box-shadow: 0 0 18px color-mix(in srgb, var(--c) 28%, transparent), inset 0 0 0 1px color-mix(in srgb, var(--c) 40%, transparent); }
.dk-ctl.toggle .dk-key.on .dk-glyph { background: var(--c); color: #000; }
.dk-ctl.toggle .dk-key::before { content: ""; position: absolute; top: 16px; right: 16px; width: 10px; height: 10px; border-radius: 50%; background: var(--faint); transition: background 200ms ease, box-shadow 200ms ease; }
.dk-ctl.toggle .dk-key.on::before { background: var(--c); box-shadow: 0 0 10px var(--c); }

/* Press feedback from the computer. */
.dk-ctl.flash-ok .dk-key { animation: dk-ok 600ms ease-out; }
.dk-ctl.flash-bad .dk-key, .dk-ctl.flash-bad .dk-fader { animation: dk-shake 380ms ease-in-out; border-color: var(--dm-critical); }
@keyframes dk-ripple { 0% { opacity: 1; transform: scale(0.3); } 100% { opacity: 0; transform: scale(1.4); } }
@keyframes dk-ok { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 60%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }
@keyframes dk-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }

/* Fader. */
.dk-fader { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 26px; background: var(--card); border: 1px solid #2A2A2C; outline: none; }
.dk-fader:focus-visible { border-color: var(--dm-lime); }
.dk-fader-head { display: flex; align-items: center; gap: 10px; flex: none; min-width: 0; }
.dk-fader-icon { font-size: 24px; color: var(--c); display: grid; flex: none; }
.dk-fader-icon .dk-app-icon { width: 26px; height: 26px; }
.dk-fader-name { font-size: 18px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
@container (max-width: 110px) {
  .dk-fader { padding: 12px 8px; }
  .dk-fader-name { font-size: 14px; }
  .dk-fader-value { font-size: 18px; }
}
.dk-fader-value { font: 500 22px/1 var(--dm-font-mono); font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; flex: none; }
.dk-fader.vertical .dk-fader-head { flex-wrap: wrap; justify-content: center; text-align: center; }
.dk-fader.vertical .dk-fader-name { flex-basis: 100%; order: 3; text-align: center; }
.dk-fader.vertical .dk-fader-value { font-size: 26px; }
.dk-track { position: relative; flex: 1; min-height: 0; border-radius: 20px; background: var(--card-2); overflow: hidden; cursor: grab; touch-action: none; }
.dk-fader.dragging .dk-track { cursor: grabbing; }
.dk-fill { position: absolute; left: 0; bottom: 0; background: linear-gradient(0deg, color-mix(in srgb, var(--c) 70%, #000) 0%, var(--c) 100%); transition: height 140ms ease, width 140ms ease; }
.dk-fader:not(.vertical) .dk-fill { top: 0; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 70%, #000) 0%, var(--c) 100%); }
.dk-fader.vertical .dk-fill { right: 0; }
.dk-fader.dragging .dk-fill, .dk-fader.dragging .dk-thumb { transition: none; }
.dk-thumb { position: absolute; background: #fff; border-radius: 3px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); transition: bottom 140ms ease, left 140ms ease; }
.dk-fader.vertical .dk-thumb { left: 10px; right: 10px; height: 6px; transform: translateY(50%); }
.dk-fader:not(.vertical) .dk-thumb { top: 10px; bottom: 10px; width: 6px; transform: translateX(-50%); }

/* Edit mode. */
.deck.editing .dk-ctl { animation: dk-breathe 2.4s ease-in-out infinite; }
.deck.editing .dk-ctl.selected { animation: none; outline: 2px solid var(--dm-lime); outline-offset: 3px; }
.deck.editing .dk-ctl.moving { animation: none; z-index: 3; outline: 2px solid var(--dm-lime); outline-offset: 3px; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55); cursor: grabbing; }
.deck.editing .dk-track { cursor: inherit; }
@keyframes dk-breathe { 0%, 100% { outline: 1px dashed rgba(255, 255, 255, 0.10); outline-offset: 3px; } 50% { outline: 1px dashed rgba(255, 255, 255, 0.28); outline-offset: 3px; } }
.dk-grab { position: absolute; inset: 0; border-radius: 26px; cursor: move; z-index: 1; }
.dk-resize { position: absolute; right: -6px; bottom: -6px; width: 30px; height: 30px; border-radius: 50%; background: var(--dm-lime); border: 4px solid #000; cursor: nwse-resize; z-index: 2; opacity: 0; transition: opacity 160ms ease; }
.dk-ctl.selected .dk-resize, .dk-ctl:hover .dk-resize { opacity: 1; }
.dk-cell { border-radius: 26px; border: 2px dashed #2E2E31; color: var(--faint); display: grid; place-items: center; font-size: 30px; transition: border-color 160ms ease, color 160ms ease, background 160ms ease; }
.dk-cell:hover { border-color: var(--dm-lime); color: var(--dm-lime); background: rgba(204, 251, 97, 0.05); }
.dk-hint { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--dim); font-size: 20px; text-align: center; }
.dk-hint-icon { font-size: 54px; color: var(--faint); }

/* Inspector. */
.dk-inspector { width: 420px; flex: none; display: flex; flex-direction: column; background: var(--card); border: 1px solid #2A2A2C; border-radius: 26px; min-height: 0; overflow: hidden; animation: dk-in 220ms cubic-bezier(.2, .8, .2, 1) both; }
@keyframes dk-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
.dk-insp-body { flex: 1; min-height: 0; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.dk-insp-foot { flex: none; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 14px 20px 18px; border-top: 1px solid var(--line); }
.dk-insp-head { display: flex; align-items: center; justify-content: space-between; }
.dk-insp-title { font-size: 22px; font-weight: 500; }
.dk-inspector .input { height: 46px; font-size: 17px; }
.dk-inspector select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--dim) 50%), linear-gradient(135deg, var(--dim) 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
.dk-inspector .btn { height: 46px; font-size: 16px; padding: 0 18px; gap: 8px; }
.dk-inspector .btn .icon { font-size: 18px; }
.dk-seg { display: flex; gap: 6px; padding: 4px; border-radius: 16px; background: var(--card-2); }
.dk-seg button { flex: 1; height: 40px; border-radius: 12px; font-size: 15px; color: var(--dim); white-space: nowrap; transition: background 160ms ease, color 160ms ease; }
.dk-seg button.on { background: #48484A; color: var(--text); }
.dk-stepper { display: flex; align-items: center; justify-content: space-between; height: 46px; border-radius: 14px; background: var(--card-2); padding: 0 6px; }
.dk-stepper button { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: 18px; }
.dk-stepper button:hover { background: #3A3A3C; }
.dk-stepper button[disabled] { opacity: 0.3; pointer-events: none; }
.dk-stepper span { font-size: 20px; }
.dk-row-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.dk-row-buttons .btn { flex: 1 1 auto; }
.dk-danger { color: #FF8A82; }
.dk-icon-btn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 18px; color: var(--dim); flex: none; }
.dk-icon-btn:hover { background: var(--card-2); color: var(--text); }
.dk-icons { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.dk-icon-pick { height: 50px; border-radius: 12px; background: var(--card-2); display: grid; place-items: center; font-size: 22px; color: var(--dim); border: 2px solid transparent; }
.dk-icon-pick:hover { color: var(--text); }
.dk-icon-pick.on { border-color: var(--dm-lime); color: var(--text); }
.dk-colors { display: flex; flex-wrap: wrap; gap: 10px; }
.dk-swatch { width: 34px; height: 34px; border-radius: 50%; border: 3px solid transparent; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.35); }
.dk-swatch.on { border-color: #fff; }
.dk-apps { max-height: 260px; display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.dk-app { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; text-align: left; font-size: 16px; border: 2px solid transparent; flex: none; }
.dk-app:hover { background: var(--card-2); }
.dk-app.on { border-color: var(--dm-lime); }
.dk-app img { width: 28px; height: 28px; flex: none; }
.dk-app span { white-space: nowrap; overflow: hidden; }
.dk-target { display: grid; gap: 8px; padding: 12px; border-radius: 16px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); }
.dk-target-addr { display: flex; gap: 8px; align-items: center; }
.dk-target-addr .input { flex: 1; min-width: 0; }
.dk-target-addr .dk-port { flex: 0 0 96px; }
.dk-arg { display: grid; grid-template-columns: 112px minmax(0, 1fr) 40px; gap: 8px; align-items: center; }
.dk-check { background: var(--card-2); }
/* A step the control still needs (an OSC destination). */
.dk-callout { display: grid; gap: 12px; padding: 14px; border-radius: 16px; background: rgba(56, 189, 248, 0.08); border: 1px solid rgba(56, 189, 248, 0.25); }
.dk-callout p { font-size: 16px; color: var(--text); }
.dk-check.disabled { opacity: 0.6; cursor: default; }
.dk-warn { font-size: 14px; color: var(--dm-warning); }

/* Toast. */
.dk-toast { position: absolute; left: 50%; bottom: 34px; transform: translateX(-50%); z-index: 5; display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 24px 0 18px; border-radius: 26px; background: #2C2C2E; border: 1px solid #3A3A3C; color: var(--text); font-size: 18px; white-space: nowrap; animation: dk-toast 220ms cubic-bezier(.2, .8, .2, 1) both; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
.dk-toast .icon { color: var(--dm-lime); font-size: 20px; }
.dk-toast.bad .icon { color: var(--dm-critical); }
@keyframes dk-toast { from { opacity: 0; transform: translate(-50%, 16px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* Narrow screens: the inspector covers the board. */
.deck.narrow .dk-inspector { position: absolute; right: 0; top: 0; bottom: 0; width: min(440px, 100%); z-index: 4; box-shadow: -20px 0 40px rgba(0, 0, 0, 0.6); }
@media (prefers-reduced-motion: reduce) {
  .dk-stage.from-right, .dk-stage.from-left, .deck.editing .dk-ctl, .dk-key.pressed::after, .dk-ctl.flash-ok .dk-key, .dk-ctl.flash-bad .dk-key, .dk-inspector, .dk-toast { animation: none; }
}

/* ---------------- Rede > Interfaces (views/interfaces.rs) ---------------- */
.ifaces { position: absolute; display: flex; flex-direction: column; }
.if-bar { height: 58px; flex: none; margin-bottom: 14px; display: flex; align-items: center; gap: 18px; white-space: nowrap; }
.if-all { display: inline-flex; align-items: center; gap: 10px; font-size: 18px; color: var(--text); cursor: pointer; flex: none; }
.if-all input, .if-serve input { width: 22px; height: 22px; margin: 0; accent-color: var(--dm-lime); flex: none; }
.if-port { display: inline-flex; align-items: center; gap: 10px; flex: none; font-size: 18px; }
.if-port .input { width: 110px; height: 42px; font-size: 17px; text-align: center; padding: 0 10px; }
.if-rows { display: flex; flex-direction: column; gap: 8px; flex: none; }
.if-row { height: 84px; flex: none; background: var(--card); border-radius: 18px; padding: 0 18px; display: flex; align-items: center; gap: 18px; }
.if-row.off .if-main, .if-row.off .if-addrs { opacity: 0.55; }
.if-icon { font-size: 30px; flex: none; display: grid; }
.if-main { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 4px; overflow: hidden; }
.if-name { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.if-name strong { font-size: 20px; font-weight: 500; }
.if-detail { font-size: 15px; color: var(--dim); white-space: nowrap; overflow: hidden; }
.if-tag { font-size: 13px; font-weight: 600; padding: 2px 9px; border-radius: 9px; background: var(--card-2); color: var(--dim); flex: none; }
.if-tag.warn { background: rgba(255, 216, 77, 0.14); color: #FFD84D; }
.if-tag.lime { background: rgba(204, 251, 97, 0.14); color: var(--dm-lime); }
.if-addrs { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.if-addr { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; color: var(--dim); white-space: nowrap; border-radius: 8px; padding: 1px 4px; cursor: default; }
.if-addr.link { color: var(--dm-lime); cursor: copy; }
.if-addr.link:hover { background: var(--card-2); }
.if-addr .icon { font-size: 14px; }
.if-none { font-size: 15px; color: var(--faint); }
.if-actions { flex: none; display: flex; align-items: center; gap: 14px; }
.if-serve { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; color: var(--dim); cursor: pointer; }
.if-confirm { display: inline-flex; align-items: center; gap: 10px; }
.if-pass { width: 200px; height: 42px; font-size: 16px; }
.if-status { min-width: 0; overflow: hidden; font-size: 17px; }

.if-rollback-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 18px;
    background: rgba(255, 216, 77, 0.12);
    border: 1px solid rgba(255, 216, 77, 0.4);
    border-radius: 12px;
    color: #FFD84D;
    font-size: 16px;
    margin-bottom: 8px;
}
.if-rollback-msg {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
}
.if-rollback-msg strong {
    color: #FFD84D;
}
.if-rollback-actions {
    display: flex;
    gap: 10px;
    flex: none;
}
.if-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.if-modal {
    background: var(--card);
    border: 1px solid var(--card-2);
    border-radius: 18px;
    width: 520px;
    max-width: 90vw;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}
.if-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--card-2);
    padding-bottom: 12px;
}
.if-modal-head h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}
.if-modal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 65vh;
    overflow-y: auto;
}
.if-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.if-section h4 {
    margin: 0;
    font-size: 16px;
    color: var(--dim);
}
.if-toggle-group {
    display: flex;
    gap: 8px;
}
.if-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.if-fields label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 14px;
    color: var(--dim);
}
.if-fields input {
    height: 38px;
    padding: 0 10px;
    font-size: 15px;
}
.if-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid var(--card-2);
    padding-top: 16px;
}
.net-btn.danger { background: #FF453A; color: #fff; }
.net-btn.danger:hover { background: #FF6259; }

/* ---------------- Dispositivos (views/peers.rs) ---------------- */
.peers-bar { position: absolute; margin: 0; }
.peers-input { width: 440px; height: 46px; font-size: 17px; }
.peers-grid { position: absolute; }
.peers-cards { display: grid; gap: 14px; }
.peer { gap: 8px; }
.peer.this { box-shadow: inset 0 0 0 1px rgba(204, 251, 97, 0.35); }
.peer-head { display: flex; align-items: center; gap: 12px; white-space: nowrap; flex: none; }
.peer-name { font-size: 22px; font-weight: 500; overflow: hidden; }
.peer-about { font-size: 16px; color: var(--dim); white-space: nowrap; overflow: hidden; flex: none; }
.peer-url { font-size: 15px; color: var(--faint); white-space: nowrap; overflow: hidden; flex: none; }
.peer-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: none; }
.peer-status { display: inline-flex; align-items: center; gap: 9px; font-size: 15px; color: var(--dim); white-space: nowrap; overflow: hidden; min-width: 0; }
.peer-actions { display: inline-flex; gap: 10px; flex: none; }
.peers-foot { position: absolute; bottom: 14px; margin: 0; }

/* ---------------- Device pairing (views/paired.rs & views/auth.rs) ---------------- */
.auth-tabs { display: flex; gap: 4px; padding: 4px; background: var(--card-2); border-radius: 12px; margin-bottom: 4px; }
.auth-tab { flex: 1; height: 38px; border-radius: 9px; font-size: 15px; font-weight: 500; color: var(--dim); background: transparent; border: 0; cursor: pointer; transition: all 160ms ease; }
.auth-tab.active { background: var(--card); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4); }

.pair-code-card { background: var(--card-2); border: 1px solid var(--line); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 12px; margin: 16px 0; }
.pair-code-top { display: flex; justify-content: space-between; align-items: center; }
.pair-code-badge { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--dm-lime); }
.pair-code-timer { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--dim); }
.pair-code-number { font-size: 42px; font-weight: 700; letter-spacing: 0.1em; color: var(--text); text-align: center; padding: 10px 0; user-select: all; }
.pair-code-hint { font-size: 14px; color: var(--dim); line-height: 1.4; margin: 0; }

.paired-list { margin-top: 14px; }
.paired-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.paired-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.paired-card-head { display: flex; align-items: center; gap: 14px; }
.paired-icon { width: 44px; height: 44px; border-radius: 14px; background: var(--card-2); display: grid; place-items: center; font-size: 22px; color: var(--dm-lime); flex: none; }
.paired-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.paired-name-row, .paired-edit-row { display: flex; align-items: center; gap: 8px; }
.paired-name { font-size: 18px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.paired-meta { font-size: 13px; color: var(--dim); }
.paired-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.paired-role-field { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--dim); }
.paired-role-select { height: 36px; padding: 0 10px; font-size: 14px; border-radius: 10px; background: var(--card-2); border: 1px solid var(--line); color: var(--text); }
.btn-sm { height: 36px; padding: 0 16px; font-size: 14px; border-radius: 18px; }
.btn-danger { background: #FF453A; color: #fff; }
.btn-danger:hover { background: #FF6259; }
.input-sm { height: 36px; font-size: 15px; padding: 0 10px; border-radius: 10px; }
.net-btn-ghost { width: 32px; height: 32px; border-radius: 8px; background: transparent; border: 0; color: var(--dim); display: grid; place-items: center; cursor: pointer; transition: all 160ms ease; }
.net-btn-ghost:hover { background: var(--card-2); color: var(--text); }


/* Floating widgets (ADR 0029). The window page lays the widget out at its medium size in CSS
   pixels and scales it to the window (src/panel/views/widget/mod.rs); the window is transparent. */
html.widget-mode, html.widget-mode body { background: transparent; }
.wg { position: absolute; left: 0; top: 0; transform-origin: 0 0; display: flex; padding: 7px; border: 1px solid transparent; overflow: hidden; color: var(--text); cursor: default; }
.wg-cell { position: relative; flex: none; display: flex; flex-direction: column; justify-content: center; min-width: 0; overflow: hidden; }
.wg-head { position: relative; display: flex; align-items: center; gap: 6px; color: var(--dim); font-size: 13px; white-space: nowrap; }
.wg-icon { display: grid; font-size: 15px; flex: none; }
.wg-label { overflow: hidden; }
.wg-value { position: relative; font-size: 26px; font-weight: 500; line-height: 1.1; white-space: nowrap; font-variant-numeric: tabular-nums lining-nums; letter-spacing: -0.015em; }
.wg-value small { font-size: 0.55em; color: var(--dim); margin-left: 0.18em; font-weight: 500; }
.wg-chart { position: absolute; left: 0; right: 0; bottom: 0; height: 42%; display: flex; flex-direction: column; opacity: 0.55; pointer-events: none; }
.wg-chart .chart { margin-top: 0; min-height: 10px; }
.wg.no-labels .wg-label, .wg.no-icons .wg-icon { display: none; }
.wg.no-labels.no-icons .wg-head { display: none; }

.wg-bar .wg-cell { width: 132px; height: 100%; padding: 6px 10px; gap: 2px; }
.wg-bar .wg-cell.wide { width: 264px; }
.wg-bar .wg-cell + .wg-cell { border-left: 1px solid var(--line); }

.wg-pill { align-items: center; }
.wg-pill .wg-cell { width: 112px; height: 100%; flex-direction: row; align-items: center; justify-content: center; gap: 8px; padding: 0 8px; }
.wg-pill .wg-cell.wide { width: 224px; }
.wg-pill .wg-label { display: none; }
.wg-pill .wg-value { font-size: 20px; }
.wg-pill .wg-icon { font-size: 17px; }

.wg-column { flex-direction: column; }
.wg-column .wg-cell { height: 56px; flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; padding: 0 10px; }
.wg-column .wg-cell.wide { height: 112px; flex-direction: column; align-items: stretch; justify-content: center; }
.wg-column .wg-cell + .wg-cell { border-top: 1px solid var(--line); }
.wg-column .wg-value { font-size: 22px; }
.wg-column .wg-head { font-size: 15px; }

.wg-grid { display: grid; grid-template-columns: 132px 132px; grid-auto-rows: 96px; gap: 8px; }
.wg-grid .wg-cell { padding: 10px 12px; gap: 4px; border-radius: 10px; background: rgba(255, 255, 255, 0.04); }
.wg-grid .wg-cell.wide { grid-column: span 2; }
.wg-grid .wg-value { font-size: 30px; }

.wg-ring { padding: 0; align-items: center; justify-content: center; }
.wg-ring-svg { position: absolute; inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); }
.wg-ring-body { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.wg-ring .wg-value { font-size: 40px; }
.wg-ring-sub { display: flex; align-items: center; gap: 5px; font-size: 14px; color: var(--dim); white-space: nowrap; font-variant-numeric: tabular-nums; }

.wg-media { display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; }
.wg-art { width: 52px; height: 52px; flex: none; border-radius: 8px; background: var(--card-2); display: grid; place-items: center; overflow: hidden; color: var(--dim); font-size: 22px; }
.wg-art img { width: 100%; height: 100%; object-fit: cover; }
.wg-track { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wg-title { font-size: 15px; white-space: nowrap; overflow: hidden; }
.wg-artist { font-size: 12px; color: var(--dim); white-space: nowrap; overflow: hidden; }
.wg-progress { height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.12); margin-top: 4px; overflow: hidden; }
.wg-progress span { display: block; height: 100%; background: #38BDF8; }
.wg-controls { display: flex; gap: 2px; flex: none; }
.wg-controls button { width: 28px; height: 28px; border-radius: 14px; display: grid; place-items: center; font-size: 15px; color: var(--text); }
.wg-controls button:hover { background: rgba(255, 255, 255, 0.1); }
.wg-column .wg-media, .wg-grid .wg-media { flex-wrap: wrap; }
.wg-column .wg-controls, .wg-grid .wg-controls { width: 100%; justify-content: center; }
.wg-column .wg-art, .wg-grid .wg-art { width: 40px; height: 40px; }

.wg-apps { display: flex; flex-direction: column; gap: 3px; margin-top: 4px; min-width: 0; }
.wg-app { display: flex; align-items: center; gap: 6px; font-size: 13px; min-width: 0; }
.wg-app img { width: 16px; height: 16px; flex: none; }
.wg-app-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; }
.wg-app-time { color: var(--dim); white-space: nowrap; font-variant-numeric: tabular-nums; }
.wg-empty { font-size: 13px; color: var(--dim); }

.wg-grip { position: absolute; right: 2px; bottom: 2px; width: 14px; height: 14px; cursor: nwse-resize; opacity: 0; transition: opacity 120ms ease; touch-action: none;
  background: linear-gradient(135deg, transparent 0 55%, var(--dim) 55% 62%, transparent 62% 75%, var(--dim) 75% 82%, transparent 82%); }
.wg:hover .wg-grip { opacity: 0.9; }
@media (prefers-reduced-motion: reduce) { .wg-grip { transition: none; } }

/* Widgets editor (Apps > Widgets). */
.wge-body { position: absolute; left: 24px; right: 24px; top: 92px; bottom: 24px; display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 18px; }
.wge-list { background: var(--card); border-radius: 24px; padding: 16px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.wge-item { text-align: left; padding: 12px 14px; border-radius: 16px; background: var(--card-2); border: 1px solid transparent; display: flex; flex-direction: column; gap: 2px; }
.wge-item.on { border-color: var(--dm-lime); }
.wge-item-name { font-size: 18px; }
.wge-item-sub { font-size: 14px; color: var(--dim); }
.wge-form { background: var(--card); border-radius: 24px; padding: 18px 24px; min-height: 0; }
.wge-empty { display: flex; flex-direction: column; gap: 8px; max-width: 560px; }
.wge-empty h2 { font-size: 26px; font-weight: 500; margin: 0; }
.wge-fields { display: flex; flex-direction: column; gap: 12px; }
.wge-row { display: flex; align-items: center; gap: 16px; min-height: 44px; flex-wrap: wrap; }
.wge-label { width: 110px; flex: none; color: var(--dim); font-size: 17px; }
.wge .seg button { height: 34px; padding: 0 16px; font-size: 16px; }
.wge .input-sm { max-width: 360px; }
.wge-range { flex: 1; min-width: 160px; max-width: 420px; accent-color: var(--dm-lime); }
.wge-num { width: 64px; font-size: 15px; color: var(--dim); font-variant-numeric: tabular-nums; }
.wge-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.wge-group h3 { margin: 6px 0 10px; font-size: 20px; font-weight: 500; }
.wge-modules { display: flex; flex-direction: column; gap: 6px; }
.wge-module { display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 14px; border-radius: 14px; background: var(--card-2); }
.wge-module-icon { display: grid; font-size: 20px; }
.wge-module-name { flex: 1; font-size: 17px; }
.wge-icon-btn { width: 34px; height: 34px; border-radius: 10px; background: var(--pill); display: grid; place-items: center; font-size: 17px; }
.wge-icon-btn[disabled], .wge-chip[disabled] { opacity: 0.35; pointer-events: none; }
.wge-up .icon, .wge-down .icon { transform: rotate(90deg); }
.wge-add { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.wge-chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 17px; background: var(--pill); font-size: 15px; }
.wge-chip.on { background: var(--dm-lime); color: #000; }

/* ------------------------------------------------------------------ Deskmetry Cloud (ADR 0033) */
/* The computer list scrolls on small screens; it is a page, not a device screen. */
.cloud-page { position: fixed; inset: 0; overflow-y: auto; padding: 28px clamp(16px, 4vw, 48px) 40px; display: flex; flex-direction: column; gap: 20px; }
.cloud-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.cloud-brand { display: flex; align-items: center; gap: 12px; font-family: var(--dm-font-display); font-size: 26px; font-weight: 600; letter-spacing: var(--dm-tracking-display); }
.cloud-brand img { width: 34px; height: auto; }
.cloud-brand b { color: var(--dm-lime); font-weight: 600; }
.cloud-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cloud-head-actions .btn, .cloud-footer .btn { gap: 8px; color: var(--text); text-decoration: none; }
.cloud-note { background: var(--dm-lime-muted); color: var(--text); border-radius: 16px; padding: 12px 16px; font-size: 15px; }
.cloud-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.cloud-card { background: var(--card); border-radius: 24px; padding: 20px; display: flex; flex-direction: column; gap: 6px; text-align: left; min-height: 188px; transition: background 160ms ease, transform 160ms ease; }
.cloud-card:hover { background: #232325; }
.cloud-card:active { transform: scale(0.99); }
.cloud-card.offline { opacity: 0.72; }
.cloud-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cloud-card-icon { width: 44px; height: 44px; border-radius: 14px; background: var(--pill); display: grid; place-items: center; font-size: 22px; }
.cloud-card-name { font-family: var(--dm-font-display); font-size: 22px; font-weight: 600; letter-spacing: var(--dm-tracking-display); overflow: hidden; white-space: nowrap; }
.cloud-card-meta { font-size: 14px; color: var(--dim); }
.cloud-card-foot { margin-top: auto; padding-top: 12px; display: flex; align-items: center; gap: 14px; font-size: 14px; }
.cloud-metric b { font-family: var(--dm-font-mono); font-size: 18px; font-weight: 600; color: var(--text); }
.cloud-open { margin-left: auto; color: var(--dim); display: grid; }
.cloud-status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--dim); background: var(--pill); border-radius: 999px; padding: 6px 12px; }
.cloud-status i, .cloud-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dm-neutral); flex: none; display: inline-block; }
.cloud-status.on { color: var(--text); }
.cloud-status.on i, .cloud-dot.on { background: var(--dm-online); box-shadow: 0 0 0 4px var(--dm-lime-muted); }
.cloud-dot.warn { background: var(--dm-warning); }
.cloud-empty { grid-column: 1 / -1; background: var(--card); border-radius: 24px; padding: 32px; display: grid; gap: 10px; justify-items: start; }
.cloud-empty h2 { font-size: 22px; font-weight: 500; }
.cloud-footer { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: space-between; }
.cloud-trust { display: flex; align-items: center; gap: 10px; color: var(--dim); font-size: 14px; max-width: 640px; }
.cloud-trust .icon { flex: none; color: var(--dm-lime); }
.cloud-pair-icon { width: 52px; height: 52px; border-radius: 16px; background: var(--pill); display: grid; place-items: center; font-size: 26px; color: var(--dm-lime); }
.cloud-code { width: 100%; resize: none; font-family: var(--dm-font-mono); font-size: 13px; padding: 12px; height: auto; word-break: break-all; }
/* The bar over a computer opened through the Cloud. */
.cloud-bar { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 10px; background: rgba(28, 28, 30, 0.92); backdrop-filter: blur(12px); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px 6px 6px; font-size: 14px; max-width: calc(100% - 32px); white-space: nowrap; }
.cloud-bar-back { width: 30px; height: 30px; border-radius: 50%; background: var(--pill); display: grid; place-items: center; }
.cloud-bar-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.cloud-bar-state { color: var(--dim); font-family: var(--dm-font-mono); font-size: 13px; }
.cloud-bar-lan { color: var(--dm-text-on-lime); background: var(--dm-lime); border-radius: 999px; padding: 4px 10px; font-weight: 600; font-size: 13px; text-decoration: none; }
.cloud-ended { z-index: 70; background: rgba(0, 0, 0, 0.72); }
/* Ajustes > Aparelhos > Deskmetry Cloud. */
.cloud-state-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 15px; }
.cloud-state-row .btn { gap: 8px; }
.cloud-fill { flex: 1; }
.cloud-offer { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.cloud-qr { background: #fff; border-radius: 16px; padding: 8px; flex: none; line-height: 0; }
.cloud-qr svg { width: 232px; height: 232px; }
.cloud-offer-text { flex: 1; min-width: 240px; display: grid; gap: 10px; }
.cloud-code-row { display: flex; gap: 8px; align-items: center; }
.cloud-code-text { flex: 1; min-width: 0; background: var(--scr); border-radius: 12px; padding: 10px 12px; font-size: 12px; word-break: break-all; user-select: all; }
.cloud-small { font-size: 13px; }
