/* OfisiMtandao design system — flat, quiet, data-dense. No build step required. */
:root {
  --brand: #0F766E; --brand-600: #115E59; --brand-50: #F0FDFA; --brand-100: #CCFBF1;
  --amber: #B45309; --amber-50: #FFFBEB; --amber-100: #FEF3C7;
  --bg: #FFFFFF; --bg-2: #F5F5F7; --bg-3: #F9FAFB;
  --line: #E5E7EB; --line-2: #F0F1F3;
  --ink: #1A1A1A; --ink-2: #4B5563; --ink-3: #6B7280; --ink-4: #9CA3AF;
  --success: #16A34A; --success-50: #F0FDF4;
  --danger: #DC2626; --danger-50: #FEF2F2;
  --info: #2563EB; --info-50: #EFF6FF;
  --warning: #CA8A04; --warning-50: #FEFCE8;
  --side: #111827; --side-2: #1F2937; --side-ink: #E5E7EB; --side-ink-2: #9CA3AF;
  /* Per-business accent, overridden inline on <body> from config. */
  --v: #0F766E; --v-accent: #B45309; --v-soft: #F0FDFA;
  --radius: 12px; --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.08); --shadow-lg: 0 8px 24px rgba(0,0,0,.08);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --head: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--ink); background: var(--bg-2); }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-600); }
h1, h2, h3, h4 { font-family: var(--head); margin: 0; line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: 24px; font-weight: 700; } h2 { font-size: 20px; font-weight: 700; } h3 { font-size: 16px; font-weight: 600; } h4 { font-size: 14px; font-weight: 600; }
p { margin: 0 0 8px; }
small, .small { font-size: 12px; }
.muted { color: var(--ink-3); } .faint { color: var(--ink-4); }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
[x-cloak] { display: none !important; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg.i-sm { width: 15px; height: 15px; }

/* ---------- App shell ---------- */
.shell { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.sidebar { background: var(--side); color: var(--side-ink); position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; overflow-y: auto; z-index: 40; }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 18px 20px 14px; }
.logo { width: 32px; height: 32px; border-radius: 9px; background: var(--brand); display: grid; place-items: center; color: #fff; font-weight: 800; font-family: var(--head); font-size: 15px; }
.side-brand b { font-family: var(--head); font-size: 16px; color: #fff; display: block; }
.side-brand span { font-size: 11px; color: var(--side-ink-2); }
.side-biz { margin: 4px 12px 8px; padding: 10px 12px; border-radius: 10px; background: var(--side-2); display: flex; gap: 10px; align-items: center; }
.side-biz .dot { width: 30px; height: 30px; border-radius: 8px; background: var(--v); display: grid; place-items: center; color: #fff; }
.side-biz b { font-size: 13px; color: #fff; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.side-biz span { font-size: 11px; color: var(--side-ink-2); }
.side-sec { padding: 14px 20px 6px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #6B7280; }
.side-link { display: flex; align-items: center; gap: 10px; margin: 1px 10px; padding: 8px 12px; border-radius: 8px; color: var(--side-ink); font-size: 13.5px; font-weight: 500; position: relative; }
.side-link:hover { background: var(--side-2); color: #fff; }
.side-link.active { background: var(--side-2); color: #fff; }
.side-link.active::before { content: ''; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--v); }
.side-link.active svg { color: var(--v-side, #5EEAD4); }
.side-link .tag { margin-left: auto; font-size: 10px; padding: 1px 6px; border-radius: 6px; background: rgba(180,83,9,.25); color: #FCD34D; font-weight: 600; }
.side-foot { margin-top: auto; padding: 12px; border-top: 1px solid var(--side-2); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; height: 60px; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 0 24px; }
.topbar .grow { flex: 1; }
.menu-btn { display: none; }
.content { padding: 24px; max-width: 1440px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; color: var(--ink-3); }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }

.branch-switch { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 0 4px 0 10px; height: 36px; background: #fff; }
.branch-switch select { border: 0; height: 34px; font: inherit; font-weight: 500; background: transparent; outline: none; color: var(--ink); max-width: 200px; }
.branch-lock { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); background: var(--bg-2); border-radius: 8px; padding: 6px 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.icon-btn { position: relative; width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; color: var(--ink-2); border: 1px solid transparent; background: none; cursor: pointer; }
.icon-btn:hover { background: var(--bg-2); color: var(--ink); }
.icon-btn .pip { position: absolute; top: 6px; right: 7px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; }
.dropdown { position: relative; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 50; }
.dropdown-menu a, .dropdown-menu button { display: flex; width: 100%; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 6px; color: var(--ink); font: inherit; background: none; border: 0; cursor: pointer; text-align: left; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--bg-2); }
.dropdown-menu .sep { height: 1px; background: var(--line); margin: 6px 0; }

/* ---------- Cards & grids ---------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.card-head h3 { font-size: 15px; }
.card-head .sub { font-size: 12px; color: var(--ink-3); font-weight: 400; }
.card-body { padding: 16px 20px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0,1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.g-2-1 { grid-template-columns: minmax(0,2fr) minmax(0,1fr); } .g-1-2 { grid-template-columns: minmax(0,1fr) minmax(0,2fr); }
.mt { margin-top: 16px; } .mt-lg { margin-top: 24px; } .mb { margin-bottom: 16px; }
.row { display: flex; align-items: center; gap: 8px; } .row-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; } .wrap { flex-wrap: wrap; }
.stack > * + * { margin-top: 12px; }

.stat { padding: 16px 18px; }
.stat .label { font-size: 12.5px; color: var(--ink-3); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.stat .value { font-family: var(--head); font-size: 24px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.stat .foot { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.stat .ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--v-soft); color: var(--v); margin-left: auto; }
.stat.alert .value { color: var(--danger); } .stat.warn .value { color: var(--amber); } .stat.good .value { color: var(--success); }
.up { color: var(--success); } .down { color: var(--danger); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid transparent; font: inherit; font-weight: 500; font-size: 13.5px; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s; text-decoration: none; }
.btn-primary { background: var(--brand); color: #fff; } .btn-primary:hover { background: var(--brand-600); color: #fff; }
.btn-secondary { background: #fff; border-color: var(--line); color: var(--ink); } .btn-secondary:hover { background: var(--bg-3); border-color: #D1D5DB; color: var(--ink); }
.btn-danger { background: var(--danger); color: #fff; } .btn-danger:hover { background: #B91C1C; color: #fff; }
.btn-ghost { background: transparent; color: var(--ink-2); } .btn-ghost:hover { background: var(--bg-2); color: var(--ink); }
.btn-amber { background: var(--amber); color: #fff; } .btn-amber:hover { background: #92400E; color: #fff; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 15px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; cursor: pointer; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.input, .select, .textarea { width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; color: var(--ink); background: #fff; outline: none; transition: border-color .12s, box-shadow .12s; }
.textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15,118,110,.12); }
.input-lg { height: 44px; font-size: 15px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--brand); width: 16px; height: 16px; }
.help { font-size: 12px; color: var(--ink-3); }
.error { font-size: 12px; color: var(--danger); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }
.search { position: relative; } .search svg { position: absolute; left: 10px; top: 10px; color: var(--ink-4); } .search .input { padding-left: 34px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 13px; cursor: pointer; color: var(--ink-2); user-select: none; }
.chip input { display: none; }
.chip.on, .chip:has(input:checked) { border-color: var(--brand); background: var(--brand-50); color: var(--brand); font-weight: 500; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-weight: 600; font-size: 12px; color: var(--ink-3); background: var(--bg-3); padding: 10px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tbody tr:hover { background: var(--bg-3); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .r { text-align: right; } .table .c { text-align: center; }
.table-compact td, .table-compact th { padding: 8px 14px; }

/* ---------- Badges & alerts ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600; background: var(--bg-2); color: var(--ink-2); white-space: nowrap; }
.b-success { background: var(--success-50); color: #15803D; } .b-danger { background: var(--danger-50); color: #B91C1C; }
.b-warning { background: var(--warning-50); color: #A16207; } .b-info { background: var(--info-50); color: #1D4ED8; }
.b-brand { background: var(--brand-50); color: var(--brand); } .b-amber { background: var(--amber-50); color: var(--amber); }
.b-v { background: var(--v-soft); color: var(--v); }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; border: 1px solid; font-size: 13.5px; margin-bottom: 16px; }
.alert-success { background: var(--success-50); border-color: #BBF7D0; color: #166534; }
.alert-error { background: var(--danger-50); border-color: #FECACA; color: #991B1B; }
.alert-warning { background: var(--amber-50); border-color: #FDE68A; color: #92400E; }
.alert-info { background: var(--info-50); border-color: #BFDBFE; color: #1E40AF; }

/* ---------- Lists & misc ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 11px 20px; border-bottom: 1px solid var(--line-2); }
.list li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .t { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list .s { font-size: 12px; color: var(--ink-3); }
.bar { height: 6px; border-radius: 3px; background: var(--bg-2); overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--v); border-radius: 3px; }
.empty { text-align: center; padding: 40px 20px; }
.empty .ico { width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 12px; background: var(--bg-2); display: grid; place-items: center; color: var(--ink-3); }
.empty h3 { font-size: 15px; } .empty p { color: var(--ink-3); max-width: 360px; margin: 6px auto 16px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--ink-3); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.on { color: var(--ink); border-color: var(--brand); }
.tabs a .badge { margin-left: 4px; height: 18px; }
.chart-box { position: relative; height: 260px; } .chart-box.sm { height: 200px; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--ink-3); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 12px; font-size: 13.5px; } .kv dt { color: var(--ink-3); } .kv dd { margin: 0; }
.pagination { display: flex; gap: 4px; justify-content: flex-end; padding: 12px 16px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 32px; height: 32px; padding: 0 8px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 7px; color: var(--ink-2); font-size: 13px; background: #fff; }
.pagination .on { background: var(--brand); color: #fff; border-color: var(--brand); } .pagination .off { opacity: .45; }
dialog.modal { border: 0; border-radius: 14px; padding: 0; width: min(560px, calc(100vw - 32px)); box-shadow: 0 20px 50px rgba(0,0,0,.2); }
dialog.modal::backdrop { background: rgba(17,24,39,.45); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 20px; max-height: 70vh; overflow-y: auto; }
.ai-answer { white-space: pre-wrap; line-height: 1.65; }
.pill-ai { background: var(--amber-50); color: var(--amber); border: 1px solid var(--amber-100); }

/* ---------- POS ---------- */
.pos { display: grid; grid-template-columns: minmax(0,1fr) 380px; gap: 16px; align-items: start; }
.pos-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.pos-item { text-align: left; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 12px; cursor: pointer; font: inherit; color: inherit; transition: border-color .12s, box-shadow .12s; }
.pos-item:hover { border-color: var(--v); box-shadow: 0 0 0 3px var(--v-soft); }
.pos-item b { display: block; font-size: 13.5px; } .pos-item .var { font-size: 12px; color: var(--ink-3); }
.pos-item .price { margin-top: 8px; font-weight: 700; font-family: var(--head); white-space: nowrap; }
.pos-item .row-between { gap: 6px; align-items: flex-end; }
.cart { position: sticky; top: 76px; }
.cart-line { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.qty button { width: 28px; height: 28px; border: 0; background: var(--bg-3); cursor: pointer; font-size: 15px; }
.qty input { width: 44px; height: 28px; border: 0; text-align: center; font: inherit; outline: none; }
.total-row { display: flex; justify-content: space-between; padding: 6px 0; } .total-row.big { font-size: 18px; font-weight: 700; font-family: var(--head); border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; }

/* ---------- Calendar (salon) ---------- */
.appt { border-left: 3px solid var(--v); padding: 10px 12px; border-radius: 8px; background: var(--bg-3); }
.timeline { display: grid; gap: 8px; }

/* ---------- Public site ---------- */
.site-nav { display: flex; align-items: center; gap: 16px; padding: 16px 0; }
.wrap-site { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.hero { padding: 56px 0 40px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { font-size: 46px; line-height: 1.08; letter-spacing: -0.03em; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero p.lead { font-size: 17px; color: var(--ink-2); margin: 18px 0 26px; max-width: 520px; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--brand); background: var(--brand-50); border: 1px solid var(--brand-100); padding: 4px 10px; border-radius: 999px; margin-bottom: 18px; }
.section { padding: 56px 0; } .section h2 { font-size: 30px; letter-spacing: -0.02em; } .section .lead { color: var(--ink-3); font-size: 16px; margin-top: 8px; }
.vert-card { padding: 22px; border-radius: 14px; border: 1px solid var(--line); background: #fff; position: relative; overflow: hidden; }
.vert-card .vi { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; color: #fff; margin-bottom: 14px; }
.vert-card ul { margin: 12px 0 0; padding: 0; list-style: none; color: var(--ink-2); font-size: 13px; }
.vert-card li { padding: 3px 0; display: flex; gap: 6px; align-items: center; }
.plan { padding: 26px; border-radius: 14px; border: 1px solid var(--line); background: #fff; }
.plan.featured { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }
.plan .price { font-family: var(--head); font-size: 32px; font-weight: 800; margin: 10px 0 4px; letter-spacing: -0.02em; }
.plan ul { list-style: none; padding: 0; margin: 18px 0 22px; } .plan li { display: flex; gap: 8px; padding: 5px 0; font-size: 13.5px; color: var(--ink-2); }
.preview { border-radius: 16px; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow-lg); overflow: hidden; }
.preview-bar { height: 34px; background: var(--side); display: flex; align-items: center; gap: 6px; padding: 0 12px; }
.preview-bar i { width: 9px; height: 9px; border-radius: 50%; background: #374151; }
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; background: #fff; }
.auth-side { background: var(--side); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-side h2 { font-size: 28px; color: #fff; letter-spacing: -0.02em; max-width: 420px; }
.auth-form { display: grid; place-items: center; padding: 40px 24px; }
.auth-form .box { width: 100%; max-width: 400px; }
.biz-option { display: block; cursor: pointer; }
.biz-option input { position: absolute; opacity: 0; }
.biz-option .inner { border: 1.5px solid var(--line); border-radius: 14px; padding: 18px; display: flex; gap: 14px; align-items: flex-start; transition: border-color .12s, box-shadow .12s; background: #fff; height: 100%; }
.biz-option input:checked + .inner { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-50); }
.biz-option input:focus-visible + .inner { outline: 2px solid var(--brand); outline-offset: 2px; }
.footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--ink-3); font-size: 13px; }

/* ---------- Responsive ---------- */
/* ---------- Automation builder ---------- */
.auto-card { display: flex; gap: 16px; align-items: flex-start; padding: 16px 20px; }
.auto-card.is-off { background: var(--bg-3); }
.auto-card.is-off .auto-flow { opacity: .6; }
.auto-main { flex: 1; min-width: 0; }
.auto-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.auto-title h3 { font-size: 15px; }
.auto-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0 8px; }
.flow-step { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 3px 10px; border-radius: 6px; font-size: 12.5px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); max-width: 100%; }
.flow-step.when { border-color: #99F6E4; background: var(--brand-50); color: var(--brand); font-weight: 500; }
.flow-step.if { border-color: #BFDBFE; background: var(--info-50); color: #1E40AF; }
.flow-step.then { border-color: var(--amber-100); background: var(--amber-50); color: var(--amber); }
.flow-arrow { color: var(--ink-4); font-size: 13px; }
.auto-meta { font-size: 12px; }
.auto-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.switch { position: relative; width: 38px; height: 22px; border-radius: 999px; border: 0; background: #D1D5DB; cursor: pointer; padding: 0; transition: background .15s; }
.switch span { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: left .15s; }
.switch.on { background: var(--brand); } .switch.on span { left: 19px; }
.recipe { display: flex; flex-direction: column; }
.recipe .card-body { flex: 1; }
.recipe h3 { font-size: 14.5px; }
.recipe-ico { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--v-soft); color: var(--v); flex-shrink: 0; }
.recipe-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line-2); }
.log-line { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: baseline; min-width: 220px; } .log-line + .log-line { margin-top: 4px; }
.step-no { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 12px; color: #fff; margin-right: 6px; }
.step-no.when { background: var(--brand); } .step-no.if { background: #2563EB; } .step-no.then { background: var(--amber); }
.step-card .card-head h3 { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.cond-row { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(0,1fr) minmax(0,1fr) auto; gap: 8px; align-items: center; }
.action-box { border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: var(--bg-3); }
.action-box .input, .action-box .select, .action-box .textarea { background: #fff; }
.builder-side { position: sticky; top: 76px; align-self: start; }
.preview-msg { border: 1px solid var(--line); border-radius: 10px; padding: 12px; font-size: 13px; }
.preview-subject { font-weight: 600; margin-top: 6px; }
.preview-body { white-space: pre-line; margin-top: 6px; color: var(--ink-2); }
@media (max-width: 960px) { .builder-side { position: static; } }
@media (max-width: 640px) {
    .auto-card { flex-direction: column; }
    .auto-actions { width: 100%; justify-content: space-between; }
    .cond-row { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
    .cond-row .input { grid-column: 1 / -1; }
}

/* ---------- Product photos ---------- */
.pos-item { display: flex; flex-direction: column; }
.pos-img { aspect-ratio: 4 / 3; margin: -12px -12px 10px; border-radius: 10px 10px 0 0; background: var(--v-soft); color: var(--v); display: grid; place-items: center; overflow: hidden; font-family: var(--head); font-weight: 700; font-size: 22px; }
.pos-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pos-item .row-between { margin-top: auto; }
.thumb { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; display: block; border: 1px solid var(--line-2); }
.thumb-sm { width: 34px; height: 34px; flex-shrink: 0; }
.thumb-empty { display: grid; place-items: center; background: var(--bg-2); color: var(--ink-4); }
.photo-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 110px; border: 1.5px dashed var(--line); border-radius: 10px; color: var(--ink-3); cursor: pointer; font-size: 13px; text-align: center; padding: 12px; }
.photo-drop:hover { border-color: var(--v); color: var(--v); }
.photo-drop input { display: none; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.photo { position: relative; aspect-ratio: 1 / 1; border-radius: 8px; overflow: hidden; border: 1px solid var(--line-2); background: var(--bg-3); }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo .badge { position: absolute; left: 6px; top: 6px; }
.photo-actions { position: absolute; right: 4px; bottom: 4px; display: flex; gap: 4px; }
.photo-actions .icon-btn { width: 28px; height: 28px; background: rgba(255,255,255,.92); border-radius: 6px; }
.photo-mini { position: relative; width: 40px; height: 40px; border: 1.5px dashed var(--line); border-radius: 8px; display: grid; place-items: center; cursor: pointer; overflow: hidden; color: var(--ink-4); }
.photo-mini input { display: none; }
.photo-mini img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.variant-table td { padding: 8px 10px; }
.variant-table .input { height: 34px; min-width: 70px; }

@media (max-width: 1180px) { .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); } .pos { grid-template-columns: minmax(0,1fr); } .cart { position: static; } }
@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0,1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 272px; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
  .menu-btn { display: grid; }
  .g3, .g-2-1, .g-1-2 { grid-template-columns: minmax(0,1fr); }
  .hero { grid-template-columns: 1fr; padding-top: 28px; } .hero h1 { font-size: 34px; }
  .auth-wrap { grid-template-columns: minmax(0,1fr); } .auth-side { display: none; }
  .topbar { padding: 0 16px; } .content { padding: 16px; }
  .hide-md { display: none !important; }
}
@media (max-width: 640px) {
  .g2, .g4, .form-grid { grid-template-columns: minmax(0,1fr); }
  .stat .value { font-size: 20px; } .page-head h1 { font-size: 20px; }
  .hide-sm { display: none !important; } .wrap-site { padding: 0 16px; }
  .topbar { gap: 4px; padding: 0 12px; } .branch-switch { min-width: 0; padding-left: 8px; } .branch-switch select { max-width: 118px; } .branch-lock { max-width: 130px; overflow: hidden; white-space: nowrap; }
  .content { padding: 12px; } .page-head .actions { width: 100%; } .site-nav { gap: 6px; flex-wrap: wrap; }
  .kv { grid-template-columns: minmax(0,1fr); }
}
.backdrop { position: fixed; inset: 0; background: rgba(17,24,39,.4); z-index: 35; }
@media print {
  .sidebar, .topbar, .no-print { display: none !important; }
  .shell { display: block; } body { background: #fff; } .card { box-shadow: none; border: 0; }
}

/* ---------- AI training / Instagram autopilot ---------- */
.faq-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 6px 8px; padding-bottom: 12px; border-bottom: 1px solid var(--line-2); }
.faq-row .input { grid-column: 1; } .faq-row .textarea { grid-column: 1; } .faq-row .btn { grid-column: 2; grid-row: 1; }
.autopilot-box { border: 1px solid var(--amber-100); background: var(--amber-50); border-radius: 10px; padding: 12px; }
.parent-row td { border-bottom-color: transparent; }
.variant-row td { background: var(--bg-3); padding-top: 7px; padding-bottom: 7px; }
.variant-attrs { display: inline-block; padding: 2px 8px; border-radius: 6px; background: #fff; border: 1px solid var(--line); font-size: 12.5px; font-weight: 500; }
dialog.modal.modal-wide { width: min(920px, calc(100vw - 32px)); max-width: none; }
.verify-banner { align-items: center; } .verify-banner form { margin: 0; }
.cat-list { max-height: 360px; overflow: auto; } .cat-row { display: flex; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line-2); } .cat-row:last-child { border-bottom: 0; }
.quick-customer { margin-top: 8px; padding: 10px; border: 1px dashed var(--line); border-radius: 8px; background: var(--bg-3); }

/* ---------- Toasts (pill, spring animation) ---------- */
.om-toasts { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; width: min(440px, calc(100vw - 24px)); }
.om-toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; max-width: 100%; padding: 8px 10px 8px 8px; border-radius: 999px; background: #111827; color: #F9FAFB; box-shadow: 0 10px 30px rgba(17,24,39,.28), 0 0 0 1px rgba(255,255,255,.06) inset; cursor: pointer;
    opacity: 0; transform: translateY(-18px) scale(.86); transition: transform .55s cubic-bezier(.34,1.56,.64,1), opacity .25s ease, border-radius .35s ease, padding .35s ease; }
.om-toast.in { opacity: 1; transform: none; }
.om-toast.out { opacity: 0; transform: translateY(-10px) scale(.9); transition: transform .3s ease, opacity .25s ease; }
.om-toast-ico { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; }
.om-toast-ico svg, .om-toast-x svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.om-success .om-toast-ico { background: rgba(34,197,94,.18); color: #4ADE80; }
.om-error .om-toast-ico { background: rgba(239,68,68,.2); color: #F87171; }
.om-warning .om-toast-ico { background: rgba(245,158,11,.2); color: #FBBF24; }
.om-info .om-toast-ico { background: rgba(45,212,191,.18); color: #5EEAD4; }
.om-toast-text { display: flex; flex-direction: column; min-width: 0; font-size: 13.5px; line-height: 1.3; }
.om-toast-text b { font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.om-toast-text span { color: #D1D5DB; font-size: 12.5px; max-height: 0; overflow: hidden; transition: max-height .35s ease, margin .35s ease; }
.om-toast.open { border-radius: 18px; padding: 10px 12px 10px 10px; }
.om-toast.open .om-toast-text b { white-space: normal; }
.om-toast.open .om-toast-text span, .om-toast.in .om-toast-text span { max-height: 80px; margin-top: 2px; }
.om-toast-x { margin-left: auto; flex-shrink: 0; width: 24px; height: 24px; border: 0; border-radius: 50%; background: transparent; color: #9CA3AF; display: grid; place-items: center; cursor: pointer; }
.om-toast-x:hover { background: rgba(255,255,255,.08); color: #fff; }
.sound-toggle.off { opacity: .55; }
@media (prefers-reduced-motion: reduce) { .om-toast { transition: opacity .2s ease; transform: none; } }
.insurance-box { border: 1px solid var(--info-50); background: var(--info-50); border-radius: 10px; padding: 12px; }
.member-box { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--v); background: var(--v-soft); border-radius: 10px; cursor: pointer; } .d-block { display: block; }
.kanban { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.kanban-col { background: var(--bg-3); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.kanban-head { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 4px; font-size: 13px; }
.kanban-card { padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.measure-chips { display: flex; flex-wrap: wrap; gap: 4px; } .measure-chips span { font-size: 11px; background: var(--bg-2); border-radius: 5px; padding: 1px 6px; color: var(--ink-2); }
/* ---------- Public online shop ---------- */
body.shop { background: var(--bg-3, #F9FAFB); }
.shop-wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.shop-head { background: #fff; border-bottom: 1px solid var(--line); padding: 12px 0; position: sticky; top: 0; z-index: 20; }
.shop-name { font-family: var(--head); font-size: 18px; color: var(--v); }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.shop-card { overflow: hidden; display: flex; flex-direction: column; }
.shop-img { aspect-ratio: 1 / 1; background: var(--v-soft); color: var(--v); display: grid; place-items: center; font-family: var(--head); font-weight: 700; font-size: 28px; }
.shop-img img { width: 100%; height: 100%; object-fit: cover; }
.shop-card .price { font-family: var(--head); font-weight: 700; font-size: 17px; }
.shop-cart { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); background: #fff; z-index: 40; padding: 18px; overflow-y: auto; box-shadow: -10px 0 40px rgba(0,0,0,.15); }
.shop-cart-backdrop { position: fixed; inset: 0; background: rgba(17,24,39,.4); z-index: 39; }
.shop-foot { padding: 30px 16px; text-align: center; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.order-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.heat { border-collapse: separate; border-spacing: 3px; font-size: 11px; color: var(--ink-3); }
.heat th { font-weight: 500; padding: 0 2px; text-align: right; } .heat thead th { text-align: center; }
.heat td { width: 22px; height: 22px; border-radius: 4px; }
.admin-bar { background: #111827; padding: 12px 0; }
.admin-link { color: #D1D5DB; padding: 6px 10px; border-radius: 7px; font-size: 13.5px; } .admin-link:hover, .admin-link.on { background: rgba(255,255,255,.1); color: #fff; }

/* ---------- Receipt: thermal paper, barcode, "printing" animation ---------- */
.receipt-stage { position: relative; max-width: 440px; margin: 0 auto; padding-top: 4px; }
.receipt-paper { position: relative; background: #fff; padding: 26px 24px 30px; border: 1px solid var(--line); border-radius: 4px; box-shadow: 0 18px 40px -18px rgba(17,24,39,.35);
    overflow: hidden; }
.receipt-paper::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 10px; background: linear-gradient(-45deg, var(--bg-2) 5px, transparent 0) 0 0/10px 10px repeat-x, linear-gradient(45deg, var(--bg-2) 5px, transparent 0) 0 0/10px 10px repeat-x; }
.receipt-cut { border-top: 1px dashed var(--line); margin: 14px 0; }
.receipt-kv { grid-template-columns: 110px 1fr !important; }
.receipt-items { font-size: 13px; } .receipt-items th:first-child, .receipt-items td:first-child { padding-left: 0; } .receipt-items th:last-child, .receipt-items td:last-child { padding-right: 0; }
.receipt-barcode { margin-top: 18px; text-align: center; } .receipt-barcode .barcode { width: 100%; max-width: 300px; height: auto; display: block; margin: 0 auto 6px; }
.receipt-stamp { position: absolute; right: 18px; top: 92px; transform: rotate(-14deg); border: 3px solid #15803D; color: #15803D; font: 800 20px/1 var(--head); letter-spacing: 3px; padding: 6px 12px; border-radius: 8px; opacity: .8; pointer-events: none; }
.receipt-stamp.owing { border-color: #B45309; color: #B45309; }
.printer-slot { position: relative; height: 18px; margin: 0 -14px -9px; border-radius: 12px; background: linear-gradient(#374151, #111827); box-shadow: 0 6px 14px rgba(0,0,0,.25); z-index: 2; }
.printer-slot span { position: absolute; left: 14px; right: 14px; top: 8px; height: 3px; border-radius: 2px; background: #000; }
.receipt-stage.printing { overflow: hidden; padding-bottom: 30px; }
.receipt-stage.printing .receipt-paper { animation: om-print 1.5s steps(14, end) both; }
.receipt-stage.printing .receipt-line { animation: om-line .3s ease both; animation-delay: calc(.5s + var(--i) * .07s); }
.receipt-stage.printing .receipt-total { animation: om-pop .45s cubic-bezier(.34,1.56,.64,1) 1.35s both; }
.receipt-stage.printing .receipt-stamp { animation: om-stamp .45s cubic-bezier(.3,1.6,.5,1) 1.65s both; }
@keyframes om-print { from { transform: translateY(-100%); } to { transform: translateY(0); } }
@keyframes om-line { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
@keyframes om-pop { 0% { transform: scale(.92); } 60% { transform: scale(1.04); } 100% { transform: none; } }
@keyframes om-stamp { 0% { opacity: 0; transform: rotate(-14deg) scale(2.4); } 100% { opacity: .8; transform: rotate(-14deg) scale(1); } }
@media (prefers-reduced-motion: reduce) { .receipt-stage.printing .receipt-paper, .receipt-stage.printing .receipt-line, .receipt-stage.printing .receipt-total, .receipt-stage.printing .receipt-stamp { animation: none; } }
@media print { .receipt-paper { box-shadow: none; border: 0; padding: 0; } .receipt-paper::after { display: none; } .receipt-stage { max-width: 80mm; } .receipt-stage.printing .receipt-paper { animation: none; } }
.public-doc { min-height: 100vh; background: var(--bg-2); padding: 28px 16px 48px; }
.public-doc .brandbar { max-width: 760px; margin: 0 auto 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.lookup-box { max-width: 420px; margin: 8vh auto 0; }
.lookup-box .code-input { font: 600 22px/1.2 ui-monospace, Menlo, Consolas, monospace; letter-spacing: 4px; text-transform: uppercase; text-align: center; }

/* ---------- Quotations: ten designs (.qdoc.t1 … .t10) ---------- */
.qdoc { --qc: #0F766E; --qink: #111827; --qmuted: #6B7280; --qline: #E5E7EB; background: #fff; color: var(--qink); font-size: 13.5px; line-height: 1.5; max-width: 820px; margin: 0 auto; padding: 36px 40px; border: 1px solid var(--qline); border-radius: 6px; box-shadow: 0 18px 40px -24px rgba(17,24,39,.35); -webkit-print-color-adjust: exact; print-color-adjust: exact; overflow: hidden; }
.qdoc .r { text-align: right; } .qd-small { font-size: 12px; color: var(--qmuted); } .qd-strong { font-weight: 600; } .qd-label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--qmuted); margin-bottom: 2px; }
.qd-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding-bottom: 20px; border-bottom: 2px solid var(--qc); }
.qd-bizname { font: 800 22px/1.2 var(--head, inherit); } .qd-title { text-align: right; } .qd-word { font: 800 26px/1 var(--head, inherit); letter-spacing: .06em; color: var(--qc); } .qd-no { font-family: ui-monospace, Menlo, Consolas, monospace; margin-top: 6px; color: var(--qmuted); }
.qd-parties { display: flex; justify-content: space-between; gap: 24px; padding: 20px 0; } .qd-dates { display: grid; gap: 6px; min-width: 200px; } .qd-dates > div { display: flex; justify-content: space-between; gap: 16px; } .qd-dates .qd-label { margin: 0; align-self: center; }
.qd-subject { font-weight: 700; font-size: 15px; margin: 0 0 12px; }
.qd-items { width: 100%; border-collapse: collapse; } .qd-items th { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; text-align: left; padding: 10px 8px; background: color-mix(in srgb, var(--qc) 10%, #fff); color: var(--qink); } .qd-items th.r { text-align: right; }
.qd-items td { padding: 10px 8px; border-bottom: 1px solid var(--qline); vertical-align: top; } .qd-n { width: 28px; color: var(--qmuted); }
.qd-totals { margin: 16px 0 0 auto; width: min(320px, 100%); } .qd-totals > div { display: flex; justify-content: space-between; padding: 5px 8px; } .qd-grand { margin-top: 6px; padding: 10px 8px !important; background: var(--qc); color: #fff; font-weight: 800; font-size: 16px; border-radius: 6px; }
.qd-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--qline); } .qd-pre { white-space: pre-line; font-size: 12.5px; }
.qd-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--qline); font-size: 12px; color: var(--qmuted); }
/* 2 Modern: full colour band, big total */
.qdoc.t2 { padding-top: 0; } .t2 .qd-head { margin: 0 -40px; padding: 30px 40px; background: var(--qc); color: #fff; border: 0; } .t2 .qd-head .qd-small, .t2 .qd-no { color: rgba(255,255,255,.8); } .t2 .qd-word { color: #fff; font-size: 30px; }
.t2 .qd-items th { background: #F3F4F6; } .t2 .qd-grand { font-size: 20px; border-radius: 999px; padding: 12px 18px !important; }
/* 3 Minimal: black & white */
.qdoc.t3 { --qc: #111827; border-radius: 0; } .t3 .qd-head { border-bottom: 1px solid #111827; } .t3 .qd-word { font-weight: 300; letter-spacing: .3em; color: #111827; } .t3 .qd-bizname { font-weight: 600; }
.t3 .qd-items th { background: none; border-bottom: 1px solid #111827; } .t3 .qd-grand { background: none; color: #111827; border-top: 2px solid #111827; border-radius: 0; }
/* 4 Elegant: serif, gold */
.qdoc.t4 { --qc: #A16207; font-family: Georgia, "Times New Roman", serif; border: 1px solid #E7D7B4; } .t4 .qd-bizname, .t4 .qd-word { font-family: Georgia, "Times New Roman", serif; font-weight: 400; } .t4 .qd-word { letter-spacing: .25em; font-size: 22px; }
.t4 .qd-head { border-bottom: 4px double #A16207; } .t4 .qd-items th { background: #FBF6EA; color: #713F12; } .t4 .qd-grand { background: #FBF6EA; color: #713F12; border: 1px solid #E7D7B4; }
/* 5 Corporate: navy band */
.qdoc.t5 { --qc: #1E3A8A; border-left: 14px solid #1E3A8A; } .t5 .qd-head { border-bottom: 0; background: #EFF3FB; margin: -36px -40px 0; padding: 30px 40px; } .t5 .qd-items th { background: #1E3A8A; color: #fff; } .t5 .qd-grand { border-radius: 0; }
/* 6 Fresh: green rounded */
.qdoc.t6 { --qc: #15803D; border-radius: 18px; } .t6 .qd-head { border-bottom: 0; background: #F0FDF4; border-radius: 14px; padding: 20px; } .t6 .qd-parties > div:first-child { background: #F9FAFB; border-radius: 12px; padding: 12px 14px; }
.t6 .qd-items th { background: #DCFCE7; } .t6 .qd-items th:first-child { border-radius: 10px 0 0 10px; } .t6 .qd-items th:last-child { border-radius: 0 10px 10px 0; } .t6 .qd-grand { border-radius: 999px; }
/* 7 Sunset: warm gradient */
.qdoc.t7 { --qc: #EA580C; padding-top: 0; } .t7 .qd-head { margin: 0 -40px; padding: 30px 40px; border: 0; background: linear-gradient(120deg, #F97316, #DB2777); color: #fff; } .t7 .qd-head .qd-small, .t7 .qd-no { color: rgba(255,255,255,.85); } .t7 .qd-word { color: #fff; }
.t7 .qd-items th { background: #FFF7ED; color: #9A3412; } .t7 .qd-grand { background: linear-gradient(120deg, #F97316, #DB2777); }
/* 8 Compact: small print */
.qdoc.t8 { font-size: 12px; padding: 24px 26px; } .t8 .qd-bizname { font-size: 17px; } .t8 .qd-word { font-size: 18px; } .t8 .qd-items td, .t8 .qd-items th { padding: 5px 6px; } .t8 .qd-parties { padding: 12px 0; } .t8 .qd-head { padding-bottom: 12px; border-bottom-width: 1px; }
/* 9 Receipt style: narrow till slip */
.qdoc.t9 { --qc: #111827; max-width: 400px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; padding: 22px 20px; border-radius: 2px; } .t9 .qd-head { flex-direction: column; align-items: center; text-align: center; border-bottom: 1px dashed #9CA3AF; }
.t9 .qd-title { text-align: center; } .t9 .qd-bizname, .t9 .qd-word { font-family: inherit; font-size: 16px; } .t9 .qd-parties { flex-direction: column; gap: 10px; border-bottom: 1px dashed #9CA3AF; } .t9 .qd-items th { background: none; border-bottom: 1px dashed #9CA3AF; padding: 6px 2px; } .t9 .qd-items td { padding: 6px 2px; border-bottom: 0; }
.t9 .qd-n, .t9 .qd-items th:nth-child(4), .t9 .qd-items td:nth-child(4) { display: none; } .t9 .qd-totals { width: 100%; border-top: 1px dashed #9CA3AF; } .t9 .qd-grand { background: none; color: #111827; border-top: 2px solid #111827; border-radius: 0; } .t9 .qd-notes { grid-template-columns: 1fr; }
/* 10 Night: dark header, luxury */
.qdoc.t10 { --qc: #D4AF37; padding-top: 0; } .t10 .qd-head { margin: 0 -40px; padding: 32px 40px; background: #0B0F19; color: #F9FAFB; border-bottom: 3px solid #D4AF37; } .t10 .qd-head .qd-small, .t10 .qd-no { color: #9CA3AF; } .t10 .qd-word { color: #D4AF37; letter-spacing: .2em; }
.t10 .qd-items th { background: #0B0F19; color: #F9FAFB; } .t10 .qd-grand { background: #0B0F19; color: #D4AF37; }
@media (max-width: 640px) {
  .qdoc { padding: 22px 18px; } .t2 .qd-head, .t7 .qd-head, .t10 .qd-head { margin: 0 -18px; padding: 22px 18px; } .t5 .qd-head { margin: -22px -18px 0; padding: 22px 18px; }
  .qd-head, .qd-parties { flex-direction: column; } .qd-title { text-align: left; } .qd-notes { grid-template-columns: 1fr; }
  .qd-items th:nth-child(4), .qd-items td:nth-child(4) { display: none; }
}
@media print { .qdoc { box-shadow: none; border: 0; max-width: none; } }
/* Template picker thumbnails */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tpl-card { position: relative; display: block; border: 2px solid var(--line); border-radius: 10px; overflow: hidden; cursor: pointer; background: #fff; transition: border-color .15s, transform .15s; }
.tpl-card:hover { transform: translateY(-2px); } .tpl-card.on, .tpl-card:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }
.tpl-card input { position: absolute; opacity: 0; } .tpl-thumb { aspect-ratio: 1 / 1.05; overflow: hidden; pointer-events: none; background: #F3F4F6; }
.tpl-thumb .qdoc { transform: scale(var(--s, .19)); transform-origin: top left; width: 820px; max-width: none; margin: 0; box-shadow: none; }
.tpl-thumb .qdoc.t9 { width: 400px; transform: scale(calc(var(--s, .19) * 2.05)); }
.tpl-name { padding: 8px 10px; font-size: 12px; border-top: 1px solid var(--line); color: var(--ink-3); } .tpl-name b { display: block; font-size: 13px; color: var(--ink); }
.qline-grid { display: grid; grid-template-columns: minmax(0,3fr) 80px 80px 130px 120px 36px; gap: 8px; align-items: start; }
.qline-head { font-size: 12px; color: var(--ink-3); font-weight: 500; }
@media (max-width: 760px) { .qline-grid { grid-template-columns: 1fr 1fr; } .qline-grid .ql-desc { grid-column: 1 / -1; } .qline-head { display: none; } }
/* Follow-ups */
.fu-list { display: grid; gap: 10px; }
.fu-item { display: grid; grid-template-columns: 40px minmax(0,1fr) auto; gap: 12px; align-items: start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.fu-item.overdue { border-color: #FCA5A5; background: #FFF7F7; } .fu-item.done { opacity: .7; }
.fu-ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); }
.fu-item.overdue .fu-ico { background: #FEE2E2; color: #B91C1C; }
.fu-when { font-size: 12.5px; font-weight: 600; } .fu-item.overdue .fu-when { color: #B91C1C; }
.fu-prio-high { border-left: 4px solid #DC2626; }
.fu-day { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin: 14px 0 6px; font-weight: 600; }

/* ---------- Sales team & manager areas ---------- */
body.staff { background: var(--bg-2); --brand: var(--st); }
.staff-wrap { max-width: 1240px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.staff-bar { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--st) 92%, #000); color: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.12); }
.staff-bar .staff-wrap { height: 60px; }
.staff-brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.staff-brand .logo { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: #fff; color: var(--st); font: 800 16px/1 var(--head); }
.staff-brand b { font: 700 16px var(--head); }
.staff-tag { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,.18); }
.staff-lang { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.35); background: transparent; color: #fff; font: 500 13px var(--font); cursor: pointer; }
.staff-lang:hover { background: rgba(255,255,255,.12); }
.staff-lang.dark { color: var(--ink-2); border-color: var(--line); } .staff-lang.dark:hover { background: var(--bg-3); }
.staff-me { position: relative; }
.staff-avatar { width: 36px; height: 36px; border-radius: 50%; border: 2px solid rgba(255,255,255,.6); background: #fff; color: var(--st); font: 700 13px var(--font); cursor: pointer; }
.staff-menu { position: absolute; right: 0; top: 46px; min-width: 230px; background: #fff; color: var(--ink); border-radius: 12px; box-shadow: 0 16px 40px rgba(17,24,39,.2); padding: 6px; z-index: 40; }
.staff-menu-head { padding: 10px 12px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; } .staff-menu-head b, .staff-menu-head span { display: block; } .staff-menu-head span { font-size: 12px; color: var(--ink-3); }
.staff-menu a, .staff-menu button { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 8px; border: 0; background: none; font: 500 13.5px var(--font); color: var(--ink); cursor: pointer; text-decoration: none; }
.staff-menu a:hover, .staff-menu button:hover { background: var(--bg-3); }
.staff-main { padding-top: 22px; padding-bottom: 20px; }
.staff-hero { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px 24px; margin-bottom: 16px; border-radius: 16px; color: #fff;
    background: linear-gradient(120deg, var(--st), color-mix(in srgb, var(--st) 55%, #0EA5E9)); box-shadow: 0 14px 34px -18px var(--st); }
.staff-hero p { margin: 4px 0 0; opacity: .9; max-width: 640px; }
.staff-hello { font: 800 24px/1.2 var(--head); }
.staff-cta { background: #fff; color: var(--st); border: 0; font-weight: 700; } .staff-cta:hover { background: #F9FAFB; color: var(--st); }
.manager-strip { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 14px; background: #fff; border: 1px solid var(--line); border-left: 4px solid #7C3AED; border-radius: 12px; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; padding: 14px; }
.team-card { display: block; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); text-decoration: none; transition: transform .15s, box-shadow .15s, border-color .15s; }
.team-card:hover { transform: translateY(-2px); border-color: var(--st); box-shadow: 0 10px 24px -14px rgba(17,24,39,.35); }
.team-card.muted-card { opacity: .7; }
.team-nums { display: flex; justify-content: space-between; gap: 8px; margin: 12px 0 10px; font-size: 12px; color: var(--ink-3); } .team-nums b { display: block; font-size: 15px; color: var(--ink); }
.ellipsis { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Promotion progress bar */
.promo-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; } .promo-head .num { font: 700 18px var(--head); color: var(--st, var(--brand)); }
.promo-track { position: relative; height: 14px; border-radius: 999px; background: var(--bg-3); border: 1px solid var(--line); overflow: hidden; }
.promo-track > span { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: linear-gradient(90deg, #F59E0B, #10B981); transition: width 1.2s cubic-bezier(.2,.8,.2,1); animation: om-grow 1.2s cubic-bezier(.2,.8,.2,1); }
.promo-track > i { position: absolute; top: 3px; bottom: 3px; width: 1px; background: rgba(17,24,39,.08); }
.promo-foot { margin-top: 6px; }
.promo-sm .promo-track { height: 7px; } .promo-sm .promo-track > i { display: none; }
.promo-done .promo-track > span { background: linear-gradient(90deg, #10B981, #7C3AED); }
.promo-card { border-left: 4px solid #F59E0B; }
@keyframes om-grow { from { width: 0; } }
/* Staff login */
body.staff-login { min-height: 100vh; margin: 0; display: flex; flex-direction: column; background: radial-gradient(1200px 600px at 0% 0%, color-mix(in srgb, var(--st) 22%, #fff), transparent), radial-gradient(900px 500px at 100% 100%, color-mix(in srgb, var(--st) 14%, #fff), transparent), #F9FAFB; }
.staff-login-card { width: min(440px, 100%); background: #fff; border-radius: 18px; padding: 28px; box-shadow: 0 24px 60px -24px rgba(17,24,39,.35); border: 1px solid var(--line); }
.staff-login-card .staff-brand .logo { background: var(--st); color: #fff; }
.staff-login-card h1 { margin: 10px 0 4px; font: 800 24px var(--head); }
.staff-login-ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--st) 12%, #fff); color: var(--st); }
@media (max-width: 640px) { .staff-hero { padding: 18px; } .staff-hello { font-size: 20px; } .staff-tag { display: none; } .staff-lang { padding: 0 10px; } }

/* ---------- Brand: OfisiMtandao logo ---------- */
.om-mark { display: block; flex-shrink: 0; border-radius: 28%; box-shadow: 0 8px 18px -10px rgba(6,95,70,.8); }
.logo.om-mark { width: 34px; height: 34px; background: none; }
.om-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.om-word { font-family: var(--head); font-weight: 800; letter-spacing: -.035em; line-height: 1; color: inherit; white-space: nowrap; }
.om-word b { font-weight: 800; color: #0F766E; }
.om-logo-light .om-word { color: #fff; } .om-logo-light .om-word b { color: #5EEAD4; }
.om-tag { font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: rgba(15,118,110,.1); color: #0F766E; white-space: nowrap; }
.om-logo-light .om-tag { background: rgba(255,255,255,.16); color: #fff; }
.side-brand .om-mark { width: 36px; height: 36px; }

/* ---------- Sales & manager areas: sidebar pieces and pages ---------- */
body.staff { background: var(--bg-2); }
body.staff .main { min-width: 0; }
.staff-side { --v-side: #A7F3D0; }
body.staff[style*="#7C3AED"] .staff-side { --v-side: #C4B5FD; }
.staff-who { display: flex; align-items: center; gap: 10px; margin: 2px 12px 6px; padding: 10px; border-radius: 10px; background: var(--side-2); }
.staff-who .avatar { background: var(--st); color: #fff; }
.staff-who b { display: block; color: #fff; font-size: 13.5px; } .staff-who span { display: block; color: var(--side-ink-2); font-size: 11.5px; }
.side-manager { margin: 10px 12px 4px; padding: 10px 12px; border-radius: 10px; border: 1px dashed rgba(255,255,255,.18); color: var(--side-ink); }
.side-manager span.small { display: block; color: var(--side-ink-2); text-transform: uppercase; letter-spacing: .06em; font-size: 10.5px; }
.side-manager b { display: block; color: #fff; margin: 2px 0; } .side-manager a { display: inline-flex; align-items: center; gap: 6px; color: #A7F3D0; font-size: 12.5px; }
.staff-ghost { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.35); } .staff-ghost:hover { background: rgba(255,255,255,.24); color: #fff; }
.manager-card { border-left: 4px solid #7C3AED; }
.mini-bars { display: flex; align-items: flex-end; gap: 14px; height: 150px; padding-top: 18px; }
.mini-bar { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; }
.mini-bar i { display: block; width: 100%; max-width: 46px; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, var(--st), color-mix(in srgb, var(--st) 45%, #fff)); animation: om-rise .9s cubic-bezier(.2,.8,.2,1) both; transform-origin: bottom; }
.mb-val { font: 700 13px var(--head); } .mb-lbl { font-size: 12px; color: var(--ink-3); }
@keyframes om-rise { from { transform: scaleY(0); } }
.vertical-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.vp-card { position: relative; display: grid; gap: 4px; padding: 14px; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; background: #fff; transition: border-color .15s, box-shadow .15s; }
.vp-card input { position: absolute; opacity: 0; } .vp-card.on { border-color: var(--st); box-shadow: 0 0 0 3px color-mix(in srgb, var(--st) 15%, transparent); }
.vp-ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 4px; } .vp-ico.sm { width: 30px; height: 30px; border-radius: 8px; margin: 0; flex-shrink: 0; }
.ready-msg { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-3); } .ready-msg p { margin: 0 0 6px; font-size: 13.5px; }
.pitch { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 13.5px; } .pitch li::marker { color: var(--st); }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin-bottom: 16px; align-items: end; }
.podium-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 12px; border-radius: 14px; background: #fff; border: 1px solid var(--line); color: var(--ink); text-align: center; min-width: 0; }
.podium-card .avatar { width: 46px; height: 46px; font-size: 15px; background: var(--bg-3); }
.podium-card.p1 { padding-top: 30px; border-color: #F59E0B; box-shadow: 0 14px 30px -18px #F59E0B; } .podium-card.p1 .avatar { background: #FEF3C7; color: #B45309; }
.podium-card.p2 .avatar { background: #E5E7EB; color: #374151; } .podium-card.p3 .avatar { background: #FFEDD5; color: #9A3412; }
.podium-rank { position: absolute; top: 10px; left: 12px; font: 800 18px var(--head); color: var(--ink-3); } .p1 .podium-rank { color: #B45309; }
@media (max-width: 640px) { .podium { grid-template-columns: 1fr; } .mini-bars { gap: 8px; } }

/* ---------- Customer picker (search + walk-in) ---------- */
.customer-picker { position: relative; }
.cp-native { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.cp-row { display: flex; gap: 6px; align-items: stretch; }
.cp-box { position: relative; flex: 1; min-width: 0; }
.cp-ico { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.cp-input { padding-left: 32px; padding-right: 30px; }
.cp-input.has-value::placeholder { color: var(--ink); font-weight: 600; opacity: 1; }
.cp-clear { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--ink-3); cursor: pointer; padding: 4px; }
.cp-drop { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 60; max-height: 280px; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 14px 34px rgba(17,24,39,.16); padding: 4px; }
.cp-opt { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 10px; border: 0; background: none; border-radius: 8px; cursor: pointer; font: inherit; color: var(--ink); }
.cp-opt b { display: block; font-weight: 600; font-size: 13.5px; } .cp-opt .small { display: block; }
.cp-opt.hi { background: var(--brand-50); }
.cp-walkin { color: var(--ink-2); font-weight: 600; border-bottom: 1px solid var(--line-2); border-radius: 8px 8px 0 0; }
.cp-av { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-3); color: var(--ink-2); font-weight: 700; font-size: 12px; flex-shrink: 0; }
.cp-empty { padding: 10px; }
.cp-walk { white-space: nowrap; } .cp-walk.on { background: var(--brand-50); border-color: var(--brand); color: var(--brand); }

/* ---------- Reports & Analytics Centre ---------- */
.print-only { display: none; } @media print { .print-only { display: block; } }
.rep-hero { border-radius: 16px; padding: 18px 22px; margin-bottom: 16px; color: #fff; background: linear-gradient(120deg, #0F766E, #115E59 60%, #134E4A); box-shadow: 0 16px 36px -22px #0F766E; }
.rep-hero-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; opacity: .9; margin-bottom: 12px; }
.rep-hero-head a { color: #A7F3D0; text-transform: none; letter-spacing: 0; font-weight: 600; }
.rep-hero-grid { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 14px; }
.rep-hero-grid span { display: block; font-size: 12px; opacity: .8; } .rep-hero-grid b { display: block; font: 800 22px var(--head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .rep-hero-grid b.neg { color: #FCA5A5; }
@media (max-width: 1100px) { .rep-hero-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 560px) { .rep-hero-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } .rep-hero-grid b { font-size: 18px; } }
.rep-cats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; position: sticky; top: 60px; z-index: 5; background: var(--bg-2); padding: 8px 0; }
.rep-cat { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink-2); font-size: 13px; font-weight: 500; }
.rep-cat span { font-size: 11px; background: var(--bg-3); border-radius: 999px; padding: 0 7px; } .rep-cat:hover { border-color: var(--brand); color: var(--brand); }
.rep-sec { margin: 18px 0 8px; scroll-margin-top: 120px; }
.rep-sec-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; } .rep-sec-head h2 { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 17px; }
.rep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 10px; }
.rep-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 12px; background: #fff; border: 1px solid var(--line); color: var(--ink); transition: border-color .15s, transform .15s, box-shadow .15s; }
.rep-card:hover { border-color: var(--brand); transform: translateY(-1px); box-shadow: 0 10px 22px -16px rgba(17,24,39,.4); }
.rep-card b { display: flex; align-items: center; gap: 6px; font-size: 14px; } .rep-card span.grow > span { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 3px; line-height: 1.4; }
.rep-card.featured { border-left: 3px solid var(--brand); }
.rep-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; background: var(--brand-50); color: var(--brand); }
.rep-filters { margin-bottom: 14px; } .rep-filter-row { display: flex; flex-wrap: wrap; gap: 10px; padding: 12px 16px 6px; align-items: flex-end; }
.rep-filter-row .field { margin: 0; min-width: 140px; flex: 0 1 auto; } .rep-filter-row .field label { font-size: 12px; }
.rep-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 14px; }
.rep-kpi { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 3px; border-top: 3px solid var(--line); }
.rep-kpi.good { border-top-color: #10B981; } .rep-kpi.warn { border-top-color: #F59E0B; } .rep-kpi.alert { border-top-color: #EF4444; }
.rep-kpi-label { font-size: 12.5px; color: var(--ink-3); } .rep-kpi-value { font: 800 21px var(--head); word-break: break-word; }
.rep-kpi.alert .rep-kpi-value { color: #B91C1C; }
.rep-delta { font-size: 12px; font-weight: 600; } .rep-delta.up { color: #15803D; } .rep-delta.down { color: #B91C1C; }
.rep-table tfoot th { background: var(--bg-3); font-weight: 700; } .rep-table thead th { white-space: nowrap; user-select: none; }
.rep-note { display: flex; gap: 6px; align-items: flex-start; margin-top: 10px; }
.rep-related { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 18px; }
.rep-print-head { margin-bottom: 10px; font-size: 13px; }
@media print { .rep-cats, .rep-filters { display: none !important; } .rep-kpi { break-inside: avoid; } }

/* ---------- Package editor: modules per package ---------- */
.plan-feats { display: flex; flex-wrap: wrap; gap: 4px; } .plan-feats .chip { height: 24px; font-size: 11.5px; padding: 0 9px; cursor: default; }
.plan-feats .chip.premium { border-color: #FCD34D; background: #FFFBEB; color: #92400E; }
.feat-pick { margin-top: 16px; display: grid; gap: 12px; }
.feat-group { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px 14px; margin: 0; }
.feat-group legend { padding: 0 6px; font-weight: 700; font-size: 13px; display: flex; gap: 10px; align-items: center; }
.link-btn { border: 0; background: none; color: var(--brand); font: 500 12px var(--font); cursor: pointer; padding: 0; }
.feat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px; }
.feat { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; font-size: 13px; background: #fff; }
.feat:has(input:checked) { border-color: var(--brand); background: var(--brand-50); }
.feat.premium:has(input:checked) { border-color: #F59E0B; background: #FFFBEB; }
.feat em { margin-left: auto; font-style: normal; font-size: 10.5px; font-weight: 700; color: #B45309; text-transform: uppercase; letter-spacing: .04em; }
.feat span { flex: 1; min-width: 0; }

/* Public header menu (before login) */
.site-header { position: sticky; top: 0; z-index: 60; background: #fff; border-bottom: 1px solid rgba(17,24,39,.07); }
.site-header-in { display: flex; align-items: center; gap: 20px; height: 66px; }
.site-brand { display: flex; align-items: center; flex-shrink: 0; }
.site-links { display: flex; align-items: center; gap: 2px; flex: 1; justify-content: center; }
.site-links > a, .site-drop > button { display: inline-flex; align-items: center; gap: 4px; padding: 8px 13px; border-radius: 10px; font-size: 14px; font-weight: 500; color: var(--ink-2); background: none; border: 0; cursor: pointer; font-family: inherit; transition: background .15s, color .15s; }
.site-links > a:hover, .site-drop > button:hover, .site-links > a.active { background: #F0FDFA; color: #0F766E; }
.site-drop { position: relative; }
.site-drop-menu { position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); width: 290px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 50px -20px rgba(17,24,39,.35); padding: 6px; }
.site-drop-menu a { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; color: var(--ink); }
.site-drop-menu a:hover { background: var(--bg-2); }
.site-drop-menu a > .icon, .site-drop-menu a > svg { margin-top: 2px; color: #0F766E; flex-shrink: 0; }
.site-drop-menu b { display: block; font-size: 14px; }
.site-drop-menu small { color: var(--ink-3); font-size: 12.5px; }
.site-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; margin-left: auto; }
.site-lang { gap: 5px; }
.site-burger { display: none; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: #fff; cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 4px; }
.site-burger span { width: 18px; height: 2px; border-radius: 2px; background: var(--ink); }
.site-mobile { display: none; }
.auth-wrap.with-header { min-height: calc(100vh - 67px); }
.staff-login-main { flex: 1; display: grid; place-items: center; padding: 24px 16px; }
@media (max-width: 900px) {
  .site-links { display: none; }
  .site-burger { display: inline-flex; }
  .site-mobile { display: block; position: absolute; left: 0; right: 0; top: 100%; max-height: calc(100vh - 70px); overflow-y: auto; border-top: 1px solid var(--line); background: #fff; padding: 10px 16px 16px; box-shadow: 0 18px 30px -18px rgba(17,24,39,.3); }
  .site-mobile > a { display: flex; align-items: center; gap: 10px; padding: 11px 10px; border-radius: 10px; color: var(--ink); font-weight: 500; }
  .site-mobile > a:hover, .site-mobile > a.active { background: #F0FDFA; color: #0F766E; }
  .site-mobile-sep { margin: 8px 10px 2px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 600; }
  .site-mobile-cta { display: grid; gap: 8px; margin-top: 10px; }
}
@media (max-width: 480px) {
  .site-header-in { gap: 8px; height: 60px; }
  .hide-xs { display: none !important; }
  .site-lang span { display: none; }
  .auth-wrap.with-header { min-height: calc(100vh - 61px); }
}
/* Package periods (1, 2, 4, 6, 12 months) */
.period-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.period-bar.center { justify-content: center; border: 0; background: none; padding: 0; }
.period-switch { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.period-switch button { position: relative; border: 0; background: none; padding: 8px 14px; border-radius: 9px; font: 600 13.5px var(--font); color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: background .15s, color .15s, box-shadow .15s; }
.period-switch button:hover { color: var(--ink); }
.period-switch button.on { background: #fff; color: #0F766E; box-shadow: 0 1px 2px rgba(17,24,39,.08), 0 0 0 1px rgba(15,118,110,.15); }
.period-switch small { font-size: 11px; font-weight: 700; color: #047857; background: #D1FAE5; border-radius: 999px; padding: 1px 6px; }
.save-pill { display: inline-block; margin-left: 6px; font-size: 11.5px; font-weight: 700; color: #047857; background: #D1FAE5; border-radius: 999px; padding: 1px 8px; }
.period-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.period-table td { padding: 4px 0; border-bottom: 1px dashed var(--line); }
.period-table tr:last-child td { border-bottom: 0; }
.period-table tr.off td { color: var(--ink-3); }
.period-table .save, .period-box .save { color: #047857; font-size: 11.5px; font-weight: 700; margin-left: 4px; }
.period-prices { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 14px; margin: 0; }
.period-prices legend { font-weight: 600; padding: 0 6px; }
.period-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 8px; }
.period-box { display: flex; flex-direction: column; gap: 4px; }
.period-box .pl { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
@media (max-width: 760px) { .period-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .period-switch button { padding: 7px 10px; font-size: 13px; } }
/* Team & roles */
.field-error { color: var(--danger); font-size: 12.5px; margin-top: 4px; }
.role-card .chip { height: 24px; font-size: 11.5px; padding: 0 9px; cursor: default; }
.role-new { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 180px; border: 2px dashed var(--line); background: transparent; cursor: pointer; color: var(--ink-2); font: inherit; }
.role-new:hover { border-color: var(--brand); color: var(--brand); }
.perm-groups { display: grid; gap: 12px; margin-top: 10px; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px; }
.perm { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: #fff; }
.perm input { margin-top: 3px; }
.perm b { display: block; font-size: 13.5px; font-weight: 600; }
.perm small { display: block; color: var(--ink-3); font-size: 12px; margin-top: 2px; line-height: 1.35; }
.perm:has(input:checked) { border-color: var(--brand); background: var(--brand-50); }

/* Web app: splash screen, install helpers */
.app-splash { display: none; }
html.show-splash .app-splash { position: fixed; inset: 0; z-index: 9999; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #fff; background: radial-gradient(900px 520px at 15% 0%, #14B8A6 0%, transparent 60%), linear-gradient(160deg, #0F766E 0%, #065F46 100%);
  transition: opacity .45s ease, visibility .45s; }
html.show-splash { overflow: hidden; }
html.splash-out .app-splash { opacity: 0; visibility: hidden; }
.app-splash-in { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 24px; }
.app-splash-logo { width: 104px; height: 104px; filter: drop-shadow(0 18px 40px rgba(0,0,0,.28)); animation: om-pop .7s cubic-bezier(.2,.9,.3,1.25) both; }
.app-splash-logo .s-ring, .app-splash-logo .s-line { stroke-dasharray: 100; stroke-dashoffset: 100; animation: om-draw .8s .25s ease forwards; }
.app-splash-logo .s-line { animation-delay: .55s; }
.app-splash-logo .s-dot { transform-origin: 47.5px 20.8px; transform: scale(0); animation: om-dot .45s 1s cubic-bezier(.2,.9,.3,1.5) forwards; }
.app-splash-name { margin-top: 22px; font: 800 30px var(--head, 'Plus Jakarta Sans', system-ui); letter-spacing: -.02em; animation: om-up .6s .35s ease both; }
.app-splash-name b { color: #FDE68A; font-weight: 800; }
.app-splash-tag { margin-top: 6px; font-size: 14px; opacity: .85; animation: om-up .6s .5s ease both; }
.app-splash-bar { margin-top: 28px; width: 140px; height: 4px; border-radius: 99px; background: rgba(255,255,255,.22); overflow: hidden; animation: om-up .6s .6s ease both; }
.app-splash-bar i { display: block; height: 100%; width: 40%; border-radius: inherit; background: #FBBF24; animation: om-load 1.1s .7s ease-in-out infinite; }
.app-splash-foot { position: absolute; bottom: calc(24px + env(safe-area-inset-bottom)); font-size: 12px; opacity: .7; letter-spacing: .04em; }
@keyframes om-pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes om-draw { to { stroke-dashoffset: 0; } }
@keyframes om-dot { to { transform: scale(1); } }
@keyframes om-up { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes om-load { 0% { transform: translateX(-110%); } 100% { transform: translateX(260%); } }
@media (prefers-reduced-motion: reduce) { .app-splash *, .app-splash-logo * { animation: none !important; stroke-dashoffset: 0 !important; transform: none !important; } }
html.is-app body { overscroll-behavior-y: none; }
.install-card { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; border-radius: 14px; border: 1px solid #99F6E4; background: #F0FDFA; color: var(--ink); cursor: pointer; font: inherit; }
.install-card img { border-radius: 10px; flex-shrink: 0; }
.install-card span { flex: 1; } .install-card b { display: block; font-size: 14px; } .install-card small { color: var(--ink-3); font-size: 12.5px; }
.install-steps ol { margin: 6px 0 0; padding-left: 20px; line-height: 1.7; }
.kbd { display: inline-block; padding: 0 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg-2); font-size: 12px; }
[data-install-app][hidden] { display: none !important; }.role-hint { display: grid; gap: 2px; margin-top: 6px; padding: 8px 10px; border-radius: 9px; background: var(--bg-2); border: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2); }

/* Pull down to refresh (installed web app) */
.ptr { position: fixed; top: 0; left: 50%; z-index: 9000; transform: translate(-50%, -64px); display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; transition: transform .25s ease; }
.ptr.pulling { transition: none; }
.ptr-ball { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #0F766E; box-shadow: 0 6px 18px rgba(17,24,39,.18); border: 1px solid #CCFBF1; }
.ptr-ball svg { width: 22px; height: 22px; }
.ptr.ready .ptr-ball { background: #0F766E; color: #fff; }
.ptr.loading .ptr-ball { background: #0F766E; color: #fff; animation: ptr-spin .7s linear infinite; }
.ptr-text { font-size: 12px; font-weight: 600; color: #0F766E; background: rgba(255,255,255,.95); padding: 3px 10px; border-radius: 99px; box-shadow: 0 2px 8px rgba(17,24,39,.1); opacity: 0; transition: opacity .15s; }
.ptr.pulling .ptr-text, .ptr.loading .ptr-text { opacity: 1; }
@keyframes ptr-spin { to { transform: rotate(360deg); } }

/* Small forms that open from a row of a table (stock, status, counts…).
   Inside a scrolling table an absolute pop-up gets cut off (on phones it was invisible),
   so they open as a centred card above everything, with the page dimmed behind. */
.table-wrap form.dropdown-menu, td form.dropdown-menu, form.dropdown-menu.pop-card {
  position: fixed; left: 50%; top: 50%; right: auto; bottom: auto; transform: translate(-50%, -50%);
  width: min(360px, calc(100vw - 24px)); max-height: calc(100vh - 32px); overflow-y: auto;
  z-index: 1000; padding: 18px !important; border-radius: 14px; text-align: left; white-space: normal;
  box-shadow: 0 0 0 100vmax rgba(17,24,39,.45), 0 24px 60px -20px rgba(17,24,39,.5);
  animation: pop-in .15s ease;
}
@keyframes pop-in { from { opacity: 0; transform: translate(-50%, -46%); } to { opacity: 1; transform: translate(-50%, -50%); } }
.pop-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: -4px 0 10px; font-weight: 700; }
.pop-title .icon-btn { margin-right: -6px; }
.stock-tap { border: 0; cursor: pointer; font: inherit; }
/* Real buttons inside those pop-up forms keep their button look (the menu-item reset above is for menus). */
.dropdown-menu .btn { display: inline-flex; width: auto; justify-content: center; border-radius: 10px; padding: 9px 14px; font-weight: 600; }
.dropdown-menu .btn.btn-block { display: flex; width: 100%; }
.dropdown-menu .btn-primary { background: var(--brand); color: #fff; border: 1px solid var(--brand); } .dropdown-menu .btn-primary:hover { background: var(--brand-600); color: #fff; }
.dropdown-menu .btn-secondary { background: #fff; border: 1px solid var(--line); }
.dropdown-menu .btn-danger, .dropdown-menu .btn-danger:hover { background: var(--danger); color: #fff; }
.dropdown-menu .icon-btn { width: 32px; height: 32px; padding: 0; justify-content: center; }

/* Stock change: add / remove switch and the result */
.seg-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.seg-2 label { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 10px; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 600; color: var(--ink-2); }
.seg-2 input { position: absolute; opacity: 0; pointer-events: none; }
.seg-2 label.on.add { border-color: #10B981; background: #ECFDF5; color: #047857; }
.seg-2 label.on.remove { border-color: #F87171; background: #FEF2F2; color: #B91C1C; }
.stock-preview { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 10px; font-size: 13px; }
.stock-preview > span:first-child { font-weight: 800; font-size: 15px; }
.stock-preview.plus { background: #ECFDF5; color: #047857; }
.stock-preview.minus { background: #FEF2F2; color: #B91C1C; }

/* Till: discount per line, part payment (debt) */
.line-disc { display: flex; align-items: center; gap: 6px; grid-column: 1 / -1; font-size: 12px; color: var(--ink-3); }
.line-disc input { width: 110px; height: 30px; padding: 0 8px; font-size: 13px; }
.line-disc .was { text-decoration: line-through; }
.partial-check { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1.5px dashed var(--line); border-radius: 12px; cursor: pointer; }
.partial-check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--brand); }
.partial-check b { display: block; font-size: 14px; } .partial-check small { color: var(--ink-3); font-size: 12.5px; }
.partial-check:has(input:checked) { border-style: solid; border-color: #F59E0B; background: #FFFBEB; }
.partial-box { display: grid; gap: 10px; padding: 12px; border-radius: 12px; background: #FFFBEB; border: 1px solid #FDE68A; }
.debt-sum { display: grid; gap: 4px; font-size: 13.5px; }
.debt-sum > div { display: flex; justify-content: space-between; }
.debt-sum .owe { padding-top: 6px; border-top: 1px dashed #F59E0B; color: #B45309; font-size: 15px; }
@media (max-width: 640px) { .sale-line { grid-template-columns: 1fr 1fr !important; } }
.side-link.side-sub { padding-left: 30px; font-size: 13px; }
.debt-big { font: 800 24px var(--head); margin-top: 4px; }
.debt-pill { display: inline-flex; flex-direction: column; padding: 6px 14px; border-radius: 12px; background: #FEF2F2; color: #B91C1C; line-height: 1.2; }
.debt-pill span { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; } .debt-pill b { font-size: 17px; }
.debt-pill.clear { background: #ECFDF5; color: #047857; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 4px; vertical-align: -1px; border: 1px solid rgba(0,0,0,.1); }

/* five stat cards in a row (super admin → Studio) */
.g5 { grid-template-columns: repeat(5, minmax(0,1fr)); }
@media (max-width: 1180px) { .g5 { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 760px) { .g5 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
