/* =============================================================================
   Tiki Dashboard — 1950s Hawaii / vintage travel-poster styling.
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Pacifico&family=Bebas+Neue&family=Nunito:wght@400;600;700;800&display=swap');

:root {
  --cream: #f8f0da;
  --parchment: #fdf8ec;
  --card: #fffaf0;
  --ink: #3a2a1d;
  --ink-soft: #6a5544;
  --turquoise: #18a89f;
  --turquoise-dk: #0e7d76;
  --coral: #ef5d52;
  --coral-dk: #c8443b;
  --orange: #f4953f;
  --gold: #f3b73f;
  --pink: #ef6f93;
  --leaf: #2e7d57;
  --line: #e6d8bb;
  --shadow: 0 6px 18px rgba(80, 50, 20, 0.14);
  --radius: 18px;
  --maxw: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background-color: var(--cream);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(243,183,63,0.10), transparent 38%),
    radial-gradient(circle at 88% 22%, rgba(24,168,159,0.10), transparent 42%);
  font-size: 17px;
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--turquoise-dk); }

#app { max-width: var(--maxw); margin: 0 auto; padding: 0 14px 120px; }

/* --------------------------------- Nav ----------------------------------- */
.tk-nav {
  position: sticky; top: 0; z-index: 50;
  margin: 0 -14px 18px;
  background: linear-gradient(180deg, var(--cream) 70%, rgba(248,240,218,0.85));
  border-bottom: 3px solid var(--line);
  backdrop-filter: blur(4px);
}
.tk-nav-inner {
  display: flex; gap: 8px; overflow-x: auto; padding: 10px 14px;
  -webkit-overflow-scrolling: touch; scrollbar-width: thin;
}
.tk-nav-chip {
  flex: 0 0 auto; text-decoration: none; white-space: nowrap;
  font-family: 'Bebas Neue', sans-serif; letter-spacing: 0.5px; font-size: 19px;
  color: var(--ink); background: var(--card);
  border: 2px solid var(--line); border-radius: 999px;
  padding: 7px 15px; transition: transform .1s, background .15s, border-color .15s;
}
.tk-nav-chip:hover { transform: translateY(-1px); }
.tk-nav-chip.active {
  background: var(--turquoise); color: #fff; border-color: var(--turquoise-dk);
}

/* -------------------------------- Hero ----------------------------------- */
.tk-hero {
  position: relative; overflow: hidden;
  border-radius: 22px; padding: 34px 22px 70px; margin-bottom: 18px;
  text-align: center; color: #4a2c12;
  background:
    linear-gradient(180deg, #ffe39a 0%, #ffb867 30%, #f5836f 60%, #ee6f93 78%, #18a89f 100%);
  box-shadow: var(--shadow);
}
.tk-hero-sun {
  position: absolute; top: 26px; left: 50%; transform: translateX(-50%);
  width: 160px; height: 160px; border-radius: 50%;
  background: radial-gradient(circle, #fff4cf 0%, #ffe07a 55%, #ffcf52 100%);
  box-shadow: 0 0 60px 20px rgba(255, 224, 122, 0.6);
}
.tk-hero::before { /* sunburst rays */
  content: ''; position: absolute; top: -40%; left: 50%;
  width: 160%; height: 160%; transform: translateX(-50%);
  background: repeating-conic-gradient(from 0deg at 50% 30%,
    rgba(255,255,255,0.12) 0deg 6deg, transparent 6deg 14deg);
  pointer-events: none;
}
.tk-hero-palms::before, .tk-hero-palms::after {
  content: '🌴'; position: absolute; bottom: 2px; font-size: 120px;
  filter: brightness(0); opacity: 0.82; line-height: 1; pointer-events: none;
}
.tk-hero-palms::before { left: 4px; transform: scaleX(-1); }
.tk-hero-palms::after { right: 4px; }
.tk-hero-title {
  position: relative; font-family: 'Pacifico', cursive; font-weight: 400;
  font-size: clamp(30px, 6vw, 54px); margin: 86px 0 4px; color: #fff;
  text-shadow: 2px 3px 0 rgba(200, 68, 59, 0.55), 0 2px 10px rgba(0,0,0,0.18);
}
.tk-hero-sub {
  position: relative; font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 2px; font-size: clamp(16px, 3vw, 24px);
  margin: 0 0 18px; color: #fff; text-shadow: 1px 1px 0 rgba(0,0,0,0.18);
}

/* Countdown — luggage-tag tiles */
.tk-countdown {
  position: relative; display: flex; justify-content: center; gap: 10px;
  flex-wrap: wrap; margin-bottom: 18px;
}
.tk-cd-unit {
  background: var(--parchment); border: 3px solid #fff; border-radius: 14px;
  min-width: 74px; padding: 10px 6px; box-shadow: var(--shadow);
}
.tk-cd-num {
  display: block; font-family: 'Bebas Neue', sans-serif;
  font-size: 40px; line-height: 1; color: var(--coral-dk);
}
.tk-cd-lab {
  display: block; text-transform: uppercase; letter-spacing: 1px;
  font-size: 12px; font-weight: 700; color: var(--ink-soft);
}
.tk-cd-aloha {
  position: relative; font-family: 'Pacifico', cursive; font-size: 26px;
  color: #fff; background: rgba(255,255,255,0.18); padding: 10px 18px;
  border-radius: 14px;
}

.tk-facts {
  position: relative; display: flex; flex-wrap: wrap; justify-content: center;
  gap: 8px; margin-bottom: 16px;
}
.tk-fact {
  background: rgba(255,255,255,0.86); border-radius: 12px;
  padding: 8px 14px; text-align: left; box-shadow: var(--shadow);
}
.tk-fact-label {
  display: block; font-size: 11px; letter-spacing: 1px; text-transform: uppercase;
  font-weight: 800; color: var(--turquoise-dk);
}
.tk-fact-val { display: block; font-weight: 700; color: var(--ink); }

.tk-overall {
  position: relative; background: rgba(255,255,255,0.9); border-radius: 14px;
  padding: 12px 16px; box-shadow: var(--shadow); max-width: 560px;
  margin: 0 auto;
}
.tk-overall-top {
  display: flex; justify-content: space-between; font-weight: 800;
  margin-bottom: 6px; color: var(--ink);
}
.tk-overall-bar {
  height: 16px; border-radius: 999px; background: #e9ddc2; overflow: hidden;
  border: 1px solid var(--line);
}
.tk-overall-bar i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--turquoise), var(--gold), var(--coral));
  transition: width .35s ease;
}

/* ------------------------------ Sections --------------------------------- */
.tk-section {
  background: var(--parchment); border: 2px solid var(--line);
  border-radius: var(--radius); margin-bottom: 16px; overflow: hidden;
  box-shadow: var(--shadow);
}
.tk-section-head {
  width: 100%; display: flex; align-items: center; gap: 12px;
  background: linear-gradient(180deg, #fff8e7, #f5e9cc);
  border: none; border-bottom: 2px dashed var(--line);
  padding: 14px 16px; cursor: pointer; text-align: left;
  font-family: inherit; color: var(--ink);
}
.tk-sec-icon { font-size: 24px; }
.tk-sec-title {
  flex: 1; font-family: 'Bebas Neue', sans-serif; letter-spacing: 0.5px;
  font-size: 26px; line-height: 1;
}
.tk-sec-prog { display: flex; align-items: center; gap: 8px; }
.tk-sec-bar {
  width: 80px; height: 9px; background: #e6d8bb; border-radius: 999px;
  overflow: hidden;
}
.tk-sec-bar i {
  display: block; height: 100%; width: 0; background: var(--turquoise);
  transition: width .3s;
}
.tk-sec-pct {
  font-size: 13px; font-weight: 800; color: var(--ink-soft); min-width: 38px;
  text-align: right;
}
.tk-section.sec-done .tk-sec-bar i { background: var(--leaf); }
.tk-chevron { font-size: 18px; transition: transform .2s; color: var(--turquoise-dk); }
.tk-section.collapsed .tk-chevron { transform: rotate(-90deg); }
.tk-section.collapsed .tk-section-body { display: none; }
.tk-section-body { padding: 16px; }

.tk-block { margin-bottom: 18px; }
.tk-block:last-child { margin-bottom: 0; }
.tk-block-title {
  font-family: 'Bebas Neue', sans-serif; letter-spacing: 0.5px;
  font-size: 21px; margin: 0 0 10px; color: var(--turquoise-dk);
  display: flex; align-items: center; gap: 6px;
}

/* Section tools */
.tk-tools { display: flex; gap: 8px; margin-bottom: 14px; }
.tk-tool {
  font-family: 'Bebas Neue', sans-serif; letter-spacing: .5px; font-size: 16px;
  background: var(--card); border: 2px solid var(--line); border-radius: 10px;
  padding: 5px 12px; cursor: pointer; color: var(--ink-soft);
}
.tk-tool:hover { border-color: var(--turquoise); color: var(--turquoise-dk); }

/* ------------------------------- Cards ----------------------------------- */
.tk-card-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.tk-card {
  background: var(--card); border: 2px solid var(--line);
  border-radius: 14px; padding: 14px; box-shadow: var(--shadow);
  position: relative;
}
.tk-card::after { /* postcard stamp dot in corner */
  content: ''; position: absolute; top: 10px; right: 10px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--coral); opacity: .25;
}
.tk-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.tk-card-title {
  font-family: 'Bebas Neue', sans-serif; font-size: 24px; letter-spacing: .5px;
  margin: 0; color: var(--coral-dk);
}
.tk-pet-icon { font-size: 24px; }
.tk-badge {
  font-size: 12px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase;
  background: var(--turquoise); color: #fff; border-radius: 999px; padding: 2px 10px;
}
.tk-mini-title {
  font-family: 'Bebas Neue', sans-serif; letter-spacing: .5px; font-size: 16px;
  color: var(--ink-soft); margin: 14px 0 6px; text-transform: uppercase;
}

/* ---------------------------- Checklist items ---------------------------- */
.tk-list { display: flex; flex-direction: column; }
.tk-item {
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px;
  padding: 4px 0; border-bottom: 1px dashed var(--line);
}
.tk-item:last-child { border-bottom: none; }
.tk-line {
  flex: 1; display: flex; align-items: center; gap: 12px;
  padding: 8px 4px; cursor: pointer; min-height: 44px;
}
.tk-check {
  appearance: none; -webkit-appearance: none; flex: 0 0 auto;
  width: 28px; height: 28px; border: 2.5px solid var(--turquoise);
  border-radius: 8px; background: #fff; cursor: pointer; position: relative;
  transition: background .12s, border-color .12s;
}
.tk-check.sm { width: 22px; height: 22px; border-radius: 6px; }
.tk-check:checked { background: var(--turquoise); border-color: var(--turquoise-dk); }
.tk-check:checked::after {
  content: '✓'; position: absolute; inset: 0; display: flex;
  align-items: center; justify-content: center; color: #fff;
  font-weight: 900; font-size: 18px;
}
.tk-check:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.tk-label { font-weight: 600; }
.tk-check:checked + .tk-label { color: var(--ink-soft); text-decoration: line-through; }
.tk-item.prio { background: rgba(243,183,63,0.14); border-radius: 8px; }
.tk-item.prio .tk-label::after { content: ' ★'; color: var(--orange); }
.tk-more {
  flex: 0 0 auto; align-self: center; background: none; border: none;
  font-size: 22px; color: var(--ink-soft); cursor: pointer; line-height: 1;
  padding: 6px 8px; border-radius: 8px;
}
.tk-more:hover { background: var(--cream); }
.tk-item.has-detail .tk-more { color: var(--coral); }
.tk-detail {
  flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 8px;
  padding: 6px 4px 10px 40px;
}
.tk-detail[hidden] { display: none; }
.tk-assignee, .tk-note {
  font-family: inherit; font-size: 15px; border: 2px solid var(--line);
  border-radius: 8px; padding: 6px 8px; background: #fff;
}
.tk-note { flex: 1; min-width: 140px; }
.tk-prio { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--orange); }
.tk-prio input { width: 20px; height: 20px; }

/* ------------------------------- Fields ---------------------------------- */
.tk-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.tk-field.wide { grid-column: 1 / -1; }
.tk-field-label {
  display: block; font-weight: 800; font-size: 13px; letter-spacing: .3px;
  color: var(--ink-soft); margin-bottom: 4px; text-transform: uppercase;
}
.tk-input {
  width: 100%; font-family: inherit; font-size: 16px; color: var(--ink);
  border: 2px solid var(--line); border-radius: 10px; padding: 10px 12px;
  background: #fff;
}
.tk-input:focus { outline: none; border-color: var(--turquoise); box-shadow: 0 0 0 3px rgba(24,168,159,0.18); }
.tk-notearea { resize: vertical; }

/* ------------------------------- Links ----------------------------------- */
.tk-links { display: flex; flex-wrap: wrap; gap: 8px; }
.tk-link {
  text-decoration: none; font-weight: 700; background: var(--turquoise);
  color: #fff; border-radius: 999px; padding: 8px 16px;
}
.tk-link:hover { background: var(--turquoise-dk); }

/* ------------------------------ Callouts --------------------------------- */
.tk-callout {
  display: flex; gap: 12px; align-items: flex-start; border-radius: 14px;
  padding: 14px 16px; font-weight: 700; border: 2px solid;
}
.tk-callout-icon { font-size: 24px; line-height: 1; }
.tk-callout.info { background: #e6f6f4; border-color: var(--turquoise); color: var(--turquoise-dk); }
.tk-callout.warning {
  background: #fde8e3; border-color: var(--coral); color: var(--coral-dk);
  font-size: 18px; box-shadow: 0 0 0 4px rgba(239,93,82,0.12);
}

/* -------------------------------- Cars ----------------------------------- */
.tk-cars { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.tk-car { border-left: 8px solid var(--line); }
.tk-car.st-parked-safely { border-left-color: var(--leaf); }
.tk-car.st-assigned { border-left-color: var(--gold); }
.tk-car.st-needs-attention { border-left-color: var(--coral); }
.tk-status-select, .tk-buy-who {
  font-family: inherit; font-size: 14px; font-weight: 700;
  border: 2px solid var(--line); border-radius: 999px; padding: 6px 10px;
  background: #fff; color: var(--ink);
}
.tk-add {
  display: inline-block; margin-top: 6px; font-family: 'Bebas Neue', sans-serif;
  letter-spacing: .5px; font-size: 18px; background: var(--turquoise); color: #fff;
  border: none; border-radius: 12px; padding: 10px 18px; cursor: pointer;
  box-shadow: var(--shadow); grid-column: 1 / -1; justify-self: start;
}
.tk-add:hover { background: var(--turquoise-dk); }
.tk-remove {
  margin-top: 12px; background: none; border: 2px solid var(--line);
  border-radius: 10px; padding: 6px 12px; color: var(--coral-dk); cursor: pointer;
  font-weight: 700;
}
.tk-remove:hover { border-color: var(--coral); }

/* ------------------------------- Buy list -------------------------------- */
.tk-buy { display: flex; flex-direction: column; gap: 8px; }
.tk-buy-head {
  display: grid; grid-template-columns: 1fr 130px 64px 44px; gap: 8px;
  font-size: 12px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .5px; color: var(--ink-soft); padding: 0 4px;
}
.tk-buy-row {
  background: var(--card); border: 2px solid var(--line); border-radius: 12px;
  padding: 8px; box-shadow: var(--shadow);
}
.tk-buy-main { display: grid; grid-template-columns: 1fr 130px 64px 44px; gap: 8px; align-items: center; }
.tk-buy-check { display: flex; justify-content: center; cursor: pointer; }
.tk-buy-note { margin-top: 8px; font-size: 14px; }
.tk-remove-row {
  background: none; border: none; color: var(--coral); font-size: 18px;
  cursor: pointer; padding: 8px; border-radius: 8px;
}
.tk-remove-row:hover { background: var(--cream); }

/* --------------------------- Pet check-in grid --------------------------- */
.tk-grid-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tk-checkin { border-collapse: collapse; width: 100%; min-width: 560px; }
.tk-checkin th, .tk-checkin td {
  border: 1px solid var(--line); padding: 8px; text-align: center;
}
.tk-checkin thead th {
  background: var(--turquoise); color: #fff;
  font-family: 'Bebas Neue', sans-serif; letter-spacing: .5px;
}
.tk-checkin .d-day { display: block; font-size: 18px; }
.tk-checkin .d-date { display: block; font-size: 12px; opacity: .9; }
.tk-checkin-task {
  text-align: left !important; background: var(--cream); font-weight: 700;
  white-space: nowrap; position: sticky; left: 0;
}
.tk-checkin-box { display: flex; justify-content: center; cursor: pointer; }
.tk-checkin-note { font-size: 14px; padding: 6px; }

/* ------------------------------ Critical --------------------------------- */
.tk-critical {
  background: #fff6e6; border: 3px solid var(--coral);
  border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow);
}
.tk-critical-title {
  font-family: 'Bebas Neue', sans-serif; letter-spacing: .5px; font-size: 26px;
  margin: 0 0 8px; color: var(--coral-dk);
}

/* ------------------------------- Footer ---------------------------------- */
.tk-footer {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  background: rgba(58,42,29,0.96); color: #fff;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 8px 14px; box-shadow: 0 -4px 14px rgba(0,0,0,0.2);
}
.tk-status { font-size: 13px; font-weight: 700; min-width: 150px; }
.tk-status.ok { color: #9fe3c2; }
.tk-status.pending { color: var(--gold); }
.tk-status.warn { color: #ffb3a8; }
.tk-foot-spacer { flex: 1; }
.tk-who-wrap { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.tk-who-wrap input {
  font-family: inherit; border: none; border-radius: 8px; padding: 6px 8px;
  width: 120px; font-size: 14px;
}
.tk-foot-btn {
  background: rgba(255,255,255,0.12); color: #fff; border: 1px solid rgba(255,255,255,0.25);
  border-radius: 8px; padding: 7px 12px; cursor: pointer; font-family: inherit;
  font-weight: 700; font-size: 14px;
}
.tk-foot-btn:hover { background: rgba(255,255,255,0.22); }

/* ------------------------------- Mobile ---------------------------------- */
@media (max-width: 600px) {
  body { font-size: 16px; }
  .tk-sec-bar { width: 54px; }
  .tk-hero { padding: 26px 14px 56px; }
  .tk-hero-palms::before, .tk-hero-palms::after { font-size: 84px; }
  .tk-buy-head { display: none; }
  .tk-buy-main { grid-template-columns: 1fr 44px; grid-template-areas: 'name check' 'who remove'; }
  .tk-buy-main .grow { grid-area: name; }
  .tk-detail { padding-left: 8px; }
  .tk-foot-btn { padding: 8px 10px; }
  .tk-who-wrap input { width: 90px; }
}

/* -------------------------------- Print ---------------------------------- */
@media print {
  .tk-nav, .tk-footer, .tk-more, .tk-tools, .tk-add, .tk-remove,
  .tk-remove-row, .tk-chevron, .tk-hero::before, .tk-hero-palms { display: none !important; }
  body { background: #fff; color: #000; font-size: 12px; }
  #app { padding: 0; max-width: none; }
  .tk-section, .tk-card, .tk-hero, .tk-critical { box-shadow: none; break-inside: avoid; }
  .tk-section.collapsed .tk-section-body { display: block !important; }
  .tk-section-body { padding: 8px; }
  .tk-hero { background: #fff !important; color: #000; border: 1px solid #000; padding: 10px; }
  .tk-hero-title, .tk-hero-sub { color: #000; text-shadow: none; }
  .tk-check { border-color: #000; }
  .tk-check:checked { background: #000; }
  .tk-detail[hidden] { display: flex !important; }
  a[href]::after { content: ''; }
}
