:root {
  --bg-0: #eef3f8;
  --bg-1: #f9fbfd;
  --panel: #ffffff;
  --panel-soft: #f8fbff;
  --text: #122235;
  --muted: #526378;
  --line: #d6e0ea;
  --primary: #0b6ed1;
  --primary-strong: #0853a5;
  --accent: #1ba486;
  --warning: #e09a4c;
  --topbar-bg: rgba(250, 252, 254, 0.92);
  --topbar-line: rgba(138, 162, 188, 0.28);
  --surface-soft: #f1f5f9;
  --surface-soft-hover: #e2e8f0;
  --pill-bg: #ffffff;
  --card-line: rgba(152, 176, 203, 0.45);
  --card-hover-line: rgba(11, 110, 209, 0.36);
  --shadow: 0 16px 36px rgba(10, 33, 57, 0.12);
  --shadow-hover: 0 18px 40px rgba(8, 34, 61, 0.2);
}

:root[data-theme="dark"] {
  --bg-0: #081019;
  --bg-1: #0b1724;
  --panel: #101d2c;
  --panel-soft: #0f2134;
  --text: #e4edf8;
  --muted: #9db0c8;
  --line: #2b3d52;
  --primary: #2d8fff;
  --primary-strong: #0f6eda;
  --accent: #21c49f;
  --warning: #f2b15f;
  --topbar-bg: rgba(9, 18, 29, 0.86);
  --topbar-line: rgba(111, 142, 175, 0.25);
  --surface-soft: #1a2a3d;
  --surface-soft-hover: #22364d;
  --pill-bg: #132438;
  --card-line: #2c3f55;
  --card-hover-line: rgba(45, 143, 255, 0.5);
  --shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 18px 40px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
[hidden] { display: none !important; }

body {
  font-family: "Sora", "Manrope", "Avenir Next", "Trebuchet MS", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 10%, rgba(11, 110, 209, 0.14), transparent 35%),
    radial-gradient(circle at 88% 8%, rgba(27, 164, 134, 0.14), transparent 32%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 100%);
  min-height: 100vh;
  transition: background-color .18s ease, color .18s ease;
}

.wrap {
  width: min(1120px, calc(100% - 34px));
  margin: 0 auto;
}

.topbar .wrap {
  width: min(1240px, calc(100% - 34px));
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--topbar-bg);
  backdrop-filter: blur(9px);
  border-bottom: 1px solid var(--topbar-line);
}

.topbar-inner {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar-menu-toggle {
  display: none;
  appearance: none;
  border: 1px solid var(--line);
  background: var(--pill-bg);
  color: var(--text);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
}

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

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(150deg, var(--primary), var(--accent));
  box-shadow: 0 7px 14px rgba(11, 110, 209, 0.26);
}

.main-nav {
  display: inline-flex;
  gap: 15px;
}

.main-nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  border-radius: 8px;
  padding: 7px 9px;
  white-space: nowrap;
  transition: background-color .16s ease, color .16s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--text);
  background: rgba(11, 110, 209, 0.08);
  outline: none;
}

.auth-zone {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--pill-bg);
}

.lang-toggle button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .3px;
  padding: 7px 10px;
  cursor: pointer;
}

.lang-toggle button.active {
  background: rgba(11, 110, 209, 0.12);
  color: var(--primary-strong);
}

.theme-toggle {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--pill-bg);
  color: var(--muted);
  border-radius: 999px;
  min-width: 72px;
  height: 34px;
  padding: 0 10px;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .25px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  color: var(--text);
  background: var(--surface-soft);
  outline: none;
}

.theme-toggle .theme-icon {
  font-size: 14px;
  line-height: 1;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--pill-bg);
  padding: 8px 12px;
  font-size: 13px;
}

.pill.mini {
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary-strong);
  background: rgba(11, 110, 209, 0.08);
  border-color: rgba(11, 110, 209, 0.2);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--warning);
}

.dot.ok { background: var(--accent); }

.btn {
  appearance: none;
  border: 0;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  padding: 11px 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: transform .14s ease, box-shadow .14s ease, background-color .14s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  box-shadow: 0 8px 18px rgba(11, 110, 209, 0.3);
}

.btn-secondary,
.btn-muted {
  color: var(--text);
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.btn-secondary:hover,
.btn-secondary:focus-visible,
.btn-muted:hover,
.btn-muted:focus-visible {
  background: var(--surface-soft-hover);
}

.btn-danger {
  color: #fff;
  background: #ef4444;
  border: 1px solid transparent;
}

.btn-danger:hover,
.btn-danger:focus-visible {
  background: #dc2626;
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.audit-filter-btn:disabled,
.audit-filter-btn[disabled] {
  opacity: 0.45;
  filter: grayscale(0.2);
}

.card {
  background: var(--panel);
  border: 1px solid var(--card-line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  transition: box-shadow .16s ease;
}

.card:hover {
  box-shadow: 0 20px 42px rgba(8, 34, 61, 0.14);
}

.hero { padding: 58px 0 26px; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 18px;
}

.hero-main { padding: 30px; }
.hero-main h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.04;
}

.kicker {
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: .85px;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 10px;
}

.lead {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.56;
  max-width: 65ch;
}

.hero-actions {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-rail {
  display: grid;
  gap: 10px;
}

.hero-diagram-card {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 20% 10%, rgba(11, 110, 209, 0.1), transparent 55%),
    #ffffff;
}

.hero-circle-image {
  width: 100%;
  max-width: 420px;
  aspect-ratio: auto;
  object-fit: contain;
  border-radius: 14px;
  box-shadow:
    0 14px 30px rgba(10, 33, 57, 0.24),
    0 0 0 1px rgba(11, 110, 209, 0.12);
  animation: heroCircleColorShift 8s ease-in-out infinite;
}

.architecture-image-card {
  padding: 14px;
}

.architecture-image {
  width: 100%;
  display: block;
  border-radius: 12px;
  border: 1px solid rgba(11, 110, 209, 0.12);
  box-shadow:
    0 12px 24px rgba(10, 33, 57, 0.2),
    0 0 0 1px rgba(11, 110, 209, 0.08);
}

@keyframes heroCircleColorShift {
  0% {
    filter: hue-rotate(0deg) saturate(1.08);
  }
  50% {
    filter: hue-rotate(120deg) saturate(1.2);
  }
  100% {
    filter: hue-rotate(0deg) saturate(1.08);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-circle-image {
    animation: none;
  }
}

.rail-card { padding: 16px; }
.rail-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
}
.rail-card span {
  color: var(--muted);
  line-height: 1.45;
  font-size: 14px;
}


.section { padding: 14px 0 54px; }

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

.section h2,
.section-head h2 {
  margin: 0;
  font-size: clamp(28px, 3.2vw, 38px);
  letter-spacing: -0.02em;
}

.text-link {
  color: var(--primary-strong);
  text-decoration: none;
  font-weight: 700;
}

.text-link:hover,
.text-link:focus-visible {
  text-decoration: underline;
  outline: none;
}

.product-grid,
.market-grid,
.addon-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.addon-circles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}

.addon-circle-card {
  width: min(100%, 360px);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  box-shadow:
    0 14px 28px rgba(10, 33, 57, 0.2),
    0 0 0 1px rgba(11, 110, 209, 0.1);
}

.addon-circle-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 48% 50%;
  display: block;
  transform: scale(1.24);
  transform-origin: center;
}

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

.steps-grid > * {
  grid-column: span 2;
}

.quad-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.product-card,
.market-card,
.addon-card,
.variant-card {
  padding: 16px;
  text-decoration: none;
  color: inherit;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.product-card:hover,
.product-card:focus-visible,
.market-card:hover,
.market-card:focus-visible,
.addon-card:hover,
.addon-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: var(--card-hover-line);
  outline: none;
}

.product-card h3,
.market-card h3,
.addon-card h3,
.variant-card h3 {
  margin: 0 0 8px;
  font-size: 19px;
}

.product-card p,
.market-card p,
.addon-card p,
.variant-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.mode-grid,
.scenario-grid,
.variant-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mode-card,
.scenario-card,
.variant-card {
  padding: 18px;
}

.mode-card h3,
.scenario-card h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.mode-card p,
.scenario-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.billing-card,
.guarantee-card,
.callout-card,
.variant-hero {
  padding: 20px;
}

.billing-card h2,
.callout-card h2 {
  margin: 0 0 8px;
  font-size: clamp(22px, 3vw, 32px);
}

.billing-card p,
.guarantee-card p,
.callout-card p,
.variant-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.52;
}

.tier-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.platform-list-lead {
  margin-top: 14px;
  margin-bottom: 8px;
}

.platform-feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 14px;
}

.platform-feature-list li {
  position: relative;
  padding-left: 20px;
  font-weight: 700;
  color: #30475f;
}

.platform-feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--primary));
}

.platform-spec-grid {
  margin-top: 14px;
}

.platform-spec-grid .tier {
  text-align: left;
  padding: 12px;
}

.platform-spec-grid .tier strong {
  display: block;
  margin-bottom: 6px;
}

.module-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.module-icon-badge {
  width: 90px;
  height: 90px;
  border-radius: 18px;
  border: 1px solid rgba(11, 110, 209, 0.28);
  background: linear-gradient(150deg, rgba(11, 110, 209, 0.14), rgba(27, 164, 134, 0.14));
  display: grid;
  place-items: center;
  font-size: 40px;
}

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

.module-checks li {
  position: relative;
  padding-left: 20px;
  color: #30475f;
  font-weight: 600;
}

.module-checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--primary));
}

.module-spec-table {
  min-width: 0;
}

.module-spec-table th {
  width: 220px;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .35px;
}

.has-reveal .reveal-stagger > * {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .45s ease, transform .45s ease;
  transition-delay: var(--reveal-delay, 0ms);
}

.has-reveal .reveal-stagger.is-visible > * {
  opacity: 1;
  transform: translateY(0);
}

.tier {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 10px;
  text-align: center;
  font-weight: 700;
}

.catalog-block { margin-top: 10px; }

.catalog-hero {
  padding: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 16px;
  align-items: center;
}

.catalog-hero h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.05;
}

.catalog-kicker {
  margin-top: -4px;
  font-size: 14px;
  letter-spacing: 1px;
}

.catalog-hero-image {
  width: 100%;
  max-height: 340px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(11, 110, 209, 0.16);
  box-shadow: 0 16px 34px rgba(10, 33, 57, 0.16);
}

.catalog-credentials-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.85fr);
  gap: 14px;
  align-items: start;
}

.catalog-credentials-image {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(11, 110, 209, 0.16);
  box-shadow: 0 16px 34px rgba(10, 33, 57, 0.14);
}

.catalog-credential-notes {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.catalog-credential-notes p {
  margin: 0;
  color: var(--muted);
}

.catalog-core-note {
  margin-top: 24px;
}

.identity-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.tile-group {
  padding: 16px 18px;
  border: 1px solid rgba(11, 110, 209, 0.22);
  background:
    radial-gradient(circle at 12% 10%, rgba(11, 110, 209, 0.1), transparent 45%),
    linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.tile-group h3 {
  margin: 2px 0 12px;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.tile-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tile-group .kicker {
  margin-bottom: 2px;
}

.tile-chip-row .pill.mini {
  font-size: 12px;
  font-weight: 800;
  padding: 7px 11px;
  background: #ffffff;
  border-color: rgba(11, 110, 209, 0.2);
  color: #1f3854;
}

.tile-chip-row .pill.mini:hover {
  transform: none;
}

.compare-shell {
  overflow-x: auto;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.compare-table th,
.compare-table td {
  padding: 12px 13px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.compare-table thead th {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .45px;
  font-size: 12px;
}

.compare-table td a {
  color: var(--primary-strong);
  font-weight: 700;
  text-decoration: none;
}

.compare-table td a:hover,
.compare-table td a:focus-visible {
  text-decoration: underline;
  outline: none;
}

.compare-table tbody tr {
  transition: background-color .12s ease;
}

.compare-table tbody tr:hover {
  background: #f8fafc;
}

.foot {
  padding: 16px 0 34px;
  color: var(--muted);
  font-size: 14px;
}

.form-shell { padding: 45px 0 60px; }
.form-card {
  max-width: 600px;
  margin: 0 auto;
  padding: 28px;
}
.form-card-wide { max-width: 100%; }

.form-card h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
}

.form-card p {
  color: var(--muted);
  line-height: 1.45;
}

.form-card h3 {
  margin: 18px 0 8px;
  font-size: 18px;
}

.field { margin-top: 13px; }
.field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
}

.field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 16px;
  background: #fff;
}

.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 16px;
  background: #fff;
}

.field select:focus {
  outline: 2px solid rgba(11, 110, 209, 0.26);
  border-color: var(--primary);
}

.field input:focus {
  outline: 2px solid rgba(11, 110, 209, 0.26);
  border-color: var(--primary);
}

.field small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.form-actions {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.result-box {
  margin-top: 18px;
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 12px;
  background: #f8fbff;
}

.result-box.ok {
  border-color: rgba(27, 164, 134, 0.45);
  background: #f1fffb;
}

.result-box.err {
  border-color: rgba(198, 82, 82, 0.46);
  background: #fff4f4;
}

.result-title {
  margin: 0 0 8px;
  font-weight: 700;
}

.result-body {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--muted);
}

.page-intent {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.page-intent p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.page-intent .btn {
  white-space: nowrap;
}

.context-line {
  margin-top: 8px;
  color: #617285;
  font-size: 13px;
}

.context-line.enforced-warning {
  color: #dc2626;
  font-weight: 700;
}

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

.dash-card { padding: 16px; }
.dash-card h3 { margin: 0 0 8px; }
.dash-card p { margin: 0; color: var(--muted); }

.identity-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 14px;
}

.mt-14 { margin-top: 14px; }
.section-title-sm { font-size: clamp(22px, 3vw, 30px); }

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

.account-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.account-sidebar {
  position: sticky;
  top: 88px;
  padding: 16px;
}

@media (min-width: 1180px) {
  .account-layout {
    margin-left: -90px;
  }
}

.account-side-nav {
  display: grid;
  gap: 6px;
}

.account-nav-group {
  display: grid;
  gap: 6px;
}

.account-nav-group + .account-nav-group {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.account-nav-group-title {
  padding: 2px 4px 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.account-side-nav a {
  display: block;
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
  text-decoration: none;
  border: 1px solid transparent;
  font-weight: 700;
  transition: background-color .14s ease, border-color .14s ease;
}

.account-side-nav a:hover,
.account-side-nav a:focus-visible {
  background: rgba(11, 110, 209, 0.08);
  border-color: rgba(11, 110, 209, 0.22);
  outline: none;
}

.account-side-nav a.active {
  background: rgba(11, 110, 209, 0.12);
  border-color: rgba(11, 110, 209, 0.36);
  color: var(--primary-strong);
}

.account-side-nav a.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.account-tile {
  padding: 20px;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(152, 176, 203, 0.45);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}

.account-tile:hover,
.account-tile:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(11, 110, 209, 0.36);
  outline: none;
}

.account-tile h4 {
  margin: 0 0 8px;
  font-size: 20px;
}

.account-tile p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.account-grid > .account-tile:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  max-width: calc((100% - 20px) / 2);
  width: 100%;
  justify-self: center;
}

.account-stat {
  display: inline-flex;
  margin-top: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(11, 110, 209, 0.1);
  color: var(--primary-strong);
  font-size: 12px;
  font-weight: 700;
}

.personal-ai-shell {
  display: grid;
  gap: 14px;
}

.personal-ai-chat {
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(circle at 16% 8%, rgba(11, 110, 209, 0.12), transparent 44%),
    linear-gradient(180deg, rgba(11, 110, 209, 0.08), rgba(11, 110, 209, 0.02));
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  min-height: 380px;
  padding: 14px;
  display: grid;
  gap: 10px;
}

.personal-ai-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid transparent;
}

.personal-ai-status .dot {
  width: 8px;
  height: 8px;
}

.personal-ai-status-online {
  color: #0f5b4b;
  background: rgba(33, 196, 159, 0.14);
  border-color: rgba(33, 196, 159, 0.36);
}

.personal-ai-status-online .dot {
  background: #21c49f;
}

.personal-ai-status-offline {
  color: #a6464d;
  background: rgba(220, 84, 98, 0.12);
  border-color: rgba(220, 84, 98, 0.32);
}

.personal-ai-status-offline .dot {
  background: #dc5462;
}

.personal-ai-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.personal-ai-log {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(12, 28, 45, 0.9), rgba(10, 24, 38, 0.95));
  min-height: 220px;
  max-height: 360px;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 10px;
}

.personal-ai-message {
  max-width: min(620px, 94%);
  border: 1px solid rgba(108, 145, 184, 0.28);
  border-radius: 12px;
  background: rgba(17, 39, 61, 0.82);
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.personal-ai-message.user {
  margin-left: auto;
  border-color: rgba(71, 158, 255, 0.6);
  background:
    linear-gradient(135deg, rgba(18, 96, 185, 0.55), rgba(12, 72, 146, 0.45));
}

.personal-ai-message.ai {
  margin-right: auto;
  white-space: normal;
}

.personal-ai-message.ai p {
  margin: 0 0 8px;
}

.personal-ai-message.ai p:last-child {
  margin-bottom: 0;
}

.personal-ai-message.ai ul {
  margin: 0 0 8px 18px;
  padding: 0;
}

.personal-ai-message.ai ul:last-child {
  margin-bottom: 0;
}

.personal-ai-message.ai .ai-kv-list {
  margin: 0 0 8px 18px;
  padding: 0;
}

.personal-ai-message.ai .ai-kv-list li {
  margin: 0 0 6px;
}

.personal-ai-message.ai li {
  margin: 0 0 4px;
}

.personal-ai-message.ai strong {
  color: var(--text);
}

.personal-ai-message.ai code {
  font-family: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
  border: 1px solid rgba(108, 145, 184, 0.28);
  border-radius: 6px;
  padding: 1px 6px;
  background: rgba(10, 23, 37, 0.5);
}

.personal-ai-composer {
  display: flex;
  gap: 12px;
  border: 1px solid rgba(108, 145, 184, 0.28);
  border-radius: 16px;
  background: rgba(10, 23, 37, 0.86);
  padding: 10px;
  backdrop-filter: blur(6px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.personal-ai-composer:focus-within {
  border-color: rgba(71, 158, 255, 0.62);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 3px rgba(45, 143, 255, 0.16);
}

.personal-ai-composer textarea {
  flex: 1 1 auto;
  width: 100%;
  min-height: 70px;
  max-height: 180px;
  resize: vertical;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.45;
  padding: 10px 12px;
  outline: none;
}

.personal-ai-composer textarea::placeholder {
  color: rgba(157, 176, 200, 0.74);
}

.personal-ai-composer .btn {
  align-self: flex-end;
  min-width: 82px;
  height: 44px;
  border-radius: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.personal-ai-composer textarea:disabled,
.personal-ai-composer .btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

:root[data-theme="light"] .personal-ai-chat {
  background:
    radial-gradient(circle at 16% 8%, rgba(11, 110, 209, 0.15), transparent 48%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(240, 248, 255, 0.95));
}

:root[data-theme="light"] .personal-ai-log {
  background: linear-gradient(180deg, #ffffff, #f5f9ff);
}

:root[data-theme="light"] .personal-ai-message {
  background: #f4f8ff;
  border-color: rgba(11, 110, 209, 0.24);
}

:root[data-theme="light"] .personal-ai-message.user {
  background: linear-gradient(135deg, rgba(40, 136, 238, 0.22), rgba(11, 110, 209, 0.16));
  border-color: rgba(11, 110, 209, 0.4);
}

:root[data-theme="light"] .personal-ai-composer {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(11, 110, 209, 0.28);
}

:root[data-theme="light"] .personal-ai-composer textarea::placeholder {
  color: rgba(82, 99, 120, 0.84);
}

:root[data-theme="dark"] .personal-ai-status-online {
  color: #7ce8cc;
  background: rgba(33, 196, 159, 0.12);
  border-color: rgba(33, 196, 159, 0.32);
}

:root[data-theme="dark"] .personal-ai-status-offline {
  color: #ff9ea7;
  background: rgba(220, 84, 98, 0.16);
  border-color: rgba(220, 84, 98, 0.34);
}

.org-list-shell {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 8px;
}

.org-list {
  display: grid;
  gap: 8px;
  max-height: 560px;
  overflow-y: auto;
}

.org-list-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}

.org-list-row.is-disabled {
  background: #f5f7fa;
  border-style: dashed;
}

.org-actions {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.org-actions.vertical {
  flex-direction: column;
  align-items: stretch;
}

.org-list-row .lead {
  margin: 4px 0 0;
  font-size: 13px;
}

.board-filter-bar {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.board-filter-chip {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--pill-bg);
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.board-filter-chip.active {
  border-color: rgba(11, 110, 209, 0.44);
  background: rgba(11, 110, 209, 0.12);
  color: var(--primary-strong);
}

.board-last-seen {
  margin-left: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.board-status-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 800;
}

.status-badge.disabled {
  background: rgba(77, 93, 114, 0.16);
  color: #435265;
}

.status-badge.online {
  background: rgba(16, 185, 129, 0.15);
  color: #0f7b56;
}

.status-badge.offline {
  background: rgba(239, 68, 68, 0.14);
  color: #b42323;
}

.status-badge.pending {
  background: rgba(245, 158, 11, 0.15);
  color: #9a5d08;
}

.member-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}

.board-row-compact {
  align-items: flex-start;
  padding: 10px 0;
}

.board-row-info {
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
}

.board-row-info strong {
  font-size: 15px;
}

.board-title-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.board-name-label {
  font-size: 18px;
  line-height: 1.2;
}

.board-title-row .board-status-row {
  margin-top: 0;
}

.board-row-compact .member-actions {
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.board-top-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  align-items: stretch;
}

.board-top-grid > .form-card {
  width: 100%;
  max-width: none;
  margin: 0;
}

.board-context-card,
.board-status-card {
  height: 100%;
}

.board-meta-list {
  display: grid;
  gap: 9px;
}

.board-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.24);
  padding-bottom: 7px;
}

.board-meta-row span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.board-meta-row strong {
  font-size: 14px;
  color: var(--text);
}

.board-summary-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

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

.board-summary-item {
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 10px;
  padding: 10px;
  background: rgba(241, 245, 249, 0.45);
}

.board-summary-item span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.board-summary-item strong {
  display: block;
  font-size: 14px;
  line-height: 1.3;
  color: var(--text);
  overflow-wrap: anywhere;
}

.board-summary-item-wide {
  grid-column: 1 / -1;
}

.board-activity-panel {
  min-height: 0;
  max-height: none;
}

.member-actions {
  display: inline-flex;
  gap: 8px;
}

.board-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.board-live-feed {
  margin: 10px 0 6px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.5);
}

.board-live-feed ul {
  margin: 8px 0 0;
  padding-left: 18px;
  max-height: 130px;
  overflow-y: auto;
}

.board-live-feed li {
  margin: 4px 0;
  color: var(--muted);
  font-size: 12px;
}

.board-live-feed li.log-ok {
  color: #0f7b56;
}

.board-live-feed li.log-err {
  color: #b42323;
}

ul#boardsList .board-row-item {
  padding: 8px 0;
}

ul#boardsList .board-row-item + .board-row-item {
  border-top: 1px solid rgba(148, 163, 184, 0.24);
}

.board-inline-details {
  margin: 10px 0 2px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.58);
}

body.modal-open {
  overflow: hidden;
}

.board-details-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.board-details-modal[hidden] {
  display: none;
}

.board-details-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 16, 25, 0.46);
}

.board-details-panel {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  padding: 18px;
}

.board-details-grid {
  display: grid;
  gap: 10px;
}

.board-details-grid p {
  margin: 0;
  font-size: 14px;
  color: var(--text);
  line-height: 1.45;
}

.board-events-history h4 {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--text);
}

.board-events-table-wrap {
  overflow-x: auto;
}

.board-events-table {
  width: 100%;
  border-collapse: collapse;
}

.board-events-table th,
.board-events-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.26);
  font-size: 13px;
  color: var(--text);
  vertical-align: top;
}

.board-events-table th {
  font-size: 12px;
  letter-spacing: 0.01em;
  color: var(--muted);
}

.board-event-note {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.board-events-empty {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.sync-status-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 800;
}

.sync-status-chip.ok {
  background: rgba(16, 185, 129, 0.15);
  color: #0f7b56;
}

.sync-status-chip.err {
  background: rgba(239, 68, 68, 0.14);
  color: #b42323;
}

.sync-status-chip.pending {
  background: rgba(245, 158, 11, 0.15);
  color: #9a5d08;
}

.cardholder-row {
  align-items: flex-start;
}

.cardholder-main {
  min-width: 0;
}

.cardholder-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.credential-list {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.credential-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f8fbff;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 700;
  color: #2e445c;
}

.btn-xs {
  font-size: 12px;
  padding: 7px 10px;
}

.inline-form {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.inline-form input {
  width: 170px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 14px;
}

.inline-form select {
  min-width: 190px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 14px;
  background: var(--surface);
  color: var(--text);
}

.board-access-inline {
  margin-right: 6px;
}

.cardholders-context {
  padding-bottom: 16px;
}

.cardholders-context-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 14px;
}

.cardholders-context-grid p {
  margin: 0;
}

.cardholders-flow {
  margin-top: 12px;
}

.cardholders-top-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
}

.cardholders-top-grid .form-card {
  max-width: none;
  margin: 0;
}

.cardholders-help .lead {
  margin-top: 8px;
}

.cardholders-list-head {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 340px);
  gap: 14px;
  align-items: end;
}

.cardholders-list-head .lead {
  margin: 4px 0 0;
}

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

.audit-actions {
  display: flex;
  align-items: end;
}

.audit-filter-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.audit-load-btn {
  margin-left: auto;
}

.audit-filter-btn {
  min-width: 122px;
}

.audit-filter-btn.is-open {
  border-color: rgba(11, 110, 209, 0.45);
  background: rgba(11, 110, 209, 0.1);
  color: var(--primary-strong);
}

.audit-filter-btn.is-filtered {
  background: rgba(27, 164, 134, 0.16);
  border-color: rgba(27, 164, 134, 0.4);
  color: #0c5f4d;
}

.audit-filter-drawer {
  margin-top: 0;
  max-height: 0;
  opacity: 0;
  transform: translateY(-4px);
  overflow: hidden;
  transition: max-height .2s ease, opacity .2s ease, transform .2s ease, margin-top .2s ease;
}

.audit-filter-drawer.is-open {
  margin-top: 12px;
  max-height: 340px;
  opacity: 1;
  transform: translateY(0);
}

.audit-filter-panel {
  margin-top: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdff;
  min-height: 220px;
  max-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.audit-filter-panel[hidden] {
  display: none !important;
}

.audit-filter-panel label {
  margin-bottom: 8px;
}

.audit-filter-panel input {
  flex: 0 0 auto;
}

.operator-perm-box {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 8px 10px;
  margin-bottom: 10px;
}

.operator-perm-box > summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
}

.operator-access-panel {
  margin-top: 12px;
}

.operator-access-shell {
  margin-top: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdff;
}

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

.operator-perm-content {
  margin-top: 10px;
  display: block;
}

.operator-perm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 2px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.24);
}

.operator-perm-row:last-child {
  border-bottom: 0;
}

.operator-perm-text {
  flex: 1;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.operator-perm-row input[type="checkbox"] {
  margin-left: 8px;
}

.audit-user-suggestions {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  margin-top: 8px;
  display: grid;
  gap: 6px;
}

.audit-type-picker {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdff;
}

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

.audit-timestamp-grid > div {
  min-width: 0;
}

.audit-timestamp-panel small {
  margin-top: auto;
}

.audit-user-suggestion {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  text-align: left;
  padding: 8px 10px;
  cursor: pointer;
  color: var(--text);
}

.audit-user-suggestion:hover,
.audit-user-suggestion:focus-visible {
  background: #f1f5f9;
  outline: none;
}

.audit-chip {
  appearance: none;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 7px 11px;
  cursor: pointer;
  font: inherit;
}

.audit-chip-key {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.audit-chip-count {
  background: rgba(27, 164, 134, 0.14);
  color: #0c5f4d;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  padding: 3px 8px;
}

.audit-chip.active {
  border-color: rgba(11, 110, 209, 0.44);
  background: rgba(11, 110, 209, 0.08);
}

.audit-events {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.audit-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.audit-pages-card {
  padding-top: 12px;
  padding-bottom: 12px;
}

.audit-pages-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.audit-page-btn {
  min-width: 42px;
  padding: 9px 10px;
}

.audit-page-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #fff;
  border-color: transparent;
}

.audit-event-card {
  padding: 18px;
}

.audit-event-card.audit-live-new {
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
  transition: box-shadow 0.35s ease;
}

.audit-compact-card {
  padding: 14px 16px;
}

.audit-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.audit-message {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.3;
}

.audit-result-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
}

.audit-result-badge.ok {
  background: rgba(16, 185, 129, 0.15);
  color: #0f7b56;
}

.audit-result-badge.err {
  background: rgba(239, 68, 68, 0.15);
  color: #b42323;
}

.audit-core-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 14px;
}

.audit-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px;
  margin-bottom: 6px;
}

.audit-key {
  color: #0f7c63;
  font-weight: 700;
}

.audit-value {
  color: var(--muted);
  word-break: break-word;
}

.audit-meta {
  margin: 4px 0 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fbff;
  color: var(--muted);
  padding: 10px;
  white-space: pre-wrap;
  word-break: break-word;
}

.skeleton-block {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--panel);
}

.skeleton-row {
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(133, 155, 181, 0.18), rgba(172, 190, 211, 0.28), rgba(133, 155, 181, 0.18));
  background-size: 240% 100%;
  animation: shimmer 1.2s linear infinite;
}

.skeleton-row + .skeleton-row {
  margin-top: 9px;
}

.skeleton-row.w-90 { width: 90%; }
.skeleton-row.w-70 { width: 70%; }
.skeleton-row.w-50 { width: 50%; }
.skeleton-row.w-35 { width: 35%; }

.skeleton-stack {
  display: grid;
  gap: 8px;
}

@keyframes shimmer {
  0% { background-position: 0 0; }
  100% { background-position: 240% 0; }
}

.toast-stack {
  position: fixed;
  right: 16px;
  top: 84px;
  z-index: 90;
  display: grid;
  gap: 8px;
  width: min(340px, calc(100vw - 28px));
}

.toast {
  border-radius: 12px;
  border: 1px solid rgba(27, 164, 134, 0.35);
  background: #f1fffb;
  color: #0f4e43;
  box-shadow: var(--shadow);
  padding: 10px 12px;
}

.toast strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}

.toast p {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
}

:root[data-theme="dark"] .hero-diagram-card {
  background:
    radial-gradient(circle at 20% 10%, rgba(45, 143, 255, 0.15), transparent 55%),
    #0f1e2f;
}

:root[data-theme="dark"] .hero-circle-image,
:root[data-theme="dark"] .catalog-hero-image,
:root[data-theme="dark"] .catalog-credentials-image {
  border-color: rgba(84, 137, 194, 0.28);
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(45, 143, 255, 0.18);
}

:root[data-theme="dark"] .architecture-image {
  border-color: rgba(84, 137, 194, 0.24);
  box-shadow:
    0 14px 28px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(45, 143, 255, 0.16);
}

:root[data-theme="dark"] .platform-feature-list li,
:root[data-theme="dark"] .module-checks li {
  color: #b8c8db;
}

:root[data-theme="dark"] .tier,
:root[data-theme="dark"] .tile-chip-row .pill.mini,
:root[data-theme="dark"] .field input,
:root[data-theme="dark"] .field select,
:root[data-theme="dark"] .inline-form input,
:root[data-theme="dark"] .inline-form select,
:root[data-theme="dark"] .audit-user-suggestion,
:root[data-theme="dark"] .audit-chip {
  background: #13263a;
  color: var(--text);
}

:root[data-theme="dark"] .tile-group {
  border-color: rgba(46, 121, 194, 0.35);
  background:
    radial-gradient(circle at 12% 10%, rgba(45, 143, 255, 0.16), transparent 45%),
    linear-gradient(180deg, #122235 0%, #102032 100%);
}

:root[data-theme="dark"] .identity-line,
:root[data-theme="dark"] .org-list-shell,
:root[data-theme="dark"] .operator-access-shell,
:root[data-theme="dark"] .operator-perm-box,
:root[data-theme="dark"] .audit-filter-panel,
:root[data-theme="dark"] .audit-type-picker,
:root[data-theme="dark"] .audit-meta,
:root[data-theme="dark"] .credential-chip,
:root[data-theme="dark"] .board-inline-details,
:root[data-theme="dark"] .board-live-feed {
  background: #122336;
}

:root[data-theme="dark"] .board-summary-item {
  background: rgba(17, 35, 54, 0.72);
  border-color: rgba(84, 137, 194, 0.28);
}

:root[data-theme="dark"] .org-list-row.is-disabled {
  background: #152636;
}

:root[data-theme="dark"] .compare-table tbody tr:hover,
:root[data-theme="dark"] .audit-user-suggestion:hover,
:root[data-theme="dark"] .audit-user-suggestion:focus-visible {
  background: #1a2e44;
}

:root[data-theme="dark"] .result-box {
  background: #102033;
}

:root[data-theme="dark"] .result-box.ok {
  background: #0f2a28;
}

:root[data-theme="dark"] .result-box.err {
  background: #3a1e25;
}

:root[data-theme="dark"] .status-badge.disabled {
  background: rgba(153, 173, 196, 0.18);
  color: #d3dfef;
}

:root[data-theme="dark"] .status-badge.online,
:root[data-theme="dark"] .audit-result-badge.ok {
  background: rgba(33, 196, 159, 0.24);
  color: #8de9cf;
}

:root[data-theme="dark"] .status-badge.offline,
:root[data-theme="dark"] .audit-result-badge.err {
  background: rgba(239, 68, 68, 0.24);
  color: #ffb6b6;
}

:root[data-theme="dark"] .status-badge.pending {
  background: rgba(242, 177, 95, 0.24);
  color: #ffd79f;
}

:root[data-theme="dark"] .board-live-feed li.log-ok {
  color: #8de9cf;
}

:root[data-theme="dark"] .board-live-feed li.log-err {
  color: #ffb6b6;
}

:root[data-theme="dark"] .audit-key {
  color: #8de9cf;
}

:root[data-theme="dark"] .page-intent,
:root[data-theme="dark"] .skeleton-block {
  background: #122336;
}

:root[data-theme="dark"] .toast {
  background: #0f2a28;
  color: #b8efde;
  border-color: rgba(33, 196, 159, 0.45);
}

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .dash-grid,
  .tier-grid,
  .product-grid,
  .market-grid,
  .addon-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-hero,
  .catalog-credentials-layout,
  .identity-grid,
  .tile-groups { grid-template-columns: 1fr; }
  .mode-grid,
  .scenario-grid,
  .variant-grid { grid-template-columns: 1fr; }
  .platform-feature-list { grid-template-columns: 1fr; }
  .module-hero { grid-template-columns: 1fr; }
  .addon-circles { grid-template-columns: 1fr; }
  .steps-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .steps-grid > * {
    grid-column: auto;
  }
}

@media (max-width: 900px) {
  .topbar-menu-toggle {
    display: inline-flex;
  }

  .topbar .main-nav,
  .topbar .auth-zone {
    display: none;
  }

  .topbar.menu-open .main-nav {
    display: flex;
    order: 3;
    width: 100%;
    flex-direction: column;
    gap: 6px;
    padding-top: 8px;
  }

  .topbar.menu-open .main-nav a {
    display: block;
  }

  .topbar.menu-open .auth-zone {
    display: flex;
    order: 4;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    padding-top: 4px;
  }

}

@media (max-width: 760px) {
  .topbar-inner {
    min-height: auto;
    padding: 12px 0;
    flex-wrap: wrap;
  }

  .main-nav {
    order: 3;
    width: 100%;
    flex-wrap: wrap;
  }

  .auth-zone {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .dash-grid,
  .tier-grid,
  .product-grid,
  .market-grid,
  .addon-grid,
  .account-grid { grid-template-columns: 1fr; }

  .account-layout {
    grid-template-columns: 1fr;
    margin-left: 0;
  }

  .account-grid > .account-tile:last-child:nth-child(odd) {
    grid-column: auto;
    max-width: 100%;
    justify-self: stretch;
  }

  .cardholders-context-grid,
  .cardholders-top-grid,
  .cardholders-list-head {
    grid-template-columns: 1fr;
  }

  .account-sidebar {
    position: static;
  }

  .audit-row {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .board-row-compact .member-actions {
    justify-content: flex-start;
  }

  .board-top-grid,
  .board-summary-grid {
    grid-template-columns: 1fr;
  }

  .audit-timestamp-grid,
  .audit-core-grid {
    grid-template-columns: 1fr;
  }

  .steps-grid,
  .quad-grid {
    grid-template-columns: 1fr;
  }

  .audit-filter-btn {
    min-width: 0;
    flex: 1 1 0;
  }

  .audit-load-btn {
    width: 100%;
    margin-left: 0;
  }

  .page-intent {
    flex-direction: column;
    align-items: stretch;
  }

  .toast-stack {
    top: 74px;
    right: 10px;
  }

  .hero-main { padding: 22px; }
}
