:root {
  --bg-a: #d9dfe7;
  --bg-b: #cfd7e1;
  --bg-c: #e4e9f0;
  --ink-strong: #202a36;
  --ink-soft: #5f6b7b;
  --stroke: rgba(182, 193, 207, 0.56);
  --glass: rgba(228, 234, 243, 0.74);
  --glass-deep: rgba(223, 230, 240, 0.9);
  --shadow: 0 12px 30px rgba(43, 53, 68, 0.16);
  --radius-xl: 28px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --panel-blur: 22px;
  --accent: #59729b;
  --accent-2: #6c82a7;
  --toast-tint: rgba(89, 114, 155, 0.24);
  --toast-text: #243954;
  --toast-border: rgba(255, 255, 255, 0.54);
  --ios26-panel-top: rgba(110, 146, 196, 0.14);
  --ios26-panel-bottom: rgba(255, 255, 255, 0.04);
  --ios26-panel-border: rgba(255, 255, 255, 0.1);
  --ios26-panel-shadow: 0 24px 56px rgba(0, 0, 0, 0.42), 0 10px 22px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --ios26-panel-blur: 12px;
  --ios26-app-bg-body: #eaf6ff;
  --ios26-app-bg-opacity: 0.9;
  --ios26-app-bg-filter: saturate(1.02) brightness(0.96);
  --ios26-app-heading: #17304c;
  --ios26-app-muted: rgba(52, 74, 99, 0.72);
  --ios26-app-control-text: #23405d;
  --ios26-app-control-bg: rgba(255, 255, 255, 0.44);
  --ios26-app-control-border: rgba(255, 255, 255, 0.72);
  --ios26-app-active-text: #17304c;
  --ios26-app-active-bg: rgba(255, 255, 255, 0.82);
  --ios26-app-status-bg: rgba(255, 255, 255, 0.36);
  --ios26-app-status-border: rgba(255, 255, 255, 0.64);
  --ios26-primary-fill: rgba(83, 129, 193, 0.9);
  --ios26-primary-edge: rgba(230, 240, 255, 0.44);
  --ios26-primary-shadow: rgba(33, 79, 145, 0.28);
  --ok: #159b72;
  --warn: #f59e0b;
  --danger: #ef4444;
  --custom-bg-image: none;
}

:root[data-tint='ice'] {
  --bg-a: #dde3eb;
  --bg-b: #d4dce6;
  --bg-c: #e7ecf3;
  --accent: #5d79a4;
  --accent-2: #7289b0;
  --toast-tint: rgba(93, 121, 164, 0.24);
}

:root[data-tint='sunset'] {
  --bg-a: #dde1e9;
  --bg-b: #d4d9e3;
  --bg-c: #e8ebf2;
  --accent: #66799c;
  --accent-2: #7b8cad;
  --toast-tint: rgba(102, 121, 156, 0.24);
}

:root[data-theme-mode='classic'] {
  --bg-a: #d8eefc;
  --bg-b: #caebf8;
  --bg-c: #fdfefe;
  --ink-strong: #11253f;
  --ink-soft: #5f7691;
  --stroke: rgba(255, 255, 255, 0.72);
  --glass: rgba(235, 245, 255, 0.58);
  --glass-deep: rgba(231, 241, 253, 0.82);
  --shadow: 0 16px 36px rgba(51, 82, 126, 0.18);
  --accent: #3a79da;
  --accent-2: #5f93e8;
  --ios26-panel-top: rgba(96, 162, 244, 0.16);
  --ios26-panel-bottom: rgba(255, 255, 255, 0.04);
}

:root[data-theme-mode='light'] {
  --bg-a: #ebf8ff;
  --bg-b: #dff3ff;
  --bg-c: #f8fdff;
  --ink-strong: #17304c;
  --ink-soft: #6480a0;
  --stroke: rgba(255, 255, 255, 0.72);
  --glass: rgba(247, 252, 255, 0.62);
  --glass-deep: rgba(238, 247, 255, 0.82);
  --shadow: 0 18px 36px rgba(77, 120, 165, 0.14);
  --accent: #7fa8d7;
  --accent-2: #a4c7e8;
  --toast-tint: rgba(127, 168, 215, 0.24);
  --toast-text: #243e5d;
  --toast-border: rgba(255, 255, 255, 0.68);
  --ios26-panel-top: rgba(255, 255, 255, 0.52);
  --ios26-panel-bottom: rgba(207, 232, 255, 0.22);
  --ios26-panel-border: rgba(255, 255, 255, 0.67);
  --ios26-panel-shadow: 0 24px 48px rgba(77, 120, 165, 0.12), 0 8px 18px rgba(77, 120, 165, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.83);
  --ios26-panel-blur: 14px;
  --ios26-app-bg-body: #eaf6ff;
  --ios26-app-bg-opacity: 0.9;
  --ios26-app-bg-filter: saturate(1.02) brightness(0.96);
  --ios26-app-heading: #17304c;
  --ios26-app-muted: rgba(52, 74, 99, 0.72);
  --ios26-app-control-text: #23405d;
  --ios26-app-control-bg: rgba(255, 255, 255, 0.46);
  --ios26-app-control-border: rgba(255, 255, 255, 0.72);
  --ios26-app-active-text: #17304c;
  --ios26-app-active-bg: rgba(255, 255, 255, 0.84);
  --ios26-app-status-bg: rgba(255, 255, 255, 0.38);
  --ios26-app-status-border: rgba(255, 255, 255, 0.66);
}

:root[data-theme-mode='ink'] {
  --bg-a: #d2dae5;
  --bg-b: #c8d2de;
  --bg-c: #dde4ed;
  --ink-strong: #1f2c3b;
  --ink-soft: #5c6c7f;
  --stroke: rgba(171, 183, 198, 0.56);
  --glass: rgba(217, 226, 237, 0.78);
  --glass-deep: rgba(210, 221, 234, 0.92);
  --shadow: 0 12px 28px rgba(38, 51, 67, 0.16);
  --accent: #5f7698;
  --accent-2: #7287a7;
  --toast-tint: rgba(95, 118, 152, 0.24);
  --toast-text: #edf4ff;
  --toast-border: rgba(255, 255, 255, 0.28);
  --ios26-panel-top: rgba(140, 159, 184, 0.15);
  --ios26-panel-bottom: rgba(255, 255, 255, 0.04);
  --ios26-panel-border: rgba(255, 255, 255, 0.1);
  --ios26-panel-shadow: 0 24px 56px rgba(0, 0, 0, 0.42), 0 10px 22px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --ios26-panel-blur: 12px;
  --ios26-app-bg-body: #070b12;
  --ios26-app-bg-opacity: 0.9;
  --ios26-app-bg-filter: saturate(0.92) brightness(0.58);
  --ios26-app-heading: #f7fbff;
  --ios26-app-muted: rgba(244, 248, 252, 0.84);
  --ios26-app-control-text: #eef4ff;
  --ios26-app-control-bg: rgba(255, 255, 255, 0.08);
  --ios26-app-control-border: rgba(255, 255, 255, 0.14);
  --ios26-app-active-text: #ffffff;
  --ios26-app-active-bg: rgba(255, 255, 255, 0.16);
  --ios26-app-status-bg: rgba(255, 255, 255, 0.08);
  --ios26-app-status-border: rgba(255, 255, 255, 0.12);
  --ios26-primary-fill: rgba(96, 143, 209, 0.72);
  --ios26-primary-edge: rgba(201, 223, 250, 0.34);
  --ios26-primary-shadow: rgba(8, 19, 33, 0.42);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  font-family: 'SF Pro Display', 'Avenir Next', 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans SC', sans-serif;
  color: var(--ink-strong);
  background:
    radial-gradient(1200px circle at 6% -12%, rgba(243, 247, 252, 0.72) 0%, transparent 62%),
    radial-gradient(980px circle at 98% 2%, rgba(184, 196, 212, 0.26) 0%, transparent 56%),
    linear-gradient(140deg, var(--bg-a), var(--bg-b) 48%, var(--bg-c));
  background-attachment: fixed;
}

#app {
  min-height: 100vh;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.bg-image-overlay {
  position: fixed;
  inset: 0;
  background-image: var(--custom-bg-image);
  background-size: cover;
  background-position: center;
  opacity: 0.16;
  filter: saturate(78%) brightness(1);
  pointer-events: none;
  z-index: -3;
}

.ambient-layer {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -2;
}

.ambient-orb {
  position: absolute;
  border-radius: 999px;
  mix-blend-mode: screen;
  filter: blur(2px);
  opacity: 0.28;
}

.ambient-orb.a {
  width: 420px;
  height: 420px;
  top: -120px;
  right: -80px;
  background: radial-gradient(circle at 35% 35%, rgba(235, 241, 249, 0.68), rgba(154, 167, 184, 0.16) 65%, transparent 75%);
  animation: floatA 16s ease-in-out infinite;
}

.ambient-orb.b {
  width: 360px;
  height: 360px;
  bottom: -140px;
  left: -60px;
  background: radial-gradient(circle at 55% 45%, rgba(232, 238, 246, 0.62), rgba(149, 163, 182, 0.14) 62%, transparent 74%);
  animation: floatB 18s ease-in-out infinite;
}

.ambient-orb.c {
  width: 300px;
  height: 300px;
  top: 38%;
  left: 58%;
  background: radial-gradient(circle at 35% 35%, rgba(232, 239, 247, 0.58), rgba(148, 162, 180, 0.12) 66%, transparent 75%);
  animation: floatC 14s ease-in-out infinite;
}

@keyframes floatA {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(-24px, 18px, 0);
  }
}

@keyframes floatB {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(28px, -20px, 0);
  }
}

@keyframes floatC {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(-20px, 18px, 0) scale(1.05);
  }
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 18px auto 32px;
  position: relative;
  z-index: 1;
}

.glass {
  background: linear-gradient(160deg, rgba(235, 241, 248, 0.78), var(--glass));
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  backdrop-filter: blur(var(--panel-blur)) saturate(102%);
  -webkit-backdrop-filter: blur(var(--panel-blur)) saturate(102%);
}

:root[data-auth-mode='app'] .glass,
:root[data-auth-mode='app'] .card,
:root[data-auth-mode='app'] .plan-item,
:root[data-auth-mode='app'] .pending-item,
:root[data-auth-mode='app'] .pay-result,
:root[data-auth-mode='app'] .empty,
:root[data-auth-mode='app'] .subscribe-modal,
:root[data-auth-mode='app'] .subscribe-qr,
:root[data-auth-mode='app'] .theme-switch-menu {
  background: linear-gradient(162deg, var(--ios26-panel-top), var(--ios26-panel-bottom));
  border: 1px solid var(--ios26-panel-border);
  box-shadow: var(--ios26-panel-shadow);
  backdrop-filter: blur(var(--ios26-panel-blur)) saturate(118%);
  -webkit-backdrop-filter: blur(var(--ios26-panel-blur)) saturate(118%);
}

:root[data-auth-mode='app'] body {
  background: var(--ios26-app-bg-body);
}

:root[data-auth-mode='app'] .bg-image-overlay {
  opacity: var(--ios26-app-bg-opacity);
  filter: var(--ios26-app-bg-filter);
  background-size: cover;
  background-position: center;
}

:root[data-auth-mode='app'] .ambient-layer {
  display: none;
}

:root[data-auth-mode='app'] .brand h1,
:root[data-auth-mode='app'] .card h3,
:root[data-auth-mode='app'] .subscribe-head h3,
:root[data-auth-mode='app'] .metric-number,
:root[data-auth-mode='app'] .kv-row span:last-child,
:root[data-auth-mode='app'] .plan-item-head h4,
:root[data-auth-mode='app'] .plan-item-price,
:root[data-auth-mode='app'] .subscribe-option-content strong,
:root[data-auth-mode='app'] .server-table td,
:root[data-auth-mode='app'] .server-table td a,
:root[data-auth-mode='app'] .pending-item strong,
:root[data-auth-mode='app'] .pay-result,
:root[data-auth-mode='app'] .status-pill {
  color: var(--ios26-app-heading);
}

:root[data-auth-mode='app'] .brand p,
:root[data-auth-mode='app'] .card p,
:root[data-auth-mode='app'] .hint,
:root[data-auth-mode='app'] .field label,
:root[data-auth-mode='app'] .kv-row span:first-child,
:root[data-auth-mode='app'] .server-table th,
:root[data-auth-mode='app'] .method-btn small,
:root[data-auth-mode='app'] .subscribe-option-content small,
:root[data-auth-mode='app'] .notice-item small,
:root[data-auth-mode='app'] .notice-item p,
:root[data-auth-mode='app'] .loading,
:root[data-auth-mode='app'] .pending-item small,
:root[data-auth-mode='app'] .empty-inline {
  color: var(--ios26-app-muted);
}

:root[data-auth-mode='app'] .field input,
:root[data-auth-mode='app'] .coupon-input {
  color: var(--ios26-app-control-text);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
}

:root[data-auth-mode='app'] .field input::placeholder,
:root[data-auth-mode='app'] .coupon-input::placeholder {
  color: var(--ios26-app-muted);
}

:root[data-auth-mode='app'] .empty {
  color: var(--ios26-app-muted);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

:root[data-auth-mode='app'][data-theme-mode='light'] .empty {
  color: #57708a;
  background: rgba(255, 255, 255, 0.4);
  border-color: rgba(255, 255, 255, 0.72);
}

:root[data-auth-mode='app'][data-theme-mode='ink'] .empty {
  color: rgba(244, 248, 252, 0.92);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}

:root[data-auth-mode='app'] .notice-item {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.14);
}

:root[data-auth-mode='app'] .pay-result.success {
  color: #9be9ca;
  background: rgba(41, 101, 81, 0.2);
  border-color: rgba(97, 219, 176, 0.26);
}

:root[data-auth-mode='app'][data-theme-mode='light'] .pay-result.success {
  color: #1f5c49;
  background: rgba(224, 245, 237, 0.72);
  border-color: rgba(84, 173, 142, 0.42);
}

:root[data-auth-mode='app'] .inline-link {
  color: #a8d1ff;
}

.plan-item-desc .inline-link {
  word-break: break-all;
}

:root[data-auth-mode='app'][data-theme-mode='ink'] .subscribe-mask {
  background: rgba(8, 12, 18, 0.24);
  backdrop-filter: blur(4px) saturate(86%);
  -webkit-backdrop-filter: blur(4px) saturate(86%);
}

:root[data-auth-mode='app'][data-theme-mode='ink'] #ios26-subscribe-modal .subscribe-modal,
:root[data-auth-mode='app'][data-theme-mode='ink'] #ios26-order-detail-modal .subscribe-modal {
  background: linear-gradient(158deg, rgba(34, 40, 49, 0.62), rgba(23, 28, 36, 0.54));
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.3), 0 10px 24px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

:root[data-auth-mode='app'][data-theme-mode='ink'] #ios26-subscribe-modal .subscribe-head h3,
:root[data-auth-mode='app'][data-theme-mode='ink'] #ios26-order-detail-modal .subscribe-head h3 {
  color: #f6f9ff;
}

:root[data-auth-mode='app'][data-theme-mode='ink'] #ios26-subscribe-modal .subscribe-option-btn:not(.is-primary) {
  color: rgba(240, 246, 255, 0.96);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

:root[data-auth-mode='app'][data-theme-mode='ink'] #ios26-subscribe-modal .subscribe-option-content strong {
  color: #f4f8ff;
}

:root[data-auth-mode='app'][data-theme-mode='ink'] #ios26-subscribe-modal .subscribe-option-content small {
  color: rgba(226, 236, 250, 0.86);
}

:root[data-auth-mode='app'][data-theme-mode='ink'] #ios26-subscribe-modal .subscribe-option-icon {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.22);
}

:root[data-auth-mode='app'][data-theme-mode='ink'] #ios26-subscribe-modal .subscribe-option-icon-fallback {
  color: #e6efff;
}

:root[data-auth-mode='app'][data-theme-mode='ink'] #ios26-order-detail-modal .kv-row span:first-child {
  color: rgba(224, 234, 248, 0.84);
}

:root[data-auth-mode='app'][data-theme-mode='ink'] #ios26-order-detail-modal .kv-row span:last-child {
  color: #f7fbff;
}

:root[data-auth-mode='app'][data-theme-mode='light'] .subscribe-mask {
  background: rgba(12, 16, 22, 0.14);
  backdrop-filter: blur(4px) saturate(72%);
  -webkit-backdrop-filter: blur(4px) saturate(72%);
}

:root[data-auth-mode='app'][data-theme-mode='light'] #ios26-subscribe-modal .subscribe-modal,
:root[data-auth-mode='app'][data-theme-mode='light'] #ios26-order-detail-modal .subscribe-modal {
  background: linear-gradient(156deg, rgba(255, 255, 255, 0.76), rgba(246, 249, 252, 0.64));
  border-color: rgba(255, 255, 255, 0.84);
  box-shadow: 0 20px 42px rgba(25, 34, 47, 0.16), 0 10px 24px rgba(25, 34, 47, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

:root[data-auth-mode='app'][data-theme-mode='light'] #ios26-subscribe-modal .subscribe-head h3,
:root[data-auth-mode='app'][data-theme-mode='light'] #ios26-order-detail-modal .subscribe-head h3 {
  color: #2b3a4d;
}

:root[data-auth-mode='app'][data-theme-mode='light'] #ios26-subscribe-modal .subscribe-option-btn:not(.is-primary) {
  color: #314255;
  background: rgba(255, 255, 255, 0.58);
  border-color: rgba(255, 255, 255, 0.8);
}

:root[data-auth-mode='app'][data-theme-mode='light'] #ios26-subscribe-modal .subscribe-option-content strong {
  color: #2a3a4d;
}

:root[data-auth-mode='app'][data-theme-mode='light'] #ios26-subscribe-modal .subscribe-option-content small {
  color: rgba(60, 74, 92, 0.78);
}

:root[data-auth-mode='app'][data-theme-mode='light'] #ios26-subscribe-modal .subscribe-option-icon {
  background: rgba(255, 255, 255, 0.84);
  border-color: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 18px rgba(46, 62, 82, 0.12);
}

:root[data-auth-mode='app'][data-theme-mode='light'] #ios26-subscribe-modal .subscribe-option-icon-fallback {
  color: #34485e;
}

:root[data-auth-mode='app'][data-theme-mode='light'] #ios26-order-detail-modal .kv-row span:first-child {
  color: rgba(65, 79, 98, 0.76);
}

:root[data-auth-mode='app'][data-theme-mode='light'] #ios26-order-detail-modal .kv-row span:last-child {
  color: #24364b;
}

:root[data-auth-mode='app'][data-theme-mode='light'] .top-nav,
:root[data-auth-mode='app'][data-theme-mode='light'] .view-wrap {
  border-color: rgba(255, 255, 255, 0.54);
  box-shadow: 0 14px 30px rgba(44, 61, 84, 0.1), 0 6px 14px rgba(44, 61, 84, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

:root[data-auth-mode='app'] .status-pill {
  background: var(--ios26-app-status-bg);
  border-color: var(--ios26-app-status-border);
}

:root[data-auth-mode='app'] .inline-btn,
:root[data-auth-mode='app'] .nav-icon-btn,
:root[data-auth-mode='app'] .view-tab,
:root[data-auth-mode='app'] .btn-secondary,
:root[data-auth-mode='app'] .period-btn,
:root[data-auth-mode='app'] .method-btn,
:root[data-auth-mode='app'] .theme-switch-item,
:root[data-auth-mode='app'] .subscribe-option-btn:not(.is-primary) {
  color: var(--ios26-app-control-text);
  background: var(--ios26-app-control-bg);
  border-color: var(--ios26-app-control-border);
}

:root[data-auth-mode='app'] .view-tab.is-active,
:root[data-auth-mode='app'] .theme-switch-item.is-active {
  color: var(--ios26-app-active-text);
  background: var(--ios26-app-active-bg);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
}

:root[data-auth-mode='app'] .theme-switch-menu .theme-switch-item.is-active {
  color: #1f2f44;
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 16px rgba(32, 46, 66, 0.14);
}

:root[data-auth-mode='app'][data-theme-mode='ink'] .theme-switch-menu .theme-switch-item.is-active {
  color: #f3f8ff;
  background: linear-gradient(170deg, rgba(12, 18, 26, 0.72), rgba(22, 30, 40, 0.62));
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.top-nav {
  position: relative;
  z-index: 20;
  border-radius: calc(var(--radius-xl) + 6px);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-dot {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(241, 246, 252, 0.94), rgba(181, 194, 211, 0.48));
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: inset 0 1px 4px rgba(255, 255, 255, 0.95), 0 8px 20px rgba(59, 98, 173, 0.25);
  position: relative;
}

.logo-dot::after {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 7px;
  background: linear-gradient(135deg, rgba(123, 148, 184, 0.9), rgba(100, 125, 162, 0.9));
}

.brand h1 {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0.2px;
  font-weight: 700;
}

.brand p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--ink-soft);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-switch-wrap {
  position: relative;
  z-index: 60;
  display: inline-flex;
  align-items: center;
}

.theme-switch-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  width: max-content;
  min-width: 82px;
  max-width: min(160px, calc(100vw - 24px));
  display: grid;
  gap: 4px;
  padding: 6px;
  border-radius: 12px;
  background: rgba(232, 239, 248, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 12px 24px rgba(47, 68, 97, 0.18);
  z-index: 120;
}

.theme-switch-item {
  border: 1px solid rgba(255, 255, 255, 0.74);
  background: rgba(255, 255, 255, 0.66);
  color: #334a66;
  border-radius: 9px;
  font-size: 12px;
  min-width: 72px;
  padding: 6px 11px;
  text-align: center;
  cursor: pointer;
}

.theme-switch-item.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.status-pill {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  color: #32465f;
  background: var(--glass-deep);
  border: 1px solid var(--stroke);
  white-space: nowrap;
}

.inline-btn {
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(229, 236, 246, 0.8);
  color: #31455f;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.inline-btn:hover {
  background: rgba(236, 242, 250, 0.92);
}

.nav-icon-btn {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.14));
  color: #31455f;
  box-shadow: 0 8px 18px rgba(47, 68, 97, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(4px) saturate(108%);
  -webkit-backdrop-filter: blur(4px) saturate(108%);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.nav-icon-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-icon-btn:hover {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.46), rgba(255, 255, 255, 0.2));
  transform: translateY(-1px);
}

.nav-icon-btn:active {
  transform: translateY(0) scale(0.98);
}

.nav-icon-btn:focus-visible {
  outline: none;
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 2px rgba(123, 169, 221, 0.28), 0 8px 18px rgba(47, 68, 97, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

#refresh-btn,
#ios26-open-buy-modal {
  display: none !important;
}

.view-wrap {
  position: relative;
  z-index: 1;
  margin-top: 16px;
  border-radius: var(--radius-xl);
  padding: 20px;
}

.auth-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 56px);
}

#app.auth-mode .top-nav {
  display: none;
}

#app.auth-mode .app-shell {
  width: min(390px, calc(100% - 24px));
  margin: 18px auto 24px;
}

#app.auth-mode .view-wrap {
  padding: 0;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

#app.auth-mode .bg-image-overlay {
  opacity: 1;
  filter: saturate(0.88) brightness(0.8);
  background-image:
    var(--custom-bg-image),
    radial-gradient(980px circle at 84% 14%, rgba(112, 132, 162, 0.32) 0%, transparent 60%),
    radial-gradient(880px circle at 10% 92%, rgba(68, 90, 122, 0.28) 0%, transparent 62%),
    linear-gradient(145deg, #0b1320, #101a2b 50%, #0a1220);
  background-color: #0c1524;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

#app.auth-mode .ambient-layer {
  display: none;
}

:root[data-auth-mode='auth'] body {
  background:
    radial-gradient(880px circle at 86% 14%, rgba(99, 124, 158, 0.24) 0%, transparent 64%),
    radial-gradient(760px circle at 12% 90%, rgba(64, 84, 114, 0.24) 0%, transparent 62%),
    linear-gradient(145deg, #0b1320, #101a2b 50%, #0a1220);
  height: 100dvh;
  overflow: hidden;
}

:root[data-auth-mode='auth'] {
  height: 100dvh;
  overflow: hidden;
}

#app.auth-mode {
  height: 100dvh;
  overflow: hidden;
}

.auth-hero {
  display: none !important;
}

.auth-hero::before {
  content: '';
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 999px;
  right: -120px;
  top: -120px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0));
}

.auth-hero h2 {
  margin: 0;
  font-size: 30px;
  letter-spacing: -0.3px;
}

.auth-hero p {
  margin: 10px 0 0;
  color: var(--ink-soft);
  line-height: 1.65;
}

.benefits {
  margin-top: 20px;
  display: grid;
  gap: 10px;
}

.benefit-item {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(226, 233, 243, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.7);
  font-size: 13px;
  color: #384e68;
}

.auth-card {
  width: min(338px, 100%);
  min-height: 0;
  border-radius: 26px;
  padding: 36px 24px 30px;
  background: linear-gradient(162deg, rgba(237, 244, 252, 0.22), rgba(219, 232, 247, 0.12));
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 30px 72px rgba(0, 0, 0, 0.52), 0 14px 28px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(22px) saturate(126%);
  -webkit-backdrop-filter: blur(22px) saturate(126%);
}

.auth-logo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 180px;
  margin: 6px 0 24px;
  overflow: visible;
}

.auth-logo {
  display: block;
  width: min(300px, 78vw);
  max-width: min(300px, 78vw);
  max-height: none;
  height: auto;
  border-radius: 0;
  object-fit: contain;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
  transform: scale(1.2);
  transform-origin: center;
}

.auth-logo-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #244767;
  font-size: 34px;
  font-weight: 700;
}

.auth-subtitle {
  margin: 0 0 28px;
  text-align: center;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.6;
  font-size: 14px;
}

#app.auth-mode .auth-card form {
  gap: 14px;
  margin-top: 20px;
}

.auth-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

#app.auth-mode .auth-card .field input {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.24);
  padding: 12px 12px;
}

#app.auth-mode .auth-card .field input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

#app.auth-mode .auth-card .hint {
  color: rgba(255, 255, 255, 0.74);
}

.auth-links {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.auth-links-single {
  justify-content: center;
}

.auth-link-btn {
  border: 0;
  background: transparent;
  padding: 0;
  color: #ffffff;
  font-size: 13px;
  line-height: 1.4;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-link-btn:hover {
  color: rgba(255, 255, 255, 0.86);
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.tab-btn {
  flex: 1;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.48);
  color: #3a506b;
  font-weight: 600;
  padding: 10px;
  cursor: pointer;
}

.tab-btn.is-active {
  color: #293d58;
  background: linear-gradient(140deg, rgba(238, 243, 250, 0.96), rgba(218, 227, 239, 0.9));
  box-shadow: 0 10px 20px rgba(70, 93, 126, 0.12);
}

form {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-size: 12px;
  color: #314b66;
}

.field input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.74);
  background: rgba(255, 255, 255, 0.58);
  color: #2c415b;
  border-radius: 12px;
  padding: 11px 12px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus {
  border-color: rgba(92, 132, 188, 0.52);
  box-shadow: 0 0 0 4px rgba(181, 198, 224, 0.36);
}

.profile-form {
  margin-top: 10px;
  width: 100%;
  max-width: none;
}

.profile-form .btn {
  margin-top: 2px;
}

.row {
  display: flex;
  gap: 8px;
}

.row > * {
  flex: 1;
}

.btn {
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  padding: 11px 12px;
}

.btn-primary,
.subscribe-option-btn.is-primary,
:root[data-theme-mode='ink'] .subscribe-option-btn.is-primary {
  color: #f7fbff;
  border: 1px solid var(--ios26-primary-edge);
  background: var(--ios26-primary-fill);
  box-shadow: 0 8px 16px var(--ios26-primary-shadow);
  text-shadow: none;
}

#app.auth-mode .btn-primary {
  color: #ffffff;
  background: linear-gradient(180deg, rgba(49, 55, 63, 0.9), rgba(34, 39, 46, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --ios26-btn-lift-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
  --ios26-btn-breathe-shadow: 0 14px 26px rgba(0, 0, 0, 0.5);
}

:root[data-auth-mode='app'] .btn-primary,
:root[data-auth-mode='app'] .subscribe-option-btn.is-primary {
  color: #ffffff;
  background: linear-gradient(180deg, rgba(49, 55, 63, 0.9), rgba(34, 39, 46, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --ios26-btn-lift-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
  --ios26-btn-breathe-shadow: 0 14px 26px rgba(0, 0, 0, 0.5);
}

.btn-secondary {
  color: #324961;
  border: 1px solid rgba(255, 255, 255, 0.78);
  background: rgba(227, 234, 244, 0.82);
}

.btn:disabled {
  opacity: 0.66;
  cursor: not-allowed;
}

/* Hover breathe effect for interactive buttons (mouse hover, no click needed). */
.inline-btn,
.tab-btn,
.btn,
.view-tab,
.period-btn,
.method-btn,
.subscribe-option-btn,
.theme-switch-item {
  --ios26-btn-lift-shadow: 0 7px 16px rgba(70, 93, 126, 0.12);
  --ios26-btn-breathe-shadow: 0 10px 20px rgba(70, 93, 126, 0.16);
  transition:
    transform 0.32s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    box-shadow 0.32s ease,
    filter 0.32s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.btn-primary,
.subscribe-option-btn.is-primary {
  --ios26-btn-lift-shadow: 0 8px 16px rgba(33, 79, 145, 0.28);
  --ios26-btn-breathe-shadow: 0 11px 20px rgba(33, 79, 145, 0.36);
}

@media (hover: hover) and (pointer: fine) {
  .inline-btn:hover:not(:disabled):not([aria-disabled='true']),
  .tab-btn:hover:not(:disabled):not([aria-disabled='true']),
  .btn:hover:not(:disabled):not([aria-disabled='true']),
  .view-tab:hover:not(:disabled):not([aria-disabled='true']),
  .period-btn:hover:not(:disabled):not([aria-disabled='true']),
  .method-btn:hover:not(:disabled):not([aria-disabled='true']),
  .subscribe-option-btn:hover:not(:disabled):not([aria-disabled='true']),
  .theme-switch-item:hover:not(:disabled):not([aria-disabled='true']) {
    transform: translateY(-1px) scale(1.006);
    box-shadow: var(--ios26-btn-lift-shadow);
    filter: saturate(1.02) brightness(1.015);
    animation: ios26ButtonBreathe 2.6s ease-in-out infinite;
  }

  .inline-btn:active:not(:disabled):not([aria-disabled='true']),
  .tab-btn:active:not(:disabled):not([aria-disabled='true']),
  .btn:active:not(:disabled):not([aria-disabled='true']),
  .view-tab:active:not(:disabled):not([aria-disabled='true']),
  .period-btn:active:not(:disabled):not([aria-disabled='true']),
  .method-btn:active:not(:disabled):not([aria-disabled='true']),
  .subscribe-option-btn:active:not(:disabled):not([aria-disabled='true']),
  .theme-switch-item:active:not(:disabled):not([aria-disabled='true']) {
    transform: translateY(0) scale(0.998);
    filter: none;
    animation: none;
  }
}

@keyframes ios26ButtonBreathe {
  0%,
  100% {
    transform: translateY(-1px) scale(1.006);
    box-shadow: var(--ios26-btn-lift-shadow);
  }
  50% {
    transform: translateY(-2px) scale(1.012);
    box-shadow: var(--ios26-btn-breathe-shadow);
  }
}

@media (prefers-reduced-motion: reduce) {
  .inline-btn,
  .tab-btn,
  .btn,
  .view-tab,
  .period-btn,
  .method-btn,
  .subscribe-option-btn,
  .theme-switch-item {
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    animation: none !important;
  }

  .inline-btn:hover:not(:disabled):not([aria-disabled='true']),
  .tab-btn:hover:not(:disabled):not([aria-disabled='true']),
  .btn:hover:not(:disabled):not([aria-disabled='true']),
  .view-tab:hover:not(:disabled):not([aria-disabled='true']),
  .period-btn:hover:not(:disabled):not([aria-disabled='true']),
  .method-btn:hover:not(:disabled):not([aria-disabled='true']),
  .subscribe-option-btn:hover:not(:disabled):not([aria-disabled='true']),
  .theme-switch-item:hover:not(:disabled):not([aria-disabled='true']) {
    transform: translateY(-1px);
  }
}

.hint {
  margin: 0;
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.6;
}

.inline-link {
  color: #1a7a3a;
  text-decoration: none;
  cursor: pointer;
}
.inline-link:hover,
.inline-link:focus-visible {
  text-decoration: underline;
  color: #0f5c28;
}
.inline-link:visited {
  color: #145c2e;
}
:root[data-auth-mode='app'] .inline-link {
  color: #4ade80;
}
:root[data-auth-mode='app'] .inline-link:hover,
:root[data-auth-mode='app'] .inline-link:focus-visible {
  color: #86efac;
  text-decoration: underline;
}
:root[data-auth-mode='app'] .inline-link:visited {
  color: #22c55e;
}

.app-view-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.app-view-nav::-webkit-scrollbar {
  display: none;
}

.view-tab {
  flex: 0 0 auto;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.74);
  background: rgba(255, 255, 255, 0.46);
  color: #3a506b;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  cursor: pointer;
}

.view-tab.is-active {
  color: #2a3e59;
  background: linear-gradient(135deg, rgba(237, 242, 249, 0.96), rgba(216, 225, 237, 0.9));
  box-shadow: 0 10px 20px rgba(75, 98, 129, 0.14);
}

.app-view-nav .view-tab[data-view='traffic'] {
  order: 99;
}

.traffic-overview-head,
.traffic-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.traffic-range-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.traffic-range-btn {
  min-width: 74px;
  border: 1px solid transparent;
  background: transparent;
  color: #4a627d;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.traffic-range-btn.is-active {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.86);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 24px rgba(207, 100, 31, 0.22);
}

.traffic-summary-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.traffic-summary-item {
  border-radius: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.42);
  min-height: 92px;
}

.traffic-summary-item span {
  display: block;
  font-size: 12px;
  color: #57708a;
}

.traffic-summary-item strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
  line-height: 1.1;
  color: #29405a;
}

.traffic-summary-item small,
.traffic-detail-count {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: #678198;
}

.traffic-detail-count {
  margin-top: 2px;
  align-self: center;
}

.traffic-chart-shell {
  margin-top: 16px;
}

.traffic-chart-stage {
  position: relative;
  margin-top: 10px;
}

.traffic-chart-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.traffic-chart {
  display: block;
  width: 100%;
  min-width: 720px;
  height: auto;
}

.traffic-tooltip {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
  width: min(240px, calc(100% - 24px));
  pointer-events: none;
}

.traffic-tooltip-card {
  border-radius: 16px;
  padding: 14px 14px 12px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 16px 30px rgba(27, 45, 67, 0.16);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}

.traffic-tooltip-card strong {
  display: block;
  color: #243a54;
  font-size: 14px;
}

.traffic-tooltip-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 12px;
  color: #4a647d;
}

.traffic-tooltip-row b {
  color: #243a54;
  font-size: 13px;
}

.traffic-tooltip-row.is-total {
  padding-top: 4px;
  border-top: 1px dashed rgba(121, 142, 164, 0.24);
}

.traffic-tooltip-meta {
  margin-top: 10px;
  font-size: 12px;
  color: #688198;
}

.traffic-chart-grid line {
  stroke: rgba(121, 142, 164, 0.22);
  stroke-width: 1;
}

.traffic-chart-grid text,
.traffic-chart-axis text {
  fill: #66829b;
  font-size: 11px;
}

.traffic-chart-axis-x text {
  text-anchor: middle;
}

.traffic-chart-area path {
  fill: url(#traffic-download-fill);
}

.traffic-chart-focus line {
  stroke: rgba(207, 100, 31, 0.38);
  stroke-width: 1.4;
  stroke-dasharray: 4 5;
}

.traffic-chart-line {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.traffic-chart-line.is-download {
  stroke: #cf641f;
}

.traffic-chart-line.is-upload {
  stroke: #f59e0b;
}

.traffic-chart-point-download {
  fill: #cf641f;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 1;
}

.traffic-chart-point-upload {
  fill: #f59e0b;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 1;
}

.traffic-chart-hit-zone {
  fill: transparent;
  cursor: pointer;
  pointer-events: all;
}

.traffic-chart-empty {
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.traffic-chart-legend {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #57708a;
}

.traffic-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.traffic-legend-swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

.traffic-legend-swatch.is-download {
  background: #cf641f;
}

.traffic-legend-swatch.is-upload {
  background: #f59e0b;
}

.traffic-legend-swatch.is-total {
  background: linear-gradient(135deg, #cf641f, #f59e0b);
}

:root[data-theme-mode='ink'] .traffic-range-switch {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(10, 16, 25, 0.58);
  box-shadow: none;
}

:root[data-theme-mode='ink'] .traffic-range-btn {
  color: rgba(244, 248, 252, 0.88);
}

:root[data-theme-mode='ink'] .traffic-range-btn.is-active {
  border-color: rgba(255, 255, 255, 0.22);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08));
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

:root[data-theme-mode='ink'] .traffic-summary-item {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(13, 19, 30, 0.52);
}

:root[data-theme-mode='ink'] .traffic-tooltip-card {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(10, 16, 25, 0.84);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.3);
}

:root[data-theme-mode='ink'] .traffic-tooltip-card strong,
:root[data-theme-mode='ink'] .traffic-tooltip-row b {
  color: #f5fbff;
}

:root[data-theme-mode='ink'] .traffic-tooltip-row,
:root[data-theme-mode='ink'] .traffic-tooltip-meta {
  color: rgba(244, 248, 252, 0.84);
}

:root[data-theme-mode='ink'] .traffic-tooltip-row.is-total {
  border-top-color: rgba(255, 255, 255, 0.16);
}

:root[data-theme-mode='ink'] .traffic-summary-item span,
:root[data-theme-mode='ink'] .traffic-summary-item small,
:root[data-theme-mode='ink'] .traffic-detail-count,
:root[data-theme-mode='ink'] .traffic-chart-legend {
  color: rgba(244, 248, 252, 0.84);
}

:root[data-theme-mode='ink'] .traffic-summary-item strong {
  color: #f5fbff;
}

:root[data-theme-mode='ink'] .traffic-chart-grid line {
  stroke: rgba(255, 255, 255, 0.14);
}

:root[data-theme-mode='ink'] .traffic-chart-grid text,
:root[data-theme-mode='ink'] .traffic-chart-axis text {
  fill: rgba(244, 248, 252, 0.84);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
}

.card {
  border-radius: 18px;
  padding: 14px;
  min-height: 120px;
}

.card-subscribe,
.card-gift {
  display: flex;
  flex-direction: column;
}

.card h3 {
  margin: 0;
  font-size: 14px;
}

.card p {
  margin: 6px 0 0;
  color: #47627d;
  font-size: 12px;
  line-height: 1.55;
}

.col-4 {
  grid-column: span 4;
}

.col-6 {
  grid-column: span 6;
}

.col-8 {
  grid-column: span 8;
}

.col-12 {
  grid-column: span 12;
}

.metric-number {
  margin-top: 12px;
  font-size: 24px;
  font-weight: 700;
}

.progress-wrap {
  margin-top: 12px;
}

.progress-bar {
  width: 100%;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  overflow: hidden;
}

.progress-value {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6882a7, #7a90b2);
}

.kv {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.kv-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}

.kv-row span:last-child {
  color: #193958;
  font-weight: 600;
}

.action-row {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.action-row .btn {
  padding: 9px 12px;
  font-size: 12px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.subscription-actions {
  margin-top: 18px;
}

.card-subscribe .subscription-actions {
  margin-top: auto;
  padding-top: 0;
}

.card-gift .gift-card-actions {
  margin-top: auto;
  padding-top: 12px;
}

.kv.compact {
  margin-top: 10px;
  gap: 6px;
}

.plan-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 10px;
  align-items: stretch;
}

.plan-item {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.35);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plan-item-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 54px;
}

.plan-item-head h4 {
  margin: 0;
  font-size: 16px;
}

.plan-item-head > div:first-child {
  flex: 1;
  min-width: 0;
}

.plan-item-desc {
  margin: 6px 0 0;
  font-size: 12px;
  color: #4a627d;
  line-height: 1.45;
  white-space: normal;
  overflow: visible;
  word-break: break-word;
}

.plan-item-desc p {
  margin: 0 0 6px;
}

.plan-item-desc p:last-child {
  margin-bottom: 0;
}

.plan-item-desc ul,
.plan-item-desc ol {
  margin: 6px 0 0 16px;
  padding: 0;
  display: grid;
  gap: 4px;
}

.plan-item-desc li {
  margin: 0;
}

.plan-item-desc blockquote {
  margin: 6px 0 0;
  padding: 6px 10px;
  border-left: 3px solid rgba(255, 255, 255, 0.46);
  background: rgba(255, 255, 255, 0.12);
  border-radius: 8px;
}

.plan-item-desc h1,
.plan-item-desc h2,
.plan-item-desc h3,
.plan-item-desc h4,
.plan-item-desc h5,
.plan-item-desc h6 {
  margin: 6px 0;
  font-size: 12px;
  line-height: 1.4;
}

.plan-item-desc code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.18);
}

.plan-item-desc pre {
  margin: 6px 0 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  overflow-x: auto;
}

.plan-item-desc pre code {
  padding: 0;
  background: transparent;
}

.plan-item-price {
  font-size: 14px;
  color: #143453;
  font-weight: 700;
  white-space: nowrap;
  margin-left: 8px;
}

.period-list {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.period-btn {
  border: 1px solid rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.52);
  border-radius: 999px;
  color: #1f3f5f;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}

.period-btn.is-active {
  color: #0f3756;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(187, 228, 255, 0.74));
}

.plan-item-foot {
  margin-top: auto;
  display: flex;
  gap: 8px;
  align-items: center;
}

.coupon-input {
  flex: 1;
  border: 1px solid rgba(255, 255, 255, 0.76);
  background: rgba(255, 255, 255, 0.56);
  color: #153755;
  border-radius: 10px;
  min-height: 34px;
  padding: 8px 10px;
  outline: none;
}

.plan-item-foot .btn {
  min-height: 34px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.gift-card-actions {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
}

.gift-card-input {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
}

.gift-card-actions .btn {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  padding-top: 8px;
  padding-bottom: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.gift-card-feedback {
  margin-top: 10px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.5;
  color: #34506b;
}

.gift-card-feedback.is-success {
  border-color: rgba(15, 186, 143, 0.35);
  color: #0b6f56;
}

.gift-card-feedback.is-error {
  border-color: rgba(239, 68, 68, 0.35);
  color: #9f2020;
}

.gift-card-history {
  margin-top: 10px;
}

.gift-card-history-list {
  display: grid;
  gap: 8px;
}

.gift-card-history-item {
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.42);
  border-radius: 12px;
  padding: 10px 12px;
}

.gift-card-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.gift-card-history-head strong {
  font-size: 13px;
  color: #1d3a59;
}

.gift-card-history-head small {
  color: #5b728a;
  font-size: 11px;
}

.gift-card-history-meta {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: #5b728a;
}

.gift-card-history-reward {
  margin: 6px 0 0;
  font-size: 12px;
  color: #34506b;
  word-break: break-word;
}

:root[data-theme-mode='ink'] .gift-card-feedback,
:root[data-theme-mode='ink'] .gift-card-history-item {
  color: rgba(236, 244, 252, 0.9);
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
}

:root[data-theme-mode='ink'] .gift-card-feedback.is-success {
  border-color: rgba(74, 222, 128, 0.45);
  color: #8cf5be;
}

:root[data-theme-mode='ink'] .gift-card-feedback.is-error {
  border-color: rgba(248, 113, 113, 0.5);
  color: #fca5a5;
}

:root[data-theme-mode='ink'] .gift-card-history-head strong,
:root[data-theme-mode='ink'] .gift-card-history-reward {
  color: rgba(236, 244, 252, 0.92);
}

:root[data-theme-mode='ink'] .gift-card-history-head small,
:root[data-theme-mode='ink'] .gift-card-history-meta {
  color: rgba(236, 244, 252, 0.72);
}

.empty-inline {
  color: #61778f;
  font-size: 12px;
}

.checkout-box {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.pending-orders-content {
  margin-top: 12px;
}

.pending-orders-content .pending-list {
  gap: 10px;
}

.checkout-box-empty .empty {
  line-height: 1.65;
  padding: 14px 16px;
}

.checkout-emphasis {
  animation: checkoutPulse 0.9s ease;
}

@keyframes checkoutPulse {
  0% {
    box-shadow: var(--shadow);
  }
  45% {
    box-shadow: 0 0 0 4px rgba(88, 166, 255, 0.22), var(--shadow);
  }
  100% {
    box-shadow: var(--shadow);
  }
}

.method-list {
  display: grid;
  gap: 6px;
}

.method-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  background: rgba(255, 255, 255, 0.48);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  color: #193b5b;
}

.method-btn small {
  color: #5d748b;
}

.method-btn.is-active {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(194, 233, 255, 0.76));
  box-shadow: 0 8px 18px rgba(30, 79, 130, 0.14);
}

.pending-list {
  display: grid;
  gap: 8px;
}

.pending-item {
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.42);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pending-item strong {
  display: block;
}

.pending-item small {
  color: #5b728a;
}

.pay-result {
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.42);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 12px;
}

.pay-result.success {
  border-color: rgba(15, 186, 143, 0.35);
  color: #0b6f56;
}

.qr-image {
  width: 160px;
  height: 160px;
  object-fit: contain;
  display: block;
  margin: 8px 0;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  background: #ffffff;
}

.break-all {
  word-break: break-all;
}

#ios26-subscribe-modal {
  position: fixed;
  inset: 0;
  z-index: 25;
}

#ios26-order-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 26;
}

#ios26-gift-history-modal {
  position: fixed;
  inset: 0;
  z-index: 27;
}

.subscribe-mask {
  position: absolute;
  inset: 0;
  background: rgba(18, 33, 54, 0.35);
  backdrop-filter: blur(3px);
}

.subscribe-modal {
  position: relative;
  width: min(380px, calc(100vw - 24px));
  margin: max(56px, 9vh) auto 0;
  border-radius: 18px;
  padding: 14px;
}

.gift-history-modal {
  width: min(760px, calc(100vw - 24px));
}

.gift-history-content {
  max-height: min(68vh, 640px);
  overflow: auto;
  padding-right: 2px;
}

.gift-card-pagination {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #57708a;
}

:root[data-theme-mode='ink'] .gift-card-pagination {
  color: rgba(236, 244, 252, 0.82);
}

.subscribe-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.subscribe-head h3 {
  margin: 0;
  font-size: 16px;
}

.subscribe-option-list {
  display: grid;
  gap: 8px;
}

.subscribe-option-btn {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.76);
  background: rgba(255, 255, 255, 0.52);
  color: #1f3f5f;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  cursor: pointer;
}

.subscribe-option-client {
  display: flex;
  align-items: center;
  gap: 12px;
}

.subscribe-option-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 6px 14px rgba(42, 91, 146, 0.14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 34px;
  overflow: hidden;
}

.subscribe-option-icon img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.subscribe-option-icon-fallback {
  color: #26476a;
  font-size: 14px;
  font-weight: 700;
}

.subscribe-option-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.subscribe-option-content strong {
  font-size: 13px;
  line-height: 1.2;
  color: #1f3f5f;
}

.subscribe-option-content small {
  font-size: 11px;
  line-height: 1.2;
  color: #5f7892;
}

.subscribe-option-btn.is-primary {
  color: #f6fbff;
}

.subscribe-qr {
  margin-top: 10px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.45);
  padding: 12px;
  text-align: center;
}

.subscribe-qr-image {
  width: 220px;
  height: 220px;
  max-width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  background: #ffffff;
}

.table-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.order-table-wrap {
  margin-top: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
}

.server-table {
  margin-top: 10px;
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.order-table {
  margin-top: 0;
  min-width: 760px;
}

.order-table th,
.order-table td {
  white-space: nowrap;
  vertical-align: middle;
}

.order-table td:first-child {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.traffic-table {
  margin-top: 12px;
  min-width: 620px;
  table-layout: fixed;
}

.traffic-table th,
.traffic-table td {
  padding: 10px 6px;
  white-space: nowrap;
  vertical-align: middle;
}

.traffic-table th:nth-child(1),
.traffic-table td:nth-child(1) {
  width: 18%;
}

.traffic-table th:nth-child(2),
.traffic-table td:nth-child(2),
.traffic-table th:nth-child(3),
.traffic-table td:nth-child(3),
.traffic-table th:nth-child(4),
.traffic-table td:nth-child(4) {
  width: 21%;
}

.traffic-table th:nth-child(5),
.traffic-table td:nth-child(5) {
  width: 14%;
}

.traffic-table td:first-child {
  font-family: inherit;
  font-size: 13px;
}

.traffic-table td:last-child {
  font-weight: 600;
}

.traffic-pagination {
  margin-top: 10px;
}

.order-table .table-actions {
  flex-wrap: nowrap;
}

.orders-pagination {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.orders-pagination-info {
  font-size: 12px;
  color: #57708a;
}

:root[data-theme-mode='ink'] .orders-pagination-info {
  color: rgba(244, 248, 252, 0.9);
}

.orders-pagination-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.orders-page-btn {
  min-width: 34px;
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.orders-page-btn.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: rgba(255, 255, 255, 0.9);
}

.orders-page-ellipsis {
  color: #6d839b;
  font-size: 12px;
  padding: 0 2px;
}

.server-table th,
.server-table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

.server-table th {
  font-size: 12px;
  color: #48627c;
  font-weight: 600;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
  margin-right: 6px;
  vertical-align: middle;
}

.status-online {
  background: var(--ok);
}

.status-offline {
  background: #8b9fb3;
}

.notice-list {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.notice-item {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.45);
}

.notice-item strong {
  display: block;
  font-size: 13px;
  margin-bottom: 3px;
}

.notice-item small {
  color: #57708a;
}

.empty {
  font-size: 13px;
  color: #57708a;
  padding: 12px;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.35);
}

.toast-stack {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: clamp(16px, 6vh, 74px) 16px 16px;
  pointer-events: none;
  z-index: 220;
}

.toast {
  min-width: min(280px, calc(100vw - 40px));
  max-width: min(420px, calc(100vw - 40px));
  border-radius: 16px;
  padding: 14px 18px;
  text-align: center;
  font-weight: 600;
  color: #111827;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.58));
  border: 1px solid rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 34px rgba(14, 20, 29, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px) saturate(136%);
  -webkit-backdrop-filter: blur(14px) saturate(136%);
  opacity: 0;
  transform: translate3d(0, -8px, 0) scale(0.985);
  animation: toastFadeInOut 3.2s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
  will-change: opacity, transform;
  pointer-events: none;
}

.toast.error {
  border-color: rgba(239, 68, 68, 0.54);
}

.toast.warn {
  border-color: rgba(245, 158, 11, 0.56);
}

:root[data-theme-mode='ink'] .toast {
  color: #f8fbff;
  background: linear-gradient(160deg, rgba(12, 16, 22, 0.8), rgba(16, 22, 30, 0.58));
  border-color: rgba(255, 255, 255, 0.26);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(16px) saturate(128%);
  -webkit-backdrop-filter: blur(16px) saturate(128%);
}

:root[data-theme-mode='ink'] .toast.error {
  border-color: rgba(248, 113, 113, 0.62);
}

:root[data-theme-mode='ink'] .toast.warn {
  border-color: rgba(251, 191, 36, 0.62);
}

@keyframes toastFadeInOut {
  0% {
    opacity: 0;
    transform: translate3d(0, -8px, 0) scale(0.985);
  }
  14% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
  84% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate3d(0, -3px, 0) scale(0.992);
  }
}

@media (prefers-reduced-motion: reduce) {
  .toast {
    transform: none;
    animation: toastFadeInOutReduced 3.2s linear forwards;
  }
}

@keyframes toastFadeInOutReduced {
  0% {
    opacity: 0;
  }
  14% {
    opacity: 1;
  }
  84% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.loading {
  min-height: 220px;
  display: grid;
  place-items: center;
  color: #36506d;
}

.loading::before {
  content: '';
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 3px solid rgba(31, 80, 130, 0.2);
  border-top-color: rgba(31, 80, 130, 0.8);
  animation: spin 0.8s linear infinite;
  margin-right: 8px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.hidden {
  display: none !important;
}

@media (max-width: 980px) {
  #app.auth-mode .app-shell {
    width: min(380px, calc(100% - 18px));
    margin: 14px auto 20px;
    min-height: calc(100dvh - 28px);
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .auth-grid {
    width: 100%;
    min-height: calc(100dvh - 28px);
    justify-content: center;
    align-items: center;
  }

  .dashboard-grid .col-4,
  .dashboard-grid .col-6,
  .dashboard-grid .col-8 {
    grid-column: span 12;
  }

  .plan-grid {
    grid-template-columns: 1fr;
  }

  .plan-item-foot {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .plan-item-foot .btn {
    width: 100%;
  }

  .coupon-input {
    width: 100%;
    min-width: 0;
  }

  .gift-card-actions {
    margin-top: 12px;
    align-items: stretch;
  }

  .gift-card-actions .btn {
    width: 100%;
  }

  .subscription-actions {
    margin-top: 12px;
  }

  .card-subscribe .subscription-actions,
  .card-gift .gift-card-actions {
    margin-top: 12px;
    padding-top: 0;
  }

  .traffic-summary-grid {
    grid-template-columns: 1fr;
  }

  .traffic-range-switch {
    width: 100%;
  }

  .traffic-range-btn {
    flex: 1 1 0;
    text-align: center;
  }

  .traffic-tooltip {
    position: static;
    width: 100%;
    margin-bottom: 12px;
  }

  .pending-item {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .app-shell {
    width: calc(100% - 18px);
    margin: 10px auto 18px;
  }

  #app.auth-mode .app-shell {
    position: fixed;
    inset: 0;
    width: auto;
    min-height: 100dvh;
    height: 100dvh;
    margin: 0;
    padding: max(env(safe-area-inset-top), 10px) 9px max(env(safe-area-inset-bottom), 10px);
    overflow: hidden;
    justify-content: center;
    align-items: center;
  }

  #app.auth-mode .view-wrap {
    width: 100%;
    height: 100%;
    display: flex !important;
    justify-content: center !important;
    align-items: center;
    padding: 0 !important;
    overflow: hidden;
  }

  .auth-grid {
    width: 100%;
    height: 100%;
    min-height: 0;
    justify-content: center;
    align-items: center;
    overflow: hidden;
  }

  .top-nav {
    flex-wrap: wrap;
  }

  .view-wrap {
    padding: 12px;
  }

  .auth-card {
    min-height: 0;
    padding: 24px 16px 16px;
    border-radius: 20px;
    margin: 0 auto;
    max-height: calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    border-color: rgba(10, 14, 20, 0.18);
    box-shadow: 0 24px 54px rgba(0, 0, 0, 0.58), 0 8px 18px rgba(0, 0, 0, 0.28);
    background-clip: padding-box;
  }

  .auth-logo-wrap {
    min-height: 150px;
    margin: 2px 0 20px;
  }

  .auth-logo {
    width: min(255px, 82vw);
    max-width: min(255px, 82vw);
    max-height: none;
    transform: scale(1.12);
  }

  .auth-subtitle {
    font-size: 12px;
  }

  .toast {
    min-width: min(260px, calc(100vw - 28px));
    max-width: min(360px, calc(100vw - 28px));
  }

  .traffic-chart-scroll {
    overflow-x: visible;
  }

  .traffic-chart {
    min-width: 0;
  }

  .traffic-chart-legend {
    justify-content: flex-start;
  }

  .traffic-table {
    min-width: 0;
    font-size: 11px;
  }

  .traffic-table th,
  .traffic-table td {
    padding: 8px 3px;
    font-size: 11px;
  }

  .traffic-table td:first-child {
    font-size: 11px;
  }

  .traffic-table th:nth-child(1),
  .traffic-table td:nth-child(1) {
    width: 17%;
  }

  .traffic-table th:nth-child(2),
  .traffic-table td:nth-child(2),
  .traffic-table th:nth-child(3),
  .traffic-table td:nth-child(3),
  .traffic-table th:nth-child(4),
  .traffic-table td:nth-child(4) {
    width: 22%;
  }

  .traffic-table th:nth-child(5),
  .traffic-table td:nth-child(5) {
    width: 17%;
  }

  .traffic-pagination {
    gap: 8px;
  }

  .traffic-pagination .orders-pagination-info {
    width: 100%;
    font-size: 11px;
  }

  .traffic-pagination .orders-pagination-controls {
    width: 100%;
    gap: 4px;
  }

  .traffic-pagination .orders-page-btn {
    min-width: 30px;
    height: 28px;
    padding: 0 8px;
  }
}

.app-view-nav {
  flex-wrap: wrap;
  overflow: visible;
  scrollbar-width: auto;
  padding-bottom: 0;
}

.app-view-nav::-webkit-scrollbar {
  display: initial;
}

.app-view-nav .view-tab[data-view='traffic'] {
  order: 0;
}

@media (max-width: 980px) {
  .traffic-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
}

@media (max-width: 720px) {
  .traffic-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .traffic-summary-item {
    min-height: auto;
    padding: 10px 8px;
  }

  .traffic-summary-item span {
    font-size: 10px;
  }

  .traffic-summary-item strong {
    margin-top: 4px;
    font-size: 13px;
    line-height: 1.2;
  }

  .traffic-summary-item small {
    display: none;
  }

  .traffic-detail-count {
    width: 100%;
    margin-top: 0;
  }
}

