/* ============================================================
   Quick Cash Kit — shared styles
   Built on top of Hipo design tokens (hipo-tokens.css).
   Direction C: Sprint Dashboard
   ============================================================ */

/* App bar — present on every page in the kit */
.qck-appbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 32px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-body);
}
.qck-appbar__logo { height: 24px; width: auto; display: block; }
.qck-appbar__divider {
  width: 1px; height: 16px; background: var(--border);
}
.qck-appbar__crumb {
  font-size: 13px; color: var(--grey-mid);
  display: inline-flex; align-items: center; gap: 6px;
  text-decoration: none; border-bottom: none;
}
.qck-appbar__crumb:hover { color: var(--charcoal); }
.qck-appbar__crumb--current { color: var(--charcoal); }
.qck-appbar__crumb svg { width: 12px; height: 12px; opacity: 0.5; }
.qck-appbar__right {
  margin-left: auto; display: flex; align-items: center; gap: 16px;
  font-family: var(--font-mono); font-size: 11px; color: var(--grey-light);
  letter-spacing: 0.04em;
}
.qck-appbar__save {
  display: inline-flex; align-items: center; gap: 8px;
}
.qck-appbar__save::before {
  content: ''; width: 6px; height: 6px; border-radius: 999px;
  background: var(--terra); display: inline-block;
}
.qck-appbar__example {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-size: 12px; color: var(--grey-mid);
  cursor: pointer; user-select: none;
  letter-spacing: 0;
}
.qck-appbar__example input { display: none; }
.qck-appbar__example .qck-switch {
  width: 30px; height: 18px; border-radius: 999px;
  background: var(--border); position: relative; transition: background 160ms;
  flex-shrink: 0;
}
.qck-appbar__example .qck-switch::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 14px; height: 14px; border-radius: 999px;
  background: var(--white); transition: transform 160ms;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.qck-appbar__example input:checked + .qck-switch { background: var(--terra); }
.qck-appbar__example input:checked + .qck-switch::after { transform: translateX(12px); }

/* Page chrome */
.qck-page {
  max-width: 980px;
  margin: 0 auto;
  padding: 36px 28px 80px;
}
.qck-page--wide { max-width: 1140px; }

/* Worksheet hero card — most pages have one of these at the top */
.qck-hero {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px 28px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
  box-shadow: var(--shadow-sm);
}
.qck-hero__eyebrow {
  font-family: var(--font-body);
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.22em;
  color: var(--terra);
  margin-bottom: 10px;
}
.qck-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.5vw, 36px);
  font-weight: 700; line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--charcoal);
  margin: 0 0 8px;
}
.qck-hero h1 em {
  font-style: italic; color: var(--terra);
}
.qck-hero p {
  font-size: 14px; color: var(--grey-mid);
  line-height: 1.55; max-width: 56ch; margin: 0;
}

/* Section header — between hero and content */
.qck-section {
  margin-top: 32px;
}
.qck-section__head {
  display: flex; align-items: baseline; gap: 12px;
  margin-bottom: 14px;
}
.qck-section__eyebrow {
  font-family: var(--font-body);
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.22em;
  color: var(--grey-mid);
}
.qck-section__title {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 700; line-height: 1.1;
  letter-spacing: -0.01em; color: var(--charcoal);
  margin: 0;
}
.qck-section__hint {
  font-size: 13px; color: var(--grey-mid);
  margin: 6px 0 0 0;
}

/* Cards — for asset rows + content blocks */
.qck-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
}
.qck-card--active { border-color: var(--charcoal); border-width: 1.5px; }
.qck-card--muted { background: var(--offwhite); border-color: var(--border); }
.qck-card--locked { opacity: 0.55; }

/* Status pills */
.qck-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-family: var(--font-body); font-size: 10px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  white-space: nowrap;
}
.qck-pill--done   { background: var(--terra);     color: var(--cream); }
.qck-pill--doing  { background: var(--charcoal);  color: var(--cream); }
.qck-pill--next   { background: transparent; color: var(--charcoal); border: 1px solid var(--charcoal); }
.qck-pill--locked { background: transparent; color: var(--grey-light); border: 1px solid var(--border); }

/* Score meter (donut + readout) */
.qck-meter {
  position: relative; width: 130px; height: 130px;
  display: flex; align-items: center; justify-content: center;
}
.qck-meter svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.qck-meter__readout {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.qck-meter__num {
  font-family: var(--font-display);
  font-size: 36px; font-weight: 700; line-height: 1;
  color: var(--charcoal);
}
.qck-meter__num em {
  color: var(--grey-light); font-size: 22px; font-style: normal;
}
.qck-meter__label {
  font-family: var(--font-mono); font-size: 9px;
  text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--grey-mid); margin-top: 4px;
}
.qck-meter--ready .qck-meter__label { color: var(--terra); }

/* Yes/No toggle group (pill-shaped) */
.qck-yn {
  display: inline-flex; background: var(--offwhite);
  border-radius: 999px; padding: 3px; gap: 0;
}
.qck-yn input { display: none; }
.qck-yn label {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 54px; height: 26px; padding: 0 14px;
  border-radius: 999px; cursor: pointer;
  color: var(--grey-mid);
  font-family: var(--font-body); font-size: 11px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  transition: all 140ms;
}
.qck-yn input[value="yes"]:checked ~ label[for$="-yes"] { background: var(--terra); color: var(--cream); }
.qck-yn input[value="no"]:checked  ~ label[for$="-no"]  { background: var(--charcoal); color: var(--cream); }

/* Inputs */
.qck-input,
.qck-textarea,
.qck-select {
  width: 100%; box-sizing: border-box;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: var(--font-body);
  font-size: 14px; color: var(--charcoal);
  transition: border-color 140ms, box-shadow 140ms;
}
.qck-input:focus,
.qck-textarea:focus,
.qck-select:focus {
  outline: none;
  border-color: var(--charcoal);
  box-shadow: 0 0 0 3px rgba(30,28,26,0.06);
}
.qck-textarea {
  resize: vertical; min-height: 64px;
  line-height: 1.5;
}
.qck-input--ghost {
  background: transparent;
  border: none; border-bottom: 1px solid var(--border);
  border-radius: 0; padding: 8px 4px;
}
.qck-input--ghost:focus {
  border-color: var(--charcoal);
  box-shadow: none;
}
.qck-input--numeric {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.qck-label {
  display: block;
  font-family: var(--font-body);
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--grey-mid);
  margin-bottom: 6px;
}

/* Buttons */
.qck-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--brand-gradient);
  color: var(--white);
  border: none; border-radius: 10px;
  padding: 12px 20px;
  font-family: var(--font-body); font-size: 13px; font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: var(--shadow-cta);
  text-decoration: none;
  transition: transform 140ms, box-shadow 140ms;
}
.qck-btn:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(194,58,0,0.32); color: var(--white); }
.qck-btn--ghost {
  background: var(--offwhite);
  color: var(--grey-mid);
  border: 1px solid var(--border);
  box-shadow: none;
}
.qck-btn--ghost:hover { color: var(--charcoal); box-shadow: none; transform: none; }
.qck-btn--quiet {
  background: transparent; color: var(--grey-mid);
  border: none; box-shadow: none;
  padding: 8px 12px; font-size: 12px;
}
.qck-btn--quiet:hover { color: var(--charcoal); transform: none; box-shadow: none; }
.qck-btn--small { padding: 8px 14px; font-size: 12px; }

/* Tabs */
.qck-tabs {
  display: inline-flex; gap: 4px;
  background: var(--offwhite);
  padding: 4px; border-radius: 12px;
  border: 1px solid var(--border);
}
.qck-tab {
  background: transparent;
  border: none;
  padding: 8px 18px;
  font-family: var(--font-body); font-size: 13px; font-weight: 500;
  color: var(--grey-mid);
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  transition: background 140ms, color 140ms;
}
.qck-tab:hover { color: var(--charcoal); }
.qck-tab--active {
  background: var(--white); color: var(--charcoal);
  box-shadow: var(--shadow-xs);
}
.qck-tab__count {
  font-family: var(--font-mono); font-size: 10px;
  background: var(--offwhite); color: var(--grey-mid);
  padding: 2px 6px; border-radius: 999px;
  letter-spacing: 0.04em;
}
.qck-tab--active .qck-tab__count {
  background: var(--terra); color: var(--cream);
}

/* Table — editorial branded tables (not literal spreadsheets) */
.qck-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.qck-table th {
  text-align: left;
  font-family: var(--font-body);
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--grey-mid);
  padding: 14px 16px;
  background: var(--offwhite);
  border-bottom: 1px solid var(--border);
}
.qck-table td {
  padding: 0;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  font-family: var(--font-body); font-size: 14px;
  color: var(--charcoal);
}
.qck-table tr:last-child td { border-bottom: none; }
.qck-table td input,
.qck-table td textarea {
  width: 100%; box-sizing: border-box;
  border: none; background: transparent;
  padding: 14px 16px;
  font: inherit; color: inherit;
}
.qck-table td input:focus,
.qck-table td textarea:focus {
  outline: none;
  background: var(--offwhite);
}
.qck-table td.qck-table__num input {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.qck-table td.qck-table__action { text-align: right; }
.qck-table .qck-remove {
  background: transparent; border: none;
  width: 28px; height: 28px; border-radius: 6px;
  color: var(--grey-light); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  margin-right: 8px;
  transition: background 140ms, color 140ms;
}
.qck-table .qck-remove:hover { background: var(--offwhite); color: var(--terra); }

/* Verdict / callout row */
.qck-callout {
  margin-top: 22px;
  padding: 18px 22px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--terra);
  border-radius: 8px;
  background: rgba(194,58,0,0.04);
  display: flex; align-items: center; gap: 18px;
}
.qck-callout--neutral {
  border-left-color: var(--charcoal);
  background: rgba(30,28,26,0.03);
}
.qck-callout__eyebrow {
  font-family: var(--font-body);
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.22em;
  color: var(--terra);
  margin-bottom: 6px;
}
.qck-callout--neutral .qck-callout__eyebrow { color: var(--charcoal); }
.qck-callout__body { font-size: 13px; color: var(--grey-mid); }

/* Inline note — small italic Playfair, for coachly asides */
.qck-note {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 15px;
  color: var(--grey-mid);
  line-height: 1.5;
}
.qck-note em { color: var(--terra); font-style: italic; }

/* Footer nav between worksheets */
.qck-pagernav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-top: 56px; padding-top: 28px;
  border-top: 1px solid var(--border);
}
.qck-pagernav a {
  display: flex; flex-direction: column; gap: 4px;
  text-decoration: none; border: none;
  padding: 12px 16px; border-radius: 10px;
  color: var(--grey-mid);
  transition: background 140ms;
  min-width: 160px;
}
.qck-pagernav a:hover { background: var(--offwhite); color: var(--charcoal); }
.qck-pagernav a span {
  font-family: var(--font-body); font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--grey-light);
}
.qck-pagernav a strong {
  font-family: var(--font-display); font-size: 17px; font-weight: 700;
  color: var(--charcoal);
}
.qck-pagernav a.qck-pagernav__next { text-align: right; }

/* Hero variant — gradient (used on index) */
.qck-hero-gradient {
  position: relative; overflow: hidden;
  background: var(--brand-gradient);
  color: var(--white);
  border-radius: 18px;
  padding: 36px 40px;
}
.qck-hero-gradient h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 4.5vw, 48px);
  line-height: 1.05; font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--white);
  margin: 0 0 20px;
  max-width: 22ch; text-wrap: balance;
}
.qck-hero-gradient h1 em { font-style: italic; color: var(--white); opacity: 1; }

/* Day-progress track */
.qck-days {
  display: flex; gap: 4px; margin: 6px 0 14px;
}
.qck-days__cell {
  flex: 1; height: 6px; border-radius: 999px;
  background: rgba(255,255,255,0.22);
}
.qck-days__cell--done { background: var(--white); }
.qck-days__cell--today {
  background: var(--white); box-shadow: 0 0 0 3px rgba(255,255,255,0.25);
}
.qck-days__legend {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono); font-size: 10px;
  opacity: 0.75; letter-spacing: 0.06em;
}

/* Misc helpers */
.qck-row { display: flex; align-items: center; gap: 12px; }
.qck-grow { flex: 1; }
.qck-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.qck-stack-3 > * + * { margin-top: 12px; }
.qck-stack-4 > * + * { margin-top: 16px; }
.qck-stack-6 > * + * { margin-top: 24px; }

/* Toast for "saved" / "copied" / etc. */
.qck-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--charcoal); color: var(--cream);
  padding: 10px 18px; border-radius: 999px;
  font-family: var(--font-body); font-size: 13px; letter-spacing: 0.02em;
  box-shadow: var(--shadow-md);
  opacity: 0; pointer-events: none;
  transition: opacity 200ms, transform 200ms;
  z-index: 200;
}
.qck-toast--visible {
  opacity: 1; transform: translateX(-50%) translateY(0);
}

/* Print-safe-ish */
@media print {
  .qck-appbar, .qck-pagernav, .qck-btn { display: none !important; }
  .qck-page { padding: 0; }
}
