:root {
  --bg: #f3f1ea;
  --surface: #fbfaf6;
  --surface-strong: #f0ebdf;
  --ink: #1e2430;
  --muted: #677081;
  --line: rgba(30, 36, 48, 0.12);
  --accent: #c96c3b;
  --accent-soft: rgba(201, 108, 59, 0.14);
  --success: #24785e;
  --warning: #b97b22;
  --danger: #a04747;
  --radius-lg: 28px;
  --radius-md: 18px;
  --shadow: 0 22px 60px rgba(33, 38, 45, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(201, 108, 59, 0.12), transparent 28%),
    linear-gradient(180deg, #f8f5ee 0%, var(--bg) 100%);
  color: var(--ink);
  font-family: "Manrope", sans-serif;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.sidebar {
  position: relative;
  padding: 24px;
  background: rgba(28, 34, 46, 0.98);
  color: #f5f1e8;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.sidebar__brand,
.topbar__left,
.topbar__right,
.panel__head,
.hero-strip,
.storage__meta,
.source-list div,
.metric,
.profile-chip,
.table-wrap,
.task-list li {
  display: flex;
  align-items: center;
}

.sidebar__brand,
.topbar__left,
.topbar__right,
.panel__head,
.hero-strip,
.source-list div,
.task-list li {
  justify-content: space-between;
}

.brand-mark,
.profile-chip__avatar {
  width: 48px;
  aspect-ratio: 1;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #e39a67, var(--accent));
  color: #fff8f3;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
}

.sidebar__brand h1,
.topbar h2,
.hero-strip h3,
.panel h3,
.metric h3 {
  margin: 0;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.sidebar .eyebrow {
  color: rgba(245, 241, 232, 0.55);
}

.sidebar__nav {
  display: grid;
  gap: 10px;
}

.nav-link {
  padding: 14px 16px;
  border-radius: 18px;
  text-align: left;
  color: inherit;
  background: transparent;
  transition: background 180ms ease, transform 180ms ease;
}

.nav-link span,
.nav-link small {
  display: block;
}

.nav-link span {
  font-weight: 700;
}

.nav-link small {
  margin-top: 4px;
  color: rgba(245, 241, 232, 0.55);
}

.nav-link:hover,
.nav-link.is-active {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(4px);
}

.sidebar__foot {
  margin-top: auto;
}

.storage {
  padding: 18px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 22px;
}

.storage__bar {
  height: 10px;
  margin-bottom: 14px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.storage__bar span {
  display: block;
  width: 72%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f2c97d, #e98e59);
}

.storage__meta {
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.storage__meta span {
  color: rgba(245, 241, 232, 0.7);
  font-size: 0.88rem;
}

.main-panel {
  padding: 28px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.topbar__left,
.topbar__right {
  gap: 16px;
}

.menu-toggle {
  display: none;
  width: 48px;
  height: 48px;
  padding: 12px;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--ink);
  border-radius: 999px;
}

.searchbox input {
  width: min(320px, 45vw);
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  outline: none;
}

.profile-chip {
  gap: 12px;
  padding: 8px 10px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.profile-chip small {
  display: block;
  color: var(--muted);
}

.hero-strip {
  padding: 24px 28px;
  margin-bottom: 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(255, 247, 235, 0.92)),
    var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.hero-strip h3 {
  max-width: 720px;
  font-size: clamp(1.3rem, 2vw, 2rem);
}

.primary-btn,
.text-btn,
.pill,
.badge {
  border-radius: 999px;
}

.primary-btn {
  padding: 14px 20px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
}

.metrics-grid,
.content-grid {
  display: grid;
  gap: 18px;
}

.metrics-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.metric,
.panel {
  background: rgba(251, 250, 246, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.metric {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 22px;
  border-radius: 24px;
  animation: rise 500ms ease both;
}

.metric p,
.panel p {
  margin: 0;
}

.metric h3 {
  font-size: clamp(1.8rem, 2vw, 2.4rem);
}

.positive {
  color: var(--success);
}

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

.negative {
  color: var(--danger);
}

.content-grid {
  grid-template-columns: 2fr 1fr;
}

.panel {
  padding: 24px;
  border-radius: var(--radius-lg);
}

.panel--wide {
  min-width: 0;
}

.pill {
  padding: 8px 12px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
}

.chart {
  margin-top: 22px;
}

.chart__bars {
  height: 260px;
  padding: 18px 10px 10px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: end;
  gap: 14px;
  background:
    linear-gradient(to top, rgba(30, 36, 48, 0.05) 1px, transparent 1px) 0 0 / 100% 25%,
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), transparent);
  border-radius: 22px;
}

.chart__bars div {
  height: var(--size);
  border-radius: 18px 18px 8px 8px;
  background: linear-gradient(180deg, #dfb68e, var(--accent));
  animation: grow 900ms ease both;
}

.chart__labels {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
}

.source-list {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.source-list div {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.text-btn {
  color: var(--accent);
  font-weight: 700;
}

.table-wrap {
  align-items: stretch;
  margin-top: 18px;
  overflow-x: auto;
}

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

th,
td {
  padding: 14px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.badge {
  display: inline-block;
  padding: 7px 12px;
  font-size: 0.84rem;
  font-weight: 700;
}

.badge--success {
  background: rgba(36, 120, 94, 0.12);
  color: var(--success);
}

.badge--pending {
  background: rgba(185, 123, 34, 0.14);
  color: var(--warning);
}

.badge--review {
  background: rgba(160, 71, 71, 0.12);
  color: var(--danger);
}

.task-list {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 16px;
}

.task-list li {
  align-items: flex-start;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.task-list span {
  color: var(--muted);
}

.overlay {
  display: none;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes grow {
  from {
    height: 0;
  }
  to {
    height: var(--size);
  }
}

@media (max-width: 1100px) {
  .metrics-grid,
  .content-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(82vw, 300px);
    transform: translateX(-100%);
    transition: transform 220ms ease;
    z-index: 30;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 25, 35, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
    z-index: 20;
    display: block;
  }

  .overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
  }

  .main-panel {
    padding: 18px;
  }

  .menu-toggle,
  .topbar,
  .hero-strip {
    display: flex;
  }

  .topbar,
  .hero-strip,
  .topbar__right {
    flex-direction: column;
    align-items: stretch;
  }

  .searchbox input {
    width: 100%;
  }

  .metrics-grid,
  .content-grid {
    grid-template-columns: 1fr;
  }
}
