/* Schedule dashboard — extends Goose Method brand tokens. */

:root {
  /* Brand tokens — copied from /Users/Jade/Documents/the-goose-method/assets/css/styles.css */
  --ink: #111111;
  --ink-soft: #2A2A2A;
  --ink-deep: #0A0A0A;
  --paper: #FFFFFF;
  --offwhite: #F5F2EC;
  --cream-deep: #ECE5D2;
  --grey: #5C5C5C;
  --grey-soft: #E6E2D8;
  --orange: #F88207;
  --orange-deep: #D86E00;
  --orange-soft: #FFB06B;
  --green-tile: #C9E0BD;
  --green-deep: #6A8957;
  --orange-tile: #FFE0B5;
  --plum: #1A1424;

  --radius: 18px;
  --radius-sm: 10px;
  --radius-pill: 999px;

  --max-width: 1180px;
  --header-height: 72px;

  --font-head: "Manrope", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --shadow-sm: 0 1px 2px rgba(17,17,17,0.04);
  --shadow-md: 0 4px 20px rgba(17,17,17,0.08);
  --shadow-lg: 0 10px 40px rgba(17,17,17,0.18);

  /* Per-business hues (also stored in DB; this is the fallback) */
  --c-goose:    #F88207;
  --c-dca:      #1A1424;
  --c-tinyturf: #6A8957;
  --c-quotes:   #D86E00;
  --c-personal: #5C5C5C;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--offwhite);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
  font-family: var(--font-head);
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

a { color: var(--ink); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  z-index: 1000;
}
.skip-link:focus { left: 12px; top: 12px; }

/* -----------------------------------------------------------
   Top bar
----------------------------------------------------------- */
.topbar {
  background: var(--paper);
  border-bottom: 1px solid var(--grey-soft);
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-row {
  height: var(--header-height);
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.brand-mark { font-size: 1.4rem; }
.tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  flex: 1;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--grey);
  white-space: nowrap;
}
.tab:hover { color: var(--ink); }
.tab.is-active {
  color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}
.topbar-end {
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--grey-soft);
  background: var(--paper);
  color: var(--ink);
  font-size: 1.05rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-icon:hover { background: var(--offwhite); }
.btn-icon.is-spinning { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-pill {
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.88rem;
}
.btn-pill.is-warning {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--ink);
}
.btn-primary {
  padding: 11px 20px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
}
.btn-primary:hover { background: var(--orange); color: var(--ink); border-color: var(--orange); }
.btn-ghost {
  padding: 11px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--grey-soft);
  background: transparent;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
}
.btn-ghost:hover { background: var(--paper); }
.btn-ghost.danger { color: #b8311b; border-color: #f2c2b8; }
.btn-ghost.danger:hover { background: #fdebe6; }

/* -----------------------------------------------------------
   Main
----------------------------------------------------------- */
.main { padding: 28px 24px 120px; }

/* Hero (Today view) */
.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 28px;
}
.hero-eyebrow {
  font-family: var(--font-head);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange);
  font-weight: 800;
  margin-bottom: 6px;
}
#heroDate {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
}
.hero-summary { color: var(--grey); margin: 6px 0 0; }

.window-picker {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.chip {
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--grey-soft);
  background: var(--paper);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--grey);
}
.chip.is-active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.pill-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.pill-row .chip { background: var(--paper); }
.pill-row .chip.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* -----------------------------------------------------------
   Task cards
----------------------------------------------------------- */
.task-list {
  display: grid;
  gap: 12px;
}
.task-group-header {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey);
  margin: 20px 0 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.task-group-header .swatch {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.task {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--grey-soft);
  border-radius: var(--radius);
  padding: 16px 18px 16px 26px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.task::before {
  content: "";
  position: absolute;
  left: 0; top: 12px; bottom: 12px;
  width: 4px;
  border-radius: 4px;
  background: var(--task-color, var(--grey));
}
.task:hover {
  box-shadow: var(--shadow-md);
  border-color: #d8d2c4;
  transform: translateY(-1px);
}
.task.is-done {
  opacity: 0.55;
}
.task.is-done .task-title { text-decoration: line-through; }
.task.is-blocked .task-title::after {
  content: "blocked";
  font-family: var(--font-head);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #b8311b;
  background: #fdebe6;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  margin-left: 10px;
  vertical-align: 2px;
}

.task-check {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 2px solid var(--grey-soft);
  background: var(--paper);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin-top: 2px;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.task-check:hover { border-color: var(--ink); }
.task.is-done .task-check {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.task-body { min-width: 0; }
.task-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.25;
  color: var(--ink);
  word-wrap: break-word;
}
.task-meta {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--grey);
  font-size: 0.86rem;
}
.task-meta .dot { color: var(--grey-soft); }
.task-meta .progress {
  font-feature-settings: "tnum";
}
.task-meta .priority-high { color: #b8311b; font-weight: 700; }
.task-notes-preview {
  margin-top: 6px;
  color: var(--grey);
  font-size: 0.86rem;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--offwhite);
  border: 1px solid var(--grey-soft);
  color: var(--ink);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.01em;
}
.pill .swatch {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--swatch, var(--grey));
}

.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--grey);
  font-family: var(--font-head);
  font-weight: 600;
}

/* -----------------------------------------------------------
   FAB
----------------------------------------------------------- */
.fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 60px;
  height: 60px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  border: none;
  font-size: 1.8rem;
  font-family: var(--font-head);
  font-weight: 800;
  box-shadow: var(--shadow-lg);
  z-index: 60;
  transition: transform 0.1s ease, background 0.15s ease;
}
.fab:hover { background: var(--orange); color: var(--ink); transform: scale(1.04); }
.fab:active { transform: scale(0.98); }

/* -----------------------------------------------------------
   Modal (quick add)
----------------------------------------------------------- */
[hidden] { display: none !important; }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(10,10,10,0.45);
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-card {
  background: var(--paper);
  border-radius: var(--radius);
  width: 100%;
  max-width: 540px;
  padding: 24px;
  box-shadow: var(--shadow-lg);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.modal-head h2 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.4rem;
}
.modal-foot {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.form {
  display: grid;
  gap: 14px;
}
.field {
  display: grid;
  gap: 6px;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.field-full { grid-column: 1 / -1; }
.field-label {
  font-family: var(--font-head);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey);
  font-weight: 700;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--grey-soft);
  border-radius: var(--radius-sm);
  font: inherit;
  background: var(--paper);
  color: var(--ink);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--orange);
  outline-offset: 1px;
  border-color: transparent;
}

/* -----------------------------------------------------------
   Slide-over detail
----------------------------------------------------------- */
.slideover {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(520px, 100%);
  background: var(--paper);
  box-shadow: var(--shadow-lg);
  z-index: 75;
  padding: 24px 24px 28px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.slideover-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.slideover-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.5rem;
  outline: none;
  border-radius: 6px;
  padding: 2px 4px;
  margin: 0 -4px;
}
.slideover-title:focus { background: var(--offwhite); }
.slideover-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.slideover-foot {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.slideover-foot-end { display: flex; gap: 10px; }

.checklist-section h3 {
  font-family: var(--font-head);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 10px;
  font-weight: 800;
}
.checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
  display: grid;
  gap: 4px;
}
.checklist li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
}
.checklist li:hover { background: var(--offwhite); }
.checklist li.is-checked .item-label { text-decoration: line-through; color: var(--grey); }
.checklist input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--ink);
}
.item-label {
  flex: 1;
  font-size: 0.96rem;
}
.checklist-add {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}
.checklist-add input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--grey-soft);
  border-radius: var(--radius-sm);
  font: inherit;
}

.popover {
  position: fixed;
  background: var(--paper);
  border: 1px solid var(--grey-soft);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  padding: 6px;
  display: grid;
  gap: 2px;
  z-index: 90;
  min-width: 180px;
}
.popover button {
  text-align: left;
  background: transparent;
  border: 0;
  padding: 10px 12px;
  border-radius: 6px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink);
}
.popover button:hover { background: var(--offwhite); }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--paper);
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: var(--shadow-md);
  z-index: 100;
  animation: toast-in 0.2s ease;
}
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* -----------------------------------------------------------
   Week view
----------------------------------------------------------- */
.week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}
.week-col {
  background: var(--paper);
  border: 1px solid var(--grey-soft);
  border-radius: var(--radius);
  padding: 14px 12px;
  min-height: 240px;
}
.week-col h3 {
  font-family: var(--font-head);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--grey);
  font-weight: 800;
  margin-bottom: 10px;
}
.week-col.is-today h3 { color: var(--orange); }
.week-col .task {
  padding: 10px 12px 10px 18px;
  font-size: 0.86rem;
  grid-template-columns: auto 1fr;
}
.week-col .task .task-title { font-size: 0.9rem; }
.week-col .task-actions { display: none; }

/* -----------------------------------------------------------
   Responsive
----------------------------------------------------------- */
@media (max-width: 720px) {
  .topbar-row { gap: 12px; padding-right: 0; }
  .brand-text { display: none; }
  .tabs { gap: 2px; }
  .tab { padding: 6px 10px; font-size: 0.85rem; }
  .field-row { grid-template-columns: 1fr; }
  .slideover-grid { grid-template-columns: 1fr; }
  .week { grid-template-columns: 1fr; }
  .fab { right: 16px; bottom: 16px; width: 56px; height: 56px; font-size: 1.6rem; }
  #heroDate { font-size: 2rem; }
}
