/* =============================================================
   mirrorBill — styles

   Palette from the brand sheet:
     Ink Violet  #251826    Mirror Rose #E0567A
     Brass       #D9A441    Paper       #FAF6F3

   The older variable names are kept, pointing at their
   replacements, so every screen written against --plum and
   --gold follows along without being rewritten.
   ============================================================= */
:root {
  --ink: #251826;
  --ink-2: #4a3b4d;
  --muted: #8a7d8c;
  --line: #e7dfe4;
  --bg: #faf6f3;
  --card: #ffffff;
  --gold: #d9a441;
  --plum: #251826;
  --plum-2: #4a2f4d;
  --rose: #e0567a;
  --paper: #faf6f3;
  --ok: #1f9d63;
  --danger: #d33b4a;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(37, 24, 38, .05), 0 8px 24px rgba(37, 24, 38, .07);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; height: 100%;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; color: inherit; }

/* ---------------- layout ---------------- */
.app { display: flex; height: 100vh; overflow: hidden; }

.sidebar {
  width: 232px; flex: 0 0 232px;
  background: linear-gradient(170deg, #2e1f30 0%, var(--plum) 100%);
  color: #efeaf5;
  display: flex; flex-direction: column;
  padding: 18px 14px;
}

.brand { display: flex; gap: 12px; align-items: center; padding: 4px 6px 20px; }
.brand-slot { display: flex; align-items: center; color: var(--paper, #faf6f3); }
.brand-name {
  margin: 0; font-size: 16px; letter-spacing: .2px; font-weight: 700;
  line-height: 1.25; word-break: break-word;
}
.brand-tag { font-size: 11px; opacity: .62; letter-spacing: 1.4px; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 12px; border: 0; border-radius: 10px;
  background: transparent; color: #d9d0e6; cursor: pointer;
  font-size: 14.5px; text-align: left; transition: background .12s, color .12s;
}
.nav-item:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nav-item.active { background: rgba(255, 255, 255, .14); color: #fff; font-weight: 600; }
.nav-icon { font-size: 16px; width: 20px; text-align: center; }

.today-chip {
  margin-top: auto; padding: 13px 14px; border-radius: 12px;
  background: rgba(255, 255, 255, .1); display: flex; flex-direction: column; gap: 1px;
}
.today-chip .tc-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; opacity: .7; }
.today-chip strong { font-size: 21px; color: #fff; }
.today-chip .tc-sub { font-size: 11.5px; opacity: .65; }

.side-foot { padding-top: 12px; }
.link-btn {
  background: none; border: 0; color: #bcaed0; font-size: 12px;
  cursor: pointer; text-decoration: underline; padding: 2px;
}
.link-btn:hover { color: #fff; }

.main { flex: 1; overflow: auto; }
#screen { padding: 22px 26px 40px; min-height: 100%; }

/* ---------------- generic bits ---------------- */
.screen-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 16px; flex-wrap: wrap; margin-bottom: 16px;
}
.screen-head h1 { margin: 0 0 3px; font-size: 25px; letter-spacing: -.3px; }
.sub { margin: 0; color: var(--muted); font-size: 13.5px; }
.head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px 18px; margin-bottom: 16px;
}
.card-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px; margin-bottom: 12px;
}
.card-head h3 { margin: 0; font-size: 15.5px; }
.card-head p { margin: 3px 0 0; }

.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11px; word-break: break-all; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.strong { font-weight: 700; }
.empty { color: var(--muted); font-size: 13.5px; padding: 14px 2px; margin: 0; }
.empty.big { padding: 40px; text-align: center; font-size: 15px; }
.spacer { flex: 1; }

.badge {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 20px;
  font-size: 10.5px; background: #f2ecfa; color: var(--plum-2);
  text-transform: uppercase; letter-spacing: .6px; font-weight: 700;
}
.badge.grey { background: #eee; color: #888; }
.trophy { color: var(--gold); font-size: 17px; }

/* ---------------- buttons ---------------- */
.btn {
  border: 1px solid transparent; border-radius: 10px; padding: 9px 15px;
  background: #ece7f4; color: var(--ink-2); cursor: pointer;
  font-size: 14px; font-weight: 600; transition: filter .12s, background .12s;
  white-space: nowrap;
}
.btn:hover { filter: brightness(.96); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(140deg, var(--plum-2), var(--plum)); color: #fff; }
.btn.ghost { background: #fff; border-color: var(--line); }
.btn.ghost:hover { background: #faf8fd; }
.btn.danger { background: var(--danger); color: #fff; }
.btn.danger-ghost { background: #fff; border-color: #f0d2d5; color: var(--danger); }
.btn.big { padding: 13px 18px; font-size: 15.5px; }
.btn.small { padding: 6px 11px; font-size: 13px; }
.btn.tiny { padding: 4px 9px; font-size: 12px; border-radius: 8px; margin-left: 4px; }
.btn-row { display: flex; gap: 9px; flex-wrap: wrap; }

.icon-btn {
  border: 0; background: transparent; cursor: pointer; font-size: 20px;
  line-height: 1; color: var(--muted); padding: 2px 6px; border-radius: 7px;
}
.icon-btn:hover { background: #f1edf7; color: var(--ink); }
.icon-btn.danger:hover { background: #fdecee; color: var(--danger); }

/* segmented tabs / chips */
.section-tabs {
  display: flex; gap: 7px; flex-wrap: wrap; align-items: center; margin-bottom: 14px;
}
.seg {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 8px 16px; cursor: pointer; font-size: 13.5px; font-weight: 600;
  color: var(--ink-2); transition: all .12s; display: inline-flex; align-items: center; gap: 7px;
}
.seg:hover { border-color: #cfc4e0; }
.seg.active {
  background: var(--plum); border-color: var(--plum); color: #fff;
}
.seg.small { padding: 6px 13px; font-size: 12.5px; }
.seg-count {
  background: rgba(0, 0, 0, .08); border-radius: 20px; padding: 0 7px;
  font-size: 11px; font-weight: 700;
}
.seg.active .seg-count { background: rgba(255, 255, 255, .22); }

.cat-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.chip {
  border: 1px solid var(--line); background: #fff; border-radius: 9px;
  padding: 6px 12px; cursor: pointer; font-size: 13px; color: var(--ink-2);
}
.chip:hover { border-color: #cfc4e0; }
.chip.active { background: #f3ecfb; border-color: var(--plum-2); color: var(--plum); font-weight: 700; }
.chip.tiny { padding: 3px 9px; font-size: 11.5px; }

/* ---------------- inputs ---------------- */
.input {
  border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px;
  background: #fff; font-size: 14px; width: 100%; outline: none;
  transition: border-color .12s, box-shadow .12s;
}
.input:focus { border-color: var(--rose); box-shadow: 0 0 0 3px rgba(224, 86, 122, .16); }
.input.tiny { padding: 5px 7px; font-size: 12.5px; border-radius: 7px; }
.input.search { width: 230px; }
.input.date { width: 150px; }
.hidden-file { display: none; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field-full { grid-column: 1 / -1; }
.field-label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.field-hint { font-size: 11.5px; color: var(--muted); line-height: 1.45; }
.field-check { flex-direction: row; align-items: center; gap: 9px; flex-wrap: wrap; }
.field-check input { width: 17px; height: 17px; accent-color: var(--plum-2); }
.field-check .field-hint { flex-basis: 100%; }

/* ---------------- tables ---------------- */
.data-table, .svc-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table th, .svc-table th {
  text-align: left; font-size: 11.5px; text-transform: uppercase;
  letter-spacing: .7px; color: var(--muted); font-weight: 700;
  padding: 7px 9px; border-bottom: 1px solid var(--line);
}
.data-table td, .svc-table td {
  padding: 9px; border-bottom: 1px solid #f2eff7; vertical-align: middle;
}
.data-table tbody tr:hover, .svc-table tbody tr:hover { background: #faf8fd; }
.data-table tr.voided td { opacity: .45; text-decoration: line-through; }
.data-table tr.inactive td { opacity: .55; }
.time { display: block; font-size: 11.5px; color: var(--muted); }
.disc-txt { color: var(--ok); }
.price-input { width: 96px; text-align: right; display: inline-block; }
.svc-title { font-weight: 600; }

.mini-bar {
  background: #efeaf6; border-radius: 20px; height: 8px; min-width: 60px; overflow: hidden;
}
.mini-fill {
  height: 100%; border-radius: 20px;
  background: linear-gradient(90deg, var(--plum-2), var(--rose));
}

/* ---------------- billing screen ---------------- */
.billing-screen {
  display: grid; grid-template-columns: minmax(0, 1fr) 400px;
  gap: 18px; align-items: start; padding: 22px 26px 30px;
}
.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.services-panel { min-height: calc(100vh - 60px); }

.service-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 9px;
}
.svc-btn {
  border: 1px solid var(--line); background: #fff; border-radius: 11px;
  padding: 11px 12px; cursor: pointer; text-align: left;
  display: flex; flex-direction: column; gap: 5px; min-height: 66px;
  justify-content: space-between; transition: all .12s;
}
.svc-btn:hover {
  border-color: var(--plum-2); background: #faf7fe;
  transform: translateY(-1px); box-shadow: 0 4px 12px rgba(75, 46, 99, .1);
}
.svc-btn:active { transform: translateY(0); }
.svc-name { font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.svc-price { font-size: 14px; font-weight: 700; color: var(--plum); }
.svc-price em { font-style: normal; font-size: 11px; font-weight: 500; color: var(--muted); }
.svc-btn.open { border-style: dashed; }

/* cart */
.cart-panel { position: sticky; top: 22px; display: flex; flex-direction: column; gap: 12px; }
.cart-head { display: flex; justify-content: space-between; align-items: center; }
.cart-head h2 { margin: 0; font-size: 17px; letter-spacing: .3px; }

.cust-box { display: flex; flex-direction: column; gap: 8px; }
.cust-row { display: flex; gap: 8px; }
.cust-row > * { flex: 1; min-width: 0; }
.gender-seg { display: flex; gap: 5px; }
.gender-seg .seg { flex: 1; justify-content: center; padding: 7px 4px; }

.cart-lines {
  max-height: 38vh; overflow-y: auto; display: flex; flex-direction: column; gap: 8px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 10px 2px; margin: 0 -2px;
}
.cart-line { background: #faf8fd; border-radius: 10px; padding: 9px 10px; }
.cl-main { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.cl-name { font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.cl-row { display: flex; gap: 7px; margin-top: 7px; flex-wrap: wrap; align-items: flex-end; }
.mini { display: flex; flex-direction: column; gap: 2px; width: 66px; }
.mini.grow { flex: 1; min-width: 96px; width: auto; }
.mini > span { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.disc-mini { display: flex; gap: 4px; }
.disc-mini select { width: 52px; flex: 0 0 52px; }
.cl-amt { text-align: right; margin-top: 5px; font-size: 14px; }
.cl-amt .was { color: var(--muted); font-size: 12px; margin-right: 6px; }
.cl-amt .calc { color: var(--muted); font-size: 11.5px; margin-right: 7px; }
.extra-field input { border-color: var(--gold); background: #fffdf5; }

.disc-box { display: flex; flex-direction: column; gap: 7px; }
.disc-label { font-size: 12px; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .6px; }
.disc-controls { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.disc-controls select { width: 130px; flex: 0 0 130px; }
.disc-controls input { width: 90px; flex: 0 0 90px; }
.quick-off { display: flex; gap: 4px; flex-wrap: wrap; }

.totals { display: flex; flex-direction: column; gap: 3px; }
.total-row { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--ink-2); }
.total-row.disc { color: var(--ok); }
.total-row.grand {
  margin-top: 7px; padding-top: 10px; border-top: 2px solid var(--ink);
  font-size: 20px; font-weight: 800; color: var(--ink);
}
.pay-wrap { display: flex; flex-direction: column; gap: 9px; }
.pay-modes { display: flex; gap: 5px; flex-wrap: wrap; }
.pay-modes .seg { flex: 1; justify-content: center; padding: 8px 4px; min-width: 58px; }
.pay-modes .split-seg.active { background: var(--gold); border-color: var(--gold); color: #2c1a3d; }

.split-box { background: #faf8fd; border: 1px solid var(--line); border-radius: 11px; padding: 10px; }
.split-left {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 8px; font-size: 12.5px; font-weight: 600;
}
.split-left.ok { color: var(--ok); }
.split-left.bad { color: #b8442b; }

.cash-box {
  background: #fffdf5; border: 1px solid #f0e3bd; border-radius: 11px; padding: 10px;
}
.cash-row { display: flex; gap: 11px; align-items: flex-end; }
.change-out { text-align: right; display: flex; flex-direction: column; }
.change-out .lbl {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .7px;
  color: var(--muted); font-weight: 700;
}
.change-amt { font-size: 21px; color: var(--plum); line-height: 1.15; }
.quick-cash { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 8px; }
.cash-warn { margin: 7px 0 0; font-size: 12px; color: #b8442b; font-weight: 600; }
.cart-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.cart-actions .btn.primary { grid-column: 1 / -1; }

/* ---------------- catalog ---------------- */
.cat-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; margin-bottom: 14px; }
.cat-card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.cat-card-head h3 { margin: 0; font-size: 15.5px; }
.cat-card-head .count { font-size: 11.5px; color: var(--muted); font-weight: 500; margin-left: 8px; }
.row-actions { display: flex; align-items: center; }

/* ---------------- reports ---------------- */
.kpi-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  gap: 12px; margin-bottom: 16px;
}
.kpi {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 16px; display: flex; flex-direction: column; gap: 3px;
}
.kpi.accent { background: linear-gradient(140deg, var(--plum), #2c1a3d); color: #fff; }
.kpi-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); font-weight: 700; }
.kpi.accent .kpi-label, .kpi.accent .kpi-sub { color: rgba(255, 255, 255, .72); }
.kpi-value { font-size: 24px; letter-spacing: -.5px; }
.kpi-sub { font-size: 11.5px; color: var(--muted); }

.chart { display: flex; gap: 4px; align-items: flex-end; height: 170px; padding-top: 8px; }
/* max-width keeps a single day from stretching across the whole card */
.bar-col { flex: 1; min-width: 8px; max-width: 64px; display: flex; flex-direction: column; align-items: center; gap: 5px; height: 100%; }
.bar-track { flex: 1; width: 100%; display: flex; align-items: flex-end; }
.bar {
  width: 100%; border-radius: 5px 5px 0 0;
  background: linear-gradient(180deg, var(--plum-2), var(--plum));
  transition: height .2s;
}
.bar.zero { background: #eee7f2; }
.bar-label { font-size: 10px; color: var(--muted); }

.split-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pill-list { display: flex; flex-direction: column; gap: 10px; }
.pill-row { display: grid; grid-template-columns: 90px 1fr auto; gap: 10px; align-items: center; font-size: 13.5px; }

/* ---------------- bookings & advances ---------------- */
.booking-card { padding: 15px 17px; }
.booking-card.done { opacity: .72; }
.bk-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.bk-who h3 { margin: 0 0 3px; font-size: 16px; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.bk-no { font-size: 11px; font-weight: 700; letter-spacing: .8px; color: var(--plum-2);
  background: #f2ecfa; border-radius: 20px; padding: 2px 9px; }
.bk-who p { margin: 0; }
.bk-date { margin-left: 9px; color: var(--plum); font-weight: 600; }
.bk-money { display: flex; gap: 20px; }
.bk-fig { display: flex; flex-direction: column; align-items: flex-end; }
.bk-fig .lbl { font-size: 10.5px; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); font-weight: 700; }
.bk-fig strong { font-size: 16px; }
.bk-fig.ok strong { color: var(--ok); }
.bk-fig.due strong { color: var(--danger); }
.bk-bar { background: #efeaf6; border-radius: 20px; height: 7px; overflow: hidden; margin: 11px 0 9px; }
.bk-fill { height: 100%; border-radius: 20px; background: linear-gradient(90deg, var(--ok), #59d99a); transition: width .25s; }
.bk-status { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.bk-actions { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.pay-list { margin-top: 11px; border-top: 1px dashed var(--line); padding-top: 9px;
  display: flex; flex-direction: column; gap: 6px; }
.pay-line { display: flex; align-items: center; gap: 10px; font-size: 13px; flex-wrap: wrap; }
.pay-no { color: var(--muted); font-size: 11.5px; width: 24px; }
.pay-date { min-width: 92px; }
.pay-mode { background: #f2ecfa; border-radius: 20px; padding: 1px 9px; font-size: 11.5px; color: var(--plum); }
.pay-note { flex: 1; min-width: 60px; font-size: 12px; }
.pay-amt { color: var(--ok); }

.date-toggle { display: flex; flex-direction: column; gap: 6px; }
.date-seg { display: flex; gap: 5px; }
.date-seg .seg { flex: 1; justify-content: center; }
.date-toggle.back .date-seg .seg.active { background: #b8442b; border-color: #b8442b; }
.date-note {
  font-size: 11.5px; color: #b8442b; font-weight: 600; line-height: 1.4;
  background: #fdf1ee; border: 1px solid #f3d6cd; border-radius: 8px; padding: 6px 9px;
}

.bk-banner {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  background: linear-gradient(135deg, #f3ecfb, #fdf6ec);
  border: 1px solid #e3d5f5; border-radius: 11px; padding: 9px 12px;
}
.bk-banner.suggest { background: #fffaf0; border-color: #f0e0bd; }
.bk-banner strong { display: block; font-size: 13px; }
.bk-banner-sub { font-size: 11.5px; color: var(--muted); }
.note-line { font-size: 12px; color: var(--muted); line-height: 1.55; margin: -6px 0 16px; }

/* ---------------- settings ---------------- */
.settings-screen { max-width: 900px; }
.logo-box { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.logo-preview {
  width: 130px; height: 100px; border: 1px dashed var(--line); border-radius: 12px;
  display: grid; place-items: center; background: #fbfafd; overflow: hidden;
}
.logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.qr-test { display: flex; gap: 18px; align-items: flex-start; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.qr-test-img { border: 1px solid var(--line); border-radius: 10px; padding: 6px; background: #fff; line-height: 0; }
.qr-test-img svg { width: 130px; height: 130px; }

/* ---------------- modal ---------------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(22, 18, 31, .45);
  display: grid; place-items: center; z-index: 60; padding: 20px;
  animation: fade .12s ease-out;
}
@keyframes fade { from { opacity: 0 } }
.modal {
  background: #fff; border-radius: 16px; width: min(520px, 100%);
  max-height: 88vh; display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
}
.modal-wide { width: min(860px, 100%); }
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 15px 18px; border-bottom: 1px solid var(--line);
}
.modal-head h3 { margin: 0; font-size: 16.5px; }
.modal-body { padding: 18px; overflow-y: auto; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 9px;
  padding: 13px 18px; border-top: 1px solid var(--line);
}
.modal-msg { margin: 0 0 14px; color: var(--ink-2); font-size: 14px; line-height: 1.55; }

.sit-list { display: flex; flex-direction: column; gap: 11px; }
.sit-card { border: 1px solid var(--line); border-radius: 11px; padding: 11px; display: flex; flex-direction: column; gap: 5px; }
.sit-head { display: flex; gap: 8px; align-items: center; }

.preview-wrap { display: flex; flex-direction: column; gap: 11px; }
.paper-switch { display: flex; gap: 6px; flex-wrap: wrap; }
.bill-frame {
  width: 100%; height: 58vh; border: 1px solid var(--line);
  border-radius: 11px; background: #fff;
}

/* ---------------- the bill as a picture ----------------
   For a Bluetooth pocket printer. iPhones cannot reach one from a web
   page at all, so the bill is handed to the printer's own app as an
   image through the share sheet — the same route works on Android. */
/* printer state, sitting on the billing screen where the counter is */
.printer-chip {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  margin-left: auto; padding: 5px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff;
  font-size: 11.5px; font-weight: 600; color: var(--muted);
  max-width: 46%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.printer-chip:hover { border-color: var(--brand, #4b2e63); }
.printer-dot {
  width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: #c9c2d4;
}
.printer-chip.on { color: #1c7a4a; border-color: #b6e2c9; background: #f2fbf6; }
.printer-chip.on .printer-dot { background: #23a05f; }

.bt-panel { display: flex; flex-direction: column; gap: 10px; }
.bt-panel .field-check { margin: 0; }
.bt-field { display: flex; flex-direction: column; gap: 6px; }
.bt-field .field-label { font-size: 12px; font-weight: 600; }

.img-wrap { display: flex; flex-direction: column; gap: 11px; }
.img-bars { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.img-bar { display: flex; align-items: center; gap: 8px; }
.img-bar-label {
  font-size: 11.5px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: .04em;
}
/* the picture is 1-bit black and white — let it stay that way on screen
   instead of being blurred by the browser's smoothing */
.bill-img { image-rendering: -webkit-optimize-contrast; image-rendering: crisp-edges; }
.img-stage {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  max-height: 58vh; overflow-y: auto; padding: 4px 0;
}
.bill-img {
  width: 100%; max-width: 300px; height: auto; display: block;
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .28);
}
.img-hint {
  margin: 0; font-size: 12px; line-height: 1.45;
  color: var(--muted); text-align: center; max-width: 340px;
}

/* ---------------- cloud sync ---------------- */
.cloud-chip {
  margin-top: 9px; padding: 9px 12px; border-radius: 10px; cursor: pointer;
  background: rgba(255, 255, 255, .08); display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; color: #d9d0e6;
}
/* A button that opens a chooser but sits in a row of inputs, so it has to
   look like one rather than like something that submits the bill. */
.picker-btn {
  text-align: left; cursor: pointer; background: #fff;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.picker-btn:hover { border-color: #8b6fb8; }
.picker-btn.set { border-color: #5b3a8e; color: #5b3a8e; font-weight: 600; }

.pick-list { display: flex; flex-direction: column; gap: 2px; }
.pick-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 6px;
  border-radius: 8px; cursor: pointer;
}
.pick-row:hover { background: #f4f0f9; }
.pick-row input { width: 17px; height: 17px; }

.cloud-chip:hover { background: rgba(255, 255, 255, .14); }

/* The subscription, standing in the menu rather than only turning up as a
   banner once something is wrong. */
.sub-chip {
  margin-top: 9px; padding: 10px 12px; border-radius: 10px; cursor: pointer;
  background: rgba(255, 255, 255, .08); display: flex; flex-direction: column; gap: 3px;
  font-size: 11.5px; color: #d9d0e6;
}
.sub-chip:hover { background: rgba(255, 255, 255, .14); }
.sub-chip .sc-label {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 1.1px; opacity: .65;
}
.sub-chip .sc-main { font-size: 13px; color: #fff; line-height: 1.3; }
.sub-chip.warn { background: rgba(240, 180, 60, .18); }
.sub-chip.warn .sc-main { color: #ffd98a; }
.sub-chip.bad { background: rgba(230, 90, 90, .2); }
.sub-chip.bad .sc-main { color: #ffb3b3; }
.sub-chip .btn { margin-top: 5px; }
.cloud-text { line-height: 1.3; }
.dot {
  width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; background: #999;
}
.dot.green { background: #35c67a; box-shadow: 0 0 0 3px rgba(53, 198, 122, .18); }
.dot.amber { background: #e8a33d; box-shadow: 0 0 0 3px rgba(232, 163, 61, .18); }
.dot.red { background: #e2544f; box-shadow: 0 0 0 3px rgba(226, 84, 79, .18); }
.dot.grey { background: #9d93ae; }
.cloud-status { display: flex; align-items: center; gap: 9px; margin-bottom: 5px; font-size: 14.5px; }
.mono-input { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }

/* ---------------- sign in ---------------- */
.login-overlay {
  position: fixed; inset: 0; z-index: 90;
  background: linear-gradient(170deg, #2e1f30 0%, var(--plum) 100%);
  display: grid; place-items: center; padding: 22px; overflow-y: auto;
}
.login-card {
  background: #fff; border-radius: 18px; padding: 30px 28px;
  width: min(390px, 100%); box-shadow: 0 24px 70px rgba(0, 0, 0, .35);
  display: flex; flex-direction: column; gap: 13px;
}
.login-logo { width: 82px; height: 82px; object-fit: contain; align-self: center; }
.login-title {
  margin: 0; text-align: center; font-size: 25px; letter-spacing: 4px; font-weight: 800;
}
.login-sub { margin: -6px 0 6px; text-align: center; color: var(--muted); font-size: 13.5px; }
.login-msg { margin: 0; font-size: 13px; min-height: 1px; }
.login-msg.bad { color: var(--danger); }
.login-foot {
  margin: 4px 0 0; text-align: center; font-size: 11.5px; color: var(--muted); line-height: 1.5;
}
.locked-mark { text-align: center; font-size: 34px; line-height: 1; margin: 4px 0; }
.locked-head {
  margin: 0; text-align: center; font-size: 16px; font-weight: 700; color: var(--danger);
}
.locked-body {
  margin: 0; text-align: center; font-size: 13px; color: var(--ink-2); line-height: 1.55;
}
.locked-code {
  display: block; text-align: center; font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12px; background: #f6f4fa; border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px; word-break: break-all; color: var(--plum);
}
.locked-body.muted { color: var(--muted); font-size: 12px; }

/* ---------------- the software's own mark ---------------- */
/* The receipt and its reflection are painted in currentColor and the ruled
   lines are punched through, so setting a colour on the block around it is
   the whole of theming it: ink on paper here, paper on ink in the sidebar. */
.brand-glyph { display: inline-flex; align-items: center; }
.brand-word { letter-spacing: -.3px; font-weight: 400; }
.brand-word b { font-weight: 800; }

.login-brand {
  display: flex; align-items: center; justify-content: center; gap: 11px;
  color: var(--ink);
}
.login-salon {
  margin: -2px 0 10px; text-align: center; font-size: 14px; color: var(--ink-2);
}
.login-salon.muted {
  color: var(--muted); font-size: 10.5px; letter-spacing: 2.6px; text-transform: uppercase;
}

/* ---------------- the software's own mark ---------------- */
/* The body and reflection are painted in currentColor, so setting a colour
   on the surrounding block is what makes the mark work on paper or on ink. */
.brand-mark { display: inline-flex; align-items: center; }
.brand-word { letter-spacing: -.2px; font-weight: 400; }
.brand-word b { font-weight: 800; }

.login-brand {
  display: flex; align-items: center; justify-content: center; gap: 11px;
  color: var(--ink);
}
.login-salon {
  margin: -4px 0 8px; text-align: center; font-size: 13.5px; color: var(--ink-2);
}
.login-salon.muted {
  color: var(--muted); font-size: 11px; letter-spacing: 2.4px; text-transform: uppercase;
}
/* the hairline between "sign in" and "start a salon" */
.login-sep { height: 1px; background: var(--line); margin: 6px 0 2px; }

/* ---------------- signing in with Google ---------------- */
.btn.google {
  background: #fff; border-color: #dadce0; color: #3c4043;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 16px; font-size: 15px; font-weight: 600;
}
.btn.google:hover { background: #f8f9fa; }
.google-g { display: flex; align-items: center; }

/* "or with a password", with a rule running through it */
.login-or {
  display: flex; align-items: center; gap: 10px;
  color: var(--muted); font-size: 11.5px; margin: 2px 0;
}
.login-or::before, .login-or::after {
  content: ''; flex: 1; height: 1px; background: var(--line);
}

/* ---------------- subscription banner ---------------- */
/* Sticky, because it lives at the top of the scrolling pane and a notice
   that the till is about to stop taking new bills is not something to lose
   the moment somebody scrolls down a price list. */
.sub-banner {
  position: sticky; top: 0; z-index: 5;
  padding: 10px 18px; font-size: 13px; line-height: 1.5;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.sub-banner .btn { flex-shrink: 0; }
.sub-banner.warn { background: #fff6e0; color: #7a5300; }
.sub-banner.bad { background: #fdecec; color: var(--danger); }

/* ---------------- toast ---------------- */
.toast-box {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 8px; z-index: 80; align-items: center;
}
.toast {
  background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 999px;
  font-size: 13.5px; box-shadow: 0 8px 26px rgba(0, 0, 0, .25);
  animation: rise .18s ease-out; max-width: 90vw;
}
.toast.warn { background: #b8442b; }
.toast.out { opacity: 0; transition: opacity .4s; }
@keyframes rise { from { transform: translateY(12px); opacity: 0 } }

/* ---------------- the phone menu ----------------
   Hidden entirely above 900px — .mobile-topbar and .nav-backdrop only ever
   take a size once the media query below switches them on, so none of this
   costs anything on a desktop screen. */
.mobile-topbar { display: none; }
.nav-backdrop {
  display: none;
  position: fixed; inset: 0; z-index: 49;
  background: rgba(15, 9, 16, .5);
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
}
.nav-backdrop.open { opacity: 1; pointer-events: auto; }

/* ---------------- responsive ---------------- */
@media (max-width: 1180px) {
  .billing-screen { grid-template-columns: minmax(0, 1fr) 350px; }
  .split-row { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .app { display: block; height: auto; }

  .mobile-topbar {
    display: flex; align-items: center; gap: 12px;
    position: fixed; top: 0; left: 0; right: 0; z-index: 40;
    height: 54px; padding: 0 14px;
    background: linear-gradient(170deg, #2e1f30 0%, var(--plum) 100%);
    color: #efeaf5;
  }
  .hamburger-btn {
    display: flex; flex-direction: column; justify-content: center; gap: 4px;
    width: 34px; height: 34px; padding: 0; margin: -8px;
    border: 0; background: none; cursor: pointer; flex: 0 0 auto;
  }
  .hamburger-bar { width: 20px; height: 2px; background: #efeaf5; border-radius: 2px; }
  .topbar-brand { display: flex; align-items: center; gap: 8px; color: #efeaf5; min-width: 0; }
  .topbar-word { font-size: 15px; letter-spacing: -.2px; }
  .topbar-dot { margin-left: auto; }
  .topbar-dot.hidden { display: none; }

  .nav-backdrop { display: block; }

  /* the drawer itself: the same sidebar element the desktop uses, standing
     off to the side until opened rather than laid out as a second element */
  .sidebar {
    position: fixed; top: 0; left: 0; z-index: 50;
    width: min(280px, 82vw); height: 100vh; height: 100dvh;
    flex: none; flex-direction: column; align-items: stretch;
    padding: 16px 14px;
    transform: translateX(-100%);
    transition: transform .22s ease;
    box-shadow: 0 0 40px rgba(0, 0, 0, .35);
    overflow-y: auto;
  }
  .sidebar.open { transform: translateX(0); }

  .nav { flex-direction: column; gap: 2px; }
  .nav-label { display: inline; }
  .today-chip { margin-top: auto; }
  .side-foot { display: block; }

  .main { padding-top: 54px; }

  /* two service buttons per row instead of one long column */
  .service-grid { grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); gap: 7px; }
  .svc-btn { min-height: 60px; padding: 9px 10px; }
  .svc-name { font-size: 12.5px; }
  .billing-screen { grid-template-columns: 1fr; padding: 14px; }
  .cart-panel { position: static; }
  .services-panel { min-height: 0; }
  .form-grid { grid-template-columns: 1fr; }
  #screen { padding: 14px; }
  .input.search { width: 100%; }
  .bill-frame { height: 52vh; }
  .img-stage { max-height: 50vh; }
  .modal-body { padding: 13px; }
}

/* the drawer is open: stop the page behind it scrolling too */
body.nav-locked { overflow: hidden; }

/* ---- the sittings a bridal booking is made of ---- */
.bk-sittings {
  margin: 12px 0 4px; padding: 10px 12px; border-radius: 10px;
  background: #f7f4fb; border: 1px solid #e6dff0;
}
.bk-sit-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 10px; flex-wrap: wrap; margin-bottom: 6px;
}
.bk-sit {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px; padding: 8px 0; border-top: 1px solid #e9e2f2; flex-wrap: wrap;
}
.bk-sit.done .bk-sit-name { text-decoration: line-through; opacity: .6; }
.bk-sit-main { flex: 1 1 220px; min-width: 0; }
.bk-sit-main p { margin: 3px 0 0; }
.bk-sit-tick { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.bk-sit-tick input { width: 16px; height: 16px; flex-shrink: 0; }
.bk-sit-name { font-weight: 600; }
.bk-sit-side {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex-shrink: 0;
}
.bk-sit-side .input.tiny { width: auto; }
.extra-line { color: #7a5ba8; }

/* ---- which branch is open, for an owner who runs more than one ---- */
.branch-switch {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 12px; padding: 8px 10px; border-radius: 10px;
  background: rgba(255, 255, 255, .08);
}
.branch-label {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 1.1px;
  opacity: .65; color: #d9d0e6; flex-shrink: 0;
}
.branch-select {
  flex: 1; min-width: 0; border: 0; border-radius: 7px; padding: 5px 7px;
  background: rgba(255, 255, 255, .12); color: #fff; font-size: 13px; cursor: pointer;
}
.branch-select option { color: #251826; }

/* ---- the branches an owner runs ---- */
.branch-rows { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.branch-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; padding: 9px 10px; border-radius: 9px; border: 1px solid var(--line);
}
.branch-row.active { border-color: var(--plum-2); background: #f7f4fb; }

/* ---- building a package ---- */
.pkg-card .pkg-sit-list { display: flex; flex-direction: column; gap: 2px; }
.pkg-sit-line {
  display: grid; grid-template-columns: minmax(110px, auto) 1fr auto;
  gap: 12px; align-items: baseline;
  padding: 7px 0; border-top: 1px solid var(--line);
}
.pkg-sit-amt { font-weight: 700; white-space: nowrap; }

.pkg-build { display: flex; flex-direction: column; gap: 12px; }
.pkg-sit {
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px;
  display: flex; flex-direction: column; gap: 9px;
}
.pkg-sit-head { display: flex; gap: 8px; align-items: center; }
.pkg-sit-head .input { flex: 1; }
.pkg-sit-head .input.tiny { flex: 0 0 92px; }
.pkg-items { display: flex; flex-wrap: wrap; gap: 6px; }
.pkg-item {
  display: inline-flex; align-items: center; gap: 3px;
  background: #f3ecfb; border-radius: 8px; padding: 3px 4px 3px 10px;
  font-size: 12.5px; color: var(--plum);
}
.pkg-total { padding-top: 4px; }
.pkg-off { color: var(--danger); font-weight: 600; }

/* ---- what is coming up: every booked-in sitting, soonest first ---- */
.diary-card .diary-row {
  display: grid; grid-template-columns: minmax(120px, auto) 1fr auto;
  gap: 12px; align-items: center;
  padding: 8px 0; border-top: 1px solid var(--line);
}
.diary-row.late { background: #fdf3f4; }
.diary-when, .diary-who { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.diary-who strong, .diary-when strong { line-height: 1.25; }

/* ---- booking the sittings in, all of them at once ---- */
.sched-list { display: flex; flex-direction: column; gap: 2px; margin-top: 12px; }
.sched-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 14px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line);
}
.sched-what { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1 1 180px; }
.sched-when { display: flex; gap: 8px; flex-shrink: 0; }
.sched-when .input.tiny { width: auto; }

/* ---- a member's prepaid wallet, on the bill ---- */
.wallet-row {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 9px 10px; margin: 6px 0; border-radius: 9px;
  background: #f3ecfb; border: 1px solid #e2d6f0;
}
.wallet-row input { width: 16px; height: 16px; flex-shrink: 0; }
.wallet-row strong { font-size: 13.5px; }

/* ---- the appointment book ---- */
.appt-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.appt {
  display: flex; gap: 14px; align-items: flex-start;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px;
}
.appt-time {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  flex: 0 0 74px; border-right: 1px solid var(--line); padding-right: 12px;
}
.appt-time strong { font-size: 16px; letter-spacing: -.3px; }
.appt-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.appt-name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.appt-do { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; flex-shrink: 0; }
.appt-do .btn { text-decoration: none; }

/* what happened to it, at a glance, without reading a word */
.appt-arrived { border-left: 3px solid var(--plum-2); }
.appt-done { opacity: .62; }
.appt-cancelled, .appt-noshow { opacity: .48; }
.appt-cancelled .appt-time strong, .appt-noshow .appt-time strong {
  text-decoration: line-through;
}

.appt-remind { margin-top: 14px; }
.appt-remind-row { display: flex; gap: 7px; flex-wrap: wrap; padding: 4px 2px 2px; }
.appt-remind-row a { text-decoration: none; }
.appt-picker { display: flex; flex-direction: column; gap: 7px; }
.appt-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.appt-warn { grid-column: 1 / -1; color: var(--danger); min-height: 1em; }

@media (max-width: 640px) {
  .appt { flex-wrap: wrap; }
  .appt-time { flex-basis: 100%; border-right: 0; flex-direction: row; align-items: baseline; gap: 8px; }
  .appt-do { width: 100%; }
}

/* ---- GST summary, on the earnings screen ---- */
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: -6px 0 4px; }
.data-table tr.sum-row td { border-top: 1.5px solid var(--line); background: #faf7fb; }

/* ---- stock ---- */
.low-card { margin-top: 14px; border-color: #f0d6b4; background: #fffaf2; }
.data-table tr.low-row td { background: #fffaf2; }
.points-row { background: #fdf4e7; border-color: #f0dcbb; }

/* ---- a small period switch inside a screen header ---- */
.seg-row { display: inline-flex; gap: 4px; align-items: center; }

/* ---- WhatsApp ---- */
.wa-line { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.wa-detail { margin: 10px 0 4px; max-width: 420px; }
.wa-media { display: flex; align-items: flex-start; gap: 10px; margin-top: 10px; }
.wa-media img, .wa-media video { max-width: 220px; max-height: 180px; border-radius: 10px; }
.wa-block { color: var(--danger); font-weight: 600; }
.wa-count { text-align: right; }
