/* Same calm planner look as the admin app: warm cream, taupe, serif headings. Made for phones first. */
:root {
  --bg: #f3ece6; --paper: #fbf8f4; --blush-soft: #efe3db; --taupe: #a88f80; --taupe-dark: #7d6558; --ink: #3d322c;
  --muted: #8f7f75; --line: #ddcfc5; --line-soft: #e9dfd7; --sage: #8ea38a; --sage-soft: #e3eadf; --honey-soft: #f3e7d3;
  --rose: #b97a72; --rose-soft: #f3e0dc;
  --shadow: 0 1px 2px rgba(80, 55, 40, .05), 0 8px 24px rgba(80, 55, 40, .06);
  --serif: 'Cormorant Garamond', Georgia, serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: Jost, system-ui, sans-serif; font-size: 16px; color: var(--ink); background: var(--bg); line-height: 1.45; -webkit-text-size-adjust: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2 { font-family: var(--serif); font-weight: 600; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.loading { padding: 80px 16px; text-align: center; color: var(--muted); font-family: var(--serif); font-size: 21px; font-style: italic; }
.empty { color: var(--muted); font-style: italic; margin: 6px 0; }

.btn { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 9px 18px; font-weight: 500; cursor: pointer; }
.btn:hover { border-color: var(--taupe); }
.btn:disabled { opacity: .6; cursor: default; }
.btn.primary { background: var(--taupe-dark); color: #fff; border-color: var(--taupe-dark); }
.btn.small { padding: 5px 14px; font-size: 14px; }
.btn.wide { width: 100%; padding: 13px; font-size: 16px; }
.link { background: none; border: 0; padding: 0; color: var(--taupe-dark); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; font-size: 14px; }
.tag { display: inline-block; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; padding: 2px 9px; border-radius: 999px; background: var(--blush-soft); color: var(--taupe-dark); white-space: nowrap; }
.tag.sage { background: var(--sage-soft); color: #56704f; }
.tag.honey { background: var(--honey-soft); color: #8a6a35; }

/* Sign in / set up */
.signin { min-height: 100vh; display: grid; place-items: center; padding: 20px 16px; }
.signin-card { background: var(--paper); border-radius: 18px; padding: 30px 22px; max-width: 420px; width: 100%; box-shadow: var(--shadow); text-align: center; }
.signin-logo { width: 84px; height: 84px; margin-bottom: 6px; }
.signin-card h1 { font-size: 32px; }
.signin-card form { text-align: left; margin-top: 16px; display: grid; gap: 12px; }
.first-time { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.first-time p { margin: 0 0 8px; color: var(--muted); }
.field { display: grid; gap: 4px; font-size: 13px; letter-spacing: .03em; color: var(--taupe-dark); }
.field input { font-size: 16px; color: var(--ink); padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; width: 100%; }
.field input:focus { outline: 2px solid var(--taupe); outline-offset: 0; border-color: var(--taupe); }
fieldset { border: 1px solid var(--line-soft); border-radius: 12px; padding: 10px 12px 12px; margin: 0; display: grid; gap: 10px; }
legend { font-family: var(--serif); font-size: 18px; font-weight: 600; padding: 0 6px; }
.err { color: var(--rose); background: var(--rose-soft); border-radius: 10px; padding: 8px 12px; margin: 0; font-size: 14px; }
.note { color: #56704f; background: var(--sage-soft); border-radius: 10px; padding: 8px 12px; margin: 0; font-size: 14px; }

/* Signed in */
.top { display: flex; align-items: center; gap: 12px; padding: 14px 16px 8px; max-width: 720px; margin: 0 auto; padding-top: max(14px, env(safe-area-inset-top)); }
.top img { width: 44px; height: 44px; }
.top h1 { font-size: 26px; line-height: 1.05; }
.top p { margin: 0; color: var(--muted); font-size: 14px; }
.tabs { display: flex; gap: 4px; max-width: 720px; margin: 4px auto 0; padding: 0 16px; overflow-x: auto; }
.tabs button { flex: 1; border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 8px 10px; font-size: 14px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tabs button.on { background: var(--taupe-dark); border-color: var(--taupe-dark); color: #fff; }
.wrap { max-width: 720px; margin: 0 auto; padding: 14px 16px 40px; display: grid; gap: 14px; }
.box { background: var(--paper); border-radius: 16px; padding: 16px; box-shadow: var(--shadow); }
.box-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.box-head h2 { font-size: 22px; }
.box form { display: grid; gap: 12px; }
.box form .btn { justify-self: start; }

.days { list-style: none; margin: 0; padding: 0; }
.day { padding: 12px 0; border-top: 1px dotted var(--line); display: grid; gap: 8px; }
.day:first-child { border-top: 0; }
.day-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.day-top .muted { font-size: 14px; }
.day-saved { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 15px; }
.day-saved > span:first-child { flex: 1; min-width: 150px; }
.day .tag.honey { justify-self: start; }
.times { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; }
.times label { display: grid; gap: 3px; font-size: 13px; color: var(--taupe-dark); }
.times input { font-size: 16px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; width: 100%; min-width: 0; }
.calc { min-width: 74px; text-align: right; font-size: 14px; line-height: 1.3; }
.certify { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--ink); }
.certify input { width: 18px; height: 18px; accent-color: var(--taupe-dark); }
.day-btns { display: flex; justify-content: flex-end; align-items: center; gap: 16px; }
.total-row { display: flex; justify-content: space-between; border-top: 2px solid var(--line); margin-top: 6px; padding-top: 10px; font-size: 17px; }

.sched, .pay { list-style: none; margin: 0; padding: 0; }
.sched li { display: grid; grid-template-columns: 110px 1fr auto; gap: 8px; padding: 10px 0; border-top: 1px dotted var(--line); align-items: baseline; }
.sched li:first-child, .pay li:first-child { border-top: 0; }
.pay li { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px dotted var(--line); }
.pay li > div { display: grid; }
@media (max-width: 420px) { .sched li { grid-template-columns: 1fr auto; } .sched li span:nth-child(2) { grid-column: 1; font-size: 14px; color: var(--muted); } }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px;
  font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100% - 32px); text-align: center; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
