/* Mi IOT Sim — navy, cyan and blue from the logo; white header; soft cards. */
:root {
  /* Mi IOT Sim palette — taken from the logo */
  --navy: #0a1a2f; --cyan: #16c8e8; --blue: #1c6fd8;
  --grad: linear-gradient(120deg, #1fd3ee 0%, #1497e6 55%, #1c6fd8 100%);
  --bg: #f5f8fc; --surface: #ffffff; --fg: #0a1a2f; --muted: #5a6b82; --line: #e3e9f2;
  --board: #0a1a2f; --board-fg: #e8f1fa; --gold: #0e7fc4; --gold-soft: #e3f4fc;
  --card: linear-gradient(135deg, #2ee6f6 0%, #14a8e8 55%, #1d5fd6 100%);
  --good: #1f7a4d; --good-bg: #e2f3ea; --warn: #9a5b00; --warn-bg: #fbeed5; --info: #1d5f8a; --info-bg: #e2eef7; --bad: #a3312b; --bad-bg: #f8e1df;
  --f-display: "Montserrat", "Inter", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --r: 10px; --r-lg: 18px;
  --shadow: 0 1px 2px rgba(10,26,47,.04), 0 8px 24px -12px rgba(10,26,47,.18);
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.6 var(--f-body); overflow-x: clip; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration-color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--gold); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.15; text-wrap: balance; margin: 0 0 .5em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: 1.2rem; font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { max-width: 1080px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
main.wrap { padding-block: 32px 64px; }
.muted { color: var(--muted); } .small { font-size: .875rem; }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 600; color: var(--gold); }

/* header — white so the logo shows in its own colours */
.top { background: rgba(255,255,255,.92); color: var(--fg); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 12px; }
.brand { font-family: var(--f-display); font-weight: 800; font-size: 1.15rem; text-decoration: none; display: flex; gap: 10px; align-items: center; }
.brand:hover { color: inherit; }
.brand em { font-style: normal; font-weight: 700; font-size: .7rem; text-transform: uppercase; letter-spacing: .14em; color: #fff; background: var(--grad); padding: 3px 8px; border-radius: 999px; }
.chip { width: 22px; height: 16px; border-radius: 3px; background: linear-gradient(90deg, transparent 45%, rgba(0,0,0,.35) 45% 55%, transparent 55%), linear-gradient(0deg, transparent 45%, rgba(0,0,0,.35) 45% 55%, transparent 55%), #d9a847; }
nav { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; font-size: .95rem; font-weight: 500; }
nav a { text-decoration: none; color: var(--fg); opacity: .8; } nav a:hover { color: var(--blue); opacity: 1; }
nav form { margin: 0; }
.top .link { color: var(--fg); }
/* reseller sites: coloured header with their own logo */
body.branded .top { background: var(--board); color: #fff; border-bottom: 0; backdrop-filter: none; }
body.branded nav a, body.branded .top .link { color: #fff; }
body.branded nav a:hover { color: #fff; opacity: 1; }
body.branded .top .btn { background: #fff; color: var(--board); box-shadow: none; }

/* buttons & forms */
.btn { display: inline-block; font: 600 .95rem var(--f-body); padding: 11px 20px; border-radius: var(--r); border: 0; background: var(--grad); color: #fff; text-decoration: none; cursor: pointer; box-shadow: 0 6px 16px -8px rgba(28,111,216,.7); transition: transform .15s, box-shadow .15s, filter .15s; }
.btn:hover { color: #fff; filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 10px 22px -10px rgba(28,111,216,.8); }
.btn.small { padding: 6px 12px; font-size: .85rem; }
.btn.ghost { background: var(--surface); color: var(--fg); border: 1px solid var(--line); box-shadow: none; }
.btn.ghost:hover { border-color: var(--blue); color: var(--blue); background: var(--surface); }
.btn.danger { background: var(--bad); color: #fff; box-shadow: none; }
button.link { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-decoration-color: var(--gold); cursor: pointer; }
.form { display: grid; gap: 16px; max-width: 720px; }
.form.inline { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0; }
fieldset { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px 20px; box-shadow: var(--shadow); margin: 0; display: grid; gap: 14px; background: var(--surface); }
legend { font-family: var(--f-display); font-weight: 700; padding: 0 6px; }
label { display: grid; gap: 6px; font-weight: 500; font-size: .95rem; }
input, select, textarea { font: inherit; color: var(--fg); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; width: 100%; min-width: 0; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px var(--gold-soft); }
input[type=radio], input[type=checkbox] { width: auto; accent-color: var(--gold); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.choice { display: grid; gap: 8px; }
.opt { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; font-weight: 400; cursor: pointer; }
.opt:has(input:checked) { border-color: var(--gold); background: var(--gold-soft); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
td .inline input { padding: 6px 8px; width: 9rem; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
details summary { cursor: pointer; color: var(--muted); margin-top: 12px; }

/* messages */
.flash, .error { padding: 12px 16px; border-radius: var(--r); margin-bottom: 20px; }
.flash { background: var(--good-bg); color: var(--good); }
.error { background: var(--bad-bg); color: var(--bad); }
.empty { color: var(--muted); padding: 18px; border: 1px dashed var(--line); border-radius: var(--r); }

/* hero — full-width band with soft glows in the logo colours */
.hero { display: grid; grid-template-columns: 1fr 1.15fr; gap: 40px; align-items: center;
  margin: -32px calc(50% - 50vw) 0; padding: 72px calc(50vw - 50% + 0px) 80px;
  background: radial-gradient(60% 80% at 85% 20%, rgba(22,200,232,.18), transparent 60%), radial-gradient(45% 60% at 0% 35%, rgba(28,111,216,.10), transparent 70%), linear-gradient(180deg, #fff, var(--bg)); }
.hero > * { min-width: 0; }
.hero h1 { font-size: clamp(2.2rem, 5.6vw, 3.8rem); line-height: 1.05; letter-spacing: -.03em; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .8rem; font-weight: 600; color: var(--muted); box-shadow: var(--shadow); margin-bottom: 18px; }
.badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 4px rgba(22,200,232,.2); }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 32em; }
.hero .row { margin-top: 26px; } .hero .btn { padding: 14px 24px; font-size: 1rem; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 26px; color: var(--muted); font-size: .9rem; }
.trust span::before { content: "✓"; color: var(--blue); font-weight: 800; margin-right: 6px; }
.visual { position: relative; }
.heroimg { display: block; width: 115%; max-width: none; height: auto; margin-left: -4%; mix-blend-mode: multiply; -webkit-mask-image: radial-gradient(75% 80% at 50% 50%, #000 70%, transparent 100%); mask-image: radial-gradient(75% 80% at 50% 50%, #000 70%, transparent 100%); }
@media (max-width: 760px) { .heroimg { width: 100%; margin: 0; } }
.simcard { position: relative; aspect-ratio: 85.6 / 54; max-width: 100%; border-radius: 18px; background: var(--card, var(--board)); color: #fff; padding: 24px; clip-path: polygon(0 0, 88% 0, 100% 18%, 100% 100%, 0 100%); display: flex; flex-direction: column; justify-content: space-between; transform: rotate(-4deg); filter: drop-shadow(0 30px 40px rgba(28,111,216,.35)); }
.contacts { width: 34%; aspect-ratio: 1.25; border-radius: 8px; background: #b97f12; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px; }
.contacts i { background: linear-gradient(135deg, #ffe08a, #e6ad35); border-radius: 3px; }
.contacts i:nth-child(odd) { border-top-left-radius: 6px; }
.simmeta { display: grid; gap: 2px; font-size: .78rem; }
.simmeta span:first-child { text-transform: uppercase; letter-spacing: .14em; opacity: .7; }
.simmeta .mono { font-size: clamp(.8rem, 2.2vw, 1rem); }
.float { position: absolute; display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; box-shadow: var(--shadow); font-size: .85rem; font-weight: 600; }
.float small { display: block; font-weight: 400; color: var(--muted); font-size: .75rem; }
.float .dot { width: 30px; height: 30px; border-radius: 9px; background: var(--grad); display: grid; place-items: center; color: #fff; font-size: .9rem; }
.float.f1 { left: 0; bottom: -26px; } .float.f2 { right: -4px; top: -10px; }

/* sections */
.section { margin-top: 72px; }
.sechead { max-width: 640px; margin-bottom: 26px; }
.sechead h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); font-weight: 800; letter-spacing: -.02em; margin-bottom: .3em; }
.sechead .eyebrow { margin-bottom: 8px; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.plan { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow); overflow: hidden; transition: transform .15s, box-shadow .15s; }
.plan::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--grad); }
.plan:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(10,26,47,.05), 0 18px 36px -18px rgba(28,111,216,.45); }
.plan h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.plan .data { font-family: var(--f-display); font-weight: 800; font-size: 2.4rem; margin: 0; letter-spacing: -.02em; }
.plan .data small, .plan .price small { font: 400 .85rem var(--f-body); color: var(--muted); }
.plan .price { font-family: var(--f-display); font-weight: 800; font-size: 1.6rem; margin: 4px 0 6px; }
.plan .btn { margin-top: auto; align-self: stretch; text-align: center; padding: 12px 18px; font-size: .95rem; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; counter-reset: s; }
.steps li { counter-increment: s; padding: 24px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.steps li::before { content: counter(s); font: 800 1.1rem var(--f-display); color: #fff; background: var(--grad); width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 14px; }
.help { position: relative; overflow: hidden; background: var(--navy); color: #e8f1fa; padding: 40px; border-radius: 24px; }
.help::after { content: ""; position: absolute; width: 420px; height: 420px; right: -120px; top: -180px; background: radial-gradient(circle, rgba(22,200,232,.45), transparent 65%); pointer-events: none; }
.help h2 { color: #fff; font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 800; }
.help .btn { margin-top: 6px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-bottom: 20px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; min-width: 0; box-shadow: var(--shadow); }
.panel.accent { border-color: var(--gold); box-shadow: inset 4px 0 0 var(--gold); }
.narrow { max-width: 440px; margin: 24px auto; }
.crumb { color: var(--muted); font-size: .9rem; }
.count { font: 500 .85rem var(--f-mono); color: var(--muted); }

/* data */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0 0 1em; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.actions { white-space: nowrap; } td.actions form { display: inline-flex; gap: 6px; align-items: center; margin: 0 4px 4px 0; }
td.actions select { width: auto; padding: 5px 8px; font-size: .85rem; }
.inline-details { display: inline-block; vertical-align: top; }
.inline-details summary { margin: 0 6px 4px 0; font-size: .85rem; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap; vertical-align: middle; }
.pill.good { background: var(--good-bg); color: var(--good); } .pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.info { background: var(--info-bg); color: var(--info); } .pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.muted { background: var(--line); color: var(--muted); }
h1 .pill { font: 600 .85rem var(--f-body); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 8px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; display: grid; box-shadow: var(--shadow); }
.tile b { font: 800 1.8rem var(--f-display); font-variant-numeric: tabular-nums; }
.tile span { color: var(--muted); font-size: .85rem; }
.tile.hot { border-color: var(--gold); background: var(--gold-soft); }
.log { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: .92rem; }
.log time { font-family: var(--f-mono); color: var(--muted); margin-right: 8px; }
.plain { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
pre.msg { white-space: pre-wrap; font: .85rem/1.5 var(--f-mono); background: var(--bg); padding: 12px; border-radius: var(--r); }

/* packing / scanning */
.packbar { display: grid; gap: 8px; margin: 16px 0 20px; }
.packcount { display: flex; align-items: baseline; gap: 10px; }
.packcount b { font: 800 2.6rem var(--f-display); font-variant-numeric: tabular-nums; }
.packcount span { color: var(--muted); }
.meter { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: var(--gold); transition: width .25s; }
.scanpanel { display: grid; gap: 14px; }
.reader { width: 100%; max-width: 520px; border-radius: var(--r); overflow: hidden; background: #000; }
.reader video { width: 100% !important; height: auto !important; }
.scanpanel .form.inline { max-width: 520px; width: 100%; }
.scanpanel .form.inline input { flex: 1 1 220px; font-family: var(--f-mono); }
.scanmsg { min-height: 1.5em; margin: 0; font-weight: 600; }
.scanmsg.good { color: var(--good); } .scanmsg.bad { color: var(--bad); }
.scanned { margin: 0; padding-left: 1.6em; display: grid; gap: 8px; }
.scanned li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.scanned li.new { animation: flash 1.2s ease-out; }
@keyframes flash { from { background: var(--good-bg); } to { background: transparent; } }
.scanned form.inline { display: inline; margin-left: 8px; }
.candidate { display: grid; gap: 14px; padding: 16px; border: 2px solid var(--good); border-radius: var(--r); background: var(--good-bg); }
.candidate .tick { color: var(--good); font-weight: 800; font-size: 1.3rem; }
.candidate b { font-size: 1.1rem; }
.btn.big { padding: 14px 26px; font-size: 1.05rem; min-width: 9rem; }
#completeBtn { margin-top: 14px; width: 100%; max-width: 520px; }
.activate { margin-top: 24px; display: grid; gap: 8px; max-width: 520px; }
.activate .btn { padding-block: 14px; font-size: 1.05rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; background: var(--muted); border-color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-block: 28px 44px; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.foot img { height: 28px; width: auto; display: block; margin-bottom: 6px; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 20px; padding-block: 44px 52px; }
  .visual { max-width: 380px; }
  nav { gap: 14px; font-size: .9rem; }
  .help { padding: 28px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.readybox { border: 2px solid var(--good); background: var(--good-bg); border-radius: var(--r); padding: 14px 16px; margin: 6px 0 14px; display: grid; gap: 6px; }
.readybox p { margin: 0; }
.big-mono { font-size: 1.3rem; letter-spacing: .06em; }
s.muted { font-weight: 400; }
.row > .form.inline { flex: 1 1 280px; }
.row .form.inline input { width: auto; flex: 1 1 200px; }
.brandlogo { height: 32px; width: auto; max-width: 180px; object-fit: contain; background: #fff; border-radius: 4px; padding: 2px 6px; }
.logo-preview { max-height: 80px; max-width: 100%; background: #fff; padding: 6px; border: 1px solid var(--line); border-radius: var(--r); }
.inline-input { display: flex; align-items: center; gap: 6px; } .inline-input input { flex: 1 1 auto; }
input[type=color] { padding: 2px; height: 42px; }
/* customer tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); margin: 22px 0 6px; }
.tabs .tab { padding: 9px 14px; border: 1px solid transparent; border-bottom: 0; border-radius: 8px 8px 0 0; color: var(--muted); text-decoration: none; font-weight: 600; margin-bottom: -1px; }
.tabs .tab:hover { color: var(--fg); }
.tabs .tab.on { background: var(--surface); border-color: var(--line); color: var(--fg); }
.tabs .n { font: 500 .8rem var(--f-mono, monospace); color: var(--muted); margin-left: 2px; }
td.actions { white-space: nowrap; } td.actions .btn + .btn { margin-left: 6px; }
@media (max-width: 640px) { td.actions { white-space: normal; } td.actions .btn { margin: 2px 0; } }

/* our own logo in the header (reseller sites keep their own) */
.sitelogo { height: 52px; width: auto; display: block; }
@media (max-width: 640px) { .sitelogo { height: 38px; } }
body.branded .hero { background: linear-gradient(180deg, #fff, var(--bg)); }
body.branded .badge i { background: var(--gold); box-shadow: none; }

/* contact strip above the header */
.topstrip { background: var(--navy); color: #cfe6f5; font-size: .85rem; }
.topstrip .stripbar { display: flex; justify-content: space-between; align-items: center; min-height: 34px; gap: 12px; }
.topstrip a { color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.topstrip a b { font-weight: 600; letter-spacing: .02em; }
.topstrip svg { color: var(--cyan); }
.topstrip .stripmail { color: #cfe6f5; }
body.branded .topstrip { background: rgba(0,0,0,.85); }
@media (max-width: 560px) { .topstrip .stripmail { display: none; } }
