/* CivicBlueprint - Charcoal Amber Theme */
/* Base Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  font-family: 'Source Sans Pro', system-ui, -apple-system, BlinkMacSystemFont,
    'Segoe UI', sans-serif;
  font-weight: 400;
  background-color: #1c1917;
  color: #fafaf9;
}

:root {
  --color-primary: #d97706;
  --color-secondary: #fbbf24;
  --color-accent: #ef4444;
  --color-bg: #1c1917;
  --color-surface: #292524;
  --color-surface-soft: #1f1b18;
  --color-border-subtle: #3f3f46;
  --color-text: #fafaf9;
  --color-text-muted: #a8a29e;
  --sidebar-width: 260px;
  --sidebar-width-collapsed: 76px;
  --header-height: 60px;
  --radius-sm: 2px;
  --shadow-hard: 0 0 0 1px rgba(0, 0, 0, 0.8), 0 14px 28px rgba(0, 0, 0, 0.7);
}

body,
.app-shell {
  background-color: var(--color-bg);
}

/* Layout */
.app-shell {
  display: flex;
  min-height: 100vh;
  color: var(--color-text);
}

.sidebar {
  width: var(--sidebar-width);
  background: radial-gradient(circle at top left, #3b2a16 0, #111827 55%);
  border-right: 1px solid #111827;
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 14px;
}

.sidebar-logo-mark {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: conic-gradient(from 160deg, #fbbf24, #d97706, #f97316, #fbbf24);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Oswald', system-ui, sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: #111827;
}

.sidebar-title {
  display: flex;
  flex-direction: column;
}

.sidebar-app-name {
  font-family: 'Oswald', system-ui, sans-serif;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-tagline {
  font-size: 11px;
  color: var(--color-text-muted);
}

.sidebar-section-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-text-muted);
  padding: 12px 10px 6px;
}

.nav-list {
  list-style: none;
}

.nav-item {
  margin-bottom: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  border-left: 3px solid transparent;
  color: var(--color-text);
  text-decoration: none;
  font-size: 13px;
  white-space: nowrap;
}

.nav-link:hover {
  background-color: rgba(15, 23, 42, 0.7);
}

.nav-link-icon {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.7);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

.nav-link.active {
  border-left-color: var(--color-primary);
  background: linear-gradient(90deg, rgba(217, 119, 6, 0.24), transparent);
}

.nav-link.active .nav-link-icon {
  background: rgba(217, 119, 6, 0.22);
  color: var(--color-secondary);
}

.sidebar-divider {
  border: none;
  border-top: 1px solid rgba(55, 65, 81, 0.65);
  margin: 10px 0;
}

.sidebar-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 6px 4px;
  font-size: 11px;
  color: var(--color-text-muted);
}

.sidebar-collapse-btn {
  border-radius: 999px;
  border: 1px solid rgba(55, 65, 81, 0.7);
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.7);
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: 14px;
}

.sidebar-hint {
  max-width: 120px;
}

.main-region {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.app-header {
  height: var(--header-height);
  border-bottom: 1px solid #111827;
  background: radial-gradient(circle at top left, #111827 0, #0b0f1a 50%, #020617 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  gap: 16px;
}

.header-left,
.header-center,
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-city-label {
  font-family: 'Oswald', system-ui, sans-serif;
  font-weight: 600;
  font-size: 18px;
}

.header-chip {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  font-size: 11px;
  color: var(--color-text-muted);
}

.header-select {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(75, 85, 99, 0.9);
  border-radius: 999px;
  color: var(--color-text);
  font-size: 12px;
  padding: 4px 26px 4px 10px;
  position: relative;
  appearance: none;
}

.header-select-wrap {
  position: relative;
}

.header-select-wrap::after {
  content: '▾';
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  color: var(--color-text-muted);
}

.btn {
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 13px;
  padding: 6px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--color-text);
}

.btn-primary {
  background: linear-gradient(135deg, #f97316, #d97706);
  border-color: #d97706;
  color: #111827;
  font-weight: 600;
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.btn-secondary {
  border-color: var(--color-secondary);
  color: var(--color-secondary);
  background: transparent;
}

.btn-text {
  padding-inline: 4px;
  color: var(--color-text-muted);
}

.btn-icon {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(55, 65, 81, 0.8);
  background: rgba(15, 23, 42, 0.9);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, #fbbf24, #d97706 55%, #111827 100%);
  border: 1px solid rgba(148, 163, 184, 0.7);
}

.avatar-label {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.avatar-name {
  font-size: 12px;
}

.avatar-role {
  font-size: 11px;
  color: var(--color-text-muted);
}

.icon-bell {
  position: relative;
}

.icon-bell-dot {
  position: absolute;
  right: 2px;
  top: 2px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--color-accent);
  box-shadow: 0 0 0 2px #020617;
}

.main-scroll {
  flex: 1;
  overflow-y: auto;
}

.page-inner {
  padding: 18px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.page-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.page-title {
  font-family: 'Oswald', system-ui, sans-serif;
  font-weight: 600;
  font-size: 20px;
}

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

/* Cards & Surfaces */
.card {
  background-color: var(--color-surface);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(15, 23, 42, 0.9);
  box-shadow: var(--shadow-hard);
}

.card-header {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(55, 65, 81, 0.8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.card-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.card-body {
  padding: 10px 12px 12px;
  font-size: 13px;
}

.card-footer {
  padding: 8px 12px 10px;
  border-top: 1px solid rgba(55, 65, 81, 0.8);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

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

.kpi-card {
  background-color: var(--color-surface);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(15, 23, 42, 0.9);
  box-shadow: var(--shadow-hard);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: default;
}

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

.kpi-value-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}

.kpi-value {
  font-size: 18px;
  font-weight: 600;
}

.kpi-delta {
  font-size: 11px;
  color: var(--color-primary);
}

.kpi-delta.negative {
  color: var(--color-accent);
}

.kpi-status-pill {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  border: 1px solid rgba(75, 85, 99, 0.8);
}

.badge-muted {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid rgba(75, 85, 99, 0.9);
  font-size: 10px;
  color: var(--color-text-muted);
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 4px;
}

.badge-dot.success {
  background-color: var(--color-primary);
}

.badge-dot.warn {
  background-color: var(--color-accent);
}

.status-pill {
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
}

.status-completed {
  background-color: rgba(217, 119, 6, 0.2);
  color: #fed7aa;
}

.status-failed {
  background-color: rgba(239, 68, 68, 0.18);
  color: #fecaca;
}

.status-queued {
  background-color: rgba(148, 163, 184, 0.24);
  color: #e5e7eb;
}

.status-running {
  background-color: rgba(251, 191, 36, 0.25);
  color: #fef9c3;
}

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

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

.text-strong {
  font-weight: 600;
}

.text-accent {
  color: var(--color-accent);
}

.text-primary {
  color: var(--color-primary);
}

.chip {
  border-radius: 999px;
  border: 1px solid rgba(75, 85, 99, 0.9);
  padding: 1px 8px;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.chip-dot.good {
  background: var(--color-primary);
}

.chip-dot.bad {
  background: var(--color-accent);
}

.grid-2 {
  display: grid;
  grid-template-columns: 2fr 1.2fr;
  gap: 12px;
}

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

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

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

.flex-row {
  display: flex;
  flex-direction: row;
}

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

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.flex-1 {
  flex: 1;
}

.gap-xs {
  gap: 4px;
}

.gap-sm {
  gap: 8px;
}

.gap-md {
  gap: 12px;
}

.mt-xs {
  margin-top: 4px;
}

.mt-sm {
  margin-top: 8px;
}

.mt-md {
  margin-top: 12px;
}

.mt-lg {
  margin-top: 16px;
}

.text-right {
  text-align: right;
}

.text-center {
  text-align: center;
}

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

.table thead {
  background-color: rgba(24, 24, 27, 0.95);
}

.table th,
.table td {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(55, 65, 81, 0.8);
}

.table th {
  font-weight: 500;
  color: var(--color-text-muted);
  text-align: left;
  white-space: nowrap;
}

.table tbody tr:nth-child(even) {
  background-color: rgba(24, 24, 27, 0.7);
}

.table tbody tr:hover {
  background-color: rgba(30, 64, 175, 0.3);
}

/* Fake chart skeletons */
.chart-placeholder {
  height: 150px;
  background: repeating-linear-gradient(
      to right,
      rgba(55, 65, 81, 0.65) 0,
      rgba(55, 65, 81, 0.65) 1px,
      transparent 1px,
      transparent 8px
    ),
    radial-gradient(circle at bottom left, rgba(217, 119, 6, 0.32), transparent 55%);
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
}

.chart-line {
  position: absolute;
  inset: 18px 10px 16px 10px;
  border-radius: 2px;
  background: linear-gradient(120deg, rgba(251, 191, 36, 0.1), rgba(217, 119, 6, 0.3));
}

.chart-heatmap {
  position: absolute;
  inset: 16px 12px;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  grid-auto-rows: 1fr;
  gap: 2px;
}

.chart-heatmap div {
  background: rgba(55, 65, 81, 0.7);
}

.chart-heatmap div:nth-child(odd) {
  background: rgba(217, 119, 6, 0.6);
}

.chart-heatmap div:nth-child(3n) {
  background: rgba(251, 191, 36, 0.7);
}

.chart-heatmap div:nth-child(5n) {
  background: rgba(239, 68, 68, 0.7);
}

.legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

/* Map placeholders */
.map-card {
  position: relative;
  min-height: 260px;
  background: radial-gradient(circle at 10% 0%, #111827 0, #020617 55%),
    linear-gradient(135deg, rgba(55, 65, 81, 0.8), rgba(15, 23, 42, 1));
  border-radius: var(--radius-sm);
  border: 1px solid rgba(15, 23, 42, 0.9);
  box-shadow: var(--shadow-hard);
  overflow: hidden;
}

.map-layer-toggle-row {
  position: absolute;
  top: 8px;
  left: 10px;
  display: inline-flex;
  gap: 6px;
}

.map-layer-chip {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(75, 85, 99, 0.8);
  background: rgba(15, 23, 42, 0.9);
}

.map-layer-chip.active {
  border-color: var(--color-primary);
  color: var(--color-secondary);
}

.map-grid {
  position: absolute;
  inset: 30px 10px 26px 10px;
  background-image: radial-gradient(circle, rgba(31, 41, 55, 0.9) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: 0.55;
}

.map-routes {
  position: absolute;
  inset: 34px 12px 30px 12px;
}

.map-route-primary {
  stroke: var(--color-primary);
  stroke-width: 2;
  fill: none;
}

.map-route-secondary {
  stroke: var(--color-secondary);
  stroke-width: 1.5;
  fill: none;
  stroke-dasharray: 2 4;
}

.map-route-alert {
  stroke: var(--color-accent);
  stroke-width: 2.4;
  fill: none;
}

.map-legend {
  position: absolute;
  bottom: 6px;
  left: 8px;
  padding: 4px 6px;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(55, 65, 81, 0.9);
  font-size: 10px;
}

.map-overview {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 90px;
  height: 60px;
  border-radius: 3px;
  border: 1px solid rgba(75, 85, 99, 0.9);
  background: radial-gradient(circle at 30% 10%, #111827, #020617 60%);
}

.map-scale {
  position: absolute;
  right: 8px;
  bottom: 6px;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #fbbf24, #d97706);
}

/* Tabs */
.tabs {
  border-bottom: 1px solid rgba(55, 65, 81, 0.9);
  display: flex;
  gap: 16px;
  padding: 0 2px;
}

.tab {
  padding: 10px 2px 8px;
  font-size: 13px;
  color: var(--color-text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.tab-dot-unsaved {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--color-secondary);
  margin-left: 4px;
}

.pill-switch {
  display: inline-flex;
  border-radius: 999px;
  border: 1px solid rgba(75, 85, 99, 0.9);
  padding: 2px;
  gap: 2px;
}

.pill-option {
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  cursor: pointer;
  color: var(--color-text-muted);
}

.pill-option.active {
  background: var(--color-primary);
  color: #111827;
}

/* Inputs */
.input,
.textarea,
.select,
.input-ghost {
  background: rgba(15, 23, 42, 0.9);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(55, 65, 81, 0.9);
  color: var(--color-text);
  font-size: 12px;
  padding: 4px 8px;
  width: 100%;
}

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

.label {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-bottom: 2px;
}

.field-row {
  display: flex;
  flex-direction: column;
  margin-bottom: 8px;
}

.field-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

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

.switch {
  width: 30px;
  height: 16px;
  border-radius: 999px;
  background: rgba(31, 41, 55, 0.9);
  border: 1px solid rgba(55, 65, 81, 0.9);
  position: relative;
}

.switch::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fafaf9;
  top: 1px;
  left: 1px;
}

.switch.on {
  background: linear-gradient(90deg, #fbbf24, #d97706);
  border-color: #d97706;
}

.switch.on::after {
  left: 15px;
}

.slider-track {
  position: relative;
  height: 4px;
  border-radius: 999px;
  background: rgba(55, 65, 81, 0.9);
}

.slider-thumb {
  position: absolute;
  top: -4px;
  left: 50%;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--color-primary);
}

/* Scenario sidebar extras */
.sidebar-block {
  margin-top: 12px;
}

.sidebar-search {
  margin-bottom: 6px;
}

.sidebar-search input {
  font-size: 12px;
}

.scenario-group-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-text-muted);
  margin: 8px 4px 4px;
}

.scenario-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 12px;
}

.scenario-row:hover {
  background: rgba(15, 23, 42, 0.75);
}

.scenario-main {
  display: flex;
  flex-direction: column;
}

.scenario-name {
  font-size: 12px;
}

.scenario-meta {
  font-size: 10px;
  color: var(--color-text-muted);
}

.badge-domain {
  border-radius: 999px;
  border: 1px solid rgba(75, 85, 99, 0.8);
  padding: 0 5px;
  font-size: 9px;
  margin-left: 4px;
}

.status-icon {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-secondary);
}

.status-icon.baseline {
  box-shadow: 0 0 0 1px rgba(250, 250, 249, 0.8);
}

.status-icon.shared {
  background: var(--color-primary);
}

.status-icon.private {
  background: rgba(148, 163, 184, 0.9);
}

/* Inspector panel */
.inspector {
  width: 310px;
  background: #111827;
  border-left: 1px solid rgba(15, 23, 42, 0.9);
  padding: 10px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inspector-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-text-muted);
}

.inspector-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

.inspector-section {
  padding: 8px 8px 6px;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(55, 65, 81, 0.8);
}

.toasts {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 40;
}

.toast {
  background: rgba(15, 23, 42, 0.95);
  border-radius: 4px;
  border: 1px solid rgba(55, 65, 81, 0.9);
  padding: 6px 10px;
  font-size: 12px;
}

.toast-title {
  font-weight: 600;
  margin-bottom: 2px;
}

.toast-meta {
  font-size: 11px;
  color: var(--color-text-muted);
}

/* Run queue indicator */
.run-queue {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(55, 65, 81, 0.9);
  font-size: 11px;
}

.run-queue-count {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: rgba(217, 119, 6, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

/* Outline / reporting */
.split-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 12px;
}

.outline-panel {
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(15, 23, 42, 0.9);
  padding: 8px 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.outline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--color-text-muted);
}

.outline-list {
  list-style: none;
  margin-top: 4px;
}

.outline-item {
  padding: 4px 6px;
  border-radius: 3px;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.outline-item:hover {
  background: rgba(15, 23, 42, 0.8);
}

.outline-item.active {
  background: rgba(217, 119, 6, 0.25);
  border: 1px solid rgba(217, 119, 6, 0.7);
}

.outline-label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.outline-index {
  font-size: 11px;
  color: var(--color-text-muted);
}

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

.editor-pane {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rich-editor-card {
  padding: 8px 10px 10px;
}

.rich-editor-toolbar {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}

.rich-editor-toolbar button {
  border-radius: 3px;
  border: 1px solid rgba(55, 65, 81, 0.9);
  background: rgba(15, 23, 42, 0.9);
  color: var(--color-text);
  font-size: 11px;
  padding: 2px 6px;
  cursor: pointer;
}

.rich-editor-heading {
  font-family: 'Oswald', system-ui, sans-serif;
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 4px;
}

.rich-editor-body {
  font-size: 13px;
  line-height: 1.5;
  min-height: 120px;
}

.autosave-indicator {
  font-size: 11px;
  color: var(--color-text-muted);
  text-align: right;
  margin-top: 4px;
}

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

.asset-tile {
  border-radius: 4px;
  border: 1px solid rgba(55, 65, 81, 0.9);
  background: rgba(15, 23, 42, 0.9);
  padding: 6px 6px 8px;
  font-size: 11px;
}

.asset-thumb {
  height: 60px;
  border-radius: 3px;
  background: linear-gradient(135deg, rgba(55, 65, 81, 0.9), rgba(15, 23, 42, 1));
  margin-bottom: 4px;
}

.asset-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.asset-tag {
  border-radius: 999px;
  border: 1px solid rgba(75, 85, 99, 0.9);
  padding: 0 4px;
  font-size: 9px;
}

/* Responsive tweaks */
@media (max-width: 1200px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 960px) {
  .app-shell {
    flex-direction: column;
  }

  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
  }

  .sidebar-footer {
    display: none;
  }

  .main-region {
    min-height: calc(100vh - 72px);
  }
}
