/* Vsha'z Glam Studio — luxe black & gold, taken from the round logo */
:root {
  color-scheme: dark;
  --bg: #0C0A08;
  --surface: #16130F;
  --surface-2: #1E1A14;
  --surface-3: #27211A;
  --text: #F4ECDD;
  --muted: #A3967F;
  --line: rgba(214, 178, 110, .16);
  --line-strong: rgba(214, 178, 110, .38);
  --gold: #D9B46A;
  --gold-soft: #EBD3A0;
  --gold-deep: #A9772A;
  --gold-grad: linear-gradient(135deg, #8C5E1E 0%, #C99A45 30%, #F3DA97 50%, #C99A45 70%, #8C5E1E 100%);
  --blush: #E6A99A;
  --ok: #7BC79A;
  --warn: #F0B866;
  --danger: #F08A80;
  /* names kept from the first version: "plum" = accent colour used in markup */
  --plum: var(--gold);
  --plum-soft: rgba(217, 180, 106, .10);
  --radius: 20px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-variant-numeric: lining-nums;
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 15px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .serif, .amt, .stat .val, .date-badge .d, .time { font-variant-numeric: lining-nums; }
h1, h2, h3, .serif { font-family: 'Playfair Display', Georgia, serif; font-weight: 600; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--gold); }
svg.i { width: 18px; height: 18px; flex: 0 0 auto; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }

/* Background: gold glow + tiled brushes, polish, nail file & clipper */
.bg-pattern {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 80% 45% at 50% -5%, rgba(217, 180, 106, .20), transparent 70%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(230, 169, 154, .08), transparent 70%),
    var(--bg);
}
.bg-pattern::after {
  content: ''; position: absolute; inset: 0; opacity: .09;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220' fill='none' stroke='%23D9B46A' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg transform='translate(30 20) rotate(-35)'%3E%3Cpath d='M0 0 C-10 -14 -9 -34 0 -46 C9 -34 10 -14 0 0Z'/%3E%3Crect x='-4' y='0' width='8' height='12' rx='1'/%3E%3Cpath d='M-3 12 L-2 56 L2 56 L3 12'/%3E%3C/g%3E%3Cg transform='translate(150 30)'%3E%3Crect x='-7' y='0' width='14' height='22' rx='2'/%3E%3Crect x='-10' y='22' width='20' height='5' rx='1'/%3E%3Crect x='-16' y='27' width='32' height='34' rx='8'/%3E%3Cpath d='M-9 38 C-6 34 6 34 9 38'/%3E%3C/g%3E%3Cg transform='translate(60 150) rotate(30)'%3E%3Crect x='-5' y='-40' width='10' height='80' rx='5'/%3E%3Cpath d='M-5 -24 L5 -20 M-5 -14 L5 -10 M-5 -4 L5 0 M-5 6 L5 10 M-5 16 L5 20'/%3E%3C/g%3E%3Cg transform='translate(170 150) rotate(-20)'%3E%3Cpath d='M-14 -26 L-6 20 L6 20 L14 -26'/%3E%3Cpath d='M-6 20 C-6 30 6 30 6 20'/%3E%3Cpath d='M-12 -10 L16 -34'/%3E%3Ccircle cx='0' cy='4' r='2'/%3E%3C/g%3E%3Cg transform='translate(108 105) rotate(20)'%3E%3Cpath d='M0 0 C-7 -8 -7 -22 0 -28 C7 -22 7 -8 0 0Z'/%3E%3Crect x='-3' y='0' width='6' height='9' rx='1'/%3E%3Cpath d='M-2 9 L-1 40 L1 40 L2 9'/%3E%3C/g%3E%3Cpath d='M108 190 c-3 -4 -9 -2 -9 3 c0 5 9 10 9 10 c0 0 9 -5 9 -10 c0 -5 -6 -7 -9 -3z'/%3E%3Cpath d='M15 95 l3 -6 l3 6 l-3 6z M200 95 l3 -6 l3 6 l-3 6z'/%3E%3C/svg%3E");
  background-size: 220px 220px;
}

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: calc(10px + var(--safe-t)) 16px 10px;
  background: rgba(12, 10, 8, .82);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-logo { width: 40px; height: 40px; border-radius: 50%; box-shadow: 0 0 0 1px var(--line-strong), 0 0 16px rgba(217,180,106,.25); }
.topbar-text { flex: 1; min-width: 0; }
.topbar-title { font-family: 'Playfair Display', serif; font-size: 18px; font-weight: 600; letter-spacing: .3px; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.topbar-sub { font-size: 9.5px; letter-spacing: 4px; color: var(--muted); margin-top: 1px; }
.icon-btn {
  border: 1px solid var(--line-strong); background: transparent; color: var(--gold);
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
  display: inline-grid; place-items: center; transition: background .2s;
}
.icon-btn:active { background: var(--plum-soft); }

.view { padding: 18px 16px calc(110px + var(--safe-b)); max-width: 760px; margin: 0 auto; animation: fade .25s ease-out; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Floating bottom tab bar */
.tabbar {
  position: fixed; left: 12px; right: 12px; bottom: calc(10px + var(--safe-b)); z-index: 20;
  max-width: 520px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(22, 19, 15, .92);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid var(--line-strong); border-radius: 22px;
  padding: 7px 4px;
  box-shadow: 0 12px 30px rgba(0,0,0,.55);
}
.tabbar button {
  border: 0; background: none; cursor: pointer; padding: 5px 0 3px; border-radius: 14px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 10.5px; color: var(--muted); letter-spacing: .3px; transition: color .2s;
}
.tabbar .ti svg.i { width: 22px; height: 22px; stroke-width: 1.5; }
.tabbar button.active { color: var(--gold-soft); }
.tabbar button.active .ti { color: var(--gold); filter: drop-shadow(0 0 6px rgba(217,180,106,.55)); }

/* Cards & layout */
.card {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px; margin-bottom: 14px; border: 1px solid var(--line);
}
.card h3.serif { color: var(--gold-soft) !important; }
.hero {
  position: relative; overflow: hidden; text-align: center; padding: 26px 18px 22px;
  background:
    radial-gradient(circle at 50% 30%, rgba(217,180,106,.18), transparent 60%),
    linear-gradient(180deg, #1D1812, #110E0B);
  border: 1px solid var(--line-strong);
}
.hero::before, .hero::after { content: ''; position: absolute; left: 18px; right: 18px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: .5; }
.hero::before { top: 10px; } .hero::after { bottom: 10px; }
.hero-logo { width: 132px; height: 132px; border-radius: 50%; display: block; margin: 0 auto 12px; box-shadow: 0 0 0 1px var(--line-strong), 0 0 40px rgba(217,180,106,.35); }
.hero .welcome { font-size: 11px; letter-spacing: 4px; text-transform: uppercase; color: var(--muted); margin: 0; }
.hero h1 { margin: 0 0 4px; font-family: 'Pinyon Script', 'Playfair Display', cursive; font-weight: 400; font-size: 50px; line-height: 1.15; }
.hero p { margin: 0; color: var(--muted); font-size: 13px; }
.gold-text { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.divider { display: flex; align-items: center; gap: 10px; justify-content: center; color: var(--gold); margin: 4px auto 8px; max-width: 220px; font-size: 10px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.divider::after { transform: scaleX(-1); }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.stat { background: linear-gradient(180deg, var(--surface-2), var(--surface)); border-radius: 18px; padding: 14px 15px; border: 1px solid var(--line); position: relative; overflow: hidden; }
.stat .lbl { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 1.2px; padding-right: 22px; }
.stat .val { font-family: 'Playfair Display', serif; font-size: 25px; font-weight: 600; color: var(--gold-soft); margin-top: 6px; line-height: 1.1; }
.stat .ico { position: absolute; right: 12px; top: 12px; color: var(--gold); opacity: .6; }
.stat .ico svg.i { width: 16px; height: 16px; }
.stat.plum { background: var(--gold-grad); border-color: transparent; box-shadow: 0 10px 24px rgba(169,119,42,.35); }
.stat.plum .lbl { color: rgba(30, 20, 8, .75); font-weight: 600; }
.stat.plum .val { color: #1A1208; }
.stat.plum .ico { color: #1A1208; opacity: .55; }

.section-title { display: flex; align-items: center; justify-content: space-between; margin: 22px 2px 12px; }
.section-title h3 { margin: 0; font-size: 19px; color: var(--gold-soft); display: flex; align-items: center; gap: 10px; }
.section-title h3::before { content: ''; width: 18px; height: 1px; background: var(--gold); }
.section-title .link { font-size: 12.5px; color: var(--gold); background: none; border: 0; cursor: pointer; font-weight: 500; letter-spacing: .3px; display: inline-flex; gap: 4px; align-items: center; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line-strong); border-radius: 14px; padding: 13px 16px; cursor: pointer; font-weight: 500;
  background: var(--surface-3); color: var(--gold-soft); text-decoration: none; font-size: 14px; letter-spacing: .2px;
  transition: transform .1s, filter .2s;
}
.btn:active { transform: scale(.98); }
.btn.gold { background: var(--gold-grad); color: #1A1208; border-color: transparent; font-weight: 600; box-shadow: 0 8px 20px rgba(169,119,42,.35); }
.btn.ghost { background: transparent; color: var(--gold-soft); }
.btn.wa { background: #173323; border-color: rgba(123,199,154,.45); color: #BFF0D2; }
.btn.danger { background: transparent; border-color: rgba(240,138,128,.4); color: var(--danger); }
.btn.small { padding: 8px 12px; font-size: 13px; border-radius: 11px; }
.btn.block { width: 100%; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-row .btn { flex: 1 1 auto; }
.fab {
  position: fixed; right: 20px; bottom: calc(94px + var(--safe-b)); z-index: 19;
  width: 58px; height: 58px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--gold-grad); color: #1A1208; display: grid; place-items: center;
  box-shadow: 0 10px 26px rgba(169,119,42,.55), 0 0 0 4px rgba(217,180,106,.12);
}
.fab svg.i { width: 26px; height: 26px; stroke-width: 2; }

/* Lists */
.list-item {
  display: flex; gap: 12px; align-items: center; padding: 13px 14px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border-radius: 18px; margin-bottom: 10px; cursor: pointer;
  border: 1px solid var(--line); transition: border-color .2s;
}
.list-item:active { border-color: var(--line-strong); }
.list-item .date-badge {
  flex: 0 0 52px; text-align: center; border-radius: 14px; padding: 7px 0; color: var(--gold-soft);
  background: rgba(217,180,106,.08); border: 1px solid var(--line-strong);
}
.date-badge .d { font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 600; line-height: 1.05; }
.date-badge .m { font-size: 9.5px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); }
.list-item .main { flex: 1; min-width: 0; }
.list-item .t1 { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.list-item .t2 { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .t2 svg.i { width: 13px; height: 13px; color: var(--gold); vertical-align: -2px; }
.list-item .right { text-align: right; font-size: 13px; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.amt { font-family: 'Playfair Display', serif; font-weight: 600; color: var(--gold-soft); font-size: 16px; }
.pill { display: inline-block; font-size: 9.5px; padding: 3px 8px; border-radius: 99px; font-weight: 600; letter-spacing: .8px; border: 1px solid; }
.pill.paid { color: var(--ok); border-color: rgba(123,199,154,.4); background: rgba(123,199,154,.08); }
.pill.dep { color: var(--warn); border-color: rgba(240,184,102,.4); background: rgba(240,184,102,.08); }
.pill.unpaid { color: var(--danger); border-color: rgba(240,138,128,.4); background: rgba(240,138,128,.08); }
.pill.done { color: var(--gold-soft); border-color: var(--line-strong); background: var(--plum-soft); }
.pill.cancel { color: #888; border-color: #444; }
.empty { text-align: center; color: var(--muted); padding: 28px 14px; font-size: 13.5px; border: 1px dashed var(--line); border-radius: 18px; }
.empty .big { color: var(--gold); margin-bottom: 8px; }
.empty .big svg.i { width: 34px; height: 34px; stroke-width: 1.2; }

/* Search / chips */
.search-wrap { position: relative; margin-bottom: 12px; }
.search-wrap > svg.i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--gold); }
.search { width: 100%; padding: 13px 14px 13px 42px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.search::placeholder { color: var(--muted); }
.search:focus { outline: none; border-color: var(--gold); }
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 99px; padding: 7px 14px; font-size: 12.5px; cursor: pointer; white-space: nowrap; letter-spacing: .2px; }
.chip svg.i { width: 14px; height: 14px; vertical-align: -2px; }
.chip.active { background: var(--gold-grad); color: #1A1208; border-color: transparent; font-weight: 600; }

/* Calendar */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cal-head h3 { margin: 0; font-size: 22px; color: var(--gold-soft); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal-dow { text-align: center; font-size: 10px; color: var(--muted); font-weight: 500; padding: 4px 0; letter-spacing: 1px; text-transform: uppercase; }
.cal-day {
  aspect-ratio: 1 / 1; border-radius: 12px; background: rgba(255,255,255,.025); border: 1px solid transparent;
  display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; font-size: 14px; position: relative; color: var(--text);
}
.cal-day.other { opacity: .25; }
.cal-day.today { border-color: var(--gold); color: var(--gold-soft); font-weight: 600; }
.cal-day.sel { background: var(--gold-grad); color: #1A1208; font-weight: 600; box-shadow: 0 6px 16px rgba(169,119,42,.4); }
.cal-day .dots { display: flex; gap: 2px; margin-top: 3px; height: 5px; }
.cal-day .dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); display: block; box-shadow: 0 0 5px rgba(217,180,106,.8); }
.cal-day.sel .dots i { background: #1A1208; box-shadow: none; }
.cal-day .cnt { position: absolute; top: 2px; right: 4px; font-size: 9px; color: var(--gold); font-weight: 700; }
.cal-day.sel .cnt { color: #1A1208; }

.timeline-item { display: flex; gap: 10px; margin-bottom: 10px; }
.timeline-item .time { flex: 0 0 58px; font-family: 'Playfair Display', serif; font-weight: 600; color: var(--gold); padding-top: 15px; font-size: 14px; text-align: right; }
.timeline-item .list-item { flex: 1; margin-bottom: 0; }

/* Forms */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 10.5px; font-weight: 500; color: var(--gold); margin-bottom: 6px; letter-spacing: 1.2px; text-transform: uppercase; }
.field input, .field select, .field textarea, .line-item input, .line-item select {
  width: 100%; padding: 12px 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); font-size: 15px;
}
.field textarea { min-height: 76px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .line-item input:focus, .line-item select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217,180,106,.15); }
input::placeholder, textarea::placeholder { color: #6E6455; }
input[type=file] { font-size: 13px; color: var(--muted); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row2 > * { min-width: 0; }
.field input, .field select { min-width: 0; max-width: 100%; }
input[type=date], input[type=time] { -webkit-appearance: none; appearance: none; min-height: 46px; }
@media (max-width: 340px) { .row2 { grid-template-columns: 1fr; gap: 0; } }
.hint { font-size: 11.5px; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.hint b { color: var(--gold-soft); font-weight: 500; }

.svc-picker { max-height: 270px; overflow-y: auto; border: 1px solid var(--line); border-radius: 16px; padding: 6px; background: var(--surface); margin-bottom: 10px; }
.svc-cat { font-size: 10.5px; font-weight: 600; letter-spacing: 2px; color: var(--gold); margin: 14px 6px 6px; text-transform: uppercase; }
.svc-opt { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 8px; border-radius: 11px; cursor: pointer; font-size: 14px; border-bottom: 1px solid rgba(214,178,110,.07); }
.svc-opt:last-child { border-bottom: 0; }
.svc-opt > span:first-child { min-width: 0; flex: 1 1 auto; }
.svc-opt:active { background: var(--plum-soft); }
.svc-opt .p { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.svc-opt .p button { border: 1px solid var(--line-strong); background: rgba(217,180,106,.08); color: var(--gold-soft); border-radius: 9px; padding: 5px 9px; font-size: 12.5px; cursor: pointer; font-weight: 500; }
.svc-opt .p button:active { background: var(--gold-grad); color: #1A1208; }

.line-item { border: 1px solid var(--line); border-radius: 16px; padding: 12px; margin-bottom: 8px; background: var(--surface-2); }
.line-item .li-top { display: flex; gap: 8px; align-items: center; }
.line-item .li-top input { flex: 1; }
.line-item .li-nums { display: grid; grid-template-columns: 70px 1fr auto; gap: 8px; margin-top: 8px; align-items: center; }
.line-item input, .line-item select { padding: 10px 11px; border-radius: 10px; font-size: 14.5px; }
.line-item .x { border: 1px solid rgba(240,138,128,.35); background: transparent; color: var(--danger); width: 38px; height: 38px; border-radius: 10px; cursor: pointer; flex: 0 0 38px; display: grid; place-items: center; }
.comp-toggle { font-size: 12px; display: flex; align-items: center; gap: 5px; white-space: nowrap; color: var(--muted); }
.comp-toggle input { width: auto !important; accent-color: var(--gold); }

.totals { background: linear-gradient(180deg, #221C14, #18140F); border: 1px solid var(--line-strong); border-radius: 16px; padding: 14px 16px; margin: 14px 0; }
.totals .r { display: flex; justify-content: space-between; padding: 4px 0; font-size: 14px; color: var(--muted); }
.totals .r b { color: var(--text); font-weight: 500; }
.totals .r.big { font-family: 'Playfair Display', serif; font-size: 20px; font-weight: 600; color: var(--gold-soft); border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; }

/* Bottom sheet */
.sheet { position: fixed; inset: 0; z-index: 50; }
.sheet.hidden { display: none; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .7); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: fadein .2s; }
@keyframes fadein { from { opacity: 0; } }
.sheet-panel {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 94vh; display: flex; flex-direction: column;
  background: linear-gradient(180deg, #1A1611, #0F0D0A); border-radius: 26px 26px 0 0;
  border: 1px solid var(--line-strong); border-bottom: 0;
  box-shadow: 0 -10px 40px rgba(0,0,0,.6);
  max-width: 760px; margin: 0 auto; animation: up .26s cubic-bezier(.2,.8,.2,1);
}
.sheet-panel::before { content: ''; width: 40px; height: 4px; border-radius: 4px; background: var(--line-strong); margin: 8px auto 0; flex: 0 0 auto; }
@keyframes up { from { transform: translateY(60px); opacity: .3; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 18px 12px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { margin: 0; font-size: 21px; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sheet-body { overflow-y: auto; padding: 16px 16px calc(28px + var(--safe-b)); }

.kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid rgba(214,178,110,.08); font-size: 14px; }
.kv .k { color: var(--muted); }
.kv .v { text-align: right; font-weight: 500; color: var(--text); }
.kv .v a { color: var(--gold-soft); text-decoration: none; }

.avatar { flex: 0 0 46px; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-family: 'Playfair Display', serif; font-size: 19px; font-weight: 600; color: #1A1208; background: var(--gold-grad); }

.toast {
  position: fixed; left: 50%; top: calc(70px + var(--safe-t)); transform: translateX(-50%) translateY(-20px);
  background: var(--surface-3); color: var(--gold-soft); border: 1px solid var(--line-strong);
  padding: 10px 18px; border-radius: 99px; font-size: 13.5px; box-shadow: 0 10px 30px rgba(0,0,0,.5);
  opacity: 0; pointer-events: none; transition: .25s; z-index: 60; max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%); }

/* ================= Home extras ================= */
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 6px; }
.quick button { border: 1px solid var(--line); background: linear-gradient(180deg, var(--surface-2), var(--surface)); color: var(--text); border-radius: 18px; padding: 12px 4px 10px; font-size: 11.5px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 7px; }
.quick button span { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #1A1208; background: var(--gold-grad); box-shadow: 0 6px 14px rgba(169,119,42,.3); }
.quick button:active { border-color: var(--line-strong); }
.actions { display: flex; flex-direction: column; gap: 8px; }
.action { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 16px; padding: 12px 14px; cursor: pointer; }
.action .a-ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; color: var(--gold); background: var(--plum-soft); flex: 0 0 36px; }
.action.warn .a-ic { color: var(--warn); background: rgba(240,184,102,.1); }
.action .a-txt { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.action .a-txt b { font-weight: 500; font-size: 14px; }
.action .a-txt small { color: var(--muted); font-size: 12px; }
.action > svg.i { color: var(--muted); }
.target-card { padding: 14px 16px; }
.target-top { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-bottom: 8px; letter-spacing: .3px; }
.target-top b { font-family: 'Playfair Display', serif; font-size: 16px; font-weight: 600; }
.list-sum { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin: 0 2px 10px; }
.list-sum b { color: var(--gold-soft); font-weight: 500; }

/* ================= Flow helpers ================= */
.cal-day .dots i.hollow { background: transparent; border: 1px solid var(--gold); box-shadow: none; width: 5px; height: 5px; box-sizing: border-box; }
.cal-day.sel .dots i.hollow { border-color: #1A1208; }
.cal-legend { display: flex; gap: 14px; justify-content: center; font-size: 11px; color: var(--muted); margin-top: 12px; }
.cal-legend span { display: inline-flex; align-items: center; gap: 5px; }
.cal-legend i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); display: inline-block; }
.cal-legend i.hollow { background: transparent; border: 1px solid var(--gold); }
.clash, .cust-note { display: flex; gap: 10px; align-items: flex-start; margin: -4px 0 14px; padding: 11px 13px; border-radius: 14px; font-size: 12.5px; line-height: 1.5; }
.clash { border: 1px solid rgba(240,184,102,.4); background: rgba(240,184,102,.08); color: var(--text); }
.clash > svg.i { color: var(--warn); margin-top: 2px; }
.clash b { color: var(--warn); font-weight: 500; display: block; }
.clash small { color: var(--muted); }
.cust-note { border: 1px solid var(--line-strong); background: var(--plum-soft); color: var(--text); }
.cust-note > svg.i { color: var(--gold); margin-top: 2px; }
.cust-note b { color: var(--gold-soft); font-weight: 500; }
.hint.notes { white-space: pre-line; margin-top: 10px; max-height: 220px; overflow-y: auto; }

/* ================= WhatsApp import ================= */
.wa-btn { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; margin-bottom: 16px; padding: 12px 14px; border-radius: 16px; cursor: pointer; border: 1px solid rgba(123,199,154,.4); background: linear-gradient(180deg, #17301F, #12251A); color: #D6F5E2; }
.wa-btn > svg.i:first-child { width: 22px; height: 22px; color: #7BC79A; }
.wa-btn span { flex: 1; display: flex; flex-direction: column; }
.wa-btn b { font-weight: 500; font-size: 14px; }
.wa-btn small { font-size: 11.5px; color: #9BC9AE; }
.wa-found { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 16px; padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(123,199,154,.4); background: rgba(123,199,154,.08); font-size: 13px; color: var(--text); }
.wa-found > svg.i { color: var(--ok); margin-top: 2px; }
.wa-found b { font-weight: 500; color: #BFF0D2; }
.wa-found small { color: var(--muted); }

/* ================= Reports ================= */
.period-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.period-label { font-size: 18px; color: var(--gold-soft); text-align: center; flex: 1; }
.icon-btn[disabled] { opacity: .25; pointer-events: none; }
.report-hero { text-align: center; padding: 22px 16px 16px; border-color: var(--line-strong); background: radial-gradient(circle at 50% 0%, rgba(217,180,106,.16), transparent 65%), linear-gradient(180deg, #1D1812, #110E0B); }
.report-hero .lbl, .hero-split .lbl { font-size: 10.5px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.big-num { font-family: 'Playfair Display', serif; font-weight: 600; font-size: 38px; line-height: 1.15; margin: 4px 0 6px; font-variant-numeric: lining-nums; }
.report-hero .sub { font-size: 11.5px; color: var(--muted); display: flex; gap: 6px; justify-content: center; align-items: center; flex-wrap: wrap; }
.delta { font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 99px; display: inline-block; }
.delta.up { color: var(--ok); background: rgba(123,199,154,.1); }
.delta.down { color: var(--danger); background: rgba(240,138,128,.1); }
.report-hero .target { margin: 14px 0 2px; text-align: left; }
.hero-split { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.hero-split > div { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.hero-split > div + div { border-left: 1px solid var(--line); }
.mid-num { font-family: 'Playfair Display', serif; font-size: 18px; font-weight: 600; color: var(--text); font-variant-numeric: lining-nums; }
.mid-num.neg { color: var(--danger); }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.mini-stats > div { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mini-stats b { font-family: 'Playfair Display', serif; font-weight: 600; color: var(--gold-soft); font-size: 16px; font-variant-numeric: lining-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-stats span { font-size: 10.5px; color: var(--muted); line-height: 1.3; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-head h3 { margin: 0; font-size: 17px; color: var(--gold-soft); }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 10px; padding: 2px; }
.seg button { border: 0; background: none; color: var(--muted); font-size: 12px; padding: 5px 10px; border-radius: 8px; cursor: pointer; }
.seg button.on { background: var(--gold-grad); color: #1A1208; font-weight: 600; }
.chart-box { position: relative; padding-top: 46px; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.ch-grid { stroke: rgba(214,178,110,.10); stroke-width: 1; }
.ch-axis { stroke: rgba(214,178,110,.35); stroke-width: 1; }
.ch-ylab, .ch-xlab { fill: var(--muted); font-size: 9px; font-family: 'Poppins', sans-serif; }
.ch-bar { fill: var(--gold); }
.ch-hit { fill: transparent; cursor: pointer; }
.ch-hit.on { fill: rgba(217,180,106,.08); }
.ch-tip { position: absolute; top: 0; left: 0; opacity: 0; pointer-events: none; transition: opacity .15s, left .15s; background: var(--surface-3); border: 1px solid var(--line-strong); border-radius: 10px; padding: 5px 10px; white-space: nowrap; box-shadow: 0 6px 16px rgba(0,0,0,.4); z-index: 2; }
.ch-tip .tt-h { font-size: 10.5px; color: var(--muted); }
.ch-tip .tt-v { font-weight: 600; color: var(--gold-soft); font-size: 13px; display: inline; }
.ch-tip .tt-s { font-size: 10.5px; color: var(--muted); display: inline; margin-left: 6px; }
.hb { margin-bottom: 11px; }
.hb:last-child { margin-bottom: 0; }
.hb-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; margin-bottom: 5px; }
.hb-k { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-v { color: var(--gold-soft); font-weight: 500; white-space: nowrap; }
.hb-v small { color: var(--muted); font-weight: 400; font-size: 11px; }
.hb-track { height: 6px; border-radius: 6px; background: rgba(214,178,110,.10); overflow: hidden; }
.hb-track.big { height: 9px; }
.hb-track i { display: block; height: 100%; border-radius: 6px; background: var(--gold-grad); }
.exp-list { margin-top: 12px; }
.exp-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid rgba(214,178,110,.08); cursor: pointer; }
.exp-row .t1 { font-size: 14px; }
.exp-row .t2 { font-size: 12px; color: var(--muted); }
.exp-row .btn.small { padding: 5px 8px; margin-top: 4px; }

/* ================= PIN lock ================= */
.lock { position: fixed; inset: 0; z-index: 100; background: radial-gradient(ellipse at 50% 20%, rgba(217,180,106,.18), transparent 60%), var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 20px; transition: opacity .25s; }
.lock.out { opacity: 0; }
.lock-logo { width: 110px; height: 110px; border-radius: 50%; box-shadow: 0 0 40px rgba(217,180,106,.35); }
.lock-title { font-size: 22px; margin-bottom: 6px; }
.lock-dots { display: flex; gap: 14px; margin: 8px 0 18px; }
.lock-dots i { width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid var(--gold); display: block; }
.lock-dots i.on { background: var(--gold); box-shadow: 0 0 8px rgba(217,180,106,.7); }
.lock.shake .lock-dots { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.keypad { display: grid; grid-template-columns: repeat(3, 72px); gap: 14px; }
.keypad button { width: 72px; height: 72px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); color: var(--gold-soft); font-size: 24px; font-family: 'Playfair Display', serif; cursor: pointer; }
.keypad button:active { background: var(--gold-grad); color: #1A1208; }
.keypad button[disabled] { visibility: hidden; }

/* ================= Printed sales report ================= */
.report-paper { color: #222; font-family: Arial, Helvetica, sans-serif; font-size: 11.5px; background: #fff; }
.report-paper .rp-head { display: flex; gap: 14px; align-items: center; border-bottom: 3px solid #C99A45; padding-bottom: 10px; margin-bottom: 14px; }
.report-paper .rp-head img { width: 64px; height: 64px; border-radius: 50%; }
.report-paper h1 { margin: 0; font-size: 20px; font-family: 'Playfair Display', Georgia, serif; }
.report-paper .muted { color: #888; font-size: 10.5px; }
.report-paper h3 { font-size: 13px; margin: 16px 0 6px; font-family: 'Playfair Display', Georgia, serif; color: #111; }
.rp-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 8px; }
.rp-kpis > div { border: 1px solid #E5D9C3; border-radius: 6px; padding: 8px 10px; }
.rp-kpis span { display: block; font-size: 9.5px; color: #8C7A5C; text-transform: uppercase; letter-spacing: 1px; }
.rp-kpis b { font-size: 16px; }
.rp-kpis.small b { font-size: 13px; }
.rp-kpis .hl { background: #111; color: #fff; border-color: #111; }
.rp-kpis .hl span { color: #D9B46A; }
.rp-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rp-table { width: 100%; border-collapse: collapse; }
.rp-table th { background: #111; color: #fff; text-align: left; padding: 5px 6px; font-size: 10.5px; }
.rp-table td { padding: 5px 6px; border-bottom: 1px solid #EEE6D8; }
.rp-table tr:nth-child(even) td { background: #FAF6EE; }
.rp-table .n { text-align: right; white-space: nowrap; }
.rp-table tr { break-inside: avoid; }

/* ================= INVOICE — stays on white paper for printing ================= */
.invoice { --plum: #111111; --plum-soft: #F5EEE2; background: #fff; color: #222; font-family: Arial, Helvetica, sans-serif; font-size: 12px; padding: 18px; border-radius: 6px; }
.inv-band { background: var(--plum); color: #fff; text-align: center; font-size: 30px; padding: 6px 0; letter-spacing: 1px; border-bottom: 3px solid #C99A45; }
.inv-sub { text-align: center; color: #8C5E1E; font-style: italic; font-weight: 700; margin: 6px 0 14px; font-size: 12px; }
.inv-logo { display: block; width: 92px; margin: 0 auto 6px; }
.inv-top { display: grid; grid-template-columns: 1.1fr 1fr; gap: 12px; margin-bottom: 12px; }
.inv-top .addr div { margin-bottom: 5px; }
.inv-meta { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; }
.inv-meta b { font-weight: 700; }
.inv-bar { background: var(--plum); color: #fff; font-weight: 700; padding: 6px 10px; font-size: 13px; }
.inv-bill { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 8px 10px 12px; }
.inv-bill .acc { text-align: center; margin-top: 8px; }
.inv-table { width: 100%; border-collapse: collapse; margin-top: 4px; }
.inv-table th { background: var(--plum); color: #fff; font-weight: 700; padding: 7px 4px; font-size: 12px; }
.inv-table td { padding: 7px 4px; text-align: center; }
.inv-table tbody tr:nth-child(even) td { background: var(--plum-soft); }
.inv-table td.desc { font-weight: 700; }
.inv-table td.num { text-align: right; padding-right: 10px; white-space: nowrap; }
.inv-table td.desc.comp, .inv-table td.desc.extra { color: #C62AC6; font-family: 'Times New Roman', serif; }
.inv-table tr.comp-head td { color: #E00000; font-weight: 700; }
.inv-tick { color: #3E8E5E; }
.inv-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; align-items: end; }
.inv-bottom .note div { margin-bottom: 10px; }
.inv-sum .r { display: flex; justify-content: space-between; padding: 5px 10px; }
.inv-sum .r b { font-weight: 700; }
.inv-sum .bal { background: var(--plum); color: #fff; font-weight: 700; font-size: 13px; }
.inv-paidstamp { display: inline-block; border: 2px solid #3E8E5E; color: #3E8E5E; padding: 2px 10px; font-weight: 700; transform: rotate(-6deg); letter-spacing: 2px; margin-top: 8px; }
.inv-policy { margin-top: 26px; page-break-before: always; break-before: page; }
.inv-policy h4 { font-family: 'Arial Black', Arial, sans-serif; font-size: 15px; margin: 0 0 8px; letter-spacing: .3px; }
.inv-policy p { margin: 0 0 8px; font-size: 11px; line-height: 1.45; }
.inv-sign div { margin-top: 12px; font-weight: 700; font-size: 11px; }
.inv-wrap { overflow: hidden; border-radius: 8px; box-shadow: 0 0 0 1px var(--line-strong), 0 14px 30px rgba(0,0,0,.5); }
.inv-wrap .invoice { width: 720px; }

.print-area { display: none; }
@media print {
  @page { size: A4; margin: 10mm; }
  :root { color-scheme: light; }
  body { background: #fff; }
  body > *:not(.print-area) { display: none !important; }
  .print-area { display: block !important; }
  .print-area .invoice { width: auto; padding: 0; border-radius: 0; zoom: 1 !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

@media (min-width: 640px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
}
