:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --surface: #ffffff;
  --ink: #152238;
  --muted: #68758a;
  --line: #dce3ed;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --danger: #b42318;
  --danger-bg: #fff4f2;
  --success: #067647;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
}

a { color: var(--brand-dark); }

button, input {
  font: inherit;
}

button {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--brand);
  border-radius: 10px;
  color: #fff;
  background: var(--brand);
  font-weight: 700;
  cursor: pointer;
}

button:hover { background: var(--brand-dark); }
button:disabled { cursor: not-allowed; opacity: .55; }

.button-secondary {
  color: var(--brand-dark);
  background: #fff;
  border-color: var(--line);
}

.button-secondary:hover { background: #edf3ff; }

.button-danger {
  min-height: 34px;
  padding: 0 12px;
  color: var(--danger);
  background: #fff;
  border-color: #f0b4ae;
}

.button-danger:hover { background: var(--danger-bg); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: block;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  padding: 32px 18px;
  place-items: center;
}

.auth-card {
  position: relative;
  width: min(100%, 470px);
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 18px 50px rgba(20, 39, 74, .10);
}

.auth-language-link {
  position: absolute;
  top: 34px;
  right: 34px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.auth-language-link:hover { color: var(--brand-dark); background: #edf3ff; }

.eyebrow {
  margin: 24px 0 6px;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
}

h1 { margin: 0 0 8px; font-size: 28px; }
.muted, small { color: var(--muted); }

form { display: grid; gap: 9px; margin-top: 22px; }

label { margin-top: 8px; font-weight: 700; }

input {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid #b8c3d2;
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
}

input:focus {
  outline: 3px solid rgba(37, 99, 235, .18);
  border-color: var(--brand);
}

form button { margin-top: 14px; }
.switch-link { margin: 22px 0 0; text-align: center; }

.status-line {
  min-height: 22px;
  margin: 15px 0 0;
  color: var(--danger);
  font-size: 14px;
}

.status-line.success { color: var(--success); }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 14px max(18px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.topbar-actions { display: flex; align-items: center; gap: 16px; }
.account-name { color: var(--muted); }
.portal-link {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.portal-link:hover { color: var(--brand-dark); }

.portal-shell {
  width: min(1180px, calc(100% - 36px));
  margin: 28px auto 60px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 18px 0;
}

.summary-card, .panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(20, 39, 74, .05);
}

.summary-card { display: grid; gap: 8px; padding: 22px; }
.summary-card span { color: var(--muted); font-weight: 700; }
.summary-card strong { font-size: 30px; }

.panel { margin-top: 18px; padding: 24px; }
.panel .eyebrow { margin-top: 0; }

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.table-wrap { overflow-x: auto; margin-top: 18px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 12px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: var(--muted); font-size: 13px; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; }
.empty-row { padding: 30px; color: var(--muted); text-align: center; }

@media (max-width: 760px) {
  .auth-card { padding: 25px 20px; }
  .auth-language-link { top: 25px; right: 20px; }
  .auth-card .brand { min-width: 0; padding-right: 98px; }
  .auth-card .brand-copy { min-width: 0; }
  .topbar { align-items: flex-start; flex-wrap: wrap; gap: 14px; }
  .topbar .brand { min-width: 0; max-width: 100%; }
  .topbar .brand-copy { min-width: 0; }
  .topbar-actions { width: 100%; align-items: center; flex-direction: row; flex-wrap: wrap; gap: 8px 12px; }
  .topbar-actions .account-name { margin-right: auto; overflow-wrap: anywhere; }
  .summary-grid { grid-template-columns: 1fr; }
  .panel { padding: 18px; }
  .panel-heading { align-items: stretch; flex-direction: column; }
}

@media (max-width: 480px) {
  .auth-card .brand { max-width: 100%; padding-right: 0; }
  .auth-card .brand-copy small { white-space: normal; }
  .auth-language-link {
    position: static;
    display: table;
    margin: 16px 0 0 auto;
  }
  .auth-card .eyebrow { margin-top: 18px; }
  .topbar-actions .account-name { flex-basis: 100%; }
}

/* Enterprise product homepage. All rules stay scoped so the account portal
 * keeps its compact application layout. */
html { scroll-behavior: smooth; }

.landing-page {
  --landing-ink: #0b1220;
  --landing-muted: #5b687c;
  --landing-line: #dbe4ef;
  --landing-blue: #2463eb;
  --landing-blue-dark: #1749b8;
  --landing-cyan: #20b8cd;
  --landing-navy: #081426;
  --landing-soft: #f5f8fc;
  color: var(--landing-ink);
  background: #fff;
  font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.landing-page a { color: inherit; }
.landing-page h1,
.landing-page h2,
.landing-page h3,
.landing-page p { margin-top: 0; }

.landing-container {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
}

.landing-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(219, 228, 239, .88);
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 8px 30px rgba(21, 40, 74, .035);
  backdrop-filter: blur(16px);
}

.nav-inner {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.landing-brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 11px;
  color: var(--landing-ink);
  text-decoration: none;
}

.landing-page .brand-mark {
  width: 42px;
  height: 42px;
  filter: drop-shadow(0 8px 12px rgba(36, 99, 235, .2));
}

.brand-copy { display: grid; gap: 1px; line-height: 1.15; }
.brand-copy strong { font-size: 17px; letter-spacing: .02em; }
.brand-copy small {
  color: #748198;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  white-space: nowrap;
  text-transform: uppercase;
}

.landing-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.landing-links a,
.nav-login,
.language-link {
  padding: 9px 10px;
  border-radius: 8px;
  color: #46546a;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: color .18s ease, background .18s ease;
}

.landing-links a:hover,
.nav-login:hover,
.language-link:hover { color: var(--landing-blue); background: #f1f6ff; }

.landing-links .nav-download-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  border: 1px solid #b9cdf5;
  color: var(--landing-blue);
  background: #edf4ff;
  white-space: nowrap;
}
.landing-links .nav-download-link:hover { color: #fff; background: var(--landing-blue); }

.language-link {
  border: 1px solid #d7e1ed;
  white-space: nowrap;
}

.nav-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 6px; }

.landing-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border: 1px solid var(--landing-blue);
  border-radius: 10px;
  color: #fff !important;
  background: linear-gradient(135deg, #2b72f0, #2159d6);
  box-shadow: 0 10px 24px rgba(36, 99, 235, .20);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.landing-button:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #1f63dc, #1749b8);
  box-shadow: 0 14px 30px rgba(36, 99, 235, .27);
}

.landing-button-small { min-height: 38px; padding: 0 16px; border-radius: 8px; font-size: 13px; }
.landing-button-ghost {
  color: #243653 !important;
  border-color: #ccd8e8;
  background: rgba(255, 255, 255, .82);
  box-shadow: none;
}
.landing-button-ghost:hover { color: var(--landing-blue) !important; background: #fff; box-shadow: 0 10px 24px rgba(21, 40, 74, .08); }
.landing-button-block { width: 100%; }

.landing-hero {
  position: relative;
  overflow: hidden;
  padding: 92px 0 84px;
  background:
    radial-gradient(circle at 84% 5%, rgba(46, 198, 219, .12), transparent 27%),
    radial-gradient(circle at 15% 10%, rgba(36, 99, 235, .085), transparent 28%),
    linear-gradient(180deg, #f9fbfe 0%, #fff 82%);
}

.landing-hero::before {
  position: absolute;
  inset: 0;
  opacity: .22;
  background-image:
    linear-gradient(rgba(66, 101, 150, .16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(66, 101, 150, .16) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, #000, transparent 76%);
  content: "";
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, .94fr) minmax(520px, 1.06fr);
  gap: 70px;
  align-items: center;
}

.landing-eyebrow,
.landing-kicker {
  color: var(--landing-blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.landing-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  padding: 7px 12px;
  border: 1px solid #cfe0fb;
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
}

.landing-eyebrow span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--landing-cyan);
  box-shadow: 0 0 0 4px rgba(32, 184, 205, .12);
}

.hero-copy h1 {
  margin: 0;
  color: var(--landing-ink);
  font-size: clamp(44px, 4.2vw, 56px);
  font-weight: 850;
  letter-spacing: -.055em;
  line-height: 1.08;
}

.hero-copy h1 em {
  display: block;
  color: var(--landing-blue);
  font-style: normal;
}

html[lang="zh-CN"] body[data-page="home"] .hero-copy h1 { white-space: nowrap; }
html[lang="zh-CN"] body[data-page="home"] .hero-copy h1 em { display: inline; }

.hero-lead {
  max-width: 650px;
  margin: 27px 0 0;
  color: var(--landing-muted);
  font-size: 17px;
  line-height: 1.9;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-fineprint { margin: 16px 0 0; color: #748198; font-size: 12px; line-height: 1.7; }

.product-visual { position: relative; min-width: 0; padding: 16px; }
.visual-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(4px);
  pointer-events: none;
}
.visual-glow-one { top: -24px; right: 20px; width: 180px; height: 180px; background: rgba(36, 99, 235, .16); }
.visual-glow-two { bottom: -16px; left: 4px; width: 130px; height: 130px; background: rgba(32, 184, 205, .15); }

.console-window {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(163, 181, 207, .62);
  border-radius: 18px;
  background: #f8fbff;
  box-shadow: 0 34px 80px rgba(20, 42, 78, .18), 0 4px 12px rgba(20, 42, 78, .07);
}

.console-topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  min-height: 49px;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid #e3eaf3;
  color: #738096;
  background: rgba(255, 255, 255, .96);
  font-size: 11px;
  font-weight: 800;
}

.console-topbar > span { color: #2b3c58; letter-spacing: .03em; }
.console-topbar > b { justify-self: end; color: #1d7b62; font-size: 10px; }
.console-topbar > b i { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: #1eaf7c; }
.window-dots { display: flex; gap: 6px; }
.window-dots i { width: 7px; height: 7px; border-radius: 50%; background: #d6deea; }
.window-dots i:first-child { background: #8ca8d6; }

.console-body { display: grid; grid-template-columns: 54px minmax(0, 1fr); min-height: 385px; }
.console-sidebar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 17px;
  padding-top: 25px;
  border-right: 1px solid #e3eaf3;
  background: #fff;
}
.console-sidebar span { width: 18px; height: 18px; border: 2px solid #c8d3e3; border-radius: 5px; }
.console-sidebar span.active { border-color: #2b6be2; background: #eaf2ff; box-shadow: 0 0 0 6px #f3f7fd; }
.console-content { min-width: 0; padding: 24px; }
.console-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.console-heading div { display: grid; gap: 5px; }
.console-heading small { color: #8b98aa; font-size: 9px; font-weight: 900; letter-spacing: .14em; }
.console-heading strong { color: #172640; font-size: 18px; }
.console-heading > span { padding: 6px 10px; border: 1px solid #d5e1f1; border-radius: 7px; color: #3161ac; background: #fff; font-size: 10px; font-weight: 900; }

.device-preview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.device-preview { overflow: hidden; border: 1px solid #dfe7f1; border-radius: 11px; background: #fff; box-shadow: 0 7px 16px rgba(27, 49, 83, .045); }
.device-preview > div:last-child { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 11px; }
.device-preview strong { overflow: hidden; color: #263954; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.device-preview small { display: flex; flex: 0 0 auto; align-items: center; gap: 4px; color: #477465; font-size: 8px; }
.device-preview small i { width: 5px; height: 5px; border-radius: 50%; background: #27a77c; }
.device-preview-muted small { color: #8b7862; }
.device-preview-muted small i { background: #d09542; }
.device-screen { position: relative; height: 83px; overflow: hidden; border-bottom: 1px solid #e2e9f2; }
.device-screen::before { position: absolute; inset: 0; opacity: .55; background-image: linear-gradient(rgba(255, 255, 255, .11) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .11) 1px, transparent 1px); background-size: 20px 20px; content: ""; }
.device-screen span { position: absolute; left: 13px; bottom: 13px; width: 60%; height: 34px; border: 1px solid rgba(255, 255, 255, .42); border-radius: 5px; background: rgba(255, 255, 255, .18); }
.device-screen i { position: absolute; top: 12px; right: 13px; width: 28px; height: 7px; border-radius: 4px; background: rgba(255, 255, 255, .55); }
.screen-blue { background: linear-gradient(140deg, #457fe5, #24499c); }
.screen-cyan { background: linear-gradient(140deg, #2ba9bc, #246070); }
.screen-violet { background: linear-gradient(140deg, #716cd3, #393a83); }
.screen-slate { background: linear-gradient(140deg, #7f91aa, #46566c); }

.connection-path { display: grid; grid-template-columns: auto 1fr auto 1fr auto; align-items: center; gap: 8px; margin-top: 18px; color: #8390a3; font-size: 8px; font-weight: 900; letter-spacing: .08em; }
.connection-path i { height: 1px; background: linear-gradient(90deg, #b9c6d8, #3b73d6); }
.connection-path b { padding: 5px 7px; border: 1px solid #cfe0f7; border-radius: 5px; color: #2d63bc; background: #edf5ff; font-size: 8px; }
.visual-caption { margin: 12px 0 0; color: #8793a5; font-size: 10px; text-align: right; }

.fact-strip { position: relative; z-index: 2; border-top: 1px solid #e3eaf3; border-bottom: 1px solid #e3eaf3; background: #fff; }
.fact-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.fact-grid > div { display: grid; gap: 5px; min-height: 96px; align-content: center; padding: 18px 28px; border-left: 1px solid #e5ebf3; }
.fact-grid > div:first-child { border-left: 0; }
.fact-grid strong { color: #152945; font-size: 17px; }
.fact-grid span { color: #748198; font-size: 12px; }

.landing-section { padding: 96px 0; scroll-margin-top: 74px; }
.section-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, .72fr); gap: 80px; align-items: end; margin-bottom: 44px; }
.landing-kicker { margin-bottom: 12px; }
.section-heading h2,
.security-copy h2,
.quota-copy h2,
.faq-heading h2,
.final-cta h2 { margin-bottom: 0; color: var(--landing-ink); font-size: clamp(32px, 3.3vw, 46px); letter-spacing: -.035em; line-height: 1.2; }
.section-heading > p,
.security-copy > p,
.quota-copy > p,
.faq-heading > p { margin-bottom: 0; color: var(--landing-muted); line-height: 1.85; }

.capabilities-section { background: #fff; }
.capability-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.capability-card {
  position: relative;
  min-height: 270px;
  overflow: hidden;
  padding: 26px;
  border: 1px solid var(--landing-line);
  border-radius: 16px;
  background: linear-gradient(180deg, #fff, #f9fbfe);
  box-shadow: 0 12px 30px rgba(23, 48, 86, .045);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.capability-card::after { position: absolute; right: -35px; bottom: -44px; width: 115px; height: 115px; border: 1px solid #e2ebf8; border-radius: 50%; content: ""; }
.capability-card:hover { transform: translateY(-4px); border-color: #bbd1f2; box-shadow: 0 20px 44px rgba(23, 48, 86, .09); }
.card-index { display: inline-grid; width: 40px; height: 40px; place-items: center; border: 1px solid #d4e2f7; border-radius: 10px; color: var(--landing-blue); background: #eef5ff; font-size: 11px; font-weight: 900; }
.capability-card h3 { margin: 28px 0 13px; color: #152945; font-size: 19px; letter-spacing: -.015em; }
.capability-card p { margin-bottom: 25px; color: #657287; font-size: 14px; line-height: 1.85; }
.capability-card b { position: absolute; bottom: 24px; left: 26px; color: #52709d; font-size: 11px; letter-spacing: .04em; }

.workflow-section { position: relative; overflow: hidden; background: var(--landing-navy); }
.workflow-section::after { position: absolute; top: -180px; right: -130px; width: 520px; height: 520px; border: 1px solid rgba(88, 141, 222, .16); border-radius: 50%; box-shadow: 0 0 0 80px rgba(35, 84, 160, .04), 0 0 0 160px rgba(35, 84, 160, .025); content: ""; }
.section-heading-light { position: relative; z-index: 1; }
.section-heading-light h2 { color: #f4f8ff; }
.section-heading-light > p { color: #aab7ca; }
.workflow-section .landing-kicker { color: #67d5e3; }
.workflow-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 0; padding: 0; list-style: none; }
.workflow-grid li { display: grid; grid-template-columns: 48px 1fr; gap: 18px; min-height: 190px; padding: 28px; border: 1px solid rgba(138, 165, 204, .19); border-radius: 15px; background: rgba(255, 255, 255, .045); }
.workflow-grid li > span { display: grid; width: 45px; height: 45px; place-items: center; border: 1px solid rgba(91, 176, 221, .35); border-radius: 12px; color: #7fd8e4; background: rgba(42, 128, 172, .12); font-size: 11px; font-weight: 900; }
.workflow-grid h3 { margin: 4px 0 12px; color: #f3f7fd; font-size: 19px; }
.workflow-grid p { margin: 0; color: #a9b6ca; font-size: 14px; line-height: 1.8; }

.security-section { background: #f7f9fc; }
.security-grid { display: grid; grid-template-columns: minmax(0, 1fr) 470px; gap: 100px; align-items: center; }
.security-copy > p { margin-top: 24px; }
.security-points { display: grid; gap: 12px; margin: 32px 0 0; padding: 0; list-style: none; }
.security-points li { display: grid; grid-template-columns: 38px 1fr; gap: 14px; align-items: center; padding: 14px 16px; border: 1px solid #e0e8f2; border-radius: 11px; background: rgba(255, 255, 255, .78); }
.security-points li > span { color: var(--landing-blue); font-size: 10px; font-weight: 900; }
.security-points div { display: grid; gap: 4px; }
.security-points strong { color: #213551; font-size: 14px; }
.security-points small { color: #748198; line-height: 1.55; }
.security-compact .section-heading { margin-bottom: 28px; }
.security-compact .security-points {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 0;
}
.security-compact .security-points li { min-height: 104px; }
.security-diagram { position: relative; display: grid; gap: 14px; padding: 34px; border: 1px solid #d8e3f1; border-radius: 20px; background: #fff; box-shadow: 0 25px 60px rgba(21, 48, 87, .1); }
.security-diagram::before { position: absolute; inset: 12px; border: 1px dashed #dce7f5; border-radius: 14px; content: ""; pointer-events: none; }
.security-node { position: relative; z-index: 1; display: grid; grid-template-columns: 86px 1fr; gap: 3px 15px; align-items: center; padding: 18px; border: 1px solid #dce5f1; border-radius: 12px; background: #fbfdff; }
.security-node small { grid-row: 1 / 3; display: grid; min-height: 48px; place-items: center; border-radius: 8px; color: #4a6c9e; background: #edf4fd; font-size: 9px; font-weight: 900; letter-spacing: .11em; }
.security-node strong { color: #20334e; font-size: 15px; }
.security-node span { color: #7a8799; font-size: 11px; }
.node-control { border-color: #bcd2f4; background: #f3f7ff; }
.node-control small { color: #fff; background: linear-gradient(135deg, #3779e8, #2556c4); }
.node-device small { color: #327683; background: #e9f8fa; }
.security-line { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 0 25px; }
.security-line i { height: 1px; background: #c7d6e9; }
.security-line b { padding: 5px 9px; border-radius: 999px; color: #55729b; background: #eff4fa; font-size: 9px; }

.quota-section { background: #fff; }
.quota-layout { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 100px; align-items: center; }
.quota-copy > p { max-width: 650px; margin-top: 24px; }
.quota-metrics { display: grid; grid-template-columns: repeat(2, 170px); gap: 12px; margin-top: 32px; }
.quota-metrics > div { display: grid; gap: 5px; padding: 19px; border-left: 3px solid var(--landing-blue); background: #f7f9fd; }
.quota-metrics strong { color: #193b73; font-size: 29px; }
.quota-metrics span { color: #758297; font-size: 11px; }
.plan-card { padding: 32px; border: 1px solid #cbdaf0; border-radius: 18px; background: linear-gradient(165deg, #fbfdff, #f2f7ff); box-shadow: 0 24px 55px rgba(26, 66, 126, .12); }
.plan-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.plan-title span { color: #21395e; font-size: 19px; font-weight: 900; }
.plan-title b { padding: 5px 9px; border-radius: 999px; color: #20614d; background: #e6f7f0; font-size: 10px; }
.plan-price { display: flex; align-items: baseline; gap: 8px; margin-top: 25px; padding-bottom: 22px; border-bottom: 1px solid #dce6f3; }
.plan-price strong { color: #123873; font-size: 45px; letter-spacing: -.04em; }
.plan-price span { color: #7d899b; font-size: 12px; }
.plan-card ul { display: grid; gap: 13px; margin: 23px 0 28px; padding: 0; list-style: none; }
.plan-card li { position: relative; padding-left: 25px; color: #42536d; font-size: 14px; }
.plan-card li::before { position: absolute; top: 2px; left: 0; display: grid; width: 16px; height: 16px; place-items: center; border-radius: 50%; color: #fff; background: #29a77f; content: "✓"; font-size: 9px; font-weight: 900; }
.plan-card > p { margin: 14px 0 0; color: #7b8798; font-size: 11px; line-height: 1.65; text-align: center; }

.faq-section { background: #f7f9fc; }
.faq-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 90px; align-items: start; }
.faq-heading { position: sticky; top: 110px; }
.faq-heading > p { margin-top: 22px; }
.faq-list { display: grid; gap: 10px; }
.faq-list details { border: 1px solid #dce5ef; border-radius: 12px; background: #fff; box-shadow: 0 6px 20px rgba(22, 44, 76, .03); }
.faq-list summary { position: relative; padding: 20px 52px 20px 21px; color: #253851; cursor: pointer; font-size: 14px; font-weight: 800; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { position: absolute; top: 16px; right: 19px; display: grid; width: 26px; height: 26px; place-items: center; border: 1px solid #d4dfec; border-radius: 7px; color: #4e6a91; content: "+"; font-size: 17px; }
.faq-list details[open] summary::after { content: "−"; }
.faq-list details p { margin: 0; padding: 0 21px 21px; color: #68758a; font-size: 13px; line-height: 1.8; }

.final-cta { position: relative; overflow: hidden; padding: 76px 0; background: linear-gradient(120deg, #0b1c35, #123668 62%, #164e78); }
.final-cta::after { position: absolute; right: -100px; bottom: -260px; width: 520px; height: 520px; border: 1px solid rgba(112, 206, 224, .22); border-radius: 50%; box-shadow: 0 0 0 80px rgba(74, 166, 210, .06); content: ""; }
.final-cta-inner { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 60px; }
.final-cta .landing-kicker { color: #66d4e2; }
.final-cta h2 { max-width: 720px; color: #fff; }
.final-cta-copy { max-width: 710px; margin: 18px 0 0; color: #b8c8dc; font-size: 14px; line-height: 1.8; }
.final-cta .hero-actions { flex: 0 0 auto; margin: 0; }
.landing-button-light { color: #153865 !important; border-color: #fff; background: #fff; box-shadow: 0 12px 28px rgba(0, 0, 0, .18); }
.landing-button-light:hover { color: #0f2c54 !important; background: #f4f8ff; }
.landing-button-outline-light { color: #fff !important; border-color: rgba(255, 255, 255, .42); background: transparent; box-shadow: none; }
.landing-button-outline-light:hover { background: rgba(255, 255, 255, .1); }

.landing-footer { padding: 42px 0; color: #7c8ba1; background: #071220; }
.footer-inner { display: grid; grid-template-columns: auto 1fr auto; gap: 20px 35px; align-items: center; }
.landing-brand-footer { color: #fff !important; }
.landing-brand-footer .brand-copy small { color: #71839c; }
.footer-inner > p { margin: 0; font-size: 12px; }
.footer-inner > div { display: flex; gap: 18px; }
.footer-inner > div a { color: #a3afc1; font-size: 12px; text-decoration: none; }
.footer-inner > div a:hover { color: #fff; }
.footer-inner > small { grid-column: 1 / -1; padding-top: 18px; border-top: 1px solid rgba(132, 151, 178, .16); font-size: 10px; }

/* Bilingual download center. */
.download-page .hero-copy h1 { white-space: normal; }
.download-hero { padding: 78px 0 74px; }
.download-hero-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 76px;
  align-items: center;
}

.download-meta { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 28px; }
.download-meta span {
  padding: 8px 11px;
  border: 1px solid #d7e3f1;
  border-radius: 8px;
  color: #53657e;
  background: rgba(255, 255, 255, .78);
  font-size: 12px;
  font-weight: 750;
}

.download-card {
  position: relative;
  overflow: hidden;
  padding: 32px;
  border: 1px solid #c7d8ef;
  border-radius: 20px;
  background: linear-gradient(165deg, rgba(255, 255, 255, .98), rgba(244, 248, 255, .96));
  box-shadow: 0 28px 68px rgba(26, 62, 116, .15);
}
.download-card::before { position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, var(--landing-blue), var(--landing-cyan)); content: ""; }
.download-product { display: flex; gap: 17px; align-items: center; }
.download-product-icon { width: 72px; height: 72px; object-fit: contain; filter: drop-shadow(0 12px 16px rgba(36, 99, 235, .2)); }
.download-product .landing-kicker { margin-bottom: 4px; }
.download-product h2 { margin: 0 0 4px; color: #17335c; font-size: 25px; }
.download-product span { color: #718096; font-size: 12px; font-weight: 700; }
.download-card .download-meta { margin: 24px 0 20px; }
.download-primary { min-height: 54px; font-size: 15px; }
.download-card-note { display: block; margin-top: 14px; color: #78869a; font-size: 11px; line-height: 1.7; text-align: center; }

.landing-button.is-disabled {
  cursor: not-allowed;
  opacity: .58;
  filter: saturate(.55);
  user-select: none;
}
.landing-button.is-disabled:hover { transform: none; box-shadow: 0 10px 24px rgba(36, 99, 235, .14); }

.download-guide-section { background: linear-gradient(180deg, #fff, #f7f9fc); }
.download-guide-section .section-heading { margin-bottom: 32px; }
.download-quick-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.download-quick-steps li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 15px;
  min-height: 150px;
  align-content: start;
  padding: 25px 23px;
  border: 1px solid #dce5f0;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(23, 48, 86, .045);
}
.download-quick-steps li > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid #d2e1f6;
  border-radius: 10px;
  color: var(--landing-blue);
  background: #edf4ff;
  font-size: 11px;
  font-weight: 900;
}
.download-quick-steps h3 { margin: 4px 0 10px; color: #1d3557; font-size: 17px; }
.download-quick-steps p { margin: 0; color: #6b788c; font-size: 13px; line-height: 1.75; }

.download-integrity { margin-top: 18px; overflow: hidden; border: 1px solid #d7e2ef; border-radius: 15px; background: #fff; }
.download-integrity summary {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 18px;
  align-items: center;
  padding: 22px 60px 22px 24px;
  color: #203654;
  cursor: pointer;
  list-style: none;
}
.download-integrity summary::-webkit-details-marker { display: none; }
.download-integrity summary::after { position: absolute; top: 50%; right: 22px; display: grid; width: 28px; height: 28px; place-items: center; transform: translateY(-50%); border: 1px solid #d5e0ed; border-radius: 8px; color: #4f6f9e; content: "+"; font-size: 17px; }
.download-integrity[open] summary::after { content: "−"; }
.download-integrity summary > span { display: grid; gap: 4px; }
.download-integrity summary strong { font-size: 16px; }
.download-integrity summary small { color: #7c899b; font-size: 11px; font-weight: 500; }
.download-integrity summary > b { padding: 6px 9px; border-radius: 999px; color: #38649f; background: #edf4fd; font-size: 10px; letter-spacing: .05em; }
.download-integrity-body { display: grid; grid-template-columns: minmax(320px, .8fr) minmax(0, 1.2fr); gap: 24px; padding: 0 24px 24px; border-top: 1px solid #e4eaf2; }
.download-release-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 24px 0 0; overflow: hidden; border: 1px solid #e0e7f0; border-radius: 10px; background: #e0e7f0; }
.download-release-list > div { display: grid; gap: 4px; padding: 13px 14px; background: #f8fafd; }
.download-release-list dt { color: #8390a2; font-size: 10px; font-weight: 800; }
.download-release-list dd { margin: 0; color: #30445f; font-size: 12px; font-weight: 750; overflow-wrap: anywhere; }
.download-hash { min-width: 0; margin-top: 24px; }
.download-hash > span { display: block; margin-bottom: 8px; color: #65758c; font-size: 11px; font-weight: 800; }
.download-hash code {
  display: block;
  min-width: 0;
  padding: 13px 15px;
  overflow-wrap: anywhere;
  border: 1px solid #d4dfec;
  border-radius: 9px;
  color: #254b82;
  background: #fff;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  line-height: 1.7;
}

@media (max-width: 1080px) {
  .landing-links a:nth-child(4),
  .landing-links a:nth-child(5) { display: none; }
  .hero-grid { grid-template-columns: 1fr; gap: 50px; }
  .hero-copy { max-width: 760px; }
  .product-visual { width: min(720px, 100%); margin: 0 auto; }
  .capability-grid { grid-template-columns: repeat(2, 1fr); }
  .security-grid,
  .quota-layout { grid-template-columns: 1fr 410px; gap: 55px; }
  .faq-layout { gap: 50px; }
  .download-hero-layout { grid-template-columns: minmax(0, 1fr) 400px; gap: 48px; }
}

@media (max-width: 1020px) {
  .nav-inner { gap: 16px; }
  .landing-links { margin-left: auto; }
  .landing-links a { display: none; }
  .landing-links .nav-download-link { display: inline-flex; }
}

@media (max-width: 820px) {
  .landing-container { width: min(100% - 32px, 720px); }
  .nav-inner { gap: 14px; }
  .landing-links { margin-left: auto; }
  .landing-links a { display: none; }
  .landing-links .nav-download-link { display: inline-flex; }
  .landing-hero { padding: 68px 0 62px; }
  .hero-copy h1 { font-size: clamp(40px, 8vw, 52px); }
  .fact-grid { grid-template-columns: repeat(2, 1fr); }
  .fact-grid > div:nth-child(3) { border-left: 0; border-top: 1px solid #e5ebf3; }
  .fact-grid > div:nth-child(4) { border-top: 1px solid #e5ebf3; }
  .landing-section { padding: 72px 0; }
  .section-heading { grid-template-columns: 1fr; gap: 20px; }
  .workflow-grid { grid-template-columns: 1fr; }
  .workflow-grid li { min-height: auto; }
  .security-grid,
  .quota-layout,
  .faq-layout { grid-template-columns: 1fr; gap: 48px; }
  .security-compact .security-points { grid-template-columns: 1fr; }
  .security-diagram,
  .plan-card { width: min(100%, 520px); margin: 0 auto; }
  .faq-heading { position: static; }
  .final-cta-inner { display: grid; }
  .final-cta .hero-actions { margin-top: 0; }
  .footer-inner { grid-template-columns: 1fr auto; }
  .footer-inner > p { display: none; }
  .download-hero-layout { grid-template-columns: 1fr; }
  .download-card { width: min(100%, 540px); }
  .download-quick-steps { grid-template-columns: 1fr; }
  .download-quick-steps li { min-height: auto; }
  .download-integrity-body { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .nav-login { display: none; }
}

@media (max-width: 640px) {
  .nav-actions .landing-button-small { display: none; }
}

@media (max-width: 560px) {
  .nav-inner { min-height: 64px; gap: 10px; }
  .landing-nav .landing-brand { min-width: 0; flex: 1 1 auto; }
  .landing-nav .brand-copy { min-width: 0; }
  .landing-nav .brand-copy small { display: none; }
  .nav-actions { min-width: 0; flex: 0 1 auto; }
  .landing-page .brand-mark { width: 37px; height: 37px; }
  .brand-copy strong { font-size: 15px; }
  .brand-copy small { font-size: 9px; }
  .language-link { padding: 7px 8px; font-size: 11px; }
  .landing-links .nav-download-link { min-height: 36px; padding: 0 11px; font-size: 12px; }
  .landing-hero { padding-top: 52px; }
  .landing-eyebrow { padding: 7px 10px; font-size: 10px; }
  .hero-copy h1 { font-size: clamp(30px, 9.2vw, 37px); line-height: 1.12; }
  .hero-lead { font-size: 15px; line-height: 1.8; }
  .hero-actions { display: grid; grid-template-columns: 1fr; }
  .hero-actions .landing-button { width: 100%; }
  .product-visual { padding: 0; }
  .console-body { grid-template-columns: 38px 1fr; min-height: 320px; }
  .console-sidebar { gap: 14px; }
  .console-sidebar span { width: 14px; height: 14px; }
  .console-content { padding: 15px; }
  .device-preview-grid { gap: 8px; }
  .device-screen { height: 62px; }
  .device-preview > div:last-child { padding: 8px; }
  .device-preview strong { font-size: 9px; }
  .device-preview small { display: none; }
  .connection-path { margin-top: 13px; }
  .fact-grid { grid-template-columns: 1fr; }
  .fact-grid > div { min-height: 76px; padding: 14px 18px; border-top: 1px solid #e5ebf3; border-left: 0; }
  .fact-grid > div:first-child { border-top: 0; }
  .capability-grid { grid-template-columns: 1fr; }
  .capability-card { min-height: 250px; }
  .workflow-grid li { grid-template-columns: 42px 1fr; padding: 22px 18px; }
  .security-diagram { padding: 23px 18px; }
  .security-node { grid-template-columns: 70px 1fr; padding: 13px; }
  .security-line { padding: 0 8px; }
  .quota-metrics { grid-template-columns: repeat(2, 1fr); }
  .plan-card { padding: 25px 20px; }
  .final-cta { padding: 62px 0; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-inner > div { flex-wrap: wrap; }
  .download-hero { padding-top: 50px; }
  .download-card { padding: 24px 20px; }
  .download-product-icon { width: 60px; height: 60px; }
  .download-meta { display: grid; grid-template-columns: 1fr; }
  .download-integrity summary { grid-template-columns: 1fr auto; padding: 18px 54px 18px 18px; }
  .download-integrity summary > b { display: none; }
  .download-integrity-body { padding: 0 18px 18px; }
  .download-release-list { grid-template-columns: 1fr; }
}

@media (max-width: 400px) {
  .landing-nav .landing-brand .brand-copy { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .landing-button,
  .capability-card { transition: none; }
}

/* Account commerce center. Keep these rules under the portal shell so the
 * similarly named landing-page pricing components remain independent. */
.portal-welcome {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 8px 2px 4px;
}

.portal-welcome .eyebrow { margin-top: 0; }
.portal-welcome h1 { margin-bottom: 6px; }
.portal-welcome p { margin: 0; }
.portal-shell .summary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.portal-shell .summary-card strong { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.portal-shell h2 { margin: 0 0 7px; font-size: 23px; }
#commerce, #devices-title { scroll-margin-top: 24px; }

.panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.renewal-settings {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.renewal-plan {
  display: grid;
  gap: 5px;
  min-width: 180px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.renewal-plan select {
  width: 100%;
  min-height: 42px;
  padding: 0 34px 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}

.renewal-plan select:focus-visible {
  border-color: var(--brand);
  outline: 3px solid rgba(37, 99, 235, .18);
}

.renewal-plan select:disabled { color: var(--muted); background: #f5f7fa; }

.switch-control {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  margin: 0;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
  user-select: none;
}

.switch-control input {
  position: absolute;
  width: 1px;
  min-height: 1px;
  opacity: 0;
  pointer-events: none;
}

.switch-control > span {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: #c6cfdb;
  transition: background .18s ease;
}

.switch-control > span::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(20, 39, 74, .25);
  transition: transform .18s ease;
  content: "";
}

.switch-control input:checked + span { background: var(--brand); }
.switch-control input:checked + span::after { transform: translateX(16px); }
.switch-control input:focus-visible + span { outline: 3px solid rgba(37, 99, 235, .2); }
.switch-control input:disabled ~ * { opacity: .55; }
.switch-control b { font-size: 13px; white-space: nowrap; }

.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 8px;
}

.portal-shell .plan-card {
  position: relative;
  display: flex;
  width: auto;
  min-width: 0;
  min-height: 280px;
  margin: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(165deg, #fff, #f8fbff);
  box-shadow: none;
}

.portal-shell .plan-card.is-recommended {
  border-color: #9dbcf2;
  box-shadow: 0 12px 30px rgba(37, 99, 235, .10);
}

.portal-shell .plan-card.is-recommended::before {
  position: absolute;
  top: 0;
  right: 18px;
  width: 38px;
  height: 4px;
  border-radius: 0 0 4px 4px;
  background: var(--brand);
  content: "";
}

.portal-shell .plan-card-loading {
  display: grid;
  min-height: 130px;
  place-items: center;
  color: var(--muted);
  text-align: center;
}

.plan-code {
  color: var(--brand-dark);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
}

.portal-shell .plan-card h3 { margin: 10px 0 4px; font-size: 20px; }
.portal-shell .plan-card > p { min-height: 42px; margin: 0; font-size: 13px; line-height: 1.65; }
.plan-price-value { display: block; margin: 18px 0 8px; font-size: 27px; font-variant-numeric: tabular-nums; }
.plan-features { display: grid; gap: 7px; margin: 8px 0 20px; padding: 0; list-style: none; }
.plan-features li { position: relative; padding-left: 20px; color: #475467; font-size: 13px; }
.plan-features li::before { position: absolute; left: 0; color: var(--success); font-weight: 900; content: "✓"; }
.portal-shell .plan-card > button { width: 100%; margin-top: auto; }

.commerce-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.commerce-columns > .panel { min-width: 0; }
.commerce-form { margin-top: 12px; }
.commerce-form label { font-size: 13px; }
.commerce-form input[type="email"],
.commerce-form select { font: inherit; }
.commerce-form select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.commerce-form select:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .2);
  border-color: var(--brand);
}
.commerce-form select:disabled { color: var(--muted); background: #f5f7fb; }
.field-hint { min-height: 18px; margin: -2px 0 2px; color: var(--muted); font-size: 12px; }

.money-field {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  overflow: hidden;
  border: 1px solid #b8c3d2;
  border-radius: 9px;
  background: #fff;
}

.money-field:focus-within {
  border-color: var(--brand);
  outline: 3px solid rgba(37, 99, 235, .18);
}

.money-field > span {
  display: grid;
  align-self: stretch;
  place-items: center;
  border-right: 1px solid var(--line);
  color: var(--muted);
  background: #f7f9fc;
  font-weight: 800;
}

.money-field input {
  min-width: 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.money-field input:focus { border: 0; outline: 0; }
.quick-amounts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.quick-amounts button { min-height: 36px; padding: 0 8px; color: var(--brand-dark); background: #fff; border-color: #c7d5e9; }
.quick-amounts button:hover { background: #edf3ff; }
.commerce-note { margin: 14px 0 0; font-size: 12px; line-height: 1.7; }

.payment-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-top: 12px;
  padding: 0 16px;
  border: 1px solid #9dbcf2;
  border-radius: 10px;
  color: var(--brand-dark);
  background: #edf4ff;
  font-weight: 800;
  text-decoration: none;
}

.payment-link[hidden] { display: none; }
.recharge-payment {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid #c7d5e9;
  border-radius: 14px;
  background: #f8fbff;
}
.recharge-payment[hidden],
.payment-qr[hidden],
.payment-content[hidden] { display: none; }
.recharge-payment > p { margin: 6px 0 12px; }
.payment-qr {
  width: min(220px, 100%);
  aspect-ratio: 1;
  margin: 0 auto 14px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.payment-qr canvas,
.payment-qr img,
.payment-qr svg { display: block; width: 100% !important; height: 100% !important; }
.payment-content label { font-size: 12px; font-weight: 700; }
.payment-copy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 6px;
}
.payment-copy-row input { min-width: 0; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.payment-copy-row button { min-width: 76px; }
.recharge-payment > button { width: 100%; margin-top: 12px; }
.payment-poll-status {
  margin: 14px 0 0 !important;
  padding: 10px 12px;
  border: 1px solid #c7d5e9;
  border-radius: 9px;
  color: #31547f;
  background: #edf4ff;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.55;
}
.payment-poll-status[hidden] { display: none; }
.payment-poll-status.is-success {
  color: #146c43;
  border-color: #b7e1ca;
  background: #ecfdf3;
}
.payment-poll-status.is-error {
  color: #9d2c24;
  border-color: #f1c4c0;
  background: #fff4f3;
}
.commerce-table { min-width: 850px; }
.commerce-table .money-cell { white-space: nowrap; font-variant-numeric: tabular-nums; }
.commerce-table .status-cell { color: #344054; font-weight: 800; white-space: nowrap; }
.commerce-table .status-paid,
.commerce-table .status-applied,
.commerce-table .status-completed,
.commerce-table .status-issued { color: var(--success); }
.commerce-table .status-cancelled,
.commerce-table .status-expired,
.commerce-table .status-rejected { color: var(--danger); }
.table-action { min-height: 32px; padding: 0 10px; font-size: 12px; white-space: nowrap; }

@media (max-width: 980px) {
  .portal-shell .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .commerce-columns { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .portal-welcome { align-items: stretch; flex-direction: column; }
  .portal-welcome > button { width: 100%; }
  .commerce-panel .panel-heading { align-items: stretch; }
  .panel-actions { align-items: stretch; flex-direction: column; }
  .panel-actions > * { width: 100%; }
  .renewal-settings { align-items: stretch; flex-direction: column; }
  .renewal-plan { width: 100%; }
  .switch-control { justify-content: center; }
  .portal-shell .plan-card { width: auto; padding: 20px; }
}

@media (max-width: 520px) {
  .portal-shell .summary-grid { grid-template-columns: 1fr; }
  .plan-grid { grid-template-columns: 1fr; }
  .quick-amounts { grid-template-columns: 1fr; }
  .payment-copy-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .switch-control > span,
  .switch-control > span::after { transition: none; }
}

/* Productized account tools and public legal pages. */
#security,
#support,
#ledger-title,
#orders-title,
#invoices-title { scroll-margin-top: 24px; }

.security-form {
  display: grid;
  grid-template-columns: minmax(150px, .55fr) minmax(220px, 1fr);
  gap: 12px 18px;
  max-width: 720px;
  margin-top: 18px;
  align-items: center;
}

.security-form label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.security-form input { min-width: 0; }
.security-form button {
  grid-column: 2;
  justify-self: start;
  min-width: 180px;
}

.list-pager {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.list-pager button {
  min-height: 36px;
  padding: 0 12px;
  font-size: 12px;
}

.list-pager span {
  min-width: 84px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.table-actions .button-danger,
.table-actions .button-secondary,
.table-actions .payment-link {
  min-height: 32px;
  margin: 0;
  padding: 0 10px;
  font-size: 12px;
  white-space: nowrap;
}

.ledger-positive { color: var(--success); font-weight: 850; }
.ledger-negative { color: var(--danger); font-weight: 850; }

.device-search {
  display: grid;
  gap: 5px;
  width: min(100%, 320px);
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.device-search input {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-size: 13px;
}

.device-search input:focus-visible {
  border-color: var(--brand);
  outline: 3px solid rgba(37, 99, 235, .18);
}

.support-form {
  display: grid;
  grid-template-columns: minmax(130px, .35fr) minmax(260px, 1fr);
  gap: 12px 18px;
  max-width: 820px;
  margin: 20px 0 8px;
  align-items: start;
}

.support-form label {
  padding-top: 11px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.support-form input,
.support-form textarea {
  min-width: 0;
  width: 100%;
}

.support-form textarea {
  min-height: 126px;
  padding: 12px;
  resize: vertical;
  border: 1px solid #b8c3d2;
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  line-height: 1.6;
}

.support-form textarea:focus-visible {
  border-color: var(--brand);
  outline: 3px solid rgba(37, 99, 235, .18);
}

.support-form button {
  grid-column: 2;
  justify-self: start;
  min-width: 180px;
}

.support-ticket-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.support-empty {
  margin: 0;
  padding: 28px 18px;
  border: 1px dashed #c9d3df;
  border-radius: 12px;
  color: var(--muted);
  background: #fafbfd;
  text-align: center;
}

.support-ticket-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.support-ticket-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 18px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.support-ticket-card h3 {
  margin: 0 0 5px;
  color: #17335c;
  font-size: 16px;
  overflow-wrap: anywhere;
}

.support-ticket-meta {
  margin: 0;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  overflow-wrap: anywhere;
}

.support-ticket-status {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  color: #344054;
  background: #e9eef5;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.support-ticket-status.status-open {
  color: #8a4b08;
  background: #fff1d6;
}

.support-ticket-status.status-answered {
  color: #146c43;
  background: #dcf6e8;
}

.support-ticket-status.status-closed {
  color: #536071;
  background: #e9edf2;
}

.support-message-list {
  display: grid;
  gap: 10px;
  padding: 17px 18px;
}

.support-message {
  max-width: min(88%, 720px);
  padding: 12px 14px;
  border: 1px solid #d9e0e9;
  border-radius: 12px 12px 12px 3px;
  background: #f7f9fc;
}

.support-message-admin {
  justify-self: end;
  border-color: #bdd2f1;
  border-radius: 12px 12px 3px;
  background: #edf4ff;
}

.support-message > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: 11px;
}

.support-message strong { color: #244c82; }
.support-message p {
  margin: 7px 0 0;
  color: #344054;
  font-size: 13px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.support-reply-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  padding: 15px 18px 18px;
  border-top: 1px solid var(--line);
  background: #fbfcfe;
}

.support-reply-form label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 12px;
  font-weight: 800;
}

.support-reply-form textarea {
  width: 100%;
  min-height: 78px;
  padding: 10px 11px;
  resize: vertical;
  color: var(--ink);
  border: 1px solid #b8c3d2;
  border-radius: 9px;
  background: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.55;
}

.support-reply-form textarea:focus-visible {
  border-color: var(--brand);
  outline: 3px solid rgba(37, 99, 235, .18);
}

.support-reply-form button {
  min-width: 126px;
}

.support-close-note {
  margin: 0;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  color: #536071;
  background: #fbfcfd;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.portal-footer {
  display: flex;
  width: min(1180px, calc(100% - 40px));
  min-height: 76px;
  margin: 0 auto;
  padding: 24px 2px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.portal-footer nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.portal-footer a {
  color: var(--brand-dark);
  font-weight: 750;
  text-decoration: none;
}

.portal-footer a:hover { text-decoration: underline; }

.action-dialog {
  width: min(500px, calc(100% - 28px));
  max-height: min(720px, calc(100vh - 28px));
  padding: 0;
  overflow: auto;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(12, 29, 53, .28);
}

.action-dialog::backdrop {
  background: rgba(8, 20, 38, .52);
  backdrop-filter: blur(2px);
}

.action-dialog-form { padding: 26px; }

.action-dialog-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #9a5b08;
  border-radius: 12px;
  background: #fff2d8;
  font-size: 19px;
  font-weight: 900;
}

.action-dialog h2 {
  margin: 14px 0 8px;
  color: #17335c;
  font-size: 21px;
}

.action-dialog-message {
  margin: 0;
  color: #536071;
  font-size: 13px;
  line-height: 1.7;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.action-dialog-field {
  display: grid;
  gap: 7px;
  margin-top: 18px;
}

.action-dialog-field[hidden],
.action-dialog-error[hidden] { display: none; }

.action-dialog-field label {
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.action-dialog-field textarea {
  width: 100%;
  min-height: 112px;
  padding: 11px 12px;
  resize: vertical;
  color: var(--ink);
  border: 1px solid #b8c3d2;
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 13px;
  line-height: 1.6;
}

.action-dialog-field textarea:focus-visible {
  border-color: var(--brand);
  outline: 3px solid rgba(37, 99, 235, .18);
}

.action-dialog-field textarea:invalid:not(:focus) { border-color: #d94a3d; }

.action-dialog-error {
  margin: 0;
  color: var(--danger);
  font-size: 12px;
  line-height: 1.55;
}

.action-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

.action-dialog-actions button { min-width: 112px; }

.legal-page {
  min-height: 100vh;
  color: var(--ink);
  background: #f4f7fb;
}

.legal-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
}

.legal-header-inner {
  display: flex;
  width: min(980px, calc(100% - 40px));
  min-height: 72px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.legal-header .brand { color: var(--ink); text-decoration: none; }
.legal-header nav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.legal-header nav a { color: var(--brand-dark); font-size: 12px; font-weight: 800; text-decoration: none; }

.legal-shell {
  width: min(880px, calc(100% - 40px));
  margin: 42px auto 70px;
  padding: clamp(26px, 5vw, 54px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 54px rgba(23, 48, 86, .06);
}

.legal-shell > header {
  margin-bottom: 34px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.legal-shell h1 { margin: 5px 0 10px; font-size: clamp(30px, 5vw, 44px); }
.legal-shell h2 { margin: 34px 0 10px; color: #17335c; font-size: 20px; }
.legal-shell h3 { margin: 24px 0 8px; color: #244c82; font-size: 16px; }
.legal-shell p,
.legal-shell li { color: #475467; font-size: 14px; line-height: 1.85; }
.legal-shell ul,
.legal-shell ol { padding-left: 22px; }
.legal-shell a { color: var(--brand-dark); font-weight: 750; }
.legal-meta { margin: 0; color: var(--muted); font-size: 12px; }
.legal-callout {
  margin: 22px 0;
  padding: 17px 19px;
  border: 1px solid #cbdcf4;
  border-radius: 12px;
  color: #294f83;
  background: #f3f7fd;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.contact-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #f8fafc;
}

.contact-card strong { display: block; margin-bottom: 7px; color: #17335c; }
.contact-card p { margin: 0; }

.auth-card .legal-consent {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 9px;
  align-items: start;
  margin: 5px 0 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.65;
}

.auth-card .legal-consent input {
  width: 17px;
  min-height: 17px;
  margin: 2px 0 0;
}

.auth-card .legal-consent a {
  color: var(--brand-dark);
  font-weight: 800;
}

@media (max-width: 760px) {
  .security-form { grid-template-columns: 1fr; }
  .security-form button { grid-column: 1; width: 100%; }
  .support-form { grid-template-columns: 1fr; }
  .support-form label { padding-top: 0; }
  .support-form button { grid-column: 1; width: 100%; }
  .support-ticket-card > header { flex-direction: column; }
  .support-message { max-width: 100%; }
  .support-reply-form { grid-template-columns: 1fr; }
  .support-reply-form button { width: 100%; }
  .list-pager { justify-content: space-between; }
  .device-search { width: 100%; }
  .portal-footer { align-items: flex-start; flex-direction: column; }
  .action-dialog-form { padding: 22px; }
  .action-dialog-actions { flex-direction: column-reverse; }
  .action-dialog-actions button { width: 100%; }
  .legal-header-inner { align-items: flex-start; flex-direction: column; padding: 14px 0; }
  .legal-shell { width: min(100% - 24px, 880px); margin-top: 18px; }
  .contact-grid { grid-template-columns: 1fr; }
}
