:root {
  --bg: #07101e;
  --bg-soft: #0a1424;
  --sidebar: #081220;
  --panel: rgba(13, 25, 43, 0.88);
  --panel-solid: #0e1a2d;
  --panel-high: #132138;
  --line: rgba(135, 164, 205, 0.13);
  --line-strong: rgba(119, 167, 231, 0.22);
  --text: #f3f7ff;
  --text-soft: #b7c2d5;
  --muted: #71809a;
  --blue: #5ea8ff;
  --blue-deep: #377fe5;
  --mint: #33d6aa;
  --violet: #9f78ff;
  --coral: #ff6e7e;
  --amber: #f1bd5c;
  --danger: #ff7183;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 80px rgba(1, 7, 18, 0.36);
  --sidebar-width: 258px;
  font-family: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 82% 8%, rgba(57, 117, 212, 0.08), transparent 28%),
    linear-gradient(135deg, #07101e 0%, #091322 48%, #07101c 100%);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(113, 151, 207, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(113, 151, 207, 0.026) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, black, transparent 84%);
  content: "";
  pointer-events: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

::selection {
  background: rgba(94, 168, 255, 0.32);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: 9px;
  background: var(--panel-solid);
  color: var(--text);
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform 150ms ease;
}

.skip-link:focus { transform: translateY(0); }

.ambient {
  position: fixed;
  z-index: -1;
  width: 36vw;
  height: 36vw;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.14;
  pointer-events: none;
}

.ambient-one {
  top: -20vw;
  right: -6vw;
  background: #357cc8;
}

.ambient-two {
  bottom: -25vw;
  left: 4vw;
  background: #2a9a83;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  letter-spacing: 0.02em;
}

.brand-lockup > span:last-child {
  display: flex;
  flex-direction: column;
}

.brand-lockup b {
  font-size: 20px;
  line-height: 1.2;
}

.brand-lockup small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(94, 168, 255, 0.3);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(94, 168, 255, 0.16), rgba(94, 168, 255, 0.03));
  box-shadow: inset 0 0 18px rgba(94, 168, 255, 0.08);
}

.brand-mark i {
  position: absolute;
  width: 5px;
  height: 15px;
  border-radius: 4px;
  background: var(--blue);
  transform: rotate(32deg);
  box-shadow: 0 0 12px rgba(94, 168, 255, 0.5);
}

.brand-mark i:first-child { transform: translateX(-7px) rotate(32deg); opacity: 0.55; }
.brand-mark i:last-child { transform: translateX(7px) rotate(32deg); opacity: 0.75; }

.eyebrow,
.mini-label,
.panel-kicker {
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.mini-label,
.panel-kicker {
  color: #7184a2;
  letter-spacing: 0.16em;
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(420px, 1.1fr) minmax(440px, 0.9fr);
}

.auth-brand {
  position: relative;
  display: flex;
  min-height: 100vh;
  padding: 54px clamp(44px, 6vw, 108px);
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--line);
  background:
    radial-gradient(circle at 70% 38%, rgba(51, 214, 170, 0.11), transparent 28%),
    radial-gradient(circle at 22% 64%, rgba(94, 168, 255, 0.1), transparent 30%),
    linear-gradient(145deg, rgba(10, 23, 40, 0.94), rgba(7, 16, 29, 0.96));
  overflow: hidden;
}

.auth-brand::before,
.auth-brand::after {
  position: absolute;
  border: 1px solid rgba(94, 168, 255, 0.09);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.auth-brand::before {
  right: -180px;
  bottom: -210px;
  width: 540px;
  height: 540px;
}

.auth-brand::after {
  right: -85px;
  bottom: -115px;
  width: 350px;
  height: 350px;
}

.auth-story {
  position: relative;
  z-index: 1;
  max-width: 650px;
  margin: auto 0;
  padding: 80px 0;
}

.auth-story h1 {
  max-width: 620px;
  margin: 18px 0 24px;
  font-size: clamp(38px, 4.4vw, 68px);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -0.045em;
}

.auth-story h1 em {
  color: var(--blue);
  font-style: normal;
}

.auth-story > p {
  max-width: 530px;
  margin: 0;
  color: var(--text-soft);
  font-size: 16px;
  line-height: 1.9;
}

.auth-points {
  display: grid;
  max-width: 570px;
  margin: 46px 0 0;
  padding: 0;
  grid-template-columns: repeat(3, 1fr);
  list-style: none;
}

.auth-points li {
  display: flex;
  min-height: 76px;
  padding: 0 22px;
  flex-direction: column;
  justify-content: center;
  border-left: 1px solid var(--line-strong);
  color: var(--text-soft);
  font-size: 12px;
}

.auth-points li:first-child { padding-left: 0; border-left: 0; }

.auth-points li span {
  margin-bottom: 8px;
  color: var(--mint);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
}

.auth-legal {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #47566f;
  font-size: 9px;
  letter-spacing: 0.14em;
}

.auth-panel-wrap {
  position: relative;
  display: flex;
  min-height: 100vh;
  padding: 40px;
  align-items: center;
  justify-content: center;
}

.auth-card {
  width: min(460px, 100%);
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: rgba(12, 25, 43, 0.88);
  box-shadow: var(--shadow), inset 0 1px rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(22px);
  overflow: hidden;
}

.auth-card-head {
  display: flex;
  height: 58px;
  padding: 0 24px;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 13px;
}

.status-orb,
.demo-dot,
.provider-dot,
.health-dot,
.preview-live i,
.policy-label i,
.mode-badge span {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 12px rgba(51, 214, 170, 0.68);
}

.auth-card-body {
  padding: 42px;
}

.auth-card-brand { display: none; }

.auth-card h2 {
  margin: 9px 0 9px;
  font-size: 28px;
  letter-spacing: -0.03em;
}

.auth-card-body > p:not(.form-error) {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.field {
  display: block;
  margin: 0 0 18px;
}

.field > span:first-child {
  display: block;
  margin-bottom: 9px;
  color: #c5cede;
  font-size: 13px;
  font-weight: 600;
}

.input-wrap,
.select-wrap {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: rgba(19, 34, 57, 0.74);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.input-wrap:focus-within,
.select-wrap:focus-within {
  border-color: rgba(94, 168, 255, 0.72);
  background: rgba(20, 38, 64, 0.92);
  box-shadow: 0 0 0 3px rgba(94, 168, 255, 0.1);
}

.input-wrap input,
.select-wrap select {
  width: 100%;
  height: 50px;
  padding: 0 15px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 15px;
}

.input-wrap .input-icon + input {
  padding-left: 42px;
}

.input-wrap input::placeholder {
  color: #56647b;
}

.select-wrap select {
  appearance: none;
  cursor: pointer;
}

.select-wrap::after {
  position: absolute;
  right: 16px;
  color: var(--muted);
  content: "⌄";
  pointer-events: none;
}

.select-wrap option {
  background: var(--panel-solid);
  color: var(--text);
}

.input-icon {
  position: absolute;
  left: 15px;
  z-index: 1;
  color: var(--blue);
  font-size: 16px;
}

.icon-button {
  display: inline-grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  place-items: center;
  transition: color 150ms ease, background 150ms ease;
}

.icon-button:hover {
  background: rgba(94, 168, 255, 0.08);
  color: var(--text);
}

.password-toggle {
  margin-right: 6px;
  font-size: 12px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  padding: 0 18px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 650;
  font-size: 13px;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
}

.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:active:not(:disabled) { transform: translateY(0); }
.button:disabled { cursor: not-allowed; opacity: 0.42; }

.button.primary {
  background: linear-gradient(135deg, #5ba7ff, #438ce9);
  color: #061020;
  box-shadow: 0 10px 28px rgba(68, 142, 235, 0.22);
}

.button.primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #70b4ff, #4d96f4);
  box-shadow: 0 13px 34px rgba(68, 142, 235, 0.3);
}

.button.ghost {
  border-color: var(--line-strong);
  background: rgba(16, 29, 49, 0.72);
  color: var(--text-soft);
}

.button.ghost:hover:not(:disabled) {
  border-color: rgba(94, 168, 255, 0.4);
  background: rgba(24, 43, 70, 0.85);
  color: var(--text);
}

.button.full { width: 100%; }
.button.large { min-height: 52px; }
.button.busy { pointer-events: none; }
.button.busy::before {
  width: 13px;
  height: 13px;
  border: 2px solid rgba(5, 15, 28, 0.35);
  border-top-color: #07101e;
  border-radius: 50%;
  animation: spin 750ms linear infinite;
  content: "";
}

.demo-hint {
  display: flex;
  margin-top: 18px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #66758e;
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}

.demo-dot {
  width: 5px;
  height: 5px;
  background: var(--amber);
  box-shadow: 0 0 8px rgba(241, 189, 92, 0.6);
}

.security-note {
  position: absolute;
  bottom: 34px;
  max-width: 430px;
  margin: 0;
  color: #53617a;
  font-size: 11px;
  line-height: 1.65;
  text-align: center;
}

.security-note span { color: var(--mint); }

.form-error {
  margin: -4px 0 16px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 113, 131, 0.22);
  border-radius: 9px;
  background: rgba(255, 113, 131, 0.08);
  color: #ff9ba8;
  font-size: 11px;
  line-height: 1.5;
}

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.sidebar {
  position: fixed;
  z-index: 60;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  width: var(--sidebar-width);
  padding: 0 15px;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: rgba(7, 17, 30, 0.96);
  backdrop-filter: blur(22px);
}

.sidebar-head {
  display: flex;
  height: 78px;
  padding: 0 8px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand-lockup.compact b { font-size: 15px; }
.brand-lockup.compact .brand-mark { width: 30px; height: 30px; }

.compliance-badge,
.safe-chip,
.policy-label,
.code-chip {
  display: inline-flex;
  min-height: 24px;
  padding: 0 8px;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(51, 214, 170, 0.22);
  border-radius: 7px;
  background: rgba(51, 214, 170, 0.07);
  color: var(--mint);
  font-size: 9px;
  white-space: nowrap;
}

.nav-list {
  padding: 22px 0;
  flex: 1;
  overflow-y: auto;
}

.nav-label {
  margin: 18px 13px 8px;
  color: #445169;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.nav-label:first-child { margin-top: 0; }

.nav-item {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 44px;
  margin: 3px 0;
  padding: 0 13px;
  align-items: center;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #77859c;
  cursor: pointer;
  font-size: 12px;
  text-align: left;
  transition: all 150ms ease;
}

.nav-item:hover {
  background: rgba(94, 168, 255, 0.05);
  color: #cdd6e5;
}

.nav-item.active {
  border-color: rgba(94, 168, 255, 0.19);
  background: linear-gradient(90deg, rgba(94, 168, 255, 0.13), rgba(94, 168, 255, 0.04));
  color: var(--blue);
  box-shadow: inset 2px 0 var(--blue);
}

.nav-icon {
  display: grid;
  width: 22px;
  height: 22px;
  color: currentColor;
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 16px;
  place-items: center;
}

.nav-item small {
  margin-left: auto;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(51, 214, 170, 0.1);
  color: var(--mint);
  font-size: 8px;
}

.sidebar-foot {
  display: flex;
  min-height: 78px;
  padding: 14px 8px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
}

.provider-mini {
  display: flex;
  align-items: center;
  gap: 9px;
}

.provider-mini > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.provider-mini b { color: #9cabbe; font-size: 9px; font-weight: 600; }
.provider-mini small { color: #4e5b70; font-size: 8px; }
.provider-dot.offline { background: var(--danger); box-shadow: 0 0 10px rgba(255, 113, 131, 0.5); }
.provider-dot.degraded { background: var(--amber); box-shadow: 0 0 10px rgba(241, 189, 92, 0.5); }
.version { color: #3d4960; font-size: 8px; }

.sidebar-backdrop {
  display: none;
  position: fixed;
  z-index: 55;
  inset: 0;
  border: 0;
  background: rgba(3, 8, 15, 0.65);
  backdrop-filter: blur(4px);
}

.main-area {
  display: flex;
  min-width: 0;
  min-height: 100vh;
  grid-column: 2;
  flex-direction: column;
}

.topbar {
  position: sticky;
  z-index: 40;
  top: 0;
  display: flex;
  min-height: 78px;
  padding: 0 clamp(20px, 3vw, 42px);
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 16, 29, 0.83);
  backdrop-filter: blur(22px);
}

.topbar-title { display: flex; flex-direction: column; gap: 3px; }
.topbar-title h1 { margin: 0; font-size: 16px; font-weight: 650; }
.topbar-title .mini-label { font-size: 7px; }
.topbar-actions { position: relative; display: flex; align-items: center; gap: 11px; }

.mode-badge {
  display: flex;
  height: 30px;
  padding: 0 11px;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(241, 189, 92, 0.22);
  border-radius: 8px;
  background: rgba(241, 189, 92, 0.06);
  color: var(--amber);
  font-size: 9px;
}

.mode-badge span { width: 5px; height: 5px; background: var(--amber); box-shadow: 0 0 9px rgba(241, 189, 92, 0.6); }
.mode-badge.live { border-color: rgba(51, 214, 170, 0.25); background: rgba(51, 214, 170, 0.07); color: var(--mint); }
.mode-badge.live span { background: var(--mint); box-shadow: 0 0 9px rgba(51, 214, 170, 0.7); }

.balance-pill {
  display: flex;
  height: 44px;
  padding: 0 15px;
  align-items: flex-end;
  justify-content: center;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(14, 27, 46, 0.72);
  cursor: pointer;
}

.balance-pill small { color: #5d6b82; font-size: 7px; }
.balance-pill strong { margin-top: 2px; color: var(--mint); font-family: ui-monospace, SFMono-Regular, monospace; font-size: 12px; }

.user-button {
  display: flex;
  min-width: 150px;
  height: 48px;
  padding: 0 9px;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.user-button:hover { background: rgba(94, 168, 255, 0.05); }
.user-button > span:first-child,
.profile-avatar {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border: 1px solid rgba(94, 168, 255, 0.28);
  border-radius: 9px;
  background: linear-gradient(145deg, #193557, #10243e);
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  place-items: center;
}

.user-button > span:nth-child(2) { display: flex; flex-direction: column; gap: 2px; }
.user-button b { color: #d8e1ef; font-size: 10px; }
.user-button small { color: #526078; font-size: 8px; }
.user-button i { margin-left: auto; color: #5b6980; font-style: normal; }

.user-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 160px;
  padding: 7px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #101d31;
  box-shadow: var(--shadow);
}

.user-popover button {
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  font-size: 10px;
  text-align: left;
}

.user-popover button:hover { background: rgba(94, 168, 255, 0.08); color: var(--text); }
.menu-button { display: none; }

.content-area {
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
  padding: clamp(26px, 3vw, 44px);
  flex: 1;
}

.page { display: none; animation: pageIn 240ms ease both; }
.page.active { display: block; }

.page-heading {
  display: flex;
  margin-bottom: 28px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.page-heading h2 {
  margin: 7px 0 5px;
  font-size: clamp(24px, 2.2vw, 32px);
  font-weight: 650;
  letter-spacing: -0.04em;
}

.page-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.policy-label {
  min-height: 30px;
  padding: 0 11px;
}

.stats-grid {
  display: grid;
  margin-bottom: 22px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.stat-card {
  position: relative;
  min-height: 168px;
  padding: 22px;
  border: 1px solid var(--line);
  border-top: 2px solid currentColor;
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(17, 31, 52, 0.9), rgba(11, 23, 40, 0.91));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.015);
  color: var(--blue);
  overflow: hidden;
  transition: transform 180ms ease, border-color 180ms ease;
}

.stat-card:hover { transform: translateY(-2px); border-color: currentColor; }
.stat-card.mint { color: var(--mint); }
.stat-card.violet { color: var(--violet); }
.stat-card.coral { color: var(--coral); }
.stat-top { display: flex; margin-bottom: 20px; align-items: center; justify-content: space-between; }
.stat-symbol { display: grid; width: 28px; height: 28px; border: 1px solid currentColor; border-radius: 8px; background: color-mix(in srgb, currentColor 9%, transparent); font-family: ui-monospace, monospace; font-size: 12px; place-items: center; }
.trend { padding: 4px 7px; border-radius: 5px; background: rgba(114, 131, 158, 0.08); color: #708099; font-size: 8px; }
.trend.positive { background: rgba(51, 214, 170, 0.08); color: var(--mint); }
.stat-card p { margin: 0 0 7px; color: #77859c; font-size: 11px; }
.stat-card strong { position: relative; z-index: 1; display: block; margin-bottom: 8px; color: currentColor; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 26px; letter-spacing: -0.04em; }
.stat-card small { color: #536079; font-size: 9px; }
.card-glow { position: absolute; right: -24px; bottom: -34px; width: 110px; height: 110px; border-radius: 50%; background: currentColor; filter: blur(48px); opacity: 0.09; }

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.8fr);
  gap: 18px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.018);
  backdrop-filter: blur(18px);
}

.panel-head {
  display: flex;
  min-height: 68px;
  padding: 16px 20px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.panel-head h3 {
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 630;
}

.panel-kicker { font-size: 7px; }
.text-button { border: 0; background: transparent; color: #71819b; cursor: pointer; font-size: 9px; }
.text-button:hover { color: var(--blue); }
.text-button span { margin-left: 5px; color: var(--blue); }
.muted-text { color: #5a6880; font-size: 9px; }

.activity-panel { min-width: 0; }
.quick-panel { grid-row: span 2; }
.notice-panel { min-width: 0; }
.notice-panel .panel-head h3 { font-size: 16px; }

.table-wrap {
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-color: rgba(52, 127, 227, 0.35) transparent;
  scrollbar-width: thin;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}

.data-table th,
.data-table td {
  height: 52px;
  padding: 0 20px;
  border-bottom: 1px solid rgba(135, 164, 205, 0.08);
  color: #8390a5;
  font-size: 9px;
  text-align: left;
}

.data-table th {
  height: 41px;
  background: rgba(14, 29, 50, 0.56);
  color: #56647b;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.data-table tbody tr { transition: background 120ms ease; }
.data-table tbody tr:hover { background: rgba(94, 168, 255, 0.025); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table code { color: #9daabd; font-family: ui-monospace, SFMono-Regular, monospace; font-size: 9px; }
.data-table.roomy th,
.data-table.roomy td { height: 58px; }
.empty-cell { height: 150px !important; color: #536078 !important; text-align: center !important; }

.status-badge {
  display: inline-flex;
  min-height: 24px;
  padding: 0 8px;
  align-items: center;
  border: 1px solid rgba(51, 214, 170, 0.22);
  border-radius: 6px;
  background: rgba(51, 214, 170, 0.07);
  color: var(--mint);
  font-size: 8px;
}

.status-badge.pending { border-color: rgba(241, 189, 92, 0.22); background: rgba(241, 189, 92, 0.07); color: var(--amber); }
.status-badge.failed { border-color: rgba(255, 113, 131, 0.22); background: rgba(255, 113, 131, 0.07); color: var(--danger); }

.quick-panel { padding-bottom: 20px; text-align: center; }
.quick-panel .panel-head { text-align: left; }
.quick-visual { position: relative; display: grid; width: 126px; height: 126px; margin: 30px auto 20px; place-items: center; }
.quick-core { position: relative; z-index: 2; display: grid; width: 58px; height: 58px; border: 1px solid rgba(94, 168, 255, 0.35); border-radius: 50%; background: radial-gradient(circle at 35% 30%, #70b4ff, #397fdc); color: #07101e; font-size: 22px; font-weight: 800; place-items: center; box-shadow: 0 0 35px rgba(75, 151, 244, 0.28); }
.ring { position: absolute; border: 1px solid rgba(94, 168, 255, 0.15); border-radius: 50%; }
.ring-one { inset: 16px; }
.ring-two { inset: 0; border-style: dashed; animation: spin 18s linear infinite; }
.quick-panel > p { max-width: 270px; margin: 0 auto 24px; color: #6e7d95; font-size: 10px; line-height: 1.7; }
.quick-panel > .button { width: calc(100% - 40px); margin: 0 20px; }

.notice-content {
  display: flex;
  min-height: 118px;
  padding: 22px 24px;
  align-items: flex-start;
  gap: 14px;
}

.notice-icon { display: grid; width: 32px; height: 32px; flex: 0 0 auto; border: 1px solid rgba(94, 168, 255, 0.25); border-radius: 9px; background: rgba(94, 168, 255, 0.08); color: var(--blue); font-family: ui-monospace, monospace; font-size: 14px; place-items: center; }
.notice-content p { min-width: 0; margin: 1px 0 0; flex: 1; color: #8391a8; font-size: 14px; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }
.notice-link { color: #2f86ee; font-weight: 650; text-decoration: underline; text-decoration-color: rgba(47, 134, 238, .38); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color 120ms ease, text-decoration-color 120ms ease, background 120ms ease; }
.notice-link:visited { color: #2f86ee; }
.notice-link:hover { color: #126ed8; text-decoration-color: currentColor; }
.notice-link:focus-visible { border-radius: 4px; outline: 2px solid rgba(47, 134, 238, .48); outline-offset: 3px; background: rgba(47, 134, 238, .08); }
.notice-panel[data-notice-level="warning"] .notice-icon { border-color: rgba(241, 189, 92, .34); background: rgba(241, 189, 92, .1); color: var(--amber); }
.notice-panel[data-notice-level="maintenance"] .notice-icon { border-color: rgba(255, 113, 131, .34); background: rgba(255, 113, 131, .1); color: var(--danger); }
.send-evidence-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 10px 12px; border: 1px solid rgba(31, 175, 140, .22); border-radius: 10px; background: rgba(31, 175, 140, .06); color: #577066; font-size: 10px; line-height: 1.6; }
.send-evidence-status.warning { border-color: rgba(241, 189, 92, .35); background: rgba(241, 189, 92, .09); color: #896620; }
.send-evidence-status button { flex: 0 0 auto; border: 0; background: transparent; color: var(--blue); font: inherit; font-weight: 700; cursor: pointer; }
.send-evidence-status button:hover { text-decoration: underline; }
.send-evidence-status button:focus-visible { border-radius: 4px; outline: 2px solid rgba(47, 134, 238, .45); outline-offset: 2px; }

.health-panel { padding-bottom: 8px; }
.health-row { display: flex; min-height: 47px; padding: 0 20px; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(135, 164, 205, 0.07); color: #7d8ba1; font-size: 9px; }
.health-row:last-child { border-bottom: 0; }
.health-row span { display: flex; align-items: center; gap: 9px; }
.health-row b { color: #9eaabd; font-size: 9px; font-weight: 550; }
.health-dot { width: 6px; height: 6px; }
.health-dot.offline { background: var(--danger); box-shadow: 0 0 9px rgba(255, 113, 131, 0.55); }
.health-dot.degraded { background: var(--amber); box-shadow: 0 0 9px rgba(241, 189, 92, 0.55); }
.progress-full { width: 100%; }

.info-banner {
  display: flex;
  margin-bottom: 20px;
  padding: 15px 18px;
  align-items: center;
  gap: 13px;
  border: 1px solid rgba(241, 189, 92, 0.18);
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(241, 189, 92, 0.08), rgba(241, 189, 92, 0.02));
}

.info-banner.live { border-color: rgba(51, 214, 170, 0.18); background: linear-gradient(90deg, rgba(51, 214, 170, 0.08), rgba(51, 214, 170, 0.02)); }
.banner-icon { display: grid; width: 28px; height: 28px; flex: 0 0 auto; border: 1px solid rgba(241, 189, 92, 0.32); border-radius: 8px; color: var(--amber); font-family: ui-monospace, monospace; place-items: center; }
.info-banner.live .banner-icon { border-color: rgba(51, 214, 170, 0.32); color: var(--mint); }
.info-banner b { display: block; margin-bottom: 3px; color: #b9c4d5; font-size: 10px; }
.info-banner p { margin: 0; color: #67758d; font-size: 9px; }

.send-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 18px;
  align-items: start;
}

.send-form { padding-bottom: 24px; }
.send-form .panel-head { margin-bottom: 0; }
.type-selector { display: grid; padding: 22px; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.type-card { position: relative; display: flex; min-height: 82px; padding: 13px; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: 12px; background: rgba(15, 29, 49, 0.58); cursor: pointer; transition: border-color 160ms ease, background 160ms ease, transform 160ms ease; }
.type-card:hover { transform: translateY(-1px); border-color: rgba(94, 168, 255, 0.3); }
.type-card.selected { border-color: rgba(94, 168, 255, 0.58); background: rgba(94, 168, 255, 0.08); box-shadow: inset 0 0 20px rgba(94, 168, 255, 0.035); }
.type-card input { position: absolute; opacity: 0; pointer-events: none; }
.type-card > span:nth-of-type(2) { display: flex; min-width: 0; flex-direction: column; gap: 5px; }
.type-card b { color: #bfc9d9; font-size: 11px; }
.type-card small { color: #64738b; font-size: 9px; }
.type-card > i { margin-left: auto; color: transparent; font-style: normal; font-size: 10px; }
.type-card.selected > i { color: var(--blue); }
.type-card.unavailable { opacity: .52; cursor: not-allowed; filter: grayscale(.35); }
.type-card.unavailable:hover { transform: none; border-color: var(--line); }
.type-card.unavailable small { color: var(--amber); }
.type-icon { display: grid; width: 38px; height: 38px; flex: 0 0 auto; border: 1px solid rgba(94, 168, 255, 0.26); border-radius: 10px; background: rgba(94, 168, 255, 0.08); color: var(--blue); font-family: ui-monospace, monospace; font-size: 13px; font-weight: 800; place-items: center; }
.type-icon.violet { border-color: rgba(159, 120, 255, 0.26); background: rgba(159, 120, 255, 0.08); color: var(--violet); }
.type-icon.mint { border-color: rgba(51, 214, 170, 0.26); background: rgba(51, 214, 170, 0.08); color: var(--mint); }
.type-icon.coral { border-color: rgba(255, 113, 131, 0.26); background: rgba(255, 113, 131, 0.08); color: var(--danger); }
.type-icon.amber { border-color: rgba(241, 189, 92, 0.26); background: rgba(241, 189, 92, 0.08); color: var(--amber); }

.type-description {
  min-height: 54px;
  margin-bottom: 18px;
  padding: 13px 14px;
  border-left: 3px solid var(--blue);
  border-radius: 0 9px 9px 0;
  background: rgba(94, 168, 255, 0.07);
  color: #8190a7;
  font-size: 9px;
  line-height: 1.7;
}
.type-description b { display: block; margin-bottom: 3px; color: #aebbd0; font-size: 10px; }

.form-section { padding: 8px 22px 0; }
.section-title { display: flex; margin: 16px 0 20px; align-items: center; gap: 11px; }
.section-title > div { display: flex; flex-direction: column; gap: 3px; }
.section-title b { color: #bcc6d6; font-size: 11px; }
.section-title small { color: #56657c; font-size: 8px; }
.step-number { display: grid; width: 28px; height: 28px; border: 1px solid rgba(94, 168, 255, 0.22); border-radius: 8px; background: rgba(94, 168, 255, 0.06); color: var(--blue); font-family: ui-monospace, monospace; font-size: 9px; place-items: center; }
.field-help { display: block; margin-top: 7px; color: #536179; font-size: 8px; line-height: 1.6; }
.code-input-wrap input { padding-right: 108px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 16px; letter-spacing: 0.12em; }
.input-action { position: absolute; right: 7px; height: 34px; padding: 0 11px; border: 1px solid rgba(94, 168, 255, 0.18); border-radius: 7px; background: rgba(94, 168, 255, 0.07); color: var(--blue); cursor: pointer; font-size: 8px; }
.input-action:hover { background: rgba(94, 168, 255, 0.13); }

.consent-section { margin-top: 4px; padding-top: 3px; border-top: 1px solid var(--line); }
.consent-check { display: flex; padding: 13px; align-items: flex-start; gap: 11px; border: 1px solid rgba(135, 164, 205, 0.11); border-radius: 10px; background: rgba(12, 23, 40, 0.48); cursor: pointer; }
.consent-check input { position: absolute; opacity: 0; }
.custom-check { display: grid; width: 18px; height: 18px; flex: 0 0 auto; border: 1px solid #3e4f69; border-radius: 5px; color: transparent; font-size: 9px; place-items: center; transition: all 150ms ease; }
.consent-check input:checked + .custom-check { border-color: var(--mint); background: var(--mint); color: #07101e; }
.consent-check > span:last-child { color: #6f7e95; font-size: 9px; line-height: 1.7; }
.send-form > .form-error { margin: 18px 22px 0; }
.send-form > .button { width: calc(100% - 44px); margin: 20px 22px 0; }

.send-side { display: grid; gap: 18px; }
.preview-panel { overflow: hidden; }
.preview-live { display: inline-flex; align-items: center; gap: 6px; color: var(--mint); font-size: 8px; }
.preview-live i { width: 5px; height: 5px; }
.phone-preview { position: relative; width: 230px; height: 394px; margin: 26px auto 20px; padding: 13px; border: 2px solid #23334d; border-radius: 35px; background: #0a1320; box-shadow: 0 23px 50px rgba(1, 6, 15, 0.38), inset 0 0 0 5px #060d17; overflow: hidden; }
.phone-preview::before { position: absolute; top: 8px; left: 50%; z-index: 2; width: 66px; height: 15px; border-radius: 9px; background: #050b13; content: ""; transform: translateX(-50%); }
.phone-top { display: flex; height: 31px; padding: 0 10px; align-items: center; justify-content: space-between; color: #7e8ca1; font-size: 6px; }
.message-scene { min-height: 323px; padding: 55px 8px 0; border-radius: 23px; background: linear-gradient(160deg, #edf3fb, #dbe5f2); }
.message-sender { display: block; margin: 0 0 8px 4px; color: #8b99aa; font-size: 7px; }
.message-bubble { padding: 13px 12px 9px; border-radius: 4px 14px 14px; background: #fff; color: #1d2a3b; box-shadow: 0 8px 20px rgba(50, 70, 95, 0.08); }
.message-bubble p { margin: 0; font-size: 9px; line-height: 1.7; }
.message-bubble b { color: #397fdc; font-family: ui-monospace, monospace; letter-spacing: 0.04em; }
.message-bubble small { display: block; margin-top: 7px; color: #b2bcc9; font-size: 6px; text-align: right; }
.message-warning { display: block; margin-top: 12px; color: #9aa7b7; font-size: 6px; text-align: center; }
.phone-home { position: absolute; bottom: 7px; left: 50%; width: 70px; height: 3px; border-radius: 2px; background: #536179; transform: translateX(-50%); }
.preview-meta { display: flex; padding: 14px 20px 18px; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); color: #5c6a81; font-size: 8px; }
.preview-meta b { margin-left: 4px; color: #98a6ba; }

.safeguard-list { margin: 0; padding: 12px 20px 18px; list-style: none; }
.safeguard-list li { display: flex; min-height: 54px; padding: 10px 0; align-items: flex-start; gap: 11px; border-bottom: 1px solid rgba(135, 164, 205, 0.07); }
.safeguard-list li:last-child { border-bottom: 0; }
.safeguard-list li > span { display: grid; width: 20px; height: 20px; flex: 0 0 auto; border-radius: 6px; background: rgba(51, 214, 170, 0.09); color: var(--mint); font-size: 8px; place-items: center; }
.safeguard-list div { display: flex; flex-direction: column; gap: 4px; }
.safeguard-list b { color: #98a5b8; font-size: 9px; }
.safeguard-list small { color: #56647a; font-size: 8px; line-height: 1.5; }

.toolbar { display: flex; min-height: 66px; padding: 0 20px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.filter-tabs { display: flex; padding: 4px; gap: 4px; border: 1px solid var(--line); border-radius: 9px; background: rgba(9, 20, 35, 0.6); }
.filter-tabs button { min-height: 28px; padding: 0 11px; border: 0; border-radius: 6px; background: transparent; color: #66758c; cursor: pointer; font-size: 8px; }
.filter-tabs button.active { background: rgba(94, 168, 255, 0.12); color: var(--blue); }
.table-action { min-height: 27px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: #7d8ba1; cursor: pointer; font-size: 8px; }
.table-action:hover { border-color: rgba(94, 168, 255, 0.35); color: var(--blue); }
.data-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.data-stack small { color: #58667d; line-height: 1.45; }
.provider-route-button { min-height: 23px; padding: 0; border: 0; color: #6585aa; text-decoration: underline; text-underline-offset: 3px; }
.provider-route-button:hover { border: 0; color: var(--blue); }
.provider-badge { display: inline-flex; width: max-content; min-height: 23px; padding: 0 8px; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: rgba(113, 128, 154, 0.08); color: #8a98ad; font-size: 8px; font-weight: 800; white-space: nowrap; }
.provider-badge.sms886 { border-color: rgba(94, 168, 255, 0.3); background: rgba(94, 168, 255, 0.09); color: #79b8ff; }
.provider-badge.youma { border-color: rgba(51, 214, 170, 0.28); background: rgba(51, 214, 170, 0.08); color: #55d9b6; }
.provider-badge.mock { border-color: rgba(159, 120, 255, 0.28); background: rgba(159, 120, 255, 0.08); color: #b197ff; }

.template-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.template-card { position: relative; min-height: 285px; padding: 22px; overflow: hidden; }
.template-card::after { position: absolute; right: -42px; bottom: -48px; width: 135px; height: 135px; border-radius: 50%; background: var(--blue); filter: blur(60px); opacity: 0.06; content: ""; }
.template-card-head { display: flex; align-items: center; justify-content: space-between; }
.template-symbol { display: grid; width: 42px; height: 42px; border: 1px solid rgba(94, 168, 255, 0.24); border-radius: 12px; background: rgba(94, 168, 255, 0.08); color: var(--blue); font-family: ui-monospace, monospace; font-weight: 800; place-items: center; }
.template-card h3 { margin: 23px 0 8px; font-size: 17px; }
.template-card > p { margin: 0 0 20px; color: #65738a; font-size: 9px; }
.template-copy { min-height: 70px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: rgba(8, 18, 32, 0.6); color: #8996aa; font-size: 9px; line-height: 1.8; }
.template-copy b { color: var(--blue); font-family: ui-monospace, monospace; }
.template-card .button { position: relative; z-index: 1; margin-top: 18px; }
.loading-card { background: linear-gradient(90deg, rgba(15, 28, 47, 0.8) 25%, rgba(25, 43, 70, 0.75) 50%, rgba(15, 28, 47, 0.8) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }

.billing-grid { display: grid; margin-bottom: 18px; grid-template-columns: 1.25fr 0.75fr 0.75fr; gap: 18px; }
.balance-hero { position: relative; min-height: 210px; padding: 26px; border: 1px solid rgba(94, 168, 255, 0.2); border-radius: var(--radius); background: linear-gradient(140deg, #153157, #0d2039 70%); overflow: hidden; }
.balance-hero > div:first-child { position: relative; z-index: 2; }
.balance-hero p { margin: 22px 0 6px; color: #9bb1cc; font-size: 11px; }
.balance-hero strong { color: #e8f3ff; font-family: ui-monospace, SFMono-Regular, monospace; font-size: 36px; letter-spacing: -0.04em; }
.balance-hero > small { position: absolute; bottom: 24px; left: 26px; color: #6e86a6; font-size: 8px; }
.balance-decoration { position: absolute; right: -20px; bottom: -40px; width: 210px; height: 210px; }
.balance-decoration i { position: absolute; inset: 0; border: 1px solid rgba(118, 185, 255, 0.12); border-radius: 50%; }
.balance-decoration i:nth-child(2) { inset: 32px; }
.balance-decoration i:nth-child(3) { inset: 68px; background: rgba(94, 168, 255, 0.08); }
.quota-card,
.recharge-card { min-height: 210px; padding: 24px; }
.quota-card p,
.recharge-card p { margin: 25px 0 8px; color: #75839a; font-size: 10px; }
.quota-card strong { display: block; margin-bottom: 22px; color: var(--mint); font-family: ui-monospace, monospace; font-size: 30px; }
.quota-card small,
.recharge-card small { color: #536178; font-size: 8px; line-height: 1.6; }
.progress-track { height: 5px; margin-bottom: 10px; border-radius: 3px; background: rgba(51, 214, 170, 0.08); overflow: hidden; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: 3px; background: var(--mint); transition: width 400ms ease; }
.recharge-card h3 { margin: 0 0 8px; font-size: 14px; }
.recharge-card .button { margin-top: 18px; }
.ledger-panel { min-width: 0; }
.amount-debit { color: var(--coral); font-family: ui-monospace, monospace; }
.amount-credit { color: var(--mint); font-family: ui-monospace, monospace; }

.integration-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.connection-card { padding-bottom: 20px; }
.connection-head { display: flex; min-height: 84px; padding: 20px; align-items: center; gap: 13px; border-bottom: 1px solid var(--line); }
.provider-logo { display: grid; width: 42px; height: 42px; border: 1px solid rgba(51, 214, 170, 0.28); border-radius: 12px; background: rgba(51, 214, 170, 0.08); color: var(--mint); font-family: ui-monospace, monospace; font-size: 18px; font-weight: 800; place-items: center; }
.connection-head h3 { margin: 4px 0 0; font-size: 14px; }
.connection-head .status-badge { margin-left: auto; }
.connection-list { margin: 0; padding: 12px 20px; }
.connection-list div { display: flex; min-height: 44px; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid rgba(135, 164, 205, 0.07); }
.connection-list div:last-child { border-bottom: 0; }
.connection-list dt { color: #64738b; font-size: 9px; }
.connection-list dd { margin: 0; color: #9daabd; font-family: ui-monospace, monospace; font-size: 8px; text-align: right; }
.connection-result { margin: 8px 20px 0; padding: 12px; border: 1px solid rgba(51, 214, 170, 0.18); border-radius: 9px; background: rgba(51, 214, 170, 0.06); color: #83bfae; font-size: 9px; line-height: 1.6; }
.connection-result.error { border-color: rgba(255, 113, 131, 0.18); background: rgba(255, 113, 131, 0.06); color: #ce8790; }
.endpoint-list { margin: 0; padding: 10px 20px 18px; list-style: none; }
.endpoint-list li { display: grid; min-height: 48px; align-items: center; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; border-bottom: 1px solid rgba(135, 164, 205, 0.07); }
.endpoint-list li:last-child { border-bottom: 0; }
.endpoint-list code { color: #9eabbe; font-size: 9px; }
.endpoint-list small { color: #536178; font-size: 8px; }
.method-tag { display: inline-grid; width: 42px; height: 20px; border-radius: 5px; font-family: ui-monospace, monospace; font-size: 7px; font-weight: 800; place-items: center; }
.method-tag.get { background: rgba(94, 168, 255, 0.1); color: var(--blue); }
.method-tag.post { background: rgba(51, 214, 170, 0.1); color: var(--mint); }
.security-architecture { grid-column: 1 / -1; }
.flow-diagram { display: grid; padding: 28px; align-items: center; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 16px; }
.flow-diagram > div { display: flex; min-height: 96px; padding: 18px; align-items: flex-start; justify-content: center; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; background: rgba(9, 21, 37, 0.5); }
.flow-diagram span { color: var(--blue); font-family: ui-monospace, monospace; font-size: 8px; }
.flow-diagram b { margin: 9px 0 5px; color: #aeb9c9; font-size: 10px; }
.flow-diagram small { color: #56647b; font-size: 8px; }
.flow-diagram > i { color: #3f526d; font-style: normal; }

.account-grid { display: grid; grid-template-columns: 270px minmax(380px, 0.85fr) minmax(0, 1.15fr); gap: 18px; align-items: start; }
.profile-card { padding: 26px; text-align: center; }
.profile-avatar { width: 62px; height: 62px; margin: 0 auto 16px; border-radius: 18px; font-size: 20px; }
.profile-card h3 { margin: 0 0 5px; font-size: 16px; }
.profile-card > p { margin: 0 0 25px; color: #65738b; font-size: 9px; }
.profile-card dl { margin: 0 0 22px; }
.profile-card dl div { display: flex; min-height: 42px; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(135, 164, 205, 0.08); }
.profile-card dt { color: #5e6c83; font-size: 8px; }
.profile-card dd { margin: 0; color: #9ca9bc; font-size: 8px; }
.password-card { padding-bottom: 22px; }
.password-card > .field { margin-right: 20px; margin-left: 20px; }
.password-card > .field:first-of-type { margin-top: 20px; }
.password-card > .form-error { margin-right: 20px; margin-left: 20px; }
.password-card > .button { margin-left: 20px; }
.password-card > .field-help { display: inline-block; margin-left: 12px; }
.audit-card { min-width: 0; }
.audit-card .data-table th,
.audit-card .data-table td { padding: 0 14px; }

.app-footer {
  display: flex;
  min-height: 60px;
  padding: 0 clamp(20px, 3vw, 42px);
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: #364158;
  font-size: 7px;
  letter-spacing: 0.12em;
}

.confirm-dialog {
  width: min(430px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: #0e1b2e;
  color: var(--text);
  box-shadow: 0 36px 100px rgba(0, 0, 0, 0.55);
}

.confirm-dialog::backdrop { background: rgba(3, 8, 15, 0.74); backdrop-filter: blur(7px); }
.dialog-card { padding: 30px; text-align: center; }
.dialog-icon { display: grid; width: 56px; height: 56px; margin: 0 auto 20px; border: 1px solid rgba(94, 168, 255, 0.32); border-radius: 17px; background: rgba(94, 168, 255, 0.1); color: var(--blue); font-size: 21px; place-items: center; box-shadow: 0 0 30px rgba(94, 168, 255, 0.1); }
.dialog-card h2 { margin: 9px 0 9px; font-size: 21px; }
.dialog-card > p { margin: 0 auto 23px; color: #77859a; font-size: 10px; line-height: 1.8; }
.dialog-card dl { margin: 0 0 24px; padding: 11px 18px; border: 1px solid var(--line); border-radius: 11px; background: rgba(7, 17, 30, 0.45); }
.dialog-card dl div { display: flex; min-height: 39px; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(135, 164, 205, 0.07); }
.dialog-card dl div:last-child { border-bottom: 0; }
.dialog-card dt { color: #627088; font-size: 9px; }
.dialog-card dd { margin: 0; color: #aab5c6; font-family: ui-monospace, monospace; font-size: 9px; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }
.dialog-actions.single { grid-template-columns: 1fr; }
.login-popup-dialog { width: min(500px, calc(100vw - 32px)); }
.login-popup-icon { border-color: rgba(159, 120, 255, 0.32); background: rgba(159, 120, 255, 0.1); color: var(--violet); }
.dialog-card > .login-popup-content { max-height: min(38vh, 310px); margin-bottom: 24px; overflow: auto; color: #77859a; text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; }
.login-popup-dialog .button { text-decoration: none; }
.attempt-dialog { width: min(980px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; }
.attempt-dialog .dialog-card { text-align: left; }
.attempt-dialog .dialog-card > p { max-width: none; margin-right: 0; margin-left: 0; }
.attempt-dialog .dialog-title-row { display: flex; margin-bottom: 10px; align-items: flex-start; justify-content: space-between; gap: 20px; }
.attempt-dialog .dialog-title-row h2 { margin: 6px 0 0; }
.attempt-dialog .dialog-close { width: 34px; height: 34px; flex: 0 0 auto; font-size: 18px; }
.attempt-route-summary { margin-bottom: 14px; padding: 12px 14px; border: 1px solid rgba(94, 168, 255, 0.18); border-radius: 10px; background: rgba(94, 168, 255, 0.06); color: #8ca8c9; font-size: 9px; line-height: 1.7; }
.attempt-dialog .table-wrap { max-height: min(48vh, 440px); margin-bottom: 18px; border: 1px solid var(--line); border-radius: 11px; }
.attempt-dialog .dialog-actions { display: flex; justify-content: flex-end; }
.attempt-dialog .dialog-actions .button { min-width: 130px; }

.toast-region {
  position: fixed;
  z-index: 100;
  right: 22px;
  bottom: 22px;
  display: grid;
  width: min(340px, calc(100vw - 44px));
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  min-height: 56px;
  padding: 13px 15px;
  align-items: flex-start;
  gap: 11px;
  border: 1px solid rgba(51, 214, 170, 0.22);
  border-radius: 11px;
  background: #102236;
  color: #a6b4c7;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
  font-size: 12px;
  line-height: 1.6;
  animation: toastIn 220ms ease both;
}

.toast::before { display: grid; width: 20px; height: 20px; flex: 0 0 auto; border-radius: 6px; background: rgba(51, 214, 170, 0.1); color: var(--mint); content: "✓"; place-items: center; }
.toast.error { border-color: rgba(255, 113, 131, 0.22); }
.toast.error::before { background: rgba(255, 113, 131, 0.1); color: var(--danger); content: "!"; }
.toast.leaving { animation: toastOut 180ms ease both; }

.auth-tabs {
  display: grid;
  margin: -10px 0 24px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(6, 15, 27, 0.55);
  grid-template-columns: 1fr 1fr;
}

.auth-tabs button {
  min-height: 36px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #68778f;
  cursor: pointer;
  font-size: 12px;
}

.auth-tabs button.active {
  background: rgba(94, 168, 255, 0.12);
  color: var(--blue);
  box-shadow: inset 0 0 0 1px rgba(94, 168, 255, 0.13);
}

.auth-form { display: block; }
.remember-device {
  display: flex;
  margin: 4px 0 16px;
  padding: 11px 12px;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(135, 164, 205, 0.12);
  border-radius: 10px;
  background: rgba(12, 23, 40, 0.42);
  cursor: pointer;
}
.remember-device input { position: absolute; opacity: 0; pointer-events: none; }
.remember-check { display: grid; width: 18px; height: 18px; flex: 0 0 auto; border: 1px solid #3e4f69; border-radius: 5px; color: transparent; font-size: 9px; place-items: center; transition: all 150ms ease; }
.remember-device input:focus-visible + .remember-check { outline: 2px solid var(--blue); outline-offset: 2px; }
.remember-device input:checked + .remember-check { border-color: var(--blue); background: var(--blue); color: #fff; }
.remember-copy { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.remember-copy b { color: #aeb9ca; font-size: 9px; }
.remember-copy small { color: #5f6d83; font-size: 8px; line-height: 1.45; }
.auth-help { display: block; margin-top: 12px; text-align: center; line-height: 1.6; }
.compact-field { margin: 14px 0 0; }
.compact-field .input-wrap { min-height: 42px; }
.compact-field .input-wrap input { height: 40px; font-family: ui-monospace, SFMono-Regular, monospace; font-size: 10px; }

.admin-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.metric-list { padding: 8px 20px 18px; }
.metric-list > div { display: flex; min-height: 48px; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid rgba(135, 164, 205, 0.08); }
.metric-list > div:last-child { border-bottom: 0; }
.metric-list span { color: #68778f; font-size: 10px; }
.metric-list b { color: var(--text-soft); font-family: ui-monospace, SFMono-Regular, monospace; font-size: 11px; }

.admin-toolbar { justify-content: flex-start; }
.admin-toolbar .muted-text { margin-left: auto; }
.search-field { width: min(320px, 42vw); }
.search-field input,
.toolbar select {
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  outline: 0;
  background: rgba(15, 29, 50, 0.75);
  color: var(--text-soft);
  font-size: 10px;
}

.toolbar select { width: auto; min-width: 130px; cursor: pointer; }
.search-field input:focus,
.toolbar select:focus { border-color: rgba(94, 168, 255, 0.62); }
.search-field input::placeholder { color: #536178; }
.admin-table b { color: #b7c3d4; font-size: 10px; }
.admin-table small { color: #4f5e76; font-size: 8px; }
.table-actions { display: inline-flex; gap: 6px; }

.card-admin-grid { display: grid; margin-bottom: 18px; grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1.28fr); gap: 18px; align-items: start; }
.card-generator .form-section { padding-top: 22px; }
.batch-panel,
.card-list-panel { min-width: 0; }
.card-list-panel > .toolbar h3 { margin: 4px 0 0; font-size: 14px; }
.generated-dialog { width: min(720px, calc(100vw - 32px)); }
.generated-summary { display: flex; min-height: 44px; margin-bottom: 10px; padding: 0 14px; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: 9px; background: rgba(7, 17, 30, 0.5); color: #75859d; font-size: 9px; }
.generated-summary b { color: var(--mint); }
.generated-codes { width: 100%; min-height: 250px; padding: 14px; resize: vertical; border: 1px solid var(--line-strong); border-radius: 11px; outline: 0; background: #071321; color: #a9c9ec; font-family: ui-monospace, SFMono-Regular, monospace; font-size: 11px; line-height: 1.8; }
.generated-codes:focus { border-color: rgba(94, 168, 255, 0.55); }
.dialog-actions.three { grid-template-columns: 1fr 1fr 1.35fr; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pageIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes toastIn { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(10px); } }

@media (max-width: 1240px) {
  .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .type-selector { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-grid { grid-template-columns: 250px minmax(0, 1fr); }
  .audit-card { grid-column: 1 / -1; }
  .billing-grid { grid-template-columns: 1fr 1fr; }
  .balance-hero { grid-column: 1 / -1; }
}

@media (max-width: 1050px) {
  .app-shell { display: block; }
  .sidebar { transform: translateX(-100%); transition: transform 220ms ease; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop.open { display: block; }
  .main-area { grid-column: auto; }
  .menu-button { display: grid; }
  .topbar-title { margin-right: auto; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .quick-panel { grid-row: auto; }
  .send-layout { grid-template-columns: 1fr; }
  .send-side { grid-template-columns: 1fr 1fr; }
  .template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth-shell { grid-template-columns: 0.9fr 1.1fr; }
  .auth-points { grid-template-columns: 1fr; gap: 12px; }
  .auth-points li { min-height: auto; padding: 0; border-left: 0; flex-direction: row; justify-content: flex-start; gap: 10px; }
  .auth-points li span { margin-bottom: 0; }
  .card-admin-grid { grid-template-columns: 1fr; }
}

@media (max-width: 780px) {
  .auth-shell { display: block; }
  .auth-brand { display: none; }
  .auth-panel-wrap { min-height: 100vh; padding: 30px 24px; flex-direction: column; background: radial-gradient(circle at 50% 15%, rgba(94, 168, 255, 0.08), transparent 32%); }
  .auth-card-brand { display: inline-flex; margin-bottom: 26px; }
  .security-note { position: static; max-width: 460px; margin: 20px 0 0; padding: 0 12px; }
  .topbar { min-height: 68px; padding: 0 14px; }
  .topbar-title h1 { font-size: 14px; }
  .balance-pill { display: none; }
  .user-button { min-width: auto; }
  .user-button > span:nth-child(2),
  .user-button > i { display: none; }
  .mode-badge { height: 28px; padding: 0 8px; }
  .content-area { padding: 24px 14px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .page-heading .button { width: 100%; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { min-height: 145px; padding: 16px; }
  .stat-card strong { font-size: 21px; }
  .stat-top { margin-bottom: 16px; }
  .dashboard-grid,
  .send-side,
  .template-grid,
  .billing-grid,
  .integration-grid,
  .account-grid { grid-template-columns: 1fr; }
  .admin-summary-grid { grid-template-columns: 1fr; }
  .balance-hero,
  .security-architecture,
  .audit-card { grid-column: auto; }
  .type-selector { grid-template-columns: 1fr; padding: 17px; }
  .form-section { padding-right: 17px; padding-left: 17px; }
  .send-form > .button { width: calc(100% - 34px); margin-right: 17px; margin-left: 17px; }
  .send-form > .form-error { margin-right: 17px; margin-left: 17px; }
  .phone-preview { width: 210px; height: 370px; }
  .message-scene { min-height: 299px; }
  .toolbar { align-items: flex-start; flex-direction: column; justify-content: center; gap: 9px; }
  .filter-tabs { width: 100%; }
  .filter-tabs button { flex: 1; }
  .flow-diagram { grid-template-columns: 1fr; }
  .flow-diagram > i { transform: rotate(90deg); text-align: center; }
  .profile-card { order: 1; }
  .password-card { order: 2; }
  .audit-card { order: 3; }
  .app-footer { align-items: flex-start; flex-direction: column; justify-content: center; gap: 6px; }
  .admin-toolbar { align-items: stretch; }
  .admin-toolbar .search-field { width: 100%; }
  .admin-toolbar .muted-text { margin-left: 0; }
  .dialog-actions.three { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .auth-panel-wrap { padding: 18px; }
  .auth-card-body { padding: 28px 22px; }
  .auth-card { border-radius: 17px; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card { min-height: 140px; }
  .panel-head { padding: 14px 16px; }
  .data-table th,
  .data-table td { padding: 0 14px; }
  .info-banner { align-items: flex-start; }
  .preview-meta { align-items: flex-start; flex-direction: column; gap: 7px; }
  .connection-list div { align-items: flex-start; flex-direction: column; justify-content: center; gap: 5px; }
  .connection-list dd { text-align: left; overflow-wrap: anywhere; }
  .endpoint-list li { grid-template-columns: 44px minmax(0, 1fr); }
  .endpoint-list small { grid-column: 2; }
  .dialog-card { padding: 24px 19px; }
}

@media (prefers-contrast: more) {
  :root {
    --line: rgba(52, 75, 110, 0.25);
    --line-strong: rgba(52, 85, 130, 0.38);
  }

  .button,
  .input-wrap,
  .select-wrap,
  .panel,
  .auth-card { border-width: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
.provider-routing-hint { margin-top: -12px; border-color: #cfe2ff; background: #f2f7ff; }
.provider-routing-hint p { margin: 3px 0 0; }
