/* Gliss Chorus Brand Palette */
:root {
  --bone: #F6F3EF;
  --soft-cream: #FBF8F3;
  --warm-paper: #EFE7DD;
  --sandstone: #E6D1C0;
  --soft-taupe: #BDA18F;
  --stone-black: #2F2A26;
  --burnt-sienna: #B94F3A;
  --rose-clay: #B46C7E;
  --soft-clay: #D1A08B;

  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-card: 0 1px 4px rgba(47,42,38,0.06), 0 2px 12px rgba(47,42,38,0.04);
  --shadow-hover: 0 2px 8px rgba(47,42,38,0.10), 0 4px 16px rgba(47,42,38,0.06);
}

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

html { font-size: 15px; }

body {
  font-family: var(--font-sans);
  background: var(--bone);
  color: var(--stone-black);
  min-height: 100vh;
  line-height: 1.55;
}

/* --- Header --- */
.dash-header {
  background: var(--soft-cream);
  border-bottom: 1px solid var(--sandstone);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: baseline;
  gap: 1rem;
}

.wordmark {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.35em;
  color: var(--stone-black);
}

.header-subtitle {
  font-size: 0.78rem;
  color: var(--soft-taupe);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* --- Tabs --- */
.tab-nav {
  display: flex;
  gap: 0.25rem;
}

.tab-btn {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border: none;
  background: transparent;
  color: var(--soft-taupe);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--stone-black);
  background: var(--warm-paper);
}

.tab-btn.active {
  color: var(--burnt-sienna);
  background: var(--warm-paper);
}

/* --- Main --- */
main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem 2rem 3rem;
}

.loading-state {
  text-align: center;
  padding: 4rem;
  color: var(--soft-taupe);
  font-size: 1rem;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* --- Overview --- */
.overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.card {
  background: var(--soft-cream);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-card);
}

.card-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--stone-black);
}

.card-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--soft-taupe);
  margin-bottom: 0.35rem;
}

.card-full { grid-column: 1 / -1; }

.north-star-text {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--burnt-sienna);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.positioning {
  font-size: 0.88rem;
  color: var(--stone-black);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.lean-moves {
  list-style: none;
  counter-reset: lean;
}

.lean-moves li {
  counter-increment: lean;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--warm-paper);
  font-size: 0.85rem;
  line-height: 1.5;
}

.lean-moves li::before {
  content: counter(lean);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--burnt-sienna);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  margin-right: 0.6rem;
  flex-shrink: 0;
}

.lean-moves li:last-child { border-bottom: none; }

/* Budget tiers */
.budget-tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.tier-card {
  background: var(--warm-paper);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
}

.tier-name {
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--burnt-sienna);
  margin-bottom: 0.3rem;
}

.tier-desc {
  font-size: 0.78rem;
  color: var(--stone-black);
  line-height: 1.45;
}

.reality-check {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  color: var(--soft-taupe);
  font-style: italic;
}

/* --- Progress Bars --- */
.progress-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.progress-item {
  background: var(--warm-paper);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
}

.progress-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--stone-black);
  margin-bottom: 0.35rem;
  display: flex;
  justify-content: space-between;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--sandstone);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--burnt-sienna);
  border-radius: 4px;
  transition: width 0.4s ease;
}

.progress-fill.green { background: #6B9E6B; }
.progress-fill.rose { background: var(--rose-clay); }

/* --- Setup checklist --- */
.setup-section { margin-bottom: 1.5rem; }

.setup-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 2px solid var(--sandstone);
  margin-bottom: 0.5rem;
  cursor: pointer;
}

.setup-category-name {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
}

.setup-category-count {
  font-size: 0.78rem;
  color: var(--soft-taupe);
  font-weight: 500;
}

.task-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid var(--warm-paper);
  transition: background 0.12s ease;
}

.task-item:hover {
  background: var(--warm-paper);
  border-radius: var(--radius-sm);
}

.task-item.checked .task-title {
  text-decoration: line-through;
  color: var(--soft-taupe);
}

.task-checkbox {
  width: 18px;
  height: 18px;
  border: 2px solid var(--sandstone);
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  background: var(--soft-cream);
}

.task-checkbox.checked {
  background: var(--burnt-sienna);
  border-color: var(--burnt-sienna);
}

.task-checkbox.checked::after {
  content: '';
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-top: -2px;
}

.task-info { flex: 1; min-width: 0; }

.task-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--stone-black);
  margin-bottom: 0.15rem;
}

.task-desc {
  font-size: 0.78rem;
  color: var(--soft-taupe);
  line-height: 1.45;
}

.task-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  margin-left: 0.5rem;
}

.badge-high {
  background: rgba(185, 79, 58, 0.12);
  color: var(--burnt-sienna);
}

.badge-medium {
  background: rgba(209, 160, 139, 0.25);
  color: #8B6F5D;
}

.badge-low {
  background: rgba(189, 161, 143, 0.2);
  color: var(--soft-taupe);
}

.est-minutes {
  font-size: 0.7rem;
  color: var(--rose-clay);
  font-weight: 600;
  white-space: nowrap;
  margin-left: 0.5rem;
}

/* --- Cadence section --- */
.cadence-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.cadence-tab {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.45rem 1.2rem;
  border: 2px solid var(--sandstone);
  background: transparent;
  color: var(--stone-black);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.cadence-tab.active {
  background: var(--burnt-sienna);
  border-color: var(--burnt-sienna);
  color: white;
}

.cadence-tab:hover:not(.active) {
  border-color: var(--soft-taupe);
}

.reset-btn {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--sandstone);
  background: var(--soft-cream);
  color: var(--soft-taupe);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  margin-left: auto;
}

.reset-btn:hover {
  border-color: var(--burnt-sienna);
  color: var(--burnt-sienna);
}

.cadence-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

/* --- Kanban --- */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  min-height: 400px;
}

.kanban-column {
  background: var(--warm-paper);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  min-height: 300px;
}

.kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0.4rem 0.6rem;
  border-bottom: 2px solid var(--sandstone);
  margin-bottom: 0.5rem;
}

.kanban-col-title {
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--stone-black);
}

.kanban-col-count {
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--sandstone);
  color: var(--stone-black);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kanban-cards {
  min-height: 60px;
}

.kanban-card {
  background: var(--soft-cream);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.5rem;
  box-shadow: var(--shadow-card);
  cursor: grab;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
  border-left: 3px solid transparent;
}

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

.kanban-card.sortable-ghost {
  opacity: 0.4;
  transform: rotate(2deg);
}

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

.kanban-card[data-priority="high"] {
  border-left-color: var(--burnt-sienna);
}

.kanban-card[data-priority="medium"] {
  border-left-color: var(--soft-clay);
}

.kanban-card[data-priority="low"] {
  border-left-color: var(--sandstone);
}

.kanban-card-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--stone-black);
  margin-bottom: 0.3rem;
  line-height: 1.35;
}

.kanban-card-desc {
  font-size: 0.72rem;
  color: var(--soft-taupe);
  line-height: 1.4;
  margin-bottom: 0.4rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kanban-card-footer {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.phase-badge {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.12rem 0.4rem;
  border-radius: 3px;
  background: rgba(180, 108, 126, 0.12);
  color: var(--rose-clay);
}

.phase-badge.pre-launch { background: rgba(185, 79, 58, 0.10); color: var(--burnt-sienna); }
.phase-badge.launch { background: rgba(107, 158, 107, 0.15); color: #5A8A5A; }
.phase-badge.growth { background: rgba(180, 108, 126, 0.12); color: var(--rose-clay); }
.phase-badge.custom { background: rgba(189, 161, 143, 0.2); color: var(--soft-taupe); }

.kanban-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  width: 100%;
  padding: 0.5rem;
  border: 2px dashed var(--sandstone);
  background: transparent;
  color: var(--soft-taupe);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius-sm);
  margin-top: 0.5rem;
  transition: all 0.15s ease;
}

.kanban-add-btn:hover {
  border-color: var(--burnt-sienna);
  color: var(--burnt-sienna);
}

/* --- Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(47, 42, 38, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.modal {
  background: var(--soft-cream);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  width: 420px;
  max-width: 90vw;
  box-shadow: 0 8px 32px rgba(47,42,38,0.15);
}

.modal h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  margin-bottom: 1rem;
}

.modal label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--soft-taupe);
  margin-bottom: 0.25rem;
  margin-top: 0.75rem;
}

.modal input,
.modal textarea,
.modal select {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--sandstone);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  background: var(--bone);
  color: var(--stone-black);
}

.modal textarea { resize: vertical; min-height: 60px; }

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.btn-primary {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.5rem 1.2rem;
  border: none;
  background: var(--burnt-sienna);
  color: white;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: opacity 0.15s;
}

.btn-primary:hover { opacity: 0.88; }

.btn-secondary {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.5rem 1.2rem;
  border: 1px solid var(--sandstone);
  background: transparent;
  color: var(--stone-black);
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.btn-secondary:hover { background: var(--warm-paper); }

/* --- Responsive --- */
@media (max-width: 900px) {
  .dash-header {
    flex-direction: column;
    height: auto;
    padding: 0.75rem 1rem;
    gap: 0.5rem;
  }
  .tab-nav { flex-wrap: wrap; }
  .overview-grid { grid-template-columns: 1fr; }
  .kanban-board {
    grid-template-columns: 1fr 1fr;
  }
  .budget-tiers { grid-template-columns: 1fr; }
  main { padding: 1rem; }
}

@media (max-width: 600px) {
  .kanban-board {
    grid-template-columns: 1fr;
  }
}
