/* ============================================================================
   LPTCP layout & components. No element in here uses `border` or `outline`
   (the faint card edge from Figma is drawn with an inset box-shadow).
   ========================================================================== */

/* Values read from the OnCharge Figma file ("Mobile App Design" page: the
   Charging Stations card, Input field, Buttons/Button, Horizontal tabs, Badge).
   They live here, not in theme.css, because theme.css is also copied into the
   phone app (scripts/sync-app.mjs) and this restyle is for the web tool only. */
:root {
  --page: #202020; /* screen background */
  --text-strong: #ffffff; /* values, titles */
  --label: #d5d7da; /* input labels */

  /* Card ("bento box"): #262626, radius 32, 1px inside edge white 7%,
     inner shadow 12/10/10/-10 #aaa 10%, drop shadow 4/4/6 black 16%. */
  --r-card: 32px;
  --card-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07),
    inset 12px 10px 10px -10px rgba(170, 170, 170, 0.1), 4px 4px 6px 0 rgba(0, 0, 0, 0.16);

  /* Input: #1e1e1e, radius 12, inner shadow 1/1/4 white 10%, drop shadow 1/1/4 black 25%. */
  --input-shadow: inset 1px 1px 4px 0 rgba(255, 255, 255, 0.1), 1px 1px 4px 0 rgba(0, 0, 0, 0.25);

  /* Buttons: primary = --accent with --accent-ink text (theme.css). */
  --btn-secondary: #535862;
  --btn-secondary-hover: #636872;
  --btn-danger: #f04438;
  --btn-danger-hover: #d92d20;

  /* Tabs: grey track, orange active tab with white text. */
  --tab-track: #535862;
  --tab-shadow: 0 1px 3px rgba(10, 13, 18, 0.1), 0 1px 2px -1px rgba(10, 13, 18, 0.1);

  /* Glass badges and banners (Figma Badge / status containers): the tone at
     20% plus Figma's Glass effect — a thin edge lit at the top-left and
     bottom-right. Fill, dot colour per tone:
       online / available  #17b26a @ 20%, dot #17b26a
       offline / fault     #c0392b @ 20%, dot #ff0000
       active / busy       #e87400 @ 20%, dot #f89925
       neutral             #ffffff @ 5%                                        */
  --tone-ok: #17b26a;
  --tone-ok-dot: #17b26a;
  --tone-danger: #c0392b;
  --tone-danger-dot: #ff0000;
  --tone-accent: #e87400;
  --tone-accent-dot: #f89925;
  --glass-edge: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.55) 0%,
    rgba(255, 255, 255, 0) 40%,
    rgba(255, 255, 255, 0) 60%,
    rgba(255, 255, 255, 0.45) 100%
  );
}

/* Figma Glass on badges and pills. */
.glass {
  position: relative;
  /* Figma Glass over a tone at 20%: the body is a little darker towards the
     light (top-left) and a little lighter away from it */
  background:
    linear-gradient(to bottom right, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0) 50%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0.035)),
    color-mix(in srgb, var(--tone, #ffffff) var(--tone-fill, 20%), transparent);
  color: #fff;
}
/* The edge light. Without ui/glass.js: a gradient ring, bright at two corners. */
.glass::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--glass-edge);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}
/* With ui/glass.js (it sets data-rim and the three variables): the edge light
   as Figma draws it, a 1 px line on all four sides, brightest at the top-left
   corner, dark in the top-right and bottom-left corners. One small image,
   stretched round the box, so it fits any width. */
.glass[data-rim]::before {
  padding: 0;
  background: none;
  -webkit-mask: none;
  mask: none;
  border: var(--glass-rim-w) solid transparent;
  border-image: var(--glass-rim) var(--glass-rim-slice) stretch;
}

/* Figma notification box (the wide green / red message on "Charging Stations"):
   tone at 20%, radius 16, a 3 px bar of the tone down the left and right
   sides that follows the corners, a soft white glow inside the edge and a
   faint drop shadow. No edge line. */
.glassbox {
  position: relative;
  border-radius: 16px;
  background: color-mix(in srgb, var(--tone, #ffffff) var(--tone-fill, 20%), transparent);
  box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.1), inset 0 0 6.1px rgba(255, 255, 255, 0.25);
  color: #fff;
}
.glassbox::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: solid var(--dot, rgba(255, 255, 255, 0.4));
  border-width: 0 3px;
  pointer-events: none;
}

:is(.glass, .glassbox)[data-tone='ok'] { --tone: var(--tone-ok); --dot: var(--tone-ok-dot); }
:is(.glass, .glassbox)[data-tone='danger'] { --tone: var(--tone-danger); --dot: var(--tone-danger-dot); --ic: #f04438; }
:is(.glass, .glassbox)[data-tone='accent'] { --tone: var(--tone-accent); --dot: var(--tone-accent-dot); }
:is(.glass, .glassbox)[data-tone='warn'] { --tone: var(--warn); --dot: var(--warn); }
:is(.glass, .glassbox)[data-tone='info'] { --tone: var(--info); --dot: var(--info); }
:is(.glass, .glassbox)[data-tone='muted'] { --tone-fill: 5%; --dot: var(--text-muted); }

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  background: var(--page);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ---- App shell -------------------------------------------------------- */

.app {
  max-width: 1180px;
  margin: 0 auto;
  padding: var(--sp-6) var(--sp-5) var(--sp-7);
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

.topbar {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-right: auto;
}

.brand__mark {
  width: 38px;
  height: 38px;
  border-radius: 50%; /* round badge, like the onCharge logo */
  background: var(--accent);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 19px;
}

.brand__logo {
  height: 32px;
  width: auto;
  display: block;
}
.brand__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: 0.2px;
}

.brand__sub {
  font-size: 12px;
  color: var(--text-muted);
}

/* ---- Connection bar --------------------------------------------------- */

.connbar {
  background: var(--surface-1);
  border-radius: var(--r-card);
  box-shadow: var(--card-shadow);
  padding: var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: var(--r-pill);
  background: var(--dot, var(--text-faint));
  flex: none;
  transition: background 0.2s;
}
.status-dot[data-state='scanning'] {
  animation: pulse 1s infinite;
}
@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}

.conn-label {
  color: var(--text);
  font-weight: 500;
}
.conn-label small {
  color: var(--text-muted);
  font-weight: 400;
}

.connbar .spacer {
  margin-left: auto;
}

/* Adapter mode segmented control */
.segment {
  display: inline-flex;
  background: var(--tab-track);
  border-radius: 10px;
  padding: 4px;
  gap: 4px;
}
.segment button {
  appearance: none;
  background: transparent;
  color: #fff;
  border: 0;
  padding: 8px 12px;
  border-radius: 6px;
  font: inherit;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.15s;
}
.segment button[aria-pressed='true'] {
  background: var(--accent);
  box-shadow: var(--tab-shadow);
}

/* ---- Layout grid ------------------------------------------------------ */

.grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: var(--sp-5);
  align-items: start;
}
@media (max-width: 940px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

.column {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

/* ---- Panel = "dark box" ----------------------------------------------- */

.panel {
  background: var(--surface-1);
  border-radius: var(--r-card);
  padding: var(--sp-5);
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.panel__head {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
/* Liquid-glass pebble (from the OnCharge app: translucent white fill, frosted,
   with a specular top highlight). Used for section + card icons. */
/* Icon chip — clean dark tile, subtle depth, brand-orange icon.
   A thin top edge-light + gentle inner bottom shadow give quiet 3D depth
   (no glossy blobs, no color fringing). */
.panel__icon,
.pebble {
  border-radius: 12px;
  background: #2b2b2b;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09), /* thin top edge light */
    inset 0 -2px 3px rgba(0, 0, 0, 0.3), /* soft inner bottom shadow */
    0 1px 2px rgba(0, 0, 0, 0.3); /* gentle lift */
  color: var(--accent);
  display: grid;
  place-items: center;
  flex: none;
}
.panel__icon { width: 34px; height: 34px; }
.pebble { width: 32px; height: 32px; }
.chip__glow,
.chip__glass {
  display: none; /* legacy layers, unused */
}
.chip__ic {
  display: grid;
  place-items: center;
}
.panel__icon svg,
.pebble svg,
.chip__ic svg {
  display: block;
}
.panel__title {
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  color: var(--text-strong);
}
.panel__desc {
  font-size: 12px;
  line-height: 18px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* ---- Field (inside a "lighter box" card) ------------------------------ */

.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
}
.field {
  /* Transparent so inset inputs sit directly on the card, like the Figma design. */
  background: transparent;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field.col-span {
  grid-column: 1 / -1;
}
.field__label {
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: var(--label);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.field__key {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-faint);
  margin-left: auto;
}
.field__help {
  font-size: 11px;
  color: var(--text-muted);
}

/* Inputs — filled, no border, no outline */
input,
select,
textarea {
  appearance: none;
  width: 100%;
  background: var(--surface-3);
  color: var(--text-strong);
  border: 0;
  outline: 0;
  border-radius: var(--r-md);
  /* Figma input: 44 px tall = 10 + 24 + 10 */
  padding: 10px 14px;
  font: inherit;
  font-size: 16px;
  line-height: 24px;
  box-shadow: var(--input-shadow);
  transition: background 0.15s, box-shadow 0.15s;
}
input::placeholder,
textarea::placeholder {
  color: var(--text-faint);
}
input:focus,
select:focus,
textarea:focus {
  background: var(--surface-4);
  box-shadow: var(--input-shadow), var(--focus-ring);
}
input[aria-invalid='true'] {
  box-shadow: 0 0 0 2px var(--danger-dim);
}
select {
  cursor: pointer;
}
/* Multi-line input (pasted certificates): same box, monospace content. */
textarea {
  display: block;
  resize: vertical;
  min-height: 44px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 20px;
}

.field__error {
  font-size: 11px;
  color: var(--danger);
  min-height: 0;
}

.field__btns {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-top: 2px;
}
.field__btns .btn {
  padding: 5px 12px;
  font-size: 12px;
}

/* Secret input with reveal toggle */
.secret {
  position: relative;
}
.secret input {
  padding-right: 44px;
}
.secret button {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--r-sm);
  cursor: pointer;
}
.secret button:hover {
  color: var(--text-strong);
  background: var(--surface-4);
}

/* ---- Buttons ---------------------------------------------------------- */

.btn {
  appearance: none;
  border: 0;
  outline: 0;
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  line-height: 20px;
  padding: 10px 14px;
  border-radius: var(--r-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  /* Figma secondary button ("Cancel"): grey fill, white text */
  background: var(--btn-secondary);
  color: #fff;
  transition: 0.15s;
}
.btn:hover {
  background: var(--btn-secondary-hover);
}
.btn:focus-visible {
  box-shadow: var(--focus-ring);
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn--accent {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn--accent:hover {
  background: var(--accent-strong);
}
.btn--danger {
  background: var(--btn-danger);
  color: #fff;
}
.btn--danger:hover {
  background: var(--btn-danger-hover);
}
.btn--ghost {
  background: transparent;
  color: var(--text);
}
.btn--ghost:hover {
  background: var(--surface-2);
}
.btn--sm {
  padding: 8px 12px;
}

.panel__actions {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

/* ---- OCPP URL preview ------------------------------------------------- */

.preview {
  background: var(--surface-2);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.preview__label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.preview__value {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  word-break: break-all;
}

/* ---- Device list (scan results) -------------------------------------- */

.devices {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.device {
  background: var(--surface-2);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  cursor: pointer;
  transition: background 0.15s;
}
.device:hover {
  background: var(--surface-3);
}
.device__name {
  font-weight: 600;
  color: var(--text-strong);
}
.device__meta {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--mono);
}
.device .spacer {
  margin-left: auto;
}

/* ---- Sticky side column ---------------------------------------------- */

.side {
  position: sticky;
  top: var(--sp-5);
}

/* ---- Console / log ---------------------------------------------------- */

.console {
  background: var(--surface-1);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.console__head {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.console__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-strong);
}
.console__body {
  background: var(--surface-0);
  border-radius: var(--r-md);
  padding: var(--sp-3);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.log-line {
  display: flex;
  gap: var(--sp-3);
  white-space: pre-wrap;
  word-break: break-word;
}
.log-line__time {
  color: var(--text-faint);
  flex: none;
}
.log-line__msg {
  color: var(--text);
}
.log-line[data-level='ok'] .log-line__msg {
  color: var(--ok);
}
.log-line[data-level='warn'] .log-line__msg {
  color: var(--warn);
}
.log-line[data-level='error'] .log-line__msg {
  color: var(--danger);
}
.log-line[data-level='send'] .log-line__msg {
  color: var(--info);
}

/* ---- Small chips / result badges ------------------------------------- */

/* Figma Badge: 22 px tall, radius 6, Rubik Medium 12, glass. */
.chip {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  line-height: 18px;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 6px;
}

.muted {
  color: var(--text-muted);
}
.hide {
  display: none !important;
}

/* Prevent long URLs / values from forcing horizontal overflow anywhere. */
.setcard,
.field,
.checklist li,
.checklist__text {
  min-width: 0;
}
.setcard__current,
.checklist__value {
  word-break: break-all;
  overflow-wrap: anywhere;
}

/* ---- Mobile ----------------------------------------------------------- */
@media (max-width: 640px) {
  html,
  body {
    overflow-x: hidden;
  }
  .app {
    padding: var(--sp-4) var(--sp-3) var(--sp-6);
    gap: var(--sp-3);
  }
  .topbar {
    gap: var(--sp-2) var(--sp-3);
  }
  .brand {
    margin-right: 0;
  }
  .brand__logo {
    height: 28px;
  }
  .conn-pill {
    order: 3;
    width: 100%;
    min-width: 0;
    justify-content: center;
  }
  .conn-pill #connLabel {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  #modeSwitch {
    margin-left: auto;
  }
  .idcard {
    flex-wrap: wrap;
  }
  .idcard__actions {
    margin-left: 0;
    width: 100%;
  }
  .idcard__actions .btn {
    flex: 1;
    justify-content: center;
  }
  .idcard__serial {
    font-size: 21px;
    word-break: break-all;
  }
  .panel,
  .setcard,
  .idcard {
    padding: var(--sp-4);
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .fields {
    grid-template-columns: 1fr;
  }
  .btn--lg {
    padding: 14px 18px;
    font-size: 14px;
  }
  .hero {
    padding-top: var(--sp-4);
  }
  .hero__card {
    padding: var(--sp-6) var(--sp-4);
  }
}

/* ---- Connection badge (header) ---------------------------------------
   Green glass when connected / online, red glass when not, orange while
   searching or reconnecting. Tone comes from data-tone (set in the page
   scripts). */
.conn-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 18px;
  font-weight: 500;
}

/* ---- Big button ------------------------------------------------------- */
/* Figma button: 44 px tall = 10 + 24 + 10, Rubik SemiBold 16 */
.btn--lg {
  padding: 10px 16px;
  font-size: 16px;
  line-height: 24px;
  border-radius: var(--r-md);
  width: 100%;
  justify-content: center;
}

/* ---- Hero (disconnected) --------------------------------------------- */
.hero {
  display: flex;
  justify-content: center;
  padding-top: var(--sp-6);
}
.hero__card {
  background: var(--surface-1);
  border-radius: var(--r-card);
  padding: var(--sp-7) var(--sp-6);
  box-shadow: var(--card-shadow);
  max-width: 460px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  align-items: center;
}
.hero__icon {
  width: 68px;
  height: 68px;
  border-radius: var(--r-lg);
  background: var(--accent);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  font-size: 32px;
}
.hero__logo {
  width: 232px;
  max-width: 80%;
  height: auto;
  display: block;
}
.hero__title {
  margin: 0;
  font-size: 24px;
  color: var(--text-strong);
}
.hero__sub {
  margin: 0;
  color: var(--text-muted);
  max-width: 320px;
}
.hero__card .btn--lg {
  max-width: 320px;
}
.hero__card .devices {
  width: 100%;
  max-width: 340px;
}
.hero__hint {
  font-size: 12px;
  color: var(--text-faint);
  min-height: 16px;
}

/* ---- Workspace ------------------------------------------------------- */
.workspace {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.idcard {
  background: var(--surface-1);
  border-radius: var(--r-card);
  padding: var(--sp-5);
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}
.idcard__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
}
.idcard__serial {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-strong);
  font-family: var(--mono);
  letter-spacing: 0.5px;
  margin-top: 2px;
}
.idcard__meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}
.idcard__actions {
  margin-left: auto;
  display: flex;
  gap: var(--sp-2);
}

/* ---- Plain-language status line -------------------------------------- */
/* Message banner — Figma status container: tone at 20% + glass, radius 16. */
.statusline {
  border-radius: 16px;
  padding: var(--sp-3) var(--sp-4);
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
}

/* ---- One-tap program ------------------------------------------------- */
.program .checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.checklist li {
  background: var(--surface-2);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.checklist__tick {
  width: 22px;
  height: 22px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  color: var(--text-faint);
  display: grid;
  place-items: center;
  font-size: 12px;
  flex: none;
}
.checklist li[data-status='ok'] .checklist__tick {
  background: var(--accent);
  color: var(--accent-ink);
}
.checklist li[data-status='fail'] .checklist__tick {
  background: var(--danger-dim);
  color: var(--danger);
}
.checklist li[data-status='busy'] .checklist__tick {
  background: var(--warn);
  color: var(--accent-ink);
}
.checklist__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.checklist__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.checklist__value {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  word-break: break-all;
}

/* ---- Setting cards --------------------------------------------------- */
.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
}
@media (max-width: 720px) {
  .cards {
    grid-template-columns: 1fr;
  }
}
.setcard {
  background: var(--surface-1);
  border-radius: var(--r-card);
  padding: var(--sp-5);
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.setcard__title {
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  color: var(--text-strong);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.setcard__current {
  font-size: 11px;
  color: var(--text-muted);
}
.setcard__current b {
  color: var(--text);
  font-family: var(--mono);
  font-weight: 600;
}
/* Value confirmed by a real read from the charger. */
.setcard__current[data-read='ok'] b {
  color: var(--accent);
}
.setcard__current[data-read='none'] b {
  color: var(--warn);
}
.setcard__current[data-read='reading'] {
  color: var(--text-faint);
}
.setcard .btn {
  align-self: flex-start;
}

/* ---- Advanced (collapsible) ------------------------------------------ */
.advanced {
  background: var(--surface-1);
  border-radius: var(--r-card);
  box-shadow: var(--card-shadow);
  padding: var(--sp-4) var(--sp-5);
}
.advanced > summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
  font-size: 13px;
  list-style: none;
}
.advanced > summary::-webkit-details-marker {
  display: none;
}
.advanced > summary::before {
  content: '▸ ';
  color: var(--text-muted);
}
.advanced[open] > summary::before {
  content: '▾ ';
}
.advanced__body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  margin-top: var(--sp-4);
}
