:root {
  --bg: #0f0f12; --panel: #16161b; --panel-2: #1d1d23; --tile: #08080a; --line: #26262d;
  --text: #ececf1; --muted: #9a9aa6; --field: #0b0b0e;
  --accent: #e50914; --accent-soft: rgba(229, 9, 20, .14);
  --ok: #46c46e; --ok-soft: rgba(70, 196, 110, .14);
  --warn: #f0b429; --warn-soft: rgba(240, 180, 41, .14);
  --bad: #ff6b6b; --bad-soft: rgba(255, 107, 107, .14);
  --radius: 10px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: 'Barlow', system-ui, sans-serif; font-size: 15px; color: var(--text); background: var(--bg); }
a { color: inherit; }
h1 { font-size: 26px; font-weight: 700; margin: 0 0 4px; }
h2 { font-size: 18px; font-weight: 600; margin: 0 0 12px; }
p.sub { color: var(--muted); margin: 0 0 20px; }
.ti { vertical-align: -2px; }

/* Layout */
.shell { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: 100vh; }
.side { background: #1f1f2b; color: #eee; padding: 20px 10px; display: flex; flex-direction: column; border-right: 1px solid #2a2a38; }
.brand { font-weight: 700; font-size: 17px; display: flex; align-items: center; gap: 8px; padding: 0 12px; }
.dot { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); display: inline-block; flex: none; }
.role { color: #8b8fa3; font-size: 12px; margin: 4px 0 22px 34px; overflow: hidden; text-overflow: ellipsis; }
.side nav a, .side nav button.nav-btn {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 11px 12px; border: none; border-radius: 6px; background: none;
  text-decoration: none; text-align: left; cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: #8b8fa3; transition: color .12s, background .12s;
}
.side nav a .ti, .side nav button.nav-btn .ti { font-size: 21px; font-weight: 400; }
.side nav a:hover, .side nav button.nav-btn:hover { color: #fff; background: rgba(255, 255, 255, .04); }
.side nav a.on { color: #fff; }
.side nav form { margin: 0; }
.nav-group summary {
  display: flex; align-items: center; gap: 14px; padding: 11px 12px; border-radius: 6px; cursor: pointer; list-style: none;
  font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #8b8fa3;
}
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary .ti { font-size: 21px; font-weight: 400; }
.nav-group summary .chev { margin-left: auto; font-size: 15px; transition: transform .15s; }
.nav-group summary:hover, .nav-group[open] > summary { color: #fff; }
.nav-group[open] > summary .chev { transform: rotate(90deg); }
.nav-group .sub { padding: 2px 0 8px 47px; }
.side nav .nav-group .sub a {
  display: block; padding: 7px 10px; font-size: 13.5px; font-weight: 500; letter-spacing: 0; text-transform: none;
  color: #a9adbd; border-radius: 6px;
}
.side nav .nav-group .sub a:hover { color: #fff; background: rgba(255, 255, 255, .04); }
.side nav .nav-group .sub a.on { color: #fff; border-left: 2px solid var(--accent); border-radius: 0; }
.app-picker { padding: 0 12px 16px; }
.app-picker label { margin: 0 0 6px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #8b8fa3; }
.app-picker select { background: #16161f; border-color: #2a2a38; font-weight: 600; }
.side nav .nav-gap { height: 14px; }
.main { padding: 28px 32px; max-width: 1200px; width: 100%; }
.solo { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #08080a; }

/* Surfaces */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 18px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat .n { font-size: 28px; font-weight: 700; }
.stat .l { color: var(--muted); font-size: 13px; }
.page-bar { background: var(--tile); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; text-align: center; font-size: 20px; font-weight: 600; margin-bottom: 18px; }

/* Tile dashboard */
.tiles { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin-bottom: 22px; }
.tile { background: var(--tile); border: 1px solid var(--line); border-radius: 12px; min-height: 108px; padding: 18px 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; text-decoration: none; color: var(--text); font-weight: 600; font-size: 15px; transition: border-color .12s, transform .12s; cursor: pointer; font-family: inherit; width: 100%; }
.tile .ti { font-size: 28px; color: #fff; }
.tile:hover, .tile:focus-visible { border-color: var(--accent); transform: translateY(-2px); outline: none; }
.tile .count { color: var(--muted); font-weight: 500; }
.tile.soon { opacity: .4; border-style: dashed; cursor: default; }
.tile.soon:hover { transform: none; border-color: var(--line); }
.tile .badge { font-size: 11px; font-weight: 600; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; }
form.tile-form { margin: 0; display: contents; }
.section-label { color: var(--muted); font-size: 13px; font-weight: 600; margin: 6px 0 12px; }

/* Forms */
label { display: block; font-weight: 600; font-size: 14px; margin: 14px 0 6px; }
label.inline { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.hint { color: var(--muted); font-size: 13px; font-weight: 400; margin-top: 4px; }
input[type=text], input[type=search], input[type=email], input[type=password], input[type=number], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: var(--field); color: var(--text);
}
input::placeholder, textarea::placeholder { color: #5d5d68; }
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
input[type=file] { color: var(--muted); }
input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; }
input[type=range] { accent-color: var(--accent); }
button, .btn { font: inherit; font-weight: 600; padding: 10px 16px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); cursor: pointer; text-decoration: none; display: inline-block; color: var(--text); }
button:hover, .btn:hover { border-color: #3a3a44; }
button.primary, .btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.danger { color: var(--bad); border-color: rgba(255, 107, 107, .35); }
button.small, .btn.small { padding: 6px 10px; font-size: 13px; }
button.link { background: none; border: none; padding: 0; color: var(--muted); font-weight: 500; text-align: left; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 13px; color: var(--muted); font-weight: 500; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
td form { display: inline; }

/* Status */
.pill { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; display: inline-block; }
.pill.active { background: var(--ok-soft); color: var(--ok); }
.pill.trial { background: var(--warn-soft); color: var(--warn); }
.pill.suspended { background: var(--bad-soft); color: var(--bad); }
.bar { height: 6px; background: var(--line); border-radius: 3px; margin-top: 4px; min-width: 90px; }
.bar div { height: 6px; background: var(--accent); border-radius: 3px; max-width: 100%; }
.flash { padding: 12px 14px; border-radius: 8px; margin-bottom: 18px; font-weight: 500; }
.flash.success { background: var(--ok-soft); color: var(--ok); }
.flash.error { background: var(--bad-soft); color: var(--bad); }
.banner { background: var(--panel-2); color: #fff; padding: 10px 14px; border-radius: 8px; margin-bottom: 18px; display: flex; align-items: center; gap: 12px; justify-content: space-between; border: 1px solid var(--line); }
.banner.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.code { font-family: ui-monospace, Consolas, monospace; background: #0b0b0e; border: 1px solid var(--line); padding: 2px 8px; border-radius: 6px; }
.muted { color: var(--muted); }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 18px; align-items: start; }

/* Appearance */
.swatches { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.swatch { width: 32px; height: 32px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; padding: 0; }
.swatch.on { border-color: #fff; }
.preview { position: relative; aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; background: #101010; color: #fff; }
.preview .wall { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.preview .dim { position: absolute; inset: 0; background: #000; }
.preview .ui { position: absolute; inset: 0; padding: 12px 14px; display: flex; flex-direction: column; font-weight: 600; }
.preview .top { display: flex; align-items: center; gap: 8px; }
.preview .top img { height: 26px; }
.preview .mark { width: 22px; height: 22px; border-radius: 50%; }
.preview .tiles { display: flex; gap: 10px; height: 38%; margin: 0; }
.preview .tile { flex: 1; min-height: 0; border-radius: 10px; background: rgba(28, 26, 30, .82); border: 1px solid rgba(255, 255, 255, .2); display: grid; place-items: center; font-size: 14px; padding: 0; }
.preview .tile.focus { border: 2px solid #fff; }
.thumb { width: 96px; height: 54px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); background: #000; }
.logo-thumb { height: 48px; max-width: 160px; object-fit: contain; border-radius: 6px; border: 1px solid var(--line); background: #000; padding: 4px; }

/* Sign-in */
.login { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 32px; width: 100%; max-width: 400px; color: var(--text); }

/* Getting started checklist */
.checklist .step { display: flex; gap: 14px; align-items: center; padding: 12px 10px; border-radius: 8px; }
.checklist .step + .step { border-top: 1px solid var(--line); }
.checklist .step.next { background: var(--accent-soft); }
.checklist .num { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--panel-2); color: var(--muted); flex: none; }
.checklist .step.next .num { background: var(--accent); color: #fff; }
.checklist .step.done .num { background: var(--ok-soft); color: var(--ok); }
.checklist .step.done strong { color: var(--muted); text-decoration: line-through; }

/* Portals: stacked, Name above Address, one portal after another */
.portal-row { display: grid; grid-template-columns: 1fr; gap: 0; max-width: 560px; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.portal-row label { margin-top: 14px; color: #c9c9d1; }
.portal-row input { background: #26262d; border-color: #2f2f37; }
.test-cell { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.test-out { min-height: 18px; margin: 0; }

.btn.blue { background: #4f46e5; border-color: #4f46e5; color: #fff; }
button.navy { background: #2a2d7a; border-color: #2a2d7a; color: #fff; }
.dns-table td { padding: 16px 10px; }
.dns-actions { white-space: nowrap; text-align: right; }
.dns-actions form { display: inline; }
.code-cell { font-family: ui-monospace, Consolas, monospace; color: #c9c9d1; word-break: break-all; }
.checks label.inline { margin: 8px 0; color: #c9c9d1; }
.ui-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 18px; }
.ui-card label.inline { margin: 7px 0; color: #c9c9d1; font-size: 14px; }
/* Phones and small tablets: a top bar with a Menu button; the menu slides in. */
.mtop { display: none; }
.nav-shade { display: none; }
@media (max-width: 800px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .mtop {
    display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 30;
    background: #1f1f2b; color: #eee; padding: 10px 12px; border-bottom: 1px solid #2a2a38;
  }
  .mtop .brand { padding: 0; font-size: 16px; min-width: 0; }
  .mtop .brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mtop .menu-btn { margin-left: auto; background: #2a2a38; border: 0; color: #fff; border-radius: 8px; padding: 8px 12px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
  .side {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 40; width: min(300px, 86vw); overflow-y: auto;
    transform: translateX(-105%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(0, 0, 0, .5);
  }
  body.nav-open .side { transform: none; }
  body.nav-open .nav-shade { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(0, 0, 0, .55); }
  body.nav-open { overflow: hidden; }
  .main { padding: 16px 14px; min-width: 0; }
  .two { grid-template-columns: minmax(0, 1fr); }
  .two > * { min-width: 0; }
  .seg { flex-wrap: wrap; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  /* Wide tables scroll inside their own box, never the whole page. */
  .card, .table-wrap { max-width: 100%; }
  .card:has(> table), .table-wrap { overflow-x: auto; }
  h1 { font-size: 24px; }
}

/* Player defaults */
.player-card { padding: 6px 8px; overflow-x: auto; }
.player-table td { padding: 12px 10px; }
.player-table th.c, .player-table td.c { text-align: center; width: 150px; }
.player-table td:nth-child(2) { width: 260px; }
.player-table .group-row td { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 18px 10px 8px; border-bottom: 1px solid var(--line); }
.player-table label.cell-label { margin: 0; font-weight: 600; }
.player-table .hint { max-width: 460px; }
.switch { display: inline-flex; align-items: center; gap: 10px; margin: 0; cursor: pointer; font-weight: 500; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch span { width: 40px; height: 22px; border-radius: 11px; background: #3a3a44; position: relative; transition: background .12s; flex: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .12s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch em { font-style: normal; color: var(--muted); font-size: 14px; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-right: 7px; vertical-align: 1px; box-shadow: 0 0 0 3px var(--ok-soft); }
/* Preview: the App name uses the App's proportions (half the logo height, extra bold). */
.preview { --pv-name: 13px; }
.preview .pname { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.preview-card { position: sticky; top: 20px; }
.two > div:has(> .preview-card) { align-self: stretch; }
.preview .pname { font-size: calc(var(--pv-name) * var(--pv-scale, 1)); }
.preview-signin { --pv-name: 18px; margin-top: 10px; }
.preview-signin .top img { height: 36px; }
.preview-signin .mark { width: 32px; height: 32px; }
.signin-box { width: 42%; background: rgba(24, 24, 24, .9); border: 1px solid rgba(255, 255, 255, .1); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.signin-box .f { height: 14px; border-radius: 4px; background: #262626; }
.signin-box .b { height: 16px; border-radius: 4px; }
/* Movies & Series preview: the App's top bar (logo 44 vs 52 on home) with sidebar and posters. */
.preview-browse { --pv-name: 11px; background: #101010; }
.preview-browse .top img { height: 22px; }
.preview-browse .mark { width: 18px; height: 18px; }
.preview-browse .bh { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.preview-browse .bh-mid { flex: 1; justify-content: center; min-width: 0; }
.preview-browse .bb { flex: 1; display: flex; gap: 8px; min-height: 0; }
.preview-browse .bside { width: 26%; display: flex; flex-direction: column; gap: 2px; font-size: 10px; font-weight: 600; color: #aaa; }
.preview-browse .bside div { padding: 4px 6px; border-bottom: 1px solid rgba(255,255,255,.08); border-radius: 3px; }
.preview-browse .bside .on { color: #fff; }
.preview-browse .bgrid { flex: 1; display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; align-content: start; }
.preview-browse .bgrid div { aspect-ratio: 2 / 3; border-radius: 4px; background: #262626; }

/* Home screen buttons page */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { border: none; border-radius: 0; background: var(--field); color: var(--muted); padding: 8px 14px; font-weight: 600; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--accent); color: #fff; }
.btn-row { display: grid; grid-template-columns: 18px auto 44px minmax(0, 1fr) auto 44px; align-items: center; gap: 10px; padding: 8px 6px; border-bottom: 1px solid var(--line); background: var(--panel); }
.btn-row.off input[type=text] { opacity: .45; }
.btn-row.dragging { opacity: .4; }
.btn-row.drop { box-shadow: inset 0 2px 0 var(--accent); }
.btn-row .grip { color: #6f6f7a; cursor: grab; font-size: 18px; }
.btn-row .arrows { display: flex; gap: 4px; }
.btn-row .arrows button { padding: 3px 6px; line-height: 1; }
.btn-row .arrows button:disabled { opacity: .3; cursor: default; }
.btn-row .orig { font-size: 12px; white-space: nowrap; }
.icon-pick { position: relative; }
.icon-pick summary { list-style: none; width: 40px; height: 36px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line); display: grid; place-items: center; cursor: pointer; font-size: 20px; }
.icon-pick summary::-webkit-details-marker { display: none; }
.icon-pick[open] summary { border-color: var(--accent); }
.icon-grid { position: absolute; z-index: 20; top: 42px; left: 0; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px; display: grid; grid-template-columns: repeat(5, 38px); gap: 6px; }
.icon-grid button { padding: 0; width: 38px; height: 34px; font-size: 18px; display: grid; place-items: center; }
.icon-grid button.on { border-color: var(--accent); color: var(--accent); }

/* Preview: home screen buttons under the tiles */
.preview .pshort { display: flex; gap: 5px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.preview .pbtn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; background: rgba(28, 28, 28, .85); border: 1px solid rgba(255, 255, 255, .18); border-radius: 6px; font-size: 9px; font-weight: 700; white-space: nowrap; }
.preview .pbtn .ti { font-size: 11px; }
.preview .pshort.size-small .pbtn { height: 20px; min-width: 58px; padding: 0 6px; }
.preview .pshort.size-medium .pbtn { height: 24px; min-width: 66px; padding: 0 7px; font-size: 10px; }
.preview .pshort.size-medium .pbtn .ti { font-size: 12px; }
.preview .pshort.size-large .pbtn { height: 28px; min-width: 74px; padding: 0 8px; font-size: 11px; }
.preview .pshort.size-large .pbtn .ti { font-size: 14px; }
.preview .pshort.icononly .pbtn { min-width: 0; aspect-ratio: 1; padding: 0; }
.preview .pshort.icononly .pbtn b { display: none; }
.preview .pshort.size-xsmall .pbtn { height: 17px; min-width: 50px; padding: 0 5px; font-size: 8px; }
.preview .pshort.size-xsmall .pbtn .ti { font-size: 10px; }
/* Logo size in the previews (matches the App's proportions per screen). */
.preview .top img { height: calc(26px * var(--pv-logo, 1)); }
.preview .mark { width: calc(22px * var(--pv-logo, 1)); height: calc(22px * var(--pv-logo, 1)); }
.preview .pname { font-size: calc(var(--pv-name) * var(--pv-scale, 1) * var(--pv-logo, 1)); }
.preview-signin .top img { height: calc(36px * var(--pv-logo, 1)); }
.preview-signin .mark { width: calc(32px * var(--pv-logo, 1)); height: calc(32px * var(--pv-logo, 1)); }
.preview-browse .top img { height: calc(22px * var(--pv-logo, 1)); }
.preview-browse .mark { width: calc(18px * var(--pv-logo, 1)); height: calc(18px * var(--pv-logo, 1)); }
.preview-loading { --pv-name: 24px; margin-top: 10px; }
.preview-loading .top img { height: calc(48px * var(--pv-logo, 1)); }
.preview-loading .mark { width: calc(44px * var(--pv-logo, 1)); height: calc(44px * var(--pv-logo, 1)); }
.preview .spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .15); }
.name-places label.inline { margin: 6px 0; font-weight: 500; }

/* Client page: Access */
.access-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 8px 28px; }
.access-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0; padding: 10px 0; border-bottom: 1px solid var(--line); font-weight: 500; cursor: pointer; }
.access-name { font-weight: 600; }
.dns-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 8px; margin-top: 8px; }
/* Client page: Get their App ready */
.ready-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ready-body { flex: 1; min-width: 0; }
.ready-body .hint { overflow-wrap: anywhere; }
.ready-mark { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-2); color: var(--muted); flex: none; font-size: 17px; }
.ready-mark.ok { background: var(--ok-soft); color: var(--ok); }
.ready-row .logo-thumb { max-height: 40px; }
.code-steps { margin: 6px 0 0; padding-left: 18px; }
.code-steps li { margin: 3px 0; }
.ready-done { margin-top: 16px; padding: 14px; border-radius: var(--radius); background: var(--ok-soft); }
.ready-done pre { white-space: pre-wrap; margin: 10px 0; padding: 10px 12px; }
.spin-icon { animation: spin 1s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
/* Dashboard: Your App */
.your-app { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; border-color: var(--accent); }
.your-app > div:first-child { flex: 1 1 280px; }
.your-app-side { flex: 1 1 260px; }
.dl-code { font-size: 44px; font-weight: 700; letter-spacing: .06em; line-height: 1.1; margin-top: 4px; }
.main-dns { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); }
.main-dns .ti { font-size: 20px; margin-top: 1px; }
.web-card { display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.web-card > div:first-child { flex: 1 1 260px; }
/* Sidebar: which App you're working on */
.ctx { margin: 8px 12px 14px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); }
.ctx-l { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.ctx-n { font-weight: 700; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctx.mine { border-color: var(--accent); }
.ctx.sub { border-color: #d9a400; background: rgba(217, 164, 0, .08); }
.ctx.sub .ctx-l { color: #e8b923; }
.ctx-back { margin-top: 8px; width: 100%; }
.nav-sep { margin: 16px 12px 6px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.push-actions button { min-width: 220px; }
/* App background: phone held upright preview */
.phone-card { margin-bottom: 16px; }
.phone { width: 190px; margin: 6px auto 4px; padding: 8px; border-radius: 28px; background: #050505; border: 1px solid var(--line); }
.phone-screen { position: relative; aspect-ratio: 9 / 19.5; border-radius: 20px; overflow: hidden; background: #0b0b0e; }
.phone-screen .wall { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.phone-screen .dim { position: absolute; inset: 0; background: #000; }
.phone-ui { position: absolute; inset: 0; padding: 14px 10px; display: flex; flex-direction: column; gap: 10px; color: #fff; }
.phone-top { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 10px; }
.phone-top .mark { width: 14px; height: 14px; border-radius: 50%; }
.phone-tiles { margin-top: auto; margin-bottom: 30%; display: grid; gap: 6px; }
.phone-tiles div { border-radius: 8px; padding: 12px 8px; text-align: center; font-size: 10px; font-weight: 700; background: rgba(28, 26, 30, .85); border: 1px solid rgba(255, 255, 255, .15); }
/* Reseller panels */
.panel-edit { display: grid; grid-template-columns: minmax(90px, 1fr) minmax(0, 2fr) auto; gap: 6px; align-items: center; }
.panel-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; min-width: 0; }
.panel-frame { width: 100%; height: calc(100vh - 150px); min-height: 480px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.nav-badge { margin-left: 8px; font-size: 10px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; opacity: .8; }
/* Connected users */
.limit-bar { height: 6px; border-radius: 3px; background: var(--panel-2); margin-top: 8px; overflow: hidden; }
.limit-bar div { height: 100%; border-radius: 3px; transition: width .3s; }
.limit-bar .ok { background: var(--ok); } .limit-bar .warn { background: #e8b923; } .limit-bar .bad { background: var(--bad); }
.line-row { cursor: pointer; }
.line-row:hover { background: var(--panel-2); }
.line-row .chev { transition: transform .15s; color: var(--muted); }
tbody.line.open .line-row .chev { transform: rotate(90deg); }
.kinds .ti { color: var(--muted); margin-right: 3px; }
.dev-table { width: 100%; background: var(--panel-2); border-radius: 8px; }
.dev-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); }
.watch, .watch-line { color: var(--accent); }
.who-dns label.inline { display: flex; margin: 6px 0; font-weight: 500; }
.who-some { margin: 6px 0 4px 26px; padding: 8px 12px; border-left: 2px solid var(--line); }
.brand-logo { height: 36px; width: auto; max-width: 64px; object-fit: contain; flex: none; }
.side .brand { align-items: center; }
.login-logo { max-height: 80px; max-width: 220px; object-fit: contain; }
a.ctx-link { display: block; color: inherit; text-decoration: none; }
a.ctx-link:hover { background: var(--panel); }
a.ctx-link .ti { font-size: 12px; opacity: .7; }
/* Long lines (web addresses) in copy-and-send messages wrap instead of widening the page. */
pre.code { white-space: pre-wrap; overflow-wrap: anywhere; }
/* Small phones: Home screen buttons fit (the ↑↓ arrows reorder; dragging needs a mouse anyway). */
@media (max-width: 420px) {
  .btn-row { grid-template-columns: auto 38px minmax(0, 1fr) auto 38px; gap: 6px; padding: 8px 2px; }
  .btn-row .grip { display: none; }
  .preview-card { max-width: 100%; overflow: hidden; }
}
@media (max-width: 420px) {
  .access-grid .row { flex-wrap: wrap; gap: 6px; }
  .access-row .switch { flex: none; }
}
.wall-screens { display: flex; flex-wrap: wrap; gap: 4px 20px; }
/* Web player look preview */
.wl-prev { --wl: #e50914; position: relative; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; background: #0d0d10; color: #eee; font-size: 11px; }
.wl-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.wl-dim { position: absolute; inset: 0; background: #000; }
.wl-top { position: relative; display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: rgba(10, 10, 13, .82); }
.wl-brand { display: flex; align-items: center; gap: 6px; font-weight: 800; margin-right: 8px; }
.wl-brand img { height: 18px; max-width: 60px; object-fit: contain; }
.wl-tab { padding: 3px 8px; border-radius: 6px; color: #aaa; font-weight: 600; }
.wl-tab.on { color: #fff; background: #1c1c22; box-shadow: inset 0 -2px 0 var(--wl); }
.wl-body { position: relative; display: grid; grid-template-columns: 34% 1fr; gap: 8px; padding: 8px; }
.wl-list { display: grid; gap: 4px; }
.wl-ch { padding: 6px 8px; border-radius: 6px; background: rgba(13, 13, 16, .6); }
.wl-ch.on { box-shadow: inset 0 0 0 1px var(--wl); }
.wl-video { aspect-ratio: 16 / 9; border-radius: 8px; background: #000; display: grid; place-items: center; color: var(--wl); font-size: 20px; }
.wl-card { position: absolute; right: 10px; bottom: 10px; width: 36%; background: rgba(21, 21, 26, .94); border: 1px solid #26262d; border-radius: 10px; padding: 8px; display: grid; gap: 5px; }
.wl-in { height: 12px; border-radius: 4px; background: #0f0f13; border: 1px solid #26262d; }
.wl-btn { background: var(--wl); color: #fff; border-radius: 5px; text-align: center; padding: 3px; font-weight: 700; }
/* Connected users: "what they're watching" stands out */
.watch:not(:empty), .watch-line:not(:empty) {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; padding: 3px 10px 3px 8px; border-radius: 999px;
  background: var(--accent); color: #fff !important; font-weight: 700; font-size: 12px; letter-spacing: .01em;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .15), 0 2px 10px rgba(0, 0, 0, .35);
}
.watch:not(:empty)::before, .watch-line:not(:empty)::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: watchPulse 1.4s ease-in-out infinite;
}
@keyframes watchPulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.watch-line:not(:empty) { display: flex; width: fit-content; }
input[type=file] { max-width: 100%; }
@media (max-width: 600px) { .dns-row { grid-template-columns: minmax(0, 1fr) !important; } }
/* VPN form, like the owner's picture: labels above wide white boxes. */
.vpn-card > label:not(.inline) { display: block; margin: 16px 0 6px; color: var(--muted, #a4a4ae); font-weight: 500; }
.vpn-card .vpn-input { width: 100%; background: #fff; color: #111; border: 1px solid #d6d6dc; border-radius: 4px; padding: 10px 14px; font-size: 15px; }
.vpn-card .vpn-input::placeholder { color: #8a8a94; }
.vpn-card .inline { display: block; margin: 6px 0; }
/* Home screen themes: preview cards like the reference */
.ht-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 18px; margin-top: 18px; }
.ht-card { text-align: left; background: var(--panel, #16161c); border: 1px solid var(--line, #26262d); border-left: 3px solid transparent; border-radius: 6px; padding: 16px; cursor: pointer; color: inherit; font: inherit; }
.ht-card:hover { border-color: #3a3a46; }
.ht-card.picked { border-left-color: var(--accent); }
.ht-card.picked .ht-name { color: var(--accent); }
.ht-name { font-size: 12px; font-weight: 700; letter-spacing: .04em; color: #a4a4ae; margin-bottom: 10px; }
.ht-about { font-size: 12.5px; color: #9a9aa6; margin-top: 10px; }
.ht-tv { position: relative; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: radial-gradient(ellipse at 50% 20%, #1b2b5c, #070b1f 70%); color: #fff; font-size: 8px; }
.ht-tv.dark { background: #0b0c10; }
.ht-logo { position: absolute; left: 50%; top: 5%; transform: translateX(-50%); height: 17%; display: flex; align-items: center; justify-content: center; color: #f5c542; font-weight: 900; }
.ht-logo img { height: 100%; max-height: 100%; width: auto; max-width: 70px; object-fit: contain; display: block; }
.ht-top { position: absolute; right: 6%; top: 8%; display: flex; gap: 5px; opacity: .8; }
.ht-top i, .ht-icons i { width: 8px; height: 8px; border-radius: 2px; background: #ffffff99; display: block; }
.ht-icons { position: absolute; display: flex; gap: 6px; }
.ht-t { position: absolute; border: 1px solid #ffffff30; border-radius: 5px; background: #ffffff12; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-weight: 600; letter-spacing: .03em; }
.ht-t.on { border-color: var(--accent); box-shadow: 0 0 8px var(--accent); }
.ht-t b { display: block; width: 38%; aspect-ratio: 1.4; border: 1.5px solid #fff; border-radius: 3px; }
.ht-exp { position: absolute; bottom: 5%; left: 0; right: 0; text-align: center; font-size: 6.5px; color: #ffffffaa; }
.ht-side { position: absolute; left: 0; top: 0; bottom: 0; width: 9%; background: #00000070; display: flex; flex-direction: column; align-items: center; gap: 7px; padding-top: 22%; }
.ht-side i { width: 8px; height: 8px; border-radius: 2px; background: #ffffffaa; display: block; }
.ht-side i.on { background: var(--accent); }
.ht-lbl { position: absolute; left: 12%; font-size: 6.5px; color: #ffffffcc; letter-spacing: .06em; }
.ht-row { position: absolute; left: 12%; right: 3%; display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.ht-row div { aspect-ratio: 2 / 3; border-radius: 2px; background: linear-gradient(#3b5998, #0d1633); }
.ht-row div:nth-child(2n) { background: linear-gradient(#c0392b, #2c0f0c); }
.ht-row div:nth-child(3n) { background: linear-gradient(#e0b04a, #4a3208); }
/* Scrolling message preview: the label has its own place; the text scrolls only to its right. */
.tk-bar { display: flex; height: 44px; background: #000000e6; border-top: 2px solid var(--accent); border-radius: 4px; overflow: hidden; }
.tk-label { flex: none; background: var(--accent); color: #fff; font-weight: 900; letter-spacing: .06em; display: flex; align-items: center; padding: 0 14px; }
.tk-area { position: relative; flex: 1; overflow: hidden; display: flex; align-items: center; }
.tk-run { white-space: nowrap; color: #fff; font-weight: 600; padding-left: 100%; animation: tkRun 14s linear infinite; }
@keyframes tkRun { from { transform: translateX(0); } to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .tk-run { animation: none; padding-left: 12px; } }
/* Report number boxes (not links) */
div.tile { cursor: default; }
div.tile:hover { transform: none; border-color: var(--line); }
.tile-label { color: var(--muted, #a4a4ae); font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.tile-value { font-size: 34px; font-weight: 800; color: var(--text, #fff); }
.dot-live { width: 9px; height: 9px; border-radius: 50%; background: #46c46e; box-shadow: 0 0 6px #46c46e; display: inline-block; }

/* VPN access for sub-resellers: ticks in columns */
.vpn-access-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 4px 16px; margin: 14px 0 4px; }
.vpn-access-grid .inline { margin: 4px 0; }
