/* Customer account (/account) and staff area (/staff). Uses the tokens from styles.css. */

/* Components below set display: flex/grid, which would otherwise beat the hidden attribute. */
[hidden] { display: none !important; }

.portal-wrap { padding-top: 34px; padding-bottom: 80px; }
.portal { max-width: 780px; margin: 0 auto; }
.portal__loading { color: var(--muted); text-align: center; padding: 40px 0; }
.portal__privacy { max-width: 780px; margin: 22px auto 0; font-size: .88rem; color: var(--muted); text-align: center; }
.portal__hello { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; color: var(--ocean-900); font-weight: 600; }

.panel { padding: 28px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel + .panel { margin-top: 18px; }
.panel__title { font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; letter-spacing: .02em; color: var(--ocean-900); }
.panel__lead { margin-top: 6px; color: var(--muted); }
.step { margin-top: 26px; font-family: var(--font-display); font-weight: 600; font-size: 1.08rem; letter-spacing: .02em; color: var(--ocean-900); }

.field { display: grid; gap: 6px; margin-top: 16px; }
.field__label { font-weight: 600; font-size: .95rem; color: var(--ocean-900); }
.field__hint { font-size: .9rem; color: var(--muted); }
.input, .select, .textarea { width: 100%; padding: 11px 13px; font: inherit; color: var(--ink); background: #fff; border: 1px solid #c3d3d9; border-radius: 10px; }
.input:focus, .select:focus, .textarea:focus { outline: 3px solid rgba(57, 154, 176, .28); outline-offset: 0; border-color: var(--aqua-deep); }
.input--code { max-width: 250px; font-size: 1.5rem; font-weight: 700; letter-spacing: .4em; text-align: center; }
.textarea { resize: vertical; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 18px; }

.msg { margin-top: 14px; padding: 12px 14px; border-radius: 10px; font-size: .97rem; }
.msg--error { background: #fdecec; color: #8a1f1f; border: 1px solid #f1c2c2; }
.msg--ok { background: #e8f5ee; color: #1b5a3c; border: 1px solid #bde2cd; }
.msg--info { background: #eef6f9; color: var(--ocean-900); border: 1px solid #cde2e9; }

.linkbtn { padding: 0; font: inherit; font-weight: 600; color: var(--aqua-deep); text-decoration: underline; background: none; border: 0; cursor: pointer; }
.linkbtn:disabled { color: var(--muted); text-decoration: none; cursor: default; }
.btn { cursor: pointer; font-family: inherit; }
.btn:disabled { opacity: .55; cursor: default; }
.btn--danger { background: #fff; border-color: #e0a1a1; color: #8a1f1f; }
.btn--danger:hover { background: #fdecec; }
.muted { color: var(--muted); }

.tabs { display: flex; gap: 4px; margin: 6px 0 4px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.tab { padding: 12px 14px; font: inherit; font-weight: 600; color: var(--muted); white-space: nowrap; background: none; border: 0; border-bottom: 3px solid transparent; cursor: pointer; }
.tab:hover { color: var(--ocean-900); }
.tab[aria-selected="true"] { color: var(--ocean-900); border-bottom-color: var(--aqua); }

.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin-top: 12px; }
.choice { padding: 14px 16px; font: inherit; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.choice:hover { border-color: var(--aqua); }
.choice[aria-pressed="true"] { border-color: var(--aqua-deep); box-shadow: 0 0 0 2px rgba(42, 114, 136, .25); }
.choice__name { display: block; font-weight: 700; color: var(--ocean-900); }
.choice__meta { display: block; margin-top: 2px; font-size: .9rem; color: var(--muted); }

.week { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.days { display: grid; flex: 1; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.day { padding: 8px 2px; font: inherit; line-height: 1.2; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.day small { display: block; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.day strong { display: block; font-size: 1.05rem; color: var(--ocean-900); }
.day:disabled { opacity: .38; cursor: default; }
.day[aria-pressed="true"] { background: var(--ocean); border-color: var(--ocean); }
.day[aria-pressed="true"] small, .day[aria-pressed="true"] strong { color: #fff; }
.navbtn { flex: none; width: 40px; height: 40px; font-size: 1.2rem; line-height: 1; color: var(--ocean-900); background: #fff; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.navbtn:disabled { opacity: .35; cursor: default; }

.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 12px; }
.slot { padding: 9px 6px; font: inherit; font-weight: 600; color: var(--ocean-900); background: #f4fafb; border: 1px solid #bcd6de; border-radius: 999px; cursor: pointer; }
.slot:hover { border-color: var(--aqua-deep); }
.slot[aria-pressed="true"] { color: #fff; background: var(--aqua-deep); border-color: var(--aqua-deep); }

.summary { margin-top: 12px; padding: 14px 18px; background: var(--mist); border-radius: 12px; }
.summary p + p { margin-top: 4px; }
.summary strong { color: var(--ocean-900); }

.appts { display: grid; gap: 12px; margin-top: 14px; }
.appt { display: grid; gap: 2px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; }
.appt--past { background: #fafcfc; }
.appt__when { font-weight: 700; color: var(--ocean-900); }
.appt__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.appt__actions .msg { flex-basis: 100%; }
.badge { display: inline-block; padding: 2px 9px; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--mist); border-radius: 999px; vertical-align: 1px; }
.badge--ok { color: #1b5a3c; background: #e8f5ee; }
.badge--off { color: #8a1f1f; background: #fdecec; }
.badge--warn { color: #6d4d00; background: #fdf3d6; }

details.more { margin-top: 22px; }
details.more > summary { font-weight: 600; color: var(--aqua-deep); cursor: pointer; }

@media (max-width: 560px) {
  .panel { padding: 20px 16px; }
  .days { gap: 4px; }
  .navbtn { width: 32px; height: 36px; }
  .choices { grid-template-columns: 1fr; }
}

/* ---------- Staff area ---------- */
.staffbar { position: sticky; top: 0; z-index: 20; background: var(--ocean-900); color: #fff; }
.staffbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; height: 60px; }
.staffbar__brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-family: var(--font-display); font-weight: 600; letter-spacing: .05em; }
.staffbar__brand img { width: 36px; height: 36px; }
.staffbar__who { display: flex; align-items: center; gap: 12px; font-size: .92rem; color: #d6e0ec; }
.staffbar .linkbtn { color: var(--sun-soft); }
.staff-main { padding: 26px 0 70px; }
.staff-main .panel { max-width: none; }
.staff-tabs { position: sticky; top: 60px; z-index: 10; background: #fff; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.toolbar .input, .toolbar .select { width: auto; }
.daygroup { margin-top: 22px; }
.daygroup__title { font-family: var(--font-display); font-weight: 600; color: var(--ocean-900); padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.item { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 12px 4px; border-bottom: 1px solid #edf2f3; }
.item__time { font-weight: 700; color: var(--ocean-900); }
.item__time small { display: block; font-weight: 400; color: var(--muted); }
.item__who { font-weight: 600; }
.item__meta { font-size: .92rem; color: var(--muted); }
.item__note { margin-top: 4px; font-size: .92rem; padding: 6px 10px; background: var(--mist); border-radius: 8px; }
.item__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.item--cancelled { opacity: .6; }
.item--block .item__who { color: #6d4d00; }
.table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: .95rem; }
.table th { text-align: left; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 8px 8px; border-bottom: 1px solid var(--line); }
.table td { padding: 10px 8px; border-bottom: 1px solid #edf2f3; vertical-align: top; }
.table tr.is-link { cursor: pointer; }
.table tr.is-link:hover td { background: #f5fafb; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; }
.svcrow { padding: 16px 0; border-bottom: 1px solid var(--line); }
.svcrow__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.svcrow__name { font-weight: 700; color: var(--ocean-900); }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.toggle input { width: 18px; height: 18px; accent-color: var(--aqua-deep); }
.checks-inline { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 6px; }
.checks-inline label { display: inline-flex; align-items: center; gap: 6px; font-size: .95rem; }
.hours { display: grid; gap: 8px; margin-top: 12px; }
.hours__day { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; align-items: center; }
.hours__ranges { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hours__ranges .input { width: 136px; padding: 8px 10px; }
.dialog { width: min(560px, calc(100% - 32px)); padding: 0; border: 0; border-radius: var(--radius); box-shadow: 0 30px 80px rgba(20, 30, 50, .35); }
.dialog::backdrop { background: rgba(20, 30, 50, .45); }
.dialog .panel { box-shadow: none; border: 0; }
@media (max-width: 760px) {
  .item { grid-template-columns: 1fr; gap: 6px; }
  .item__actions { justify-content: flex-start; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .hours__day { grid-template-columns: 1fr; }
  .staffbar__who span { display: none; }
}
