/* ═══════════════════════════════════════════════════════════
   Krishav Green · Brand Command Center
   Aesthetic: Botanical operations desk — refined, calm, premium
   ═══════════════════════════════════════════════════════════ */

:root {
  --forest: #0a3320;
  --forest-mid: #0f4429;
  --forest-soft: #1a5c38;
  --leaf: #2f8f4e;
  --leaf-bright: #3daa5c;
  --leaf-soft: #e8f5ec;
  --cream: #f6f1e6;
  --cream-2: #efe8d8;
  --paper: #fffcf6;
  --ink: #0d2418;
  --ink-soft: #3d5648;
  --ink-muted: #6b8174;
  --gold: #c4a035;
  --gold-soft: #f8efd4;
  --line: rgba(10, 51, 32, 0.1);
  --line-strong: rgba(10, 51, 32, 0.16);
  --danger: #c0392b;
  --danger-soft: #fdecea;
  --warn: #b7791f;
  --warn-soft: #fff8e8;
  --ok: #1f7a3f;
  --ok-soft: #e9f7ee;
  --shadow-sm: 0 1px 2px rgba(10, 51, 32, 0.04), 0 4px 12px rgba(10, 51, 32, 0.05);
  --shadow: 0 4px 6px rgba(10, 51, 32, 0.03), 0 12px 32px rgba(10, 51, 32, 0.08);
  --shadow-lg: 0 20px 50px rgba(10, 51, 32, 0.12);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --sidebar-w: 272px;
  --font-display: "Fraunces", "Playfair Display", Georgia, serif;
  --font-body: "Outfit", "DM Sans", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

/* Soft botanical paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background-image: radial-gradient(ellipse 80% 50% at 10% -10%, rgba(47, 143, 78, 0.12), transparent 50%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(196, 160, 53, 0.08), transparent 45%),
    radial-gradient(ellipse 50% 40% at 80% 100%, rgba(10, 51, 32, 0.05), transparent 50%);
}

h1,
h2,
h3,
.font-display {
  font-family: var(--font-display);
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: var(--ink);
  margin: 0;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--leaf);
  text-decoration: none;
  font-weight: 500;
}
a:hover {
  text-decoration: underline;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

/* ─── Shell ─────────────────────────────────────────────── */
.app {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ─── Sidebar ───────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: linear-gradient(165deg, var(--forest) 0%, var(--forest-mid) 55%, #0c3d26 100%);
  color: var(--cream);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 4px 0 40px rgba(6, 30, 18, 0.2);
}

.sidebar::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 20% 0%, rgba(61, 170, 92, 0.15), transparent 45%),
    radial-gradient(circle at 90% 90%, rgba(196, 160, 53, 0.08), transparent 40%);
  opacity: 0.9;
}

.sidebar > * {
  position: relative;
  z-index: 1;
}

.sidebar-brand {
  padding: 1.4rem 1.2rem 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.brand-mark {
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.2);
  overflow: hidden;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.brand-mark img {
  width: 86%;
  height: 86%;
  object-fit: contain;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
}

.brand-name .accent {
  color: #7dcf94;
}

.brand-tag {
  margin-top: 0.4rem;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.55;
}

.sidebar-sub {
  margin: 0.9rem 0 0;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  opacity: 0.5;
}

/* Mini progress in sidebar */
.side-progress {
  margin: 1rem 1.1rem 0.25rem;
  padding: 0.85rem 0.9rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.side-progress-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.5rem;
}

.side-progress-top span {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.6;
}

.side-progress-top strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
}

.side-progress .bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.side-progress .bar > i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--leaf-bright), var(--gold));
  transition: width 0.5s var(--ease);
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.85rem 0.75rem;
  flex: 1;
  overflow: auto;
}

.nav-section {
  margin: 0.55rem 0.55rem 0.3rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.35;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  border: 0;
  background: transparent;
  color: rgba(246, 241, 230, 0.78);
  border-radius: 12px;
  padding: 0.68rem 0.8rem;
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-align: left;
  cursor: pointer;
  transition: background 0.18s var(--ease), color 0.18s, transform 0.15s;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.nav-btn.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.nav-btn.active .nav-ico {
  background: var(--leaf);
  color: #fff;
  box-shadow: 0 4px 12px rgba(47, 143, 78, 0.35);
}

.nav-ico {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
  transition: 0.18s var(--ease);
}

.nav-ico svg {
  width: 0.95rem;
  height: 0.95rem;
}

.sidebar-foot {
  padding: 0.9rem 1.15rem 1.15rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  opacity: 0.4;
  line-height: 1.4;
}

/* ─── Main ──────────────────────────────────────────────── */
.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(246, 241, 230, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  padding: 0.7rem 1rem;
  align-items: center;
  justify-content: space-between;
}

.content {
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  padding: 1.75rem 1.5rem 3.5rem;
}

.page {
  display: none;
}

.page.active {
  display: block;
  animation: pageIn 0.4s var(--ease) both;
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ─── Page header ───────────────────────────────────────── */
.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--leaf);
}

.page-title {
  font-size: clamp(1.7rem, 3.2vw, 2.15rem);
  margin: 0;
}

.page-desc {
  margin: 0.55rem 0 0;
  color: var(--ink-muted);
  font-size: 0.95rem;
  line-height: 1.55;
  max-width: 36rem;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ─── Cards & grids ─────────────────────────────────────── */
.grid {
  display: grid;
  gap: 1rem;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.2rem 1.25rem;
  transition: box-shadow 0.2s var(--ease), transform 0.2s var(--ease), border-color 0.2s;
}

.card:hover {
  box-shadow: var(--shadow);
}

.card.flat {
  box-shadow: none;
  background: rgba(255, 252, 246, 0.7);
}

.card.green {
  background: linear-gradient(145deg, #f3faf5, #eaf6ee);
  border-color: rgba(47, 143, 78, 0.18);
}
.card.gold {
  background: linear-gradient(145deg, #fffcf4, var(--gold-soft));
  border-color: rgba(196, 160, 53, 0.25);
}
.card.warn {
  background: var(--warn-soft);
  border-color: rgba(183, 121, 31, 0.25);
}
.card.danger-soft {
  background: var(--danger-soft);
  border-color: rgba(192, 57, 43, 0.18);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 560;
}

.card-ico {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--leaf-soft);
  color: var(--leaf);
  flex-shrink: 0;
}

.card-ico svg {
  width: 1.1rem;
  height: 1.1rem;
}

/* Stats */
.stat {
  position: relative;
  overflow: hidden;
}

.stat::after {
  content: "";
  position: absolute;
  right: -12px;
  top: -12px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(47, 143, 78, 0.06);
  pointer-events: none;
}

.stat-label {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.stat-value {
  margin: 0.4rem 0 0;
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.1;
}

.stat-sub {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: var(--ink-muted);
  line-height: 1.4;
}

/* Hero SKU band */
.hero-band {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.sku-panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  padding: 1.4rem 1.45rem;
  background: linear-gradient(145deg, var(--forest) 0%, var(--forest-soft) 55%, #145a34 100%);
  color: var(--cream);
  box-shadow: var(--shadow);
  min-height: 220px;
}

.sku-panel::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  right: -40px;
  bottom: -50px;
  background: radial-gradient(circle, rgba(125, 207, 148, 0.25), transparent 70%);
  pointer-events: none;
}

.sku-panel::after {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  left: 40%;
  top: -40px;
  background: radial-gradient(circle, rgba(196, 160, 53, 0.18), transparent 70%);
  pointer-events: none;
}

.sku-panel > * {
  position: relative;
  z-index: 1;
}

.sku-kicker {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.55;
}

.sku-title {
  margin: 0.45rem 0 0;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: #fff;
}

.sku-meta {
  margin: 0.4rem 0 0;
  font-size: 0.88rem;
  opacity: 0.7;
}

.sku-prices {
  display: flex;
  align-items: flex-end;
  gap: 1.25rem;
  margin-top: 1.15rem;
}

.sku-prices .mrp {
  font-size: 0.95rem;
  opacity: 0.5;
  text-decoration: line-through;
}

.sku-prices .offer {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 600;
  color: #e8c75a;
  line-height: 1;
}

.sku-chip {
  display: inline-flex;
  align-items: center;
  margin-top: 0.9rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.feature-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.85rem;
}

.feature-pills span {
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.72rem;
  font-weight: 500;
}

/* Pipeline */
.pipeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.pipe-cell {
  text-align: center;
  padding: 1rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--cream-2);
  border: 1px solid var(--line);
}

.pipe-cell strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1;
}

.pipe-cell span {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--ink-muted);
  font-weight: 500;
}

.pipe-cell.ordered {
  background: var(--gold-soft);
  border-color: rgba(196, 160, 53, 0.25);
}
.pipe-cell.received {
  background: var(--ok-soft);
  border-color: rgba(31, 122, 63, 0.2);
}

/* ─── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 999px;
  padding: 0.68rem 1.15rem;
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 0;
  cursor: pointer;
  transition: transform 0.15s var(--ease), background 0.15s, box-shadow 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(180deg, var(--forest-soft), var(--forest));
  color: var(--cream);
  box-shadow: 0 4px 14px rgba(10, 51, 32, 0.25);
}
.btn-primary:hover {
  background: linear-gradient(180deg, var(--leaf), var(--forest-soft));
}

.btn-secondary {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
  border-color: var(--leaf);
  color: var(--leaf);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid transparent;
}
.btn-ghost:hover {
  background: rgba(10, 51, 32, 0.05);
  color: var(--ink);
}

.btn-danger {
  background: var(--danger-soft);
  color: var(--danger);
}
.btn-danger:hover {
  background: #fadbd8;
}

.btn-sm {
  padding: 0.42rem 0.75rem;
  font-size: 0.76rem;
}

.btn-icon {
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border-radius: 10px;
}

/* ─── Forms ─────────────────────────────────────────────── */
.label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.input,
select.input,
textarea.input {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input:focus {
  border-color: var(--leaf);
  box-shadow: 0 0 0 3px rgba(47, 143, 78, 0.15);
}

textarea.input {
  min-height: 5.5rem;
  resize: vertical;
}

.form-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.form-grid .full {
  grid-column: 1 / -1;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 0.9rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.filters .input {
  width: auto;
  min-width: 9.5rem;
  padding: 0.5rem 0.7rem;
  font-size: 0.85rem;
}

.filters .search {
  flex: 1;
  min-width: 12rem;
}

/* ─── Badges ────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: capitalize;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
}

.badge-planned {
  background: rgba(10, 51, 32, 0.07);
  color: var(--ink-soft);
}
.badge-ordered {
  background: var(--gold-soft);
  color: #8a6a12;
}
.badge-received {
  background: var(--ok-soft);
  color: var(--ok);
}
.badge-cancelled {
  background: var(--danger-soft);
  color: var(--danger);
}
.badge-critical {
  background: #fde8e6;
  color: #a93226;
}
.badge-high {
  background: var(--gold-soft);
  color: #8a6a12;
}
.badge-medium {
  background: #e8f1fb;
  color: #1a5276;
}
.badge-low {
  background: rgba(10, 51, 32, 0.06);
  color: var(--ink-muted);
}
.badge-soft {
  background: var(--cream-2);
  color: var(--ink-soft);
}
.badge-soft::before,
.badge-critical::before,
.badge-high::before,
.badge-medium::before,
.badge-low::before {
  display: none;
}

/* ─── Lists / tables ────────────────────────────────────── */
.stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.row-between {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.muted {
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}

table.data {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
  font-size: 0.88rem;
  background: var(--paper);
}

table.data th {
  text-align: left;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: 0.75rem 0.9rem;
  background: var(--cream-2);
  border-bottom: 1px solid var(--line);
  font-weight: 700;
}

table.data td {
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

table.data tr:last-child td {
  border-bottom: 0;
}

table.data tr:hover td {
  background: rgba(232, 245, 236, 0.45);
}

/* Progress */
.progress {
  height: 0.55rem;
  background: rgba(10, 51, 32, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.progress > span,
.progress > i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--leaf), var(--leaf-bright));
  transition: width 0.45s var(--ease);
}

/* Checklist */
.checklist-item {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.checklist-item.done {
  opacity: 0.62;
}

.checklist-item.done h3 {
  text-decoration: line-through;
  text-decoration-color: rgba(10, 51, 32, 0.3);
}

.check-btn {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 8px;
  border: 2px solid rgba(10, 51, 32, 0.2);
  background: #fff;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 0.1rem;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 0.75rem;
  transition: 0.15s var(--ease);
}

.check-btn:hover {
  border-color: var(--leaf);
}

.check-btn.on {
  background: var(--leaf);
  border-color: var(--leaf);
  box-shadow: 0 4px 10px rgba(47, 143, 78, 0.3);
}

/* Pills / tabs */
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.pill {
  border: 1px solid var(--line-strong);
  background: var(--paper);
  border-radius: 999px;
  padding: 0.42rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink-soft);
  transition: 0.15s var(--ease);
}

.pill:hover {
  border-color: var(--leaf);
  color: var(--leaf);
}

.pill.active {
  background: var(--forest);
  color: var(--cream);
  border-color: var(--forest);
  box-shadow: 0 4px 12px rgba(10, 51, 32, 0.2);
}

/* Steps */
.step {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: var(--cream-2);
  border-radius: var(--radius-sm);
  padding: 0.8rem 0.9rem;
  font-size: 0.9rem;
  border: 1px solid var(--line);
}

.step-num {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  background: var(--forest);
  color: var(--cream);
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* Alerts */
.alert {
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  font-size: 0.9rem;
  line-height: 1.5;
  border: 1px solid transparent;
}

.alert-warn {
  background: var(--warn-soft);
  border-color: rgba(183, 121, 31, 0.22);
  color: #6b4a0e;
}

.alert-info {
  background: var(--leaf-soft);
  border-color: rgba(47, 143, 78, 0.2);
  color: var(--forest);
}

.alert strong {
  font-weight: 700;
}

/* Pre / copy */
.pre {
  white-space: pre-wrap;
  background: var(--cream-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1rem;
  font-size: 0.78rem;
  line-height: 1.55;
  max-height: 18rem;
  overflow: auto;
  font-family: "JetBrains Mono", ui-monospace, Consolas, monospace;
  color: var(--ink-soft);
}

/* Colour swatches */
.color-swatch {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.color-swatch .chip {
  height: 3.6rem;
}
.color-swatch .meta {
  background: var(--paper);
  padding: 0.55rem 0.65rem;
}

/* Timeline */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline-row {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
}

.timeline-row:last-child {
  border-bottom: 0;
}

.timeline-day {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--leaf);
  background: var(--leaf-soft);
  border-radius: 999px;
  padding: 0.25rem 0.5rem;
  text-align: center;
  height: fit-content;
}

/* Purchase card */
.purchase-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: start;
}

.purchase-card .meta-line {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.purchase-card .amount {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}

.purchase-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
  margin-top: 0.55rem;
}

/* Margin result cards */
.margin-card .profit {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  margin: 0.35rem 0 0;
  line-height: 1;
}
.margin-card .profit.pos {
  color: var(--ok);
}
.margin-card .profit.neg {
  color: var(--danger);
}

.margin-rows {
  margin-top: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.margin-rows div {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px dashed var(--line);
}

/* Empty state */
.empty {
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: var(--ink-muted);
}

.empty strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--ink);
  margin-bottom: 0.35rem;
}

/* Toast */
.toast-host {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: var(--forest);
  color: var(--cream);
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.35s var(--ease);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Overlay / drawer */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 30, 18, 0.45);
  backdrop-filter: blur(3px);
  z-index: 40;
  display: none;
  opacity: 0;
  transition: opacity 0.2s;
}

.overlay.open {
  display: block;
  opacity: 1;
}

.drawer {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: min(18.5rem, 88vw);
  background: linear-gradient(165deg, var(--forest), var(--forest-mid));
  color: var(--cream);
  z-index: 50;
  transform: translateX(-105%);
  transition: transform 0.28s var(--ease);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}

.drawer.open {
  transform: translateX(0);
}

.icon-btn {
  border: 1px solid var(--line-strong);
  background: var(--paper);
  border-radius: 12px;
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 1.1rem;
  box-shadow: var(--shadow-sm);
}

.hidden {
  display: none !important;
}

.mt-1 {
  margin-top: 0.35rem;
}
.mt-2 {
  margin-top: 0.75rem;
}
.mt-3 {
  margin-top: 1.1rem;
}
.mt-4 {
  margin-top: 1.5rem;
}
.mb-0 {
  margin-bottom: 0;
}

/* Action tiles (export) */
.tile-btn {
  text-align: left;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: 0.2s var(--ease);
  width: 100%;
}

.tile-btn:hover {
  border-color: var(--leaf);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.tile-btn .tile-ico {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--leaf-soft);
  color: var(--leaf);
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

.tile-btn.danger:hover {
  border-color: var(--danger);
}

/* Responsive */
@media (max-width: 1100px) {
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero-band {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .sidebar {
    display: none;
  }
  .topbar {
    display: flex;
  }
  .grid-2,
  .grid-3,
  .form-grid {
    grid-template-columns: 1fr;
  }
  .content {
    padding: 1.15rem 1rem 2.75rem;
  }
  .pipeline {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .grid-4 {
    grid-template-columns: 1fr;
  }
  .purchase-card {
    grid-template-columns: 1fr;
  }
  .purchase-card .amount,
  .purchase-actions {
    text-align: left;
    justify-content: flex-start;
  }
  .page-head {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Focus visible for a11y */
:focus-visible {
  outline: 2px solid var(--leaf);
  outline-offset: 2px;
}

button:focus:not(:focus-visible) {
  outline: none;
}

/* Scrollbar */
.nav::-webkit-scrollbar,
.pre::-webkit-scrollbar {
  width: 6px;
}
.nav::-webkit-scrollbar-thumb,
.pre::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
}

/* Licences page */
.license-card { border-left: 4px solid var(--leaf); }
.license-card .fee-box {
  display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0.85rem 0 0;
}
.license-card .fee-pill {
  background: var(--leaf-soft); color: var(--forest); border-radius: 999px;
  padding: 0.4rem 0.85rem; font-size: 0.82rem; font-weight: 700;
}
.license-card .fee-pill.gov { background: var(--gold-soft); color: #6b4a0e; }
.license-card ol.steps {
  margin: 0.75rem 0 0; padding-left: 1.2rem; color: var(--ink-soft);
  line-height: 1.75; font-size: 0.92rem;
}
.license-card .docs {
  margin-top: 0.75rem; display: flex; flex-wrap: wrap; gap: 0.4rem;
}
.license-card .docs span {
  background: var(--cream-2); border: 1px solid var(--line); border-radius: 999px;
  padding: 0.28rem 0.65rem; font-size: 0.75rem; font-weight: 600; color: var(--ink-soft);
}
.license-card .portal {
  display: inline-flex; margin-top: 0.85rem; font-size: 0.82rem; font-weight: 700;
}
.src-note { font-size: 0.75rem; color: var(--ink-muted); margin-top: 0.5rem; }

/* ─── Circular progress rings ───────────────────────────── */
.ring {
  flex-shrink: 0;
  display: block;
}
.ring-bg {
  stroke: rgba(10, 51, 32, 0.1);
}
.ring-fg {
  stroke: url(#kgRingGrad);
  transition: stroke-dashoffset 0.7s var(--ease);
}
.ring-text {
  font-family: var(--font-display);
  font-weight: 600;
  fill: var(--ink);
  letter-spacing: -0.02em;
}

.ring-stat {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.ring-stat::after {
  display: none; /* drop the decorative corner blob for ring layout */
}
.ring-stat-body {
  min-width: 0;
}
.ring-stat .stat-sub {
  margin-top: 0.15rem;
}

/* Checklist overview header */
.checklist-overview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.25rem;
  flex-wrap: wrap;
}
.checklist-overview .co-left {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}
.checklist-overview .co-toggle {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  white-space: nowrap;
}

/* Count badge on phase filter pills */
.pill-count {
  margin-left: 0.45rem;
  font-size: 0.72em;
  font-weight: 700;
  opacity: 0.55;
  font-variant-numeric: tabular-nums;
}
.pill.active .pill-count {
  opacity: 0.85;
}
.pill-complete {
  border-color: rgba(47, 143, 78, 0.45);
  color: var(--ok);
  background: var(--ok-soft);
}
.pill-complete .pill-count {
  opacity: 0.8;
}
.pill-complete::before {
  content: "✓ ";
  font-weight: 800;
}
.pill-complete.active {
  background: var(--forest);
  color: var(--cream);
  border-color: var(--forest);
}

/* ─── Sales & Meta-ad planner ───────────────────────────── */
.pl-slider {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.pl-slabel {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}
.pl-slabel span {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.pl-slabel strong {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
}

.range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(10, 51, 32, 0.1);
  outline: none;
  cursor: pointer;
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--paper);
  border: 3px solid var(--leaf);
  box-shadow: 0 2px 8px rgba(10, 51, 32, 0.25);
  cursor: pointer;
  transition: transform 0.12s var(--ease);
}
.range::-webkit-slider-thumb:hover {
  transform: scale(1.14);
}
.range::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--paper);
  border: 3px solid var(--leaf);
  box-shadow: 0 2px 8px rgba(10, 51, 32, 0.25);
  cursor: pointer;
}

.pl-hero {
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--line);
}
.pl-hero.profit {
  background: linear-gradient(145deg, #f3faf5, #eaf6ee);
  border-color: rgba(47, 143, 78, 0.22);
}
.pl-hero.ads {
  background: linear-gradient(145deg, #eef4fb, #e4edf8);
  border-color: rgba(59, 111, 176, 0.22);
}
.pl-hero-val {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0.3rem 0 0;
}
.pl-hero.profit .pl-hero-val {
  color: var(--ok);
}
.pl-hero.ads .pl-hero-val {
  color: #2f6fb3;
}

.pl-bar {
  display: flex;
  height: 30px;
  margin-top: 1rem;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(10, 51, 32, 0.06);
  box-shadow: inset 0 0 0 1px var(--line);
}
.pl-seg {
  height: 100%;
  transition: width 0.35s var(--ease);
}
.pl-seg.cogs {
  background: #6b8174;
}
.pl-seg.fees {
  background: var(--gold);
}
.pl-seg.ads {
  background: #3b6fb0;
}
.pl-seg.profit {
  background: var(--leaf);
}

.pl-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.1rem;
  font-size: 0.8rem;
  color: var(--ink-soft);
}
.pl-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
}
.pl-legend i {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  display: inline-block;
  flex-shrink: 0;
}

.pl-stat {
  padding: 0.85rem 0.95rem;
}
.pl-stat-val {
  margin: 0.25rem 0 0;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.1;
}

/* Editable Meta budget input under the reinvest slider */
.pl-budget {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.7rem;
  margin-top: 0.75rem;
}
.pl-budget label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.pl-budget .input {
  width: 8.5rem;
  padding: 0.5rem 0.7rem;
}
.pl-budget .muted {
  font-size: 0.78rem;
}

/* Investment payback callout */
.pl-payback {
  margin-top: 1rem;
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  border: 1px solid var(--line);
  background: var(--cream-2);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem 1.25rem;
}
.pl-payback .stat-sub {
  margin: 0;
  max-width: 34rem;
}
.pl-payback-val {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0.15rem 0 0;
  color: var(--ink);
}
.pl-payback.ok {
  background: linear-gradient(145deg, #f3faf5, #eaf6ee);
  border-color: rgba(47, 143, 78, 0.22);
}
.pl-payback.ok .pl-payback-val {
  color: var(--ok);
}
.pl-payback.bad {
  background: var(--warn-soft);
  border-color: rgba(183, 121, 31, 0.25);
}
.pl-payback.bad .pl-payback-val {
  color: var(--warn);
}
.linklike {
  border: 0;
  background: none;
  padding: 0;
  color: var(--leaf);
  font-weight: 600;
  font-size: inherit;
  cursor: pointer;
  text-decoration: underline;
}

/* Checklist investment total in the overview header */
.co-invest {
  flex: 0 1 auto;
}
@media (min-width: 780px) {
  .co-invest {
    padding-left: 1.25rem;
    border-left: 1px solid var(--line);
  }
}

/* Per-item actual-cost input on the checklist */
.cl-cost-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.85rem;
}
.cl-est {
  font-size: 0.75rem;
  color: var(--ink-muted);
}
.cl-cost {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.cl-cost > span {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.cl-cost .input {
  width: 6.5rem;
  padding: 0.45rem 0.6rem;
}
