.login-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: white;
}
.login-brand {
  background: #111c30;
  color: #fff;
  padding: 30px 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.login-brand .brand {
  padding: 0;
}
.login-brand h1 {
  font-size: 38px;
  line-height: 1.6;
  letter-spacing: -1px;
}
.login-brand p {
  color: #96a7c0;
  font-size: 14px;
  line-height: 1.9;
}
.login-eyebrow {
  font-size: 10px !important;
  letter-spacing: 3px;
  color: #638adc !important;
}
.login-form {
  display: grid;
  place-items: center;
  padding: 40px;
}
.login-form > div {
  width: 100%;
  max-width: 360px;
}
.login-form h2 {
  font-size: 27px;
  margin-bottom: 10px;
}
.login-form .btn {
  padding: 12px;
  min-height: 44px;
}
.login-form form {
  margin-top: 27px;
}
.login-form small {
  font-size: 11px;
  line-height: 1.8;
}
.full {
  width: 100%;
}
.login-switch {
  text-align: center;
  margin-top: 22px;
  font-size: 12px;
}
.login-switch button {
  color: #376ede;
}
.support-note {
  font-size: 12px;
  color: #8b99ad;
  line-height: 1.8;
  margin-top: 26px;
}
.balance-amount {
  font-size: 36px;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  letter-spacing: -1px;
  margin: 15px 0;
}
.balance-amount small {
  font-size: 12px;
  margin-left: 8px;
  font-weight: 400;
}
.device-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.device-card {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 23px;
}
.device-card:hover {
  border-color: #8daae9;
}
.device-card h3 {
  font-size: 15px;
  margin: 0 0 7px;
}
.device-card .mono {
  color: #8898b0;
}
.device-card .kv {
  margin-top: 23px;
}
.zero-chart {
  height: 175px;
  display: grid;
  place-items: center;
  color: #95a2b5;
  font-size: 12px;
  background: repeating-linear-gradient(
    to top,
    transparent 0,
    transparent 42px,
    #edf1f6 43px,
    #edf1f6 44px
  );
}
.auth-badge {
  font-size: 12px;
  color: #76879f;
  display: flex;
  align-items: center;
  gap: 12px;
}
.alert {
  background: #fff5e8;
  color: #9f7337;
  border-radius: 6px;
  padding: 14px;
  font-size: 12px;
  line-height: 1.8;
}
.qr-code-word {
  overflow-wrap: anywhere;
  white-space: normal;
  font-size: 12px;
}
.commands-note {
  font-size: 11px;
  color: #8898ae;
  margin-top: 12px;
}
.scanner-video {
  width: 100%;
  max-height: 350px;
  background: #111c30;
  border-radius: 8px;
}
.data-pending {
  color: #8c98aa;
}
.op-label {
  font-size: 10px;
  color: #8291a7;
  line-height: 1.6;
}
.command-history {
  font-size: 12px;
}
.account-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}
.last-seen {
  font-size: 11px;
  color: #8995a8;
}
.network-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.first-setup {
  background: #edf3ff;
  border: 1px solid #dce7fc;
  border-radius: 8px;
  padding: 20px 23px;
  margin-bottom: 25px;
  font-size: 12px;
  line-height: 1.8;
}
.first-setup strong {
  display: block;
  color: #3466c8;
  margin-bottom: 5px;
}
.loading {
  padding: 80px;
  text-align: center;
  color: #8192a9;
}
.inline-error {
  font-size: 12px;
  color: #be5261;
  margin: 15px 0;
}
.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.receipt {
  word-break: break-all;
  font-size: 12px;
}
.limit-note {
  font-size: 11px;
  color: #9a854f;
  line-height: 1.8;
}
.progress {
  width: 100%;
  height: 5px;
  background: #edf1f7;
  border-radius: 3px;
  overflow: hidden;
}
.progress > span {
  display: block;
  height: 100%;
  background: #5a85e6;
}
.net-metric {
  font-size: 23px;
  font-weight: 600;
  margin-top: 8px;
}
.net-metric small {
  font-size: 11px;
  font-weight: 400;
  margin-left: 5px;
}
.topbar .link {
  font-size: 11px;
}
.form-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.recent {
  max-height: 450px;
  overflow: auto;
}
@media (max-width: 800px) {
  .login-layout {
    grid-template-columns: 1fr;
  }
  .login-brand {
    padding: 24px;
    min-height: 160px;
  }
  .login-brand > div:nth-child(2) {
    display: none;
  }
  .login-brand > small {
    margin-top: 28px;
  }
  .login-form {
    padding: 35px 24px;
  }
  .device-grid,
  .network-grid {
    grid-template-columns: 1fr;
  }
  .balance-amount {
    font-size: 29px;
  }
  .form-field-row {
    grid-template-columns: 1fr;
  }
  .auth-badge span {
    display: none;
  }
  .loading {
    padding: 50px 20px;
  }
  .page-head .actions {
    width: 100%;
  }
}

/* Device revenue: keep filters, figures and units legible at every width. */
.revenue-filters { display:flex; flex-wrap:wrap; gap:16px; padding:20px; align-items:end; }
.revenue-filters .field { flex:1 1 160px; margin:0; min-width:0; }
.revenue-filters select, .revenue-filters input { width:100%; min-width:0; }
.revenue-filters button { flex:0 0 auto; margin-bottom:1px; }
.revenue-model-summary, .revenue-detail-head, .revenue-pagination { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:16px; }
.revenue-model-summary p, .revenue-detail-head p { margin:8px 0 0; font-size:12px; color:#7f8da3; }
.revenue-pagination { margin:16px 0 24px; color:#7f8da3; font-size:12px; }
.revenue-intervals { margin-top:24px; }
.revenue-intervals summary { cursor:pointer; padding:12px 0; }
.revenue-detail-head strong { font-size:18px; overflow-wrap:anywhere; }
.metric-value { flex-wrap:wrap; overflow-wrap:anywhere; gap:4px; }
@media(max-width:600px) {
  .revenue-filters { padding:16px; gap:12px; }
  .revenue-filters .field { flex-basis:calc(50% - 12px); }
  .revenue-filters .field:has(select) { flex-basis:100%; }
  .revenue-detail-head { align-items:flex-start; }
  .revenue-pagination { align-items:flex-start; }
}
.metric-value { display:flex; align-items:baseline; }
.metric-value small { display:inline-block; white-space:nowrap; }

.parent-qr { display:flex; justify-content:center; padding:16px; background:white; }
.parent-qr svg { max-width:100%; height:auto; width:260px; }

.relation-effective { display:block; margin-top:4px; line-height:1.5; }

.income-tabs { display:flex; gap:4px; padding:3px; background:#f1f4f9; border-radius:8px; }
.income-tabs button { border:0; background:transparent; color:#63738b; border-radius:6px; padding:7px 16px; font:inherit; font-size:12px; cursor:pointer; }
.income-tabs button[aria-pressed="true"] { background:white; color:#285dbd; box-shadow:0 1px 4px #243a6020; }
.income-total { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; padding-bottom:24px; border-bottom:1px solid #e8edf5; }
.income-total > span { font-weight:600; font-size:15px; }
.income-total > span small { display:block; margin-top:7px; font-size:11px; font-weight:400; color:#8391a7; }
.income-total > div, .income-components dd { display:flex; align-items:baseline; flex-wrap:wrap; gap:6px; min-width:0; }
.income-total strong { font-size:32px; font-weight:600; color:#285dbd; overflow-wrap:anywhere; }
.income-breakdown small { font-size:11px; color:#8391a7; }
.income-components { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:24px; margin:24px 0; }
.income-components > div { min-width:0; }
.income-components dt { font-size:13px; color:#63738b; margin-bottom:10px; }
.income-components dd { margin:0 0 8px; }
.income-components dd strong { font-size:22px; font-weight:600; overflow-wrap:anywhere; }
.income-formula { color:#8391a7; font-size:11px; line-height:1.8; margin:12px 0 0; }
dialog .income-components { grid-template-columns:repeat(2,minmax(0,1fr)); }
@media(max-width:1000px) {
  .income-components { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:480px) {
  .income-total { align-items:flex-start; flex-direction:column; gap:14px; padding-bottom:20px; }
  .income-total strong { font-size:28px; }
  .income-components { gap:22px 16px; }
  .income-components dd strong { font-size:20px; }
}

/* Network health: one shared time axis, with gaps for unavailable telemetry. */
.health-overview { display:flex; justify-content:space-between; flex-wrap:wrap; gap:24px; padding-bottom:22px; }
.health-label { color:#63738b; font-size:12px; }
.health-number { display:flex; align-items:baseline; flex-wrap:wrap; gap:8px; margin-top:8px; color:#285dbd; font-size:38px; font-weight:600; }
.health-number small { color:#8391a7; font-size:13px; font-weight:400; }
.health-quality { padding:4px 8px; border-radius:5px; background:#edf3ff; font-size:12px; font-weight:400; }
.health-quality.poor { color:#ac4141; background:#fff0ee; }
.health-yesterday { text-align:right; }
.health-yesterday strong { display:block; font-size:25px; font-weight:600; margin:10px 0; }
.health-yesterday small { font-size:12px; color:#8391a7; font-weight:400; }
.health-note { color:#8391a7; font-size:11px; line-height:1.8; margin:8px 0 0; }
.health-chart-heading { display:flex; justify-content:space-between; flex-wrap:wrap; gap:8px; font-size:11px; color:#63738b; border-top:1px solid #e8edf5; padding:20px 0 32px; }
.health-plot-wrap { position:relative; padding-left:30px; padding-right:4px; }
.health-y-axis { position:absolute; top:-6px; height:232px; line-height:12px; left:0; display:flex; flex-direction:column; justify-content:space-between; color:#8391a7; font-size:10px; }
.health-plot { position:relative; height:220px; margin-bottom:32px; touch-action:pan-y; }
.health-svg { display:block; height:220px; width:100%; overflow:visible; }
.health-svg path { fill:none; vector-effect:non-scaling-stroke; }
.health-grid { stroke:#e8edf5; stroke-width:1; }
.health-midnight { stroke:#bdc9db; stroke-dasharray:4 4; stroke-width:1; }
.health-line { stroke:#4379de; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.health-day-marker { position:absolute; top:-19px; white-space:nowrap; color:#8391a7; font-size:10px; transform:translateX(-50%); }
.health-x-axis { position:absolute; left:0; right:0; top:234px; color:#8391a7; font-size:10px; pointer-events:none; }
.health-tick { position:absolute; white-space:nowrap; transform:translateX(-50%); }
.health-tick:first-child { transform:none; }
.health-tick:last-child { transform:translateX(-100%); }
.health-cursor { position:absolute; top:0; bottom:0; width:1px; background:#4379de66; pointer-events:none; }
.health-no-data { position:absolute; inset:0; display:grid; place-items:center; font-size:12px; color:#8391a7; pointer-events:none; padding:15px; text-align:center; }
.health-time-control { display:flex; align-items:center; gap:12px; margin:20px 0; font-size:11px; color:#8391a7; }
.health-time-control input { width:100%; flex:1; min-width:0; cursor:pointer; accent-color:#4379de; padding:0; height:24px; border:0; }
.health-time-control label, .health-time-control > span { white-space:nowrap; }
.health-selection { background:#f6f8fc; padding:18px; border-radius:8px; }
.health-selection-title { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:10px; font-size:12px; }
.health-selection-title strong { font-size:20px; }
.health-selection-title small { font-size:11px; font-weight:400; color:#8391a7; }
.health-error { font-size:12px; color:#ac4141; background:#fff0ee; padding:10px 12px; border-radius:6px; }
@media(max-width:600px) {
  .health-number { font-size:32px; }
  .health-overview { gap:14px; }
  .health-yesterday { text-align:left; }
  .health-tick.tick-1, .health-tick.tick-3 { display:none; }
  .health-time-control > span { display:none; }
  .health-selection { padding:14px; }
  .health-selection-title { align-items:flex-start; flex-direction:column; gap:6px; }
}

.withdraw-balance { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; margin:-8px 0 20px; font-size:12px; color:#63738b; }
.withdraw-balance > span { min-width:0; }
.withdraw-balance strong { display:inline-block; color:#285dbd; overflow-wrap:anywhere; max-width:100%; }
.withdraw-balance button { flex-shrink:0; }

.metrics.metrics-three { grid-template-columns:repeat(3,minmax(0,1fr)); }
.metrics-three .metric { border-bottom:0; }
.metrics-three .metric:not(:last-child) { border-right:1px solid var(--line); }
@media(max-width:600px) {
  .metrics.metrics-three { grid-template-columns:1fr; }
  .metrics-three .metric:not(:last-child) { border-right:0; border-bottom:1px solid var(--line); }
}

/* Geography uses representative country points, independent of scheduling regions. */
.geo-subtitle { color:#8391a7; font-size:12px; margin:8px 0 0; }
.geo-summary { display:flex; align-items:center; flex-wrap:wrap; gap:12px 28px; padding:20px 24px 0; font-size:12px; color:#63738b; }
.geo-summary strong { margin-left:8px; font-size:21px; color:#203047; font-variant-numeric:tabular-nums; }
.geo-summary button { border:0; background:none; color:inherit; cursor:pointer; padding:0; font:inherit; }
.geo-summary .geo-stale { color:#a77726; }
.geo-map-scroll { overflow-x:auto; margin:16px 18px 0; }
.geo-map { position:relative; width:100%; min-width:600px; aspect-ratio:720/290; }
.geo-map > img { display:block; width:100%; height:100%; }
.geo-marker { position:absolute; transform:translate(-50%,-50%); padding:7px; min-width:44px; min-height:44px; background:none; border:0; cursor:pointer; display:grid; place-items:center; z-index:1; }
.geo-marker strong { display:grid; place-items:center; min-width:30px; height:30px; padding:0 6px; color:#fff; font-size:12px; background:#376fd0; border:2px solid #fff; border-radius:30px; box-shadow:0 0 0 4px #4379de22; transition:box-shadow .15s,transform .15s; }
.geo-marker span { position:absolute; top:44px; background:#fff; border:1px solid #e0e7f1; border-radius:4px; padding:5px 8px; color:#324b70; white-space:nowrap; font-size:11px; opacity:0; pointer-events:none; transition:opacity .15s; }
.geo-marker.label-visible span, .geo-marker:hover span, .geo-marker:focus-visible span { opacity:1; }
.geo-marker:hover, .geo-marker:focus-visible { z-index:3; }
.geo-marker:hover strong, .geo-marker:focus-visible strong { transform:scale(1.1); box-shadow:0 0 0 7px #4379de22; }
.geo-marker:focus-visible, .geo-row:focus-visible, .geo-unknown:focus-visible { outline:2px solid #4379de; outline-offset:2px; }
.geo-map-note { margin:12px 24px 24px; font-size:11px; line-height:1.8; color:#8391a7; }
.geo-map-empty { position:absolute; inset:0; display:grid; place-content:center; text-align:center; line-height:2; color:#63738b; font-size:14px; }
.geo-map-empty small { font-size:11px; }
.geo-rankings { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:36px; padding:0 24px 24px; }
.geo-ranking h3 { display:flex; align-items:center; justify-content:space-between; font-size:13px; margin:0; padding-bottom:14px; border-bottom:1px solid #e8edf5; }
.geo-ranking h3 small { color:#8391a7; font-size:12px; font-weight:400; }
.geo-row { display:flex; justify-content:space-between; align-items:center; gap:14px; width:100%; padding:16px 0; border:0; border-bottom:1px solid #eff2f8; background:none; text-align:left; cursor:pointer; color:#33455f; font-size:13px; }
.geo-row:hover { color:#285dbd; }
.geo-row small { display:block; color:#8391a7; font-size:11px; margin-top:5px; }
.geo-row-count { text-align:right; flex-shrink:0; }
.geo-row strong { font-weight:600; }
.geo-empty { font-size:12px; color:#8391a7; padding:20px 0; margin:0; }
.geo-unknown { display:flex; flex-wrap:wrap; gap:8px; justify-content:space-between; width:100%; border:0; border-top:1px solid #e8edf5; background:#fafbfe; padding:16px 24px; text-align:left; color:#63738b; font-size:12px; cursor:pointer; }
.geo-unknown span { color:#8391a7; }
.geo-foot { flex-wrap:wrap; gap:8px; line-height:1.7; }
.geo-ip { overflow-wrap:anywhere; }
@media(max-width:600px) {
  .geo-panel .panel-head { align-items:flex-start; gap:12px; }
  .geo-panel .panel-head .btn { flex-shrink:0; }
  .geo-summary { padding:16px 18px 0; gap:12px 18px; }
  .geo-summary strong { font-size:18px; }
  .geo-rankings { grid-template-columns:1fr; gap:20px; padding:0 18px 20px; }
  .geo-map-note { margin:12px 18px 20px; }
  .geo-unknown { padding:16px 18px; }
}
@media(prefers-reduced-motion:reduce) { .geo-marker strong, .geo-marker span { transition:none; } }

.geo-map-hint { display:none; }
@media(max-width:600px) { .geo-map-hint { display:block; margin:16px 18px 0; color:#8391a7; font-size:11px; } }

.geo-detail-hint { display:none; }
@media(max-width:600px) { .geo-detail-hint { display:block; color:#8391a7; font-size:11px; margin:12px 0; } }
