:root {
  color-scheme: light;
  --bg: #f6f8f5;
  --panel: #ffffff;
  --panel-2: #edf4f1;
  --ink: #141a18;
  --muted: #5f6f69;
  --line: #d5e1dc;
  --green: #0f8f6d;
  --green-soft: #def5ec;
  --red: #aa3f3b;
  --red-soft: #f7e6e4;
  --amber: #b47719;
  --amber-soft: #fbefd8;
  --cyan: #237c8f;
  --cyan-soft: #e1f1f4;
  --violet: #6b5a8d;
  --shadow: 0 16px 40px rgba(20, 26, 24, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
}

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

button {
  border: 0;
}

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

.sidebar {
  min-height: 100vh;
  background: #101816;
  color: #f7fbf9;
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
  position: sticky;
  top: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-mark {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f7fbf9;
  color: transparent;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0;
  border: 1px solid rgba(15, 143, 109, 0.42);
  box-shadow: inset 0 0 0 5px rgba(15, 143, 109, 0.08), 0 10px 24px rgba(0, 0, 0, 0.18);
}

.brand-mark::before {
  content: "";
  position: absolute;
  width: 30px;
  height: 13px;
  border: 1.5px solid #0f8f6d;
  border-radius: 999px;
  transform: rotate(-28deg);
}

.brand-mark::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d69a2d;
  transform: translate(13px, -9px);
}

.brand-title {
  font-weight: 800;
  letter-spacing: 0;
}

.brand-env {
  color: #b8c9c2;
  font-size: 12px;
}

.nav {
  display: grid;
  gap: 6px;
  padding: 20px 0;
}

.nav button,
.role-switch button,
.button {
  min-height: 38px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.nav button {
  width: 100%;
  padding: 10px 12px;
  background: transparent;
  color: #dce8e3;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav button:hover,
.nav button.active {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.sidebar-footer {
  margin-top: auto;
  padding: 14px 8px 0;
  color: #b9c7c2;
  font-size: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.main {
  min-width: 0;
}

.standalone-shell {
  min-height: 100vh;
}

.topbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 28px;
  background: rgba(245, 247, 244, 0.92);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(12px);
}

.topbar-title {
  min-width: 0;
}

.page-title {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.page-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

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

.role-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.role-switch button {
  min-width: 82px;
  background: transparent;
  color: var(--muted);
  padding: 7px 10px;
}

.role-switch button.active {
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 4px 14px rgba(24, 33, 31, 0.08);
}

.content {
  padding: 26px 28px 40px;
}


.notification-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

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

.section-title {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
}

.notification-count {
  min-width: 28px;
  min-height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

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

.notification-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: var(--radius);
  background: #fbfcfb;
}

.notification-item.success {
  border-left-color: var(--green);
  background: var(--green-soft);
}

.notification-item.info {
  border-left-color: var(--cyan);
  background: var(--cyan-soft);
}

.notification-item.warning {
  border-left-color: var(--amber);
  background: var(--amber-soft);
}

.notification-item.danger {
  border-left-color: var(--red);
  background: var(--red-soft);
}

.notification-title {
  font-weight: 800;
  color: var(--ink);
}

.notification-message {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.login-shell {
  width: 100%;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 24px;
  overflow-x: hidden;
  background: linear-gradient(135deg, #f7faf6 0%, #edf5f1 100%);
}

.login-panel {
  width: calc(100vw - 48px);
  max-width: 430px;
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.login-brand {
  background: #101816;
  padding: 20px;
  border-bottom: 0;
}

.login-brand .brand-title {
  color: #ffffff;
}

.login-brand .brand-env {
  color: #b9c7c2;
}

.login-form {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.login-hints {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.login-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.grid {
  display: grid;
  gap: 16px;
}

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

.grid.two {
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr);
  align-items: start;
}

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

.dashboard-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  margin-top: 16px;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 340px);
  gap: 16px;
  align-items: start;
}

.admin-wide,
.admin-side {
  min-width: 0;
}

.full-grid {
  grid-column: 1 / -1;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 0;
}

.card.pad {
  padding: 18px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.card-title {
  margin: 0;
  font-size: 15px;
}

.card-body {
  padding: 18px;
}

.kpi-label {
  color: var(--muted);
  font-size: 12px;
}

.kpi-value {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  line-height: 1.1;
  font-weight: 760;
}

.kpi-note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.status-row,
.metric-row,
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.metric-row,
.setting-row {
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.metric-row:last-child,
.setting-row:last-child {
  border-bottom: 0;
}

.label {
  color: var(--muted);
  font-size: 12px;
}

.value {
  font-weight: 700;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.badge.green {
  background: var(--green-soft);
  color: var(--green);
}

.badge.red {
  background: var(--red-soft);
  color: var(--red);
}

.badge.amber {
  background: var(--amber-soft);
  color: var(--amber);
}

.badge.cyan {
  background: var(--cyan-soft);
  color: var(--cyan);
}

.badge.violet {
  background: #ece8f4;
  color: var(--violet);
}

.table-wrap {
  width: 100%;
  min-width: 0;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

table.compact-table {
  min-width: 660px;
}

th,
td {
  padding: 13px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  background: #fbfcfb;
}

td {
  font-size: 14px;
}

td select {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 6px 8px;
}

.actions-head,
.actions-cell {
  text-align: right;
}

.actions-cell {
  width: 1%;
}

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

.row-actions.compact {
  justify-content: flex-end;
  gap: 6px;
}

.selected-row td {
  background: #f4faf7;
}

.admin-detail {
  display: grid;
  gap: 16px;
}

.admin-detail-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.mini-stat {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
}

.mini-stat strong {
  overflow-wrap: anywhere;
  font-size: 14px;
}

.admin-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.7fr);
  gap: 14px;
  align-items: start;
}

.admin-detail-grid form {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
}

.admin-detail-grid .form-grid {
  grid-template-columns: 1fr;
}

.support-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 16px;
  align-items: start;
}

.support-list {
  display: grid;
  gap: 12px;
}

.support-ticket {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
}

.support-ticket p,
.support-note p {
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.support-ticket-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.support-note {
  display: grid;
  gap: 5px;
  padding: 10px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
}

.support-ticket .form-grid {
  grid-template-columns: 1fr;
}

.readiness-list {
  display: grid;
  gap: 12px;
}

.readiness-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
}

.readiness-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.real-preflight-actions {
  margin-top: 14px;
  justify-content: flex-start;
}

.bot-summary-list {
  display: grid;
  gap: 12px;
}

.bot-summary-item {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
}

.bot-summary-main,
.bot-summary-badges {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.bot-summary-badges {
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.bot-summary-metrics {
  display: grid;
}

.page-section {
  margin-top: 16px;
}

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

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

.plan-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  align-content: start;
}

.plan-card.current {
  border-color: rgba(15, 143, 109, 0.48);
  box-shadow: 0 16px 42px rgba(15, 143, 109, 0.12);
}

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

.plan-top h3 {
  margin: 0;
  font-size: 16px;
}

.plan-top p {
  margin: 8px 0 0;
  font-size: 24px;
  font-weight: 780;
}

.plan-top span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.plan-features {
  display: grid;
}

.report-card {
  display: grid;
  gap: 16px;
  align-content: space-between;
}

.report-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ops-card {
  margin-top: 16px;
}

.terms-box {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
  color: var(--muted);
  font-size: 13px;
}

.terms-box p {
  margin: 0;
}

.totp-setup {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.totp-qr-card {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
}

.totp-qr {
  width: min(100%, 220px);
  height: auto;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 8px;
}

.totp-qr-placeholder {
  width: min(100%, 220px);
  height: auto;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #ffffff;
}

.totp-qr-card > div {
  width: 100%;
}

.totp-manual-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(130px, 180px);
  gap: 14px;
}

.recovery-codes {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
}

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

.recovery-code-grid code {
  display: block;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  text-align: center;
  font-weight: 760;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.button.small {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 13px;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: #0f8f6d;
  color: #ffffff;
  border-color: #0f8f6d;
}

.button.warn {
  background: var(--amber-soft);
  color: var(--amber);
  border-color: #f0d5a8;
}

.button.danger {
  background: var(--red-soft);
  color: var(--red);
  border-color: #efc9c5;
}

.button.ghost {
  background: transparent;
}

.button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

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

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

.field.full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 8px 10px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid rgba(15, 143, 109, 0.22);
  border-color: var(--green);
}

.field textarea {
  min-height: 104px;
  resize: vertical;
}

.check-row {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-size: 13px;
}

.check-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
}

.danger-text {
  color: var(--red);
}

.chart {
  height: 260px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: end;
  gap: 8px;
  padding: 12px 2px 4px;
}

.chart-bar {
  min-height: 14px;
  border-radius: 6px 6px 0 0;
  background: #43b38e;
  border: 1px solid rgba(15, 143, 109, 0.25);
}

.chart-bar.negative {
  background: #e8a09b;
  border-color: rgba(170, 63, 59, 0.25);
}

.exchange-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  align-content: start;
}

.exchange-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.exchange-name {
  font-size: 16px;
  font-weight: 760;
}

.exchange-meta {
  color: var(--muted);
  font-size: 12px;
}

.exchange-actions {
  display: flex;
  justify-content: flex-end;
}

.audit-list {
  display: grid;
  gap: 10px;
}

.audit-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
}

.audit-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.audit-action {
  margin-top: 6px;
  font-weight: 750;
}

.audit-reason {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.empty {
  padding: 28px;
  text-align: center;
  color: var(--muted);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: 360px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #18211f;
  color: #ffffff;
  box-shadow: var(--shadow);
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 30;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.public-shell {
  min-height: 100vh;
  background: #f7faf8;
}

.public-page {
  min-height: 100vh;
}

.public-topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 32px;
  background: rgba(247, 250, 248, 0.94);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 12;
  backdrop-filter: blur(12px);
}

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

.public-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.public-nav a,
.public-footer a,
.login-links a,
.legal-content a,
.public-risk-note a {
  color: #0b7258;
  text-decoration: none;
  font-weight: 700;
}

.public-nav a:not(.button) {
  padding: 8px 6px;
  color: var(--muted);
}

.button.secondary {
  background: #ffffff;
  border-color: rgba(15, 143, 109, 0.32);
  color: #0b7258;
}

.public-hero {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  align-items: center;
  gap: 44px;
  padding: 54px 6vw 42px;
  background:
    linear-gradient(135deg, rgba(16, 24, 22, 0.96), rgba(15, 62, 55, 0.94)),
    linear-gradient(90deg, rgba(214, 154, 45, 0.16), rgba(15, 143, 109, 0.18));
  color: #f7fbf9;
}

.public-hero-copy {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 10px;
  color: #b47719;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.public-hero .eyebrow {
  color: #f2c56f;
}

.public-hero h1 {
  margin: 0;
  font-size: 64px;
  line-height: 1;
  letter-spacing: 0;
}

.hero-subtitle {
  max-width: 620px;
  margin: 18px 0 0;
  color: #d9e7e1;
  font-size: 18px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.public-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.public-metrics span {
  padding: 8px 10px;
  border: 1px solid rgba(247, 251, 249, 0.22);
  border-radius: 999px;
  color: #eef7f3;
  font-size: 13px;
}

.product-visual {
  min-height: 430px;
  display: grid;
  align-content: space-between;
  gap: 22px;
  padding: 22px;
  border: 1px solid rgba(247, 251, 249, 0.18);
  border-radius: 8px;
  background: rgba(247, 251, 249, 0.08);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.26);
}

.visual-topline,
.visual-rows div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.visual-topline strong,
.visual-rows strong {
  color: #f2c56f;
}

.visual-chart {
  height: 220px;
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.visual-chart span {
  min-height: 28px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, #f2c56f, #43b38e);
}

.visual-rows {
  display: grid;
  gap: 10px;
}

.visual-rows div {
  padding: 12px;
  border: 1px solid rgba(247, 251, 249, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.public-band {
  padding: 54px 6vw;
}

.public-band.plans {
  background: #eef5f1;
}

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

.public-feature,
.public-plan {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.public-feature h3,
.public-plan h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.public-feature p,
.public-risk-note p,
.legal-content p {
  margin: 0;
  color: var(--muted);
}

.public-plan {
  display: grid;
  gap: 16px;
  align-content: start;
}

.plan-price {
  margin: 0;
  font-size: 28px;
  font-weight: 820;
}

.plan-price span {
  margin-left: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.public-plan ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.public-risk-note {
  display: grid;
  gap: 10px;
  max-width: 960px;
}

.public-form-wrap {
  min-height: calc(100vh - 144px);
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(360px, 520px);
  gap: 32px;
  align-items: start;
  padding: 56px 6vw;
}

.public-form-wrap.compact {
  grid-template-columns: minmax(280px, 0.8fr) minmax(320px, 460px);
}

.public-form-copy {
  max-width: 560px;
  padding-top: 18px;
}

.public-form-copy .page-title {
  font-size: 34px;
}

.public-form {
  display: grid;
  gap: 14px;
}

.login-links {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
}

.legal-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 850px);
  gap: 34px;
  align-items: start;
  padding: 54px 6vw;
}

.legal-sidebar {
  display: grid;
  gap: 8px;
  position: sticky;
  top: 96px;
}

.legal-sidebar a {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  background: #ffffff;
}

.legal-sidebar a.active {
  color: #0b7258;
  border-color: rgba(15, 143, 109, 0.35);
  background: var(--green-soft);
  font-weight: 800;
}

.legal-content {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.legal-content h1 {
  margin: 0 0 24px;
  font-size: 36px;
}

.legal-content section {
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.legal-content h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.public-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 24px 6vw;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: #ffffff;
  font-size: 13px;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
    position: static;
  }

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

  .nav button {
    text-align: center;
  }

  .sidebar-footer {
    display: none;
  }

  .grid.kpis,
  .grid.three,
  .grid.two,
  .dashboard-grid,
  .admin-layout,
  .admin-detail-stats,
  .plan-grid,
  .public-hero,
  .public-form-wrap,
  .legal-layout {
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 760px) {
  .login-shell {
    padding: 18px;
  }

  .login-panel {
    width: calc(100vw - 36px);
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
    padding: 16px;
  }

  .top-actions {
    justify-content: stretch;
  }

  .role-switch,
  .top-actions .button {
    width: 100%;
  }

  .content {
    padding: 18px 16px 28px;
  }

  .public-topbar {
    align-items: stretch;
    flex-direction: column;
    padding: 14px 18px;
  }

  .public-nav {
    justify-content: stretch;
  }

  .public-nav a {
    flex: 1 1 auto;
    text-align: center;
  }

  .public-hero,
  .public-form-wrap,
  .public-form-wrap.compact,
  .legal-layout {
    grid-template-columns: 1fr;
    padding: 32px 18px;
  }

  .public-hero {
    min-height: auto;
  }

  .public-hero h1 {
    font-size: 42px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .product-visual {
    min-height: 340px;
  }

  .visual-chart {
    height: 160px;
  }

  .public-band {
    padding: 34px 18px;
  }

  .public-form-copy .page-title,
  .legal-content h1 {
    font-size: 28px;
  }

  .legal-sidebar {
    position: static;
  }

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

  .grid.kpis,
  .grid.three,
  .grid.two,
  .dashboard-grid,
  .admin-layout,
  .admin-detail-stats,
  .admin-detail-grid,
  .support-grid,
  .plan-grid,
  .totp-qr-card,
  .totp-manual-grid,
  .recovery-code-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .readiness-item,
  .bot-summary-main,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .readiness-actions,
  .row-actions.compact,
  .exchange-actions {
    justify-content: stretch;
  }

  .readiness-actions .button,
  .row-actions.compact .button,
  .exchange-actions .button,
  .plan-card .button {
    width: 100%;
  }

  .totp-qr,
  .totp-qr-placeholder {
    width: 100%;
    max-width: 220px;
    height: auto;
    aspect-ratio: 1;
    justify-self: center;
  }

  .kpi-value {
    font-size: 24px;
  }
}
