:root {
  /* Pure white app background to match the logo's own white background, with
     tiles/cards in an off-white "surface" tone so they still stand out
     against it rather than blending in completely. */
  --bg: #ffffff;
  --surface: #faf9f6;
  --ink: #211d33;
  --muted: #6e6580;
  --line: #e6e1ee;
  --accent: #147d82;
  --accent-ink: #ffffff;
  --open: #2f9e6e;
  --pending: #c07f2b;
  --booked: #ac3768;
  --radius: 10px;
  --max-width: 720px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}

a { color: var(--accent); }

header.site {
  position: relative;
  padding: 1.25rem 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  text-align: center;
}

.stylist-icon-btn {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  z-index: 10;
}
.stylist-icon-btn svg { fill: currentColor; }
.stylist-icon-btn:hover { color: var(--ink); border-color: var(--muted); }

.stylist-menu {
  position: absolute;
  top: 3.4rem;
  right: 0.9rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  z-index: 20;
  overflow: hidden;
}
.stylist-menu a {
  display: block;
  padding: 0.6rem 1rem;
  white-space: nowrap;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9rem;
}
.stylist-menu a:hover { background: var(--line); }

header.site .brand {
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.brand-logo {
  width: 80vw;
  max-width: 900px;
  height: auto;
  display: block;
}

nav.site-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 0.95rem;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.25rem 1rem 3rem;
}

h1, h2, h3 { line-height: 1.25; }

.card {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}

.card + .card { margin-top: 0.75rem; }

.hairdresser-list {
  display: grid;
  gap: 0.75rem;
}

/* ---------- Homepage-only: slim header, hero banner, stylist rows ---------- */
header.site.slim {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  padding: 0.85rem 3.4rem 0.85rem 1.1rem;
  gap: 0.75rem;
}
header.site.slim .brand { font-size: 1.05rem; width: auto; justify-content: flex-start; flex-shrink: 0; }
header.site.slim nav.site-nav { flex: 1; justify-content: flex-end; font-size: 0.9rem; gap: 0.9rem; }

.hero-image-wrap {
  width: 100%;
  line-height: 0;
}
.hero-image {
  display: block;
  width: 100%;
  height: auto;
}
.hero-sub {
  background: var(--ink);
  color: #fff;
  margin: 1.1rem auto 1.5rem;
  padding: 0.9rem 1.1rem;
  border-radius: 12px;
  font-size: 0.92rem;
  line-height: 1.4;
  text-align: center;
  max-width: 36ch;
}

.section-label {
  font-size: 1.05rem;
  margin: 0 0 0.75rem;
  color: var(--ink);
}

.stylist-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.stylist-row:hover { border-color: var(--accent); transform: translateY(-1px); }
.stylist-row:active { transform: translateY(0); }

.stylist-avatar {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--booked));
}
.stylist-row:nth-of-type(2n) .stylist-avatar { background: linear-gradient(135deg, var(--pending), var(--booked)); }

.stylist-row-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.stylist-row-name { font-weight: 600; font-size: 1.05rem; }
.stylist-row-bio {
  color: var(--muted);
  font-size: 0.88rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stylist-row .chevron { flex-shrink: 0; color: var(--muted); font-size: 1.5rem; line-height: 1; }

button, .btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  border: none;
  border-radius: 8px;
  padding: 0.6rem 1rem;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
button.secondary, .btn.secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
button.danger { background: var(--booked); }
button:disabled { opacity: 0.5; cursor: not-allowed; }

input, textarea, select {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--ink);
}

label { display: block; font-size: 0.9rem; color: var(--muted); margin: 0.6rem 0 0.25rem; }

form .row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
form .row > * { flex: 1; min-width: 130px; }

.blk-days {
  display: flex;
  gap: 0.3rem;
}

.day-toggle {
  flex: 1 1 0;
  min-width: 0;
  padding: 0.5rem 0.1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.85rem;
  font-family: inherit;
  text-align: center;
  cursor: pointer;
}

.day-toggle.active {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.block-tile {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 0.5rem;
  cursor: pointer;
}

.block-tile-info { display: flex; flex-direction: column; gap: 0.15rem; }
.block-tile-remove { flex-shrink: 0; padding: 0.35rem 0.7rem; font-size: 0.8rem; }

.week-card {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 0.6rem;
  overflow: hidden;
}

.week-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0.85rem;
  background: none;
  border: none;
  text-align: left;
  font-size: 0.95rem;
  font-weight: 600;
  color: inherit;
  cursor: pointer;
}

.week-header-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 400;
  font-size: 0.8rem;
  white-space: nowrap;
}

.week-chevron { font-size: 0.75rem; }

.week-body {
  padding: 0 0.85rem 0.85rem;
  border-top: 1px solid var(--line);
}
.week-body .day-group { margin-top: 0.75rem; }

.week-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.week-actions button { flex: 1; min-width: 140px; font-size: 0.85rem; padding: 0.5rem 0.6rem; }

.day-list { display: flex; flex-direction: column; gap: 0.9rem; }

.week-section-title {
  margin: 0 0 0.6rem;
  font-size: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.3rem;
}

.week-later-heading {
  margin: 0.4rem 0 -0.15rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.day-group h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.3rem;
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 0.5rem;
}

.slot {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.5rem 0.3rem;
  text-align: center;
  font-size: 0.9rem;
  background: var(--surface);
  cursor: pointer;
}
.slot.open { border-color: var(--open); color: var(--open); }
.slot.pending { border-color: var(--pending); color: var(--pending); cursor: not-allowed; opacity: 0.7; }
.slot.booked { border-color: var(--booked); color: var(--booked); cursor: not-allowed; opacity: 0.55; }
.slot.selected { background: var(--accent); color: #fff; border-color: var(--accent); }
/* Pending/booked slots are inert on the public booking page and the read-only "other
   stylist" calendar, but stay clickable on a stylist's own calendar (see .clickable). */
.slot[disabled]:not(.clickable), .slot.pending:not(.clickable), .slot.booked:not(.clickable) { pointer-events: none; }
.slot.pending.clickable, .slot.booked.clickable { cursor: pointer; opacity: 0.85; }

.badge {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.badge.pending { background: #fdf1cf; color: var(--pending); }
.badge.approved { background: #e2f3e5; color: var(--open); }
.badge.declined { background: #fbe6e6; color: var(--booked); }
.badge.cancelled { background: #eee; color: var(--muted); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.6rem;
}
.gallery-grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.socials { display: flex; gap: 0.75rem; margin-top: 0.5rem; flex-wrap: wrap; }

.error { color: var(--booked); font-size: 0.9rem; margin-top: 0.4rem; }
.success { color: var(--open); font-size: 0.9rem; margin-top: 0.4rem; }
.muted { color: var(--muted); font-size: 0.9rem; }

footer.site {
  text-align: center;
  padding: 1.5rem 1rem;
  color: var(--muted);
  font-size: 0.85rem;
}

@media (max-width: 480px) {
  .slot-grid { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
}

.slot.clickable { cursor: pointer; }

/* ---------- Stylist dashboard: bottom tab bar + screens ---------- */
.dash-screen { display: none; }
.dash-screen.active { display: block; }

body.has-bottom-nav main { padding-bottom: 5rem; }

.bottom-tabs {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0);
  z-index: 60;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}

.bottom-tabs button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  background: none;
  border: none;
  padding: 0.55rem 0.25rem 0.5rem;
  font-size: 0.72rem;
  color: var(--muted);
  cursor: pointer;
}

.bottom-tabs button .tab-icon { font-size: 1.3rem; line-height: 1; }

.bottom-tabs button.active { color: var(--accent); font-weight: 600; }

.segmented {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.segmented button {
  flex: 1;
  padding: 0.55rem 0.5rem;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 0.9rem;
  cursor: pointer;
}

.segmented button.active {
  background: var(--booked);
  color: var(--accent-ink);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(33, 29, 51, 0.55);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1.5rem 1rem;
  overflow-y: auto;
  z-index: 100;
}

.modal-box {
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 1.25rem;
  max-width: 420px;
  width: 100%;
  margin-top: 2rem;
}

.modal-box h3 { margin-top: 0; }
