/* Five Star Bath Solutions of Ottawa — customer-facing design system.
   Used by the customer portal and the printable invoice. Deliberately separate from the
   staff console's style.css: this one carries the brand, that one carries density.

   Brand: deep navy for authority, a five-star gold for the marks that matter, and a single
   blue for anything the customer can act on. Everything else is paper, ink and rule. */

:root {
  --navy: #0b2545;
  --navy-700: #123a63;
  --navy-050: #eef3f9;
  --blue: #1668b3;
  --blue-dark: #11548f;
  --gold: #d9a227;
  --gold-soft: #fdf5e3;
  --paper: #f5f7fa;
  --ink: #16222e;
  --ink-soft: #566272;
  --line: #dde3ea;
  --green: #1e7a3d;
  --green-soft: #e6f3ea;
  --amber: #b5680a;
  --amber-soft: #fdf3e3;
  --red: #b3261e;
  --red-soft: #fdeeed;
  --radius: 14px;
  --tap: 48px;
  --shadow: 0 1px 3px rgba(11, 37, 69, .06), 0 8px 24px rgba(11, 37, 69, .06);
  font-size: 17px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { color: var(--navy); line-height: 1.2; letter-spacing: -.015em; margin: 0 0 .4rem; }
h1 { font-size: 1.75rem; font-weight: 800; }
h2 { font-size: 1.3rem; font-weight: 700; margin-top: 2rem; }
h3 { font-size: 1.02rem; font-weight: 700; }
p { margin: .4rem 0; }
a { color: var(--blue-dark); text-decoration-thickness: 1px; text-underline-offset: 2px; }

.small { font-size: .875rem; color: var(--ink-soft); }
.muted { color: var(--ink-soft); }
.strong { font-weight: 700; color: var(--ink); }
.nowrap { white-space: nowrap; }
.center { text-align: center; }

/* --- Wordmark ------------------------------------------------------------ */
.wordmark {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--navy);
  font-size: 1.05rem;
}
.wordmark .stars { color: var(--gold); letter-spacing: .08em; font-size: .8rem; }
.app-bar .wordmark, .app-bar .wordmark .stars { color: #fff; }
.app-bar .wordmark .stars { color: var(--gold); }

/* --- App bar ------------------------------------------------------------- */
.app-bar {
  background: var(--navy);
  color: #fff;
  padding: .85rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 30;
}
.app-bar .sub { display: block; font-weight: 500; font-size: .74rem; opacity: .8; letter-spacing: .02em; }
.call-btn {
  background: var(--gold);
  color: #26200c;
  text-decoration: none;
  padding: .55rem 1rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: .9rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  white-space: nowrap;
}
.call-btn:hover { background: #e8b23c; }

/* --- Section nav --------------------------------------------------------- */
.nav {
  display: flex;
  gap: .25rem;
  overflow-x: auto;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: .45rem .75rem;
  position: sticky;
  top: 61px;
  z-index: 25;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav button {
  border: none;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: .92rem;
  font-weight: 700;
  border-radius: 999px;
  padding: .5rem .95rem;
  white-space: nowrap;
  cursor: pointer;
  min-height: 42px;
  position: relative;
}
.nav button:hover { color: var(--navy); background: var(--navy-050); }
.nav button[aria-selected="true"] { background: var(--navy); color: #fff; }
.nav .dot {
  display: inline-block; min-width: 20px; height: 20px; line-height: 20px;
  border-radius: 999px; background: var(--gold); color: #26200c;
  font-size: .72rem; font-weight: 800; margin-left: .4rem; padding: 0 .3rem;
}

.wrap { max-width: 780px; margin: 0 auto; padding: 1.5rem 1.15rem 4rem; }
.view { display: none; }
.view.active { display: block; animation: fade .18s ease-out; }
@keyframes fade { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

/* --- Cards --------------------------------------------------------------- */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}
.card.flush { padding: 0; overflow: hidden; }
.card-head {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
}
.card-head h3 { margin: 0; }
.card-body { padding: 1.15rem 1.25rem; }
.card.accent { border-left: 5px solid var(--gold); }
.card.action { border: 2px solid var(--gold); background: var(--gold-soft); }
.card.alert { border-left: 5px solid var(--red); background: var(--red-soft); }

/* Hero: the one thing the customer wants to know on arrival. */
.hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-700) 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 1.6rem 1.4rem;
  margin-bottom: 1.15rem;
  box-shadow: var(--shadow);
}
.hero h1 { color: #fff; font-size: 1.5rem; margin-bottom: .15rem; }
.hero .sub { opacity: .82; font-size: .92rem; }
.hero .headline { font-size: 1.15rem; font-weight: 700; margin-top: 1rem; }
.hero .meta { opacity: .85; font-size: .92rem; }

/* --- Timeline ------------------------------------------------------------ */
.timeline { list-style: none; margin: .5rem 0 0; padding: 0; }
.timeline li {
  position: relative;
  padding: 0 0 1.15rem 1.9rem;
  color: var(--ink-soft);
  font-size: .95rem;
}
.timeline li::before {
  content: "";
  position: absolute; left: 0; top: .32rem;
  width: 13px; height: 13px; border-radius: 50%;
  background: #fff; border: 2px solid var(--line);
}
.timeline li::after {
  content: "";
  position: absolute; left: 6px; top: 1.1rem; bottom: -.15rem;
  width: 2px; background: var(--line);
}
.timeline li:last-child::after { display: none; }
.timeline li.done { color: var(--ink); }
.timeline li.done::before { background: var(--green); border-color: var(--green); }
.timeline li.done::after { background: var(--green); }
.timeline li.now { color: var(--navy); font-weight: 800; }
.timeline li.now::before { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }

/* --- Pills --------------------------------------------------------------- */
.pill {
  display: inline-block;
  font-size: .78rem; font-weight: 800; letter-spacing: .01em;
  padding: .22rem .7rem; border-radius: 999px;
  background: var(--navy-050); color: var(--navy-700);
  white-space: nowrap;
}
.pill-ok { background: var(--green-soft); color: var(--green); }
.pill-wait { background: var(--amber-soft); color: var(--amber); }
.pill-due { background: var(--red-soft); color: var(--red); }
.pill-gold { background: var(--gold-soft); color: #8a6412; }

/* --- Rows and lists ------------------------------------------------------ */
.row-item {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: .85rem 1.25rem; border-bottom: 1px solid var(--line);
}
.row-item:last-child { border-bottom: none; }
.row-item .lead { min-width: 0; }
.row-item .lead b { display: block; }
.money { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.money-big { font-size: 1.65rem; font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: .45rem 1.25rem; font-size: .95rem; }
.kv dt { color: var(--ink-soft); }
.kv dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.kv dd.total { border-top: 2px solid var(--navy); padding-top: .45rem; font-size: 1.1rem; font-weight: 800; color: var(--navy); }
.kv dt.total { border-top: 2px solid var(--navy); padding-top: .45rem; font-weight: 800; color: var(--navy); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
@media (max-width: 560px) { .grid-2 { grid-template-columns: 1fr; } }
.stack { display: flex; flex-direction: column; gap: .6rem; }
.inline { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: .75rem; }

/* --- Buttons ------------------------------------------------------------- */
button, .btn {
  font: inherit; font-size: .97rem; font-weight: 700;
  min-height: var(--tap);
  padding: .6rem 1.2rem;
  border-radius: 10px;
  border: 2px solid var(--navy);
  background: #fff; color: var(--navy);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  text-decoration: none;
  transition: background .12s ease, border-color .12s ease;
}
.btn:hover { background: var(--navy-050); }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #26200c; }
.btn-gold:hover { background: #e8b23c; border-color: #e8b23c; }
.btn-quiet { border-color: var(--line); color: var(--ink-soft); }
.btn-quiet:hover { background: var(--paper); }
.btn-block { width: 100%; }
.btn-sm { min-height: 38px; padding: .35rem .85rem; font-size: .88rem; border-width: 1.5px; }
button:disabled { opacity: .45; cursor: not-allowed; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--blue); outline-offset: 2px;
}

/* --- Forms --------------------------------------------------------------- */
label { display: block; font-weight: 700; margin: .95rem 0 .3rem; font-size: .95rem; }
input[type=text], input[type=email], input[type=tel], input[type=date], input[type=number], select, textarea {
  width: 100%; font: inherit; font-size: 1rem;
  padding: .65rem .75rem; min-height: var(--tap);
  border: 2px solid var(--line); border-radius: 9px;
  background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { border-color: var(--blue); }
textarea { min-height: 100px; resize: vertical; }
.check { display: inline-flex; align-items: center; gap: .5rem; font-weight: 500; margin: .35rem .75rem .35rem 0; }
.check input { width: auto; min-height: auto; }
.hint { font-size: .85rem; color: var(--ink-soft); margin-top: .25rem; }

/* --- Notices ------------------------------------------------------------- */
.notice {
  border-radius: 12px; padding: .85rem 1.1rem; margin-bottom: 1rem; font-size: .93rem;
  border: 1px solid var(--line); background: #fff;
}
.notice-warn { background: var(--amber-soft); border-color: #f0d9a8; }
.notice-ok { background: var(--green-soft); border-color: #bfe0c9; color: #14522a; font-weight: 700; }
.notice-alert { background: var(--red-soft); border-color: #f0c4c1; }

/* --- Trust strip: the promises the brand actually makes ------------------ */
.trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; margin: 1rem 0; }
.trust div {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: .9rem 1rem; text-align: center;
}
.trust b { display: block; color: var(--navy); font-size: .95rem; }
.trust span { font-size: .82rem; color: var(--ink-soft); }

.footer {
  text-align: center; color: var(--ink-soft); font-size: .85rem;
  padding: 2rem 1rem 1rem; border-top: 1px solid var(--line); margin-top: 2rem;
}
.footer .wordmark { justify-content: center; margin-bottom: .5rem; }
