/* ============================================================================
   Charging dashboard — builds on theme.css tokens + app.css components.
   Cards, tabs and badges follow the Figma values defined at the top of app.css.
   ========================================================================== */

/* Top-bar page links (shared with index.html's nav) */
.navlink {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
}
.navlink:hover { background: rgba(255, 255, 255, 0.08); }
.navlink[aria-current='page'] {
  background: var(--accent);
  box-shadow: var(--tab-shadow);
}

.inlink { color: var(--accent); text-decoration: none; font-weight: 600; }

/* ---- "Waiting for your charger" hero extras ------------------------------ */
.csmsrow {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  background: var(--surface-3);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
  margin: var(--sp-4) 0;
  flex-wrap: wrap;
}
.csmsrow__label { font-size: 12px; color: var(--text-faint); }
.csmsrow__url {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--accent);
  word-break: break-all;
  flex: 1;
  text-align: left;
}
.steps {
  text-align: left;
  margin: var(--sp-4) 0 0;
  padding-left: 20px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.9;
}

/* ---- charger card ---------------------------------------------------------- */
.chargercard {
  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);
  margin-bottom: var(--sp-5);
}
.chargercard .idcard { background: none; box-shadow: none; border-radius: 0; padding: 0; margin: 0; }

/* online = Figma green, offline = Figma red */
.onlinedot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--tone-danger-dot);
}
.onlinedot[data-on='1'] {
  background: var(--tone-ok-dot);
  box-shadow: 0 0 10px rgba(23, 178, 106, 0.6);
}
.lastseen { font-size: 12px; color: var(--text-faint); margin-right: var(--sp-2); }

/* status pill — a Figma glass badge (see .glass in app.css): tone at 20%, white
   label, tone-coloured dot. The label always carries the words. */
.statuspill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 20px;
  font-weight: 500;
}
.statuspill__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dot, #fff); }
.statuspill[data-tone='accent'] .statuspill__dot { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.statuspill__err { color: #ffb4ad; font-weight: 400; }

/* ---- live stat tiles -------------------------------------------------------- */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: var(--sp-3);
}
.tile {
  background: var(--surface-2);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
}
.tile__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 4px;
}
.tile__value { display: flex; align-items: baseline; gap: 5px; }
.tile__num {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
}
.tile__unit { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.tile--hero { grid-row: span 1; background: var(--surface-3); }
.tile--hero .tile__num { font-size: 40px; color: var(--accent); }

/* ---- actions ------------------------------------------------------------------ */
.chargeactions {
  display: flex;
  gap: var(--sp-3);
  align-items: center;
  flex-wrap: wrap;
}
.chargeactions .btn--lg { width: auto; min-width: 220px; }

/* ---- sessions table ------------------------------------------------------------ */
.sessions { overflow-x: auto; }
.sesh { width: 100%; border-collapse: collapse; font-size: 14px; }
.sesh th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: var(--sp-2) var(--sp-3);
}
.sesh td { padding: var(--sp-3); color: var(--text); }
.sesh tbody tr { background: var(--surface-2); }
.sesh tbody tr td:first-child { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.sesh tbody tr td:last-child { border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.sesh tbody tr:nth-child(even) { background: transparent; }
.sesh b { color: var(--text-strong); }

/* ---- config list ------------------------------------------------------------------ */
.cfglist {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 320px;
  overflow: auto;
  background: var(--surface-3);
  border-radius: var(--r-md);
  padding: var(--sp-3);
  margin: var(--sp-3) 0;
}
.cfgrow {
  display: flex;
  gap: var(--sp-3);
  align-items: baseline;
  font-family: var(--mono);
  font-size: 12px;
}
.cfgrow__key { color: var(--text-muted); min-width: 220px; }
.cfgrow__val { color: var(--text-strong); word-break: break-all; flex: 1; }
.cfgrow__ro { color: var(--text-faint); font-size: 10px; }

/* Program-target switch on the setup page */
.segment--target { margin-bottom: var(--sp-3); align-self: flex-start; }
