/* web/pages/devices/devices.css — [DVX1 devices-page-v1]

   The Computer (Devices) page. First file of the devices extraction: this
   owns the page's LAYOUT and TYPE. Behaviour still lives in boot/devices.js,
   which is shell-level on purpose — it also drives the navbar chip and the
   device picker off one subscription, and those are not page-scoped.

   Loaded after every other sheet, so it corrects without !important.

   ---- 1. Why the page was a narrow column with its own scrollbar ----------
   app.css:433 is the whole cause:

     .set-page { max-width: 640px; margin: 40px auto; padding: 0 24px 60px;
                 overflow-y: auto; height: 100%; }

   That is the QtWebEngine desktop build's shape — a 640px column centred in a
   small fixed window. In a full-width browser it reads as a stranded card,
   and `overflow-y:auto; height:100%` gives the inner div a SECOND scrollbar
   inside the view that already scrolls.

   boot/overrides.css:16-22 already fixed exactly this for Dashboard and
   Sessions (`.dashv, .brsv { max-width:none; width:100%; ... }` plus
   `overflow-y:auto` moved onto the view). `.set-page` was missed. Same cure
   here, scoped to .dev-page so the Settings page — which also wears
   .set-page and is about to be redesigned — is not moved underneath it. */

/* Scroll belongs to the view, not to a div inside it. */
#view-devices.view.active {
  overflow-y: auto;
  min-height: 0;
}

/* [CTR1] Narrower and centred: the cards ran the full window width (~1400px
   on a desktop), so a two-line safety note became one 1300px line. Same
   900px column as Tools and Sessions. */
.dev-page {
  max-width: calc(900px + 68px);
  width: 100%;
  height: auto;
  margin: 0 auto;
  overflow: visible;
  box-sizing: border-box;
  padding: 24px 34px 72px;
}

/* ---- 2. Type ------------------------------------------------------------
   The page had two scales fighting: headings and hints inherited the desktop
   values (.set-card h3 18px, .set-hint 17px — Patterns.md flags --f-sm 18px
   as the same defect) while the device rows sat at 10-13px. Both ends move to
   the kit's 13-15 band so the page reads as one document. */
/* ---- [DVX1b] the page's own title is retired ----------------------------
   renderPage() emits <h2 class="set-title">Devices</h2>. The shared navbar
   now carries the page name ("Computer", from the rail's own data-label), so
   the page title was a second heading for the same thing — stacked right
   under it, in a different word AND a different size.

   Hidden rather than removed from renderPage(): boot/devices.js is the module
   that also drives the navbar chip and the picker, and this keeps the change
   to CSS. Restore by deleting this block.
   Logged in b2c-vault/Removed-for-redesign.md section 3.1. */
.dev-page .set-title { display: none; }

.dev-page .set-card {
  max-width: none;
  padding: 22px 24px;
  border-radius: var(--radius-card);
  background: var(--surface);
  border: 1px solid var(--border-2);
  margin-bottom: 20px;
  box-sizing: border-box;
}

.dev-page .set-card h3 {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 12px 0;
  color: var(--text);
}

.dev-page .set-hint,
.dev-page .dev-foot,
.dev-page .dev-os {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
}

.dev-page .set-row { gap: 12px; margin-bottom: 10px; }

/* ---- 3. Device rows (Card 1: Your computers) ---------------------------- */
.dev-page .dev-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-input);
  background: var(--surface-2);
  margin-bottom: 12px;
  transition: border-color 140ms ease, background 140ms ease;
}

.dev-page .dev-row:hover {
  border-color: var(--border-hover);
}

.dev-page .dev-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.dev-page .dev-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  font-family: var(--font-mono, monospace);
  letter-spacing: -0.01em;
}

.dev-page .dev-caps {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dev-page .dev-badge {
  font-size: 11px;
  line-height: 1.4;
  color: var(--text-muted);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-btn);
  padding: 2px 7px;
  background: var(--surface);
}

.dev-page .dev-st {
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
}
.dev-page .dev-st.online {
  color: var(--success-text, var(--success));
  background: var(--success-tint);
  border: 1px solid var(--success-tint-border);
}
:root[data-theme="light"] .dev-page .dev-st.online {
  color: var(--tb-accent-text, var(--accent));
  background: var(--selected-fill);
  border-color: var(--selected-border);
}
.dev-page .dev-st.offline {
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border-2);
}
.dev-page .dev-st.revoked {
  color: var(--danger);
  background: var(--danger-tint, transparent);
  border: 1px solid var(--danger);
}

/* Enable browser features — Add to Chrome link pill */
.dev-page .dev-ext-add {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 550;
  text-decoration: none;
  color: var(--tb-accent-text, var(--accent));
  background: var(--selected-fill);
  border: 1px solid var(--selected-border);
  transition: all 140ms ease;
  white-space: nowrap;
}
.dev-page .dev-ext-add:hover {
  text-decoration: none;
  border-color: var(--accent);
  filter: brightness(1.08);
}

.dev-page .dev-acts {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.dev-page .dev-acts button {
  height: 32px;
  font-size: 12.5px;
  font-weight: 550;
  font-family: var(--font);
  padding: 0 12px;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: all 120ms ease;
}
.dev-page .dev-acts button:hover {
  color: var(--text);
  border-color: var(--border-hover);
  background: var(--surface-2);
}
.dev-page .dev-acts button.dev-revoke:hover {
  color: var(--danger);
  border-color: var(--danger);
}

/* Card 1 & Card 3 footer buttons */
.dev-page .dev-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.dev-page .dc-dl {
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13.5px;
  font-weight: 600;
  font-family: var(--font);
  padding: 0 18px;
  border: 1px solid var(--tb-accent);
  border-radius: var(--radius-btn);
  background: var(--tb-accent);
  color: #fff;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: filter 120ms ease, box-shadow 120ms ease;
}
.dev-page .dc-dl:hover {
  filter: brightness(1.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.dev-page .dc-ghost {
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13.5px;
  font-weight: 550;
  font-family: var(--font);
  padding: 0 14px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-btn);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 120ms ease;
}
.dev-page .dc-ghost:hover {
  color: var(--text);
  border-color: var(--border-hover);
  background: var(--surface-2);
}

/* ---- 4. Safety checkboxes & notes (Card 2) ----------------------------- */
.dev-page .dev-perm-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-dim);
  margin-bottom: 12px;
}
.dev-page .dev-perm-row b {
  font-weight: 600;
  color: var(--text);
}
.dev-page .dev-perm-row input[type="checkbox"] {
  margin-top: 3px;
  flex: none;
  accent-color: var(--accent);
}

.dev-page .dc-empty {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-muted);
  text-align: left;
  margin: 10px 0 16px;
  padding: 0;
}

.dev-page .dc-linknote {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-muted);
}

/* ---- 5. Card 3: Allowed folders (#dev-roots) ---------------------------- */
.dev-page #dev-roots .dr-devsel {
  width: 100%;
  max-width: 380px;
  height: 38px;
  padding: 0 12px;
  margin: 12px 0 16px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-input);
  background: var(--surface-2);
  color: var(--text);
  font-size: 13.5px;
  font-family: var(--font);
  outline: none;
  cursor: pointer;
  transition: border-color 140ms ease;
  box-sizing: border-box;
}
.dev-page #dev-roots .dr-devsel:focus {
  border-color: var(--selected-border);
}

.dev-page #dev-roots input#dr-path {
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-input);
  background: var(--surface-2);
  color: var(--text);
  font-size: 13.5px;
  font-family: var(--font);
  outline: none;
  transition: border-color 140ms ease;
  box-sizing: border-box;
}
.dev-page #dev-roots input#dr-path:focus {
  border-color: var(--selected-border);
}

.dev-page #dev-roots #dr-list .dev-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-input);
  background: var(--surface-2);
  margin-bottom: 8px;
}

.dev-page #dev-roots #dr-list .dr-rm {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font);
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: all 120ms ease;
}
.dev-page #dev-roots #dr-list .dr-rm:hover {
  border-color: var(--danger);
  color: var(--danger);
}
