:root {
  --accent: #c2507a;
  --accent-ink: #ffffff;
  --bg: #fffaf7;
  --blush: #fdeff1;
  --card: #ffffff;
  --ink: #4f2438;
  --plum: #4f2438;
  --muted: #8a6475;
  --line: #f1d3dd;
  --soft: 0 16px 34px -20px rgba(194, 80, 122, 0.6);
  --gold: #b08a52;
  --ok: #1f5a39;
  --ok-bg: #d9f0e0;
  --warn: #6f4e06;
  --warn-bg: #fbe7a8;
  --bad: #8a2b2b;
  --bad-bg: #f8d9d6;
  --info: #2f2a63;
  --info-bg: #e2dcf7;
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --script: 'Great Vibes', 'Cormorant Garamond', cursive;
  --sans: 'Jost', system-ui, -apple-system, 'Segoe UI', 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 #f9dfe7; }
input[type='checkbox'] { 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; }
}

/* Pattern Play look, shared with the public website. */
:root {
  --accent: #0c8a4a; --bg: #fdf3c9; --blush: #fffaf0; --ink: #0a3d24; --plum: #0a3d24; --muted: #4d6b5a;
  --line: #e4d9a6; --gold: #b1437a; --soft: 0 6px 0 rgba(10, 61, 36, 0.14);
  --serif: 'Anton', 'Arial Narrow', Impact, sans-serif; --script: 'Bowlby One', 'Anton', Impact, sans-serif;
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif; --mono: 'Space Mono', ui-monospace, Consolas, monospace;
  --pink: #d6337f; --orange: #f7931e; --blue: #a5d8ea; --yellow: #ffd54a; --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: #cdeedb; font: 700 0.72rem var(--mono); text-transform: uppercase; }
#nav button { font: 700 0.8rem var(--mono); text-transform: uppercase; color: #e9f7ee; 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: #e5432d; 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: #e5432d; }
dialog { box-shadow: 0 12px 0 rgba(10, 61, 36, 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'] { 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(10, 61, 36, 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: #e5432d; 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: #e5432d; 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: #0a3d24; }
.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;
  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));
}
.tl-body.drop { background-color: #eaf7ef; }
.tl-off { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(-45deg, rgba(10, 61, 36, 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(10, 61, 36, 0.12);
  transition: transform 0.2s var(--bounce), box-shadow 0.2s;
}
.tl-appt:hover { transform: translateX(2px); box-shadow: 0 5px 0 rgba(10, 61, 36, 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-appt.pending { background: #fff8db; }
.tl-appt.arrived { background: #fff1de; }
.tl-appt.completed { background: #e3f4ea; }
.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: #e5432d; 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: #e5432d; }

/* 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(10, 61, 36, 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: #fff8db; }
.wk-chip.completed { background: #e3f4ea; }

/* 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) {
  .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); }

/* Automatic WhatsApp status */
.wa-auto { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; font-size: 0.88rem; }
.tpl { display: block; background: var(--bg); border-radius: 12px; padding: 0.6rem 0.8rem; margin-top: 0.3rem; font: 400 0.85rem/1.5 var(--mono); }
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; }
