:root {
  --ink: #18283f;
  --ink-soft: #627086;
  --paper: #f5f7fa;
  --surface: #ffffff;
  --line: #e1e7ef;
  --cream: #eaf0f7;
  --accent: #183b65;
  --accent-strong: #102b4d;
  --danger: #d74949;
  --shadow: 0 18px 55px rgba(29, 28, 22, 0.08);
  --radius: 20px;
}

/* Shared reservation surfaces; large touch targets and no customer-data HTML interpolation. */
.public-booking a, .public-catalog a, #bookingLinkDialog a, #pageLinkDialog a { text-decoration: none; }
#bookingLinkDialog a.outline-button, #catalogLinkDialog a.outline-button { color: var(--ink); }
#bookingLinkDialog[open], #catalogLinkDialog[open] { display: flex; flex-direction: column; }
.agenda-tool { position: relative; flex: 0 0 auto; min-width: 48px; min-height: 48px; padding: 0 12px; }
.agenda-tool-label { display: none; }
.agenda-tool .filter-badge { position: absolute; top: -6px; right: -4px; box-shadow: 0 0 0 2px var(--paper); }
.agenda-caption { display: flex; align-items: center; gap: 8px; min-height: 48px; }
.agenda-caption > p { flex: 1 1 auto; min-width: 0; font-size: .78rem; }
.agenda-caption .icon-button { flex: 0 0 44px; }
.agenda-caption svg { width: 17px; height: 17px; }
.agenda-applied { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: .78rem; color: var(--ink-soft); margin-bottom: 8px; }
.agenda-applied span { overflow-wrap: anywhere; }
.agenda-applied button { flex: 0 0 auto; }
#agendaError:empty { display: none; }
#agendaView .booking-list > .panel { margin-top: 0; }
.agenda-help summary, .public-booking summary { cursor: pointer; min-height: 44px; align-content: center; font-weight: 650; }
.booking-list { display: grid; gap: 14px; }
.booking-list[aria-busy=true] { opacity: .65; }
.booking-card, .booking-empty { padding: 20px; }
.booking-card h2 { font-size: 1.15rem; margin: 14px 0 4px; overflow-wrap: anywhere; }
.booking-card-heading { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; }
.booking-card-heading > strong { font-size: .85rem; }
.booking-status { border-radius: 20px; padding: 5px 10px; font-size: .72rem; font-weight: 750; background: var(--cream); color: var(--accent); }
.booking-status--cancelled, .booking-status--no_show { background: #f3eeee; color: #795254; }
.booking-status--completed { background: #e9edf1; color: #48576a; }
.booking-status--block { background: #eceef2; color: #4d5666; }
.booking-card--block { border-left: 4px solid #8a94a6; }
.booking-card--block h2 { color: #4d5666; }
.check-line { margin: 2px 0; }
.booking-contact { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 12px 0; font-size: .85rem; }
.booking-contact-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.booking-contact-actions a { color: var(--accent); text-decoration: none; min-height: 44px; }
.booking-actions .booking-delete { color: #b33333; }
.booking-note { white-space: pre-wrap; overflow-wrap: anywhere; margin: 6px 0 14px; color: var(--ink-soft); }
.booking-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.check-label { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.check-label input { width: 20px; min-height: 20px; height: 20px; flex: 0 0 20px; accent-color: var(--accent); }
.hours-fieldset, .slots-fieldset { border: 0; padding: 0; margin: 8px 0; min-width: 0; }
.hours-fieldset legend, .slots-fieldset legend { font-weight: 750; margin-bottom: 12px; }
.hours-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.hours-row > .check-label { grid-column: 1 / -1; }
.hours-row input[type=time] { padding: 0 8px; min-width: 0; }
.hours-row input:disabled { background: var(--paper); color: var(--ink-soft); }
.public-booking { max-width: 620px; margin: 0 auto; padding: 24px 14px max(32px, env(safe-area-inset-bottom)); }
.booking-brand { display: flex; gap: 12px; align-items: center; font-weight: 750; padding: 6px 8px 24px; overflow-wrap: anywhere; }
.public-booking-panel { padding: 24px 18px; }
.public-booking-panel h1 { margin-bottom: 12px; }
#publicBookingForm { display: grid; gap: 18px; margin-top: 20px; }
.public-booking .field-row > label { min-width: 0; }
.public-booking .field-row { grid-template-columns: minmax(0, 1fr); }
.public-booking input[type=date] { min-width: 0; }
.slot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.slot-button { min-height: 48px; cursor: pointer; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-weight: 700; }
.slot-button[aria-pressed=true] { background: var(--accent); border-color: var(--accent); color: #fff; }
.booking-selection, .booking-receipt { background: var(--cream); padding: 16px; border-radius: 14px; font-size: .9rem; overflow-wrap: anywhere; }
.booking-receipt { margin: 20px 0; }
.booking-receipt p:last-child { margin-bottom: 0; }
.booking-note-label { margin-top: 12px; }
#publicConfirmation { display: grid; gap: 14px; }
.public-booking-footer { text-align: center; color: var(--ink-soft); font-size: .75rem; margin-top: 24px; }
.saved-bookings { overflow: hidden; margin-bottom: 18px; }
.saved-bookings > summary { padding: 14px 18px; color: var(--accent); font-weight: 750; }
.saved-bookings > summary span { margin-left: 6px; font-size: .8rem; }
.saved-bookings-body { padding: 0 18px 12px; }
.saved-booking-list { max-height: 250px; overflow-y: auto; overscroll-behavior: contain; }
.saved-booking { display: grid; gap: 5px; padding: 14px 4px; border-top: 1px solid var(--line); color: var(--ink); overflow-wrap: anywhere; }
.saved-booking strong { font-size: .88rem; }
.saved-booking span { font-size: .78rem; color: var(--ink-soft); }
.saved-booking small { font-weight: 650; color: var(--accent); }
/* Calendar view of the agenda. The list stays the default; this only draws the
   same bookings on a time grid, sharing statuses, colours and actions with it. */
.agenda-modes { flex: 0 0 auto; padding: 3px; }
.agenda-modes button { min-height: 38px; min-width: 44px; padding: 0 10px; }
.agenda-modes svg { width: 19px; height: 19px; }
.agenda-scales .segmented { flex: 1 1 auto; }
.agenda-scales .segmented button { flex: 1 1 0; }
.agenda-scales { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 2px 0; }
.agenda-steps { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.agenda-today { flex: 0 0 auto; padding: 0 14px; border: 1px solid var(--line); }
.booking-share, .catalog-share { display: grid; gap: 10px; padding-top: 16px; }
.booking-share button, .catalog-share > button { justify-self: start; }
.booking-status--pending, .calendar-chip--pending { background: #fbf1e0; color: #835b15; }
.agenda-step { flex: 0 0 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); }
.agenda-step svg { width: 20px; height: 20px; }
.agenda-step--prev svg { transform: rotate(90deg); }
.agenda-step--next svg { transform: rotate(-90deg); }
.agenda-calendar { --hour-height: 54px; margin-top: 6px; }
.agenda-calendar[aria-busy=true] { opacity: .65; }
.calendar-scroll { overflow-x: auto; overscroll-behavior-x: contain; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.calendar-grid { display: grid; grid-template-columns: 50px repeat(var(--columns), minmax(116px, 1fr)); grid-template-rows: auto var(--body-height); min-width: 100%; }
.calendar-grid--week { grid-template-columns: 50px repeat(var(--columns), minmax(96px, 1fr)); }
.calendar-corner { position: sticky; left: 0; z-index: 3; background: var(--surface); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.calendar-head-cell { display: grid; gap: 2px; align-content: center; justify-items: center; min-height: 54px; padding: 8px 6px; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: .78rem; text-align: center; }
.calendar-head-cell strong { overflow-wrap: anywhere; }
.calendar-head-cell span { font-size: .72rem; }
.calendar-head-cell.is-today { background: var(--cream); color: var(--accent); }
.calendar-gutter { position: sticky; left: 0; z-index: 2; background: var(--surface); border-right: 1px solid var(--line); }
.calendar-gutter span { position: absolute; right: 6px; transform: translateY(-50%); font-size: .68rem; color: var(--ink-soft); }
.calendar-gutter span:first-child { transform: none; }
.calendar-column { position: relative; border-left: 1px solid var(--line); background-image: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px var(--hour-height)); }
.calendar-closed { position: absolute; left: 0; right: 0; display: grid; place-items: center; font-size: .7rem; color: var(--ink-soft); background: repeating-linear-gradient(45deg, #f1f4f8 0 6px, #e8edf3 6px 12px); }
.calendar-slot { position: absolute; left: 0; right: 0; padding: 0; border: 0; background: transparent; cursor: pointer; }
.calendar-slot:hover { background: rgba(24, 59, 101, .07); }
.calendar-event { position: absolute; display: grid; gap: 1px; align-content: start; min-height: 20px; padding: 4px 6px; border: 0; border-left: 3px solid var(--accent); border-radius: 8px; background: var(--cream); color: var(--accent); font-size: .7rem; line-height: 1.25; text-align: left; overflow: hidden; cursor: pointer; }
.calendar-event strong { font-size: .72rem; }
.calendar-event strong, .calendar-event span, .calendar-chip strong, .calendar-chip span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.calendar-event span { opacity: .8; }
.calendar-event--completed, .calendar-chip--completed { background: #e9edf1; border-left-color: #48576a; color: #48576a; }
.calendar-event--cancelled, .calendar-chip--cancelled { background: #f3eeee; border-left-color: #795254; color: #795254; text-decoration: line-through; }
.calendar-event--no_show, .calendar-chip--no_show { background: #f5efe8; border-left-color: #9c6f45; color: #795254; }
.calendar-event--block, .calendar-chip--block { border-left-color: #8a94a6; color: #4d5666; background: repeating-linear-gradient(45deg, #eef0f4 0 5px, #e3e7ee 5px 10px); }
.calendar-event--pending { background: #fbf1e0; border: 1px dashed #c99b45; border-left: 3px solid #c99b45; color: #835b15; }
.calendar-now { position: absolute; left: 0; right: 0; height: 0; border-top: 2px solid var(--danger); z-index: 2; pointer-events: none; }
.calendar-now span { position: absolute; left: 3px; top: -9px; padding: 1px 6px; border-radius: 9px; background: var(--danger); color: #fff; font-size: .6rem; font-weight: 750; }
.calendar-month { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.calendar-month-head, .calendar-month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-month-head { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .68rem; color: var(--ink-soft); text-align: center; }
.calendar-day-cell { display: grid; gap: 3px; align-content: start; min-height: 80px; min-width: 0; padding: 4px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.calendar-day-cell:nth-child(7n + 1) { border-left: 0; }
.calendar-day-cell.is-outside { background: var(--paper); }
.calendar-day-cell.is-outside .calendar-day-number { color: var(--ink-soft); }
.calendar-day-number { justify-self: start; min-width: 26px; min-height: 26px; padding: 0; border: 0; border-radius: 50%; background: transparent; font-size: .74rem; font-weight: 700; cursor: pointer; }
.calendar-day-cell.is-today .calendar-day-number { background: var(--accent); color: #fff; }
.calendar-chips { display: grid; gap: 2px; min-width: 0; }
.calendar-chip { display: grid; min-width: 0; padding: 2px 5px; border: 0; border-radius: 6px; background: var(--cream); color: var(--accent); font-size: .62rem; line-height: 1.2; text-align: left; cursor: pointer; }
.calendar-more { min-height: 18px; padding: 0 5px; border: 0; background: transparent; color: var(--ink-soft); font-size: .62rem; text-align: left; cursor: pointer; }
@media (min-width: 540px) {
  .public-booking .field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hours-row { grid-template-columns: 1.2fr 1fr 1fr; align-items: center; }
  .hours-row > .check-label { grid-column: auto; }
  .agenda-tool-label { display: inline; }
  .agenda-scales .segmented { flex: 0 0 auto; margin-left: auto; }
  .agenda-scales .segmented button { flex: 0 0 auto; }
  .agenda-calendar { --hour-height: 62px; }
  .calendar-day-cell { min-height: 104px; }
  .public-booking { padding-top: 48px; }
  .public-booking-panel { padding: 32px; }
  .slot-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

* { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 3px solid rgba(64, 119, 184, 0.6);
  outline-offset: 2px;
}
button:disabled { cursor: not-allowed; opacity: 0.6; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 4px; font-size: clamp(1.55rem, 4vw, 2rem); line-height: 1.14; letter-spacing: -0.035em; }
h2 { margin-bottom: 4px; font-size: 1.2rem; letter-spacing: -0.02em; }
h3 { margin-bottom: 6px; font-size: 1rem; }
.muted { color: var(--ink-soft); margin-bottom: 0; }
.eyebrow { margin-bottom: 6px; color: #77766e; font-size: 0.7rem; font-weight: 750; letter-spacing: 0.11em; text-transform: uppercase; }
.brand-mark { display: grid; width: 42px; height: 42px; place-items: center; flex: 0 0 auto; border-radius: 13px; background: var(--ink); color: var(--accent); font-size: 0.79rem; font-weight: 900; letter-spacing: -0.08em; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.brand-mark--large { width: 92px; height: 92px; border-radius: 26px; background: var(--accent); color: var(--ink); font-size: 1.5rem; transform: rotate(-5deg); }

label { display: grid; gap: 7px; color: #484741; font-size: 0.78rem; font-weight: 700; }
input, select, textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  padding: 0 14px;
  transition: border-color .18s, box-shadow .18s;
}
textarea { min-height: 86px; padding-top: 13px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: #cfcdc2; }
input:focus, select:focus, textarea:focus { border-color: #4976ad; box-shadow: 0 0 0 4px rgba(49, 93, 148, .12); outline: 0; }
input::placeholder, textarea::placeholder { color: #aaa89e; }
.optional { float: right; color: #96948a; font-weight: 500; }

.primary-button, .outline-button, .text-button, .danger-button, .icon-button, .close-button {
  display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 9px; border: 0; border-radius: 12px; cursor: pointer; font-weight: 750; transition: transform .15s, background .15s, border-color .15s;
}
.primary-button { padding: 0 18px; background: var(--accent); color: #ffffff; box-shadow: 0 5px 14px rgba(24, 59, 101, .16); }
.primary-button:hover { background: var(--accent-strong); transform: translateY(-1px); }
.primary-button--wide { width: 100%; }
.outline-button { padding: 0 16px; border: 1px solid var(--line); background: #fff; }
.outline-button:hover { border-color: #c6c3b7; background: #faf9f5; }
.text-button { min-height: 40px; padding: 0 7px; background: transparent; color: #183b65; }
.danger-button { padding: 0 18px; background: var(--danger); color: white; }
.icon-button { width: 44px; min-width: 44px; padding: 0; background: transparent; color: #6d6b63; }
.close-button { width: 44px; min-width: 44px; background: #f0efe9; font-size: 1.65rem; font-weight: 400; }
.form-error { min-height: 18px; margin: 2px 0 4px; color: #bb3434; font-size: .78rem; font-weight: 650; }

.startup-screen { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.startup-content { display: grid; justify-items: center; gap: 16px; text-align: center; }
.startup-content p { display: flex; align-items: center; gap: 8px; font-size: .85rem; }
.startup-spinner { width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: startup-spin .8s linear infinite; }
@keyframes startup-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .startup-spinner { animation: none; } }

.login-shell { min-height: 100dvh; display: grid; background: var(--surface); }
.login-art { display: none; }
.login-card { width: min(100%, 430px); margin: auto; padding: 34px 24px; }
.login-card h1 { font-size: 2rem; margin-top: 24px; }
.login-card form { display: grid; gap: 13px; margin-top: 30px; }
.mobile-brand { display: flex; align-items: center; gap: 12px; font-size: 1.08rem; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 48px; }
.password-wrap .icon-button { position: absolute; right: 2px; top: 2px; }

.app-shell { min-height: 100dvh; }
.sidebar { display: none; }
.main-area { min-width: 0; }
.topbar { display: flex; min-height: 92px; align-items: center; justify-content: space-between; padding: 19px 18px 13px; background: var(--paper); }
.topbar h1 { font-size: 1.5rem; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.desktop-new { display: none; }
.connection-pill { display: none; align-items: center; gap: 7px; color: #627086; font-size: .76rem; }
.connection-pill i { width: 7px; height: 7px; border-radius: 50%; background: #3c68a3; box-shadow: 0 0 0 3px rgba(60,104,163,.12); }
.connection-pill.offline i { background: #ca5656; box-shadow: 0 0 0 3px rgba(202,86,86,.12); }
.content { padding: 0 14px calc(105px + env(safe-area-inset-bottom)); }
.view { animation: fade-in .24s ease both; }
@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } }

.period-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 18px; overflow-x: auto; scrollbar-width: none; }
.period-row::-webkit-scrollbar { display: none; }
.segmented { display: inline-flex; flex: 0 0 auto; padding: 4px; border: 1px solid var(--line); border-radius: 13px; background: #edece6; }
.segmented button { min-height: 38px; padding: 0 13px; border: 0; border-radius: 9px; background: transparent; color: #737168; cursor: pointer; font-size: .79rem; font-weight: 700; }
.segmented button.active { background: var(--surface); color: var(--ink); box-shadow: 0 3px 10px rgba(20,20,16,.08); }
#openCustomRange, #openExpenseRange { display: none; white-space: nowrap; }
.custom-range { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; margin: -6px 0 18px; padding: 15px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.custom-range .primary-button { grid-column: 1 / -1; }

.metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.metric-card { min-height: 156px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 6px 24px rgba(29,28,22,.035); }
.metric-card:first-child { grid-column: 1 / -1; }
.metric-card--dark { position: relative; overflow: hidden; border-color: #282824; background: var(--ink); color: white; }
.metric-card--dark::after { content: ""; position: absolute; width: 150px; height: 150px; right: -62px; bottom: -88px; border: 28px solid rgba(147,190,239,.12); border-radius: 50%; }
.metric-icon { display: grid; width: 38px; height: 38px; place-items: center; margin-bottom: 22px; border-radius: 11px; background: var(--accent); color: var(--ink); }
.metric-icon--light { background: #edf2f8; }
.metric-icon svg { width: 19px; height: 19px; }
.metric-card p { margin-bottom: 3px; color: #74736b; font-size: .76rem; font-weight: 650; }
.metric-card--dark p { color: #bdbdb4; }
.metric-card strong { display: block; margin-bottom: 2px; font-size: clamp(1.65rem, 6vw, 2.25rem); line-height: 1.12; letter-spacing: -0.045em; }
.metric-card small { color: #8d8b83; }

.panel { margin-top: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 7px 30px rgba(29,28,22,.03); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 18px 10px; }
.panel-heading p { font-size: .78rem; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 12px; color: var(--ink-soft); font-size: .72rem; }
.chart-legend span { display: flex; align-items: center; gap: 6px; }
.chart-legend i { width: 10px; height: 3px; border-radius: 4px; }
.legend-revenue { background: var(--ink); }
.legend-cuts { background: #5289c5; }
.chart-wrap { position: relative; min-height: 255px; padding: 10px 6px 7px; overflow: hidden; }
#performanceChart { display: block; width: 100%; min-width: 0; height: 280px; overflow: visible; }
#performanceChart text { stroke: none; }
.chart-wrap:has(#performanceChart:not([hidden])) { overflow-x: auto; }
.chart-loading { height: 215px; margin: 10px 16px; border-radius: 13px; }
.skeleton, .loading-list::before { background: linear-gradient(90deg,#f0efe9 25%,#faf9f5 50%,#f0efe9 75%); background-size: 200% 100%; animation: shimmer 1.35s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty-state { display: grid; min-height: 225px; place-items: center; align-content: center; text-align: center; padding: 25px; }
.empty-state p { max-width: 300px; margin: 0; color: var(--ink-soft); }
.empty-icon { display: grid; width: 48px; height: 48px; place-items: center; margin-bottom: 12px; border-radius: 15px; background: #edf2f8; }

.recent-panel { margin-bottom: 10px; }
.cut-list { min-height: 84px; padding: 2px 14px 10px; }
.loading-list::before { content: ""; display: block; height: 72px; margin: 6px 0; border-radius: 13px; }
.cut-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 11px; align-items: center; min-height: 76px; border-top: 1px solid #eeece5; }
.cut-row:first-child { border-top: 0; }
.cut-avatar { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; background: #edf2f8; font-weight: 850; }
.cut-info { min-width: 0; }
.cut-info strong, .cut-info small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cut-info strong { margin-bottom: 3px; font-size: .9rem; }
.cut-info small { color: var(--ink-soft); font-size: .74rem; }
.cut-price { text-align: right; }
.cut-price strong { display: block; font-size: .95rem; }
.cut-actions { display: flex; justify-content: flex-end; gap: 3px; margin-top: 3px; }
.cut-actions button { width: 32px; height: 28px; min-height: 28px; border: 0; border-radius: 8px; background: transparent; color: #85837b; cursor: pointer; }
.cut-actions button:hover { background: #efeee8; color: var(--ink); }
.cut-actions svg { width: 15px; height: 15px; }
.list-empty { padding: 30px 18px 36px; text-align: center; color: var(--ink-soft); }
.list-empty h3 { color: var(--ink); }

.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 8px 2px 14px; }
.section-heading h2 { font-size: 1.55rem; }
.section-heading > .primary-button { flex: 0 0 auto; }
.history-panel { margin-top: 14px; }
.history-panel .cut-list { padding: 4px 16px 14px; }
.barber-form { display: grid; gap: 10px; padding: 18px 0 0; border-top: 1px solid var(--line); }
.barber-list { padding: 3px 18px 18px; }
.barber-row { display: flex; align-items: center; gap: 12px; min-height: 66px; border-top: 1px solid var(--line); }
.barber-row:first-child { border-top: 0; }
.barber-row .avatar { background: var(--ink); color: var(--accent); }
.barber-row div:last-child { display: grid; }
.barber-row small { color: var(--ink-soft); }
.barber-row .barber-info { display: grid; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.sync-banner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 14px 16px; margin-bottom: 18px; border: 1px solid #c6d6eb; border-radius: 14px; background: #eaf1fa; color: #183b65; font-size: .85rem; }
.sync-banner span { flex: 1 1 200px; }
.pending-label { color: #835b15 !important; white-space: normal !important; }
.cache-note { color: #835b15; font-size: .8rem; margin: 0 0 14px; }
.cache-note:empty { display: none; }
.avatar { display: grid; width: 38px; height: 38px; place-items: center; flex: 0 0 auto; border-radius: 12px; background: var(--cream); font-size: .8rem; font-weight: 850; }

.bottom-nav { position: fixed; z-index: 30; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(5,1fr); min-height: calc(72px + env(safe-area-inset-bottom)); padding: 6px 5px env(safe-area-inset-bottom); border-top: 1px solid rgba(220,218,208,.9); background: rgba(255,255,255,.94); box-shadow: 0 -8px 30px rgba(22,22,18,.06); backdrop-filter: blur(14px); }
.bottom-nav button { display: grid; min-height: 58px; place-items: center; align-content: center; gap: 4px; border: 0; background: transparent; color: #85837b; font-size: .65rem; font-weight: 650; cursor: pointer; }
.bottom-nav button.active { color: var(--ink); }
.bottom-nav svg { width: 20px; height: 20px; }
/* Centred in the bar rather than floating over it, and without a label: the
   button no longer means one thing, it opens the list of what can be added. */
.bottom-nav .mobile-add { color: var(--ink); align-content: center; }
.mobile-add span { display: grid; width: 52px; height: 44px; place-items: center; border-radius: 15px; background: var(--accent); box-shadow: 0 6px 16px rgba(24,59,101,.24); transition: transform .15s; }
.mobile-add span svg { width: 23px; height: 23px; }
.mobile-add:active span { transform: scale(.94); }

/* Both ways of filling the agenda hang from one button, out of the way of the
   grid that is read all day and above the mobile navigation bar. */
.fab { position: fixed; z-index: 25; right: 16px; bottom: calc(86px + env(safe-area-inset-bottom)); display: grid; justify-items: end; gap: 10px; }
.fab-toggle { display: grid; width: 56px; height: 56px; place-items: center; justify-self: end; border: 0; border-radius: 18px; background: var(--accent); color: #fff; cursor: pointer; box-shadow: 0 10px 26px rgba(24,59,101,.3); transition: transform .18s; }
.fab-toggle svg { width: 26px; height: 26px; }
.fab-toggle.is-open { transform: rotate(45deg); }
.fab-menu { display: grid; gap: 4px; max-width: min(300px, calc(100vw - 32px)); padding: 6px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); animation: fade-in .16s ease both; }
/* One row for every list of things that can be created, so the agenda menu and
   the drawer of the navigation bar read the same and only differ in size. */
.action-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 12px; border: 0; border-radius: 13px; background: transparent; color: var(--ink); cursor: pointer; text-align: left; }
.action-row:hover, .action-row:focus-visible { background: var(--cream); }
.action-row--large { min-height: 84px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.action-row--large:hover { border-color: #c9d7e8; background: #f8fafd; }
.action-icon { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; border-radius: 12px; background: var(--cream); color: var(--accent); }
.action-row--large .action-icon { width: 46px; height: 46px; flex-basis: 46px; border-radius: 14px; }
.action-icon--muted { background: #eceef2; color: #4d5666; }
.action-icon svg { width: 19px; height: 19px; }
.action-row--large .action-icon svg { width: 22px; height: 22px; }
.action-text { display: grid; gap: 2px; min-width: 0; flex: 1; }
.action-text strong { font-size: .87rem; overflow-wrap: anywhere; }
.action-row--large .action-text strong { font-size: .95rem; }
.action-text small { color: var(--ink-soft); font-size: .72rem; line-height: 1.45; }
.action-chevron { flex-shrink: 0; width: 18px; height: 18px; color: var(--ink-soft); transform: rotate(-90deg); }

dialog { color: var(--ink); }
/* A drawer, not a centred dialog: it belongs to the bar it rises from, reaches
   about half the screen and grows with its list instead of taking the whole view. */
.bottom-sheet { inset: auto 0 0 0; width: 100%; max-width: 560px; min-height: min(44dvh, 360px); max-height: 86dvh; margin: 0 auto; padding: 0; overflow: hidden; border: 0; border-radius: 26px 26px 0 0; background: white; box-shadow: 0 -16px 50px rgba(20,20,17,.22); }
.bottom-sheet[open] { display: flex; flex-direction: column; animation: sheet-rise .26s cubic-bezier(.2,.8,.2,1); }
.bottom-sheet::backdrop { background: rgba(18,18,16,.52); backdrop-filter: blur(3px); }
.bottom-sheet .dialog-header { padding: 4px 20px 10px; }
.bottom-sheet .dialog-body { gap: 10px; padding: 4px 16px calc(24px + env(safe-area-inset-bottom)); align-content: start; }
.sheet-grip { width: 42px; height: 5px; flex-shrink: 0; margin: 10px auto 0; border-radius: 3px; background: #dcdfe6; }
@keyframes sheet-rise { from { transform: translateY(100%); } }
.sheet-dialog { inset: 0; width: min(calc(100% - 32px), 520px); max-width: calc(100% - 32px); max-height: calc(100dvh - 32px); margin: auto; padding: 0; overflow: hidden; border: 0; border-radius: 22px; background: white; box-shadow: var(--shadow); }
.sheet-dialog > form { display: flex; flex-direction: column; max-height: calc(100dvh - 32px); }
.sheet-dialog::backdrop, .confirm-dialog::backdrop { background: rgba(18,18,16,.52); backdrop-filter: blur(3px); }
.sheet-dialog[open] { animation: sheet-up .24s ease-out; }
@keyframes sheet-up { from { transform: translateY(30px); opacity: 0; } }
.dialog-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 20px 12px; }
.dialog-body { display: grid; gap: 12px; min-height: 0; padding: 8px 20px 18px; overflow-y: auto; overscroll-behavior: contain; }
.dialog-header, .dialog-footer { flex-shrink: 0; }
.dialog-footer { display: grid; grid-template-columns: .8fr 1.2fr; gap: 10px; padding: 13px 20px calc(13px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: white; }
.field-row { display: grid; grid-template-columns: 1.2fr .8fr; gap: 10px; }
.money-input { position: relative; }
.money-input span { position: absolute; left: 15px; top: 13px; color: var(--ink-soft); }
.money-input input { padding-left: 32px; font-size: 1.05rem; font-weight: 750; }
.select-with-action { display: grid; grid-template-columns: 1fr 48px; gap: 7px; }
.select-with-action .icon-button { border: 1px solid var(--line); }
.confirm-dialog { width: min(calc(100% - 32px), 400px); padding: 28px; border: 0; border-radius: 22px; text-align: center; box-shadow: var(--shadow); }
.confirm-dialog p { color: var(--ink-soft); }
.danger-icon { display: grid; width: 52px; height: 52px; place-items: center; margin: 0 auto 14px; border-radius: 16px; background: #fff0f0; color: var(--danger); }
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 24px; }
.toast-region { position: fixed; z-index: 100; right: 14px; bottom: calc(86px + env(safe-area-inset-bottom)); left: 14px; display: grid; gap: 8px; pointer-events: none; }
.toast { display: flex; max-width: 410px; align-items: center; gap: 10px; margin-left: auto; padding: 13px 15px; border-radius: 13px; background: var(--ink); color: white; box-shadow: 0 12px 35px rgba(20,20,17,.25); animation: toast-in .22s ease both; }
.toast.error { background: #a93636; }
.toast svg { color: var(--accent); }
@keyframes toast-in { from { transform: translateY(12px); opacity: 0; } }

.brand-mark, .brand-mark--large, .barber-row .avatar, .mobile-add span, .metric-icon { background: var(--accent); color: white; }
.metric-icon--light { background: #edf2f8; color: var(--accent); }
.metric-card--dark { background: #142d50; border-color: #142d50; }
.metric-card--dark p, .metric-card--dark small { color: #c3d2e5; }
.metric-card--dark .metric-icon { background: #29486e; }
.toast svg { color: #bfd9fa; flex-shrink: 0; }
.history-toolbar, .toolbar-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.history-toolbar { min-height: 48px; }
.history-toolbar p { font-size: .82rem; }
.filter-badge { display: grid; place-items: center; min-width: 21px; height: 21px; border-radius: 7px; background: var(--accent); color: white; font-size: .7rem; }
.settings-form { display: grid; gap: 12px; padding: 20px; border-top: 1px solid var(--line); }
.field-help { margin: -5px 0 10px; font-size: .78rem; color: var(--ink-soft); }
.settings-stack { display: grid; gap: 16px; width: 100%; max-width: 760px; }
.settings-intro { margin: 0 0 4px; font-size: .88rem; }
.settings-group { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); overflow: hidden; }
.settings-group > summary { display: flex; align-items: center; gap: 12px; min-height: 84px; padding: 18px 20px; cursor: pointer; list-style: none; }
.settings-group > summary::-webkit-details-marker { display: none; }
.settings-group > summary:hover { background: #f8fafd; }
.settings-group > summary:focus-visible { outline: 3px solid #79abe0; outline-offset: -3px; border-radius: 17px; }
.settings-group-icon { display: grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; background: #edf2f8; color: var(--accent); border-radius: 12px; }
.settings-group-text { display: grid; gap: 3px; min-width: 0; flex: 1; }
.settings-group-text strong { font-size: .94rem; }
.settings-group-text small { color: var(--ink-soft); font-size: .77rem; }
.settings-chevron { flex-shrink: 0; color: var(--ink-soft); transition: transform .15s; }
.settings-group[open] > summary .settings-chevron { transform: rotate(180deg); }
.settings-group-body { padding: 0 20px 20px; border-top: 1px solid var(--line); }
.settings-group-body .barber-list { padding: 0 0 12px; }
.barber-add-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; }
.settings-save { display: flex; justify-content: flex-end; padding-top: 8px; }
.settings-save button { width: 100%; }
.install-body { display: grid; justify-items: start; gap: 16px; padding-top: 18px; }
.install-body a { text-decoration: none; }
#installShortcut { padding: 0 10px; min-width: 44px; font-size: .75rem; }
.settings-session { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 20px 2px; border-top: 1px solid var(--line); margin-top: 8px; }
.settings-session strong { font-size: .86rem; }
.settings-session p { margin-top: 4px; font-size: .77rem; }

/* Catálogo de funciones. Dos columnas en el móvil, como la retícula del icono que
   lo abre; lo que todavía no existe se ve y se explica, pero no invita a pulsar. */
/* --- Productos -------------------------------------------------------------
   Una tarjeta por producto, con la foto arriba: es lo que permite reconocerlo
   sin leer. Cada tarjeta vende con un toque; publicar se decide en la página
   del negocio, en Configuración. */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.products-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.products-toolbar > p { flex: 1 1 auto; min-width: 0; font-size: .82rem; }
.products-toolbar .primary-button { flex: 0 0 auto; }

.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.product-grid > .product-empty { grid-column: 1 / -1; }
.product-card { display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 6px 24px rgba(29,28,22,.035); }
.product-photo { position: relative; aspect-ratio: 4 / 3; background: #eef2f7; }
.product-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-photo--empty { display: grid; place-items: center; color: #a8b3c2; }
.product-photo--empty svg { width: 30px; height: 30px; stroke-width: 1.4; }
.product-flag { position: absolute; top: 8px; left: 8px; padding: 3px 8px; border-radius: 7px; background: rgba(24,40,63,.86); color: #fff; font-size: .64rem; font-weight: 700; }
.product-flag--warn { background: rgba(167,102,32,.92); }
.product-body { display: grid; align-content: start; gap: 5px; padding: 14px 14px 6px; }
.product-body h3 { font-size: .92rem; margin: 0; overflow-wrap: anywhere; }
#productForm .field-row > label { align-content: start; }
.product-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0; font-size: .8rem; }
.product-meta strong { font-size: .95rem; }
.product-meta span { color: var(--ink-soft); font-size: .74rem; }
.product-description { margin: 0; color: var(--ink-soft); font-size: .76rem; line-height: 1.5; overflow-wrap: anywhere; }
.product-actions { display: flex; justify-content: flex-end; gap: 2px; padding: 4px 8px 8px; }
.icon-button--danger { color: #a93636; }
.product-empty .primary-button { margin-top: 16px; }
.product-grid--single { grid-template-columns: minmax(0, 420px); }
.product-grid--single .product-card { grid-template-columns: 132px minmax(0, 1fr); grid-template-rows: 1fr auto; }
.product-grid--single .product-photo { grid-row: 1 / -1; aspect-ratio: auto; height: 100%; }

/* La foto se elige con un control propio: el input nativo no se puede alinear
   con el resto del formulario ni describe lo que va a pasar. */
.photo-field { display: flex; align-items: center; gap: 14px; padding-bottom: 6px; }
.photo-preview { position: relative; display: grid; place-items: center; flex: 0 0 92px; width: 92px; height: 92px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #eef2f7; color: #a8b3c2; }
.photo-preview svg { width: 28px; height: 28px; stroke-width: 1.4; }
.photo-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-actions { display: grid; justify-items: start; gap: 8px; min-width: 0; }
.photo-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.photo-pick { cursor: pointer; }
.photo-actions .field-help { margin: 0; }

/* --- Catálogo público ------------------------------------------------------ */
.public-catalog { max-width: 720px; margin: 0 auto; padding: 24px 14px max(32px, env(safe-area-inset-bottom)); }
.public-catalog-panel { padding: 24px 18px; }
.public-catalog-panel h1 { margin-bottom: 12px; overflow-wrap: anywhere; }
.public-catalog-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.public-catalog-grid > .muted { grid-column: 1 / -1; }
.public-product { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.public-product-photo { position: relative; aspect-ratio: 1 / 1; background: #eef2f7; }
.public-product-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.public-product-photo--empty { display: grid; place-items: center; color: var(--accent); font-size: 1.8rem; font-weight: 750; }
.public-product-body { display: grid; gap: 5px; padding: 14px; }
.public-product-body h2 { font-size: .95rem; margin: 0; overflow-wrap: anywhere; }
.public-product-body p { margin: 0; color: var(--ink-soft); font-size: .78rem; line-height: 1.5; overflow-wrap: anywhere; }
.public-product-price { font-size: 1rem; }
.public-catalog-grid--single { grid-template-columns: minmax(0, 1fr); }
.public-catalog-grid--single .public-product { display: grid; grid-template-columns: 148px minmax(0, 1fr); }
.public-catalog-grid--single .public-product-photo { aspect-ratio: auto; height: 100%; }

.more-sections { display: grid; gap: 26px; width: 100%; max-width: 760px; margin-top: 18px; }
.more-section > h2 { font-size: .95rem; margin-bottom: 3px; }
.more-section > .muted { margin-bottom: 12px; font-size: .78rem; }
.more-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.more-grid--single { grid-template-columns: minmax(0, 1fr); }
.more-grid--single .more-card { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "icon title" "icon text"; align-items: center; column-gap: 14px; row-gap: 3px; min-height: 0; padding: 18px 20px; }
.more-grid--single .more-card-top { grid-area: icon; }
.more-grid--single .more-card-title { grid-area: title; align-self: end; }
.more-grid--single .more-card small { grid-area: text; align-self: start; }
.more-card { display: grid; align-content: start; gap: 9px; min-height: 152px; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 6px 24px rgba(29,28,22,.035); color: inherit; font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, transform .15s; }
.more-card:hover { border-color: #c9d7e8; transform: translateY(-1px); }
.more-card:focus-visible { outline: 3px solid #79abe0; outline-offset: 2px; }
.more-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.more-card-icon { display: grid; flex-shrink: 0; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: #edf2f8; color: var(--accent); }
.more-card-title { font-size: .92rem; overflow-wrap: anywhere; }
.more-card small { color: var(--ink-soft); font-size: .76rem; line-height: 1.5; }
.more-badge { padding: 3px 7px; border-radius: 6px; background: #eaf0f7; color: #627086; font-size: .61rem; font-weight: 650; }
.more-card--soon { background: #fbfcfe; cursor: default; }
.more-card--soon:hover { border-color: var(--line); transform: none; }
.more-card--soon .more-card-icon { background: #f1f3f6; color: #8d98a8; }
.more-card--soon .more-card-title { color: var(--ink-soft); }
/* Configuración se abre desde el catálogo y lo reemplaza: el regreso es explícito
   porque la navegación no apila historial. En desktop la barra lateral ya lo da. */
.view-back { justify-self: start; margin: 0 0 2px -7px; }
.view-back svg { transform: rotate(90deg); }
.nav-coming { margin-left: auto; font-size: .61rem; font-weight: 650; padding: 3px 6px; border-radius: 5px; background: #eaf0f7; color: #627086; }
.coming-panel { display: grid; justify-items: center; align-content: center; min-height: min(62dvh, 540px); max-width: 760px; padding: 32px 20px; text-align: center; }
.coming-illustration { display: grid; place-items: center; width: 96px; height: 96px; margin-bottom: 24px; background: #eaf0f8; color: var(--accent); border: 1px solid #d9e3f0; border-radius: 28px; }
.coming-illustration svg { width: 40px; height: 40px; stroke-width: 1.3; }
.status-label { padding: 6px 12px; border: 1px solid #dbe5f2; border-radius: 20px; background: #edf2f8; color: var(--accent); font-size: .74rem; font-weight: 750; margin-bottom: 20px; }
.coming-panel h2 { font-size: clamp(1.3rem, 4vw, 1.75rem); margin-bottom: 12px; }
.coming-panel > p { max-width: 340px; }
.coming-panel .field-help { margin: 16px 0 0; }
.form-error:empty { display: none; }
.quick-price input { min-height: 76px; padding-left: 38px; font-size: 2rem; letter-spacing: -.04em; }
.quick-price span { top: 23px; font-size: 1.2rem; }
.quick-summary { margin: 0 0 4px; font-size: .8rem; color: var(--ink-soft); line-height: 1.6; overflow-wrap: anywhere; }
.cut-details { border-top: 1px solid var(--line); }
.cut-details summary { min-height: 58px; padding: 14px 0; cursor: pointer; color: var(--accent); font-size: .86rem; font-weight: 750; }
.cut-details summary span { display: block; margin: 3px 0 0 17px; color: var(--ink-soft); font-weight: 400; font-size: .75rem; }
.cut-details summary:focus-visible { outline: 3px solid #79abe0; outline-offset: 2px; border-radius: 6px; }
.details-fields { display: grid; gap: 12px; padding: 2px 0 8px; }
input, select, textarea, label { min-width: 0; }
input, select, textarea { font-size: 16px; }
.field-row { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); }
.cut-actions button { width: 44px; height: 44px; min-height: 44px; }
.cut-info small { white-space: normal; overflow-wrap: anywhere; }

/* Gastos. Cada categoría lleva su color y lo repite en la barra del desglose y
   en el avatar de su fila: la relación entre «en qué se va» y cada registro se
   ve sin tener que leerla. La lista reutiliza las filas del historial de cortes,
   porque son la misma cosa —una fecha, un concepto y un importe— y merecen la
   misma lectura. */
.expense-cat--supplies { --expense-color: #2f5f96; }
.expense-cat--rent { --expense-color: #4c7a5a; }
.expense-cat--utilities { --expense-color: #a9772f; }
.expense-cat--equipment { --expense-color: #62579b; }
.expense-cat--staff { --expense-color: #a3555b; }
.expense-cat--other { --expense-color: #77766e; }
.expense-breakdown { display: grid; gap: 15px; padding: 4px 18px 20px; }
.expense-split-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: .87rem; }
.expense-track { height: 8px; margin: 8px 0 5px; border-radius: 6px; background: #f0efe9; overflow: hidden; }
.expense-bar { height: 100%; border-radius: 6px; background: var(--expense-color, var(--accent)); }
.expense-breakdown small { display: block; font-size: .74rem; }
.expense-avatar { background: #edf2f8; background: color-mix(in srgb, var(--expense-color, #183b65) 14%, white); color: var(--expense-color, var(--accent)); font-size: .8rem; }
.metric-negative { color: var(--danger); }
#addExpense { min-height: 44px; padding: 0 14px; font-size: .82rem; }
.chip-field { min-width: 0; margin: 2px 0; padding: 0; border: 0; }
.chip-field legend { margin-bottom: 9px; padding: 0; font-size: .82rem; font-weight: 650; }
.expense-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.expense-chip { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 15px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); color: var(--ink-soft); font-size: .84rem; font-weight: 650; cursor: pointer; }
.expense-chip input { position: absolute; inset: 0; margin: 0; appearance: none; opacity: 0; cursor: pointer; }
.expense-chip:has(input:checked) { border-color: var(--expense-color, var(--accent)); color: var(--expense-color, var(--accent)); background: color-mix(in srgb, var(--expense-color, #183b65) 10%, white); }
.expense-chip:has(input:focus-visible) { outline: 3px solid #79abe0; outline-offset: 2px; }

/* Clientes y servicios. Las dos listas reutilizan las filas del historial: un
   nombre, un dato secundario y, a la derecha, un importe o las acciones. El
   buscador de cliente del formulario es un combobox propio porque un <select>
   no busca y un <datalist> no distingue dos clientes con el mismo nombre. */
.list-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; margin: 4px 0 12px; }
.panel-add { min-height: 44px; padding: 0 14px; font-size: .82rem; white-space: nowrap; }
.panel-heading > .muted { flex-shrink: 0; }
.field-group { display: grid; gap: 12px; }
.link-button { display: inline; min-height: 0; padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.cut-row--client { grid-template-columns: minmax(0, 1fr) auto; }
.client-open { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 11px; align-items: center; width: 100%; min-width: 0; min-height: 76px; padding: 0; border: 0; border-radius: 12px; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.client-open:hover .cut-info strong, .client-open:focus-visible .cut-info strong { color: var(--accent); }
.service-avatar { background: #eaf0f7; color: var(--accent); font-size: .8rem; }
.default-badge { display: inline-block; margin-left: 7px; padding: 2px 7px; border-radius: 6px; background: #eaf0f7; color: var(--accent); font-size: .62rem; font-weight: 700; vertical-align: 2px; }
.client-picker-field { position: relative; }
.client-picker-field input { padding-right: 46px; }
.client-picker-field input.is-selected { border-color: #4976ad; background: #f3f7fc; font-weight: 700; }
.picker-clear { position: absolute; right: 4px; top: 4px; width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-soft); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.picker-clear:hover { background: var(--cream); color: var(--ink); }
.picker-options { margin: 6px 0 0; padding: 4px; list-style: none; max-height: 232px; overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 10px 30px rgba(29,28,22,.08); }
.picker-option { display: grid; gap: 1px; min-height: 48px; padding: 8px 12px; border-radius: 10px; cursor: pointer; }
.picker-option strong { font-size: .88rem; overflow-wrap: anywhere; }
.picker-option small { color: var(--ink-soft); font-size: .74rem; }
.picker-option:hover, .picker-option.is-active { background: var(--cream); }
.picker-option--create strong { color: var(--accent); }
.picker-option--create strong::before { content: "+ "; }
.picker-hint { margin: -6px 0 0; }
.picker-hint:empty { display: none; }
#clientDetailDialog[open] { display: flex; flex-direction: column; }
.client-facts { display: grid; gap: 14px; padding: 2px 0 6px; }
.client-fact { display: grid; gap: 4px; }
.client-fact small { color: var(--ink-soft); font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.client-fact strong { font-size: .95rem; overflow-wrap: anywhere; }
.client-fact .booking-contact-actions { margin-top: 6px; }
.client-visits-title { margin: 6px 0 0; font-size: .82rem; color: var(--ink-soft); }
#clientVisits { min-height: 60px; padding: 0; }
#clientVisits .cut-row { min-height: 64px; }
.client-detail-actions { grid-template-columns: 1fr 1fr; }
.client-detail-actions svg { width: 18px; height: 18px; }


/* Ventas. Un servicio realizado y un producto vendido comparten formulario y
   lista: el conmutador de arriba cambia el catálogo y descubre la cantidad; la
   etiqueta de la fila dice qué fue sin necesitar otra lista. */
.sale-kinds { display: flex; width: 100%; margin: 4px 0 12px; }
.sale-kinds button { flex: 1 1 0; }
.sale-kind-toggle { display: flex; width: 100%; margin-bottom: 14px; }
.sale-kind-toggle button { display: inline-flex; flex: 1 1 0; align-items: center; justify-content: center; gap: 8px; }
.sale-kind-toggle svg { width: 17px; height: 17px; }
.sale-amounts { align-items: start; }
.sale-amounts > label[hidden] { display: none; }
.stepper { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; margin-top: 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.stepper input { min-height: 46px; border: 0; border-radius: 0; text-align: center; font-weight: 700; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper-button { border: 0; background: var(--cream); color: var(--ink); font-size: 1.25rem; font-weight: 700; cursor: pointer; }
.stepper-button:hover { background: #e6e4dc; }
.sale-total { margin: -4px 0 12px; font-size: .95rem; font-weight: 750; text-align: right; }
.sale-tag { display: inline-block; margin-left: 7px; padding: 2px 7px; border-radius: 6px; background: #f1ecdf; color: #7a5a1c; font-size: .62rem; font-weight: 700; vertical-align: 2px; }
.cut-row--product .cut-avatar { background: #f5f0e4; }
.product-sell { min-height: 40px; margin-right: auto; padding: 0 12px; font-size: .78rem; gap: 6px; }
.product-sell svg { width: 15px; height: 15px; }
.product-sales { margin: 0; color: var(--ink-soft); font-size: .74rem; }
.booking-client { align-self: center; }
.client-next-booking { margin: 0 0 8px; padding: 10px 12px; border-radius: 12px; background: #edf2f8; color: var(--accent); font-size: .82rem; font-weight: 650; }
#bookingActionRegisterField { margin-top: 12px; }
.chip-field .check-label { min-height: 40px; }

/* Página pública del negocio: presentación, contacto, horario, servicios y
   productos, cada bloque solo si hay algo que mostrar. */
.public-business > .panel:first-of-type { margin-top: 0; }
.public-business-hero h1 { margin-bottom: 8px; }
.public-business-hero .muted { margin-bottom: 16px; line-height: 1.55; }
.public-business-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.public-business-actions[hidden] { display: none; }
.public-business-address { margin: 0; color: var(--ink-soft); font-size: .84rem; overflow-wrap: anywhere; }
.public-hours, .public-services { margin: 14px 0 0; padding: 0; list-style: none; }
.public-hour, .public-service { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-top: 1px solid #eeece5; }
.public-hour:first-child, .public-service:first-child { border-top: 0; padding-top: 4px; }
.public-hour--closed strong { color: var(--ink-soft); font-weight: 600; }
.public-service > div { display: grid; gap: 2px; min-width: 0; }
.public-service small { color: var(--ink-soft); font-size: .76rem; }
.public-service-price { flex-shrink: 0; font-weight: 750; }
.public-catalog-panel h2 { margin: 0 0 4px; font-size: 1.25rem; }
.public-product-body h3 { font-size: .95rem; margin: 0; overflow-wrap: anywhere; }

@media (min-width: 700px) {
  .product-grid, .public-catalog-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .public-catalog-grid--single { grid-template-columns: minmax(0, 1fr); }
  .more-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .more-grid--single { grid-template-columns: minmax(0, 1fr); }
  .login-shell { grid-template-columns: minmax(280px, .85fr) 1.15fr; }
  .login-art { display: flex; flex-direction: column; justify-content: space-between; padding: 60px; background: var(--ink); color: white; }
  .login-art p { margin: 0; font-size: clamp(2.4rem, 5vw, 4.8rem); font-weight: 780; line-height: .98; letter-spacing: -.065em; }
  .login-card { padding: 50px; }
  .mobile-brand { display: none; }
  .login-card h1 { margin-top: 0; font-size: 2.45rem; }
  .connection-pill, #openCustomRange, #openExpenseRange, .chart-legend { display: flex; }
  .custom-range { grid-template-columns: 1fr 1fr auto; }
  .custom-range .primary-button { grid-column: auto; }
  .metric-grid { grid-template-columns: 1.25fr 1fr 1fr; gap: 15px; }
  .sale-kinds { width: auto; }
  .metric-card:first-child { grid-column: auto; }
  .metric-card { min-height: 175px; padding: 22px; }
  .metric-icon { margin-bottom: 27px; }
  .settings-save button { width: auto; }
  .sheet-dialog { margin: auto; border-radius: 24px; }
  .bottom-sheet { min-height: 0; border-radius: 26px; inset: auto 0 24px 0; }
  .dialog-footer { padding-bottom: 16px; }
  .toast-region { right: 24px; bottom: 24px; left: auto; }
  .toast { min-width: 300px; }
}

@media (min-width: 1024px) {
  .topbar .connection-pill, .topbar #installShortcut { display: none; }
  .app-shell { display: grid; grid-template-columns: 248px minmax(0,1fr); }
  .sidebar { position: sticky; top: 0; display: flex; height: 100dvh; flex-direction: column; padding: 26px 18px 20px; border-right: 1px solid #e3e1d8; background: #fafbfd; }
  .brand { display: flex; align-items: center; gap: 11px; margin: 0 7px 36px; color: inherit; text-decoration: none; }
  .brand strong, .brand small { display: block; }
  .brand strong { font-size: .94rem; }
  .brand small { color: var(--ink-soft); font-size: .66rem; }
  .side-nav { display: grid; align-content: start; gap: 5px; min-height: 0; overflow-y: auto; }
  .side-nav-group { display: grid; gap: 5px; }
  .side-nav-label { margin: 18px 13px 7px; color: #9a988f; font-size: .66rem; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
  .nav-item { display: flex; min-height: 47px; align-items: center; gap: 13px; width: 100%; padding: 0 13px; border: 0; border-radius: 12px; background: transparent; color: #727068; cursor: pointer; font-size: .83rem; font-weight: 700; text-align: left; }
  .nav-item.active, .nav-item:hover { background: #eaf0f8; color: var(--ink); }
  .nav-item.active svg { color: #183b65; }
  .sidebar-bottom { display: grid; gap: 13px; margin-top: auto; padding-top: 14px; }
  .user-chip { display: flex; align-items: center; gap: 10px; padding: 0 9px 14px; border-bottom: 1px solid var(--line); }
  .user-chip strong, .user-chip small { display: block; }
  .user-chip strong { font-size: .8rem; }
  .user-chip small { color: var(--ink-soft); font-size: .67rem; }
  .topbar { min-height: 105px; padding: 22px clamp(28px,4vw,62px) 17px; }
  .desktop-new { display: inline-flex; }
  .content { max-width: 1440px; padding: 4px clamp(28px,4vw,62px) 52px; }
  .bottom-nav, .view-back { display: none; }
  .fab { right: clamp(28px,4vw,62px); bottom: 32px; }
  .metric-grid { gap: 18px; }
  .panel { margin-top: 18px; }
  .chart-panel { display: grid; grid-template-rows: auto 1fr; min-height: 350px; }
  .chart-wrap { min-height: 282px; }
  .recent-panel { margin-bottom: 0; }
  .cut-list { padding: 3px 22px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Platform console: reuses the panel/metric language of the barbershop app. */
.admin-shell { min-height: 100dvh; display: flex; flex-direction: column; background: var(--sand, #f6f4ef); }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 14px 18px; }
/* The brand stays visible on desktop; the console has no sidebar to carry it. */
.admin-topbar .mobile-brand { display: flex; align-items: center; gap: 10px; }
.admin-topbar .topbar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-topbar #adminWho { font-weight: 600; }
.admin-content { display: grid; gap: 18px; max-width: 1040px; width: 100%; margin: 0 auto; padding: 18px 16px 60px; }
.admin-content .section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
/* The console has no chart under its tiles, so they do not need the panel's height. */
.admin-content .metric-card { min-height: 0; gap: 4px; }
.admin-content .metric-card strong { font-size: 1.9rem; line-height: 1.1; }
.admin-content .metric-card small { opacity: .68; }
/* No bottom navigation here: the toast sits at the bottom of the viewport. */
.admin-shell ~ .toast-region, body:has(.admin-shell) .toast-region { bottom: calc(18px + env(safe-area-inset-bottom)); }
.admin-list { display: grid; gap: 14px; }
/* `.panel` carries no padding of its own in this design; these cards supply theirs. */
.admin-card { display: grid; gap: 14px; margin-top: 0; padding: 18px; }
.admin-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.admin-card-head h2 { margin: 0 0 2px; font-size: 1.15rem; }
.admin-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 12px 16px; margin: 0; }
.admin-fact dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; opacity: .62; }
.admin-fact dd { margin: 3px 0 0; font-weight: 600; font-size: 1.02rem; }
.admin-user { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 11px 13px; border-radius: 13px; background: rgba(20, 45, 80, .05); }
.admin-user small { display: block; font-size: .78rem; }
.admin-user-actions { display: flex; gap: 8px; flex-wrap: wrap; }
/* The rule reaches the card edges; the actions stay aligned with the content. */
.admin-card-actions { display: flex; gap: 16px; flex-wrap: wrap; margin: 0 -18px -4px; padding: 12px 18px 0; border-top: 1px solid rgba(20, 45, 80, .1); }
.admin-password-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 8px 0 4px; }
.admin-audit { padding: 16px 18px; }
.admin-audit summary { cursor: pointer; font-weight: 600; }
.admin-audit-list { display: grid; gap: 9px; margin: 10px 0 0; padding: 0; list-style: none; }
.admin-audit-list li { display: grid; gap: 1px; padding: 9px 11px; border-radius: 11px; background: rgba(20, 45, 80, .05); font-size: .87rem; }
.admin-audit-list strong { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; }
#tenantSlugPreview { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
@media (max-width: 560px) {
  .admin-card-head .booking-status { align-self: flex-start; }
  .admin-user, .admin-card-head { flex-direction: column; align-items: stretch; }
  .admin-user-actions .outline-button, .admin-user-actions .primary-button { flex: 1; }
}

/* Destructive actions read as destructive before they are clicked. */
.text-button--danger { color: #a93636; }
.danger-notice { margin: 0 0 6px; padding: 10px 12px; border-radius: 11px; border: 1px solid rgba(169, 54, 54, .28); background: rgba(169, 54, 54, .07); color: #8f2c2c; font-weight: 600; }
#deleteTenantDialog code, #deleteTenantSlug { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
#deleteTenantConfirm { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
