:root {
  --brand: #0b4f8a;
  --brand-soft: #e7f0f9;
  --bg: #f4f6f9;
  --card: #fff;
  --text: #1d2430;
  --muted: #667085;
  --line: #e2e6ec;
  --ok: #1b7a2e;
  --ok-soft: #e6f4ea;
  --warn: #a15c00;
  --warn-soft: #fff4e0;
  --bad: #b42318;
  --bad-soft: #fdecea;
  --radius: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 "Segoe UI", "Rubik", Arial, sans-serif;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 17px; margin: 0 0 12px; }
h3 { font-size: 15px; margin: 16px 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.ltr { direction: ltr; unicode-bidi: embed; }
.mono { font-family: Consolas, "Courier New", monospace; font-size: 13px; }
.hidden { display: none !important; }

/* top bar */
.top {
  background: var(--brand);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 4px 18px;
  flex-wrap: wrap;
  padding: 10px 20px;
}
.top .logo { font-weight: 700; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.top .logo img { width: 26px; height: 26px; background: #fff; border-radius: 7px; padding: 2px; }
.top nav { display: flex; gap: 2px; flex-wrap: wrap; flex: 1; }
.top nav a { color: #d6e6f5; padding: 6px 10px; border-radius: 6px; }
.top nav a:hover { background: rgba(255, 255, 255, .12); text-decoration: none; }
.top nav a.active { background: #fff; color: var(--brand); font-weight: 600; }
.top .user { font-size: 13px; color: #d6e6f5; display: flex; gap: 10px; align-items: center; }
.top .user button { background: transparent; border: 1px solid #8fb5d9; color: #fff; padding: 3px 10px; }

main { max-width: 1150px; margin: 0 auto; padding: 22px 16px 80px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
}
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 800px) { .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); } }

/* forms */
label.field { display: block; margin-bottom: 12px; }
label.field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
input, select, textarea {
  font: inherit;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #cfd6df;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 2px solid #9cc3e8; border-color: var(--brand); }
textarea { min-height: 90px; resize: vertical; }
input[type=checkbox] { width: auto; margin: 0; }
button {
  font: inherit;
  cursor: pointer;
  border: 1px solid #cfd6df;
  background: #fff;
  color: var(--text);
  padding: 8px 16px;
  border-radius: 8px;
}
button:hover { background: #f2f4f7; }
button.primary { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
button.primary:hover { background: #093f6e; }
button.danger { color: var(--bad); border-color: #f0b5ae; }
button.danger:hover { background: var(--bad-soft); }
button.big { font-size: 17px; padding: 12px 28px; }
button:disabled { opacity: .5; cursor: default; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

/* tables */
table { width: 100%; border-collapse: collapse; }
th { text-align: right; font-size: 13px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr.click { cursor: pointer; }
tr.click:hover td { background: #f7f9fc; }
.table-wrap { overflow-x: auto; }

/* status */
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 2px 9px; border-radius: 99px; background: #eef1f5; color: var(--muted); white-space: nowrap; }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.blue { background: var(--brand-soft); color: var(--brand); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.stat b { font-size: 24px; display: block; }
/* the billing overview: numbers that open their list (2026-11-23) */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
a.stat { color: inherit; text-decoration: none; }
a.stat:hover { border-color: var(--brand); }
.stat span { font-size: 13px; color: var(--muted); }
.stat.ok b { color: var(--ok); } .stat.bad b { color: var(--bad); } .stat.warn b { color: var(--warn); }
a.button { display: inline-block; padding: 7px 14px; border: 1px solid #cfd6df; border-radius: 8px; background: #fff; color: inherit; text-decoration: none; font-size: 14px; }
a.button:hover { background: #f2f4f7; }

/* toggles: three states */
.tri { display: inline-flex; border: 1px solid #cfd6df; border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.tri button { border: 0; border-radius: 0; padding: 4px 10px; font-size: 13px; background: #fff; }
.tri button + button { border-right: 1px solid #cfd6df; }
.tri button.on.allow { background: var(--ok-soft); color: var(--ok); font-weight: 600; }
.tri button.on.block { background: var(--bad-soft); color: var(--bad); font-weight: 600; }
.tri button.on.auto { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.item { display: flex; align-items: center; gap: 8px 12px; padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.item:last-child { border-bottom: 0; }
.item .name { flex: 1; min-width: 0; }
.item .name small { display: block; color: var(--muted); direction: ltr; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.checks label { display: flex; gap: 8px; align-items: center; padding: 4px 0; }
.list-scroll { max-height: 520px; overflow-y: auto; padding-left: 4px; }

/* code */
.code { font-size: 28px; letter-spacing: 6px; font-weight: 700; direction: ltr; font-family: Consolas, monospace; }

/* save bar */
.savebar {
  position: sticky;
  bottom: 0;
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 12px 18px;
  display: flex;
  gap: 12px;
  align-items: center;
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: 0 -4px 14px rgba(0, 0, 0, .06);
}

/* wizard */
.steps { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.steps div { flex: 1; min-width: 120px; padding: 8px 12px; border-radius: 8px; background: #eef1f5; color: var(--muted); font-size: 13px; }
.steps div.cur { background: var(--brand); color: #fff; font-weight: 600; }
.steps div.done { background: var(--ok-soft); color: var(--ok); }
ol.prep li { margin-bottom: 8px; }
.log { list-style: none; padding: 0; margin: 0; }
.log li { padding: 7px 0; display: flex; gap: 10px; align-items: flex-start; border-bottom: 1px dashed var(--line); }
.log li .ic { width: 20px; flex-shrink: 0; text-align: center; font-weight: 700; }
.log li.ok .ic { color: var(--ok); }
.log li.bad { color: var(--bad); }
.log li.run .ic { color: var(--brand); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .3; } }

.notice { padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.notice.bad { background: var(--bad-soft); color: var(--bad); }
.notice.ok { background: var(--ok-soft); color: var(--ok); }
.notice.info { background: var(--brand-soft); color: var(--brand); }

/* login */
.login { max-width: 360px; margin: 10vh auto; }
.login .logo { text-align: center; margin-bottom: 20px; }
.login .logo img { width: 170px; max-width: 70%; }

#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #1d2430;
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  z-index: 10;
  max-width: 90vw;
}
#toast.bad { background: var(--bad); }

/* phone log, install trace, store */
.logbox { font-family: Consolas, "Courier New", monospace; font-size: 12.5px; max-height: 460px; overflow: auto; background: #f7f9fc; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; margin: 8px 0; direction: ltr; text-align: left; }
.logrow { display: flex; gap: 10px; padding: 2px 0; border-bottom: 1px solid #eef1f5; }
.logrow .ts { color: var(--muted); white-space: nowrap; }
.logrow .tag { color: var(--brand); min-width: 54px; }
.logrow .msg { white-space: pre-wrap; word-break: break-word; direction: auto; unicode-bidi: plaintext; }
.logrow.lv-W .msg { color: var(--warn); }
.logrow.lv-E .msg { color: var(--bad); font-weight: 600; }
pre.trace { white-space: pre-wrap; word-break: break-word; font-size: 12.5px; direction: ltr; text-align: left; unicode-bidi: plaintext; margin: 0; max-height: 70vh; overflow: auto; }
select.narrow { width: auto; }
details.storeapp summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
details.storeapp summary .ltr { width: 100%; }
details.storeapp[open] summary { margin-bottom: 12px; }
.checks.row label { padding-left: 14px; }

/* small screens: the menu is one scrolling row under the logo */
@media (max-width: 800px) {
  .top { padding: 8px 12px; }
  .top nav { order: 3; flex: 1 0 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .top nav::-webkit-scrollbar { display: none; }
  .top nav a { white-space: nowrap; }
  .top .user { margin-inline-start: auto; }
  main { padding: 16px 12px 80px; }
}

.appicon { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.appicon.letter { display: inline-flex; align-items: center; justify-content: center; background: var(--ok); color: #fff; font-weight: 700; font-size: 18px; }
/* the small icon next to an app's name in the lists (owner, 2026-11-16) */
.appicon.sm { width: 24px; height: 24px; border-radius: 6px; vertical-align: middle; margin-inline-end: 8px; display: inline-block; }
.appicon.sm.letter { display: inline-flex; font-size: 13px; background: var(--muted, #8a94a6); }

/* kosher browser review queue */
.spacer-v { height: 14px; }
.reviews { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.review { padding: 10px; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.review img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #eef1f5; border-radius: 8px; }
.review-url { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- the menu by kinds + page tabs (owner, 2026-11-16) ---------- */
.top nav { gap: 4px; align-items: center; }
.top nav .navtop { display: inline-flex; align-items: center; gap: 6px; color: #d6e6f5; background: transparent; border: 0;
  padding: 7px 12px; border-radius: 8px; font: inherit; font-size: 14px; cursor: pointer; white-space: nowrap; }
.top nav .navtop:hover { background: rgba(255, 255, 255, .12); text-decoration: none; }
.top nav .navtop.active, .top nav .navgroup.active > .navtop { background: #fff; color: var(--brand); font-weight: 600; }
.navicon { font-size: 15px; line-height: 1; }
.navcaret { font-size: 10px; opacity: .7; }
.navcount { font-size: 11px; padding: 0 6px; }
.navgroup { position: relative; }
.navlist { display: none; position: absolute; top: calc(100% + 6px); inset-inline-start: 0; min-width: 210px; background: #fff;
  border-radius: 10px; box-shadow: 0 10px 30px rgba(15, 40, 70, .22); padding: 6px; z-index: 50; }
.navgroup.open .navlist { display: block; }
.top nav .navlist a { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #1f2d3d; padding: 9px 12px;
  border-radius: 7px; white-space: nowrap; }
.top nav .navlist a:hover { background: #eef4fa; text-decoration: none; }
.top nav .navlist a.active { background: #e3eefa; color: var(--brand); font-weight: 600; }
.tabs { display: flex; gap: 4px; border-bottom: 2px solid #dfe7ef; margin: 4px 0 14px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { background: transparent; border: 0; border-bottom: 3px solid transparent; border-radius: 0; margin-bottom: -2px;
  padding: 10px 16px; font: inherit; font-size: 15px; color: #4a5b6c; cursor: pointer; white-space: nowrap; }
.tabs button:hover:not(:disabled) { color: var(--brand); }
.tabs button.active { border-bottom-color: var(--brand); color: var(--brand); font-weight: 600; }
.tabs button:disabled { opacity: .35; cursor: default; }
.tabpane > .card, .tabpane > .grid2 { margin-bottom: 14px; }
@media (max-width: 760px) {
  .top nav .navtop { padding: 6px 9px; font-size: 13px; }
  .navlist { position: fixed; top: auto; inset-inline: 10px; min-width: 0; }
}
.check { display: flex; align-items: center; gap: 8px; margin: 10px 0; }
.site-foot { text-align: center; font-size: 13px; color: #607080; padding: 18px 12px 28px; }
.site-foot a { color: inherit; }
div.big { font-size: 22px; font-weight: 700; }

/* the self-install page: how to activate (2026-11-23) */
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin: 10px 0 0; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.choice.on { border-color: var(--brand); background: var(--brand-soft); }
.choice input { margin-top: 4px; }
.choice-more { padding: 4px 14px 6px; }
.code-input { font-size: 20px; letter-spacing: 2px; max-width: 220px; text-align: center; }
/* the picture checks page: a bar per hour (2026-12-03) */
.picbars { display: flex; align-items: flex-end; gap: 2px; height: 140px; direction: ltr; border-bottom: 1px solid var(--line); margin-top: 8px; }
.picbar { flex: 1; min-width: 4px; border-radius: 3px 3px 0 0; background: var(--line); }
.picbar.ok { background: var(--ok); } .picbar.warn { background: var(--warn); } .picbar.bad { background: var(--bad); }
.picaxis { display: flex; justify-content: space-between; direction: ltr; }
.picbusy { margin-top: 8px; }
.picsection { margin: 22px 0 10px; padding-top: 14px; border-top: 1px solid var(--line); }
/* the Sim Tech store (2026-12-03): search, customer picker */
.storesearch { width: 100%; max-width: 480px; margin: 14px 0 4px; }
.picker { position: relative; max-width: 480px; }
.picker input { width: 100%; }
.pickres { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.pickhit { text-align: start; background: #f6f8fb; border: 1px solid #e2e7ef; border-radius: 8px; padding: 6px 10px; cursor: pointer; font: inherit; }
.pickhit:hover { background: #eaf2ff; }
.row.chips { flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.row.chips .chip { cursor: pointer; border: 0; }
button.link { background: none; border: 0; color: var(--danger, #b42318); cursor: pointer; padding: 0; font: inherit; text-decoration: underline; }
