/* ===== Oxygen design tokens =====
   Type: Inter for everything (UI, body, figures with tabular numbers); Inter Display for page titles.
   Colour: black and white, one red accent; status colours only mean status. */
@font-face { font-family: "Inter"; src: url("fonts/Inter-Regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-Italic.woff") format("woff"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-Medium.woff") format("woff"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-SemiBold.woff") format("woff"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-Bold.woff") format("woff"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("fonts/InterDisplay-SemiBold.woff") format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("fonts/InterDisplay-Bold.woff") format("woff"); font-weight: 700; font-display: swap; }

/* Two themes, chosen per person with the switch in the top bar (saved in a cookie): white (default) and charcoal.
   Red is the one accent: buttons, the active page, focus. Status colours only ever mean status. */
:root, :root[data-theme="light"] {
  color-scheme: light;
  --page: #f6f6f6;
  --surface: #fafafa;
  --card: #ffffff;
  --ink: #000000;
  --ink-2: #3d3d3d;
  --muted: #6e6e6e;
  --grid: #ececec;
  --axis: #cfcfcf;
  --border: #e2e2e2;
  --accent: #d71920;        /* signal red */
  --accent-ink: #b3121a;
  --accent-wash: #fce8e9;
  --s1: #2a6fdb; --s2: #e5732a; --s3: #1f9d74; --s4: #b04ad6; --s5: #c99400; --s6: #d63864;   /* report series, validated */
  --good: #12a150;
  --good-ink: #0a7a3b;
  --warning: #f2a91c;
  --serious: #e5734a;
  --critical: #b3121a;
  --neutral-wash: #efefef;
  --navy: #000000;          /* photo panels are black in both themes */
  --radius: 12px;
  --radius-sm: 8px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Inter Display", "Inter", system-ui, sans-serif;
  font-family: var(--font);
  font-feature-settings: "cv11", "ss01";
}
:root[data-theme="dark"] {      /* soft dark: charcoal, not pure black */
  color-scheme: dark;
  --page: #141414;
  --surface: #1a1a1a;
  --card: #1c1c1c;
  --ink: #f2f2f2;
  --ink-2: #c9c9c9;
  --muted: #929292;
  --grid: #2a2a2a;
  --axis: #3a3a3a;
  --border: #2e2e2e;
  --accent: #e5232b;
  --accent-ink: #ff6b70;
  --accent-wash: #3a1416;
  --s1: #4f8ff0; --s2: #d0661e; --s3: #24a07a; --s4: #b65ce0; --s5: #a88000; --s6: #e0507a;
  --good-ink: #3fcf7d;
  --critical: #ff6b70;
  --neutral-wash: #262626;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); font-size: 14.5px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button, input, select, textarea { font-family: var(--font); }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
h1 { font-family: var(--font-display); font-size: 26px; line-height: 1.2; margin: 0; font-weight: 700; letter-spacing: -0.015em; }
h2 { font-family: var(--font-display); font-size: 17px; line-height: 1.3; margin: 0 0 12px; font-weight: 600; letter-spacing: -0.005em; }
.muted { color: var(--muted); }
.ink2 { color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
/* IDs (ICCID, MSISDN, IMEI) in the same family as everything else, figures aligned */
.mono { font-family: var(--font); font-variant-numeric: tabular-nums; letter-spacing: 0.01em; font-size: 13px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* top bar */
.topbar { display: flex; align-items: center; gap: 16px; padding: 12px 24px; background: var(--card);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.brand { font-weight: 700; display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand .dot { width: 10px; height: 10px; border-radius: 3px; background: var(--accent); }
.topbar nav { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.topbar form { margin: 0; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent-ink); cursor: pointer; font: inherit; }

main { max-width: 1400px; margin: 0 auto; padding: 20px 24px 48px; }
.pagehead { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 24px; margin-bottom: 18px; }
.pagehead .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 960px) { .grid2 { grid-template-columns: 1fr; } }

/* buttons + inputs */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--card); color: var(--ink); font: inherit; cursor: pointer;
  text-decoration: none; }
.btn:hover { background: var(--neutral-wash); text-decoration: none; }
.btn.primary { background: var(--accent); color: #fff; border-color: transparent; }
.btn.primary:hover { background: var(--accent-ink); }
.btn.danger { color: var(--critical); }
.btn.sm { padding: 4px 8px; font-size: 12.5px; }
input, select { font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--axis);
  border-radius: 8px; padding: 7px 10px; }
input:focus, select:focus, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
label { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 4px; }

/* flash */
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; border: 1px solid var(--border); }
.flash.error { border-left: 4px solid var(--critical); }
.flash.ok { border-left: 4px solid var(--good); }

/* KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.kpi { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px;
  color: var(--ink); display: block; }
a.kpi:hover { text-decoration: none; border-color: var(--accent); }
a.kpi.active { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.kpi .label { font-size: 12.5px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.kpi .value { font-size: 26px; font-weight: 650; margin-top: 4px; }
.kpi .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* status chips: icon + label, never colour alone */
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 2px 8px; border-radius: 999px;
  background: var(--neutral-wash); color: var(--ink-2); white-space: nowrap; margin: 1px 2px 1px 0; }
.icon { display: inline-block; width: 9px; height: 9px; flex: none; }
.icon.warning { background: var(--warning); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.icon.serious { background: var(--serious); border-radius: 50%; }
.icon.neutral { border: 1.5px solid var(--muted); border-radius: 50%; }
.icon.good { background: var(--good); border-radius: 2px; }
.icon.critical { background: var(--critical); transform: rotate(45deg); }

/* customer bars */
.bars { list-style: none; margin: 0; padding: 0; }
.bars li { display: grid; grid-template-columns: 170px 1fr 92px; align-items: center; gap: 10px;
  padding: 4px 6px; border-radius: 6px; position: relative; }
.bars li:hover { background: var(--neutral-wash); }
.bars li a { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bars .track { height: 14px; position: relative; border-left: 1px solid var(--axis); }
.bars .fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); border-radius: 0 4px 4px 0; min-width: 2px; }
.bars .val { font-variant-numeric: tabular-nums; text-align: right; color: var(--ink-2); font-size: 12.5px; }
.bars .sims { font-size: 11.5px; color: var(--muted); }

/* tooltip */
.tip { position: fixed; pointer-events: none; background: var(--ink); color: var(--page); padding: 6px 9px;
  border-radius: 6px; font-size: 12px; line-height: 1.35; z-index: 50; display: none; white-space: pre; }

/* trend */
.trend svg { width: 100%; height: 220px; display: block; overflow: visible; }
.trend .gridline { stroke: var(--grid); stroke-width: 1; }
.trend .baseline { stroke: var(--axis); stroke-width: 1; }
.trend .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.trend .pt { fill: var(--accent); stroke: var(--card); stroke-width: 2; }
.trend text { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.trend .cross { stroke: var(--axis); stroke-width: 1; display: none; }
.emptychart { height: 220px; display: grid; place-items: center; text-align: center; color: var(--muted);
  border: 1px dashed var(--axis); border-radius: 8px; padding: 20px; }

/* filters + table */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 12px; }
.filters .grow { flex: 1 1 220px; }
.filters input[type=search] { width: 100%; }
.tablewrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
table { border-collapse: collapse; width: 100%; }
th, td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--grid); vertical-align: middle; }
th { font-size: 12px; font-weight: 600; color: var(--ink-2); background: var(--surface); position: sticky; top: 0; white-space: nowrap; }
tbody tr:hover { background: var(--neutral-wash); }
tbody tr:last-child td { border-bottom: 0; }
.cust { font-size: 12px; color: var(--muted); }
.meter { display: flex; align-items: center; gap: 8px; min-width: 150px; }
.meter .m { flex: 1; height: 6px; background: var(--neutral-wash); border-radius: 3px; overflow: hidden; }
.meter .m span { display: block; height: 100%; background: var(--ink-2); border-radius: 3px; }
.meter .m span.low { background: var(--warning); }
.meter small { font-variant-numeric: tabular-nums; color: var(--ink-2); min-width: 70px; text-align: right; }

/* detail */
.kv { display: grid; grid-template-columns: 220px 1fr; gap: 0; }
.kv div { padding: 6px 0; border-bottom: 1px solid var(--grid); }
.kv div:nth-child(odd) { color: var(--ink-2); }
details summary { cursor: pointer; font-weight: 600; margin-bottom: 8px; }

/* login */
.loginwrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.loginbox { width: 100%; max-width: 360px; }
.loginbox .card { padding: 28px; }
.loginbox h1 { margin-bottom: 4px; }
.loginbox form > div { margin-bottom: 14px; }
.loginbox input { width: 100%; }
.loginbox .btn { width: 100%; justify-content: center; padding: 9px; }

/* ---- brand + nav ---- */
.brand { gap: 10px; }
.brand span small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: .02em; }
.brand span { line-height: 1.15; }
.mark { display: inline-flex; align-items: flex-end; gap: 2px; height: 22px; }
.mark i { display: block; width: 5px; border-radius: 2px; background: var(--accent); }
.mark i:nth-child(1) { height: 9px; opacity: .55; } .mark i:nth-child(2) { height: 15px; opacity: .8; } .mark i:nth-child(3) { height: 22px; }
.brand.big { justify-content: center; margin-bottom: 18px; font-size: 18px; font-weight: 700; }
.brand.big .mark { height: 30px; } .brand.big .mark i { width: 7px; }
.custtag { font-size: 12.5px; padding: 3px 10px; border-radius: 999px; background: var(--neutral-wash); color: var(--ink-2); }
.topbar nav a { color: var(--ink-2); padding: 4px 2px; border-bottom: 2px solid transparent; }
.topbar nav a.on { color: var(--ink); border-bottom-color: var(--accent); text-decoration: none; }
.topbar nav a:hover { text-decoration: none; color: var(--ink); }
.foot { max-width: 1400px; margin: 0 auto; padding: 0 24px 28px; color: var(--muted); font-size: 12.5px; }

/* ---- live panel + actions ---- */
.livehead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.kpis.inner { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; }
@media (max-width: 900px) { .kpis.inner { grid-template-columns: repeat(2, 1fr); } }
.kpis.inner .kpi { background: var(--surface); }
.sk { height: 26px; width: 60%; border-radius: 6px; background: var(--neutral-wash); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }
.chip.big { font-size: 14px; padding: 3px 10px; vertical-align: middle; }
.chip.big .icon { width: 10px; height: 10px; }
.meter.big { min-width: 0; margin: 6px 0 2px; } .meter.big .m { height: 8px; }
.actrow { display: flex; flex-wrap: wrap; gap: 8px; }
.soon { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; background: var(--neutral-wash); padding: 1px 6px; border-radius: 4px; color: var(--muted); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.dangerfill { background: var(--critical); color: #fff; border-color: transparent; }
#actResult { margin: 14px 0 0; }
.netsec h3 { font-size: 13px; margin: 4px 0 6px; }
.netsec + .netsec { margin-top: 12px; }
dialog { border: 1px solid var(--border); border-radius: 12px; padding: 22px; max-width: 420px; background: var(--card); color: var(--ink); }
dialog::backdrop { background: rgba(0, 0, 0, .35); }
.dlgbtns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

/* ---- admin bits ---- */
.stack > div { margin-bottom: 12px; } .stack input { width: 100%; }
.plist { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.plist li { background: var(--neutral-wash); border-radius: 6px; padding: 3px 8px; display: flex; gap: 8px; align-items: center; }
.linkbtn.danger { color: var(--critical); font-size: 12px; }
.grid2 { margin-bottom: 16px; }
[hidden] { display: none !important; }

/* ---- phones ---- */
@media (max-width: 700px) {
  .topbar { flex-wrap: wrap; padding: 10px 14px; gap: 6px 12px; }
  .topbar .custtag, .topbar nav a.muted { display: none; }
  .topbar nav { margin-left: 0; width: 100%; gap: 14px; overflow-x: auto; }
  .brand span small { display: none; }
  main { padding: 14px 14px 32px; }
  h1 { font-size: 18px; }
  .kpi .value { font-size: 21px; }
  .kpi { padding: 12px; }
  .pagehead .actions { margin-left: 0; }
  .bars li { grid-template-columns: 110px 1fr 70px; }
  .kv { grid-template-columns: 130px 1fr; }
  .foot { padding: 0 14px 24px; }
}

/* ---- IOtConnect brand: black & white; blue is kept for charts and links only ---- */
:root { --brand: var(--accent); --brand-hover: var(--accent-ink); --on-brand: #ffffff; }
.btn.primary { background: var(--brand); color: var(--on-brand); }
.btn.primary:hover { background: var(--brand-hover); }
.topbar nav a.on { border-bottom-color: var(--brand); }
input:focus, select:focus, .btn:focus-visible { outline-color: var(--brand); }
a.kpi:hover, a.kpi.active { border-color: var(--brand); }
a.kpi.active { box-shadow: inset 0 0 0 1px var(--brand); }
.brand { gap: 12px; }
.brand .logo { height: 24px; width: auto; display: block; }
.brand .portal { font-size: 13px; color: var(--ink-2); padding-left: 12px; border-left: 1px solid var(--axis); line-height: 20px; }
.dark-only { display: none !important; }
[data-theme="dark"] .light-only { display: none !important; } [data-theme="dark"] .dark-only { display: block !important; }
.loginlogo { text-align: center; margin-bottom: 22px; }
.loginlogo img { width: 230px; max-width: 80%; height: auto; margin: 0 auto; }
.loginbox h1 { font-size: 19px; }
@media (max-width: 700px) { .brand .logo { height: 20px; } .brand .portal { display: none; } }

/* ---- accounts page ---- */
.accthead { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.accttools { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.accttools form { display: flex; gap: 14px; align-items: center; margin: 0; }
.switch { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; color: var(--ink); cursor: pointer; }
.switch input { width: 16px; height: 16px; accent-color: var(--brand); }
.acct.off { opacity: .6; }

/* ---- requests + bulk ---- */
.kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.kpis.inner { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
th.chk, td.chk { width: 34px; padding-right: 0; }
td.chk input, th.chk input { width: 16px; height: 16px; accent-color: var(--brand); }
.bulkbar { position: sticky; bottom: 12px; margin-top: 12px; display: flex; gap: 10px; align-items: center;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px;
  box-shadow: 0 6px 24px rgba(0,0,0,.12); width: fit-content; }
.bulkbar span { font-weight: 600; margin-right: 6px; }
.badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--critical);
  color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-weight: 600; }
.tabs { display: flex; gap: 4px; margin-bottom: 12px; flex-wrap: wrap; }
.tabs a { padding: 6px 12px; border-radius: 8px; color: var(--ink-2); border: 1px solid transparent; }
.tabs a.on { background: var(--card); border-color: var(--border); color: var(--ink); font-weight: 600; }
.tabs a:hover { text-decoration: none; background: var(--neutral-wash); }
.tabs .count { font-size: 11.5px; color: var(--muted); margin-left: 2px; }
.rowform { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 0; }
.rowform select, .rowform input[name=note] { padding: 4px 8px; font-size: 12.5px; }
.rowform input[name=note] { width: 150px; }
.optgroup { margin-bottom: 12px; }
.optgroup .label { font-size: 12.5px; color: var(--ink-2); margin-bottom: 6px; font-weight: 600; }
.opt { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px;
  margin-bottom: 6px; cursor: pointer; color: var(--ink); font-size: 14px; }
.opt:hover { background: var(--neutral-wash); }
.opt input { accent-color: var(--brand); width: 16px; height: 16px; margin: 0; }
.opt .price { margin-left: auto; color: var(--ink-2); font-size: 13px; }
.opt:has(input:checked) { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
textarea { font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--axis); border-radius: 8px;
  padding: 8px 10px; width: 100%; resize: vertical; }

/* ---- locate ---- */
.locgrid { display: grid; grid-template-columns: 1fr 320px; gap: 16px; }
@media (max-width: 900px) { .locgrid { grid-template-columns: 1fr; } }
.map { height: 360px; border-radius: 8px; border: 1px solid var(--border); background: var(--neutral-wash); }
.lochist { max-height: 360px; overflow: auto; }
.lochist td { padding: 6px 8px; font-size: 13px; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--neutral-wash); }
#locMsg { margin-bottom: 12px; }
.billwarn { border-left: 4px solid var(--warning); background: var(--neutral-wash); padding: 10px 12px; border-radius: 6px; color: var(--ink); font-size: 13.5px; }

/* ---- Oxygen (powered by IOtConnect) ---- */
.brand .appname { font-size: 20px; font-weight: 750; letter-spacing: -.01em; color: var(--ink); }
.brand .powered { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 500; color: var(--muted);
  padding-left: 12px; border-left: 1px solid var(--axis); }
.brand .powered .logo { height: 16px; }
.brand:hover { text-decoration: none; }
@media (max-width: 700px) { .brand .powered { display: none; } }
.loginname { text-align: center; font-size: 34px; font-weight: 750; letter-spacing: -.02em; margin-bottom: 4px; }
.loginlogo { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; }
.loginlogo img { max-height: 34px; }
.hero { position: relative; border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; min-height: 200px;
  background-color: #0b0b0b; background-size: cover; background-position: center right; color: #fff; display: flex; align-items: center; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.72) 0%, rgba(0,0,0,.45) 45%, rgba(0,0,0,0) 80%); }
.herotext { position: relative; padding: 28px 32px; max-width: 560px; }
.hero .eyebrow { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
.hero h1 { font-size: 28px; color: #fff; margin: 4px 0 6px; }
.hero p { margin: 0 0 14px; color: rgba(255,255,255,.9); }
.hero .small { font-size: 12.5px; color: rgba(255,255,255,.7); }
.hero .btn.primary { background: #fff; color: #0b0b0b; }
.hero .btn.primary:hover { background: #e6e5e0; }
@media (max-width: 700px) { .hero { min-height: 160px; } .herotext { padding: 20px; } .hero h1 { font-size: 22px; } }
td.simcell .ids { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
td.simcell .ids { white-space: nowrap; }
.brand .applogo { height: 26px; width: auto; display: block; }
.loginname img { height: 56px; width: auto; display: block; margin: 0 auto 6px; }
.hero .herologo { height: 30px; width: auto; display: block; margin-bottom: 10px; }
@media (max-width: 700px) { .brand .applogo { height: 22px; } .hero .herologo { height: 24px; } }
.flash.info { border-left: 4px solid var(--ink-2); }
.cigrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-top: 12px; }
.cigrid label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.cigrid label.wide { grid-column: 1 / -1; }
.cigrid input, .cigrid textarea { font: inherit; color: var(--ink); }
td.simcell .client { font-size: 12.5px; margin-top: 2px; }
td.simcell .reg { font-variant-numeric: tabular-nums; font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em; padding: 1px 5px; border: 1px solid var(--axis); border-radius: 4px; }
.steps2fa { padding-left: 20px; } .steps2fa li { margin-bottom: 18px; line-height: 1.55; }
.steps2fa .qr { margin: 10px 0; width: 200px; background: #fff; padding: 6px; border-radius: 8px; }
.steps2fa .qr svg { width: 100%; height: auto; display: block; }
.setupkey { font-size: 17px; letter-spacing: .08em; padding: 8px 12px; margin: 8px 0 4px; display: inline-block;
  border: 1px dashed var(--axis); border-radius: 8px; background: var(--bg, transparent); user-select: all; }
.codeform { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
/* ---- Help page ---- */
.helptop { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.helptop .applogo { height: 28px; width: auto; }
.helpwrap { display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: start; }
.helptoc { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px;
  border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.helptoc strong { margin-bottom: 4px; }
.helpbody { max-width: 760px; line-height: 1.6; }
.helpbody section { border-bottom: 1px solid var(--border); padding: 4px 0 18px; margin-bottom: 18px; scroll-margin-top: 16px; }
.helpbody h2 { margin: 8px 0 10px; }
.helpbody li { margin-bottom: 4px; }
.helptable { border-collapse: collapse; width: 100%; margin: 8px 0 12px; font-size: 13.5px; }
.helptable th, .helptable td { text-align: left; vertical-align: top; padding: 7px 10px; border-bottom: 1px solid var(--border); }
.helptable th { color: var(--muted); font-weight: 600; }
.helpbody .helptip { border-left: 4px solid var(--accent); padding: 6px 12px; }
.faq dt { font-weight: 600; margin-top: 10px; } .faq dd { margin: 2px 0 0; }
.rolepart { border: 1px solid var(--border); border-radius: 10px; padding: 4px 18px 14px !important; }
@media (max-width: 800px) { .helpwrap { grid-template-columns: 1fr; } .helptoc { position: static; } }
@media print { .topbar, .helptoc, .foot, [data-print], .helptop .btn { display: none !important; } .helpwrap { display: block; }
  .helpbody section { break-inside: avoid; } }

/* =====================================================================
   Oxygen design layer (Nov 2026). Loaded last, so it sets the final look.
   One family (Inter / Inter Display), black and white, one red accent, black-and-white photos.
   ===================================================================== */

/* page frame */
main { padding: 28px 28px 56px; }
.pagehead { margin-bottom: 22px; }
.pagehead .muted { margin-top: 4px; }

/* top bar: quiet white strip, active page marked by a teal rule */
.topbar { background: var(--card); border-bottom: 1px solid var(--border); padding: 0 28px; min-height: 60px; gap: 20px; }
.topbar nav { gap: 4px; align-self: stretch; }
.topbar nav > a { color: var(--ink-2); font-weight: 500; font-size: 14px; padding: 0 10px; display: flex; align-items: center;
  align-self: stretch; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.topbar nav > a:hover { color: var(--ink); text-decoration: none; background: var(--surface); }
.topbar nav > a.on { color: var(--ink); border-bottom-color: var(--accent); }
.topbar nav form { display: flex; align-items: center; padding-left: 8px; }
.topbar .linkbtn { font-weight: 500; }
.brand .applogo { height: 24px; }
.brand .powered { color: var(--muted); }
.custtag { background: var(--accent-wash); color: var(--accent-ink); font-weight: 600; font-size: 12px; padding: 3px 10px; border-radius: 999px; }
.badge { background: var(--critical); color: #fff; font-weight: 600; }

/* surfaces */
.card { border-radius: var(--radius); padding: 20px 22px; border: 1px solid var(--border); background: var(--card); }
.card h2 { margin-bottom: 14px; }

/* buttons */
.btn { font-weight: 500; padding: 8px 14px; border-radius: var(--radius-sm); border: 1px solid var(--axis); background: var(--card);
  color: var(--ink); line-height: 1.25; transition: background-color .12s, border-color .12s; }
.btn:hover { background: var(--neutral-wash); border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: #a8121a; border-color: #a8121a; }
.btn.danger { color: var(--critical); }
.btn.sm { padding: 5px 10px; font-size: 13px; }

/* fields */
input, select, textarea { font-size: 14.5px; border: 1px solid var(--axis); border-radius: var(--radius-sm); padding: 8px 11px;
  background: var(--card); color: var(--ink); transition: border-color .12s, box-shadow .12s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
label { font-size: 13px; font-weight: 500; color: var(--ink-2); margin-bottom: 5px; }
input::placeholder, textarea::placeholder { color: var(--muted); }

/* messages */
.flash { border-radius: var(--radius-sm); background: var(--card); border: 1px solid var(--border); }

/* figures: the numbers are the content, so they get the display face and aligned digits */
.kpi { border-radius: var(--radius); padding: 16px 18px; border: 1px solid var(--border); }
a.kpi:hover { border-color: var(--accent); background: var(--surface); }
.kpi .label { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.kpi .value { font-family: var(--font-display); font-size: 30px; font-weight: 700; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; margin-top: 6px; line-height: 1.1; }
.kpi .sub { font-size: 12.5px; margin-top: 4px; }

/* tables */
table { font-variant-numeric: tabular-nums; }
th { font-size: 12.5px; font-weight: 600; color: var(--ink-2); background: var(--surface); border-bottom: 1px solid var(--border);
  text-transform: none; letter-spacing: 0; }
td { border-bottom: 1px solid var(--grid); }
tbody tr:hover { background: var(--surface); }
.tablewrap { border-radius: var(--radius); border: 1px solid var(--border); background: var(--card); }
td.simcell a { font-weight: 600; }

/* chips + meters */
.chip { font-size: 12px; font-weight: 500; padding: 3px 9px; background: var(--neutral-wash); color: var(--ink-2); }
.meter .m { background: var(--grid); }
.bars .fill { background: var(--ink-2); }

/* ---- dashboard banner: any photo becomes black and white, so mixed photos still look like one set ---- */
.hero { background-color: #000; background-blend-mode: luminosity; border: 1px solid var(--border); background-size: cover; background-position: center;
  border-radius: 16px; min-height: 230px; margin-bottom: 20px; }
.hero::before { background: linear-gradient(100deg, rgba(0,0,0,.94) 0%, rgba(0,0,0,.78) 40%, rgba(0,0,0,.25) 80%, rgba(0,0,0,.1) 100%); }
.herotext { padding: 34px 38px; max-width: 600px; }
.hero .herologo { height: 26px; margin-bottom: 18px; }
.hero h1 { font-size: 34px; letter-spacing: -0.02em; margin: 0 0 8px; }
.hero p { font-size: 15.5px; color: rgba(255,255,255,.88); }
.hero .small { font-size: 13px; color: rgba(255,255,255,.66); }
.hero .btn.primary { background: #fff; border-color: #fff; color: var(--navy); font-weight: 600; }
.hero .btn.primary:hover { background: #e6e6e6; border-color: #e6e6e6; }
@media (max-width: 700px) { .herotext { padding: 24px 22px; } .hero h1 { font-size: 26px; } }

/* ---- sign-in: photo panel + form panel ---- */
.authsplit { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(420px, 1fr); }
.authart { position: relative; background-color: #000; background-blend-mode: luminosity; background-size: cover;
  background-position: center; }
.authart::before { content: ""; position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(0,0,0,.85) 0%, rgba(0,0,0,.55) 50%, rgba(0,0,0,.35) 100%); }
.authart-inner { position: relative; padding: 44px 52px; }
.authlogo { height: 44px; width: auto; display: block; }
.authpanel { position: relative; display: grid; place-items: center; padding: 48px 40px 120px; background: var(--card); }
.authbox { width: 100%; max-width: 380px; }
.authbox h1 { font-size: 30px; line-height: 1.15; margin: 0 0 10px; }
.authintro { margin: 0 0 28px; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.authform > div { margin-bottom: 18px; }
.authform input { width: 100%; padding: 11px 12px; }
.authform .btn { width: 100%; justify-content: center; padding: 12px; font-size: 15px; margin-top: 8px; }
.authform .codeinput { font-size: 24px; letter-spacing: .35em; text-align: center; font-variant-numeric: tabular-nums; }
.authfoot { margin-top: 28px; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.authfoot p { margin: 0 0 4px; }
.authpowered { position: absolute; right: 40px; bottom: 36px; display: flex; align-items: center; gap: 14px;
  font-size: 14px; color: var(--muted); }
.authpowered img { height: 44px; width: auto; }
@media (max-width: 900px) {
  .authsplit { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .authart-inner { padding: 28px 24px 56px; }
  .authlogo { height: 34px; }
  .authpanel { padding: 36px 24px 110px; }
  .authpowered { right: 50%; transform: translateX(50%); bottom: 28px; }
  .authpowered img { height: 36px; }
}

/* help page header */
.helpbody h2 { font-size: 20px; }
.authform textarea { width: 100%; padding: 10px 12px; resize: vertical; }
.authwide { width: 100%; justify-content: center; padding: 12px; font-size: 15px; }

/* theme switch */
.themetoggle { background: none; border: 1px solid var(--border); border-radius: 999px; width: 34px; height: 34px; padding: 0;
  display: inline-grid; place-items: center; color: var(--ink-2); cursor: pointer; align-self: center; margin: 0 4px; }
.themetoggle:hover { color: var(--ink); border-color: var(--muted); }
.themetoggle svg { width: 17px; height: 17px; }
[data-theme="dark"] .themetoggle .sun, :root:not([data-theme="dark"]) .themetoggle .moon { display: block; }
.themetoggle .sun, .themetoggle .moon { display: none; }
.authpanel .themetoggle { position: absolute; top: 24px; right: 28px; }

/* bundle bars: colour by what is left (green > 50%, yellow 26-50%, orange 11-25%, red 10% or less) */
.meter .m span.lvl-green { background: #22a95b; }
.meter .m span.lvl-yellow { background: #f2c230; }
.meter .m span.lvl-orange { background: #f28a1c; }
.meter .m span.lvl-red { background: #e5232b; }
/* names in tables stay white/black; red only on hover, so red keeps meaning "accent" */
td.simcell a, table td a { color: var(--ink); }
td.simcell a:hover, table td a:hover { color: var(--accent-ink); }

/* ===== Concept "Paper & signal": white pages, black ink, one black brand band, red signal ===== */
.topbar { background: #0f0f0f; border-bottom: 3px solid var(--accent); color: #fff; }
.topbar nav > a { color: #bdbdbd; }
.topbar nav > a:hover { color: #fff; background: #1d1d1d; }
.topbar nav > a.on { color: #fff; border-bottom-color: var(--accent); }
.topbar nav > a.muted { color: #bdbdbd; }
.topbar .linkbtn { color: #ff6b70; }
.topbar .themetoggle { border-color: #3a3a3a; color: #d0d0d0; }
.topbar .themetoggle:hover { color: #fff; border-color: #6a6a6a; }
.brand .powered { color: #9a9a9a; border-left-color: #3a3a3a; }
.custtag { background: rgba(229,35,43,.16); color: #ff8a8f; }
.topbar .badge { background: var(--accent); }
/* page titles carry a short red signal mark */
.pagehead h1::before { content: ""; display: block; width: 28px; height: 3px; background: var(--accent); margin-bottom: 12px; border-radius: 2px; }
.hero h1::before, .authbox h1::before { content: none; }

/* artwork supplied by IOtConnect is shown in full colour, not tinted */
.hero.has-art { background-blend-mode: normal; background-color: #000c1c; background-size: cover; background-position: right center;
  aspect-ratio: 3 / 1; min-height: 0; border-color: #0b1a2b; }
.hero.has-art::before { background: linear-gradient(90deg, rgba(0,12,28,.9) 0%, rgba(0,12,28,.55) 30%, rgba(0,12,28,0) 52%); }
.authart.has-art { background-blend-mode: normal; background-color: #000; background-size: contain; background-repeat: no-repeat;
  background-position: center; min-height: 320px; }
.authart.has-art::before { content: none; }
@media (max-width: 900px) {
  .hero.has-art { aspect-ratio: auto; min-height: 240px; background-position: 78% center; }
  .hero.has-art::before { background: linear-gradient(90deg, rgba(0,12,28,.92) 0%, rgba(0,12,28,.75) 60%, rgba(0,12,28,.35) 100%); }
  .authart.has-art { min-height: 0; aspect-ratio: 1 / 1; max-height: 60vh; }
}

/* Network type bars on a SIM's live Network tile (connection type, not signal strength) */
.netrow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.netgen { display: inline-flex; align-items: flex-end; gap: 7px; cursor: help; }
.netbars { display: inline-flex; align-items: flex-end; gap: 3px; height: 20px; }
.netbars .b { width: 5px; border-radius: 1.5px; background: var(--border); }
.netbars .b:nth-child(1) { height: 25%; }
.netbars .b:nth-child(2) { height: 50%; }
.netbars .b:nth-child(3) { height: 75%; }
.netbars .b:nth-child(4) { height: 100%; }
.netbars .b.on { background: #22a95b; }
.netbars.off .b.on { background: var(--muted); }
.netlabel { font-weight: 600; font-size: 15px; line-height: 1; color: var(--ink); }

.cigrid input.upper { text-transform: uppercase; }
.cigrid input.upper::placeholder { text-transform: none; }

/* Collapsible blocks on a SIM's page */
.ctoggle { flex: none; width: 30px; height: 30px; margin-left: 4px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--card); cursor: pointer; position: relative; }
.ctoggle::before { content: ""; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; border: solid var(--ink-2);
  border-width: 0 2px 2px 0; transform: translate(-50%, -70%) rotate(45deg); }
.card.collapsed .ctoggle::before { transform: translate(-70%, -50%) rotate(-45deg); }
.ctoggle:hover { border-color: var(--ink-2); }
.ctoggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.chead { cursor: pointer; }
.chead > h2 { flex: 1; }
.card.collapsed > :not(.chead) { display: none !important; }
.card.collapsed > .chead { margin-bottom: 0; }
.card.collapsed { align-self: start; }

/* Usage chart + network split */
.usagegrid { margin-bottom: 16px; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; flex: none; }
.seg button { font: inherit; font-size: 13px; padding: 5px 12px; border: 0; background: var(--card); color: var(--ink-2); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--border); }
.seg button.on { background: var(--ink); color: var(--card); font-weight: 600; }
.seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.usagechart svg { width: 100%; height: auto; display: block; }
.usagechart text { font-size: 11px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.usagechart .gridline { stroke: var(--border); stroke-width: 1; }
.usagechart .baseline { stroke: var(--axis, var(--muted)); stroke-width: 1; }
.usagechart .ubar { fill: var(--ink-2); }
.usagechart .ubar.last { fill: var(--accent); }
.usagechart rect[data-tip]:hover { fill: var(--neutral-wash, rgba(0,0,0,.04)); }
:root { --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; }
[data-theme="dark"] { --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; }
.splitgroup + .splitgroup { margin-top: 18px; }
.splittitle { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.splitbar { display: flex; gap: 2px; height: 18px; }
.splitbar .part { border: 0; border-radius: 0; min-width: 3px; }
.splitbar .part:first-child { border-radius: 4px 0 0 4px; }
.splitbar .part:last-child { border-radius: 0 4px 4px 0; }
.splitbar .part:only-child { border-radius: 4px; }
.s1 { background: var(--s1); } .s2 { background: var(--s2); } .s3 { background: var(--s3); } .s4 { background: var(--s4); }
.splitlegend { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; }
.splitlegend li { display: flex; align-items: center; gap: 6px; }
.splitlegend .sw { width: 10px; height: 10px; border-radius: 2px; }
.splitlegend .lk { color: var(--ink); }
.splitlegend .lv { color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* Refresh button (dashboard + SIMs page) */
.heroactions { display: flex; gap: 8px; flex-wrap: wrap; }
.hero .btn.ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.6); }
.hero .btn.ghost:hover { background: rgba(255,255,255,.12); }
.btn.busy { opacity: .7; cursor: progress; }
.refreshmsg { margin: 0 0 12px; font-size: 13px; color: var(--ink-2); }
.hero .refreshmsg { margin: 10px 0 0; color: rgba(255,255,255,.85); }

/* Cost centres */
.ccform { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.ccform label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); min-width: 200px; flex: 1; }
.ccform input, .ccform select { font: inherit; color: var(--ink); }
.cctable td { vertical-align: middle; }
.ccname { display: flex; align-items: center; gap: 6px; }
.ccplain { font-weight: 600; }
.ccopen { font: inherit; font-weight: 600; color: var(--ink); background: none; border: 0; padding: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; text-align: left; }
.ccopen::after { content: ""; width: 6px; height: 6px; border: solid var(--ink-2); border-width: 0 2px 2px 0;
  transform: rotate(45deg) translateY(-2px); }
.ccopen[aria-expanded="false"]::after { transform: rotate(-45deg); }
.ccopen:hover { color: var(--accent); }
.ccopen:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.ccbranch { width: 12px; height: 12px; border-left: 1.5px solid var(--axis); border-bottom: 1.5px solid var(--axis);
  border-bottom-left-radius: 3px; margin-top: -8px; flex: none; }
.ccacts { white-space: nowrap; text-align: right; }
.ccedit { display: inline-block; position: relative; }
.ccedit > summary { list-style: none; display: inline-block; }
.ccedit > summary::-webkit-details-marker { display: none; }
.ccform.pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 320px; flex-direction: column;
  align-items: stretch; padding: 14px; background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12); white-space: normal; text-align: left; }
.ccform.pop label { min-width: 0; }
.ccnone td { color: var(--muted); }
.ccnone a { color: var(--ink-2); }
.cctag { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.cctag::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--ink-2);
  margin-right: 6px; vertical-align: 0; }
.bulkcc { display: inline-flex; gap: 6px; align-items: center; }
.simcc { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border); font-size: 13px; }
.simcc label { color: var(--muted); margin: 0; }
.simcc select { font: inherit; min-width: 220px; }
.tablewrap.ccwrap { border: 0; overflow: visible; }
.cctable .show-sm { display: none; }
@media (max-width: 700px) {
  .cctable .hide-sm { display: none; }
  .cctable .show-sm { display: block; }
  .ccform.pop { width: min(300px, 86vw); }
}
.ccsims > td { padding-top: 0; background: transparent; }
.ccsimwrap { border-left: 2px solid var(--border); padding-left: 14px; margin-bottom: 6px; }
.ccsimtable { width: 100%; }
.ccsimtable th { font-size: 12px; }
.ccmore { margin: 6px 0 4px; font-size: 13px; color: var(--muted); }
@media (max-width: 700px) {
  .ccsimwrap { margin-left: 0 !important; overflow-x: auto; }
}
.btn.primaryline { border-color: #22a95b; color: #1a8a49; }
.btn.primaryline:hover { background: rgba(34,169,91,.08); }
[data-theme="dark"] .btn.primaryline { color: #4cc77f; }

/* Dashboard: SIM resources, endpoints per status, traffic per month */
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 1000px) { .grid3 { grid-template-columns: 1fr; } }
.statelist { list-style: none; margin: 4px 0 0; padding: 0; }
.statelist li { display: grid; grid-template-columns: minmax(96px, auto) 1fr 70px; gap: 10px; align-items: center;
  padding: 7px 4px; border-radius: 6px; font-size: 13.5px; }
.statelist li:hover { background: var(--neutral-wash); }
.statelist .slabel { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); white-space: nowrap; }
.statelist .strack { height: 10px; background: var(--neutral-wash); border-radius: 5px; overflow: hidden; }
.statelist .sfill { display: block; height: 100%; border-radius: 5px; min-width: 3px; background: var(--muted); }
.statelist .sfill.good { background: var(--good); }
.statelist .sfill.warning { background: var(--warning); }
.statelist .sfill.critical { background: var(--critical); }
.statelist .sval { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; }
.statelist .spct { color: var(--muted); font-weight: 400; margin-left: 4px; }
.traffic svg { height: auto; }
.traffic .mbar { fill: var(--ink-2); }
.traffic .mbar.now { fill: var(--accent); }
.traffic rect[data-tip]:hover { fill: var(--neutral-wash); fill-opacity: .6; }
.traffic .nodata { fill: var(--muted); }
.chartnote { margin: 6px 0 0; font-size: 12px; color: var(--muted); }

/* "Sign in as" banner */
.impbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin: 0 0 16px; padding: 10px 14px; border-radius: 10px; background: #fce8e9; color: #5c0a0e;
  border: 1px solid #f2b8bb; font-size: 13.5px; }
.impbar form { margin: 0; }
[data-theme="dark"] .impbar { background: #3a1315; color: #ffd6d8; border-color: #6b2226; }
.useredit { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.useredit label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.useredit input, .useredit select { font: inherit; color: var(--ink); }
.useredit .wide { grid-column: 1 / -1; }
.useredit .checks { display: flex; gap: 24px; flex-wrap: wrap; }
.useredit .checks label { flex-direction: row; color: var(--ink); }
@media (max-width: 640px) { .useredit { grid-template-columns: 1fr; } }
.useredit [hidden] { display: none; }
/* Keep menu items on one line; tighten when the admin menu gets long */
.topbar nav > a, .topbar nav > button { white-space: nowrap; }
@media (max-width: 1440px) {
  .topbar nav > a { padding: 0 7px; font-size: 13.5px; }
  .topbar .powered { white-space: nowrap; }
}
@media (max-width: 1280px) {
  .topbar nav > a { padding: 0 5px; font-size: 13px; }
}
.topbar .powered { white-space: nowrap; }
.usereditwrap { max-width: 860px; display: flex; flex-direction: column; gap: 16px; }
.useredit textarea { font: inherit; color: var(--ink); resize: vertical; }
.useredit .sameaddr { margin-bottom: 10px; }
.useredit .wide > label:not(.switch) { display: flex; flex-direction: column; gap: 4px; }
.useredit label.switch { flex-direction: row; align-items: center; gap: 8px; color: var(--ink); font-size: 13.5px; }
.topbar a, .topbar button { white-space: nowrap; }

/* ===================================================== side menu (replaces the top bar) === */
:root { --side-w: 236px; --side-mini: 72px; --side-bg: #0f0f0f; --side-ink: #bdbdbd; --side-hi: #ffffff;
  --side-line: #262626; --side-hover: #1b1b1b; }
html.withside main, html.withside .foot { margin-left: var(--side-w); }
html.withside main { max-width: 1400px; }
html.withside.navmini main, html.withside.navmini .foot { margin-left: var(--side-mini); }
.side { position: fixed; inset: 0 auto 0 0; width: var(--side-w); z-index: 40; display: flex; flex-direction: column;
  background: var(--side-bg); color: var(--side-ink); border-right: 3px solid var(--accent); overflow-y: auto; overflow-x: hidden; }
.sidetop { padding: 20px 18px 14px; display: flex; flex-direction: column; gap: 8px; border-bottom: 1px solid var(--side-line); }
.sbrand { display: flex; align-items: center; }
.sbrand:hover { text-decoration: none; }
.slogo { height: 26px; width: auto; display: block; }
.smark { display: none; width: 30px; height: 30px; }
.spowered { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #8a8a8a; white-space: nowrap; }
.spowered img { height: 15px; width: auto; }
.scust { align-self: flex-start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: rgba(229,35,43,.16); color: #ff8a8f; }
.snav { flex: 1; padding: 10px 10px; display: flex; flex-direction: column; gap: 2px; }
.sgroup { font-size: 11.5px; color: #7a7a7a; padding: 14px 10px 6px; white-space: nowrap; }
.sgroup:first-child { padding-top: 6px; }
.side a, .side .slink { position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 8px;
  color: var(--side-ink); font-size: 14px; font-weight: 500; white-space: nowrap; text-decoration: none; }
.side .slink { width: 100%; background: none; border: 0; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; text-align: left; }
.side a:hover, .side .slink:hover { background: var(--side-hover); color: var(--side-hi); text-decoration: none; }
.side a.on { background: #1e1e1e; color: var(--side-hi); }
.side a.on::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.side a:focus-visible, .side button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.ni { width: 20px; height: 20px; flex: none; }
.side a.on .ni { color: #ff6b70; }
.nl { overflow: hidden; text-overflow: ellipsis; }
.side .badge { margin-left: auto; }
.sbottom { padding: 10px; border-top: 1px solid var(--side-line); display: flex; flex-direction: column; gap: 2px; }
.sbottom form { margin: 0; }
.side .slink.out { color: #ff6b70; }
.srow { display: flex; align-items: center; justify-content: space-between; padding: 8px 4px 2px; }
.side .themetoggle, .side .collapse { width: 34px; height: 34px; border-radius: 999px; border: 1px solid #333; background: none;
  color: var(--side-ink); display: grid; place-items: center; cursor: pointer; padding: 0; }
.side .themetoggle:hover, .side .collapse:hover { color: #fff; border-color: #555; }
.side .collapse svg { width: 18px; height: 18px; }
/* narrow: icons only, names show as tooltips */
html.navmini .side { width: var(--side-mini); }
html.navmini .side .nl, html.navmini .spowered, html.navmini .scust, html.navmini .slogo, html.navmini .sgroup { display: none; }
html.navmini .smark { display: block; }
html.navmini .sidetop { align-items: center; padding: 18px 8px 14px; }
html.navmini .side a, html.navmini .side .slink { justify-content: center; padding: 10px 0; }
html.navmini .snav { padding-top: 14px; }
html.navmini .side .badge { position: absolute; top: 2px; right: 6px; margin: 0; }
html.navmini .srow { flex-direction: column; gap: 8px; }
html.navmini .collapse svg { transform: scaleX(-1); }
.mobilebar, .navshade { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .side { transition: width .18s ease; }
  html.withside main, html.withside .foot { transition: margin-left .18s ease; }
}
/* phones and small tablets: a slim top bar with a menu button; the side menu slides in */
@media (max-width: 900px) {
  html.withside main, html.withside .foot, html.withside.navmini main, html.withside.navmini .foot { margin-left: 0; }
  .mobilebar { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 30; padding: 10px 14px;
    background: var(--side-bg); border-bottom: 3px solid var(--accent); }
  .mobilebar img { height: 22px; display: block; }
  .mobilebar .custtag { margin-left: auto; background: rgba(229,35,43,.16); color: #ff8a8f; }
  .menubtn { width: 38px; height: 38px; display: grid; place-items: center; background: none; border: 1px solid #333;
    border-radius: 8px; color: #fff; padding: 0; cursor: pointer; }
  .menubtn svg { width: 22px; height: 22px; }
  .side, html.navmini .side { width: 260px; transform: translateX(-105%); transition: transform .2s ease; }
  html.navopen .side { transform: none; }
  html.navmini .side .nl, html.navmini .spowered, html.navmini .slogo, html.navmini .sgroup { display: revert; }
  html.navmini .scust { display: inline-block; }
  html.navmini .smark { display: none; }
  html.navmini .side a, html.navmini .side .slink { justify-content: flex-start; padding: 9px 10px; }
  .side .collapse { display: none; }
  .navshade { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(0,0,0,.45); }
  .navshade[hidden] { display: none; }
}
/* Side menu brand: logos centred, filling ~80% of the block */
.sidetop { align-items: center; text-align: center; padding: 24px 14px 18px; gap: 12px; }
.sbrand { justify-content: center; width: 80%; }
.slogo { width: 100%; height: auto; max-height: 52px; object-fit: contain; }
.spowered { flex-direction: column; gap: 6px; font-size: 12px; width: 80%; color: #9a9a9a; }
.spowered img { height: auto; width: 72%; max-height: 30px; object-fit: contain; }
.scust { align-self: center; }
/* Use the whole screen width for page content */
html.withside main { max-width: none; padding-left: 32px; padding-right: 32px; }
html.withside .foot { max-width: none; padding-left: 32px; padding-right: 32px; }
.sbrand { width: 86%; }
.slogo { max-height: none; }
.spowered { width: 86%; font-size: 12.5px; }
.spowered img { width: 78%; max-height: none; }
/* keep the banner a sensible height on wide screens */
.hero.has-art { aspect-ratio: auto; height: clamp(220px, 24vw, 380px); background-size: cover; background-position: right center; }
.hero.has-art { background-size: contain; background-repeat: no-repeat; background-position: right center; background-color: #000c1a; }
@media (max-width: 700px) { .hero.has-art { height: auto; min-height: 220px; background-size: cover; } }

/* Banner text: no logo, vertically centred, roomier */
.hero.has-art { display: flex; align-items: center; }
.hero .herotext { padding: 36px 48px; max-width: 640px; }
.hero h1 { font-size: clamp(28px, 2.6vw, 40px); line-height: 1.1; margin: 0 0 12px; }
.hero .herolead { font-size: clamp(15px, 1.15vw, 17.5px); margin: 0 0 6px; color: rgba(255,255,255,.92); }
.hero .herometa { font-size: 13px; margin: 0 0 6px; color: rgba(255,255,255,.62); }
.hero .heroactions { margin-top: 18px; }
@media (max-width: 700px) { .hero .herotext { padding: 24px 22px; } }
/* "powered by IOtConnect": small and quiet at the foot of the menu */
.sfoot { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 0 4px; font-size: 10.5px;
  color: #6b6b6b; opacity: .8; white-space: nowrap; }
.sfoot img { height: 12px; width: auto; opacity: .75; }
html.navmini .sfoot { font-size: 0; gap: 0; }
.sver { text-align: center; padding: 10px 0 0; font-size: 10.5px; color: #8a8a8a; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
html.navmini .sver { display: none; }
html.navmini .sfoot img { height: 10px; }
.hero.has-art { background-size: auto 100%; }
@media (max-width: 700px) { .hero.has-art { background-size: cover; } }
.hero.has-art::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, #000c1a 0%, rgba(0,12,26,.9) 32%, rgba(0,12,26,0) 58%); }
.hero.has-art .herotext { position: relative; z-index: 1; }
.smark { width: auto; height: 34px; }
@media (max-width: 700px) { .hero.has-art::before { background: linear-gradient(90deg, rgba(0,12,26,.92), rgba(0,12,26,.72)); } }

/* "Still there?" warning before the automatic sign-out */
.idlewarn { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.45); display: grid; place-items: center; padding: 16px; }
.idlewarn[hidden] { display: none; }
.idlebox { background: var(--card); color: var(--ink); border-radius: 14px; padding: 24px 26px; max-width: 420px; width: 100%;
  box-shadow: 0 20px 50px rgba(0,0,0,.3); border-top: 4px solid var(--accent); }
.idlebox h2 { margin: 0 0 8px; font-size: 20px; }
.idlebox p { margin: 0 0 18px; color: var(--ink-2); line-height: 1.5; }
.idleacts { display: flex; gap: 8px; flex-wrap: wrap; }
/* charts drawn at their real size (static/charts.js) */
.chartbox { width: 100%; height: 240px; position: relative; }
.chartbox svg { display: block; overflow: visible; }
.chartbox text { fill: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.chartbox .gridline { stroke: var(--grid); stroke-width: 1; }
.chartbox .baseline { stroke: var(--axis); stroke-width: 1; }
.chartbox .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chartbox .pt { fill: var(--accent); stroke: var(--card); stroke-width: 2; }
.chartbox .mbar { fill: var(--ink-2); }
.chartbox .mbar.now { fill: var(--accent); }
.chartbox rect[data-tip]:hover { fill: var(--neutral-wash); fill-opacity: .6; }
.chartbox .nodata { fill: var(--muted); }
/* the day-by-day chart fills its card, matching the enterprise list beside it */
.card.trend:not(.traffic) { display: flex; flex-direction: column; }
.chartbox.tall { flex: 1; min-height: 240px; height: auto; }
.trend .chartbox svg { width: auto; height: auto; }
.usagechart.chartbox svg { width: auto; height: auto; } .usagechart.chartbox { height: 250px; }

/* ---- data limits, SMS ---------------------------------------------------- */
.limitform { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; align-items: end; }
.limitform label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.limitform .wide { grid-column: 1 / -1; }
.limitform input, .limitform select { font: inherit; color: var(--ink); }
#limForm { margin-top: 4px; }
.limitamt { display: flex; gap: 6px; }
.limitamt input { flex: 1; min-width: 0; }
.limitamt select { width: 76px; }
.limitsum { display: grid; gap: 8px; max-width: 560px; }
.limitbar { height: 8px; border-radius: 4px; background: var(--neutral-wash); overflow: hidden; }
.limitbar span { display: block; height: 100%; border-radius: 4px; background: var(--good); }
.limitbar.near span { background: var(--warning); }
.limitbar.over span { background: var(--critical); }
.smsform { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); max-width: 640px; }
.smsform label { font-size: 13px; color: var(--muted); display: block; margin-bottom: 6px; }
.smsrow { display: flex; gap: 8px; }
.smsrow input { flex: 1; min-width: 0; font: inherit; color: var(--ink); }
.smscount { font-size: 12px; margin-top: 4px; }
.limitform label.switch { flex-direction: row; align-items: center; gap: 8px; color: var(--ink); font-size: 14px; }
.limitamt .unit { align-self: center; color: var(--ink-2); font-size: 13px; white-space: nowrap; }
.limitamt input[name=warn_pct] { max-width: 80px; }

/* bulk bar: wraps instead of running off the screen */
.bulkbar { flex-wrap: wrap; max-width: 100%; row-gap: 8px; }
.bulkbar .btn { white-space: nowrap; }
.bulkbar #bulkcount { white-space: nowrap; }
.bulkbar .bulkcc select { width: auto; max-width: 240px; }
.bulkbar .bulkadmin { display: inline-flex; gap: 8px; padding-left: 10px; margin: 0; border-left: 1px solid var(--border); font-weight: 400; }
.modepick { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.modepick legend { font-size: 13px; color: var(--muted); margin-bottom: 4px; padding: 0; }
.limitform .modepick label.switch { font-size: 13.5px; }

/* SMS conversation */
.chat { display: flex; flex-direction: column; gap: 8px; max-height: 380px; overflow-y: auto; padding: 4px 2px 10px; }
.bubble { max-width: 72%; padding: 8px 12px; border-radius: 14px; font-size: 14px; line-height: 1.4; word-wrap: break-word; }
.bubble.out { align-self: flex-end; background: var(--ink); color: var(--card); border-bottom-right-radius: 4px; }
.bubble.in { align-self: flex-start; background: var(--neutral-wash); color: var(--ink); border-bottom-left-radius: 4px; }
.bubble.failed { background: var(--accent-wash); color: var(--ink); border: 1px dashed var(--critical); }
.bubble .bmeta { font-size: 11.5px; opacity: .7; margin-top: 3px; }
#smsCard .smsform { margin-top: 6px; border-top: 1px solid var(--border); padding-top: 12px; max-width: none; }
a.kpi.on { outline: 2px solid var(--ink); outline-offset: -2px; }

/* tools */
.toolgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.card.tool { display: block; color: inherit; text-decoration: none; }
.card.tool:hover { border-color: var(--ink-2); }
.card.tool h2 { margin: 0 0 6px; }
.card.tool p { margin: 0 0 10px; font-size: 14px; }
.limitform textarea { font: inherit; color: var(--ink); }

/* dashboard network tile */
.nettile .nethead { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.netpick { font: inherit; font-size: 12px; padding: 2px 4px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--card); color: var(--ink); max-width: 110px; }
.netgroup { margin-top: 8px; display: grid; gap: 4px; }
.netline { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--ink-2); text-decoration: none; }
.netline b { margin-left: auto; font-size: 20px; font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; }
.netline:hover b { text-decoration: underline; }
.netgroup .sub { margin-top: 2px; }
.netline { white-space: nowrap; font-size: 13px; }
.netline b { font-size: 18px; }
.nettile .nethead > span { white-space: nowrap; }

/* SIMs list pages */
.pager { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 10px; }
.pager .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.pager .pagejump { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.pager .pagejump input { width: 5.5em; }
.bulkbar #bulkallmatch { margin-left: 4px; text-decoration: underline; }

/* Network tile needs room for its picker and numbers when it sits in a full tile row (SIMs page) */
.kpis { grid-template-columns: repeat(auto-fit, minmax(178px, 1fr)); }
@media (max-width: 600px) { .kpis { grid-template-columns: repeat(2, 1fr); } .kpis .kpi.nettile { grid-column: 1 / -1; } }

/* Reports */
.reportlayout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 16px; align-items: start; }
.reportnav { padding: 10px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 12px; }
.reportnav .rgroup { font-size: 12.5px; color: var(--muted); margin: 10px 8px 4px; }
.reportnav .rgroup:first-child { margin-top: 2px; }
.reportnav a { padding: 7px 10px; border-radius: 8px; color: var(--ink); }
.reportnav a:hover { background: var(--neutral-wash); }
.reportnav a.on { background: var(--ink); color: var(--card); }
.reportmain { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.reportmain .filters { margin: 0; }
.reportmain .filters .go { align-self: end; }
.reporttable th { position: sticky; top: 0; background: var(--card); }
@media (max-width: 900px) { .reportlayout { grid-template-columns: 1fr; } .reportnav { position: static; flex-direction: row; flex-wrap: wrap; } .reportnav .rgroup { width: 100%; } }
.reporttable td:first-child { white-space: nowrap; }

/* Monthly pool tile */
.pooltile .meter { margin-top: 8px; }
.pooltile .meter .m { height: 6px; }
.poollist { list-style: none; margin: 6px 0 0; padding: 0; font-size: 13px; display: grid; gap: 2px; }
.poollist li { display: flex; align-items: center; gap: 6px; }
.poollist .muted { margin-left: auto; }
.poolset { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin: 4px 0; display: grid; gap: 6px; }
.poolset legend { font-weight: 600; padding: 0 4px; }
.poolset .radio, .poolset .check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
.poolset .poolfields { display: grid; gap: 6px; padding-left: 24px; }
.poolset input[type="radio"], .poolset input[type="checkbox"] { width: auto; flex: none; margin-top: 3px; }
.poolset .radio, .poolset .check { justify-content: flex-start; text-align: left; }
.billingform { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 14px; }
.billingform .radio { display: flex; align-items: center; gap: 6px; font-weight: 400; margin: 0; }
.billingform input[type="radio"] { width: auto; }
.billingform input[type="number"] { width: 80px; }
.pooltile .poolgroup { display: block; color: var(--ink); }
.pooltile .poolgroup[hidden] { display: none; }
.pooltile .value .icon { width: 10px; height: 10px; margin-right: 6px; vertical-align: middle; }
.pooltile .poolpick { font: inherit; font-size: 12px; padding: 2px 4px; border: 1px solid var(--border); border-radius: 6px; max-width: 62%; background: var(--card); color: var(--ink); }
.poolcountry { margin: -4px 0 16px; }
.poolcountry tfoot th { border-top: 1px solid var(--border); }
.statelist li { display: block; padding: 0; }
.statelist .srow { display: grid; grid-template-columns: minmax(96px, auto) 1fr 70px; gap: 10px; align-items: center;
  padding: 7px 8px; border-radius: 8px; color: inherit; text-decoration: none; }

/* Support tickets */
.catpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; margin-bottom: 6px; }
.catpick .opt { margin: 0; }
.catpick .opt:has(input:checked) { border-color: var(--accent); background: var(--accent-wash); }
.ticketform label:not(.opt):not(.switch) { display: block; margin-top: 14px; }
.ticketform input:not([type=radio]):not([type=checkbox]), .ticketform select, .ticketform textarea { width: 100%; }
.ticketgrid { grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr); align-items: start; }
.thread { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.msg { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; }
.msg header { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; font-size: 13px; margin-bottom: 6px; }
.msg header .muted:last-child { margin-left: auto; font-size: 12px; }
.msg .body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.msg.from-ops { border-left: 3px solid var(--ink); }
.msg.from-client { border-left: 3px solid var(--axis); }
.msg.internal { background: var(--surface); border-style: dashed; border-left-style: solid; }
.thread .event { font-size: 12.5px; padding: 2px 14px; }
.thread .event span { margin-left: 6px; }
.replybox textarea { width: 100%; }
.replyrow { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; }
.replyrow .btn { margin-left: auto; }
.simlist { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow: auto; }
.simlist li { padding: 6px 0; border-bottom: 1px solid var(--grid); }
.simlist li:last-child { border-bottom: 0; }
@media (max-width: 860px) { .ticketgrid { grid-template-columns: 1fr; } }

/* Pool tile with several pools: twice as wide, one row per pool with a bar */
.poolwrap { margin: -4px 0 16px; }   /* several pools: the pool tile gets its own full-width row under the counters */
.pooltile.wide .poolpick { max-width: 320px; }
.pooltile .poollist { gap: 0; margin-top: 8px; }
.pooltile .poollist { display: grid; grid-template-columns: minmax(0, max-content) minmax(50px, 1fr) auto auto; column-gap: 12px; }
.pooltile .poollist li { display: contents; }
.poolrow { all: unset; box-sizing: border-box; width: 100%; cursor: pointer; display: grid; align-items: center;
  grid-column: 1 / -1; grid-template-columns: subgrid; gap: 12px;
  padding: 5px 6px; margin: 0 -6px; border-radius: 6px; font-size: 13px; }
.poolrow:hover { background: var(--surface); }
.poolrow:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.poolrow .pname { display: flex; align-items: center; gap: 6px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.poolrow .pname .icon { flex: none; }
.poolrow .meter { margin: 0; display: flex; min-width: 0; }
.poolrow .meter .m { min-width: 0; }
.poolrow .meter .m { height: 6px; }
.poolrow .ppct { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.poolrow .pused { color: var(--muted); font-size: 12px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .pooltile .poollist { grid-template-columns: minmax(0, max-content) minmax(50px, 1fr) auto; } .poolrow .pused { display: none; } }

.pooltile a.poolgroup, .pooltile a.poolgroup:hover { text-decoration: none; }
.pooltile a.poolgroup:hover .value { color: var(--accent-ink); }

/* Several bundles on one SIM; per-SIM allowance */
.bundlelist { margin: 4px 0 0; padding-left: 18px; font-size: 13px; }
.bundlelist li { margin: 2px 0; }
.allowform { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.allowform input[type=number] { width: 90px; }
.bulkallow { display: inline-flex; gap: 6px; align-items: center; }
.bulkallow input { width: 80px; }
.allowupload { border-top: 0; padding-top: 0; }

.pooltile.wide .poolrow .meter .m { width: 100%; }
.poolrow .pused { text-align: left; }

/* Full-width pool tile: pools in two side-by-side columns, read left to right */
.pooltile.wide .poollist { grid-template-columns: minmax(0, max-content) minmax(60px, 1fr) auto auto 28px minmax(0, max-content) minmax(60px, 1fr) auto auto; column-gap: 12px; }
.pooltile.wide .poollist li:nth-child(odd) .poolrow { grid-column: 1 / span 4; }
.pooltile.wide .poollist li:nth-child(even) .poolrow { grid-column: 6 / span 4; }
@media (max-width: 1000px) {
  .pooltile.wide .poollist { grid-template-columns: minmax(0, max-content) minmax(60px, 1fr) auto auto; }
  .pooltile.wide .poollist li:nth-child(n) .poolrow { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .pooltile.wide .poollist { grid-template-columns: minmax(0, max-content) minmax(50px, 1fr) auto; }
}

/* Bar list values: never wrap ("92.29 GB · 8363" stays on one line) */
.bars li { grid-template-columns: minmax(110px, 170px) 1fr max-content; }
.bars .val { white-space: nowrap; min-width: 92px; }
@media (max-width: 600px) { .bars li { grid-template-columns: 110px 1fr max-content; } .bars .val { min-width: 0; } }

/* Status lists: count and % always on one line, in fixed columns so rows line up */
.statelist .srow { grid-template-columns: minmax(96px, auto) 1fr max-content; }
.statelist .sval { white-space: nowrap; display: grid; grid-template-columns: 6ch 4.5ch; justify-items: end; column-gap: 4px; }
.statelist .spct { margin-left: 0; }
.statelist .srow { grid-template-columns: minmax(80px, max-content) minmax(40px, 1fr) max-content; }
.statelist .strack { display: block; min-width: 40px; }
.statelist .srow { grid-template-columns: 108px minmax(40px, 1fr) max-content; }
.statelist .slabel { overflow: hidden; text-overflow: ellipsis; }

/* SIMs page: the counters on one row, the attention tiles on their own row, each row filling the width */
.kpis.flagrow { margin-top: -4px; }
.kpis.flagrow:empty { display: none; }
.kpis.flagrow { display: flex; flex-wrap: wrap; }
.kpis.flagrow > .kpi { flex: 1 1 170px; min-width: 0; }
@media (max-width: 600px) { .kpis.flagrow > .kpi { flex-basis: 140px; } }
@media (max-width: 600px) { .kpis .pooltile { grid-column: 1 / -1; } }
.rmreq { margin-top: 6px; font-size: 12.5px; }
.rmreq summary { cursor: pointer; color: var(--critical); width: max-content; }
.rmreq form { margin-top: 6px; }
.rmreq input[name=reason] { padding: 4px 8px; font-size: 12.5px; width: 190px; }

/* What an enterprise's users see (enterprise page) */
.featgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px 24px; }
.featgroup .check { display: flex; margin: 4px 0; }
.featgrouphead { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 4px;
  padding-bottom: 4px; border-bottom: 1px solid var(--border); }
.featall { font-size: 12px; white-space: nowrap; }
.featnote { margin: 4px 0; font-size: 12.5px; }

/* Events page */
.evtable td, .evtable th { vertical-align: middle; }
.evtable td.mono { font-size: 13px; }
.evwrap { max-height: calc(100vh - 240px); overflow: auto; }
.evwrap thead th { position: sticky; top: 0; z-index: 2; }
.evfilters select { max-width: 220px; }
.perpage { display: flex; align-items: center; gap: 6px; margin: 0; }
.perpage label { margin: 0; font-size: 13px; }
.perpage select { padding: 4px 8px; }
.evtoggle { width: 24px; height: 24px; border-radius: 999px; border: 1px solid var(--border); background: none;
  color: var(--ink); cursor: pointer; line-height: 1; font-size: 15px; padding: 0; }
.evtoggle:hover { border-color: var(--ink); }
.evdetail td { background: var(--surface); }
.evdl { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 24px; margin: 4px 0; }
.evdl div { display: flex; gap: 10px; font-size: 13px; }
.evdl dt { color: var(--muted); min-width: 92px; }
.evdl dd { margin: 0; overflow-wrap: anywhere; }
.evtools { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.evtoolbtns { display: flex; gap: 18px; align-items: center; }
.colpick { position: relative; }
.colpick > summary { list-style: none; cursor: pointer; }
.colpick > summary::-webkit-details-marker { display: none; }
.colpickbox { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 10px 14px; min-width: 220px;
  max-height: 60vh; overflow: auto; }
.colpickbox .check { display: flex; margin: 3px 0; white-space: nowrap; }
.colpickbox [data-col-reset] { margin-top: 6px; }

/* Refresh · Export · Choose columns · Per page: one line, one look */
.evtoolbtns { gap: 20px; }
.evtool { display: inline-flex; align-items: center; height: 30px; padding: 0; margin: 0; color: var(--accent-ink);
  font-size: 14px; line-height: 1; cursor: pointer; text-decoration: none; background: none; border: 0; }
.evtool:hover { text-decoration: underline; }
.colpick > summary.evtool { display: inline-flex; font-weight: 400; font-family: inherit; margin: 0; }
.perpage select { height: 30px; }
.listtools { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.listtools .pager { margin: 0; }
.listtools .perpage { margin-left: auto; }

/* Health page */
.healthlist { margin: 0; padding: 0; list-style: none; }
.healthlist li { padding: 8px 0; border-bottom: 1px solid var(--border); }
.healthlist li:last-child { border-bottom: 0; }

/* Long error / detail text on Events: one line, the rest on hover and under + */
.evtable td.evclip { white-space: nowrap; }
.evtable td.evclip > div { max-width: 300px; overflow: hidden; text-overflow: ellipsis; }

/* Networks page: fixed, even columns */
.nettable { table-layout: fixed; width: 100%; }
.nettable td, .nettable th { vertical-align: top; overflow-wrap: anywhere; }
.whytable td { font-size: 13px; line-height: 1.45; }
.nettable tr.netgrp td { background: var(--surface); font-weight: 600; font-size: 14px; padding-top: 14px; border-top: 2px solid var(--border); }
.chip.sm { font-size: 11px; padding: 1px 7px; margin-left: 4px; vertical-align: 1px; }

/* 25 Nov 2026: all figures in MB, so values get longer; keep them on one line and the unit smaller */
.kpi .value { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.kpi .value .unit { font-size: .58em; font-weight: 550; color: var(--ink-2); margin-left: 4px; }
.kpi .sub { overflow-wrap: anywhere; }
.ccform label.check { flex-direction: row; align-items: flex-start; gap: 8px; color: var(--ink); }
.ccform label.check input { margin-top: 3px; }
.ccform label.check .muted { display: block; font-size: 12px; }
/* Activity (audit trail) */
.auditstat { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 800px) { .auditstat { grid-template-columns: 1fr; } }
.auditstat .label { font-size: 12.5px; color: var(--ink-2); }
.auditstat .big { font-size: 20px; font-weight: 650; margin: 4px 0 2px; display: flex; align-items: center; gap: 6px; }
.auditstat .muted { font-size: 12.5px; }
.audittable { table-layout: fixed; width: 100%; min-width: 1030px; }
.audittable td { vertical-align: top; }
.auditdetail { font-size: 12.5px; color: var(--ink-2); overflow-wrap: anywhere; }

/* Reports → Statistics */
.statkpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 16px; }
.statkpis .kpi .value { font-size: 22px; }
.statkpis .up { color: var(--good-ink); font-weight: 600; }
.statkpis .down { color: var(--critical); font-weight: 600; }
.statcharts { display: grid; gap: 16px; margin-bottom: 16px; }
.statcharts.two { grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); }
.statcharts .card { margin: 0; }
.charttitle { font-size: 15px; margin: 0 0 8px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--ink-2); margin-bottom: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.chartbox.auto { height: auto; }
.chartbox .hval { fill: var(--ink-2); }
.pickset { border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px 8px; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; flex-basis: 100%; }
.pickset legend { font-size: 12.5px; color: var(--muted); padding: 0 4px; }
.pickset label.check { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--ink); }
.reporttable tr.totalrow td { font-weight: 650; background: var(--neutral-wash); }
.reporttable th, .reporttable td { white-space: nowrap; }
.statcharts .card .chartbox + .muted { margin: 6px 0 0; }

/* sortable column headings (SIMs page) */
a.sorth { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
a.sorth .arr { font-size: 10px; color: var(--muted); opacity: .55; }
a.sorth:hover .arr, a.sorth.on .arr { opacity: 1; color: var(--accent); }
a.sorth.on { color: var(--ink); }
th.num a.sorth { justify-content: flex-end; }

/* SIMs list: one line per value, room to breathe, quieter second lines */
.simtable th, .simtable td { padding: 10px 14px; }
.simtable td { white-space: nowrap; font-size: 14px; }
.simtable td .cust { font-size: 12px; line-height: 1.45; }
.simtable td.ctry span { display: inline-block; max-width: 150px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.simtable td.simcell { white-space: normal; min-width: 210px; }
.simtable td[data-col="flags"] { white-space: normal; min-width: 150px; }
.simtable td[data-col="flags"] .chip { margin: 2px 4px 2px 0; }
.simtable td[data-col="net"] .chip { margin-bottom: 2px; }
.simtable tbody tr:hover td { background: var(--neutral-wash); }
.simtable td.num { font-variant-numeric: tabular-nums; }

/* page pass 26 Nov: tables keep values on one line where they're short; long text wraps between words only */
.nettable td, .nettable th { overflow-wrap: normal; word-break: normal; }
.nettable th { white-space: normal; line-height: 1.25; }
.audittable td:first-child { white-space: nowrap; }
.audittable .auditdetail { white-space: normal; }
.statkpis { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.tablewrap { overflow-x: auto; }
.card table th { white-space: nowrap; }
.audittable .auditdetail { font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }

/* SIMs page: drill-down filters (26 Nov) */
.drill { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 4px; }
.drilllabel { font-size: 12px; color: var(--ink2, #6b6b6b); margin-right: 4px; }
.facet { position: relative; }
.facet > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px;
  border: 1px solid var(--line, #d9d9d9); border-radius: 999px; background: #fff; font-size: 14px; font-weight: 500; user-select: none; }
.facet > summary::-webkit-details-marker { display: none; }
.facet > summary::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px); margin-left: 2px; opacity: .6; }
.facet[open] > summary::after { transform: rotate(-135deg) translateY(-1px); }
.facet.on > summary { border-color: var(--red, #e0201b); color: var(--red, #e0201b); background: #fff5f5; }
.facetn { background: var(--red, #e0201b); color: #fff; border-radius: 999px; font-size: 11px; font-weight: 600; min-width: 18px;
  height: 18px; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }
.facetbox { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; min-width: 280px; max-width: 360px; max-height: 420px; overflow: auto;
  background: #fff; border: 1px solid var(--line, #d9d9d9); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.14); padding: 10px 12px 0; }
.facethead { font-size: 12px; font-weight: 600; color: var(--ink2, #6b6b6b); margin: 10px 0 4px; }
.facethead:first-child { margin-top: 2px; }
.facetopt { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-radius: 6px; cursor: pointer; font-size: 14px; }
.facetopt:hover { background: #f5f5f5; }
.facetopt input { width: 16px; height: 16px; accent-color: var(--red, #e0201b); flex: none; }
.facetlabel { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.facetcount { font-variant-numeric: tabular-nums; color: var(--ink2, #6b6b6b); font-size: 13px; }
.facetopt.zero { opacity: .5; }
.facetopt[hidden] { display: none; }
.facetfind { width: 100%; box-sizing: border-box; margin: 0 0 8px; padding: 7px 10px; border: 1px solid #d6d6d6; border-radius: 8px; font: inherit; font-size: 14px; }
.facetfoot { position: sticky; bottom: 0; background: #fff; padding: 10px 0 12px; border-top: 1px solid #eee; margin-top: 8px; text-align: right; }
.drillchips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 10px; }
.chip.pick { text-decoration: none; background: #fff5f5; border: 1px solid #f3c2c0; color: #a3120e; }
.chip.pick:hover { background: #ffe9e8; }
.chip.pick span { margin-left: 4px; font-weight: 600; }

/* 27 Nov: SIM page event history – compact rows; Activity – SIM names never run into the ICCID column */
table.evcompact th, table.evcompact td { padding: 5px 10px; font-size: 13px; line-height: 1.3; white-space: nowrap; }
table.evcompact td .chip { padding: 1px 8px; font-size: 12px; }
table.evcompact td .icon { vertical-align: -1px; }
.audittable td { overflow: hidden; }
.audittable td.simname { overflow-wrap: anywhere; white-space: normal; }

/* 27 Nov spacing pass: card grids follow the space beside the menu (not the window), so on a laptop or a narrow
   window the cards move under each other instead of running off the right edge */
.grid2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); }
.grid3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid2 > *, .grid3 > * { min-width: 0; }
.statcharts.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.kv .mono { overflow-wrap: anywhere; }
@media (max-width: 700px) {
  /* phones: a table wider than the screen scrolls inside its card instead of pushing the page sideways */
  .card > table, .card > form > table, .card > div:not(.tablewrap) > table { display: block; overflow-x: auto; max-width: 100%; }
  .pagehead .actions { flex-wrap: wrap; }
  main section.card { min-width: 0; max-width: 100%; }
  .statcharts.two .card { min-width: 0; }
}
@media (max-width: 700px) { .card p, .card .filters { overflow-wrap: anywhere; } .card .filters { flex-wrap: wrap; } .card .filters > * { min-width: 0; max-width: 100%; } }
.tablewrap { max-width: 100%; } .card > form { min-width: 0; max-width: 100%; }
@media (max-width: 700px) { .card input:not([type=checkbox]):not([type=radio]) { max-width: 100%; box-sizing: border-box; } .evtoolbtns { flex-wrap: wrap; max-width: 100%; } }
