/* Owner page: phone-first, one column, the same standard look as the booking page for every business:
   light grey page, white cards, black buttons, RYTE blue for counts, ticks and focus. Loads after base.css. */
:root {
  --bg: #f6f6f8; --surface: #ffffff; --ink: #0d0d12; --muted: #6e6e7a; --line: #ececf1;
  --accent: #0d0d12; --accent-ink: #ffffff; /* base.css solid buttons and picks: black, like the booking page */
  --pick: #0276df; --pick-ink: #ffffff; --pick-soft: #e8f2fd; --pick-text: #0160b8; /* darker blue for text on --pick-soft (5.5:1) */
  --soft: color-mix(in srgb, var(--ink) 5%, var(--surface));
  --warn-bg: #fdf1dc; --warn-ink: #7a4700;
  --display: "Plus Jakarta Sans", system-ui, sans-serif; --body: "Plus Jakarta Sans", system-ui, sans-serif;
  --ease: cubic-bezier(.32, .72, 0, 1); --r: 22px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 14px 36px -22px rgba(0, 0, 0, .22);
}
body { padding: 0 16px 120px; font-size: 15px; line-height: 1.5; }
h1, h2, h3 { font-weight: 800; letter-spacing: -.03em; line-height: 1.15; }
.wrap { max-width: 760px; margin: 0 auto; }

/* Buttons and fields, restyled from base.css */
.btn { font-weight: 700; transition: transform .3s var(--ease), background .2s, opacity .2s; }
.btn:hover { transform: none; }
.btn:active { transform: scale(.97); }
.btn-solid:hover { background: #2a2a33; }
/* Secondary buttons, everywhere (Edit, Remove, Cancel, No-show…): white with a thin line, one height (as .bk-mini). */
:root { --btn-line: #d6d6de; } :root[data-theme="dark"] { --btn-line: rgba(255, 255, 255, .18); } /* visible on white panels too */
.btn-ghost { background: var(--surface); border-color: transparent; box-shadow: inset 0 0 0 1px var(--btn-line); }
.btn-ghost:hover { background: var(--soft); }
.btn-small { min-height: 36px; padding: 8px 15px; font-size: 13.5px; }
.btn-light { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); }
.field > label, .field > legend, .label-like { font: 600 14px/1.3 var(--body); letter-spacing: 0; text-transform: none; }
.opt { letter-spacing: 0; font-weight: 500; }
.input { border-color: transparent; border-radius: 14px; background: var(--soft); transition: box-shadow .2s, background .2s; }
select.input { background-color: var(--soft); }
.input:focus { outline: none; background-color: var(--surface); box-shadow: inset 0 0 0 2px var(--pick); }
.hint { font-size: 14px; }

/* Top bar: the business's initials and name, like the booking page */
.bar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 62px; margin: 0 -16px; padding: 0 16px; background: color-mix(in srgb, var(--bg) 90%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; font: 800 17px/1.2 var(--body); letter-spacing: -.02em; }
.brand i { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 11px; background: var(--ink); color: var(--surface); font-style: normal; font-size: 12px; }
.page-title { margin: 18px 0 4px; font-size: 26px; }
.demo-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-top: 8px; padding: 10px 16px; border: 1px dashed color-mix(in srgb, var(--ink) 16%, transparent); border-radius: 14px; font-size: 13px; color: var(--muted); }
.link { border: 0; background: none; color: var(--ink); font: 700 13px/1 var(--body); text-decoration: underline; cursor: pointer; }

/* Section switcher: white pills, the open one black */
.views { display: flex; gap: 6px; margin: 18px 0 8px; overflow-x: auto; scrollbar-width: none; }
.views::-webkit-scrollbar { display: none; }
.view-btn { display: inline-flex; align-items: center; gap: 8px; flex: none; height: 40px; padding: 0 16px; border: 0; border-radius: 99px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); font: 600 14px/1 var(--body); cursor: pointer; transition: background .25s, color .25s; }
.view-btn[aria-pressed="true"] { background: var(--ink); box-shadow: none; color: var(--surface); }
.count:not(:empty) { display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--pick); color: var(--pick-ink); font-size: 11.5px; font-weight: 700; }
.panel-title { margin: 22px 0 14px; font-size: 24px; outline: none; }

/* Cards */
.cards { display: grid; gap: 12px; }
.card { padding: 20px 22px; border: 0; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); }
.card h3 { font-size: 19px; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.badge { padding: 5px 10px; border-radius: 99px; background: var(--pick-soft); color: var(--pick-text); font-size: 12px; font-weight: 700; }
.ago { font-size: 13px; color: var(--muted); }
.when { margin-top: 4px; font-weight: 700; }
.who { margin-top: 6px; color: var(--muted); font-size: 14.5px; }
.who a { color: var(--ink); font-weight: 600; white-space: nowrap; }
.note { margin-top: 8px; padding: 10px 14px; border-radius: 14px; background: var(--soft); font-size: 14.5px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.empty p:first-child { font-weight: 700; }
.unavail { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.unavail-card { width: min(440px, 100%); padding: 32px 28px; text-align: center; }
.unavail-logo { margin: 0 0 18px; font: 800 30px/1 var(--body); letter-spacing: -.06em; } .unavail-logo small { display: block; margin-top: 6px; font-size: 12px; font-weight: 600; letter-spacing: 0; color: var(--muted); }
.unavail-card h1 { margin: 0 0 8px; font-size: 22px; letter-spacing: -.02em; } .unavail-card .hint { margin: 0 0 18px; }
.empty.card { background: var(--soft); box-shadow: none; text-align: center; padding: 28px 20px; } /* like the Bookings tab's empty days */
.day-head { margin: 22px 0 10px; font: 700 13px/1.2 var(--body); color: var(--muted); }
.booking { display: grid; grid-template-columns: 76px 1fr auto; align-items: center; gap: 14px; }
.booking-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; }
.booking-acts:empty { display: none; }
.badge.no-show { background: color-mix(in srgb, #c0392b 12%, var(--surface)); color: #b3261e; }
.booking.is-no-show .slot, .booking.is-no-show h3 { opacity: .55; }
.slot { font: 800 18px/1 var(--body); letter-spacing: -.02em; }
.slot small { display: block; margin-top: 3px; font: 500 13px/1.2 var(--body); letter-spacing: 0; color: var(--muted); }

/* Hours */
.settings { display: grid; gap: 14px; }
.settings .card { display: grid; gap: 12px; }
.settings legend { float: left; width: 100%; margin-bottom: 4px; }
.hours-row { display: grid; grid-template-columns: 150px 1fr auto 1fr 36px; align-items: center; gap: 10px; }
.row-end { width: 36px; }
.hours-row .input { min-width: 0; padding: 10px 12px; }
.day-toggle { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.day-toggle input, .check input { width: 20px; height: 20px; accent-color: var(--pick); }
.to { color: var(--muted); font-size: 14px; }
.rules { display: grid; grid-template-columns: 1fr 1fr; gap: 16px !important; }
.policy-preview { padding: 10px 14px; border-radius: 12px; background: var(--soft); font-size: 14px; }
.off-add { display: flex; gap: 10px; }
.off-add .input { max-width: 220px; }
.off-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.off-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 4px 4px 14px; border-radius: 99px; background: var(--soft); font-size: 14px; }
.off-chip button { display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 50%; background: transparent; color: var(--ink); font-size: 18px; cursor: pointer; }
.off-chip button:hover { background: var(--surface); }
.off-closed { background: var(--pick-soft); color: var(--pick-text); font-weight: 600; }
.off-closed button { color: var(--pick-text); }
.save-row { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.saved { color: var(--muted); font-size: 14px; }
.breaks-list { display: grid; gap: 10px; }
.break-row { margin-top: 2px; }
.break-label { font-weight: 600; }
.break-remove { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--soft); color: var(--ink); font-size: 18px; cursor: pointer; }
.add-break { justify-self: start; }
.alert-input { max-width: 340px; }

/* Special dates and closed periods */
.special-add { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.special-add > .input { width: auto; }
.mini { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.mini .input { width: auto; color: var(--ink); }
.mini[hidden] { display: none; }
.month-head { margin: 16px 0 8px; font-size: 13px; font-weight: 700; letter-spacing: 0; color: var(--muted); }
.special-hours { display: inline-flex; align-items: center; gap: 8px; }
.special-hours .input { width: 130px; padding: 10px 12px; }
.clash { margin-top: 12px; padding: 14px 16px; border-radius: 16px; background: var(--warn-bg); color: var(--warn-ink); }
.clash b { color: var(--ink); }
.clash-list { display: grid; gap: 10px; margin-top: 10px; list-style: none; }
.clash-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding-top: 10px; border-top: 1px solid color-mix(in srgb, var(--warn-ink) 18%, transparent); color: var(--ink); }
.clash-item > .actions { margin-top: 0; }
.clash-item .compose { flex-basis: 100%; }
.clash .btn-ghost { background: var(--surface); }

/* Services */
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.svc-intro { margin: -6px 0 14px; }
.svc-status:not(:empty) { margin-bottom: 12px; }
.svc-group h3 { margin: 0; }
.group-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.group-rename { display: grid; gap: 6px; margin-bottom: 10px; }
.group-rename-row { display: flex; gap: 8px; align-items: center; }
.group-rename-row .input { flex: 1; min-width: 0; }
.move { display: inline-flex; gap: 4px; margin-right: 4px; }
.btn-arrow { width: 38px; min-height: 38px; padding: 0; font-size: 16px; }
.btn-arrow:disabled { opacity: .3; cursor: default; }
.svc-confirm { align-items: center; }
.svc-confirm p { font-size: 14.5px; }
.svc-three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 16px; }
.svc-list { list-style: none; }
.svc { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.svc:first-child { border-top: 0; }
.svc-text b { font-weight: 700; }
.svc-meta { display: block; font-size: 13.5px; color: var(--muted); }
.svc-text .hint { font-size: 13.5px; margin-top: 2px; }
.svc-actions { display: flex; gap: 6px; flex: none; }
.svc-form { margin-bottom: 14px; box-shadow: inset 0 0 0 2px var(--pick), var(--shadow); }
.svc-form h3 { margin-bottom: 12px; }
.svc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; align-items: start; }
.svc-wide { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 10px; align-self: end; min-height: 46px; font-size: 15px; cursor: pointer; }
.extra-rows { display: grid; gap: 8px; }
.extra-rows:not(:empty) { margin-bottom: 10px; }
.extra-row { display: grid; grid-template-columns: minmax(0, 1fr) 150px 96px 40px; gap: 8px; align-items: center; }
.extra-remove { width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--ink); font-size: 20px; cursor: pointer; }
.extra-remove:hover { background: var(--soft); }
.add-extra { justify-self: start; }

/* Cancel: edit the message before it goes */
.compose { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.booking .compose { grid-column: 1 / -1; }
.compose textarea { min-height: 110px; }

/* Live mode: login card */
.login { display: grid; justify-items: start; gap: 14px; margin-top: 14px; }
.login .field { width: 100%; }
.login-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.login .err:empty { display: none; }

/* Text preview with "Send from my phone" (blue, so it stands out on the black notice) */
.toast { position: fixed; inset: auto 16px 16px; z-index: 30; display: flex; justify-content: center; pointer-events: none; }
.toast-in { position: relative; width: min(460px, 100%); padding: 16px 52px 16px 18px; border-radius: 20px; background: var(--ink); color: var(--surface); box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .5); pointer-events: auto; animation: toast-in .35s var(--ease); }
.toast-in p + p { margin-top: 6px; }
.toast-to { font-size: 12px; font-weight: 600; opacity: .7; }
.bubble { padding: 10px 14px; border-radius: 16px 16px 16px 4px; background: color-mix(in srgb, var(--surface) 14%, var(--ink)); font-size: 15px; line-height: 1.45; }
.toast-note { font-size: 12px; opacity: .65; }
.toast-send { margin-top: 10px; background: var(--pick); color: var(--pick-ink); }
.toast-send:hover { background: #0466c2; }
.toast-send:focus-visible { outline-color: var(--surface); }
.toast-x { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 20px; cursor: pointer; }
.toast-x:focus-visible { outline-color: var(--surface); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }

@media (max-width: 600px) {
  .views { display: flex; gap: 4px; overflow: visible; }
  .views .view-btn { flex: 1 1 auto; min-width: 0; padding: 0 6px; font-size: 12.5px; }
  .view-btn { justify-content: center; gap: 4px; padding: 0 4px; font-size: 13.5px; }
  .count:not(:empty) { min-width: 18px; height: 18px; padding: 0 4px; font-size: 11px; }
  .card { padding: 18px; }
  .booking { grid-template-columns: 1fr auto; }
  .booking .slot { grid-column: 1 / -1; }
  /* Phones: the day (or break) on its own line, the two times share the next; a break's × sits beside its name */
  .hours-row { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px; }
  .hours-row .input { padding: 10px 8px; }
  .hours-row .row-end { display: none; }
  .break-remove { position: relative; grid-row: 1; grid-column: 3; justify-self: end; }
  .day-toggle { grid-column: 1 / -1; grid-row: 1; }
  .rules { grid-template-columns: 1fr; }
  .svc { flex-direction: column; gap: 8px; }
  .svc-grid { grid-template-columns: 1fr; }
  .svc-three { grid-template-columns: 1fr 1fr; }
  .svc-three [data-amount] { grid-column: 1 / -1; }
  .svc-actions { flex-wrap: wrap; }
  .extra-row { grid-template-columns: minmax(0, 1fr) 96px 40px; }
  .extra-row [name="extraName"] { grid-column: 1 / -1; }
  .special-add > .input, .special-add .btn, .special-add .mini { width: 100%; }
  .mini .input { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Team (team.js) */
.team-form .check { align-self: auto; min-height: 36px; }
.team-hours { display: grid; gap: 8px; margin-top: 8px; }
.team-services { display: grid; gap: 2px; margin-top: 4px; }
.team-group { margin: 10px 0 2px; color: var(--muted); }
.team-off-list { margin-bottom: 10px; }
.svc-meta.team-times { color: var(--ink); } /* the hours stand out from role and services */

/* Team sign-ins and roles */
.svc-meta.team-signin { color: var(--pick-text); }
.roles-root { margin: 0; } /* inside the Team tab's Roles fold */
.roles-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 6px; }
.roles-title { margin: 0; }
.access-remove { margin-top: 12px; color: var(--muted); }
.access-resend { padding: 0; border: 0; background: none; font: inherit; font-weight: 700; color: var(--pick-text); text-decoration: underline; cursor: pointer; }
.access-form .svc-confirm { margin-top: 14px; padding: 14px; border-radius: 14px; background: var(--soft); }
/* Roles table: a column per role, pills for what they see, switches for what they change */
.roles-scroll { overflow-x: auto; }
.roles-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.roles-table th, .roles-table td { padding: 12px 10px; text-align: center; vertical-align: middle; border-bottom: 1px solid var(--line); }
.roles-table tbody th[scope="row"] { text-align: left; padding-left: 0; font-weight: 400; min-width: 190px; }
.roles-table tbody th b { display: block; font-weight: 700; }
.roles-table tbody th span { display: block; color: var(--muted); font-size: 12.5px; }
.roles-table thead th { font-weight: 800; white-space: nowrap; padding-bottom: 14px; }
.roles-table thead th small { display: block; margin-top: 2px; font-weight: 500; font-size: 12px; color: var(--muted); }
.roles-table thead .link { font-size: 12px; font-weight: 700; color: var(--pick-text); padding: 0; }
.roles-table .role-group th { padding: 20px 0 6px; border-bottom: 0; text-align: left; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.roles-table tr:last-child > * { border-bottom: 0; }
.role-people { display: flex; align-items: center; justify-content: center; gap: 0; margin-top: 8px; font-weight: 600; font-size: 12px; color: var(--ink); white-space: nowrap; }
.role-people .pic + .pic { margin-left: -5px; } .role-people .pic { box-shadow: 0 0 0 2px var(--surface); }
.role-people em { font-style: normal; margin-left: 6px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.role-people.none { color: var(--muted); font-weight: 500; }
.role-owner span { color: var(--muted); font-weight: 700; font-size: 12.5px; white-space: nowrap; }
.role-owner i { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--pick-soft); color: var(--pick-text); font-style: normal; font-weight: 800; font-size: 13px; }
/* The labels stay put when many roles scroll sideways */
.roles-table tbody th[scope="row"], .roles-table thead td:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: 8px 0 8px -8px rgba(13,13,18,.12); }
.roles-table .role-group th { box-shadow: none; } .roles-table .role-group span { display: inline-block; position: sticky; left: 0; color: var(--muted); font-size: 11px; }
.role-seg { white-space: nowrap; }
.role-seg { display: inline-flex; padding: 3px; border-radius: 99px; background: var(--soft); }
.role-seg button { height: 28px; padding: 0 12px; border: 0; border-radius: 99px; background: none; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--muted); cursor: pointer; transition: background .2s, color .2s; }
.role-seg button[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.role-seg button:disabled { cursor: default; } .role-seg button:disabled:not([aria-pressed="true"]) { opacity: .45; }
.role-sw { position: relative; width: 42px; height: 24px; border: 0; border-radius: 99px; background: color-mix(in srgb, var(--muted) 38%, transparent); cursor: pointer; transition: background .25s cubic-bezier(.32,.72,0,1); }
.role-sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .25s cubic-bezier(.32,.72,0,1); }
.role-sw[aria-checked="true"] { background: var(--pick); } .role-sw[aria-checked="true"]::after { transform: translateX(18px); }
.role-sw:disabled { opacity: .4; cursor: default; }
.role-sw:focus-visible, .role-seg button:focus-visible { outline: 2px solid var(--pick); outline-offset: 2px; }
.roles-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.roles-foot > .hint { margin: 0; }
.roles-save { display: flex; align-items: center; gap: 8px; } .roles-save[hidden] { display: none; }
.roles-save .hint { margin: 0 4px 0 0; color: var(--pick-text); font-weight: 700; }
.role-removed .link { padding: 0; color: var(--pick-text); font: inherit; font-weight: 700; text-decoration: underline; }
.role-form .role-form-hint { margin: -4px 0 14px; }
.role-combo { position: relative; }
.role-suggest { position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; border-radius: 14px; background: var(--surface); box-shadow: 0 0 0 1px var(--line), 0 18px 40px -18px rgba(13,13,18,.35); }
.role-suggest li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 12px; border-radius: 10px; cursor: pointer; }
.role-suggest li span { color: var(--muted); font-size: 12px; text-align: right; }
.role-suggest li:hover, .role-suggest li[aria-selected="true"] { background: var(--pick-soft); }
.role-suggest li[aria-selected="true"] b { color: var(--pick-text); }
.role-suggest li.role-own { margin-bottom: 4px; box-shadow: 0 1px 0 var(--line); border-radius: 10px 10px 0 0; }
.role-suggest li.role-own b { color: var(--pick-text); }
.role-suggest li.role-taken { cursor: default; opacity: .5; } .role-suggest li.role-taken:hover { background: none; }
.role-suggest li.role-suggest-note { display: block; cursor: default; padding: 8px 12px 4px; color: var(--muted); font-size: 12px; }
.role-suggest li.role-suggest-note:hover { background: none; }
@media (prefers-reduced-motion: reduce) { .role-sw, .role-sw::after, .role-seg button { transition: none; } }
.me-card .label-like { margin: 14px 0 2px; color: var(--muted); font-size: 13.5px; }
.me-card .label-like:first-child { margin-top: 0; }
.me-card .team-times { color: var(--ink); }
.asks { margin-bottom: 16px; border: 1px solid var(--pick-soft); }
.me-pending { margin: 0 0 14px; padding: 12px 14px; border-radius: 14px; background: var(--pick-soft); color: var(--pick-text); font-size: 14px; }
.access-form > .hint, .access-form > h3 + .hint { margin: 0 0 14px; }

/* Between logging in and the page: blank, with a line that only shows if loading takes a while */
.page-loading { margin: 30vh 0 0; text-align: center; color: var(--muted); font-size: 14px; opacity: 0; animation: page-loading-in .3s ease .4s forwards; }
@keyframes page-loading-in { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .page-loading { animation: none; opacity: 1; } }
