:root {
  --accent: #41140f;
  --accent-ink: #ffffff;
  --bg: #f7f2ec;
  --blush: #efe7dc;
  --card: #ffffff;
  --ink: #2a0d09;
  --plum: #41140f;
  --muted: #7a625a;
  --line: #e1d4c3;
  --soft: 0 16px 34px -20px rgba(65, 20, 15, 0.45);
  --gold: #b08a6a;
  --ok: #1f5a39;
  --ok-bg: #d9f0e0;
  --warn: #6f4e06;
  --warn-bg: #fbe7a8;
  --bad: #8a2b2b;
  --bad-bg: #f8d9d6;
  --info: #2f2a63;
  --info-bg: #e2dcf7;
  --serif: 'Cinzel', Georgia, serif;
  --script: 'Great Vibes', 'Cormorant Garamond', cursive;
  --sans: 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif;
  --radius: 24px;
}

* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 var(--sans); color: var(--ink); background: var(--bg); }
h1, h2, h3 { margin: 0; line-height: 1.15; font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); font-style: italic; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 0.6rem; }
a { color: inherit; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.error { color: var(--bad); min-height: 1.2rem; margin: 0.3rem 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.3rem;
  padding: 0.5rem 1.05rem; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); font: 500 0.92rem var(--sans); cursor: pointer; text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s, color 0.15s;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--soft); }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn.primary { background: var(--accent); color: var(--accent-ink); box-shadow: var(--soft); }
.btn.primary:hover { box-shadow: var(--soft); }
.btn.primary:active { transform: translateY(2px); box-shadow: var(--soft); }
.btn.danger { color: var(--bad); border-color: var(--bad); }
.btn.danger:hover { background: var(--bad); color: #fff; box-shadow: var(--soft); }
.btn.small { padding: 0.28rem 0.75rem; font-size: 0.82rem; }
.btn:disabled { opacity: 0.55; cursor: default; transform: none; }
:focus-visible { outline: 2px solid var(--plum); outline-offset: 2px; }

label { display: block; font-weight: 500; font-size: 0.88rem; margin-bottom: 0.75rem; }
input, select, textarea {
  display: block; width: 100%; margin-top: 0.25rem; padding: 0.55rem 0.75rem;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font: 0.95rem var(--sans);
  transition: box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus { outline: 0; box-shadow: 0 0 0 4px #eadccb; }
/* Tick boxes and round choices keep their own small size (not the full-width text box style). */
input[type='checkbox'], input[type='radio'] { display: inline-block; width: 17px; height: 17px; margin: 0 0.45rem 0 0; accent-color: var(--accent); box-shadow: none; }
input[type='color'] { padding: 3px; height: 40px; }
input[type='file'] { padding: 0.4rem; background: var(--bg); }
.check { font-weight: 400; display: flex; align-items: center; margin-bottom: 0.35rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 0.9rem; }

/* Login */
.login { position: relative; min-height: 100vh; display: grid; place-items: center; padding: 16px; overflow: hidden; background: var(--blush); }
.login::before {
  content: ''; position: absolute; width: min(620px, 120vw); aspect-ratio: 1; background: var(--accent); opacity: 0.22;
  border-radius: 58% 42% 55% 45% / 48% 60% 40% 52%; animation: morph 14s ease-in-out infinite;
}
.login-card {
  position: relative; width: 100%; max-width: 380px; background: var(--card);
  border: 1px solid var(--line); border-radius: 22px; padding: 2.2rem 2rem 1.4rem; box-shadow: var(--soft);
}
.login-card h1 { font-size: 2.3rem; margin-bottom: 0.3rem; }
.login-card .btn { width: 100%; margin-bottom: 1rem; padding: 0.75rem; font-size: 1rem; }
.login-art { display: flex; align-items: flex-end; gap: 6px; height: 58px; margin-bottom: 1rem; }
.login-art span {
  width: 17px; height: var(--h); background: var(--c);
  border-radius: 50% 50% 4px 4px / 66% 66% 4px 4px;
  box-shadow: inset -3px -2px 5px rgba(0, 0, 0, 0.15), inset 3px 3px 4px rgba(255, 255, 255, 0.4);
  animation: float 4s ease-in-out infinite; animation-delay: var(--d);
}

/* Layout */
.app { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side {
  background: var(--plum); color: var(--bg); padding: 1.3rem 0.9rem;
  display: flex; flex-direction: column; gap: 1.1rem; position: sticky; top: 0; height: 100vh;
}
.side-brand { font: italic 600 1.55rem/1.1 var(--serif); color: #fff; padding: 0 0.5rem; margin: 0; letter-spacing: -0.02em; }

.switch { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 4px; border-radius: 999px; background: rgba(255, 247, 240, 0.12); }
.switch button { padding: 0.45rem 0.3rem; border: 0; border-radius: 999px; background: none; color: var(--bg); font: 500 0.84rem var(--sans); cursor: pointer; transition: background 0.2s, color 0.2s; }
.switch button.active { background: var(--accent); color: var(--accent-ink); }

#nav { display: flex; flex-direction: column; gap: 3px; flex: 1; overflow-y: auto; }
#nav button {
  position: relative; text-align: left; padding: 0.6rem 0.8rem 0.6rem 1.9rem; border: 0; border-radius: 12px;
  background: none; color: #e9d8dc; font: 0.97rem var(--sans); cursor: pointer; transition: background 0.15s, color 0.15s, padding 0.15s;
}
#nav button::before { content: '✦'; position: absolute; left: 0.75rem; font-size: 0.7rem; top: 50%; translate: 0 -50%; opacity: 0.35; }
#nav button:hover { background: rgba(255, 247, 240, 0.09); color: #fff; }
#nav button.active { background: var(--bg); color: var(--plum); font-weight: 500; }
#nav button.active::before { opacity: 1; color: var(--accent); }

.side-user { border-top: 1.5px dashed rgba(255, 247, 240, 0.3); padding-top: 0.9rem; }
.side-user b { font: italic 500 1.1rem var(--serif); }
.side-user .muted { color: #cbb5ba; text-transform: capitalize; }
.side-user .btn { background: none; color: var(--bg); border-color: rgba(255, 247, 240, 0.45); margin: 0 0.3rem 0.3rem 0; }
.side-user .btn:hover { background: var(--bg); color: var(--plum); box-shadow: none; }

.main { padding: 1.6rem clamp(16px, 3vw, 36px) 3.5rem; min-width: 0; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
#view { animation: viewIn 0.3s ease-out; }

.toolbar { display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: end; margin-bottom: 1.1rem; }
.toolbar label { margin: 0; }
.toolbar input, .toolbar select { width: auto; min-width: 130px; }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; margin-bottom: 1.4rem; box-shadow: var(--soft); }
.panel > h2 { margin-bottom: 0.8rem; font-style: italic; }

/* Tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.tile { position: relative; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem 0.9rem; box-shadow: var(--soft); transition: transform 0.2s; }
.tile:hover { transform: translateY(-3px); }
.tile::after { content: ''; position: absolute; right: -22px; top: -22px; width: 70px; height: 70px; border-radius: 58% 42% 55% 45% / 48% 60% 40% 52%; background: var(--tint, var(--accent)); opacity: 0.28; }
.tile:nth-child(6n + 2) { --tint: #f2c94c; }
.tile:nth-child(6n + 3) { --tint: #8fb59d; }
.tile:nth-child(6n + 4) { --tint: #b199e0; }
.tile:nth-child(6n + 5) { --tint: #f08a6b; }
.tile:nth-child(6n + 6) { --tint: #2f2a63; }
.tile .label { position: relative; color: var(--muted); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; }
.tile .value { position: relative; font: 500 2.1rem/1.2 var(--serif); font-variant-numeric: tabular-nums; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.6rem 0.65rem; border-bottom: 1px dashed var(--line); vertical-align: middle; }
th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--gold); font-weight: 500; white-space: nowrap; border-bottom: 1px solid var(--line); }
th.num { text-align: right; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.click { cursor: pointer; transition: background 0.15s; }
tbody tr.click:hover { background: var(--blush); }
tr.off td { color: var(--muted); }
.empty { color: var(--muted); padding: 1.2rem 0.4rem; font: italic 1.05rem var(--serif); }

.badge { display: inline-block; padding: 0.1rem 0.7rem; border-radius: 999px; font-size: 0.78rem; font-weight: 500; white-space: nowrap; border: 1.5px solid currentColor; }
.badge.pending { background: var(--warn-bg); color: var(--warn); }
.badge.confirmed { background: var(--info-bg); color: var(--info); }
.badge.completed, .badge.on { background: var(--ok-bg); color: var(--ok); }
.badge.cancelled, .badge.no_show, .badge.off { background: var(--bad-bg); color: var(--bad); }
.badge.plain { background: var(--bg); color: var(--muted); }

/* Day schedule */
.schedule { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 1rem; overflow-x: auto; padding: 2px 2px 0.9rem; }
.col { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.9rem; min-height: 200px; box-shadow: var(--soft); }
.col-head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.8rem; padding-bottom: 0.6rem; border-bottom: 1.5px dashed var(--line); }
.col-head h3 { font-size: 1.25rem; font-style: italic; }
.dot { width: 14px; height: 14px; flex: none; border: 1px solid var(--line); border-radius: 58% 42% 55% 45% / 48% 60% 40% 52%; }
.col-head small { margin-left: auto; color: var(--muted); }
.appt {
  display: block; width: 100%; text-align: left; margin-bottom: 0.55rem; padding: 0.6rem 0.7rem;
  background: var(--bg); border: 1px solid var(--line); border-left: 7px solid var(--accent); border-radius: 12px;
  font: inherit; color: inherit; cursor: pointer; transition: transform 0.15s, box-shadow 0.15s;
}
.appt:hover { transform: translate(-2px, -2px); box-shadow: var(--soft); }
.appt .time { font-weight: 600; font-variant-numeric: tabular-nums; }
.appt .who { display: block; font: 500 1.05rem var(--serif); margin-top: 0.15rem; }
.appt .what { display: block; color: var(--muted); font-size: 0.85rem; }
.appt.cancelled, .appt.no_show { opacity: 0.55; text-decoration: line-through; }

/* Report bars */
.bar { display: block; height: 12px; border-radius: 999px; background: var(--accent); border: 1px solid var(--line); min-width: 10px; }
td.barcell { width: 32%; }

/* Gallery + reviews */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 1rem; }
.photo-card { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--bg); transition: transform 0.2s, box-shadow 0.2s; }
.photo-card:hover { transform: translateY(-3px); box-shadow: var(--soft); }
.photo-card img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-bottom: 1px solid var(--line); }
.photo-card div { padding: 0.5rem 0.6rem; display: flex; align-items: center; justify-content: space-between; gap: 0.4rem; }
.photo-card span { font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stars { color: var(--gold); letter-spacing: 0.1em; white-space: nowrap; }

/* Detail */
dl.detail { display: grid; grid-template-columns: auto 1fr; gap: 0.4rem 1.1rem; margin: 0 0 1rem; padding: 0.9rem 1rem; background: var(--bg); border: 1px dashed var(--line); border-radius: 14px; }
dl.detail dt { color: var(--muted); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; align-self: center; }
dl.detail dd { margin: 0; font-weight: 500; }
.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.hours-row { display: grid; grid-template-columns: 120px 1fr 1fr; gap: 0.5rem; align-items: center; margin-bottom: 0.35rem; }
.hours-row input { margin: 0; }
.hours-row .check { margin: 0; }
fieldset { border: 1px dashed var(--line); border-radius: 14px; padding: 0.7rem 0.9rem; margin: 0 0 0.9rem; }
legend { font: italic 500 1.05rem var(--serif); padding: 0 0.4rem; }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 0 0.8rem; }

/* Modal */
dialog { border: 1px solid var(--line); border-radius: 22px; padding: 0; width: min(580px, calc(100vw - 24px)); max-height: calc(100vh - 32px); color: var(--ink); background: var(--card); box-shadow: var(--soft); }
dialog[open] { animation: rise 0.25s ease-out; }
@keyframes rise { from { transform: translateY(14px) scale(0.97); } }
dialog::backdrop { background: rgba(42, 20, 32, 0.55); backdrop-filter: blur(3px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.3rem; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--blush); z-index: 1; }
.modal-head h2 { font-style: italic; font-size: 1.5rem; }
#modalBody { padding: 1.2rem 1.3rem 1.4rem; }

.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--plum); color: #fff; padding: 0.6rem 1.2rem; border: 1.5px solid var(--bg); border-radius: 999px; z-index: 50; max-width: calc(100vw - 32px); animation: pop 0.25s ease-out; }
.toast.bad { background: var(--bad); }

@keyframes morph {
  0%, 100% { border-radius: 58% 42% 55% 45% / 48% 60% 40% 52%; }
  50% { border-radius: 42% 58% 44% 56% / 58% 42% 58% 42%; }
}
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -5px; } }
@keyframes pop { from { transform: scale(0.94); opacity: 0; } }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } }
.toast { animation-name: toastIn; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } }

@media (max-width: 800px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; padding: 0.9rem; gap: 0.8rem; }
  #nav { flex-direction: row; flex-wrap: wrap; }
  #nav button { padding: 0.45rem 0.8rem 0.45rem 1.7rem; }
  .side-user { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
  .side-user p { margin: 0 auto 0 0; }
  .grid2, .checks { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* The studio look, shared with the public website: colours and fonts here, keep them in step with site.css. */
:root {
  --accent: #41140f; --bg: #efe7dc; --blush: #faf6f0; --ink: #2a0d09; --plum: #2a0d09; --muted: #7a625a;
  --line: #ddcfbd; --gold: #8a4b3c; --soft: 0 6px 0 rgba(65, 20, 15, 0.12);
  --serif: 'Cinzel', Georgia, serif; --script: 'Cinzel', Georgia, serif;
  --sans: 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif; --mono: 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif;
  --pink: #8a4b3c; --orange: #b08a6a; --blue: #e1d4c3; --yellow: #e1d4c3; --bounce: cubic-bezier(0.3, 1.7, 0.5, 1);
}
body { background: var(--bg); font-weight: 400; }
h1, h2, h3 { text-transform: uppercase; font-weight: 400; letter-spacing: 0.01em; font-style: normal; }
h1 { font: 400 clamp(2.2rem, 5vw, 3.2rem)/1 var(--serif); color: var(--accent); }
.top { border-bottom: 3px dashed var(--line); }
.side { background: var(--accent); border-radius: 0 34px 34px 0; }
.side-brand { font: 400 1.5rem/1 var(--script); text-transform: uppercase; }
.side-user b { font: 400 1.3rem/1 var(--serif); text-transform: uppercase; }
.side-user .muted { color: #e1d4c3; font: 700 0.72rem var(--mono); text-transform: uppercase; }
#nav button { font: 700 0.8rem var(--mono); text-transform: uppercase; color: #f3ebe1; transition: transform 0.3s var(--bounce), background 0.15s; }
#nav button::before { content: '✦'; font-size: 0.8rem; opacity: 0.5; }
#nav button:hover { transform: translateX(4px); background: rgba(255, 255, 255, 0.14); }
#nav button.active { background: var(--bg); color: var(--ink); }
#nav button.active::before { color: var(--pink); opacity: 1; }
.switch { background: rgba(0, 0, 0, 0.18); }
.switch button { font: 700 0.72rem var(--mono); text-transform: uppercase; }
.switch button.active { background: var(--yellow); color: var(--ink); }
.btn { font: 700 0.8rem var(--sans); letter-spacing: 0.06em; text-transform: uppercase; border: 2px solid var(--ink); transition: transform 0.3s var(--bounce), box-shadow 0.2s, background 0.2s; }
.btn:hover { box-shadow: 0 4px 0 var(--ink); border-color: var(--ink); background: var(--yellow); }
.btn.primary { background: var(--accent); border-color: var(--accent); box-shadow: 0 5px 0 var(--ink); }
.btn.primary:hover { background: var(--pink); border-color: var(--pink); box-shadow: 0 8px 0 var(--ink); transform: translateY(-3px) rotate(-2deg); }
.btn.primary:active { box-shadow: 0 1px 0 var(--ink); transform: translateY(3px); }
.btn.danger:hover { box-shadow: 0 4px 0 var(--ink); }
.side-user .btn { border-color: rgba(255, 255, 255, 0.6); }
.side-user .btn:hover { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
.panel, .col, .login-card, dialog { background: var(--blush); border: 0; box-shadow: var(--soft); }
.panel > h2, .modal-head h2, .col-head h3 { font: 400 1.5rem/1.1 var(--serif); font-style: normal; color: var(--accent); }
.tile { border: 0; box-shadow: none; color: #fff; background: var(--accent); transition: transform 0.35s var(--bounce); }
.tile:hover { transform: rotate(-2deg) scale(1.03); }
.tile::after { display: none; }
.tile:nth-child(4n + 2) { background: var(--blue); color: var(--ink); }
.tile:nth-child(4n + 3) { background: var(--pink); }
.tile:nth-child(4n + 4) { background: var(--orange); color: var(--ink); }
.tile .label { color: inherit; font: 700 0.7rem var(--mono); }
.tile .value { font: 400 2.3rem/1.15 var(--serif); }
th { font: 700 0.7rem var(--mono); color: var(--pink); border-bottom: 2px dashed var(--line); }
td { border-bottom: 1px dashed var(--line); }
tbody tr.click:hover { background: var(--bg); }
.empty { font: 400 0.9rem var(--mono); font-style: normal; }
.badge { border: 0; font: 700 0.7rem var(--mono); text-transform: uppercase; padding: 0.2rem 0.7rem; }
.badge.pending { background: var(--yellow); color: var(--ink); }
.badge.confirmed { background: var(--blue); color: var(--ink); }
.badge.completed, .badge.on { background: var(--accent); color: #fff; }
.badge.cancelled, .badge.no_show, .badge.off { background: #9b2c22; color: #fff; }
.badge.plain { background: var(--bg); color: var(--ink); }
.login { background: var(--bg); }
.login::before { background: var(--yellow); opacity: 1; }
.login-card h1 { font-size: 3rem; }
.appt { border: 0; border-left: 8px solid var(--accent); background: var(--bg); border-radius: 14px; }
.appt:hover { transform: translateX(4px) rotate(-1deg); box-shadow: none; }
.appt .who { font: 700 1rem var(--sans); }
.dot { border: 0; border-radius: 50%; }
.bar { border: 0; background: var(--pink); }
.modal-head { background: var(--blue); border-bottom: 0; }
.modal-head h2 { color: #9b2c22; }
dialog { box-shadow: 0 12px 0 rgba(65, 20, 15, 0.35); }
dl.detail { border: 0; background: var(--bg); }
dl.detail dt, label { font-family: var(--mono); }
fieldset { border: 2px dashed var(--line); }
legend { font: 400 1.1rem var(--serif); font-style: normal; text-transform: uppercase; color: var(--pink); }
.toast { border: 0; background: var(--ink); font: 700 0.8rem var(--mono); text-transform: uppercase; }
input, select, textarea { border: 2px solid var(--ink); border-radius: 14px; }
input:focus, select:focus, textarea:focus { box-shadow: 4px 4px 0 var(--pink); border-color: var(--ink); }
input[type='checkbox'], input[type='radio'] { box-shadow: none; }
.photo-card { border: 0; background: var(--bg); }
.photo-card img { border-bottom: 0; }
.stars { color: var(--orange); }

/* Counter for online requests waiting to be confirmed. */
#nav button[data-count]::after { content: attr(data-count); float: right; min-width: 1.5rem; text-align: center; padding: 0 0.4rem; border-radius: 999px; background: var(--pink); color: #fff; font: 700 0.75rem/1.5rem var(--mono); animation: pop 0.4s var(--bounce); }

/* ---------- organisation features ---------- */
.nowrap { white-space: nowrap; }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions .btn { margin-left: 0.25rem; }
td.click { cursor: pointer; }
.sub-h { font: 400 1.15rem/1 var(--serif); color: var(--accent); margin: 1rem 0 0.5rem; }
.total-line { font: 700 0.85rem var(--mono); margin: 0.2rem 0 0.8rem; }

/* Top bar: search, bell, new booking */
.top { flex-wrap: wrap; }
.top-tools { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.search { position: relative; }
.search input { width: 260px; margin: 0; border-radius: 999px; padding-left: 1rem; }
.search-results, .inbox {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: min(440px, 90vw); max-height: 70vh; overflow-y: auto;
  background: var(--blush); border-radius: 18px; padding: 0.5rem; box-shadow: 0 14px 30px -10px rgba(65, 20, 15, 0.45);
}
.search-results button, .inbox button {
  display: block; width: 100%; text-align: left; border: 0; background: none; padding: 0.55rem 0.7rem; border-radius: 12px;
  font: 400 0.9rem var(--sans); color: var(--ink); cursor: pointer;
}
.search-results button:hover, .inbox button:hover { background: var(--bg); }
.search-results small, .inbox small { display: block; color: var(--muted); font-size: 0.78rem; }
.sr-h { font: 700 0.68rem var(--mono); text-transform: uppercase; color: var(--pink); margin: 0.5rem 0.7rem 0.2rem; }
.bell-wrap { position: relative; }
.bell { position: relative; padding: 0.45rem 0.75rem; font-size: 1rem; }
.bell-count { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--pink); color: #fff; font: 700 0.7rem/20px var(--mono); text-align: center; }
.inbox button.unread { background: #fff; box-shadow: inset 4px 0 0 var(--pink); }
.n-type { display: inline-block; font: 700 0.62rem var(--mono); text-transform: uppercase; padding: 0.1rem 0.45rem; border-radius: 999px; background: var(--yellow); margin-right: 0.3rem; }
.n-type.customer_cancelled { background: #9b2c22; color: #fff; }

/* Customer flags */
.flag { display: inline-block; font: 700 0.62rem var(--mono); text-transform: uppercase; padding: 0.1rem 0.5rem; border-radius: 999px; vertical-align: 1px; white-space: nowrap; }
.flag.new { background: var(--blue); color: var(--ink); }
.flag.good { background: var(--accent); color: #fff; }
.flag.warn { background: var(--orange); color: var(--ink); }
.flag.bad { background: #9b2c22; color: #fff; }
.badge.arrived { background: var(--orange); color: var(--ink); }

.closed-banner { background: var(--orange); color: var(--ink); border-radius: 14px; padding: 0.7rem 1rem; font-weight: 700; margin-bottom: 1rem; }

/* Day notes */
.day-notes { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 1.1rem; }
.note { display: inline-flex; align-items: center; gap: 0.4rem; background: var(--yellow); border-radius: 12px; padding: 0.35rem 0.4rem 0.35rem 0.75rem; font-size: 0.9rem; rotate: -0.6deg; }
.note small { color: var(--muted); font: 400 0.7rem var(--mono); }
.note-x { border: 0; background: none; cursor: pointer; color: var(--ink); opacity: 0.5; font-size: 0.8rem; }
.note-x:hover { opacity: 1; }
.note-add { display: flex; gap: 0.4rem; }
.note-add input { margin: 0; width: 240px; padding: 0.35rem 0.8rem; border-radius: 999px; border-style: dashed; }

/* WhatsApp buttons */
.wa { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }
.wa-btn { background: #25d366; border-color: #1da851; color: #1f2925; }
.wa-btn:hover { background: #1fbe5b; }

/* Payment choice */
.pay-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }
.pay { display: flex; align-items: center; justify-content: center; gap: 0.3rem; margin: 0; padding: 0.6rem; border: 2px solid var(--line); border-radius: 14px; cursor: pointer; font: 700 0.8rem var(--mono); }
.pay:has(input:checked) { border-color: var(--accent); background: #e8f6ee; }
.pay input { margin: 0; }

/* Calendar toolbar */
.seg { display: inline-flex; gap: 0.3rem; margin-left: 0.4rem; }
.toolbar .sr input { min-width: 150px; }

/* Day timeline */
.timeline { display: grid; grid-template-columns: 58px 1fr; background: var(--blush); border-radius: 18px; box-shadow: var(--soft); overflow: auto; max-height: 76vh; }
.tl-times { position: relative; margin-top: 52px; border-right: 2px dashed var(--line); }
.tl-times span { position: absolute; right: 8px; transform: translateY(-50%); font: 700 0.66rem var(--mono); color: var(--muted); white-space: nowrap; }
.tl-cols { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 1fr); }
.tl-col { border-right: 1px dashed var(--line); }
.tl-col:last-child { border-right: 0; }
.tl-head { position: sticky; top: 0; z-index: 3; height: 52px; display: flex; align-items: center; gap: 0.45rem; padding: 0 0.7rem; background: var(--blush); border-bottom: 2px dashed var(--line); }
.tl-head b { font: 400 1.05rem var(--serif); text-transform: uppercase; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-head small { margin-left: auto; font: 400 0.66rem var(--mono); color: var(--muted); white-space: nowrap; }
.tl-body {
  position: relative; cursor: copy;
  /* Solid line on every hour, faint line on every half hour. */
  background-image:
    repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--px) * 60px - 1px), var(--line) calc(var(--px) * 60px - 1px), var(--line) calc(var(--px) * 60px)),
    repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--px) * 30px - 1px), rgba(65, 20, 15, 0.06) calc(var(--px) * 30px - 1px), rgba(65, 20, 15, 0.06) calc(var(--px) * 30px));
}
.tl-body.drop { background-color: #eaf7ef; }
.tl-off { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(-45deg, rgba(65, 20, 15, 0.06) 0 8px, transparent 8px 16px); }
.tl-appt {
  position: absolute; left: 5px; right: 5px; z-index: 2; overflow: hidden; text-align: left;
  padding: 0.3rem 0.5rem; border: 0; border-left: 6px solid var(--c); border-radius: 10px;
  background: #fff; color: var(--ink); font: inherit; cursor: pointer; box-shadow: 0 3px 0 rgba(65, 20, 15, 0.12);
  transition: transform 0.2s var(--bounce), box-shadow 0.2s;
}
.tl-appt:hover { transform: translateX(2px); box-shadow: 0 5px 0 rgba(65, 20, 15, 0.18); z-index: 4; }
.tl-appt[draggable="true"] { cursor: grab; }
.tl-appt .time { display: block; font: 700 0.68rem var(--mono); }
.tl-appt .who { display: block; font-weight: 700; font-size: 0.86rem; line-height: 1.2; }
.tl-appt .what { display: block; font-size: 0.76rem; color: var(--muted); line-height: 1.2; }
.tl-split {
  position: absolute; left: 0; right: 0; padding: 0.15rem 0.5rem 0; border-top: 2px dashed color-mix(in srgb, var(--c) 70%, transparent);
  font-size: 0.76rem; color: var(--muted); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none;
}
.tl-split i { font: 700 0.68rem var(--mono); font-style: normal; color: var(--ink); }
.tl-appt.pending { background: #f5ecdc; }
.tl-appt.arrived { background: #f6eee3; }
.tl-appt.completed { background: #ebe3d8; }
.tl-appt.cancelled, .tl-appt.no_show { opacity: 0.45; text-decoration: line-through; }
.tl-now { position: absolute; left: 0; right: 0; height: 2px; background: #9b2c22; z-index: 5; margin-top: 52px; pointer-events: none; }
.tl-now::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #9b2c22; }

/* Week view */
.week { display: grid; grid-template-columns: repeat(7, minmax(130px, 1fr)); gap: 0.6rem; overflow-x: auto; }
.wk-day { background: var(--blush); border-radius: 16px; padding: 0.5rem; min-height: 220px; box-shadow: var(--soft); }
.wk-day.today { outline: 3px solid var(--pink); }
.wk-day.closed { background: repeating-linear-gradient(-45deg, rgba(65, 20, 15, 0.06) 0 8px, var(--blush) 8px 16px); }
.wk-head { display: block; width: 100%; border: 0; background: none; cursor: pointer; text-align: center; padding: 0.2rem 0 0.5rem; margin-bottom: 0.4rem; border-bottom: 2px dashed var(--line); color: var(--ink); }
.wk-head small { display: block; font: 700 0.7rem var(--mono); text-transform: uppercase; }
.wk-head b { font: 400 1.8rem/1 var(--serif); color: var(--accent); }
.wk-head span { display: block; font: 400 0.68rem var(--mono); color: var(--muted); }
.wk-chip { display: block; width: 100%; text-align: left; margin-bottom: 0.35rem; padding: 0.35rem 0.5rem; border: 0; border-left: 5px solid var(--c); border-radius: 9px; background: #fff; font: 400 0.8rem var(--sans); color: var(--ink); cursor: pointer; }
.wk-chip b { font: 700 0.7rem var(--mono); }
.wk-chip small { display: block; color: var(--muted); font-size: 0.72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-chip.pending { background: #f5ecdc; }
.wk-chip.completed { background: #ebe3d8; }

/* Charts */
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 0 1.2rem; }
.chart-grid .wide { grid-column: 1 / -1; }
.vbars { display: flex; align-items: flex-end; gap: 4px; height: 210px; padding-top: 1rem; }
.vbar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.vbar i { display: block; width: 100%; max-width: 38px; min-height: 2px; border-radius: 8px 8px 3px 3px; }
.vbar small { font: 400 0.6rem var(--mono); color: var(--muted); margin-top: 0.3rem; white-space: nowrap; }
.vbar-val { font: 700 0.58rem var(--mono); color: var(--muted); margin-bottom: 2px; white-space: nowrap; }
.hbars { display: grid; gap: 0.55rem; }
.hbar { display: grid; grid-template-columns: minmax(90px, 38%) 1fr auto; align-items: center; gap: 0.6rem; font-size: 0.88rem; }
.hbar-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-track { height: 14px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.hbar-track i { display: block; height: 100%; border-radius: 999px; }
.hbar b { font: 700 0.78rem var(--mono); }

@media (max-width: 800px) {
  /* On phones, toolbar fields stack full width so nothing pokes out sideways. */
  .toolbar label { flex: 1 1 100%; }
  .toolbar input, .toolbar select { width: 100%; min-width: 0; }
  .search input { width: 100%; }
  .top-tools { width: 100%; }
  .search { flex: 1; }
  .pay-options { grid-template-columns: 1fr 1fr; }
  .vbar small { display: none; }
}

/* Appointment text starts at the top of its block; extras list reads as name + price. */
.tl-appt { display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; }
.check.extra { align-items: flex-start; font-family: var(--sans); font-weight: 500; gap: 0.1rem; margin-bottom: 0.55rem; }
.check.extra input { margin-top: 0.15rem; }
.check.extra small { display: block; font: 400 0.72rem var(--mono); color: var(--muted); }

details summary { list-style: none; }

/* "Add more services" groups in the booking form */
.more-group { border-top: 1px dashed var(--line); padding: 0.35rem 0; }
.more-group summary { cursor: pointer; font: 700 0.78rem var(--mono); text-transform: uppercase; padding: 0.25rem 0; }
.more-group .checks { padding-top: 0.4rem; }

/* Password box with Generate / Copy */
.pw-row { display: flex; gap: 0.4rem; align-items: center; margin-top: 0.25rem; }
.pw-row input { margin: 0; flex: 1; font-family: var(--mono); letter-spacing: 0.05em; }

/* ---------- Phones ---------- */
@media (max-width: 800px) {
  /* 16px stops iPhones zooming the whole page in when a field is tapped. */
  input, select, textarea { font-size: 16px; }

  /* Search results and notifications open under the whole top bar instead of off the left edge. */
  .top-tools { position: relative; }
  .search, .bell-wrap { position: static; }
  .search-results, .inbox { left: 0; right: 0; width: auto; }

  #nav button[data-count]::after { margin-left: 0.45rem; }

  /* Tables become one card per row, each value with its column name beside it. */
  .table-wrap { overflow: visible; }
  .table-wrap table, .table-wrap tbody, .table-wrap tr, .table-wrap td { display: block; width: 100%; }
  .table-wrap thead { display: none; }
  .table-wrap tr { background: #fff; border-radius: 16px; padding: 0.55rem 0.85rem; margin-bottom: 0.6rem; box-shadow: 0 3px 0 rgba(65, 20, 15, 0.08); }
  .table-wrap tbody tr:last-child { margin-bottom: 0; }
  .table-wrap td { border: 0; padding: 0.22rem 0; text-align: left; overflow-wrap: anywhere; }
  .table-wrap td.num, .table-wrap td.nowrap { text-align: left; white-space: normal; }
  .table-wrap td[data-label] { position: relative; padding-left: 6.4rem; min-height: 1.7em; }
  .table-wrap td[data-label]::before {
    content: attr(data-label); position: absolute; left: 0; top: 0.42rem; width: 5.9rem;
    font: 700 0.66rem var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .table-wrap td:empty { display: none; }
  .table-wrap td.row-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; padding-top: 0.4rem; white-space: normal; }
  .row-actions .btn { margin-left: 0; }

  /* Finger-sized buttons and readable small labels. */
  .btn.small { min-height: 36px; }
  .note-x { min-width: 32px; min-height: 32px; }
  .flag { font-size: 0.7rem; }
  .tl-times span { font-size: 0.72rem; }

  /* Day note: the field takes the room that is left next to "Add". */
  .note-add { width: 100%; }
  .note-add input { flex: 1; width: auto; min-width: 0; }

  /* Day calendar: stylist name on one line, hours under it; the time column stays put while the techs scroll sideways. */
  .tl-head { flex-wrap: wrap; align-content: center; gap: 0 0.4rem; padding: 0 0.6rem; }
  .tl-head b { flex: 1 1 0; min-width: 0; }
  .tl-head small { margin-left: 0; flex-basis: 100%; }
  .tl-times { position: sticky; left: 0; z-index: 4; background: var(--blush); }
  .tl-cols { grid-auto-columns: minmax(150px, 1fr); }
}

/* Stylist days off */
.off-banner { background: #e6f3fb; color: var(--ink); border-left: 6px solid var(--blue, #9fb4bb); border-radius: 14px; padding: 0.65rem 1rem; margin-bottom: 1rem; }
.clash-panel { box-shadow: inset 6px 0 0 var(--orange), var(--soft); }
.dot.inline { display: inline-block; width: 12px; height: 12px; vertical-align: -1px; }
.btn.warn { background: var(--orange); color: var(--ink); border-color: var(--ink); }

/* The panel is a work tool: no double-tap zoom (pinch is blocked in panel.js, since iPhones ignore the page setting). */
html { touch-action: manipulation; }

/* "Booking confirmed" screen after reception saves a booking */
.form-intro { margin: 0 0 0.8rem; }
.sent-summary { background: var(--bg); border-radius: 14px; padding: 0.8rem 1rem; margin-bottom: 0.9rem; }
.sent-summary p { margin: 0.15rem 0; }
.sent-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.sent-actions .btn { flex: 1 1 auto; text-align: center; justify-content: center; }
@media (max-width: 800px) {
  /* Bigger tick boxes for fingers (the whole row is tappable too). */
  input[type='checkbox'], input[type='radio'] { width: 22px; height: 22px; flex: none; }
}

/* Stylist form: Select all / Clear all above the services, grouped like the price list */
.skill-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 0.6rem; }
.skill-cat { font: 700 0.72rem var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0.7rem 0 0.3rem; }

/* Gallery: photos grouped, Edit + Remove on each card */
.photo-actions { display: flex; gap: 0.3rem; flex: none; }
.photo-card div { flex-wrap: wrap; }
.photo-preview { display: block; width: 100%; max-height: 260px; object-fit: cover; border-radius: 14px; margin-bottom: 0.8rem; }

/* Menu items nudge right on hover; that must never give the menu a sideways scrollbar. */
#nav { overflow-x: hidden; }

/* Receptionist work days: seven small chips in a row, two rows on phones. */
.pay-options.days { grid-template-columns: repeat(7, 1fr); gap: 0.35rem; }
.pay-options.days .pay { padding: 0.5rem 0.2rem; }
@media (max-width: 800px) {
  .pay-options.days { grid-template-columns: repeat(4, 1fr); }
}

/* Stylist photo for the website: preview and buttons at the top of her form; a small one in the Team list. */
.tech-photo { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.tech-photo.busy { opacity: 0.5; pointer-events: none; }
.tech-photo p { margin: 0 0 0.5rem; }
.tech-photo .btn { margin: 0 0.3rem 0.3rem 0; }
.tech-photo-img { flex: none; width: 84px; height: 84px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--c); border: 3px solid var(--c); }
.tech-photo-img img { width: 100%; height: 100%; object-fit: cover; }
.tech-photo-img span { font: 700 2rem/1 var(--mono); color: #fff; }
.mini-photo { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; vertical-align: middle; border: 3px solid var(--c); }

/* "Show more" under a long list. */
.more-row { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin: 0.8rem 0 0.2rem; }

/* Madame & Mane's badge above the sign-in form. */
.login-mark { display: block; width: 84px; height: auto; margin-bottom: 1rem; }

/* ---------- Madame & Mane look ----------
   A flat burgundy sidebar with plain menu items, white cards on warm paper with thin solid lines,
   buttons that no longer tilt or bounce, and soft colour tags for statuses. The titles, fonts and
   sign-in page keep the look above. These rules come last, so they win over the template styles. */
:root {
  --accent: #41140f; --accent-ink: #f3ebe1; --bg: #f6f1ea; --blush: #ffffff; --card: #ffffff; --ink: #2a0d09;
  --plum: #41140f; --muted: #806a61; --line: #e6dccf; --gold: #8a6a58; --pink: #8a4b3c; --orange: #c9a27c;
  --blue: #efe6da; --yellow: #f3e6cf; --soft: 0 1px 2px rgba(42, 13, 9, 0.06), 0 8px 24px -16px rgba(42, 13, 9, 0.25);
  --radius: 8px; --mono: 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif;
}
.top { border-bottom: 1px solid var(--line); }

/* Sidebar */
.side { background: var(--accent); border-radius: 0; gap: 1.3rem; padding: 1.6rem 1rem; }
.switch { background: rgba(0, 0, 0, 0.2); border-radius: 6px; }
.switch button { font: 500 0.78rem var(--sans); text-transform: none; border-radius: 4px; color: rgba(243, 235, 225, 0.8); }
.switch button.active { background: var(--accent-ink); color: var(--accent); }
#nav { gap: 1px; }
#nav button { font: 400 0.92rem var(--sans); text-transform: none; color: rgba(243, 235, 225, 0.78); padding: 0.6rem 0.8rem; border-radius: 6px; transition: background 0.15s, color 0.15s; }
#nav button::before { content: none; }
#nav button:hover { transform: none; background: rgba(243, 235, 225, 0.08); color: #fff; }
#nav button.active { background: rgba(243, 235, 225, 0.14); color: #fff; font-weight: 500; box-shadow: inset 3px 0 0 var(--orange); }
#nav button[data-count]::after { background: var(--orange); color: var(--accent); font: 600 0.72rem/1.4rem var(--sans); border-radius: 4px; animation: none; }
.side-user { border-top: 1px solid rgba(243, 235, 225, 0.18); }
.side-user .btn { color: var(--accent-ink); border: 1px solid rgba(243, 235, 225, 0.35); }
.side-user .btn:hover { background: var(--accent-ink); color: var(--accent); border-color: var(--accent-ink); }

/* Buttons and fields */
.btn { border: 1px solid var(--line); border-radius: 6px; background: #fff; transition: background 0.15s, border-color 0.15s, color 0.15s; }
.btn:hover { transform: none; box-shadow: none; border-color: var(--accent); background: #fff; }
.btn:active { transform: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: none; }
.btn.primary:hover { background: #5c2219; border-color: #5c2219; box-shadow: none; transform: none; }
.btn.primary:active { box-shadow: none; transform: none; }
.btn.danger { color: var(--bad); border-color: #e7c6c1; }
.btn.danger:hover { background: var(--bad); border-color: var(--bad); color: #fff; box-shadow: none; }
.btn.warn { background: var(--yellow); border-color: var(--orange); }
input, select, textarea { border: 1px solid #d9ccbc; border-radius: 6px; background: #fff; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(65, 20, 15, 0.12); }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); }
.pay { border: 1px solid var(--line); border-radius: 6px; font: 500 0.85rem var(--sans); }
.pay:has(input:checked) { border-color: var(--accent); background: #f7efe6; box-shadow: inset 0 0 0 1px var(--accent); }

/* Cards, tiles, tables */
.panel, .col, dialog, .wk-day, .timeline { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--soft); }
.tile { background: #fff; color: var(--ink); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: var(--radius); box-shadow: var(--soft); transition: none; }
.tile:hover { transform: none; }
.tile:nth-child(4n + 2), .tile:nth-child(4n + 3), .tile:nth-child(4n + 4) { background: #fff; color: var(--ink); }
.tile:nth-child(4n + 2) { border-top-color: var(--pink); }
.tile:nth-child(4n + 3) { border-top-color: var(--orange); }
.tile:nth-child(4n + 4) { border-top-color: #b9a898; }
.tile .label { color: var(--muted); font: 500 0.72rem var(--sans); letter-spacing: 0.1em; }
.tile .value { font: 400 1.9rem/1.2 var(--serif); color: var(--accent); }
th { border-bottom: 1px solid var(--line); }
td { border-bottom: 1px solid #f0e8de; }
tbody tr.click:hover { background: #faf5ef; }

/* Badges and flags: soft tints, sentence case */
.badge, .flag, .n-type { font: 500 0.72rem var(--sans); text-transform: none; letter-spacing: 0.01em; border-radius: 4px; padding: 0.15rem 0.55rem; border: 0; }
.badge.pending, .n-type { background: #f5e7cd; color: #7a5317; }
.badge.confirmed { background: #ece3d7; color: var(--accent); }
.badge.completed, .badge.on { background: var(--accent); color: var(--accent-ink); }
.badge.cancelled, .badge.no_show, .badge.off, .n-type.customer_cancelled, .flag.bad { background: #f5dcd7; color: #8a2b22; }
.badge.plain { background: #f3ede5; color: var(--muted); }
.badge.arrived, .flag.warn { background: #efdcc4; color: #6b4320; }
.flag.new { background: #ece3d7; color: var(--accent); }
.flag.good { background: var(--accent); color: var(--accent-ink); }
.bell-count { background: var(--accent); font: 600 0.7rem/20px var(--sans); }

/* Calendar */
.appt { border: 1px solid var(--line); border-left: 4px solid var(--accent); background: #fff; border-radius: 6px; }
.appt:hover { transform: none; box-shadow: var(--soft); }
.tl-times { border-right: 1px solid var(--line); }
.tl-col { border-right: 1px solid #f0e8de; }
.tl-head { background: #fff; border-bottom: 1px solid var(--line); }
.tl-appt { border-left-width: 4px; border-radius: 6px; box-shadow: 0 1px 2px rgba(42, 13, 9, 0.12); transition: box-shadow 0.15s; }
.tl-appt:hover { transform: none; box-shadow: 0 4px 12px -4px rgba(42, 13, 9, 0.3); }
.tl-split { border-top-style: solid; }
.wk-day { background: #fff; }
.wk-day.today { outline: 2px solid var(--accent); outline-offset: -1px; }
.wk-head { border-bottom: 1px solid var(--line); }
.wk-chip { border-left-width: 4px; border-radius: 5px; background: #faf5ef; }
.tl-appt.pending, .wk-chip.pending { background: #fbf1df; }
.tl-appt.completed, .wk-chip.completed { background: #f1ebe3; }

/* Modal, search, notes, notices */
dialog { box-shadow: 0 24px 60px -20px rgba(42, 13, 9, 0.45); }
dialog::backdrop { background: rgba(42, 13, 9, 0.45); }
.modal-head { background: #fff; border-bottom: 1px solid var(--line); }
.modal-head h2 { color: var(--accent); }
dl.detail { background: #faf6f1; border: 1px solid #f0e8de; border-radius: var(--radius); }
.search input { border-radius: 6px; }
.search-results, .inbox { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.search-results button:hover, .inbox button:hover { background: #faf5ef; }
.inbox button.unread { background: #fbf6f0; box-shadow: inset 3px 0 0 var(--accent); }
.note { rotate: none; background: #f8eedc; border: 1px solid #ecdcbf; border-radius: 6px; }
.note-add input { border-style: solid; border-radius: 6px; }
.closed-banner { background: #f8eedc; border: 1px solid #ecdcbf; border-radius: var(--radius); font-weight: 500; }
.off-banner { background: #f3ede5; border-left-color: var(--accent); border-radius: var(--radius); }
.bar, .hbar-track i { background: var(--accent); }
.hbar-track { background: #f1ebe3; }
.photo-card { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }

@media (max-width: 800px) {
  .table-wrap tr { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: none; }
  .table-wrap td[data-label]::before { font: 500 0.66rem var(--sans); color: var(--muted); }
  .tl-times { background: #fff; }
}
/* WhatsApp buttons keep WhatsApp's green so reception spots them at once. */
.btn.wa-btn { background: #25d366; border-color: #1da851; color: #0b2e18; }
.btn.wa-btn:hover { background: #1fbe5b; border-color: #179848; }


/* Phones: the number tiles go two to a row and get smaller, so the day's appointments are
   reached without scrolling past a full screen of numbers. */
@media (max-width: 600px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; margin-bottom: 1.1rem; }
  .tile { padding: 0.7rem 0.8rem 0.6rem; }
  .tile .label { font-size: 0.64rem; letter-spacing: 0.06em; }
  .tile .value { font-size: 1.5rem; }
  /* Calendar column names wrap onto two lines instead of all reading "Head Spa S…". */
  .tl-head b { flex: 1 1 0; min-width: 0; white-space: normal; font-size: 0.8rem; line-height: 1.15; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .tl-head small { font-size: 0.6rem; }
  /* Search gets its own full-width row above the bell and "New booking". */
  .top-tools .search { flex: 1 1 100%; }
  .top-tools .search input { width: 100%; }
}

/* Clients: long lists (services, products, who did them) stay to one short cell in the table;
   the full text is on the client's card. */
td.clip { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem 1rem; margin: 0 0 0.9rem; }
.client-facts p { margin: 0; }
.client-facts span { display: block; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.7rem; margin-bottom: 0.15rem; }
@media (max-width: 600px) {
  .client-facts { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  .table-wrap td.clip { max-width: none; white-space: normal; }
}

/* Coffee bar: drink counters on the Complete form, and the drink split under a tile's number. */
.drinks { display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; }
.drink { display: flex; align-items: center; gap: 0.4rem; }
.drink > span { min-width: 4.2rem; font-weight: 500; }
.drink input { width: 3.6rem; margin: 0; text-align: center; }
.drink .btn { min-width: 2.4rem; font-size: 1.05rem; }
.tile-sub { position: relative; font-size: 0.78rem; color: var(--muted); margin-top: 0.1rem; }

/* Days off: the "comes in on her day off" form, six fields in a row on a computer, two on a phone. */
.extra-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.2rem 1rem; align-items: end; }
@media (max-width: 800px) { .extra-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .extra-grid { grid-template-columns: 1fr; } }

/* Inventory: product lines (Complete & pay, a booking's products, a service's list). */
.inv-rows { display: grid; gap: 0.5rem; margin-bottom: 0.6rem; }
.inv-line { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 0.3rem 0.6rem; align-items: center;
  padding-bottom: 0.5rem; border-bottom: 1px dashed var(--line); }
.inv-line:last-child { border-bottom: 0; padding-bottom: 0; }
.inv-name { font-weight: 500; overflow-wrap: anywhere; }
.inv-name .small { display: block; font-weight: 400; }
.inv-line select, .inv-line .inv-reason { margin: 0; width: 100%; }
.inv-line .inv-pick { grid-column: 1 / -1; }
.inv-line .inv-reason { grid-column: 1; grid-row: 2; }
.inv-left { grid-column: 1 / -1; }
.inv-left:empty { display: none; }
.inline-unit { display: inline-flex; align-items: center; gap: 0.35rem; white-space: nowrap; }
.inline-unit input { width: 6.5rem; margin: 0; }
.inv-line .inline-unit input { width: 5.5rem; }
.neg { color: var(--bad); }
table.inv-check input[name=sealed] { width: 5rem; margin: 0; }
table.inv-check input, table.inv-check select { margin: 0.15rem 0; }
table.inv-check select, table.inv-check input[name=note] { width: 100%; min-width: 7rem; }
table.inv-check .inline-unit input { width: 5.5rem; }
@media (max-width: 800px) {
  .inv-line { grid-template-columns: minmax(0, 1fr) auto auto; }
  table.inv-check input[name=sealed] { width: 6rem; }
}

/* Layali Salon: the night whose guests are shown. */
tbody tr.selected { background: var(--blush); box-shadow: inset 3px 0 0 var(--accent); }

/* Visitors: the live count. */
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #2e9d5b; margin-right: 6px; vertical-align: 1px; box-shadow: 0 0 0 0 rgba(46, 157, 91, 0.5); animation: livePulse 2s infinite; }
@keyframes livePulse { 70% { box-shadow: 0 0 0 7px rgba(46, 157, 91, 0); } 100% { box-shadow: 0 0 0 0 rgba(46, 157, 91, 0); } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }

/* Sidebar menu: no visible scrollbar (it still scrolls with the mouse wheel or a swipe on short screens). */
#nav { scrollbar-width: none; -ms-overflow-style: none; }
#nav::-webkit-scrollbar { display: none; }
/* When more of the menu is below, its bottom fades out as a hint to scroll. */
#nav.more-below { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 48px), transparent); }

/* Calendar: each stylist's appointments in her own clear colour (calColor), tinted so they stand out from
   the white page; the status shows at a glance: striped = waiting, strong = arrived, faded with ✓ = done. */
.tl-head { border-top: 4px solid var(--c, transparent); }
.tl-appt, .wk-chip { background: color-mix(in srgb, var(--c) 14%, #fff); border-left: 5px solid var(--c); color: #1f1a17; }
.tl-appt .time { color: color-mix(in srgb, var(--c) 70%, #000); }
.tl-appt .what, .wk-chip small { color: #5d534d; }
.tl-appt.pending, .wk-chip.pending {
  background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--c) 16%, #fff) 0 7px, #fff 7px 14px);
  outline: 1.5px dashed var(--c); outline-offset: -1.5px;
}
.tl-appt.arrived, .wk-chip.arrived { background: color-mix(in srgb, var(--c) 30%, #fff); box-shadow: inset 0 0 0 2px var(--c); }
.tl-appt.completed, .wk-chip.completed { background: color-mix(in srgb, var(--c) 9%, #fff); }
.tl-appt.completed .who::after, .wk-chip.completed b::after { content: ' ✓'; color: var(--c); font-weight: 700; }
.tl-split { border-top-color: color-mix(in srgb, var(--c) 45%, transparent); }
.cal-key { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; margin: 0 0 0.7rem; font-size: 0.78rem; color: var(--muted); }
.cal-key span { display: inline-flex; align-items: center; gap: 0.35rem; }
.cal-key span::before { content: ''; width: 18px; height: 12px; border-radius: 3px; border-left: 4px solid #3b6fb6; }
.cal-key .k-booked::before { background: color-mix(in srgb, #3b6fb6 14%, #fff); }
.cal-key .k-pending::before { background: repeating-linear-gradient(-45deg, color-mix(in srgb, #3b6fb6 16%, #fff) 0 3px, #fff 3px 6px); outline: 1px dashed #3b6fb6; }
.cal-key .k-here::before { background: color-mix(in srgb, #3b6fb6 30%, #fff); box-shadow: inset 0 0 0 1.5px #3b6fb6; }
.cal-key .k-done::before { background: color-mix(in srgb, #3b6fb6 9%, #fff); }

/* Phones: the menu folds away behind one button, so each page starts at the top of the screen. */
.side-toggle { display: none; }
@media (max-width: 800px) {
  dialog::backdrop { backdrop-filter: none; }
  .app { display: block; }
  .side { position: sticky; top: 0; z-index: 30; height: auto; max-height: 100dvh; overflow-y: auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0.7rem; padding: 0.7rem 0.9rem; }
  .side > .switch, .side > #nav, .side > .side-user { grid-column: 1 / -1; }
  .side:not(.open) > .switch, .side:not(.open) > #nav, .side:not(.open) > .side-user { display: none; }
  .side-toggle { display: inline-flex; align-items: center; gap: 0.45rem; min-height: 40px; padding: 0 0.9rem; background: none; color: inherit; border: 1px solid rgba(243, 235, 225, 0.4); border-radius: 6px; font: 500 0.85rem var(--sans); cursor: pointer; }
  .side-toggle[data-count]::after { content: attr(data-count); min-width: 1.4rem; text-align: center; background: var(--orange); color: var(--accent); font: 600 0.72rem/1.4rem var(--sans); border-radius: 4px; }
}

/* Layali Salon: the extra services ticked for a night or a guest. */
.extra-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.2rem 1rem; }

/* Arabic: right to left, in an Arabic font (the button is in the sidebar and on the sign-in page). */
.lang-btn { font-family: 'Cairo', var(--sans); }
.login-card .lang-btn { margin-top: 0.8rem; align-self: center; }
html[dir="rtl"] { --sans: 'Cairo', 'Segoe UI', Tahoma, sans-serif; --serif: 'Cairo', 'Segoe UI', Tahoma, sans-serif; --script: 'Cairo', 'Segoe UI', Tahoma, sans-serif; --mono: 'Cairo', 'Segoe UI', Tahoma, sans-serif; }
html[dir="rtl"] body, html[dir="rtl"] input, html[dir="rtl"] select, html[dir="rtl"] textarea, html[dir="rtl"] button { font-family: var(--sans); }
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3 { letter-spacing: 0; text-transform: none; }
html[dir="rtl"] th, html[dir="rtl"] td { text-align: start; }
html[dir="rtl"] .num, html[dir="rtl"] th.num, html[dir="rtl"] td.num { text-align: end; }
html[dir="rtl"] #nav button.active { box-shadow: inset -3px 0 0 var(--orange); }
html[dir="rtl"] input[type="tel"], html[dir="rtl"] input[type="email"], html[dir="rtl"] input[name="phone"] { direction: ltr; text-align: right; }
