/* Somi Salon OS · design system */
:root {
  --bg: #f7f4fa;
  --surface: #ffffff;
  --ink: #241b33;
  --ink-2: #4a4057;
  --muted: #857c92;
  --line: #ebe5f1;
  --line-2: #f3eff7;
  --purple: #713caa;
  --purple-d: #5a2c8b;
  --purple-50: #f3ecfa;
  --purple-rgb: 113, 60, 170;
  --pink: #d36b9d;
  --pink-rgb: 211, 107, 157;
  --pink-50: #fbecf3;
  --gold: #c9a35f;
  --gold-50: #faf3e6;
  --green: #22845e;
  --green-50: #e4f5ed;
  --orange: #b2711a;
  --orange-50: #fff2dd;
  --red: #b23b5f;
  --red-50: #fbe7ee;
  --blue: #3466b3;
  --blue-50: #e8f0fb;
  --side: #1d1229;
  --side-2: #2a1b3b;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(36, 27, 51, .04), 0 12px 32px rgba(55, 35, 76, .06);
  --shadow-lg: 0 24px 60px rgba(29, 18, 41, .22);
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Manrope', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--purple); text-decoration: none; }
a:hover { color: var(--purple-d); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
.serif { font-family: var(--serif); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.b { font-weight: 700; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.hide { display: none !important; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 20px; } .mt-4 { margin-top: 28px; }
.flex { display: flex; align-items: center; gap: 10px; }
.flex-wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 14px; }

/* ---------- shell ---------- */
.side { position: fixed; inset: 0 auto 0 0; width: 264px; background: radial-gradient(120% 60% at 0% 0%, color-mix(in srgb, var(--purple) 28%, var(--side)) 0%, transparent 60%), var(--side); color: #d9cfe4; display: flex; flex-direction: column; z-index: 40; }
.side-logo { display: flex; align-items: center; gap: 10px; padding: 26px 24px 18px; }
.side-logo img { width: 128px; height: auto; display: block; }
.side-logo small { display: block; font-size: 9.5px; letter-spacing: .28em; color: #c99bc0; margin-top: 6px; text-transform: uppercase; }
.side-nav { flex: 1; overflow-y: auto; padding: 4px 14px 20px; scrollbar-width: thin; scrollbar-color: #3b2950 transparent; }
.side-group { font-size: 10px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: #8d7c9f; margin: 18px 12px 6px; }
.nav { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; color: #cfc3dc; font-weight: 600; font-size: 13.5px; transition: background .15s, color .15s; position: relative; }
.nav svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.nav:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav.is-active { background: linear-gradient(90deg, rgba(211, 107, 157, .22), rgba(var(--purple-rgb), .25)); color: #fff; }
.nav.is-active::before { content: ''; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--pink); }
.nav .badge { margin-left: auto; }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; font-size: 11px; font-weight: 800; background: var(--pink); color: #fff; }
.badge.gold { background: var(--gold); color: #2b1d0a; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-top: 1px solid rgba(255, 255, 255, .07); }
.side-user .avatar { background: #3c2753; color: #f1d9ea; }
.side-user b { display: block; color: #fff; font-size: 13px; }
.side-user span { font-size: 11px; color: #a596b6; }
.side-user form { margin-left: auto; }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: #fff; display: inline-grid; place-items: center; color: var(--ink-2); }
.icon-btn svg { width: 17px; height: 17px; }
.side .icon-btn { background: transparent; border-color: rgba(255, 255, 255, .12); color: #cbbfd8; }
.side .icon-btn:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.main { margin-left: 264px; min-height: 100vh; }
.top { position: sticky; top: 0; z-index: 30; background: rgba(247, 244, 250, .86); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; }
.top.scrolled { border-bottom-color: var(--line); }
.top-in { display: flex; align-items: center; gap: 14px; padding: 18px 34px; max-width: 1640px; }
.menu-btn { display: none; }
.search { position: relative; flex: 1; max-width: 420px; }
.search input { width: 100%; height: 42px; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 0 14px 0 40px; outline: none; transition: border-color .15s, box-shadow .15s; }
.search input:focus { border-color: color-mix(in srgb, var(--purple) 45%, #fff); box-shadow: 0 0 0 4px rgba(var(--purple-rgb), .1); }
.search svg { position: absolute; left: 13px; top: 12px; width: 18px; height: 18px; color: var(--muted); }
.search-results { position: absolute; top: 48px; left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; display: none; z-index: 50; max-height: 360px; overflow: auto; }
.search-results.show { display: block; }
.search-results a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; color: var(--ink); }
.search-results a:hover, .search-results a.is-focus { background: var(--purple-50); }
.top-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.today { font-size: 12px; color: var(--muted); white-space: nowrap; }
.content { padding: 8px 34px 60px; max-width: 1640px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 10px 0 24px; }
.eyebrow { font-size: 10.5px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: var(--purple); }
.page-head h1 { font: 600 36px/1.1 var(--serif); margin-top: 6px; letter-spacing: -.01em; }
.page-head p { margin: 6px 0 0; color: var(--muted); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 11px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 700; font-size: 13px; white-space: nowrap; transition: background .15s, border-color .15s, transform .1s, box-shadow .15s; text-decoration: none; }
.btn:hover { border-color: #d8cce6; color: var(--ink); background: #fcfbfe; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: linear-gradient(135deg, color-mix(in srgb, var(--purple) 88%, #fff), color-mix(in srgb, var(--purple) 92%, #000)); border-color: transparent; color: #fff; box-shadow: 0 6px 16px rgba(var(--purple-rgb), .28); }
.btn-primary:hover { background: linear-gradient(135deg, color-mix(in srgb, var(--purple) 82%, #fff), var(--purple)); color: #fff; border-color: transparent; }
.btn-pink { background: var(--pink-50); border-color: transparent; color: #9a3e76; }
.btn-pink:hover { background: #f7dcea; color: #8a3168; border-color: transparent; }
.btn-gold { background: var(--gold); border-color: transparent; color: #2b1d0a; }
.btn-gold:hover { background: #d4b071; color: #2b1d0a; }
.btn-green { background: #22a06b; border-color: transparent; color: #fff; }
.btn-green:hover { background: #1c8d5d; color: #fff; }
.btn-danger { color: var(--red); }
.btn-danger:hover { background: var(--red-50); border-color: #f1c9d6; color: var(--red); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: rgba(var(--purple-rgb), .07); border-color: transparent; }
.btn-sm { height: 32px; padding: 0 11px; font-size: 12px; border-radius: 9px; }
.btn-xs { height: 26px; padding: 0 9px; font-size: 11.5px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn-wa { background: #25d366; color: #fff; border-color: transparent; }
.btn-wa:hover { background: #1fb959; color: #fff; border-color: transparent; }
.btn[disabled] { opacity: .55; pointer-events: none; }

/* ---------- cards & grid ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.card-pad { padding: 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.card-head h2 { font-size: 15px; font-weight: 800; }
.card-head .sub { font-size: 12px; color: var(--muted); font-weight: 500; }
.card-body { padding: 18px 22px; }
.grid { display: grid; gap: 18px; }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.g-side { grid-template-columns: minmax(0, 1fr) 360px; }
.section { margin-top: 22px; }

.stat { padding: 20px 22px; position: relative; overflow: hidden; }
.stat .label { font-size: 12px; font-weight: 700; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.stat .label i { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--purple-50); color: var(--purple); }
.stat .label i svg { width: 16px; height: 16px; }
.stat .value { font-size: 27px; font-weight: 800; margin: 12px 0 2px; letter-spacing: -.02em; }
.stat .note { font-size: 12px; color: var(--muted); }
.stat .note.up { color: var(--green); }
.stat .note.down { color: var(--red); }
.stat.pink .label i { background: var(--pink-50); color: var(--pink); }
.stat.gold .label i { background: var(--gold-50); color: #a07a33; }
.stat.green .label i { background: var(--green-50); color: var(--green); }

.hero { border-radius: 22px; padding: 30px 34px; color: #fff; display: flex; justify-content: space-between; align-items: center; gap: 24px; background: radial-gradient(90% 140% at 100% 0%, rgba(var(--pink-rgb), .55), transparent 55%), linear-gradient(115deg, color-mix(in srgb, var(--side) 80%, var(--purple)) 0%, var(--purple-d) 58%, color-mix(in srgb, var(--purple) 60%, var(--pink)) 100%); position: relative; overflow: hidden; }
.hero::after { content: ''; position: absolute; right: -40px; bottom: -60px; width: 260px; height: 260px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 0 0 30px rgba(255, 255, 255, .03), 0 0 0 70px rgba(255, 255, 255, .02); }
.hero .eyebrow { color: #f2b9d8; }
.hero h2 { font: 600 31px/1.15 var(--serif); margin: 8px 0 6px; }
.hero p { margin: 0; color: #eadcf2; max-width: 560px; }
.hero .actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; position: relative; z-index: 1; }
.hero .btn { border: 0; }
.hero-side { position: relative; z-index: 1; text-align: right; flex: none; }
.hero-side .big { font: 600 52px/1 var(--serif); }
.hero-side span { display: block; font-size: 12px; color: #e8d6f1; letter-spacing: .12em; text-transform: uppercase; margin-top: 6px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; }
th { font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); text-align: left; padding: 12px 14px; background: #fbf9fd; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 13px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; font-size: 13px; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: #fcfaff; }
tr.is-link { cursor: pointer; }
.t-name { font-weight: 700; color: var(--ink); }
.t-sub { display: block; font-size: 12px; color: var(--muted); font-weight: 500; }
.num { font-variant-numeric: tabular-nums; }
.empty { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty svg { width: 40px; height: 40px; color: #cdbfe0; margin-bottom: 10px; }
.empty b { display: block; color: var(--ink-2); font-size: 15px; margin-bottom: 4px; }

/* ---------- pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 20px; font-size: 11.5px; font-weight: 700; background: var(--purple-50); color: var(--purple); white-space: nowrap; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.pill.plain::before { display: none; }
.pill-pending { background: var(--orange-50); color: var(--orange); }
.pill-confirmed { background: var(--blue-50); color: var(--blue); }
.pill-in_progress { background: var(--purple-50); color: var(--purple); }
.pill-completed, .pill-paid, .pill-active, .pill-replied { background: var(--green-50); color: var(--green); }
.pill-cancelled, .pill-void, .pill-dropped, .pill-no_show, .pill-expired { background: var(--red-50); color: var(--red); }
.pill-partial, .pill-enquiry, .pill-new { background: var(--orange-50); color: var(--orange); }
.pill-unpaid { background: var(--red-50); color: var(--red); }
.pill-closed { background: #eeebf2; color: #6f6680; }
.pill-website { background: var(--pink-50); color: #a33f75; }
.pill-gold { background: var(--gold-50); color: #8b6526; }

.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: var(--purple-50); color: var(--purple); flex: none; }
.avatar.lg { width: 64px; height: 64px; font-size: 22px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }

/* ---------- forms ---------- */
.field { display: block; }
.field > label, .label { display: block; font-size: 12px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.field .hint { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.input, .select, .textarea { width: 100%; height: 42px; padding: 0 12px; border: 1px solid #ddd4e8; border-radius: 10px; background: #fff; outline: none; transition: border-color .15s, box-shadow .15s; min-width: 0; }
.textarea { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; }
.select { appearance: none; -webkit-appearance: none; padding-right: 34px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23857c92' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; }
.input:focus, .select:focus, .textarea:focus { border-color: color-mix(in srgb, var(--purple) 50%, #fff); box-shadow: 0 0 0 4px rgba(var(--purple-rgb), .1); }
.input.sm, .select.sm { height: 34px; font-size: 13px; border-radius: 8px; }
.input.price { text-align: right; font-variant-numeric: tabular-nums; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid.g3 { grid-template-columns: repeat(3, 1fr); }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; cursor: pointer; user-select: none; }
.check input { width: 18px; height: 18px; accent-color: var(--purple); }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; font-size: 13px; }
.switch input { position: absolute; opacity: 0; }
.switch i { width: 38px; height: 22px; border-radius: 12px; background: #ddd4e8; position: relative; transition: background .2s; flex: none; }
.switch i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s; }
.switch input:checked + i { background: var(--purple); }
.switch input:checked + i::after { transform: translateX(16px); }
.switch input:focus-visible + i { box-shadow: 0 0 0 4px rgba(var(--purple-rgb), .18); }
.errors { background: var(--red-50); color: var(--red); border: 1px solid #f1c9d6; border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; font-size: 13px; }
.errors ul { margin: 6px 0 0; padding-left: 18px; }
.notice { background: var(--purple-50); border: 1px solid #e3d4f2; color: var(--ink-2); border-radius: 12px; padding: 12px 14px; font-size: 13px; }
.notice.gold { background: var(--gold-50); border-color: #efdfbf; }
.notice.green { background: var(--green-50); border-color: #c6e9d7; }
.notice.red { background: var(--red-50); border-color: #f1c9d6; }

/* ---------- toolbar / tabs ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .input, .toolbar .select { width: auto; min-width: 150px; }
.tabs { display: flex; gap: 4px; padding: 4px; background: #efe9f5; border-radius: 12px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { height: 34px; padding: 0 14px; border-radius: 9px; border: 0; background: transparent; font-weight: 700; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.tab:hover { color: var(--ink); }
.tab.is-active { background: #fff; color: var(--purple); box-shadow: 0 2px 6px rgba(55, 35, 76, .08); }
.tab small { font-size: 10.5px; color: var(--muted); font-weight: 700; }

/* ---------- list rows ---------- */
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.list-row:last-child { border-bottom: 0; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--muted); }
.kv b { text-align: right; }

/* ---------- charts ---------- */
.bars { display: flex; align-items: flex-end; gap: 8px; height: 190px; padding-top: 14px; }
.bars .col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.bars .bar { width: 100%; max-width: 38px; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, color-mix(in srgb, var(--purple) 50%, #fff), var(--purple)); min-height: 3px; position: relative; transition: filter .15s; }
.bars .bar.today { background: linear-gradient(180deg, color-mix(in srgb, var(--pink) 55%, #fff), var(--pink)); }
.bars .col:hover .bar { filter: brightness(1.1); }
.bars .col:hover .tip { opacity: 1; transform: translate(-50%, -6px); }
.bars .tip { position: absolute; bottom: 100%; left: 50%; transform: translate(-50%, 0); background: var(--side); color: #fff; font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: 6px; white-space: nowrap; opacity: 0; transition: .15s; pointer-events: none; }
.bars .lbl { font-size: 10.5px; color: var(--muted); margin-top: 8px; white-space: nowrap; }
.meter { height: 8px; border-radius: 8px; background: #efe9f5; overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--purple), #df8cb3); }

/* ---------- modal ---------- */
dialog.modal { border: 0; padding: 0; border-radius: 20px; width: min(620px, calc(100vw - 24px)); max-height: calc(100vh - 40px); box-shadow: var(--shadow-lg); color: var(--ink); overflow: hidden; }
dialog.modal.wide { width: min(880px, calc(100vw - 24px)); }
dialog.modal::backdrop { background: rgba(29, 16, 40, .55); backdrop-filter: blur(3px); }
dialog.modal[open] { animation: pop .22s cubic-bezier(.2, .9, .3, 1.2); display: flex; flex-direction: column; }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px 14px; border-bottom: 1px solid var(--line-2); }
.modal-head h3 { font: 600 24px var(--serif); }
.modal-body { padding: 20px 24px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 24px 20px; border-top: 1px solid var(--line-2); background: #fcfbfe; }
.modal form { display: flex; flex-direction: column; min-height: 0; max-height: calc(100vh - 110px); }

/* ---------- toast ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: flex; flex-direction: column; gap: 10px; }
.toast { display: flex; align-items: center; gap: 10px; background: var(--side); color: #fff; padding: 13px 16px; border-radius: 13px; box-shadow: var(--shadow-lg); font-weight: 600; animation: toastIn .3s ease; max-width: 380px; }
.toast svg { width: 18px; height: 18px; color: #7fe0b3; flex: none; }
.toast.error svg { color: #ff9cbc; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- schedule ---------- */
.sched { display: grid; overflow: auto; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; max-height: calc(100vh - 230px); position: relative; }
.sched-head { position: sticky; top: 0; z-index: 3; background: #fbf9fd; border-bottom: 1px solid var(--line); padding: 12px; font-weight: 800; font-size: 13px; display: flex; align-items: center; gap: 8px; min-width: 170px; }
.sched-head small { display: block; font-weight: 600; font-size: 11px; color: var(--muted); }
.sched-corner { position: sticky; left: 0; top: 0; z-index: 4; background: #fbf9fd; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
.sched-time { position: sticky; left: 0; z-index: 2; background: #fff; border-right: 1px solid var(--line); font-size: 11px; color: var(--muted); padding: 0 8px; text-align: right; transform: translateY(-7px); }
.sched-col { position: relative; border-right: 1px solid var(--line-2); }
.sched-slot { border-bottom: 1px solid var(--line-2); }
.sched-slot.hour { border-bottom-color: var(--line); }
.sched-slot.drop { background: var(--purple-50); }
.appt { position: absolute; left: 4px; right: 4px; border-radius: 9px; padding: 6px 8px; font-size: 11.5px; line-height: 1.35; overflow: hidden; background: #efe6f9; border-left: 3px solid var(--purple); color: var(--ink); cursor: pointer; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); transition: box-shadow .15s, transform .15s; z-index: 1; }
.appt:hover { box-shadow: 0 6px 16px rgba(55, 35, 76, .16); z-index: 2; }
.appt b { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appt span { display: block; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appt.s-pending { background: #fff3e2; border-color: #e19a3a; }
.appt.s-confirmed { background: #e9f0fc; border-color: #4a7bc8; }
.appt.s-in_progress { background: #efe6f9; border-color: var(--purple); }
.appt.s-completed { background: #e5f5ed; border-color: #2e9e6f; }
.appt.s-cancelled, .appt.s-no_show { background: #f6eef1; border-color: #c76a8a; opacity: .6; text-decoration: line-through; }
.appt.dragging { opacity: .4; }
.now-line { position: absolute; left: 0; right: 0; height: 2px; background: var(--pink); z-index: 2; pointer-events: none; }
.now-line::before { content: ''; position: absolute; left: -4px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--pink); }

/* ---------- POS ---------- */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 18px; align-items: start; }
.pos-cats { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.pos-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-top: 14px; max-height: calc(100vh - 330px); overflow-y: auto; padding: 2px; }
.pos-item { text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 13px; padding: 12px 13px; transition: border-color .15s, box-shadow .15s, transform .1s; display: flex; flex-direction: column; gap: 4px; min-height: 84px; }
.pos-item:hover { border-color: color-mix(in srgb, var(--purple) 40%, #fff); box-shadow: 0 6px 16px rgba(55, 35, 76, .08); }
.pos-item:active { transform: scale(.98); }
.pos-item b { font-size: 13px; line-height: 1.3; }
.pos-item span { font-size: 12.5px; color: var(--purple); font-weight: 800; margin-top: auto; }
.pos-item small { font-size: 11px; color: var(--muted); }
.cart { position: sticky; top: 92px; }
.cart-lines { max-height: 340px; overflow-y: auto; }
.cart-line { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.cart-line .nm { font-weight: 700; font-size: 13px; }
.cart-line .ctrls { grid-column: 1 / -1; display: flex; gap: 6px; align-items: center; }
.cart-line .ctrls .select { height: 30px; font-size: 12px; flex: 1; }
.cart-line .ctrls .input { height: 30px; font-size: 12px; width: 90px; text-align: right; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.qty button { width: 26px; height: 28px; border: 0; background: #faf8fc; font-weight: 800; }
.qty span { min-width: 24px; text-align: center; font-weight: 700; font-size: 12px; }
.totals .kv { border-bottom: 0; padding: 5px 0; }
.totals .grand { font-size: 22px; font-weight: 800; padding-top: 10px; border-top: 1px solid var(--line); margin-top: 6px; }
.pay-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pay-methods label { position: relative; }
.pay-methods input { position: absolute; opacity: 0; }
.pay-methods span { display: flex; align-items: center; justify-content: center; height: 36px; border: 1px solid var(--line); border-radius: 9px; font-size: 12px; font-weight: 700; cursor: pointer; text-align: center; padding: 0 4px; }
.pay-methods input:checked + span { border-color: var(--purple); background: var(--purple-50); color: var(--purple); }

/* ---------- services price editor ---------- */
.price-table td { padding: 8px 10px; }
.price-table .input.sm { min-width: 90px; }
.price-table .name-in { min-width: 200px; font-weight: 600; }
.price-table tr.dirty { background: #fffbef; }
.group-card + .group-card { margin-top: 18px; }
.save-bar { position: sticky; bottom: 16px; z-index: 20; display: none; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: var(--side); color: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); margin-top: 18px; }
.save-bar.show { display: flex; animation: toastIn .25s ease; }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: #fff; }
.auth-art { position: relative; color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; background: radial-gradient(80% 60% at 100% 0%, rgba(var(--pink-rgb), .5), transparent 60%), radial-gradient(70% 60% at 0% 100%, rgba(201, 163, 95, .25), transparent 60%), linear-gradient(140deg, var(--side) 0%, color-mix(in srgb, var(--purple) 45%, var(--side)) 55%, color-mix(in srgb, var(--purple) 85%, var(--side)) 100%); }
.auth-art img { width: 210px; }
.auth-art h1 { font: 500 52px/1.05 var(--serif); margin: 0 0 14px; max-width: 12ch; }
.auth-art h1 em { color: color-mix(in srgb, var(--pink) 45%, #fff); }
.auth-art p { color: #e5d6ee; max-width: 420px; margin: 0; }
.auth-art .ring { position: absolute; right: -120px; top: 30%; width: 420px; height: 420px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 0 0 50px rgba(255, 255, 255, .025), 0 0 0 110px rgba(255, 255, 255, .02); }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-form form { width: 100%; max-width: 380px; }
.auth-form h2 { font: 600 38px var(--serif); }
.auth-form .stack { margin-top: 26px; }
.install { max-width: 760px; margin: 40px auto; padding: 0 20px; }

/* ---------- receipt ---------- */
.receipt { max-width: 380px; margin: 0 auto; background: #fff; padding: 26px 24px; border: 1px solid var(--line); border-radius: 14px; font-size: 13px; }
.receipt .center img { width: 140px; }
.receipt hr { border: 0; border-top: 1px dashed #cfc5da; margin: 12px 0; }
.receipt table td, .receipt table th { padding: 5px 0; border: 0; background: none; font-size: 12.5px; }
.receipt table th { letter-spacing: .06em; }

/* ---------- misc ---------- */
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ''; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline .tl { position: relative; padding: 0 0 16px; }
.timeline .tl::before { content: ''; position: absolute; left: -21px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--purple); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 20px; background: #f1ecf6; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.color-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.pagination { display: flex; gap: 6px; justify-content: flex-end; align-items: center; padding: 14px 18px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 34px; height: 34px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12.5px; color: var(--ink-2); background: #fff; }
.pagination .is-active { background: var(--purple); color: #fff; border-color: var(--purple); }
.pagination .is-disabled { opacity: .45; }
.overlay { display: none; }
.kbd { font: 700 10.5px var(--sans); border: 1px solid var(--line); border-bottom-width: 2px; padding: 1px 6px; border-radius: 6px; color: var(--muted); background: #fff; }

@media (max-width: 1280px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pos { grid-template-columns: minmax(0, 1fr) 360px; }
}
@media (max-width: 1100px) {
  .g-main, .g-side { grid-template-columns: 1fr; }
  .g-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pos { grid-template-columns: 1fr; }
  .cart { position: static; }
  .pos-items { max-height: none; }
}
@media (max-width: 900px) {
  .side { transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--shadow-lg); }
  body.nav-open .side { transform: none; }
  body.nav-open .overlay { display: block; position: fixed; inset: 0; background: rgba(29, 16, 40, .45); z-index: 35; }
  .main { margin-left: 0; }
  .menu-btn { display: inline-grid; }
  .top-in { padding: 12px 16px; gap: 10px; }
  .content { padding: 4px 16px 50px; }
  .today { display: none; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { min-height: 240px; padding: 30px 26px; }
  .auth-art h1 { font-size: 36px; }
  .auth-art .ring { display: none; }
}
@media (max-width: 640px) {
  .g-4, .g-3, .g-2 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .g-3.single, .g-2.single { grid-template-columns: 1fr; }
  .form-grid, .form-grid.g3 { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 30px; }
  .hero { padding: 24px 22px; display: block; }
  .hero h2 { font-size: 26px; }
  .hero-side { text-align: left; margin-top: 18px; }
  .stat { padding: 15px 16px; }
  .stat .value { font-size: 21px; }
  .card-head, .card-body { padding-left: 16px; padding-right: 16px; }
  .top-actions .btn span { display: none; }
  .top-actions .btn { padding: 0 11px; }
  .search { max-width: none; }
  td, th { padding: 11px 10px; }
  table.responsive thead { display: none; }
  table.responsive tr { display: block; padding: 10px 6px; border-bottom: 1px solid var(--line-2); }
  table.responsive td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 5px 8px; text-align: right; }
  table.responsive td::before { content: attr(data-label); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); text-align: left; }
  table.responsive td[data-label=""]::before { display: none; }
  .pay-methods { grid-template-columns: repeat(2, 1fr); }
}
@media print {
  .side, .top, .no-print, .toasts { display: none !important; }
  .main { margin: 0; }
  .content { padding: 0; }
  body { background: #fff; }
  .receipt { border: 0; }
}

/* default icon size (any context can override) */
:where(svg[viewBox="0 0 24 24"]) { width: 16px; height: 16px; flex: none; vertical-align: -3px; }
.notice > svg { margin-right: 4px; }
.pill svg { width: 12px; height: 12px; }
.tab svg { width: 15px; height: 15px; }

/* ---------- WhatsApp ---------- */
.pill-wa-sent, .pill-done, .pill-running { background: var(--green-50); color: var(--green); }
.pill-wa-queued, .pill-queued { background: var(--orange-50); color: var(--orange); }
.pill-wa-failed { background: var(--red-50); color: var(--red); }
.pill-wa-skipped, .pill-paused { background: #eeebf2; color: #6f6680; }
.pill-wa-received { background: var(--blue-50); color: var(--blue); }
#waBadge svg { width: 15px; height: 15px; }
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: '+'; float: right; color: var(--muted); }
details[open] > summary::after { content: '−'; }

/* ---------- Live chat ---------- */
.chat-wrap { display: grid; grid-template-columns: 320px minmax(0, 1fr); height: calc(100vh - 290px); min-height: 520px; overflow: hidden; padding: 0; }
.chat-list { border-right: 1px solid var(--line); overflow-y: auto; }
.chat-item { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line-2); color: inherit; }
.chat-item:hover { background: #faf7fc; }
.chat-item.is-active { background: var(--purple-50); }
.chat-item.unread b { color: var(--purple); }
.chat-item .avatar { position: relative; flex: 0 0 auto; }
.dot-on { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: #22c55e; border: 2px solid #fff; }
.ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.chat-empty { margin: auto; }
.chat-pane { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.chat-pane.hide { display: none; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.chat-head .t-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-back { display: none; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 18px 18px 8px; background: #fbf9fd; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 76%; display: flex; flex-direction: column; }
.msg .b { padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.5; word-wrap: break-word; }
.msg .m { font-size: 11px; color: var(--muted); margin: 3px 6px 0; }
.msg.in { align-self: flex-start; }
.msg.in .b { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.msg.out { align-self: flex-end; align-items: flex-end; }
.msg.out .b { background: linear-gradient(135deg, var(--purple), var(--purple-d)); color: #fff; border-bottom-right-radius: 5px; }
.msg.sys { align-self: center; max-width: 88%; }
.msg.sys .b { background: transparent; color: var(--muted); font-size: 12.5px; text-align: center; padding: 4px 8px; }
.chat-reply { border-top: 1px solid var(--line); padding: 12px 16px; background: #fff; }
.chat-reply .textarea { min-height: 56px; resize: none; }
@media (max-width: 900px) {
  .chat-wrap { grid-template-columns: 1fr; height: calc(100vh - 210px); }
  .chat-main { display: none; }
  .chat-wrap.has-chat .chat-list { display: none; }
  .chat-wrap.has-chat .chat-main { display: flex; }
  .chat-back { display: inline-grid; }
  .chat-actions .btn span { display: none; }
  .msg { max-width: 88%; }
}
.attach-drop { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 10px 14px; border: 1.5px dashed #d9cce6; border-radius: 12px; cursor: pointer; color: var(--muted); font-size: 13px; background: #fcfaff; }
.attach-drop:hover { border-color: var(--purple); }
.attach-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.attach-drop svg { width: 16px; height: 16px; vertical-align: -3px; }
.attach-drop [data-attach-full] { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; }
.attach-drop [data-attach-full].hide { display: none; }
.attach-drop img { width: 46px; height: 46px; object-fit: cover; border-radius: 8px; }
a.stat-link { color: inherit; transition: transform .15s, box-shadow .15s; }
a.stat-link:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -18px rgba(60, 30, 90, .45); }
a.stat-link .note svg { width: 13px; height: 13px; vertical-align: -2px; }

/* switches inside form fields (labels there are block by default) */
.field label.switch { display: inline-flex; margin: 0; }
.switch i { display: inline-block; }
dialog.modal.modal-lg { width: min(760px, calc(100vw - 24px)); }
.chip-check { position: relative; cursor: pointer; }
.chip-check input { position: absolute; opacity: 0; }
.chip-check span { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 20px; border: 1px solid var(--line); background: #fff; font-size: 13px; font-weight: 600; color: var(--ink-2); transition: .15s; }
.chip-check input:checked + span { background: var(--purple); border-color: var(--purple); color: #fff; }
.chip-check input:focus-visible + span { outline: 2px solid var(--purple); outline-offset: 2px; }
.staff-card { display: flex; flex-direction: column; gap: 12px; }
.staff-card .st-top { display: flex; gap: 12px; align-items: center; }
.staff-mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.staff-mini div { background: #faf7fc; border-radius: 12px; padding: 10px 12px; }
.staff-mini span { display: block; font-size: 11px; color: var(--muted); font-weight: 600; }
.staff-mini b { font-size: 15px; }
.period-tabs .tab { white-space: nowrap; }

/* ---------- Online payments ---------- */
.proof-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.proof { display: flex; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 14px; box-shadow: var(--shadow, 0 1px 2px rgba(0,0,0,.04)); }
.proof.pending { border-color: #f0d9a8; background: #fffdf7; }
.proof-img { flex: 0 0 96px; height: 128px; border-radius: 12px; overflow: hidden; background: #f4f0f8; display: grid; place-items: center; border: 1px solid var(--line-2); }
.proof-img img { width: 100%; height: 100%; object-fit: cover; }
.proof-pdf { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; text-align: center; padding: 6px; }
.proof-pdf svg { width: 26px; height: 26px; }
.proof-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
/* small inline forms inside a modal body (e.g. inventory categories) sit on one line */
.modal .modal-body form.flex { flex-direction: row; align-items: center; max-height: none; }
.modal .modal-body .list-row > form:not(.flex) { display: block; max-height: none; }
/* ---------- POS: front-desk layout ---------- */
.cart { max-height: calc(100vh - 110px); overflow-y: auto; display: flex; flex-direction: column; }
.pos-step { padding: 16px 20px; border-top: 1px solid var(--line-2); }
.pos-step-h { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 13px; margin-bottom: 10px; }
.pos-step-h span { width: 22px; height: 22px; border-radius: 50%; background: var(--purple); color: #fff; display: grid; place-items: center; font-size: 11.5px; flex: 0 0 auto; }
.client-card { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1.5px solid color-mix(in srgb, var(--purple) 40%, #fff); background: var(--purple-50); border-radius: 13px; }
.client-card .t-sub { display: block; }
.client-results .list-row { padding: 9px 6px; border-radius: 10px; }
.client-results .list-row:hover { background: var(--purple-50); }
.new-client { padding: 12px; border: 1.5px dashed color-mix(in srgb, var(--purple) 40%, #fff); border-radius: 13px; background: #fcfaff; }
#walkinBtn.is-on { background: var(--purple-50); color: var(--purple); border-color: color-mix(in srgb, var(--purple) 40%, #fff); }
.balance-box { display: flex; justify-content: space-between; align-items: center; padding: 11px 14px; border-radius: 12px; font-weight: 700; background: #f3f0f7; }
.balance-box.due { background: #fff3e8; color: var(--orange); }
.balance-box.ok { background: #e9f7f0; color: var(--green); }
.send-row { display: grid; grid-template-columns: 120px 1fr; gap: 8px; align-items: center; }
.send-row .check { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; }
.send-row .check svg { width: 16px; height: 16px; }
.send-row .check:has(input:disabled) { opacity: .5; }
.pos-finish { position: sticky; bottom: 0; padding: 14px 20px 18px; background: #fff; border-top: 1px solid var(--line-2); margin-top: auto; z-index: 2; }
.btn-lg { height: 52px; font-size: 15.5px; border-radius: 14px; }
.pos-item { min-height: 92px; padding: 13px 14px; }
.pos-item b { font-size: 13.5px; }
.pos-item span { font-size: 13.5px; }
@media (max-width: 1100px) { .cart { max-height: none; overflow: visible; } .pos-finish { position: sticky; bottom: 0; } }
/* ---------- receipt ---------- */
.rc-toolbar { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 auto 18px; max-width: 820px; }
.rc-send { max-width: 820px; margin: 0 auto 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rc-send form { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rc-send form .input { flex: 1; min-width: 150px; height: 38px; }
.rc-send .done { flex-basis: 100%; font-size: 12px; color: var(--green); font-weight: 700; }
.rc { background: #fff; margin: 0 auto; color: #231b2c; }
.rc.thermal { max-width: 360px; padding: 22px 20px; border: 1px solid var(--line); border-radius: 14px; font-size: 12.5px; }
.rc.a4 { max-width: 820px; padding: 40px 46px; border: 1px solid var(--line); border-radius: 14px; font-size: 13.5px; }
.rc .rc-brand { text-align: center; }
.rc .rc-brand img { width: 150px; }
.rc.a4 .rc-brand { display: flex; justify-content: space-between; align-items: flex-start; text-align: left; gap: 20px; }
.rc.a4 .rc-brand img { width: 190px; }
.rc .rc-brand .info { font-size: 11.5px; color: #6c6271; line-height: 1.6; margin-top: 6px; }
.rc.a4 .rc-brand .info { text-align: right; margin-top: 0; }
.rc .rc-title { font: 600 22px var(--serif); letter-spacing: .02em; }
.rc hr { border: 0; border-top: 1px dashed #cfc5da; margin: 12px 0; }
.rc.a4 hr { border-top: 1px solid #eee6f3; margin: 18px 0; }
.rc .rc-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.rc.thermal .rc-meta { grid-template-columns: 1fr; }
.rc .rc-meta div { display: flex; justify-content: space-between; gap: 10px; }
.rc .rc-meta span { color: #7d7389; }
.rc .rc-meta b { text-align: right; word-break: break-word; }
.rc.a4 .rc-meta { grid-template-columns: 1fr 1fr; }
.rc.a4 .rc-meta .box { background: #faf7fc; border: 1px solid #eee6f3; border-radius: 12px; padding: 12px 14px; display: block; }
.rc .rc-meta .box h4 { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--purple); margin: 0 0 6px; }
.rc .rc-meta .box div { padding: 2px 0; }
.rc table { width: 100%; border-collapse: collapse; }
.rc table th { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: #7d7389; text-align: left; padding: 6px 0; border-bottom: 1px solid #eee6f3; background: none; }
.rc table td { padding: 7px 0; vertical-align: top; border: 0; background: none; }
.rc.a4 table td { padding: 10px 0; border-bottom: 1px solid #f3eef7; }
.rc .right { text-align: right; }
.rc .tot td { padding: 3px 0; }
.rc .tot .grand td { font-size: 16px; font-weight: 800; padding-top: 8px; }
.rc.a4 .tot { max-width: 330px; margin-left: auto; }
.rc .stamp { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.rc .stamp.paid { background: #e9f7f0; color: #22845e; }
.rc .stamp.due { background: #fff3e8; color: #c0601a; }
.rc .stamp.void { background: #fde8ee; color: #b23b5f; }
.rc .foot { text-align: center; font-size: 12px; color: #6c6271; }
@media print {
  body { background: #fff !important; padding: 0 !important; }
  .rc { border: 0 !important; border-radius: 0; box-shadow: none; }
  .rc.thermal { max-width: 76mm; padding: 0; font-size: 11.5px; }
  .rc.a4 { max-width: none; padding: 0; }
  .rc.a4 .rc-meta .box { background: none; }
}
@media (max-width: 640px) { .rc-send { grid-template-columns: 1fr; } .rc.a4 { padding: 22px 18px; } .rc.a4 .rc-brand { flex-direction: column; } .rc.a4 .rc-brand .info { text-align: left; } .rc.a4 .rc-meta { grid-template-columns: 1fr; } }
.rc .rc-meta > .box { display: block; }
.rc.thermal .rc-meta > .box + .box { margin-top: 8px; padding-top: 8px; border-top: 1px dashed #cfc5da; }
.rc.a4 .tot td { border-bottom: 0; padding: 4px 0; }
.rc.a4 .tot .grand td { border-top: 1px solid #eee6f3; padding-top: 10px; }

/* ---------- WhatsApp Chats ---------- */
.wa-page-head { margin-bottom: 14px; }
.wa-app { display: grid; grid-template-columns: 340px minmax(0, 1fr); height: calc(100vh - 300px); min-height: 500px; overflow: hidden; padding: 0; position: relative; }
.wa-side { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: #fff; }
.wa-side-top { display: flex; gap: 8px; align-items: center; padding: 12px 12px 8px; }
.wa-search { flex: 1; display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 40px; border-radius: 12px; background: var(--line-2); color: var(--muted); }
.wa-search svg { width: 16px; height: 16px; flex: 0 0 auto; }
.wa-search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--ink); }
.wa-new { display: flex; gap: 8px; padding: 0 12px 10px; }
.wa-new.hide { display: none; }
.wa-new .input { flex: 1; min-width: 0; height: 36px; }
.wa-tabs { display: flex; gap: 6px; padding: 2px 12px 10px; border-bottom: 1px solid var(--line); }
.wa-tabs button { border: 0; background: var(--line-2); color: var(--ink-2); padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.wa-tabs button.is-active { background: var(--purple-50); color: var(--purple); }
.wa-list { flex: 1; overflow-y: auto; }
.wa-empty-list { padding: 34px 18px; text-align: center; color: var(--muted); font-size: 13px; }
.wa-item { display: flex; gap: 12px; align-items: center; padding: 11px 14px; border-bottom: 1px solid var(--line-2); color: inherit; }
.wa-item:hover { background: #faf7fc; color: inherit; }
.wa-item.is-active { background: var(--purple-50); }
.wa-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wa-row b { font-weight: 600; font-size: 14px; }
.wa-row small { flex: 0 0 auto; color: var(--muted); font-size: 11.5px; }
.wa-item.unread .wa-row small { color: var(--green); font-weight: 700; }
.wa-item.unread b { color: var(--ink); font-weight: 700; }
.wa-pv { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13px; min-width: 0; }
.wa-pv svg { flex: 0 0 auto; }
.wa-item.unread .wa-pv { color: var(--ink-2); }
.wa-badge { flex: 0 0 auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--green); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.wa-av { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: var(--purple); background: linear-gradient(135deg, #f3ecfa, #fbecf3); }
.ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.wa-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; position: relative; }
.wa-none { flex: 1; display: grid; place-items: center; background: #fbf9fd; }
.wa-none-in { text-align: center; max-width: 340px; padding: 30px; }
.wa-none-ic { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--green-50); color: var(--green); margin-bottom: 12px; }
.wa-none-ic svg { width: 34px; height: 34px; }
.wa-none h3 { margin: 0 0 6px; font-size: 18px; }
.wa-pane { flex: 1; display: flex; flex-direction: column; min-height: 0; position: relative; }
.wa-pane.hide, .wa-none.hide { display: none; }
.wa-head { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #fff; }
.wa-head .wa-av { width: 40px; height: 40px; }
.wa-head b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-head .t-sub { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-head-act { display: flex; gap: 6px; align-items: center; flex: 0 0 auto; }
.wa-back { display: none; }
.wa-msgs { flex: 1; overflow-y: auto; padding: 14px 6% 10px; background-color: #f4eff8; background-image: radial-gradient(rgba(var(--purple-rgb), .07) 1px, transparent 1px); background-size: 18px 18px; }
.wa-more { text-align: center; margin: 2px 0 10px; }
.wa-more.hide { display: none; }
.wa-hello { margin: 40px auto; text-align: center; color: var(--muted); font-size: 13px; background: rgba(255,255,255,.8); padding: 10px 14px; border-radius: 12px; width: max-content; max-width: 90%; }
.wa-day { display: flex; justify-content: center; margin: 12px 0 8px; }
.wa-day span { background: rgba(255,255,255,.95); color: var(--ink-2); font-size: 11.5px; font-weight: 600; padding: 4px 12px; border-radius: 8px; box-shadow: 0 1px 2px rgba(36,27,51,.08); }
.wa-msg { display: flex; flex-direction: column; margin: 2px 0; }
.wa-msg.in { align-items: flex-start; }
.wa-msg.out { align-items: flex-end; }
.wa-msg.sending { opacity: .7; }
.wa-b { position: relative; max-width: min(520px, 78%); padding: 7px 10px 6px; border-radius: 12px; box-shadow: 0 1px 1.5px rgba(36,27,51,.1); font-size: 14px; line-height: 1.45; word-wrap: break-word; overflow-wrap: anywhere; }
.wa-msg.in .wa-b { background: #fff; border-top-left-radius: 4px; }
.wa-msg.out .wa-b { background: var(--purple-50); border-top-right-radius: 4px; }
.wa-msg.has-media .wa-b { padding: 4px 4px 6px; }
.wa-msg.has-media .wa-txt { padding: 4px 6px 0; }
.wa-msg.media-sticker .wa-b { background: transparent; box-shadow: none; }
.wa-txt a { color: var(--blue); text-decoration: underline; }
.wa-meta { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin: 2px 0 0 12px; float: right; font-size: 11px; color: var(--muted); position: relative; top: 4px; }
.wa-msg.has-media .wa-meta { float: none; padding: 0 6px; top: 0; }
.wa-meta em { font-style: normal; max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-b::after { content: ""; display: block; clear: both; }
.wa-tk { display: inline-flex; color: var(--muted); }
.wa-tk.rd { color: #2f8fe0; }
.wa-tk.fl { color: var(--red); }
.wa-tk.q { opacity: .8; }
.wa-fail { margin: 3px 4px 4px; font-size: 12px; color: var(--red); max-width: 78%; text-align: right; }
.wa-fail button { border: 0; background: var(--red-50); color: var(--red); font-weight: 700; padding: 2px 10px; border-radius: 999px; margin-left: 4px; }
.wa-img { display: block; position: relative; padding: 0; border: 0; background: #e9e2f0; border-radius: 9px; overflow: hidden; max-width: 320px; cursor: zoom-in; }
.wa-img img { display: block; width: 100%; max-height: 360px; object-fit: cover; }
.wa-img.stk { background: transparent; max-width: 150px; cursor: default; }
.wa-img.stk img { object-fit: contain; }
.wa-img.wait { width: 260px; min-height: 160px; cursor: default; display: grid; place-items: center; }
.wa-img.wait img { position: absolute; inset: 0; height: 100%; filter: blur(6px); transform: scale(1.1); }
.wa-img.wait span { position: relative; z-index: 1; background: rgba(29,18,41,.62); color: #fff; font-size: 12px; padding: 6px 12px; border-radius: 999px; }
.wa-img.wait span a { color: #fff; text-decoration: underline; }
.wa-vid { display: block; width: 320px; max-width: 100%; max-height: 380px; border-radius: 9px; background: #000; }
.wa-voice { display: flex; align-items: center; gap: 10px; width: 290px; max-width: 100%; padding: 6px 8px 2px; }
.wa-voice.wait { opacity: .7; }
.wa-vplay { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--purple); color: #fff; }
.wa-msg.in .wa-vplay { background: var(--green); }
.wa-vbar { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wa-vbar input { width: 100%; accent-color: var(--purple); margin: 0; }
.wa-msg.in .wa-vbar input { accent-color: var(--green); }
.wa-vbar small { font-size: 11px; color: var(--muted); }
.wa-vmic { color: var(--muted); }
.wa-voice.on .wa-vmic { color: var(--green); }
.wa-doc { display: flex; align-items: center; gap: 10px; width: 290px; max-width: 100%; padding: 10px 12px; border-radius: 9px; background: rgba(var(--purple-rgb), .07); color: var(--ink); }
.wa-doc:hover { background: rgba(var(--purple-rgb), .12); color: var(--ink); }
.wa-doc svg { flex: 0 0 auto; color: var(--purple); }
.wa-doc b { display: block; font-size: 13.5px; }
.wa-doc small { color: var(--muted); font-size: 11.5px; }
.wa-jump { position: absolute; right: 18px; bottom: 84px; z-index: 3; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); display: grid; place-items: center; color: var(--ink-2); }
.wa-jump svg { transform: rotate(-90deg); width: 18px; height: 18px; }
.wa-jump span { position: absolute; top: -6px; right: -4px; min-width: 18px; height: 18px; border-radius: 999px; background: var(--green); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }
.wa-jump span:empty { display: none; }
.wa-jump.hide, .wa-drop.hide, .wa-attach.hide, .wa-compose.hide, .wa-rec.hide { display: none; }
.wa-drop { position: absolute; inset: 0; z-index: 5; background: rgba(var(--purple-rgb), .12); border: 2px dashed var(--purple); border-radius: 0 var(--radius) var(--radius) 0; display: grid; place-items: center; pointer-events: none; }
.wa-drop div { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--purple); background: #fff; padding: 18px 26px; border-radius: 14px; }
.wa-attach { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); background: #fbf9fd; }
.wa-attach-prev { width: 52px; height: 52px; flex: 0 0 auto; border-radius: 10px; overflow: hidden; background: var(--purple-50); display: grid; place-items: center; color: var(--purple); }
.wa-attach-prev img { width: 100%; height: 100%; object-fit: cover; }
.wa-attach b { display: block; }
.wa-compose, .wa-rec { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); background: #fff; }
.wa-compose textarea { flex: 1; min-width: 0; min-height: 44px; resize: none; border: 1px solid var(--line); border-radius: 22px; padding: 10px 16px; max-height: 140px; line-height: 1.4; outline: none; background: var(--line-2); }
.wa-compose textarea:focus { border-color: #d8c6ec; background: #fff; }
.wa-clip { cursor: pointer; margin-bottom: 2px; }
.wa-round { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; color: #fff; background: var(--green); box-shadow: 0 6px 14px -6px rgba(34,132,94,.6); }
.wa-round svg { width: 20px; height: 20px; }
.wa-round.hide { display: none; }
.wa-mic { background: var(--purple); box-shadow: 0 6px 14px -6px rgba(var(--purple-rgb), .6); }
.wa-rec { align-items: center; }
.wa-rec b { font-variant-numeric: tabular-nums; min-width: 44px; }
.wa-rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); animation: waPulse 1s ease-in-out infinite; }
.wa-rec-wave { flex: 1; height: 26px; border-radius: 999px; background: repeating-linear-gradient(90deg, rgba(var(--purple-rgb), .35) 0 3px, transparent 3px 7px); mask: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); animation: waWave 1.2s linear infinite; }
@keyframes waPulse { 50% { opacity: .25; } }
@keyframes waWave { to { background-position: 28px 0; } }
.wa-lb { position: fixed; inset: 0; z-index: 1000; background: rgba(15,9,22,.92); display: grid; place-items: center; padding: 60px 20px 20px; }
.wa-lb.hide { display: none; }
.wa-lb img { max-width: 100%; max-height: calc(100vh - 90px); border-radius: 8px; }
.wa-lb-bar { position: absolute; top: 12px; right: 14px; display: flex; gap: 8px; }
.wa-lb-bar .icon-btn { background: rgba(255,255,255,.12); color: #fff; }
@media (max-width: 860px) {
  .wa-app { grid-template-columns: 1fr; height: calc(100dvh - 200px); min-height: 440px; }
  .wa-app.has-chat { position: fixed; inset: 0; z-index: 80; height: 100dvh; min-height: 0; border-radius: 0; border: 0; }
  #waNotify { display: none; }
  .wa-main { display: none; }
  .wa-app.has-chat .wa-side { display: none; }
  .wa-app.has-chat .wa-main { display: flex; }
  .wa-back { display: inline-grid; }
  .wa-head-act .btn span { display: none; }
  .wa-msgs { padding: 12px 10px 8px; }
  .wa-b { max-width: 86%; }
  .wa-page-head p { display: none; }
}
.chip.green { background: var(--green-50); color: var(--green); }
.chip.gold { background: var(--gold-50); color: var(--orange); }

/* ---------- Settings → Branding ---------- */
.brand-files { display: grid; gap: 12px; }
.brand-file { display: flex; gap: 14px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 14px; }
.brand-prev { flex: 0 0 auto; width: 120px; height: 72px; border-radius: 12px; display: grid; place-items: center; padding: 10px; background: #f7f4fa; border: 1px solid var(--line); }
.brand-prev img { max-width: 100%; max-height: 100%; object-fit: contain; }
.brand-mock { display: grid; grid-template-columns: 96px 1fr; height: 210px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #f7f4fa; }
.bm-side { background: var(--bp-side); padding: 12px 10px; display: flex; flex-direction: column; gap: 7px; }
.bm-side img { width: 100%; max-height: 34px; object-fit: contain; object-position: left; }
.bm-side small { color: rgba(255,255,255,.6); font-size: 8px; letter-spacing: .18em; text-transform: uppercase; margin-bottom: 6px; }
.bm-side i { display: block; height: 9px; border-radius: 5px; background: rgba(255,255,255,.12); }
.bm-side i.on { background: color-mix(in srgb, var(--bp-main) 70%, #fff); }
.bm-main { padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.bm-line { height: 8px; border-radius: 5px; background: #e6deee; }
.bm-line.w60 { width: 60%; } .bm-line.w40 { width: 40%; } .bm-line.w80 { width: 80%; }
.bm-card { background: #fff; border-radius: 10px; padding: 12px; display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--line); }
.bm-badge { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--bp-hi); color: #fff; font-size: 11px; font-weight: 700; }
.bm-btn { background: var(--bp-main); color: #fff; font-size: 11px; font-weight: 700; padding: 7px 12px; border-radius: 9px; }
.bm-link { color: var(--bp-main); font-size: 12px; font-weight: 700; }
.bm-gold { align-self: flex-start; background: var(--bp-acc); color: #1d1229; font-size: 11px; font-weight: 700; padding: 6px 10px; border-radius: 9px; }

/* ---------- Website content ---------- */
.wc { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 18px; align-items: start; padding-bottom: 80px; }
.wc-pages { padding: 0; position: sticky; top: 90px; max-height: calc(100vh - 110px); overflow-y: auto; }
.wc-pages-head { padding: 14px 16px 10px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.wc-page { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 16px; color: var(--ink-2); font-size: 13.5px; border-bottom: 1px solid var(--line-2); }
.wc-page:hover { background: #faf7fc; color: var(--ink); }
.wc-page.is-active { background: var(--purple-50); color: var(--purple); font-weight: 700; }
.wc-page i { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex: 0 0 auto; }
.wc-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.wc-tools { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.wc-search { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: #fff; width: 280px; max-width: 100%; color: var(--muted); }
.wc-search svg { width: 16px; height: 16px; }
.wc-search input { border: 0; outline: none; flex: 1; min-width: 0; background: none; }
.wc-help ul { margin: 6px 0 0; padding-left: 18px; color: var(--ink-2); line-height: 1.7; }
.wc-sec { padding: 0; overflow: hidden; }
.wc-sec.hide, .wc-field.hide { display: none; }
.wc-sec > .wc-sec-head { width: 100%; border: 0; background: none; text-align: left; display: flex; align-items: center; gap: 10px; padding: 14px 18px; cursor: pointer; }
.card-pad.wc-sec .wc-sec-head { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 0 0 10px; cursor: default; }
.card-pad.wc-sec { padding: 18px; display: grid; gap: 10px; }
.wc-sec-head b { font-size: 15px; }
.wc-sec-head small { margin-left: auto; }
.card-pad.wc-sec .wc-sec-head small { margin-left: 0; }
.wc-num { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--purple-50); color: var(--purple); font-size: 12px; font-weight: 800; flex: 0 0 auto; }
.wc-chev { color: var(--muted); transition: transform .2s; flex: 0 0 auto; }
.wc-sec.open .wc-chev { transform: rotate(180deg); }
.wc-fields { display: none; padding: 4px 18px 18px; border-top: 1px solid var(--line); }
.wc-sec.open .wc-fields { display: grid; gap: 12px; padding-top: 14px; }
.wc-field { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: #fff; }
.wc-field.is-edited { border-color: color-mix(in srgb, var(--gold) 60%, #fff); background: var(--gold-50); }
.wc-field.is-busy { opacity: .6; pointer-events: none; }
.wc-label { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); }
.wc-label b { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.wc-tools-inline { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.wc-tools-inline a, .wc-tools-inline button { font-size: 12px; font-weight: 700; color: var(--purple); background: none; border: 0; padding: 0; }
.wc-rev { color: var(--orange); }
.wc-was { font-size: 12px; color: var(--muted); }
.wc-img { flex-direction: row; align-items: flex-start; gap: 14px; }
.wc-img > img { width: 120px; height: 84px; object-fit: cover; border-radius: 10px; background: var(--line-2); flex: 0 0 auto; }
.wc-bar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 20px; background: var(--side); color: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); }
.wc-bar.hide { display: none; }
@media (min-width: 1100px) { .wc-bar { left: calc(50% + 132px); } }
@media (max-width: 900px) {
  .wc { grid-template-columns: 1fr; }
  .wc-pages { position: static; max-height: 240px; }
  .wc-img { flex-direction: column; }
  .wc-img > img { width: 100%; height: 160px; }
}

.brand-font-prev { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border-radius: 14px; background: var(--line-2); }
.brand-font-prev [data-fp-d] { font-size: 28px; color: var(--ink); line-height: 1.15; }
.brand-font-prev [data-fp-b] { font-size: 14px; color: var(--ink-2); }
