:root {
  --warm-50: #FFFBF5;
  --warm-100: #FFF5E6;
  --warm-200: #FFE8C2;
  --warm-300: #FFD699;
  --warm-400: #F5A623;
  --warm-500: #E8941A;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --green-500: #22c55e;
  --green-50: #f0fdf4;
  --blue-500: #3b82f6;
  --blue-50: #eff6ff;
  --purple-500: #8b5cf6;
  --purple-50: #f5f3ff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --bg: #FFFBF5;
  --card-bg: #ffffff;
  --radius: 16px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', -apple-system, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'DM Serif Display', serif;
  font-weight: 400;
  line-height: 1.2;
  color: var(--slate-900);
}

a { color: inherit; }

/* Layout */
.shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  border-right: 1px solid var(--border);
  background: rgba(255, 251, 245, 0.85);
  backdrop-filter: blur(16px);
  padding: 18px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.brand a {
  text-decoration: none;
  font-family: 'DM Serif Display', serif;
  font-size: 1.5rem;
  color: var(--warm-500);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--border);
  background: white;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  cursor: pointer;
  color: var(--text-muted);
}

.nav {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.nav a {
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--text-muted);
  font-weight: 600;
  border: 1px solid transparent;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-badge {
  background: var(--warm-400);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 100px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  line-height: 1;
}

.nav-badge.leads {
  background: rgba(59, 130, 246, 0.85);
}

.streak-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.streak-flame {
  font-size: 1rem;
  line-height: 1;
}

.streak-count {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--warm-500);
}

.streak-label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.streak-nudge {
  width: 100%;
  font-size: 0.75rem;
  color: var(--warm-600, #b45309);
  margin-top: 4px;
  line-height: 1.4;
}

.nav a.active {
  background: white;
  border-color: var(--warm-200);
  color: var(--slate-900);
  box-shadow: 0 8px 26px rgba(0,0,0,0.06);
}

.nav a:hover {
  background: var(--warm-50);
  border-color: var(--warm-200);
  color: var(--slate-900);
}

.sidebar-card {
  margin-top: 18px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 14px;
}

.sidebar-card .label {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.sidebar-card .value {
  font-weight: 800;
  color: var(--slate-900);
  margin-top: 4px;
}

.main {
  padding: 28px;
}

.content {
  padding: 0 0 80px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

/* Topbar text (used on /dashboard/) */
.date {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 700;
}

.greeting {
  margin: 6px 0 0;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.subtitle {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-family: 'DM Sans', -apple-system, sans-serif;
  font-weight: 600;
}

/* Legacy title block (used on other dashboard pages) */
.title h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.title p {
  margin: 8px 0 0;
  color: var(--text-muted);
}

/* Stat cards (used on /dashboard/) */
.stat-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 14px;
}

.stat-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

.stat-label {
  color: var(--text-muted);
  font-weight: 800;
  font-size: 0.85rem;
}

.stat-value {
  margin-top: 8px;
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--slate-900);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(34,197,94,0.18);
  background: var(--green-50);
  color: var(--green-500);
  font-weight: 800;
  font-size: 0.8rem;
}

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

.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 16px;
}

.card .kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.85rem;
}

.card .big {
  font-size: 1.7rem;
  font-weight: 900;
  color: var(--slate-900);
  margin-top: 6px;
}

.card p {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.section {
  margin-top: 18px;
}

.section h2 {
  margin: 0 0 10px;
  font-size: 1.35rem;
}

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

.section-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

.live-feed {
  display: grid;
  gap: 10px;
}

.feed-item {
  display: flex;
  gap: 12px;
  padding: 12px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: white;
}

.feed-dot {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex: 0 0 auto;
}

.dot-blue { background: var(--blue-50); color: var(--blue-500); }
.dot-green { background: var(--green-50); color: var(--green-500); }
.dot-purple { background: var(--purple-50); color: var(--purple-500); }
.dot-warm { background: var(--warm-100); color: var(--warm-500); }

.feed-item .line1 { font-weight: 800; color: var(--slate-900); }
.feed-item .line2 { color: var(--text-muted); font-size: 0.9rem; margin-top: 2px; }

.feed-item-button {
  width: 100%;
  text-align: left;
  appearance: none;
  cursor: pointer;
  font: inherit;
}

.feed-item-button:hover {
  border-color: var(--warm-200);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

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

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 18px;
}

.workspace-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.workspace-card {
  display: block;
  text-decoration: none;
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.workspace-card:hover {
  border-color: var(--warm-200);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}

.workspace-label {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.workspace-value {
  margin-top: 8px;
  color: var(--slate-900);
  font-size: 1.25rem;
  font-weight: 900;
}

.workspace-sub {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.action {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.action .left {
  display: grid;
  gap: 2px;
}

.action .left .title {
  font-weight: 900;
  color: var(--slate-900);
}

.action .left .sub {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.btn {
  appearance: none;
  border: 1px solid var(--border);
  background: white;
  color: var(--slate-900);
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 800;
  cursor: pointer;
}

.btn.primary {
  background: var(--warm-400);
  color: white;
  border-color: transparent;
  box-shadow: 0 2px 12px rgba(245,166,35,0.25);
}

.btn.primary:hover { background: var(--warm-500); }
.btn:hover { background: var(--warm-50); border-color: var(--warm-200); }
.btn.small { padding: 8px 12px; font-size: 0.82rem; }

.host-grid,
.artifact-list,
.work-list,
.channel-list {
  display: grid;
  gap: 12px;
}

.host-card,
.artifact-card,
.work-item,
.channel-row {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: white;
  padding: 14px;
}

.artifact-head,
.work-head,
.channel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.artifact-body,
.work-body {
  margin-top: 10px;
}

.artifact-body {
  max-height: 240px;
  overflow: auto;
  border-radius: 12px;
  background: var(--warm-50);
  border: 1px solid var(--warm-100);
  padding: 14px;
}

.work-item .meta,
.channel-row .meta,
.artifact-meta,
.host-card .meta {
  color: var(--text-muted);
  font-size: 0.84rem;
}

.empty-state {
  border: 1px dashed var(--border);
  border-radius: 14px;
  padding: 18px;
  color: var(--text-muted);
  background: var(--warm-50);
}

.split-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.link-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--warm-500);
  font-weight: 700;
  text-decoration: none;
}

.link-row:hover { color: var(--warm-400); }

.markdown {
  color: var(--text);
  line-height: 1.7;
}

.markdown h1,
.markdown h2,
.markdown h3 {
  font-family: 'DM Serif Display', serif;
  font-weight: 400;
  margin: 0 0 10px;
  color: var(--slate-900);
}

.markdown h1 { font-size: 1.45rem; }
.markdown h2 { font-size: 1.2rem; margin-top: 18px; }
.markdown h3 { font-size: 1rem; margin-top: 14px; }
.markdown p { margin: 0 0 10px; }
.markdown ul,
.markdown ol { margin: 0 0 12px 18px; }
.markdown li { margin: 0 0 6px; }
.markdown code {
  background: rgba(15, 23, 42, 0.06);
  border-radius: 8px;
  padding: 2px 6px;
}

.draft-directory {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.directory-item {
  display: block;
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: white;
  padding: 14px;
}

.directory-item:hover {
  border-color: var(--warm-200);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.directory-kicker {
  color: var(--warm-500);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.draft-stack,
.work-section {
  display: grid;
  gap: 14px;
}

.draft-page-body,
.playbook-page-body {
  max-width: 820px;
}

.page-section-title {
  margin: 0;
  font-size: 1.35rem;
}

.detail-hero {
  padding: 18px;
  border: 1px solid var(--warm-200);
  border-radius: 18px;
  background: linear-gradient(180deg, var(--warm-50), white);
  margin-bottom: 16px;
}

.detail-hero p {
  margin: 10px 0 0;
  font-size: 1.02rem;
  color: var(--slate-800);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.detail-panel {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  background: white;
}

.panel-kicker {
  color: var(--warm-500);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.detail-section + .detail-section,
.detail-panel + .detail-panel {
  margin-top: 14px;
}

.detail-bullets {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.detail-bullets.ordered {
  padding-left: 22px;
}

.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.checkbox {
  width: 20px;
  height: 20px;
  border-radius: 7px;
  border: 1px solid var(--warm-300);
  background: white;
  color: var(--warm-500);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 900;
  flex: 0 0 auto;
}

.checklist li.checked .checkbox {
  background: var(--warm-400);
  color: white;
  border-color: transparent;
}

.detail-article .lede {
  font-size: 1.02rem;
  color: var(--slate-800);
}

.draft-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.draft-tab {
  appearance: none;
  border: 1px solid var(--border);
  background: white;
  color: var(--text-muted);
  border-radius: 999px;
  padding: 10px 14px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.draft-tab.active {
  background: var(--warm-100);
  border-color: var(--warm-300);
  color: var(--slate-900);
}

.draft-tab-count {
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
}

.draft-panel {
  display: none;
}

.draft-panel.active {
  display: block;
}

.draft-list,
.support-inbox {
  display: grid;
  gap: 12px;
}

.draft-row,
.support-row {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: white;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
}

.draft-row-main,
.support-row {
  appearance: none;
  font: inherit;
  text-align: left;
  color: inherit;
  background: white;
  cursor: pointer;
}

.draft-row-main {
  border: 0;
  padding: 0;
  flex: 1;
}

.draft-row-actions,
.support-row-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.work-item-button {
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
  appearance: none;
}

.work-item-button:hover,
.support-row:hover,
.draft-row:hover {
  border-color: var(--warm-200);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.email-preview {
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  background: white;
}

.email-preview-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  background: var(--warm-50);
}

.email-preview-body {
  padding: 18px 16px;
  white-space: pre-wrap;
  font-family: 'DM Sans', -apple-system, sans-serif;
}

.support-request-meta {
  display: grid;
  gap: 8px;
}

.detail-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 3000;
}

.detail-modal-backdrop.open { display: flex; }

.detail-modal {
  width: min(680px, 100%);
  max-height: min(80vh, 760px);
  overflow: auto;
  background: white;
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}

.detail-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.detail-modal-header h2 {
  margin: 6px 0 0;
  font-size: 1.45rem;
}

.detail-modal-kicker {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.detail-modal-close {
  appearance: none;
  border: 1px solid var(--border);
  background: white;
  border-radius: 12px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1.5rem;
}

.detail-modal-body {
  padding: 20px;
}

.detail-modal-actions {
  padding: 0 20px 20px;
}

.detail-actions-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.modal-inline-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
}

.modal-inline-form input {
  flex: 1 1 220px;
}

body.modal-open {
  overflow: hidden;
}

/* Tables */
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: white;
}

.table th {
  text-align: left;
  padding: 12px 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.table td {
  padding: 12px 12px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  font-size: 0.95rem;
}

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

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 900;
  border: 1px solid var(--border);
}

.badge.new { background: var(--blue-50); color: var(--blue-500); border-color: rgba(59,130,246,0.2); }
.badge.contacted { background: var(--warm-100); color: var(--warm-500); border-color: rgba(245,166,35,0.25); }
.badge.responded { background: var(--purple-50); color: var(--purple-500); border-color: rgba(139,92,246,0.25); }
.badge.converted { background: var(--green-50); color: var(--green-500); border-color: rgba(34,197,94,0.25); }
.badge.ready { background: var(--green-50); color: var(--green-500); border-color: rgba(34,197,94,0.25); }
.badge.draft { background: var(--warm-100); color: var(--warm-500); border-color: rgba(245,166,35,0.25); }
.badge.live { background: var(--blue-50); color: var(--blue-500); border-color: rgba(59,130,246,0.2); }
.badge.blocked { background: rgba(239,68,68,0.08); color: #b91c1c; border-color: rgba(239,68,68,0.16); }

/* Forms */
.form {
  display: grid;
  gap: 12px;
}

.row {
  display: grid;
  gap: 6px;
}

label {
  font-size: 0.85rem;
  font-weight: 900;
  color: var(--slate-800);
}

input, select {
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 1rem;
  font-family: 'DM Sans', -apple-system, sans-serif;
  outline: none;
}

input:focus, select:focus {
  border-color: var(--warm-300);
  box-shadow: 0 0 0 4px rgba(245,166,35,0.15);
}

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

/* Toast */
.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 2000;
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.12);
  display: none;
  font-weight: 800;
}

.toast.open { display: block; }
.toast.ok { border-color: rgba(34,197,94,0.25); }

/* Approval inbox */
.approval-section .approval-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 22px;
  padding: 0 8px;
  margin-left: 6px;
  border-radius: 999px;
  background: var(--warm-400);
  color: white;
  font-family: 'DM Sans', -apple-system, sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  vertical-align: middle;
}

.approval-list {
  display: grid;
  gap: 12px;
}

.approval-card {
  background: white;
  border: 1px solid var(--warm-200);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(245, 166, 35, 0.08);
}

.approval-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.approval-kicker {
  color: var(--warm-500);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.approval-title {
  display: block;
  color: var(--slate-900);
  font-size: 1.02rem;
}

.approval-preview {
  margin: 10px 0 14px;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.approval-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.edit-content-textarea {
  width: 100%;
  min-height: 220px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font-family: 'DM Sans', -apple-system, sans-serif;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--slate-900);
  resize: vertical;
  outline: none;
}

.edit-content-textarea:focus {
  border-color: var(--warm-300);
  box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.15);
}

/* Today strip */
.today-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.today-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.today-label {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.35;
}

.today-value {
  margin-top: 6px;
  font-family: 'DM Serif Display', serif;
  font-size: 2rem;
  color: var(--slate-900);
}

/* Receipts page */
.receipts-group + .receipts-group {
  margin-top: 22px;
}

.receipts-group-header {
  font-family: 'DM Sans', -apple-system, sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.receipts-list {
  display: grid;
  gap: 10px;
}

.receipt-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}

.receipt-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 12px;
  background: var(--warm-100);
  color: var(--warm-500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.receipt-body {
  flex: 1;
  min-width: 0;
}

.receipt-headline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
  color: var(--slate-900);
  font-size: 0.98rem;
}

.receipt-headline strong {
  color: var(--slate-900);
  text-transform: capitalize;
}

.receipt-arrow {
  color: var(--warm-500);
  font-weight: 900;
}

.receipt-summary {
  color: var(--text);
}

.receipt-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.receipt-external {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.05);
  color: var(--text-muted);
}

/* Milestone tracker */
.milestone-track {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.milestone-item {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  text-align: center;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.milestone-item.done {
  border-color: rgba(34, 197, 94, 0.35);
  background: var(--green-50);
}

.milestone-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  margin-bottom: 8px;
  border: 2px solid var(--border);
  background: white;
  color: var(--text-muted);
}

.milestone-item.done .milestone-icon {
  border-color: var(--green-500);
  background: var(--green-500);
  color: white;
}

.milestone-label {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-muted);
}

.milestone-item.done .milestone-label {
  color: var(--green-500);
}

.milestone-progress {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--warm-500);
  white-space: nowrap;
}

/* Responsive */
@media (max-width: 980px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .workspace-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: 1fr; }
  .today-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .milestone-track { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 16px;
    height: auto;
    border-radius: 18px;
    border: 1px solid var(--border);
    box-shadow: 0 20px 60px rgba(0,0,0,0.16);
    display: none;
    z-index: 100;
  }
  .sidebar.open { display: block; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .main { padding: 16px; overflow-x: hidden; }
  .main > * { max-width: 100%; }
  .content { padding: 0 0 90px; }
  .topbar { align-items: flex-start; }
}

@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .main { padding: 14px; padding-bottom: 0; overflow-x: hidden; }
  .content { padding: 0 0 90px; }
  .stat-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-card { padding: 12px; }
  .stat-value { font-size: 1.4rem; }
  .topbar { margin-bottom: 12px; }
  .greeting { font-size: 1.6rem !important; }
  .feed-item { padding: 10px; gap: 10px; }
  .feed-dot { width: 30px; height: 30px; font-size: 0.85rem; }
  .action { padding: 12px; }
  .live-feed { display: grid; gap: 8px; }
  .workspace-grid { grid-template-columns: 1fr; }
  .milestone-track { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .artifact-head,
  .work-head,
  .channel-head,
  .split-actions,
  .section-header,
  .detail-modal-header,
  .draft-row,
  .support-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .draft-row-actions,
  .support-row-meta {
    justify-content: flex-start;
  }
  .detail-actions-row,
  .modal-inline-form {
    flex-direction: column;
    align-items: stretch;
  }
  .today-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .today-card { padding: 12px; }
  .today-value { font-size: 1.6rem; }
  .approval-head { flex-direction: column; align-items: flex-start; }
  .approval-actions .btn { flex: 1; min-width: 0; }
  .receipt-row { flex-direction: row; }
  .receipt-headline { font-size: 0.95rem; }
}
