:root {
  --bg-base: #f2f5f9;
  --bg-gradient-start: #f8fafc;
  --bg-gradient-end: #e2e8f0;
  --bg-card: #ffffff;
  --border-soft: rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.05);
  --shadow-card: 0 14px 24px rgba(15, 23, 42, 0.04);
  --brand-400: #3b82f6;
  --brand-500: #2563eb;
  --brand-600: #1d4ed8;
  --brand-100: #dbeafe;
  --text-main: #1f2937;
  --text-muted: #64748b;
  --accent-muted: #e0e7ff;
  --success: #0f9d58;
  --danger: #d00036;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --font-sans: "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: linear-gradient(160deg, var(--bg-gradient-start), var(--bg-gradient-end));
  color: var(--text-main);
}

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

a:hover {
  color: var(--brand-600);
}

/* --- Top bar --- */
.topbar {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
  padding: 18px 32px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand-400), var(--brand-600));
  display: inline-grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand-title {
  font-weight: 600;
  font-size: 20px;
  color: var(--text-main);
}

.topbar-meta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text-muted);
}

.topbar-meta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text-muted);
}

/* --- Layout shell --- */
.dash-wrap {
  max-width: 1240px;
  margin: 28px auto 48px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 248px 1fr;
  gap: 26px;
}

.side {
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-soft);
  position: sticky;
  top: 24px;
  align-self: start;
}

nav {
  display: grid;
  gap: 10px;
}

.navlink {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  background: rgba(241, 245, 249, 0.8);
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.navlink i {
  width: 18px;
}

.navlink:hover {
  color: var(--brand-600);
  background: rgba(241, 245, 249, 1);
}

.navlink.active {
  background: linear-gradient(135deg, var(--brand-400), var(--brand-600));
  color: #fff;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.25);
}

.navlink.active i {
  color: inherit;
}

.btn-logout {
  margin-top: 14px;
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: var(--radius-md);
  font-weight: 600;
  background: rgba(209, 213, 219, 0.4);
  color: var(--brand-600);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-logout:hover {
  background: rgba(209, 213, 219, 0.75);
}

.main {
  display: grid;
  gap: 26px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}

.page-title {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  color: var(--text-main);
}

.page-subtitle {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 14px;
}

.header-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--text-muted);
  font-size: 14px;
}

.header-meta .chip {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--brand-100);
  color: var(--brand-600);
  font-weight: 600;
}

.chip.small {
  padding: 4px 10px;
  font-size: 12px;
}

/* --- Cards & content blocks --- */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.card h2,
.card h3 {
  margin-top: 0;
}

.form-row {
  margin-bottom: 16px;
}

label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 600;
}

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

.card-intro {
  margin-top: 0;
  margin-bottom: 18px;
  color: var(--text-muted);
  font-size: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px 20px;
}

.form-col {
  display: flex;
  flex-direction: column;
}

.form-col > textarea {
  min-height: 100px;
}

.form-col.span-2 {
  grid-column: span 2;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  height: 44px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-main);
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

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

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(177, 8, 29, 0.12);
}

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

.rule-layout {
  display: grid;
  gap: 26px;
}

.rule-card:not(:last-child) {
  position: relative;
}

.step-indicator {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(248, 250, 252, 0.9);
}

.step-count {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand-500);
  color: #fff;
  font-weight: 600;
  display: grid;
  place-items: center;
  font-size: 14px;
}

.step-copy {
  display: grid;
  gap: 2px;
}

.step-label {
  font-weight: 600;
  color: var(--text-main);
}

.step-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.scenario-highlights {
  margin-top: 22px;
  border: 1px dashed rgba(148, 163, 184, 0.55);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  background: rgba(248, 250, 252, 0.85);
}

.highlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px 24px;
}

.highlight-item {
  display: grid;
  gap: 6px;
}

.highlight-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.highlight-item strong {
  font-size: 17px;
  color: var(--text-main);
}

.highlight-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.movement-grid {
  margin-top: 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: var(--radius-lg);
  background: #fff;
  padding: 20px 22px;
  display: grid;
  gap: 16px;
}

.movement-head {
  display: grid;
  grid-template-columns: 1.4fr 1.4fr 0.9fr 1fr 1.5fr;
  gap: 18px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  border-bottom: 1px solid rgba(148, 163, 184, 0.24);
  padding-bottom: 12px;
}

.movement-head .memo-col {
  text-align: left;
}

.movement-body {
  display: grid;
  gap: 14px;
}

.movement-row {
  display: grid;
  grid-template-columns: 1.4fr 1.4fr 0.9fr 1fr 1.5fr;
  gap: 18px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--radius-md);
  padding: 16px 18px 20px;
  align-items: flex-end;
  background: rgba(248, 250, 252, 0.65);
  position: relative;
}

.movement-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

.movement-field.span-2 {
  grid-column: 1 / -1;
}

.movement-row input,
.movement-row select {
  height: 42px;
}

.movement-actions {
  position: absolute;
  top: 12px;
  right: 12px;
}

.line-remove {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(208, 0, 54, 0.22);
  background: #fff;
  color: var(--danger);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s ease, transform 0.2s ease;
}

.line-remove:hover {
  background: rgba(254, 226, 226, 0.8);
  transform: translateY(-1px);
}

.line-remove:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: rgba(241, 245, 249, 0.8);
  border-color: rgba(148, 163, 184, 0.35);
  color: rgba(209, 54, 75, 0.6);
}

.movement-footer {
  border-top: 1px dashed rgba(148, 163, 184, 0.35);
  padding-top: 12px;
  display: grid;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
}

.builder-shell {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 24px;
}

.builder-primary,
.builder-secondary {
  display: grid;
  gap: 24px;
}

.page-callout {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 28px;
}

.callout-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand-400), var(--brand-600));
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 16px;
}

.callout-copy h2 {
  margin: 0 0 6px;
  font-size: 18px;
  color: var(--text-main);
}

.callout-copy p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
}

.summary-pill {
  font-size: 14px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.summary-pill.ready {
  background: rgba(15, 157, 88, 0.1);
  color: var(--success);
}

.summary-pill.warn {
  background: rgba(217, 31, 60, 0.12);
  color: var(--danger);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px 24px;
}

.summary-item {
  display: grid;
  gap: 6px;
}

.summary-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.summary-item strong {
  font-size: 16px;
  color: var(--text-main);
}

.summary-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.rule-preview {
  margin-top: 18px;
}

.preview-card {
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
}

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

.preview-head strong {
  font-size: 18px;
  color: var(--text-main);
}

.preview-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preview-chips span {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--brand-100);
  color: var(--brand-600);
  font-size: 12px;
  font-weight: 600;
}

.preview-body {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

.preview-body p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.5;
}

.preview-body ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
  color: var(--text-main);
}

.preview-amount {
  font-weight: 700;
  color: var(--brand-600);
  margin-right: 6px;
}

.preview-hint {
  margin-left: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.preview-note {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.rule-list {
  display: grid;
  gap: 16px;
}

.rule-card-item {
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.9);
}

.rule-card-item h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.rule-card-item .meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.rule-card-item ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text-muted);
}

.rule-card-item .entry-list {
  margin-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  padding-top: 12px;
  display: grid;
  gap: 10px;
}

.rule-entry {
  display: grid;
  gap: 6px;
  font-size: 14px;
  background: rgba(248, 250, 252, 0.8);
  padding: 10px 12px;
  border-radius: var(--radius-md);
}

.rule-entry strong {
  color: var(--text-main);
}

.empty-state {
  border: 1px dashed rgba(148, 163, 184, 0.45);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.85);
  display: grid;
  gap: 12px;
  justify-items: center;
}

.empty-state i {
  font-size: 24px;
  color: var(--brand-500);
}

.icon-btn {
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 16px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1000;
}

.modal-backdrop.active {
  display: flex;
}

.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  width: min(420px, 100%);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.25);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.modal-form {
  display: grid;
  gap: 12px;
}

.modal-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.span-all {
  grid-column: 1 / -1;
}

@media (max-width: 800px) {
  .grid2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
  .dash-wrap {
    grid-template-columns: 1fr;
    margin: 20px auto 36px;
  }
  .side {
    position: static;
    order: 2;
  }
  .main {
    order: 1;
  }
}

@media (max-width: 768px) {
  .step-indicator {
    grid-template-columns: 1fr;
  }
  .movement-grid {
    padding: 16px;
  }
  .movement-row {
    grid-template-columns: 1fr;
    padding: 18px 16px;
  }
  .movement-field.span-2 {
    grid-column: span 1;
  }
  .movement-actions {
    position: static;
    display: flex;
    justify-content: flex-end;
  }
}

@media (max-width: 540px) {
  .topbar {
    flex-wrap: wrap;
  }
  .step {
    align-items: flex-start;
  }
  .preview-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* --- Buttons --- */
.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-primary,
.btn-secondary {
  height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-md);
  border: 0;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-400), var(--brand-600));
  color: #fff;
  box-shadow: 0 12px 24px rgba(177, 8, 29, 0.25);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 30px rgba(177, 8, 29, 0.22);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-main);
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.btn-secondary:hover {
  border-color: rgba(148, 163, 184, 0.7);
  background: rgba(248, 250, 252, 0.95);
}

.btn-secondary.danger {
  color: var(--danger);
  border-color: rgba(208, 0, 54, 0.25);
  background: rgba(252, 231, 243, 0.4);
}

.btn-secondary.danger:hover {
  background: rgba(252, 231, 243, 0.65);
}

/* --- Tabs --- */
.tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tab-bar .btn-secondary {
  background: rgba(241, 245, 249, 0.8);
  border-radius: 999px;
  padding: 10px 18px;
}

.tab-bar .btn-secondary:focus,
.tab-bar .btn-secondary:hover {
  background: rgba(226, 232, 240, 1);
}

/* --- Tables --- */
.table-wrap {
  overflow: auto;
  border-radius: var(--radius-lg);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.04);
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
  color: var(--text-main);
}

.table thead th {
  position: sticky;
  top: 0;
  background: rgba(15, 23, 42, 0.04);
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 14px 16px;
}

.table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  vertical-align: top;
}

.table tbody tr:nth-child(even) {
  background: rgba(248, 250, 252, 0.75);
}

.table tbody tr:hover {
  background: rgba(241, 245, 249, 0.9);
}

.table tfoot td {
  padding: 14px 16px;
  font-weight: 700;
}

.table .empty-row td {
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
  padding: 24px 16px;
}

.amount-cell {
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.amount-cell[data-dir="in"] {
  color: var(--success);
}

.amount-cell[data-dir="out"] {
  color: var(--danger);
}

.txn-type {
  font-weight: 600;
  color: var(--text-main);
}

.txn-category {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-top: 4px;
}

.txn-meta {
  display: inline-block;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 12px;
}

.actions {
  text-align: right;
}

.rowbtn {
  height: 34px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: #fff;
  color: var(--text-main);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.rowbtn:hover {
  background: rgba(248, 250, 252, 0.95);
}

.rowbtn.danger {
  color: var(--danger);
  border-color: rgba(208, 0, 54, 0.35);
}

.statement-header {
  margin-bottom: 14px;
  font-weight: 600;
  color: var(--text-main);
}

/* --- Posting rules studio --- */
.posting-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.posting-column {
  display: grid;
  gap: 24px;
}

.posting-card {
  display: grid;
  gap: 18px;
}

.posting-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.posting-hint {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.posting-narrative {
  margin: 0;
  color: var(--text-main);
  font-weight: 500;
}

.scenario-meta {
  border: 1px dashed rgba(148, 163, 184, 0.5);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  background: rgba(248, 250, 252, 0.7);
  display: grid;
  gap: 6px;
  color: var(--text-muted);
  font-size: 13px;
}

.chat-window {
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: var(--radius-md);
  background: #fff;
  min-height: 220px;
  max-height: 320px;
  overflow-y: auto;
  padding: 16px;
  display: grid;
  gap: 14px;
}

.chat-line {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: start;
}

.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(148, 163, 184, 0.2);
  color: var(--brand-600);
  font-size: 16px;
}

.chat-line.assistant .chat-avatar {
  background: rgba(217, 31, 60, 0.12);
}

.chat-bubble {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.45;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}

.chat-line.user .chat-bubble {
  background: linear-gradient(135deg, var(--brand-400), var(--brand-600));
  color: #fff;
}

.chat-line.assistant .chat-bubble {
  background: rgba(15, 23, 42, 0.06);
  color: var(--text-main);
}

.chat-input {
  display: grid;
  gap: 8px;
}

.chat-input textarea {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 184, 0.45);
  padding: 12px;
  font-family: var(--font-sans);
  resize: vertical;
  min-height: 80px;
}

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

.chat-actions .micro {
  margin-right: auto;
}

.treatment-wrapper {
  position: relative;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: var(--radius-md);
  background: #fff;
  overflow: hidden;
}

.treatment-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.treatment-table th,
.treatment-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  vertical-align: middle;
}


/* --- Notices & promos --- */
.notice {
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.06);
  margin: 18px auto 0;
  max-width: 1100px;
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--text-main);
}

.notice .dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand-500);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
  flex: 0 0 22px;
}

.promo {
  display: grid;
  gap: 12px;
}

.promo .hero {
  height: 150px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.16), rgba(37, 99, 235, 0.05));
  border-radius: var(--radius-lg);
  border: 1px solid rgba(37, 99, 235, 0.2);
  display: grid;
  place-items: center;
  color: var(--brand-600);
  font-weight: 600;
}

.promo p {
  margin: 0;
  color: var(--text-muted);
}

.promo .cta {
  font-weight: 700;
  color: var(--brand-600);
}

.security {
  max-width: 1100px;
  margin: 0 auto 40px;
  text-align: center;
  color: var(--text-muted);
}

.security .shield {
  width: 56px;
  height: 56px;
  margin: 12px auto;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  border-radius: 16px;
}

/* --- Tiles --- */
.tiles {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.tile {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.tile h4 {
  margin: 0 0 8px;
  color: var(--text-muted);
  font-weight: 600;
}

.tile .big {
  font-size: 30px;
  font-weight: 700;
  color: var(--text-main);
}

/* --- Responsive tweaks --- */
@media (max-width: 1100px) {
  .dash-wrap {
    grid-template-columns: 1fr;
  }

  .side {
    position: relative;
    top: auto;
  }

  .builder-shell {
    grid-template-columns: 1fr;
  }
}


@media (max-width: 720px) {
  .page-header {
    align-items: flex-start;
  }

  .tab-bar {
    width: 100%;
  }

  .tab-bar .btn-secondary {
    flex: 1 1 calc(50% - 12px);
    text-align: center;
  }

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

  .movement-head {
    display: none;
  }

  .movement-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .movement-grid {
    border-radius: var(--radius-md);
  }

  .page-callout {
    flex-direction: column;
  }

  .callout-icon {
    margin-bottom: 8px;
  }
}

@media (max-width: 520px) {
  .tab-bar .btn-secondary {
    flex: 1 1 100%;
  }

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