:root {
  --bg: #f1f4fb;
  --ink: #111827;
  --muted: #5b6776;
  --card: rgba(255, 255, 255, 0.82);
  --line: rgba(15, 23, 42, 0.12);
  --accent: #2f6cff;
  --accent-strong: #1f52d6;
  --accent-warm: #ffb26b;
  --accent-warm-strong: #f39a45;
  --highlight: rgba(47, 108, 255, 0.12);
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  --radius: 22px;
  --glass: blur(26px) saturate(160%);
  --success: #1f9d73;
  --warning: #c2410c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "SF Pro Display", "SF Pro Text", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  line-height: 1.45;
  background: radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.9), transparent 45%),
    radial-gradient(circle at 85% 15%, rgba(255, 240, 224, 0.8), transparent 40%),
    linear-gradient(180deg, #f6f8fd 0%, #e9eef7 55%, #eef2f8 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  opacity: 0.6;
  filter: blur(40px);
}

body::before {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(108, 170, 255, 0.28), transparent 70%);
  top: -160px;
  left: -160px;
}

body::after {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(255, 192, 136, 0.35), transparent 70%);
  bottom: -140px;
  right: -120px;
}

h1,
h2,
h3 {
  font-family: "SF Pro Display", "SF Pro Text", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  margin: 0;
}

h1 {
  font-size: clamp(34px, 4vw, 44px);
  letter-spacing: -0.03em;
  font-weight: 600;
  line-height: 1.08;
}

h2 {
  font-size: 21px;
  letter-spacing: -0.01em;
  font-weight: 600;
}

h3 {
  font-size: 16px;
  font-weight: 600;
}

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

.subtitle {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin-top: 4px;
}

label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-top: 14px;
  display: block;
}

label.inline-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-transform: none;
  font-size: 14px;
  color: var(--ink);
  margin-top: 0;
}

input,
select,
textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 12px 13px;
  font-size: 15px;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  min-height: 46px;
}

input[type="checkbox"],
input[type="radio"] {
  width: auto;
}

textarea {
  resize: vertical;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
.help-icon:focus-visible {
  outline: 3px solid rgba(65, 105, 225, 0.35);
  outline-offset: 2px;
}

button {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.14);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
}

button:disabled:hover {
  transform: none;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-strong);
}

.btn-warm {
  background: var(--accent-warm);
  color: white;
}

.btn-warm:hover {
  background: var(--accent-warm-strong);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  backdrop-filter: var(--glass);
}

.btn-small {
  padding: 6px 12px;
  font-size: 12px;
}

.shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 58px 28px 96px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: var(--glass);
}

.hidden {
  display: none !important;
}

.tag {
  display: inline-flex;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(47, 108, 255, 0.12);
  color: #2f6cff;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.masthead {
  margin: 0 0 32px;
  padding: 22px 26px 16px;
  display: grid;
  gap: 18px;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass);
}

.topbar-brand h1 {
  margin-top: 4px;
}

.topbar-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  padding: 6px 8px;
  backdrop-filter: blur(14px);
}

.topbar-controls button {
  padding: 6px 14px;
  font-size: 13px;
  border: none;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.topbar-brand .tag {
  font-size: 11px;
  letter-spacing: 0.2em;
}

.topbar-brand h1 {
  font-weight: 600;
  line-height: 1.05;
}

.masthead .tab-nav {
  width: min(980px, 100%);
  margin: 0 auto;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(47, 108, 255, 0.12);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  color: var(--muted);
}

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

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

.summary-table th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 14px;
}

.summary-table td {
  padding: 14px 10px;
  border-top: 1px solid var(--line);
  vertical-align: top;
  font-size: 14px;
}

.summary-row-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.balance-line {
  font-size: 13px;
  line-height: 1.7;
  font-variant-numeric: tabular-nums;
}

.balance-line.muted {
  color: var(--muted);
  font-style: italic;
}

/* Operations table category separator rows */
.ops-category-row td {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 18px;
  padding-bottom: 4px;
  border-top: none;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  background: rgba(15, 23, 42, 0.08);
  color: var(--ink);
}

.chip.info {
  background: rgba(47, 108, 255, 0.12);
  color: #1d4ed8;
}

.chip.ok {
  background: rgba(16, 185, 129, 0.18);
  color: #0f766e;
}

.chip.missing {
  background: rgba(249, 115, 22, 0.18);
  color: var(--warning);
}

.panel {
  background: var(--card);
  border-radius: 16px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
  backdrop-filter: var(--glass);
}

.panel h3 {
  margin-bottom: 10px;
}

.tab-content .panel + .panel {
  margin-top: 16px;
}

.inline {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.inline > div {
  flex: 1 1 160px;
}

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

.list-item {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(47, 108, 255, 0.12);
  font-size: 12px;
  color: var(--muted);
}

.note {
  font-size: 13px;
  color: var(--muted);
}

.field-help {
  font-size: 12px;
  color: var(--muted);
  margin: 7px 0 12px;
  line-height: 1.45;
}

.panel-head,
.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.help-icon {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.75);
  color: var(--accent);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
}

.help-icon:hover {
  background: rgba(47, 108, 255, 0.12);
}

.warning {
  border-left: 4px solid var(--accent-warm);
  background: #fff1ea;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  color: #8a3f1c;
  margin-top: 10px;
}

.status {
  background: rgba(15, 23, 42, 0.92);
  color: #f8fafc;
  border-radius: 14px;
  padding: 14px;
  font-family: "IBM Plex Mono", "Courier New", monospace;
  font-size: 12px;
  min-height: 120px;
  white-space: pre-wrap;
}

.feature {
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.7);
}

.feature summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.feature summary::-webkit-details-marker {
  display: none;
}

.feature + .feature {
  margin-top: 12px;
}

.subfeature {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px dashed rgba(15, 23, 42, 0.18);
  background: rgba(255, 255, 255, 0.6);
}

.subfeature summary {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.subfeature summary::-webkit-details-marker {
  display: none;
}

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(6px);
}

.modal-card {
  position: relative;
  z-index: 1;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.6);
  padding: 26px;
  max-width: 520px;
  width: min(90vw, 520px);
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass);
}

.modal-card p {
  margin-top: 8px;
}

/* Tab navigation */
.tab-nav {
  display: flex;
  gap: 4px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.46),
    rgba(255, 255, 255, 0.26),
    rgba(255, 255, 255, 0.46)
  );
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 0;
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
  backdrop-filter: var(--glass);
}

.tab-btn {
  flex: 1;
  padding: 12px 22px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  min-height: 44px;
}

.tab-btn:hover {
  background: rgba(47, 108, 255, 0.08);
  transform: none;
  box-shadow: none;
}

.tab-btn.active {
  background: var(--accent);
  color: white;
}

.tab-btn.active:hover {
  background: var(--accent-strong);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Sub-tab navigation */
.sub-tab-nav {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--line);
  margin-bottom: 24px;
}

.sub-tab-btn {
  padding: 10px 16px;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  background: transparent;
  color: var(--muted);
  font-weight: 500;
  cursor: pointer;
  border-radius: 0;
  transition: color 0.2s, border-color 0.2s;
}

.sub-tab-btn:hover {
  color: var(--ink);
  transform: none;
  box-shadow: none;
}

.sub-tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Account cards */
.account-card {
  background: var(--card);
  border-radius: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  margin-bottom: 18px;
}

.account-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.account-card-title {
  font-size: 18px;
  font-weight: 600;
}

.role-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.role-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  font-size: 13px;
}

.role-toggle:hover {
  background: rgba(47, 108, 255, 0.08);
}

.role-toggle.active {
  background: rgba(47, 108, 255, 0.15);
  border-color: var(--accent);
  color: var(--accent);
}

.role-toggle input {
  width: auto;
  margin: 0;
}

/* Hero layout for login */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 520px) minmax(0, 360px);
  gap: 36px;
  align-items: center;
  animation: rise 0.6s ease;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding-top: 32px;
  padding-bottom: 32px;
}

.login-hero {
  grid-template-columns: minmax(0, 560px);
  justify-content: center;
  width: min(92vw, 560px);
}

.hero-card {
  padding: 32px;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.6);
  backdrop-filter: var(--glass);
}

.login-hero .hero-card {
  padding: 40px 42px;
}

.login-hero .actions-bar {
  margin-top: 22px;
}

.login-card {
  display: grid;
  gap: 14px;
}

.login-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 4px;
}

.login-brand {
  min-width: 0;
}

.login-brand h1 {
  margin-top: 8px;
  margin-bottom: 2px;
}

.login-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding-top: 6px;
}

.login-copy {
  font-size: 16px;
  line-height: 1.4;
  margin: 2px 0 0;
}

.login-card label {
  margin-top: 2px;
}

.hero-aside {
  padding: 24px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(15, 23, 42, 0.08);
  backdrop-filter: var(--glass);
}

/* Overview card */
.overview-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: var(--glass);
  margin-bottom: 24px;
}

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

.overview-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 36px 18px;
  color: var(--muted);
}

.empty-state p {
  margin-bottom: 12px;
  font-size: 15px;
}

.empty-state.hidden {
  display: none;
}

/* Actions bar */
.actions-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

/* Quick actions */
.quick-actions {
  display: flex;
  gap: 14px;
  margin-top: 18px;
}

/* Bank account selector */
.bank-selector {
  background: rgba(47, 108, 255, 0.08);
  border: 1px solid rgba(47, 108, 255, 0.2);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 22px;
}

.bank-selector label {
  margin-top: 0;
  color: var(--accent);
  font-weight: 600;
}

/* Key input with toggle button */
.key-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.key-input-wrap input {
  padding-right: 44px;
}

.key-toggle-btn {
  position: absolute;
  right: 4px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--muted);
  font-size: 18px;
}

.key-toggle-btn:hover {
  background: rgba(15, 23, 42, 0.06);
  transform: none;
  box-shadow: none;
}

.eye-icon {
  line-height: 1;
}

/* Active key collapsible section */
.active-key-section {
  margin-top: 16px;
  border: 1px dashed rgba(15, 23, 42, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.5);
}

.active-key-toggle {
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.active-key-toggle::-webkit-details-marker {
  display: none;
}

.active-key-toggle::before {
  content: "\25B8";
  font-size: 12px;
  transition: transform 0.2s;
}

.active-key-section[open] .active-key-toggle::before {
  transform: rotate(90deg);
}

.active-key-content {
  padding: 0 14px 14px;
}

/* Radio group */
.radio-group {
  display: flex;
  gap: 16px;
  margin-top: 8px;
}

/* Run log display */
.run-log-container {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.run-log {
  background: rgba(15, 23, 42, 0.92);
  color: #f8fafc;
  border-radius: 10px;
  padding: 12px;
  font-family: "IBM Plex Mono", "Courier New", monospace;
  font-size: 11px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 300px;
  overflow-y: auto;
  margin: 0;
}

.run-item {
  transition: background 0.2s;
}

.run-item:has(.run-log-container:not(.hidden)) {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--accent);
}

/* Operation hints */
.operation-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

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

.chip-small {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  background: rgba(47, 108, 255, 0.1);
  color: var(--accent);
  font-family: "IBM Plex Mono", "Courier New", monospace;
}

/* Account checkbox lists */
.account-checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  padding: 4px;
}

.account-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.account-checkbox:hover {
  background: rgba(47, 108, 255, 0.06);
}

.account-checkbox.checked {
  background: rgba(47, 108, 255, 0.12);
  border-color: rgba(47, 108, 255, 0.3);
}

.account-checkbox input[type="checkbox"] {
  width: auto;
  margin: 0;
  cursor: pointer;
}

.account-checkbox .account-name {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.account-checkbox .chip {
  margin-left: auto;
}

/* Expandable account checkbox with inline config */
.account-checkbox-expandable {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.7);
  overflow: hidden;
  transition: border-color 0.15s;
}

.account-checkbox-expandable:hover {
  border-color: rgba(47, 108, 255, 0.2);
}

.account-checkbox-expandable.checked {
  border-color: rgba(47, 108, 255, 0.3);
  background: rgba(47, 108, 255, 0.04);
}

.account-checkbox-expandable .account-checkbox {
  border: none;
  background: transparent;
  border-radius: 0;
}

.account-checkbox-expandable.checked .account-checkbox {
  background: rgba(47, 108, 255, 0.08);
}

.season-pass-config {
  padding: 12px 14px;
  background: rgba(47, 108, 255, 0.04);
  border-top: 1px solid rgba(47, 108, 255, 0.12);
}

.season-pass-config.hidden {
  display: none;
}

.config-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.config-row:last-child {
  margin-bottom: 0;
}

.config-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
  min-width: 90px;
}

.config-row input[type="number"] {
  width: 100px;
  padding: 6px 10px;
  font-size: 13px;
}

.config-row .inline-label {
  font-size: 13px;
}

/* Land and Voucher inline configuration */
.land-config,
.voucher-config {
  padding: 12px 14px;
  background: rgba(47, 108, 255, 0.04);
  border-top: 1px solid rgba(47, 108, 255, 0.12);
}

.land-config.hidden,
.voucher-config.hidden {
  display: none;
}

.config-actions {
  margin-bottom: 8px;
}

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

.config-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.config-field input[type="number"] {
  width: 100%;
  padding: 6px 10px;
  font-size: 13px;
}

.land-regions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.land-regions:empty::after {
  content: "No regions configured. Click '+ Add Region' to add one.";
  color: var(--muted);
  font-size: 12px;
  font-style: italic;
  padding: 8px 0;
}

.land-region {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.land-region-top,
.land-region-status {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.land-region-status {
  grid-template-columns: 1fr;
}

.land-region-top .region-uid,
.land-region .deed-uids,
.land-region .harvest-resource-symbol,
.land-region .config-field input,
.land-region .config-field select {
  width: 100%;
}

.land-region-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
}

.land-region-details {
  margin-top: 0;
  padding: 14px 16px;
}

.land-region-summary {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  font-size: 13px;
  color: var(--muted);
}

.land-reserve-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-top: 12px;
}

.land-settings-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 12px;
}

.land-deed-field {
  margin-top: 12px;
}

.resource-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 8px;
  border: 1px solid var(--line);
}

.resource-checkboxes .inline-label {
  font-size: 12px;
  min-width: 84px;
}

.resource-checkboxes input:disabled + span,
.resource-checkboxes input:disabled {
  opacity: 0.4;
}

/* Job card styles */
.job-card {
  position: relative;
}

.job-status-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.job-schedule-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.job-cron-display,
.job-cron-edit {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.cron-value {
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 11px;
  background: rgba(15, 23, 42, 0.06);
  padding: 3px 6px;
  border-radius: 4px;
  color: var(--muted);
}

.cron-human {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-right: 8px;
}

.cron-input {
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 12px;
  padding: 4px 8px;
  width: 120px;
}

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

.btn-tiny {
  padding: 2px 8px;
  font-size: 11px;
}

.job-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  border: 1px solid transparent;
  cursor: pointer;
  transition: opacity 0.15s, box-shadow 0.15s;
  box-shadow: none;
}

.job-status-pill:hover {
  opacity: 0.85;
  transform: none;
  box-shadow: none;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.job-toggle-on {
  background: rgba(31, 157, 115, 0.14);
  color: var(--success);
  border-color: rgba(31, 157, 115, 0.35);
}

.job-toggle-on .status-dot {
  background: var(--success);
}

.job-toggle-off {
  background: rgba(91, 103, 118, 0.1);
  color: var(--muted);
  border-color: rgba(91, 103, 118, 0.25);
}

.job-toggle-off .status-dot {
  background: var(--muted);
  opacity: 0.5;
}

.pill.disabled {
  background: rgba(0, 0, 0, 0.08);
  color: var(--muted);
}

/* Toggle switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  vertical-align: middle;
  flex-shrink: 0;
}

.toggle-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.2s;
  border-radius: 20px;
}

.toggle-slider::before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.2s;
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--success);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(16px);
}

.theme-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  box-shadow: none;
  backdrop-filter: none;
}

.theme-btn:hover {
  background: rgba(15, 23, 42, 0.08);
  color: var(--ink);
  transform: none;
  box-shadow: none;
}

.theme-icon {
  display: block;
  flex-shrink: 0;
}

.theme-icon-moon {
  display: none;
}

.stats-panel {
  margin-bottom: 24px;
}

.stats-window-toggle {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.stats-window.active {
  background: var(--accent);
  color: white;
  border-color: transparent;
}

.stats-table td {
  vertical-align: middle;
}

.stats-table .chip-group {
  margin-top: 4px;
}

/* Operation selector (grouped radio buttons) */
.operation-selector {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 10px;
  padding: 4px;
}

@media (max-width: 600px) {
  .operation-selector {
    grid-template-columns: 1fr;
  }
}

.operation-group {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.5);
  overflow: hidden;
  min-height: 100%;
}

.operation-group-title {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 9px 12px 6px;
  background: rgba(15, 23, 42, 0.03);
  border-bottom: 1px solid var(--line);
}

.operation-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  cursor: pointer;
  transition: background 0.15s;
  margin: 0;
  text-transform: none;
  font-size: 13px;
  color: var(--ink);
}

.operation-option:hover {
  background: rgba(47, 108, 255, 0.06);
}

.operation-option:has(input:checked) {
  background: rgba(47, 108, 255, 0.12);
}

.operation-option input[type="radio"] {
  width: auto;
  margin: 0;
  cursor: pointer;
}

.operation-label {
  flex: 1;
  font-weight: 500;
  font-size: 13px;
}

.operation-status {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 999px;
  white-space: nowrap;
}

.operation-status.ready {
  background: rgba(16, 185, 129, 0.18);
  color: #0f766e;
}

.operation-status.not-ready {
  background: rgba(249, 115, 22, 0.18);
  color: var(--warning);
}

.operation-option:has(.operation-status.not-ready) {
  opacity: 0.7;
}

/* Operation preview panel */
.operation-preview {
  margin-top: 18px;
  padding: 16px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.03);
  border: 1px solid var(--line);
  min-height: 80px;
}

.preview-placeholder {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  padding: 16px;
}

.preview-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.preview-title code {
  font-family: "IBM Plex Mono", "Courier New", monospace;
  font-size: 12px;
  background: rgba(47, 108, 255, 0.1);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
}

.preview-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}

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

.preview-item-icon {
  flex-shrink: 0;
  width: 16px;
  text-align: center;
}

.preview-item-text {
  color: var(--muted);
}

.preview-item-text strong {
  color: var(--ink);
}

.preview-status {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.preview-status.ready {
  background: rgba(16, 185, 129, 0.12);
  color: #0f766e;
}

.preview-status.not-ready {
  background: rgba(249, 115, 22, 0.12);
  color: var(--warning);
}


@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Delete button danger style */
.btn-danger {
  color: #dc2626;
}

.btn-danger:hover {
  background: rgba(220, 38, 38, 0.1);
}

/* Flow Diagram - Visual Flowchart */
.flow-diagram {
  min-height: 200px;
}

.flow-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
  font-size: 14px;
  border: 2px dashed var(--line);
  border-radius: 12px;
}

.flow-visual {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Main horizontal flow row */
.flow-main-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 26px;
  background: linear-gradient(180deg, rgba(47, 108, 255, 0.03) 0%, transparent 100%);
  border-radius: 16px;
  border: 1px solid var(--line);
  overflow-x: auto;
}

.flow-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 120px;
}

.flow-column-title {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 8px;
}

/* Flow boxes (account nodes) */
.flow-box {
  padding: 12px 20px;
  border-radius: 8px;
  border: 2px solid var(--line);
  background: white;
  text-align: center;
  min-width: 100px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.flow-box .box-label {
  display: block;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 4px;
  opacity: 0.7;
}

.flow-box .box-name {
  display: block;
  font-weight: 600;
  font-size: 14px;
}

.flow-box .box-ops {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
}

/* Box color variants */
.flow-box.bank {
  background: linear-gradient(135deg, #2f6cff, #1e4fd8);
  color: white;
  border: none;
  padding: 20px 32px;
  box-shadow: 0 4px 12px rgba(47, 108, 255, 0.3);
}

.flow-box.bank .box-label {
  opacity: 0.85;
}

.flow-box.regular {
  border-color: #10b981;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.02));
}

.flow-box.season {
  border-color: #f59e0b;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.02));
}

.flow-box.claim {
  border-color: #8b5cf6;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(139, 92, 246, 0.02));
}

.flow-box.land {
  border-color: #14b8a6;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.1), rgba(20, 184, 166, 0.02));
}

.flow-box.voucher {
  border-color: #ec4899;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.1), rgba(236, 72, 153, 0.02));
}

.flow-box.delegation {
  border-color: #f97316;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.1), rgba(249, 115, 22, 0.02));
}

.flow-box.rental {
  border-color: #8b5cf6;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(139, 92, 246, 0.02));
}

/* Connectors (arrows between columns) */
.flow-connector {
  display: flex;
  align-items: center;
  padding: 0 8px;
  min-width: 80px;
}

.connector-line {
  flex: 1;
  height: 3px;
  background: linear-gradient(90deg, var(--line), var(--line));
  border-radius: 2px;
  position: relative;
}

.connector-label {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.connector-label.sps {
  background: #10b981;
  color: white;
}

.connector-label.dec {
  background: #f59e0b;
  color: white;
}

.connector-arrow {
  font-size: 18px;
  color: var(--muted);
  margin-left: -4px;
}

.connector-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.connector-timing {
  font-size: 10px;
  font-weight: 600;
  color: #059669;
  background: rgba(16, 185, 129, 0.1);
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
}

.connector-timing.inactive {
  color: var(--muted);
  background: rgba(0, 0, 0, 0.05);
  font-weight: 400;
  font-style: italic;
}

/* Vertical operations from bank */
.flow-vertical-ops {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 12px;
}

.vertical-line {
  width: 2px;
  height: 20px;
  background: var(--line);
}

.vertical-op {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  padding: 6px 12px;
  background: rgba(47, 108, 255, 0.1);
  border-radius: 8px;
  color: #2f6cff;
  margin-top: 4px;
}

.vertical-op .op-name {
  font-weight: 600;
}

.vertical-op .op-timing {
  font-size: 9px;
  font-weight: 500;
  color: #1e4fd8;
  background: rgba(47, 108, 255, 0.15);
  padding: 1px 6px;
  border-radius: 8px;
}

/* Flow box timing (below column) */
.flow-box-timing {
  font-size: 10px;
  color: var(--muted);
  margin-top: 8px;
  text-align: center;
}

.flow-box-timing .timing-label {
  font-weight: 500;
}

/* Secondary flows section */
.flow-secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

/* Integrated secondary flows (Land, Voucher) as mini horizontal flows */
.flow-secondary-integrated {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}

.flow-mini-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.flow-mini-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  min-width: 60px;
}

.flow-mini-accounts {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.flow-box.mini {
  padding: 6px 12px;
  font-size: 12px;
}

.flow-box.mini .box-name {
  font-size: 12px;
}

.flow-mini-connector {
  display: flex;
  align-items: center;
}

.mini-arrow {
  font-size: 16px;
  color: var(--muted);
  font-weight: 300;
}

.flow-mini-op {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 80px;
}

.mini-op-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
}

.mini-op-timing {
  font-size: 10px;
  color: #059669;
  margin-top: 2px;
}

.mini-op-timing.inactive {
  color: var(--muted);
}

.mini-op-detail {
  font-size: 0.7rem;
  color: var(--muted);
}

.flow-group {
  flex: 1;
  min-width: 200px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.6);
}

.flow-group-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 12px;
}

.flow-group-content {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.flow-group-schedules {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.group-schedule {
  font-size: 10px;
  color: #059669;
  background: rgba(16, 185, 129, 0.1);
  padding: 3px 10px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.group-schedule .timing-label {
  font-weight: 600;
  color: #047857;
}

/* Schedule section */
.flow-schedule {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  background: rgba(15, 23, 42, 0.02);
}

.schedule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.schedule-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
}

.schedule-op {
  font-weight: 500;
}

.schedule-cron {
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 11px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.05);
  padding: 2px 8px;
  border-radius: 4px;
}

/* Flow Legend */
.flow-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.legend-color {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid var(--line);
}

.legend-color.bank {
  background: linear-gradient(135deg, #2f6cff, #1e4fd8);
  border: none;
}

.legend-color.regular {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
}

.legend-color.season {
  background: rgba(245, 158, 11, 0.2);
  border-color: #f59e0b;
}

.legend-color.claim {
  background: rgba(139, 92, 246, 0.2);
  border-color: #8b5cf6;
}

.legend-arrow {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  color: white;
}

.legend-arrow.sps {
  background: #10b981;
}

.legend-arrow.sps::after {
  content: "SPS \2192";
}

.legend-arrow.dec {
  background: #f59e0b;
}

.legend-arrow.dec::after {
  content: "DEC \2192";
}

/* Schedule Builder */
.schedule-builder {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.8);
  overflow: hidden;
}

.schedule-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.02);
}

.schedule-tab {
  flex: 1;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.schedule-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.5);
}

.schedule-tab.active {
  color: var(--accent);
  background: white;
  border-bottom-color: var(--accent);
}

.schedule-content {
  padding: 18px;
}

.schedule-mode {
  display: none;
}

.schedule-mode.active {
  display: block;
}

.schedule-mode-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.schedule-mode-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: var(--muted);
  margin-bottom: -1px;
}

.schedule-mode-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

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

.schedule-row label {
  font-size: 13px;
  color: var(--text);
}

.schedule-select {
  padding: 6px 10px;
  font-size: 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--text);
  min-width: 70px;
}

.schedule-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 108, 255, 0.1);
}

.schedule-preview {
  margin-top: 16px;
  padding: 12px;
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 8px;
}

.schedule-preview-description {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
}

.schedule-preview-cron {
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 11px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.05);
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 8px;
}

.schedule-preview-runs {
  font-size: 12px;
  color: #059669;
}

.schedule-preview-runs strong {
  color: #047857;
}

.schedule-preview-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.schedule-preview-item {
  font-size: 11px;
  background: rgba(16, 185, 129, 0.1);
  padding: 3px 8px;
  border-radius: 4px;
  color: #047857;
}

.schedule-custom-input {
  width: 100%;
  padding: 10px 12px;
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
}

.schedule-custom-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 108, 255, 0.1);
}

.schedule-help {
  font-size: 11px;
  color: var(--muted);
  margin-top: 8px;
}

.schedule-help code {
  background: rgba(15, 23, 42, 0.05);
  padding: 1px 4px;
  border-radius: 3px;
  font-family: 'SF Mono', Monaco, monospace;
}

/* Day selector for weekly */
.day-selector {
  display: flex;
  gap: 4px;
}

.day-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.day-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.day-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* Responsive flow */
@media (max-width: 700px) {
  .flow-main-row {
    flex-direction: column;
    gap: 16px;
  }

  .flow-connector {
    transform: rotate(90deg);
    min-width: auto;
    padding: 8px 0;
  }
}

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

  .login-hero .hero-card {
    padding: 28px 24px;
  }

  .login-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .login-actions {
    padding-top: 0;
  }

  .summary-table thead {
    display: none;
  }

  .summary-table tr {
    display: block;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 12px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.75);
  }

  .summary-table td {
    display: block;
    border-top: none;
    padding: 8px 0;
  }

  .summary-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 4px;
  }

  .tab-nav {
    flex-direction: column;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-controls {
    width: 100%;
    justify-content: flex-start;
    border-radius: 14px;
  }

  .toast-container {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: none;
  }
}

/* Toast notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 400px;
}

.toast {
  background: var(--card);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass);
  overflow: hidden;
  animation: toast-in 0.3s ease forwards;
  position: relative;
}

.toast.dismissing {
  animation: toast-out 0.25s ease forwards;
}

.toast-accent {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}

.toast.success .toast-accent {
  background: var(--success);
}

.toast.error .toast-accent {
  background: #dc2626;
}

.toast-body {
  padding: 14px 16px 14px 20px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.toast-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  margin-top: 1px;
}

.toast.success .toast-icon {
  background: rgba(31, 157, 115, 0.15);
  color: var(--success);
}

.toast.error .toast-icon {
  background: rgba(220, 38, 38, 0.12);
  color: #dc2626;
}

.toast-content {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}

.toast-diff {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.toast-diff-item {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.toast-diff-bullet {
  flex-shrink: 0;
  color: var(--accent);
  font-weight: 600;
}

.toast-close {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  padding: 0;
  font-size: 16px;
  line-height: 1;
}

.toast-close:hover {
  background: rgba(15, 23, 42, 0.08);
  transform: none;
  box-shadow: none;
}

.toast-progress {
  height: 3px;
  background: rgba(15, 23, 42, 0.06);
}

.toast-progress-bar {
  height: 100%;
  border-radius: 0 0 0 3px;
  transition: width 0.1s linear;
}

.toast.success .toast-progress-bar {
  background: var(--success);
}

.toast.error .toast-progress-bar {
  background: #dc2626;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(40px);
  }
}
