:root {
  --surface: #f0fee6;
  --surface-dim: #d1dec8;
  --surface-bright: #f0fee6;
  --surface-lowest: #ffffff;
  --surface-low: #ebf8e1;
  --surface-container: #e5f2db;
  --surface-high: #dfecd6;
  --surface-highest: #d9e7d0;
  --on-surface: #141e10;
  --on-surface-variant: #3b4b35;
  --outline: #6b7c63;
  --outline-variant: #b9ccaf;
  --primary: #026e00;
  --primary-container: #00ff00;
  --on-primary: #ffffff;
  --secondary: #5e5e5e;
  --secondary-container: #e2e2e2;
  --tertiary-container: #ffd2c9;
  --error: #ba1a1a;
  --error-container: #ffdad6;
  --warning-yellow: #ffff00;
  --border-bold: #000000;
  --shadow-dark: rgba(122, 145, 112, 0.24);
  --shadow-light: rgba(255, 255, 255, 0.92);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --sidebar-width: 260px;
}

body {
  font-family: "JetBrains Mono", monospace;
  background: var(--surface);
  color: var(--on-surface);
}

h1,
h2,
h3,
h4,
h5,
h6,
.brand-title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
}

a {
  color: var(--primary);
  text-decoration: none;
}

.app-shell {
  min-height: 100vh;
}

.app-sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--surface-container);
  border-right: 1px solid var(--outline-variant);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.7),
    8px 0 24px rgba(122, 145, 112, 0.08);
  position: sticky;
  top: 0;
}

.app-main {
  min-width: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-container);
  color: var(--on-surface);
  box-shadow: 6px 6px 14px var(--shadow-dark),
    -6px -6px 14px var(--shadow-light);
}

.neo-panel {
  background: var(--surface-low);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 10px 10px 24px var(--shadow-dark),
    -10px -10px 24px var(--shadow-light);
}

.neo-panel-tight {
  background: var(--surface-low);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 8px 8px 20px var(--shadow-dark),
    -8px -8px 20px var(--shadow-light);
}

.neo-inset {
  background: var(--surface-high);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: inset 6px 6px 14px rgba(122, 145, 112, 0.15),
    inset -6px -6px 14px rgba(255, 255, 255, 0.95);
}

.btn-neo {
  border: 0;
  border-radius: 14px;
  padding: 0.85rem 1.1rem;
  box-shadow: 8px 8px 16px rgba(122, 145, 112, 0.2),
    -8px -8px 16px rgba(255, 255, 255, 0.95);
}

.btn-neo:hover {
  transform: translateY(-1px);
}

.btn-primary-neo {
  background: var(--primary-container);
  color: var(--on-surface);
}

.btn-dark-neo {
  background: var(--on-surface);
  color: var(--surface-lowest);
}

.btn-soft-neo {
  background: var(--surface-low);
  color: var(--on-surface);
}

.form-control,
.form-select {
  border: 0;
  border-radius: 14px;
  background: var(--surface-high);
  color: var(--on-surface);
  box-shadow: inset 6px 6px 12px rgba(122, 145, 112, 0.12),
    inset -6px -6px 12px rgba(255, 255, 255, 0.9);
}

.form-control:focus,
.form-select:focus {
  box-shadow: inset 6px 6px 12px rgba(122, 145, 112, 0.12),
    inset -6px -6px 12px rgba(255, 255, 255, 0.9),
    0 0 0 0.2rem rgba(2, 110, 0, 0.15);
  border-color: transparent;
}

.nav-link-shell {
  color: var(--on-surface);
  border-radius: 14px;
  padding: 0.8rem 1rem;
  display: block;
  transition: all 0.2s ease;
}

.nav-link-shell.active,
.nav-link-shell:hover {
  background: var(--primary-container);
  color: var(--on-surface);
  box-shadow: inset 3px 3px 8px rgba(0, 0, 0, 0.06),
    4px 4px 10px rgba(122, 145, 112, 0.15);
}

.section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
}

.metric-card .metric-label {
  font-size: 12px;
  color: var(--on-surface-variant);
  text-transform: uppercase;
}

.metric-card .metric-value {
  font-size: 2rem;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
}

.tone-default {
  background: var(--surface-low);
}

.tone-success {
  background: rgba(0, 255, 0, 0.12);
}

.tone-danger {
  background: var(--tertiary-container);
}

.tone-muted {
  background: var(--secondary-container);
}

.badge-soft {
  border-radius: 999px;
  padding: 0.45rem 0.7rem;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
}

.badge-success {
  background: rgba(0, 255, 0, 0.18);
  color: #015300;
}

.badge-danger {
  background: var(--error-container);
  color: var(--error);
}

.badge-muted {
  background: var(--secondary-container);
  color: var(--secondary);
}

.page-title {
  font-size: 2.5rem;
  line-height: 1.1;
}

.soft-table {
  --bs-table-bg: transparent;
  --bs-table-striped-bg: rgba(255, 255, 255, 0.25);
  --bs-table-hover-bg: rgba(0, 255, 0, 0.08);
  border-collapse: separate;
  border-spacing: 0 0.5rem;
}

.soft-table tbody tr td,
.soft-table thead tr th {
  border: 0;
}

.soft-row {
  background: var(--surface-low);
  border-radius: 14px;
  box-shadow: 6px 6px 14px rgba(122, 145, 112, 0.16),
    -6px -6px 14px rgba(255, 255, 255, 0.92);
}

.list-clean {
  list-style: none;
  margin: 0;
  padding: 0;
}

.list-clean li + li {
  margin-top: 0.75rem;
}

.progress-soft {
  height: 12px;
  background: var(--surface-high);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 4px 4px 10px rgba(122, 145, 112, 0.14),
    inset -4px -4px 10px rgba(255, 255, 255, 0.94);
}

.progress-soft .bar {
  height: 100%;
  background: linear-gradient(90deg, #77ff61, #00ff00);
}

.schedule-chip,
.timeline-pill {
  display: inline-block;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.timeline-track {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.timeline-node {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--surface-high);
  border: 2px solid var(--outline);
}

.timeline-node.active {
  background: var(--primary-container);
  border-color: var(--primary);
}

.chat-thread {
  max-height: 640px;
  overflow-y: auto;
}

.chat-bubble {
  max-width: 85%;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  box-shadow: 6px 6px 14px rgba(122, 145, 112, 0.14),
    -6px -6px 14px rgba(255, 255, 255, 0.92);
}

.chat-bubble.mine {
  background: rgba(0, 255, 0, 0.18);
  margin-left: auto;
}

.chat-bubble.theirs {
  background: var(--tertiary-container);
}

.chat-bubble.system {
  background: var(--secondary-container);
  text-align: center;
  margin-inline: auto;
}

.map-stage {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: radial-gradient(
      circle at 20% 20%,
      rgba(255, 255, 255, 0.65),
      transparent 35%
    ),
    radial-gradient(circle at 80% 70%, rgba(2, 110, 0, 0.06), transparent 30%),
    linear-gradient(180deg, var(--surface-low), var(--surface-high));
}

.map-road-h {
  position: absolute;
  left: -10%;
  right: -10%;
  top: 38%;
  height: 6px;
  background: rgba(107, 124, 99, 0.45);
  transform: rotate(7deg);
}

.map-road-v {
  position: absolute;
  top: -10%;
  bottom: -10%;
  left: 66%;
  width: 6px;
  background: rgba(107, 124, 99, 0.45);
  transform: rotate(2deg);
}

.map-marker {
  position: absolute;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 8px 8px 16px rgba(122, 145, 112, 0.18),
    -8px -8px 16px rgba(255, 255, 255, 0.95);
}

.map-marker.success {
  background: rgba(0, 255, 0, 0.75);
}

.map-marker.danger {
  background: var(--tertiary-container);
}

.map-marker.muted {
  background: var(--secondary-container);
}

.kpi-strip {
  background: var(--on-surface);
  color: #e8f5de;
  border-radius: 16px;
  box-shadow: 10px 10px 24px rgba(122, 145, 112, 0.25),
    -10px -10px 24px rgba(255, 255, 255, 0.55);
}

.call-controls .btn {
  min-width: 90px;
}

.dialer-trigger {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1051;
}

.login-shell {
  min-height: 100vh;
}

@media (max-width: 991.98px) {
  .app-sidebar {
    width: 100%;
    min-height: auto;
    position: relative;
  }

  .page-title {
    font-size: 2rem;
  }
}
