:root {
  --bg: #f6f8fc;
  --bg-deep: #1f43c8;
  --bg-mid: #4a86ff;
  --panel: #ffffff;
  --panel-alt: #f7faff;
  --line: #dbe6f5;
  --line-strong: #b5cbea;
  --text: #183153;
  --muted: #61748f;
  --title: #ffffff;
  --title-dark: #163a73;
  --accent: #2451d1;
  --accent-soft: rgba(36, 81, 209, 0.08);
  --accent-gold: #ff7a1a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter var", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
  color: var(--text);
  height: 100vh;
  overflow: hidden;
}

.page {
  width: 100%;
  margin: 0;
  position: relative;
}

.layout {
  display: flex;
  margin-top: 16px;
  height: calc(100vh - 136px); /* Adjust for header (~60px), footer (~60px), and margin (16px) */
  overflow: hidden;
}

.side-nav {
  background: #F9FAFB;
  width: 302px;
  flex-shrink: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 16px;
  overflow-y: auto;
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.nav-link {
  color: #1A2835;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  padding: 12px 16px;
  transition: all 0.2s ease;
  border-radius: 8px;
}

.nav-link span {
  font-size: 14px;
  font-weight: 600;
  text-transform: none;
}

.nav-link:hover {
  background: rgba(0, 0, 0, 0.05);
}

.nav-link.active {
  color: #1A2835;
  background: #D8E7FD; /* Light blue as requested */
}

.hero-header {
  padding: 12px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #173E72;
}

.common-footer {
  background: #173E72;
  color: #ffffff;
  padding: 16px 24px;
  font-size: 12px;
  width: 100%;
}

.last-processed {
  margin-bottom: 4px;
  text-align: left;
}

.copyright {
  margin-bottom: 4px;
  text-align: right;
  float: right;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-logo-link {
  text-decoration: none;
  display: flex;
  align-items: center;
}



.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-icon-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  padding: 8px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: auto;
  width: auto;
}

.header-icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

h1 {
  margin: 0;
  font-weight: 700;
  font-family: 'Hanken Grotesk', sans-serif;
  letter-spacing: 0;
  color: #ffffff;
  font-size: 20px;
  line-height: 1.1;
}

.paper-container {
  padding: 0;
  background-color: #F9FAFB;
  width: 100%;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

.workspace-panel {
  height: 48px;
  background-color: #FDFDFD;
  width: 100%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0 16px;
  margin: 0 16px;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  position: relative;
}

#expand-btn {
  display: none;
}

.expand-collapse-btn {
  width: 32px;
  height: 32px;
  min-height: 32px;
  border-radius: 16px;
  border: 0.5px solid #E2E2E2;
  background-color: #FFFFFF;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  margin-right: 12px;
  color: #FFFFFF
}

.expand-btn img {
  width: 16px;
  height: 16px;
}

#workspace-title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #1A2835;
}

.paper-content {
  display: flex;
  padding: 16px;
  background: #F9FAFB;
  gap: 16px;
  flex-grow: 1;
  overflow: hidden;
  min-height: 0;
}

.controls {
  display: flex;
  flex-direction: column;
  padding: 16px 24px;
  background: #FFFFFF;
  border: 1px solid;
  border-color: #E2E2E2;
  border-radius: 8px;
  width: 302px;
  flex-shrink: 0;
  color: #1A2835;
  overflow-y: auto;
  min-height: 0;
}

.searchable-dropdown {
  position: relative;
  width: 100%;
}

.dropdown-search {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  background: #ffffff;
  color: var(--text);
  font: inherit;
  padding: 0 36px 0 12px;
  border-radius: 6px;
  outline: none;
}

.dropdown-clear {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 18px;
  line-height: 1;
  padding: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
}

.searchable-dropdown.has-value .dropdown-clear {
  opacity: 1;
  pointer-events: auto;
}

.dropdown-clear:hover {
  background: #e2e8f0;
  color: #1A2835;
}

.cached-cities {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}

.cached-city-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: 6px;
  height: 30px;
}

.cached-city-name {
  color: #173E72;
  font-size: 14px;
}

.cached-city-clear {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 18px;
  line-height: 1;
  padding: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cached-city-clear:hover {
  background: #e2e8f0;
  color: #1A2835;
}

.dropdown-search:disabled {
  border: 1px solid var(--line-strong) !important;
  border-bottom: 1px solid var(--line-strong) !important;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  outline: none !important;
  background: #ffffff !important;
  background-image: none !important;
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
  opacity: 1 !important;
  appearance: none;
  -webkit-appearance: none;
  background-clip: padding-box;
}

.dropdown-search:disabled:focus {
  box-shadow: none;
  outline: none;
}

.dropdown-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 250px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  z-index: 1000;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  margin-top: 4px;
}

.dropdown-option {
  padding: 10px 12px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
  border-bottom: 1px solid var(--line);
}

.dropdown-option:last-child {
  border-bottom: none;
}

.dropdown-option:hover,
.dropdown-option.highlighted {
  background: var(--accent-soft);
  color: var(--accent);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 16px;
  width: 230px;
}

label {
  color: #1A2835;
  font-size: 13px;
  font-weight: 600;
}

select,
input[type="file"],
input[type="text"],
input[type="email"],
input[type="url"],
button {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  background: #ffffff;
  color: var(--text);
  font: inherit;
  padding: 0 12px;
  border-radius: 6px;
  box-shadow: none;
}

button {
  cursor: pointer;
  background: linear-gradient(180deg, #2960ef 0%, #204dc3 100%);
  color: #1A2835;
  font-weight: 600;
  border: 0;
}

.filters-title {
  margin: 0;
  color: #1A2835;
  font-size: 20px;
  font-weight: 700;
  padding: 0 0 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.filters-note {
  margin: 8px 0 0;
  color: #1A2835;
  font-size: 13px;
  line-height: 1.5;
}

.radio-group {
  display: flex;
  background-color: #f1f5f9;
  border-radius: 8px;
  padding: 4px;
  margin-top: 8px;
  width: 100%;
}

.radio-group label {
  flex: 1;
  text-align: center;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  color: #64748b;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.radio-group input[type="radio"] {
  display: none;
}

.radio-group label:has(input[type="radio"]:checked) {
  background-color: #3382F5;
  color: #FFFFFF;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.radio-group label:hover:not(:has(input[type="radio"]:checked)) {
  background-color: rgba(255, 255, 255, 0.5);
  color: #1e293b;
}

.content-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  flex-grow: 1;
  min-width: 500px;
  background-color: #FFFFFF;
  border-radius: 0px;
  border: 0px;
  overflow-y: auto;
  min-height: 0;
  height: 100%;
}


.admin-experience th {
  color: #2d1808;
  border-bottom: 2px solid #f0d6bc;
}

.admin-data-cell {
  color: #4b2d16 !important;
  border-bottom: 1px solid #f5d6b5;
}

.admin-experience tr:hover td {
  background: rgba(245, 214, 181, 0.4);
}

/* Common dashboard stage for dark themes (like PredictiveDemand) */
/* Admin Dashboard specific styles */
.admin-experience {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 84% 12%, rgba(255, 178, 102, 0.16) 0, rgba(255, 178, 102, 0) 20%),
    radial-gradient(circle at 16% 86%, rgba(255, 216, 170, 0.18) 0, rgba(255, 216, 170, 0) 22%),
    linear-gradient(180deg, #fffaf5 0%, #fff3e6 100%);
  border: 1px solid #f5d6b5;
  color: #4b2d16;
}

.admin-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

.admin-card,
.admin-directory,
.admin-focus {
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid #f0d6bc;
    border-radius: 20px;
}

.admin-card {
    padding: 20px;
}

.admin-main-grid { display: grid; grid-template-columns: 1fr 340px; gap: 20px; }

.admin-directory,
.admin-focus {
    padding: 24px;
}

.admin-focus-item { margin-bottom: 16px; border-bottom: 1px solid #f0d6bc; padding-bottom: 16px; }
.admin-focus-kicker { font-size: 11px; font-weight: 700; color: #b04e09; }
.admin-focus-title { font-size: 16px; font-weight: 700; color: #2d1808; margin: 4px 0; }
.admin-focus-note { font-size: 13px; color: #7a5a3c; }

/* Forecast specific styles */
.forecast-hero-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: center;
  padding: 40px;
  border-radius: 24px;
  background: #FFFFFF;
  border: 0;
  margin-bottom: 24px;
}

.forecast-hero-title { margin: 0; font-size: 42px; line-height: 1.1; color: #1A2835; }
.forecast-kicker { font-size: 14px; font-weight: 700; color: #173E72; letter-spacing: 0.1em; margin-bottom: 12px; }

.forecast-panel,
.forecast-opportunity-card {
  background: #FFFFFF;
  border: 1px solid #E2E2E2;
  border-radius: 20px;
  padding: 24px;
  overflow: hidden;
}

.forecast-title {
  color: #1A2835;
  margin: 0 0 16px;
  font-size: 18px;
}

.forecast-opportunity-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.forecast-opportunity-card {
}
.forecast-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.forecast-card-kicker {
  font-size: 14px;
  color: #173E72;
  letter-spacing: 0.04em;
}
.forecast-card-metric {
  font-size: 30px;
  color: #1A2835;
}
.forecast-card-route {
  margin-top: 14px;
  font-size: 15px;
  color: #1A2835;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.forecast-card-list {
  margin: 14px 0 0;
  padding-left: 18px;
  color: #173E72;
  line-height: 1.6;
}

.forecast-chart-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 20px;
}


.forecast-dark-frame {
  margin-top: 10px;
  background: #F9FAFB;
  border: 1px solid #E2E2E2;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.forecast-dark-frame canvas {
  width: 100% !important;
  height: auto !important;
  display: block;
}

.forecast-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.legend {
  display: flex;
  gap: 16px;
  font-size: 12px;
}

.forecast-dark-legend {
  color: #173E72;
}

.forecast-capacity-wrap {
  margin-top: 10px;
  max-height: 400px;
  overflow-y: auto;
}

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

.forecast-panel-large {
  grid-column: span 1;
  min-width: 0;
}

.dashboard-stage {
  background: #F9FAFB;
  position: relative;
}

.dashboard-stage .panel {
  border: 1px solid #303D48;
  background: #FFFFFF;
  color: #1A2835;
  margin-bottom: 20px;
}

.dashboard-stage .panel-header {
  border-bottom: 1px solid #F9FAFB;
  background: transparent;
}

.dashboard-stage .panel-title {
  color: #1A2835;
}

.dashboard-stage .panel-subtitle {
  color: #173E72;
}

.dashboard-stage .stat-card {
  border: 1px solid #303D48;
  background: #FFFFFF;
  color: #1A2835;
}

.dashboard-stage .stat-label,
.dashboard-stage .stat-note {
  color: #173E72;
}

.dashboard-stage .stat-value {
  color: #1A2835;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


.dashboard-stage th {
  background: #F9FAFB;
  color: #1A2835;
  border-bottom: 1px solid #E2E2E2;
}

.dashboard-stage td {
  background: #F9FAFB;
  color: #173E72;
  border-bottom: 1px solid #E2E2E2;
}

.dashboard-stage tr:hover td {
  background: #D8E7FD;
  color: #1A2835;
}

.panel {
  background: #ffffff;
  border: 1px solid #303D48;
  border-radius: 6px;
  overflow: hidden;
}

.panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-alt);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.download-chart-btn {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(180deg, #2e63ef 0%, #2251cb 100%);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: block; /* Show by default */
  flex-shrink: 0;
  white-space: nowrap;
  width: 100px;
}

.download-chart-btn:hover {
  background: linear-gradient(180deg, #3b74ff 0%, #2a61e3 100%);
  transform: translateY(-1px);
}

.panel-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--title-dark);
}

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

.table-wrap {
  overflow-x: auto;
}

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

th {
  background: var(--panel-alt);
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}


/* Stats and Calendar styles */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.stat-card {
  background: #ffffff;
  border: 1px solid #dbe6f5;
  border-radius: 8px;
  padding: 16px 18px;
}

.stat-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.stat-value {
  margin-top: 10px;
  font-size: clamp(16px, 2.2vw, 32px);
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

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

.calendar-cell {
  padding: 14px 12px;
  border-radius: 12px;
  border: 1px solid #173E72;
  min-height: 112px;
  background: #f7faff;
}

.calendar-month {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.calendar-band {
  margin-top: 10px;
  font-size: 24px;
  font-weight: 700;
}

.calendar-note {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.5;
}

.band-low {
  color: #3382F5;
}

.band-medium {
  color: #519E8F;
}

.band-high {
  color: #EF9536;
}

.band-peak {
  color: #b84d2d;
}

.loading-indicator {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.8);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  z-index: 10000;
  font-weight: bold;
}

.predictive-controls, .admin-controls {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  margin-top: 20px;
  padding-top: 20px;
}

.forecast-adjust-value {
  color: #1A2835;
  text-align: center;
}

.export-audit-btn {
  background: #7a5a3c !important;
}

.dashboard-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 20px;
}

.dashboard-grid-1 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: 20px;
}

.table-scroll {
  height: 600px;
  overflow-y: auto;
}

.table-one-row {
  height: 90px;
}

.sticky-header {
  position: sticky;
  top: 0;
  z-index: 1;
}

.chart-container-600 { padding: 20px; height: 600px; }
.chart-container-500 { padding: 20px; height: 500px; }
.chart-container-400 { padding: 20px; height: 400px; }

.map-container { height: 500px; }

.mt-20 { margin-top: 20px; }

.forecast-hero-details {
  margin-top: 20px;
  font-size: 18px;
  color: #173E72;
}

.forecast-network-code {
  color: #1A2835;
  font-weight: 700;
}

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

.forecast-bg-text {
  font-size: 64px;
  font-weight: 800;
  color: rgba(23, 62, 114, 0.08);
}

.relative { position: relative; }

.chart-tooltip {
  position: absolute;
  display: none;
  background: #FFFFFF;
  border: 1px solid #E2E2E2;
  border-radius: 6px;
  padding: 10px;
  color: #1A2835;
  font-size: 13px;
  z-index: 100;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
}

.future-subtitle {
  font-size: 12px;
  color: #64748b;
  margin-top: 10px;
}

.admin-card-label {
  font-size: 12px;
  color: #7a5a3c;
}

.admin-card-value {
  font-size: 32px;
  color: #2d1808;
  font-weight: 800;
}

.admin-card-note {
  font-size: 12px;
  color: #b04e09;
}

.admin-card-value-health {
  font-size: 32px;
  color: #16a34a;
  font-weight: 800;
}

.admin-section-title {
  margin: 0 0 20px;
  font-size: 20px;
}

.admin-sidebar-title {
  margin: 0 0 20px;
  font-size: 18px;
}

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

.legend-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

rh-ui-pill {
  align-items: center;
  border-bottom-color: rgb(0, 115, 209);
  border-bottom-left-radius: 32px;
  border-bottom-right-radius: 32px;
  border-bottom-style: solid;
  border-bottom-width: 1px;
  border-left-color: rgb(0, 115, 209);
  border-left-style: solid;
  border-left-width: 1px;
  border-right-color: rgb(0, 115, 209);
  border-right-style: solid;
  border-right-width: 1px;
  border-top-color: rgb(0, 115, 209);
  border-top-left-radius: 32px;
  border-top-right-radius: 32px;
  border-top-style: solid;
  border-top-width: 1px;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  font-width: 100%;
  height: 20px;
  line-height: 18px;
  overflow: hidden;
  padding-left: 8px;
  padding-right: 8px;
  text-wrap-mode: nowrap;
  width: fit-content;
  margin: 2px;
}

.pill--outline svg {
  display: flex;
  width: 12px;
  color: rgb(0, 115, 209);
}

.pill--outline {
  background: rgb(255, 255, 255);
  border: 0;
  color: rgb(0, 115, 209);
  width: fit-content;
  align-items: center;
  display: flex;
  height: 20px;
  min-height: 20px;
  padding-left: 0;
  padding-right: 0;
}

.pill__text {
  height: 18px;
}

rh-ui-icon.icon-container {
  display: flex;
  height: 12px;
}

.growth-positive { color: #4ade80; }
.growth-negative { color: #f87171; }

.tooltip-title { font-weight: 700; color: #60a5fa; margin-bottom: 4px; }
.d-none { display: none !important; }
