[hidden] { display: none !important; }
:root {
  --accent: #2f5bea;
  --accent-soft: color-mix(in srgb, var(--accent) 10%, white);
  --accent-ink: color-mix(in srgb, var(--accent) 80%, black);
  --bg: #f5f6f8;
  --panel: #ffffff;
  --ink: #16191f;
  --muted: #646b78;
  --faint: #9aa1ad;
  --line: #e4e7ec;
  --line-strong: #d3d8e0;
  --ok: #18794e;
  --ok-soft: #e7f6ee;
  --warn: #a35a00;
  --warn-soft: #fff4e0;
  --bad: #c4291c;
  --bad-soft: #fdecea;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .16);
  --sidebar: 232px;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body { font-size: 14px; line-height: 1.45; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
h1 { font-size: 22px; font-weight: 650; }
h2 { font-size: 16px; font-weight: 650; }
h3 { font-size: 14px; font-weight: 650; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.grow { flex: 1; }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.hidden { display: none !important; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- layout ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; background: var(--panel); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 14px 10px; gap: 2px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 16px; }
.brand-logo { width: 34px; height: 34px; border-radius: 8px; background: var(--accent); color: white; display: grid; place-items: center; font-weight: 700; font-size: 13px; overflow: hidden; flex: none; }
.brand-logo img { width: 100%; height: 100%; object-fit: contain; background: white; }
.brand-name { font-weight: 650; line-height: 1.15; min-width: 0; }
.brand-name small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--muted); font-weight: 500; text-decoration: none; }
.nav a:hover { background: var(--bg); color: var(--ink); }
.nav a.on { background: var(--accent-soft); color: var(--accent-ink); }
.sidebar .foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 10px; }
.user-chip { display: flex; align-items: center; gap: 8px; padding: 6px 10px; color: var(--muted); font-size: 13px; }
.shell > div { min-width: 0; }
.main { min-width: 0; padding: 24px 28px 64px; max-width: 1240px; width: 100%; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { flex: 1; min-width: 200px; }
.topbar { display: none; }

/* ---------- panels ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 16px 18px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card-head h2 { flex: 1; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi { padding: 16px 18px; }
.kpi .label { color: var(--muted); font-size: 13px; }
.kpi .value { font-size: 22px; font-weight: 650; margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kpi .sub { color: var(--faint); font-size: 12px; margin-top: 2px; }
.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.quick a { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); font-weight: 550; box-shadow: var(--shadow); text-decoration: none; }
.quick a:hover { border-color: var(--accent); color: var(--accent-ink); }
.quick a .i { color: var(--accent); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; }
table.t th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 9px 12px; border-bottom: 1px solid var(--line); background: #fafbfc; white-space: nowrap; }
table.t tfoot tr:first-child td { border-top: 1px solid var(--line-strong); }
table.t td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: #f8f9fb; }
table.t th.num, table.t td.num { text-align: right; }
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.list-item:last-child { border-bottom: 0; }
a.list-item:hover { background: #f8f9fb; text-decoration: none; }
.empty { padding: 28px 18px; text-align: center; color: var(--muted); }

/* ---------- pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--bg); color: var(--muted); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.accent { background: var(--accent-soft); color: var(--accent-ink); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line-strong); background: var(--panel); border-radius: 99px; padding: 5px 12px; font: inherit; font-size: 13px; cursor: pointer; color: var(--muted); }
.chip.on { background: var(--ink); border-color: var(--ink); color: white; }

/* ---------- forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--panel); color: var(--ink); font: inherit; font-weight: 550; cursor: pointer; white-space: nowrap; text-decoration: none; }
.btn:hover { background: var(--bg); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: white; }
.btn.primary:hover { background: var(--accent-ink); }
.btn.danger { color: var(--bad); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--bg); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn.icon { width: 36px; padding: 0; }
.btn.icon.sm { width: 30px; }
.btn:disabled { opacity: .5; cursor: default; }
label.f { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 550; color: var(--ink); min-width: 0; }
label.f .opt { color: var(--faint); font-weight: 400; }
.input, select.input, textarea.input {
  height: 36px; width: 100%; border: 1px solid var(--line-strong); border-radius: 8px; padding: 0 10px; font: inherit; color: var(--ink); background: var(--panel); outline: none;
}
textarea.input { height: auto; padding: 8px 10px; resize: vertical; min-height: 70px; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.input.num { text-align: right; }
.search { position: relative; min-width: 220px; }
.search .i { position: absolute; left: 10px; top: 9px; color: var(--faint); }
.search .input { padding-left: 34px; }
.search.pos-scan { display: block; }
.search.pos-scan .i { top: 14px; z-index: 1; }
.pos-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .pos-grid { grid-template-columns: 1fr; } }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.hint { font-size: 12.5px; color: var(--muted); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs a { padding: 9px 14px; color: var(--muted); font-weight: 550; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none; }
.tabs a.on { color: var(--accent-ink); border-color: var(--accent); }

/* ---------- picker (autocomplete) ---------- */
.picker { position: relative; }
.picker-menu { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; right: 0; min-width: 300px; max-height: 320px; overflow-y: auto; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: var(--shadow-lg); }
.picker-menu .opt { display: flex; gap: 10px; align-items: center; padding: 8px 10px; cursor: pointer; border-bottom: 1px solid var(--line); }
.picker-menu .opt:last-child { border-bottom: 0; }
.picker-menu .opt.on { background: var(--accent-soft); }
.picker-menu .opt .code { color: var(--faint); font-size: 12px; min-width: 54px; }
.picker-menu .opt .code:empty { display: none; }
/* the product list must not be clipped by the table it opens from (desktop; phones keep horizontal scroll) */
@media (min-width: 861px) { .table-wrap:has(> .doc-lines) { overflow: visible; } }
.picker-menu .opt .meta { margin-left: auto; text-align: right; font-size: 12px; color: var(--muted); white-space: nowrap; }

/* ---------- document editor ---------- */
.doc-lines td { padding: 6px 6px; }
.doc-lines td:first-child { padding-left: 12px; }
.doc-lines .input { height: 34px; }
/* The boxes keep a usable size when the window is narrow (half screen): the table scrolls instead of squeezing them. */
.doc-lines .w-desc { min-width: 180px; }
.doc-lines [data-k=qty], .doc-lines [data-k=unit] { min-width: 64px; }
.doc-lines [data-k=price] { min-width: 96px; }
@media (max-width: 1200px) { .doc-lines .w-total, .doc-lines .w-price { width: auto; } }
.pos-grid [data-k=qty] { min-width: 76px; }
.pos-grid [data-k=price] { min-width: 104px; }
.doc-lines .w-qty { width: 96px; }
.doc-lines .w-unit { width: 104px; }
.doc-lines .w-price { width: 130px; }
.doc-lines .w-total { width: 130px; }
.doc-lines .line-warn { font-size: 11.5px; color: var(--warn); margin-top: 3px; }
.doc-lines .line-meta { font-size: 11.5px; color: var(--faint); margin-top: 3px; }
.totals { display: grid; grid-template-columns: auto 160px; gap: 8px 16px; align-items: center; justify-content: end; padding: 16px 18px; }
.totals .grand { font-size: 20px; font-weight: 700; }
.sticky-actions { position: sticky; bottom: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(6px); padding: 12px 0; margin-top: 16px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- modal, toast ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(16, 24, 40, .45); display: grid; place-items: center; z-index: 100; padding: 16px; animation: fade .12s ease-out; }
.modal { background: var(--panel); border-radius: 14px; box-shadow: var(--shadow-lg); width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
.modal.wide { width: min(860px, 100%); }
.modal-head { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h2 { flex: 1; }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); }
#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--ink); color: white; padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow-lg); font-weight: 500; animation: rise .18s ease-out; }
.toast.bad { background: var(--bad); }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* ---------- login ---------- */
.login { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; }
.login .card { width: min(380px, 100%); padding: 28px; }
.login .brand { padding: 0 0 20px; }

/* ---------- printable document ---------- */
.print-bar { display: flex; gap: 8px; justify-content: center; padding: 16px; }
.paper { background: white; width: 210mm; min-height: 297mm; margin: 0 auto 40px; padding: 14mm 14mm 18mm; box-shadow: var(--shadow-lg); color: #111; font-size: 12px; }
.paper .p-head { display: grid; grid-template-columns: 1.1fr 1.3fr 1fr; gap: 14px; border: 1px solid #cfd5dd; border-radius: 6px; padding: 14px; align-items: center; }
.paper .p-logo img { max-width: 100%; max-height: 70px; object-fit: contain; }
.paper .p-logo .p-name { font-size: 20px; font-weight: 700; color: var(--accent); }
.paper .p-company { text-align: center; font-size: 11.5px; color: #333; line-height: 1.5; }
.paper .p-company b { display: block; font-size: 15px; color: #111; letter-spacing: .02em; margin-bottom: 2px; }
.paper .p-meta { font-size: 11.5px; display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; }
.paper .p-meta .p-no { grid-column: 1 / -1; font-size: 18px; font-weight: 700; color: #111; margin-bottom: 4px; }
.paper .p-band { background: var(--accent); color: white; font-weight: 650; letter-spacing: .06em; text-align: center; padding: 6px; border-radius: 4px; margin: 12px 0 0; font-size: 11.5px; }
.paper .p-client { border: 1px solid #cfd5dd; border-radius: 6px; padding: 12px 14px; margin-top: 10px; display: grid; grid-template-columns: auto 1fr auto 1fr; gap: 5px 12px; font-size: 12px; }
.paper .p-client span { color: #555; }
.paper table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.paper th { background: color-mix(in srgb, var(--accent) 14%, white); color: #111; font-weight: 650; text-align: left; padding: 6px 8px; border: 1px solid #cfd5dd; font-size: 11.5px; }
.paper td { padding: 5px 8px; border: 1px solid #dde2e8; font-size: 11.5px; }
.paper th.num, .paper td.num { text-align: right; }
.paper .p-foot { display: grid; grid-template-columns: 1fr 260px; gap: 20px; margin-top: 12px; }
.paper .p-totals { display: grid; grid-template-columns: 1fr auto; gap: 4px 0; font-size: 12px; }
.paper .p-totals .grand { font-size: 15px; font-weight: 700; border-top: 1.5px solid #111; padding-top: 6px; margin-top: 2px; }
.paper .p-totals .num { padding-left: 14px; }
.paper .p-notes { font-size: 11.5px; color: #333; white-space: pre-wrap; }
.paper .p-legal { margin-top: 26px; font-size: 10.5px; color: #666; text-align: center; border-top: 1px solid #e3e6ea; padding-top: 8px; }
.paper .p-stamp { display: inline-block; border: 2px solid var(--bad); color: var(--bad); font-weight: 800; padding: 2px 10px; border-radius: 4px; transform: rotate(-6deg); letter-spacing: .08em; }

@media print {
  @page { size: A4; margin: 0; }
  body { background: white; }
  .no-print, #toasts { display: none !important; }
  .paper { box-shadow: none; margin: 0; width: auto; min-height: auto; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .grid-4, .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 270px; z-index: 90; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .shell.menu-open .sidebar { transform: none; }
  .shell.menu-open::after { content: ''; position: fixed; inset: 0; background: rgba(16, 24, 40, .35); z-index: 80; }
  .topbar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 20; background: var(--panel); border-bottom: 1px solid var(--line); padding: 8px 12px; }
  .main { padding: 16px 16px 64px; }
  .grid-2 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .search { min-width: 0; flex: 1; }
  .paper { width: 100%; min-height: 0; padding: 16px; }
  .paper .p-head { grid-template-columns: 1fr; text-align: center; }
  .paper .p-client { grid-template-columns: auto 1fr; }
  .paper .p-foot { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
}
@media (max-width: 520px) {
  .grid-4, .quick { grid-template-columns: 1fr 1fr; }
  .kpi .value { font-size: 18px; }
  table.t th, table.t td { padding: 8px 6px; }
  table.t th:first-child, table.t td:first-child { padding-left: 12px; }
  h1 { font-size: 19px; }
}

/* show-password eye */
.pw { position: relative; }
.pw .input { padding-right: 40px; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 32px; height: 30px; border: 0; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; border-radius: 6px; }
.pw-eye:hover { background: var(--bg); color: var(--ink); }

.input[readonly], .input:disabled { background: var(--bg); color: var(--muted); }

/* bar chart: amount per month */
.bars { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px; align-items: end; height: 180px; padding: 16px 18px 12px; }
.bar-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.bar-track { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.bar { width: 100%; max-width: 36px; min-height: 2px; background: var(--accent); border-radius: 4px 4px 0 0; }
.bar-val { font-size: 11px; color: var(--muted); margin-bottom: 4px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bar-label { font-size: 11px; color: var(--faint); margin-top: 6px; text-transform: capitalize; }
@media (max-width: 640px) { .bar-val { display: none; } .bars { gap: 4px; padding: 12px; } }

@media (max-width: 1100px) { .hide-md { display: none; } }

/* bar above the screens */
.top-note { display: flex; align-items: center; gap: 10px; padding: 8px 16px; background: #1f2937; color: #fff; font-size: 13px; position: sticky; top: 0; z-index: 30; }
.top-note .btn { background: #fff; color: #111; border-color: #fff; }

/* ---------- public home page ---------- */
.lp { background: var(--panel); font-size: 15px; line-height: 1.55; min-height: 100vh; }
.lp-wrap { width: min(1120px, 100%); margin: 0 auto; padding: 0 24px; }
.lp-narrow { width: min(760px, 100%); }
.lp-head { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--panel) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.lp-head-in { display: flex; align-items: center; gap: 20px; height: 64px; }
.lp-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; color: var(--ink); text-decoration: none !important; white-space: nowrap; }
.lp-logo .brand-logo { width: 30px; height: 30px; font-size: 12px; }
.lp-nav { display: flex; gap: 4px; flex: 1; }
.lp-nav button { border: 0; background: none; font: inherit; font-size: 14px; color: var(--muted); padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.lp-nav button:hover { color: var(--ink); background: var(--bg); }
.lp-head-actions { gap: 8px; }
.btn.lg { height: 46px; padding: 0 22px; font-size: 15px; border-radius: 10px; }
.lp-hero { background: radial-gradient(1000px 500px at 85% -10%, var(--accent-soft), transparent 70%), var(--panel); }
.lp-hero-in { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; padding-top: 72px; padding-bottom: 84px; }
.lp-eyebrow { display: inline-block; font-size: 13px; font-weight: 650; color: var(--accent-ink); background: var(--accent-soft); padding: 4px 12px; border-radius: 99px; margin-bottom: 18px; }
.lp-hero h1 { font-size: clamp(32px, 4.6vw, 50px); line-height: 1.08; letter-spacing: -.025em; font-weight: 750; text-wrap: balance; }
.lp-lead { font-size: 18px; color: var(--muted); margin: 20px 0 28px; max-width: 34em; }
.lp-ctas { gap: 12px; }
.lp-trust { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; margin: 18px 0 0; }
.lp-trust svg { color: var(--ok); width: 16px; height: 16px; }
.lp-shot { border: 1px solid var(--line-strong); border-radius: 14px; background: var(--bg); box-shadow: 0 30px 60px -20px rgba(16, 24, 40, .28); overflow: hidden; }
.lp-shot-bar { display: flex; gap: 6px; padding: 10px 12px; background: var(--panel); border-bottom: 1px solid var(--line); }
.lp-shot-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.lp-shot-body { display: flex; min-height: 300px; }
.lp-shot-side { display: flex; flex-direction: column; gap: 6px; padding: 12px 8px; background: var(--panel); border-right: 1px solid var(--line); }
.lp-shot-side span { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; color: var(--faint); }
.lp-shot-side span.on { background: var(--accent-soft); color: var(--accent-ink); }
.lp-shot-side svg { width: 16px; height: 16px; }
.lp-shot-main { flex: 1; padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.lp-shot-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.lp-shot-kpis div { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.lp-shot-kpis small { display: block; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-shot-kpis b { font-size: 17px; letter-spacing: -.01em; white-space: nowrap; }
.lp-shot-kpis b.ok { color: var(--ok); }
.lp-shot-kpis b.warn { color: var(--warn); }
.lp-shot-table { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; font-size: 13px; }
.lp-shot-table .hd, .lp-shot-table .rw { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; }
.lp-shot-table .hd { color: var(--muted); font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--line); }
.lp-shot-table .rw + .rw { border-top: 1px solid var(--line); }
.lp-shot-table .rw span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-shot-table .rw em { display: block; height: 4px; margin-top: 6px; border-radius: 4px; background: var(--accent); opacity: .75; }
.lp-shot-table .rw b { color: var(--ok); font-variant-numeric: tabular-nums; }
.lp-sec { padding: 88px 0; }
.lp-alt { background: var(--bg); }
.lp-h2 { font-size: clamp(26px, 3.2vw, 34px); line-height: 1.15; letter-spacing: -.02em; font-weight: 720; text-align: center; text-wrap: balance; }
.lp-sub { color: var(--muted); font-size: 17px; text-align: center; max-width: 36em; margin: 12px auto 0; }
.lp-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 48px; }
.lp-feat { padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.lp-feat h3 { font-size: 17px; margin: 14px 0 6px; }
.lp-feat p { margin: 0; color: var(--muted); }
.lp-ic { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.lp-ic svg { width: 21px; height: 21px; }
.lp-ic.ok { background: var(--ok-soft); color: var(--ok); width: 52px; height: 52px; margin: 0 auto 16px; border-radius: 50%; }
.lp-steps { list-style: none; padding: 0; margin: 48px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.lp-steps h3 { font-size: 17px; margin: 14px 0 6px; }
.lp-steps p { margin: 0; color: var(--muted); }
.lp-num { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: white; font-weight: 700; }
.lp-plans { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; margin-top: 48px; align-items: stretch; }
.lp-plan { position: relative; flex: 1 1 280px; max-width: 340px; display: flex; flex-direction: column; padding: 28px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.lp-plan.featured { border: 2px solid var(--accent); box-shadow: 0 20px 40px -20px color-mix(in srgb, var(--accent) 45%, transparent); }
.lp-badge { position: absolute; top: -12px; left: 28px; background: var(--accent); color: white; font-size: 12px; font-weight: 650; padding: 3px 12px; border-radius: 99px; }
.lp-plan h3 { font-size: 18px; }
.lp-price { display: flex; align-items: baseline; gap: 4px; margin: 14px 0 20px; }
.lp-price span { color: var(--muted); font-weight: 600; }
.lp-price b { font-size: 44px; letter-spacing: -.03em; line-height: 1; }
.lp-price small { color: var(--muted); font-size: 15px; }
.lp-plan ul { list-style: none; padding: 0; margin: 0 0 28px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.lp-plan li { display: flex; gap: 10px; align-items: flex-start; }
.lp-plan li svg { color: var(--ok); width: 18px; height: 18px; margin-top: 2px; }
.lp-faq { margin-top: 40px; display: flex; flex-direction: column; gap: 10px; }
.lp-faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.lp-faq summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; font-weight: 600; cursor: pointer; list-style: none; }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary svg { transition: transform .15s; color: var(--muted); }
.lp-faq details[open] summary svg { transform: rotate(90deg); }
.lp-faq p { margin: 0; padding: 0 20px 18px; color: var(--muted); }
.lp-form-card { padding: 36px; }
.lp-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.lp-form .full { grid-column: 1 / -1; }
.lp-form textarea { height: auto; padding-top: 8px; resize: vertical; }
.lp-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.lp-done { text-align: center; padding: 20px 0; }
.lp-foot { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: 14px; }
@media (max-width: 900px) {
  .lp-hero-in { grid-template-columns: 1fr; gap: 40px; padding-top: 48px; padding-bottom: 56px; }
  .lp-grid3, .lp-steps { grid-template-columns: 1fr 1fr; }
  .lp-nav { display: none; }
  .lp-head-actions { margin-left: auto; }
}
@media (max-width: 600px) {
  .lp-wrap { padding: 0 16px; }
  .lp-sec { padding: 56px 0; }
  .lp-grid3, .lp-steps, .lp-form { grid-template-columns: 1fr; }
  .lp-lead { font-size: 16px; }
  .lp-form-card { padding: 22px 18px; }
  .lp-shot-kpis { grid-template-columns: 1fr 1fr; }
  .hide-xs { display: none !important; }
}

/* ---------- courses: students' area ---------- */
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.progress { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--accent); }
.school { min-height: 100vh; }
.school-top { display: flex; align-items: center; gap: 12px; padding: 10px 24px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.school-top .brand { display: flex; align-items: center; gap: 10px; padding: 0; }
.school-main { max-width: 1200px; margin: 0 auto; padding: 24px; }
.preview-bar { background: var(--warn-soft); color: var(--warn); padding: 8px 24px; font-size: 13px; display: flex; gap: 8px; align-items: center; }
.course-card { text-decoration: none; color: inherit; overflow: hidden; transition: box-shadow .15s; }
.course-card:hover { box-shadow: var(--shadow-lg); }
.course-cover { height: 120px; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); }
.course-cover .i { width: 40px; height: 40px; }
.player { display: grid; grid-template-columns: 300px 1fr; gap: 20px; align-items: start; }
.syllabus { position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow: auto; }
.syl-sec { padding: 12px 16px 6px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.syl-item { display: flex; align-items: center; gap: 10px; padding: 8px 16px; color: inherit; text-decoration: none; font-size: 14px; }
.syl-item:hover { background: var(--bg); }
.syl-item.on { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.syl-check { width: 18px; height: 18px; flex: none; border-radius: 50%; border: 1.5px solid var(--line-strong); display: flex; align-items: center; justify-content: center; }
.syl-check.done { background: var(--ok); border-color: var(--ok); color: white; }
.syl-check .i { width: 12px; height: 12px; }
.video-box { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; }
.video-box iframe, .video-box video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lesson-body { line-height: 1.65; font-size: 15px; }
.lesson-body > :first-child { margin-top: 0; } .lesson-body > :last-child { margin-bottom: 0; }
@media (max-width: 860px) {
  .player { grid-template-columns: 1fr; }
  .syllabus { position: static; max-height: none; order: 2; }
  .school-main { padding: 16px; } .school-top { padding: 10px 16px; }
}

/* ---------- gym: front desk ---------- */
.list-item.click { cursor: pointer; }
.list-item.click:hover { background: #f8f9fb; }
.checkin { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.checkin-search { display: block; }
.checkin-search .input { height: 52px; font-size: 18px; padding-left: 40px; }
.checkin-search .i { top: 17px; left: 13px; }
.checkin-match { width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line); font: inherit; text-align: left; cursor: pointer; }
.checkin-match:hover { background: #f8f9fb; }
.checkin-card { padding: 20px 22px; border-left: 6px solid var(--line-strong); }
.checkin-card.ok { border-left-color: var(--ok); background: var(--ok-soft); }
.checkin-card.bad { border-left-color: var(--bad); background: var(--bad-soft); }
.checkin-big { display: flex; align-items: center; gap: 10px; font-size: 26px; font-weight: 700; }
.checkin-card.ok .checkin-big { color: var(--ok); } .checkin-card.bad .checkin-big { color: var(--bad); }
.checkin-big .i { width: 30px; height: 30px; }
.checkin-name { font-size: 18px; font-weight: 600; margin: 6px 0 4px; }
.checkin-name a { color: inherit; }
@media (max-width: 860px) { .checkin { grid-template-columns: 1fr; } }

/* ---------- Services: appointment calendar ---------- */
.svc-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; vertical-align: middle; }
.svc-daybar { gap: 8px; margin-bottom: 12px; align-items: center; }
.svc-daytitle { display: inline-block; margin-left: 6px; }
.svc-daytitle::first-letter { text-transform: uppercase; }
.svc-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; }
.ag-wrap { overflow-x: auto; }
.ag { min-width: calc(56px + var(--cols) * 150px); }
.ag-row { display: grid; grid-template-columns: 56px repeat(var(--cols), minmax(150px, 1fr)); }
.ag-head { position: sticky; top: 0; z-index: 2; background: var(--panel); border-bottom: 1px solid var(--line); }
.ag-colhead { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-weight: 600; border-left: 1px solid var(--line); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ag-times { position: relative; }
.ag-times div { position: absolute; right: 8px; transform: translateY(-50%); font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
.ag-times div:first-child { transform: none; top: 2px !important; }
.ag-col { position: relative; border-left: 1px solid var(--line); cursor: copy;
  background: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px 36px), repeating-linear-gradient(to bottom, transparent 0 18px, #f3f4f6 18px 19px, transparent 19px 36px); }
.ag-col:hover { background-color: #fbfcfd; }
.ag-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--bad); z-index: 1; pointer-events: none; }
.ag-ap { position: absolute; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; overflow: hidden; text-align: left; cursor: pointer;
  padding: 3px 7px; border: 0; border-left: 3px solid var(--c); border-radius: 6px; font: inherit; font-size: 12px; line-height: 1.3; color: var(--ink);
  background: color-mix(in srgb, var(--c) 14%, white); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.ag-ap:hover { background: color-mix(in srgb, var(--c) 22%, white); }
.ag-ap b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ag-ap b .i { width: 13px; height: 13px; vertical-align: -2px; }
.ag-ap span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ag-ap.done { opacity: .62; }
.ag-ap.no_show { background: #f3f4f6; border-left-color: var(--faint); }
.ag-ap.no_show b { text-decoration: line-through; color: var(--muted); }
.ag-ap.short { flex-direction: row; align-items: center; gap: 6px; padding-top: 0; padding-bottom: 0; }
.ag-ap.short b { flex: none; max-width: 70%; }
.svc-lines td { vertical-align: top; }
.svc-lines .w-desc { min-width: 220px; }

/* ---------- Electronic invoice, printed version (KuDE) ---------- */
.kude { font-size: 11.5px; }
.kude-test { text-align: center; font-weight: 700; color: var(--bad); border: 1px dashed var(--bad); border-radius: 4px; padding: 4px; margin-bottom: 10px; }
.kude-head { display: grid; grid-template-columns: 1fr 220px; gap: 12px; }
.kude-emitter { display: flex; gap: 12px; align-items: flex-start; border: 1px solid #cfd5dd; border-radius: 6px; padding: 12px; line-height: 1.5; }
.kude-emitter img { max-width: 110px; max-height: 64px; object-fit: contain; }
.kude-emitter b { font-size: 14px; }
.kude-box { border: 1px solid #cfd5dd; border-radius: 6px; padding: 12px; line-height: 1.6; }
.kude-type { margin-top: 6px; background: var(--accent); color: #fff; text-align: center; font-weight: 700; letter-spacing: .05em; border-radius: 4px; padding: 3px; }
.kude-no { text-align: center; font-size: 17px; font-weight: 700; margin-top: 4px; }
.kude-rec { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; border: 1px solid #cfd5dd; border-radius: 6px; padding: 10px 12px; margin: 10px 0; }
.kude-rec span { color: #555; }
.kude-items { width: 100%; border-collapse: collapse; }
.kude-items th { background: color-mix(in srgb, var(--accent) 12%, white); font-weight: 650; text-align: left; padding: 6px; border: 1px solid #cfd5dd; }
.kude-items td { padding: 5px 6px; border: 1px solid #e1e5ea; vertical-align: top; }
.kude-items .num { text-align: right; white-space: nowrap; }
.kude-items tfoot td { font-weight: 600; }
.kude-total td { font-size: 13px; font-weight: 700 !important; }
.kude-foot { display: flex; gap: 16px; align-items: center; margin-top: 14px; border: 1px solid #cfd5dd; border-radius: 6px; padding: 10px; }
.kude-qr svg { display: block; }
.kude-cdc { font-family: ui-monospace, Consolas, monospace; letter-spacing: .02em; }
.ei-doc { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
