/* Later Blues app shell */

:root {
  color-scheme: dark;
  --bg: #0b0f14;
  --panel: #111827;
  --panel-soft: #152032;
  --panel-strong: #1b2640;
  --border: #273244;
  --text: #d6e2ef;
  --muted: #8ea2b8;
  --accent: #9ffcff;
  --accent-strong: #55e7ff;
  --success: #4fd1a5;
  --warning: #f6c76b;
  --danger: #ff8f99;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  --radius: 12px;
  --radius-sm: 8px;
  --sidebar-width: 10rem;
}

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

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at top left, rgba(159, 252, 255, 0.08), transparent 24%),
    linear-gradient(180deg, #0b0f14 0%, #090d12 100%);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  width: min(1600px, calc(100% - 1.5rem));
  margin: 0 auto;
  padding: 1rem 0 1.5rem;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 1rem;
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid rgba(39, 50, 68, 0.8);
  border-radius: var(--radius);
  background: rgba(13, 18, 27, 0.82);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.brand-block {
  display: grid;
  gap: 0.15rem;
}

.brand {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--accent);
}

.brand-subtitle {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.main-nav {
  display: grid;
  gap: 0.45rem;
}

.nav-pill,
.pill-link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 2.5rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(17, 24, 39, 0.65);
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.2;
  white-space: normal;
  text-align: left;
}

.nav-pill:hover,
.pill-link:hover,
.nav-pill:focus-visible,
.pill-link:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.nav-pill.is-active {
  background: rgba(159, 252, 255, 0.14);
  border-color: rgba(159, 252, 255, 0.45);
  color: var(--accent);
}

.sidebar-note {
  padding-top: 0.35rem;
  border-top: 1px solid rgba(39, 50, 68, 0.75);
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.page-shell {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}

.hero-band,
.section-band {
  border: 1px solid rgba(39, 50, 68, 0.8);
  border-radius: var(--radius);
  background: rgba(17, 24, 39, 0.82);
  box-shadow: var(--shadow);
}

.hero-band {
  padding: 1.4rem 1.4rem 1.2rem;
}

.eyebrow {
  margin: 0 0 0.4rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.76rem;
}

.hero-band h1 {
  margin: 0;
  color: var(--accent);
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.05;
}

.lead {
  max-width: 70rem;
  margin: 0.75rem 0 0;
  color: var(--text);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.section-band {
  padding: 1.1rem 1.1rem 1.2rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-header h2 {
  margin: 0;
  font-size: 1.1rem;
}

.section-note {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.summary-grid,
.card-grid,
.note-stack {
  display: grid;
  gap: 0.9rem;
}

.summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.card-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.stat-card,
.content-card,
.doc-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(21, 32, 50, 0.9);
}

.stat-card,
.content-card {
  padding: 1rem;
}

.stat-value {
  color: var(--accent);
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1;
}

.stat-label {
  margin-top: 0.45rem;
  font-weight: 600;
}

.stat-note,
.card-meta,
.empty-state {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.content-card h3 {
  margin: 0.3rem 0 0.5rem;
  font-size: 1rem;
  line-height: 1.3;
}

.content-card p {
  margin: 0;
  color: var(--text);
  line-height: 1.55;
}

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

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.data-table th,
.data-table td {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid rgba(39, 50, 68, 0.95);
  vertical-align: top;
  text-align: left;
}

.data-table th {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.data-table td {
  color: var(--text);
  line-height: 1.45;
}

.data-table tr:hover td {
  background: rgba(21, 32, 50, 0.42);
}

.doc-card {
  padding: 1rem 1rem 0.9rem;
}

.doc-card p {
  margin: 0 0 0.9rem;
  line-height: 1.6;
  color: var(--text);
}

.doc-card p:last-child {
  margin-bottom: 0;
}

.bullet-list {
  margin: 0 0 0.9rem 1.15rem;
  padding: 0;
  color: var(--text);
  line-height: 1.6;
}

.bullet-list li + li {
  margin-top: 0.3rem;
}

.bullet-list:last-child {
  margin-bottom: 0;
}

.flash-stack {
  display: grid;
  gap: 0.5rem;
}

.flash {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.flash-error {
  background: rgba(63, 21, 21, 0.85);
  color: #ffc1c1;
}

.flash-warning {
  background: rgba(59, 40, 0, 0.85);
  color: #ffe29a;
}

.flash-info {
  background: rgba(15, 35, 64, 0.85);
  color: #b6dbff;
}

.flash-success {
  background: rgba(13, 43, 26, 0.85);
  color: #9bf1c8;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }
}

@media (max-width: 900px) {
  .app-shell {
    width: min(100% - 1rem, 100%);
  }

  .data-table {
    min-width: 640px;
  }

  .hero-band,
  .section-band {
    padding: 1rem;
  }
}
