/* Reservoir Editorial Suite — Bloomberg Terminal meets Swiss Minimalist Design */
:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Inter", "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", "Roboto Mono", Menlo, Consolas, monospace;

  /* Colors */
  --bg-app: #080c14;
  --bg-sidebar: #0d121f;
  --bg-card: #121826;
  --bg-card-subtle: #182032;
  --bg-input: #0b0f19;
  --bg-hover: #1e293b;

  --border: #1f293d;
  --border-focus: #38bdf8;
  --border-subtle: #172033;

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --cyan: #38bdf8;
  --cyan-glow: rgba(56, 189, 248, 0.12);
  --emerald: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.15);
  --amber: #f59e0b;
  --amber-glow: rgba(245, 158, 11, 0.15);
  --crimson: #f43f5e;
  --crimson-glow: rgba(244, 63, 94, 0.15);
  --purple: #a855f7;

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Sidebar */
.sidebar {
  width: 240px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1rem;
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 2rem;
  padding: 0 0.5rem;
}

.brand-dot {
  width: 10px;
  height: 10px;
  background-color: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--cyan);
}

.brand-title {
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 0.95rem;
  text-transform: uppercase;
  color: #ffffff;
}

.brand-badge {
  font-size: 9px;
  font-family: var(--font-mono);
  background: var(--cyan-glow);
  color: var(--cyan);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.nav-section {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  padding: 0.5rem 0.5rem 0.25rem;
  margin-top: 1rem;
}

.sidebar a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-weight: 500;
  transition: all 0.15s ease;
  margin-bottom: 2px;
}

.sidebar a:hover, .sidebar a.active {
  background-color: var(--bg-card);
  color: #ffffff;
  border-left: 2px solid var(--cyan);
}

/* Main Container */
.main-viewport {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  max-height: 100vh;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 2rem;
  border-bottom: 1px solid var(--border);
  background-color: var(--bg-sidebar);
}

.content-pane {
  padding: 2rem;
  flex: 1;
}

/* Typography & Headings */
h1, h2, h3, h4 {
  margin-top: 0;
  color: #ffffff;
  font-weight: 600;
}

h1 { font-size: 1.5rem; letter-spacing: -0.02em; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }

/* Cards & Containers */
.terminal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* 7-Day Editorial Runway Progress Grid */
.runway-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}

.runway-day-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: border-color 0.15s ease;
}

.runway-day-card.today {
  border-color: var(--cyan);
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.08) 0%, var(--bg-card-subtle) 100%);
}

.runway-date-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.runway-count {
  font-size: 1.75rem;
  font-weight: 700;
  font-family: var(--font-mono);
  margin: 0.4rem 0 0.2rem;
  color: #ffffff;
}

.runway-meter-bar {
  height: 4px;
  width: 100%;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin: 0.5rem 0;
}

.runway-meter-fill {
  height: 100%;
  transition: width 0.3s ease;
}

.runway-meter-fill.complete { background: var(--emerald); box-shadow: 0 0 6px var(--emerald); }
.runway-meter-fill.partial { background: var(--amber); }
.runway-meter-fill.empty { background: var(--crimson); }

.runway-status-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
}

.badge-approved { background: var(--emerald-glow); color: var(--emerald); border: 1px solid rgba(16, 185, 129, 0.4); }
.badge-pending_review { background: var(--cyan-glow); color: var(--cyan); border: 1px solid rgba(56, 189, 248, 0.4); }
.badge-held { background: var(--amber-glow); color: var(--amber); border: 1px solid rgba(245, 158, 11, 0.4); }
.badge-rejected { background: var(--crimson-glow); color: var(--crimson); border: 1px solid rgba(244, 63, 94, 0.4); }
.badge-candidate { background: rgba(148, 163, 184, 0.1); color: var(--text-muted); border: 1px solid var(--border); }

.badge-g1 { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.4); }
.badge-g2 { background: rgba(168, 85, 247, 0.15); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.4); }
.badge-g3 { background: var(--emerald-glow); color: var(--emerald); border: 1px solid rgba(16, 185, 129, 0.4); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.85rem;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card-subtle);
  color: var(--text-main);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  font-family: var(--font-sans);
}

.btn:hover {
  background: var(--bg-hover);
  border-color: var(--text-muted);
}

.btn-primary { background: #0284c7; border-color: #0369a1; color: #ffffff; }
.btn-primary:hover { background: #0369a1; }
.btn-success { background: #059669; border-color: #047857; color: #ffffff; }
.btn-success:hover { background: #047857; }
.btn-warning { background: #d97706; border-color: #b45309; color: #ffffff; }
.btn-warning:hover { background: #b45309; }
.btn-danger { background: #e11d48; border-color: #be123c; color: #ffffff; }
.btn-danger:hover { background: #be123c; }

.btn-shortcut {
  font-family: var(--font-mono);
  font-size: 10px;
  background: rgba(255, 255, 255, 0.15);
  padding: 1px 4px;
  border-radius: 2px;
  margin-left: 5px;
}

/* Executive High-Density Data Table */
.table-container {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

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

table.dense-table th {
  background: var(--bg-sidebar);
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.05em;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border);
}

table.dense-table td {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
  vertical-align: middle;
}

table.dense-table tr:hover {
  background-color: var(--bg-hover);
}

table.dense-table tr.selected {
  background-color: var(--cyan-glow) !important;
  outline: 1px solid var(--cyan);
}

/* Quote-or-Reject Inspector */
.inspector-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.pane-container {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
}

.pane-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}

.highlight-span {
  background-color: var(--emerald-glow);
  color: #6ee7b7;
  border-bottom: 2px solid var(--emerald);
  padding: 2px 4px;
  border-radius: 2px;
  font-weight: 600;
}

.doc-viewer {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.7;
  max-height: 380px;
  overflow-y: auto;
  white-space: pre-wrap;
  background: #05080f;
  padding: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: #cbd5e1;
}

/* Keyboard Shortcut Legend */
.shortcut-legend {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--bg-sidebar);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.key-cap {
  font-family: var(--font-mono);
  background: var(--bg-card);
  border: 1px solid var(--border-focus);
  color: var(--cyan);
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 700;
}
