/* SeroTone PWA — Theme A "Logo Pastel" on clean white (final approved design)
   Polish pass Nov 6, 2026: Home / CRM / Gig modes, smoother rhythm & transitions. */
:root {
  --page: #ffffff;
  --page-soft: #fafafa;
  --ink: #2f2f33;
  --ink-dim: #6f6f76;
  --ink-faint: #9a9aa1;
  --highlight: #fbeec0;        /* soft yellow highlighter band */
  --yellow-soft: #fef3c7;     /* pale yellow accent */
  --heading-ink: #75590c;     /* deep gold */
  --green: #158052;
  --green-bright: #22b573;
  --green-soft: #e2f4e9;      /* pale green paid circle */
  --red-soft: #fce9eb;        /* soft blush red due circle */
  --red-ink: #a33b47;
  --pink: #fff0f3;            /* blush surface */
  --rose-ring: rgba(216, 118, 132, 0.26);
  --hairline: #ececf0;
  --card: #ffffff;
  --radius: 20px;
  --shadow: 0 1px 3px rgba(47, 47, 51, 0.06), 0 10px 28px rgba(47, 47, 51, 0.05);
  --shadow-lift: 0 2px 6px rgba(47, 47, 51, 0.07), 0 16px 36px rgba(47, 47, 51, 0.08);
  --ease: cubic-bezier(0.22, 0.9, 0.28, 1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Montserrat', -apple-system, 'Segoe UI', sans-serif;
  background: var(--page-soft);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
}
button { touch-action: manipulation; }
:focus { outline: none; }
:focus-visible { outline: 3px solid rgba(34, 181, 115, 0.55); outline-offset: 2px; border-radius: 10px; }

/* ---------- header ---------- */
.app-header {
  display: flex; align-items: center; gap: 12px;
  padding: calc(14px + env(safe-area-inset-top)) 20px 12px;
  background: var(--page);
  border-bottom: 1px solid var(--hairline);
}
.app-logo { width: 44px; height: 44px; border-radius: 12px; }
.app-title h1 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: 0.2px; }
.app-title p { margin: 0; font-size: 12px; color: var(--ink-dim); font-weight: 500; }

/* ---------- layout ---------- */
.view { max-width: 560px; margin: 0 auto; padding: 10px 16px 28px; }
.view-enter { animation: viewIn 0.28s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.loading { text-align: center; color: var(--ink-dim); padding: 48px 0; }
.empty { text-align: center; color: var(--ink-dim); padding: 32px 16px; }

/* clean empty state */
.empty-state {
  text-align: center; background: var(--card);
  border: 1.5px dashed #e3e0cd; border-radius: var(--radius);
  padding: 32px 22px; margin-bottom: 14px;
}
.empty-state .empty-icon { font-size: 34px; line-height: 1; margin-bottom: 10px; }
.empty-state h2 { margin: 0 0 6px; font-size: 18px; font-weight: 800; }
.empty-state p { margin: 0 auto 16px; color: var(--ink-dim); font-size: 14px; max-width: 34ch; }
.empty-state .btn { min-height: 48px; }

/* ---------- section headings: letterspaced small caps, deep gold on yellow band ---------- */
.band {
  display: block; text-align: center;
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--heading-ink);
  background: var(--highlight);
  border-radius: 999px;
  padding: 8px 16px;
  margin: 26px auto 14px;
  width: fit-content; max-width: 100%;
  box-shadow: inset 0 0 0 1px rgba(117, 89, 12, 0.08), 0 3px 10px rgba(251, 238, 192, 0.55);
}
.band:first-child { margin-top: 8px; }
.inner-band { margin-top: 0; }

/* ---------- home ---------- */
.home-head { text-align: center; padding: 10px 4px 4px; }
.greeting { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -0.01em; }
.home-sub { margin: 4px 0 14px; color: var(--ink-dim); font-size: 14.5px; font-weight: 500; }

/* two big mode cards */
.mode-grid { display: grid; gap: 14px; margin-bottom: 14px; }
@media (min-width: 480px) { .mode-grid { grid-template-columns: 1fr 1fr; } }
.mode-card {
  font: inherit; color: inherit; text-align: left; cursor: pointer;
  display: flex; flex-direction: column; gap: 7px;
  min-height: 168px; padding: 22px;
  border-radius: 24px; border: 1px solid var(--hairline);
  box-shadow: var(--shadow);
  transition: transform 0.16s var(--ease), box-shadow 0.16s var(--ease);
}
.mode-card:active { transform: scale(0.98); box-shadow: var(--shadow-lift); }
.mode-crm { background: linear-gradient(180deg, #fff8dc, #ffffff 88%); }
.mode-gig { background: linear-gradient(180deg, #e9f8ef, #ffffff 88%); }
.mode-icon {
  width: 54px; height: 54px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 25px;
  background: #fff; box-shadow: inset 0 0 0 2px rgba(47,47,51,0.06), 0 4px 12px rgba(47,47,51,0.07);
}
.mode-title { font-size: 20px; font-weight: 800; }
.mode-desc { color: var(--ink-dim); font-size: 13.5px; line-height: 1.5; flex: 1; }
.mode-cta { font-weight: 800; font-size: 14.5px; color: var(--green); }
.mode-crm .mode-cta { color: var(--heading-ink); }

.quick-row { display: flex; gap: 10px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
.flag-wrap { margin: 12px 0 0; }

/* ---------- cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 14px;
}
button.card, .card.tappable {
  cursor: pointer; width: 100%; text-align: left; font: inherit; color: inherit;
  transition: transform 0.16s var(--ease), box-shadow 0.16s var(--ease);
  min-height: 52px;
}
.card.tappable:active { transform: scale(0.985); box-shadow: var(--shadow-lift); }
.card-action { margin-top: 16px; text-align: center; }

/* ---------- hero ---------- */
.hero { text-align: center; background: linear-gradient(180deg, #fffdf4, #ffffff 72%); }
.hero .circles { display: flex; justify-content: center; gap: 18px; margin: 16px 0 8px; flex-wrap: wrap; }
.hero h2 { margin: 10px 0 2px; font-size: 24px; font-weight: 800; }
.hero .sub { color: var(--ink-dim); font-size: 13.5px; margin: 3px 0; }
.hero .venue { color: var(--ink-dim); font-size: 13.5px; margin: 3px 0; }

/* soft money / stat circles */
.circle {
  width: 104px; height: 104px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 8px; flex-shrink: 0;
}
.circle .amt { font-size: 19px; font-weight: 800; line-height: 1.1; }
.circle .lbl { font-size: 10px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; margin-top: 3px; }
.circle.paid { background: var(--green-soft); color: var(--green); box-shadow: inset 0 0 0 2px rgba(34, 181, 115, 0.25); }
.circle.owed { background: var(--red-soft); color: var(--red-ink); box-shadow: inset 0 0 0 2px var(--rose-ring); }
.circle.days { background: var(--yellow-soft); color: var(--heading-ink); box-shadow: inset 0 0 0 2px rgba(251, 238, 192, 0.9); }
.circle.small { width: 76px; height: 76px; }
.circle.small .amt { font-size: 14px; }

/* money row */
.money-row { display: flex; justify-content: center; gap: 18px; padding: 8px 0 2px; flex-wrap: wrap; }
.money-row-spaced { margin-top: 14px; }

/* open-questions flag */
.flag {
  display: inline-block;
  background: var(--pink);
  box-shadow: inset 0 0 0 1.5px var(--rose-ring), 0 2px 8px rgba(216, 118, 132, 0.12);
  border-radius: 999px;
  padding: 7px 15px;
  font-size: 14px; color: var(--ink-dim); font-weight: 600;
  margin-top: 10px;
}
.flag-sm { font-size: 12.5px; padding: 4px 11px; }

/* ---------- event rows ---------- */
.event-row { display: flex; align-items: center; gap: 14px; }
.event-row .grow { flex: 1; min-width: 0; }
.event-row h3 { margin: 0 0 2px; font-size: 16.5px; font-weight: 700; }
.event-row .meta { color: var(--ink-dim); font-size: 13px; margin: 1px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  padding: 4px 10px; border-radius: 999px; background: var(--yellow-soft); color: var(--heading-ink);
}
.chip.green { background: var(--green-soft); color: var(--green); }
.chip.blush { background: var(--red-soft); color: var(--red-ink); }
.chev { color: var(--ink-faint); font-size: 20px; }

/* ---------- detail / gig ---------- */
.back-btn {
  background: none; border: none; font: inherit; font-weight: 700; color: var(--heading-ink);
  padding: 10px 8px 10px 0; cursor: pointer; font-size: 15px; min-height: 44px;
}
.detail-head { text-align: center; }
.detail-head h2 { margin: 6px 0 2px; font-size: 23px; font-weight: 800; }
.detail-head .sub { color: var(--ink-dim); font-size: 13.5px; margin: 3px 0; }
.venue-big { font-size: 16px; font-weight: 700; margin: 8px 0 2px; }
.gig-head { background: linear-gradient(180deg, #f2fbf5, #ffffff 75%); }

.kv { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--hairline); font-size: 14px; }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--ink-faint); font-weight: 600; flex-shrink: 0; }
.kv .v { text-align: right; font-weight: 500; }
.kv .v a { color: var(--green); font-weight: 700; text-decoration: none; display: inline-block; padding: 2px 0; }

.timeline-item { display: flex; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--hairline); }
.timeline-item:last-child { border-bottom: none; }
.timeline-item .t { font-weight: 800; color: var(--heading-ink); min-width: 74px; font-size: 13.5px; padding-top: 1px; }
.timeline-item .tt { font-weight: 600; font-size: 14.5px; }
.timeline-item .tn { color: var(--ink-dim); font-size: 13px; margin-top: 2px; }
/* gig mode: bigger, glanceable at showtime */
.gig-timeline .timeline-item { padding: 15px 0; }
.gig-timeline .timeline-item .t { min-width: 86px; font-size: 15.5px; }
.gig-timeline .timeline-item .tt { font-size: 17px; font-weight: 700; }
.gig-timeline .timeline-item .tn { font-size: 14px; }
.gig-cues .cue-text { font-size: 17px; }

.lines { font-size: 14.5px; }
.lines .line { padding: 8px 0; border-bottom: 1px solid var(--hairline); }
.lines .line:last-child { border-bottom: none; }
.lines .line b { color: var(--heading-ink); font-weight: 700; }

.cue { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--hairline); align-items: flex-start; }
.cue:last-child { border-bottom: none; }
.cue .num {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%;
  background: var(--yellow-soft); color: var(--heading-ink);
  font-weight: 800; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.cue .cue-text { font-size: 16px; line-height: 1.9; }
.cue .cue-text b { font-weight: 700; }

.check { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--hairline); font-size: 14.5px; min-height: 44px; }
.check:last-child { border-bottom: none; }
.check .box { flex-shrink: 0; width: 23px; height: 23px; border-radius: 7px; border: 2px solid #d8d8de; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; margin-top: 1px; }
.check.done .box { background: var(--green-bright); border-color: var(--green-bright); }
.check.done .lbl { color: var(--ink-faint); text-decoration: line-through; }

.questions { font-size: 14.5px; line-height: 1.65; }
.questions .q { padding: 9px 0 9px 4px; border-bottom: 1px solid var(--hairline); }
.questions .q:last-child { border-bottom: none; }
.pre-wrap { white-space: pre-wrap; font-size: 14.5px; line-height: 1.65; }

/* ---------- notifications ---------- */
.notif-card { background: linear-gradient(180deg, #fffdf4, #ffffff 80%); }
.notif-copy { margin: 4px 0 8px; font-size: 14px; }
.notif-status { margin: 6px 0 2px; font-size: 14px; font-weight: 600; }
.notif-actions { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.notif-actions .btn { width: 100%; max-width: 340px; }

/* ---------- notes ---------- */
.note-form { display: flex; flex-direction: column; gap: 10px; }
.note-form textarea {
  font: inherit; border: 1.5px solid var(--hairline); border-radius: 14px;
  padding: 13px 14px; min-height: 78px; resize: vertical; background: #fff; color: var(--ink);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.note-form textarea:focus { outline: none; border-color: var(--green-bright); box-shadow: 0 0 0 3px rgba(34,181,115,0.15); }
.btn {
  font: inherit; font-weight: 700; border: none; cursor: pointer;
  background: var(--green-bright); color: #fff; border-radius: 999px;
  padding: 13px 22px; font-size: 15px; min-height: 48px;
  transition: transform 0.15s var(--ease), opacity 0.15s var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn.secondary { background: var(--yellow-soft); color: var(--heading-ink); }
.note-card .note-body { font-size: 15px; white-space: pre-wrap; }
.note-card .note-when { color: var(--ink-faint); font-size: 12px; margin-top: 8px; }
.note-actions { display: flex; gap: 8px; margin-top: 10px; }
.mini-btn {
  font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer;
  border: 1.5px solid var(--hairline); background: #fff; color: var(--ink-dim);
  border-radius: 999px; padding: 9px 16px; min-height: 44px;
  transition: transform 0.15s var(--ease), border-color 0.15s var(--ease);
}
.mini-btn:active { transform: scale(0.97); }
.mini-btn.danger { color: var(--red-ink); border-color: var(--rose-ring); }
.mini-btn.quick { background: var(--page-soft); }
.note-edit { width: 100%; font: inherit; border: 1.5px solid var(--hairline); border-radius: 12px; padding: 11px 12px; min-height: 72px; }

/* ---------- about / packages ---------- */
.pkg-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.pkg .price { font-size: 20px; font-weight: 800; color: var(--green); }
.pkg h3 { margin: 0 0 2px; font-size: 16.5px; }
.pkg .tag { color: var(--heading-ink); font-weight: 600; font-size: 13px; margin: 0 0 6px; }
.pkg p.desc { color: var(--ink-dim); font-size: 13.5px; margin: 0; }
.steps { font-size: 14.5px; line-height: 1.7; padding-left: 20px; margin: 4px 0; }
.steps li { margin-bottom: 6px; }
.about-logo { width: 72px; height: 72px; border-radius: 18px; }
.about-title { margin: 10px 0 4px; font-size: 21px; font-weight: 800; }
.about-copy { margin: 0 0 8px; }
.center { text-align: center; }
.muted { color: var(--ink-dim); }
.small { font-size: 13px; }

/* ---------- tab bar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: rgba(255, 255, 255, 0.97); backdrop-filter: blur(12px);
  border-top: 1px solid var(--hairline);
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -6px 24px rgba(47, 47, 51, 0.05);
}
.tab {
  flex: 1; background: none; border: none; cursor: pointer; font: inherit;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: 9px 2px 7px; font-size: 11px; font-weight: 600; color: var(--ink-faint);
  min-height: 56px; position: relative;
  transition: color 0.15s var(--ease);
}
.tab .tab-icon { font-size: 19px; line-height: 1.2; }
.tab.active { color: var(--green); }
.tab.active::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 34px; height: 3px; border-radius: 0 0 4px 4px; background: var(--green-bright);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .view-enter { animation: none; }
  *, *::before, *::after { transition: none !important; }
}
