/* PharmaCare — design system */
:root {
  --primary: #b5651d;
  --primary-600: color-mix(in srgb, var(--primary) 85%, black);
  --primary-700: color-mix(in srgb, var(--primary) 65%, black);
  --primary-50: color-mix(in srgb, var(--primary) 8%, white);
  --primary-100: color-mix(in srgb, var(--primary) 16%, white);
  --secondary: var(--primary);
  --secondary-50: color-mix(in srgb, var(--secondary) 10%, white);
  --secondary-ink: color-mix(in srgb, var(--secondary) 78%, black);
  --bg: #f6f4f1;
  --surface: #ffffff;
  --surface-2: #faf9f7;
  --border: #e8e3dc;
  --text: #1f1a14;
  --muted: #7a7065;
  --success: #16a34a; --success-bg: #e8f7ee;
  --danger: #dc2626; --danger-bg: #fdecec;
  --warning: #d97706; --warning-bg: #fef4e2;
  --info: #2563eb; --info-bg: #e8effd;
  --purple: #7c3aed; --purple-bg: #f1ebfe;
  --shadow: 0 1px 2px rgba(40, 25, 10, .05), 0 4px 16px rgba(40, 25, 10, .05);
  --shadow-lg: 0 20px 50px rgba(30, 20, 10, .2);
  --radius: 14px;
  --radius-sm: calc(var(--radius) * .72);
  --sidebar: 248px;
  --font: 'Inter', 'Noto Sans Khmer', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --primary-50: color-mix(in srgb, var(--primary) 14%, #17130f);
  --primary-100: color-mix(in srgb, var(--primary) 26%, #17130f);
  --secondary-50: color-mix(in srgb, var(--secondary) 16%, #17130f);
  --secondary-ink: color-mix(in srgb, var(--secondary) 65%, white);
  --bg: #120f0c; --surface: #1b1713; --surface-2: #221d18; --border: #342c24;
  --text: #f2ece5; --muted: #a39686;
  --success-bg: #0f2a1a; --danger-bg: #331414; --warning-bg: #33240c; --info-bg: #13203d; --purple-bg: #251a3d;
  --shadow: 0 1px 2px rgba(0,0,0,.3); --shadow-lg: 0 20px 50px rgba(0,0,0,.6);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: calc(14px * var(--fs, 1)); line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
h1 { font-size: 22px; font-weight: 700; }
h2 { font-size: 17px; font-weight: 650; }
h3 { font-size: 15px; font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.bold { font-weight: 650; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.text-success { color: var(--success); } .text-danger { color: var(--danger); } .text-warning { color: var(--warning); } .text-info { color: var(--info); }
.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; vertical-align: middle; }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar); background: var(--surface); border-right: 1px solid var(--border); position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; z-index: 40; transition: transform .2s; }
.brand { background: linear-gradient(135deg, var(--primary), var(--primary-700)); color: #fff; padding: 18px 16px 16px; }
.brand-row { display: flex; align-items: center; gap: 12px; }
.brand-logo { width: 46px; height: 46px; border-radius: 50%; background: #fff; display: grid; place-items: center; overflow: hidden; flex: none; color: var(--primary); }
.brand-logo img { width: 100%; height: 100%; object-fit: cover; }
.brand-name { font-weight: 700; font-size: 15px; line-height: 1.2; }
.brand-sub { font-size: 12px; opacity: .85; margin-top: 2px; }
.brand-user { margin-top: 12px; border: 1px solid rgba(255,255,255,.4); border-radius: 10px; padding: 6px 10px; font-size: 12px; display: flex; align-items: center; gap: 8px; }
.nav { flex: 1; overflow-y: auto; padding: 10px 8px 20px; }
.nav-section { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 14px 12px 6px; font-weight: 600; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--text); font-weight: 500; margin: 1px 0; }
.nav a svg { color: var(--primary); }
.nav a:hover { background: var(--primary-50); text-decoration: none; }
.nav a.active { background: var(--primary); color: #fff; }
.nav a.active svg { color: #fff; }
.nav .count { margin-left: auto; background: var(--danger); color: #fff; border-radius: 99px; font-size: 11px; padding: 0 7px; font-weight: 600; }
.main { flex: 1; margin-left: var(--sidebar); min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 60px; background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; padding: 0 20px; position: sticky; top: 0; z-index: 30; }
.topbar .title { font-size: 18px; font-weight: 650; }
.topbar .spacer { flex: 1; }
.menu-btn { display: none; }
.content { padding: 20px; flex: 1; min-width: 0; }
.backdrop { display: none; }

@media (max-width: 960px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .backdrop.show { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 35; }
  .main { margin-left: 0; }
  .menu-btn { display: inline-flex; }
  .content { padding: 14px; }
  .topbar { padding: 0 12px; }
  .topbar .hide-sm { display: none; }
}

/* ---------- Primitives ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.card-head h2, .card-head h3 { flex: 1; }
.card-body { padding: 16px 18px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.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-auto { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.span2 { grid-column: span 2; }
@media (max-width: 1200px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } .span2 { grid-column: auto; } }
.mb { margin-bottom: 16px; } .mt { margin-top: 16px; } .mb-s { margin-bottom: 8px; } .mt-s { margin-top: 8px; }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { flex: 1; }
.divider { height: 1px; background: var(--border); margin: 12px 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-weight: 550; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, transform .05s; }
.btn:hover { background: var(--surface-2); border-color: color-mix(in srgb, var(--border) 50%, var(--primary)); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-600); }
.btn.success { background: var(--success); border-color: var(--success); color: #fff; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--primary-50); }
.btn.soft { background: var(--primary-50); border-color: transparent; color: var(--primary-700); }
:root[data-theme="dark"] .btn.soft { color: color-mix(in srgb, var(--primary) 60%, white); }
.btn.soft-info { background: var(--info-bg); border-color: transparent; color: var(--info); }
.btn.soft-danger { background: var(--danger-bg); border-color: transparent; color: var(--danger); }
.btn.soft-success { background: var(--success-bg); border-color: transparent; color: var(--success); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn.lg { height: 48px; padding: 0 22px; font-size: 16px; border-radius: 12px; }
.btn.icon { width: 38px; padding: 0; }
.btn.icon.sm { width: 30px; }
.btn.block { width: 100%; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; border: 1px solid transparent; white-space: nowrap; }
.badge.dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.success { background: var(--success-bg); color: var(--success); border-color: color-mix(in srgb, var(--success) 25%, transparent); }
.badge.danger { background: var(--danger-bg); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
.badge.warning { background: var(--warning-bg); color: var(--warning); border-color: color-mix(in srgb, var(--warning) 25%, transparent); }
.badge.info { background: var(--info-bg); color: var(--info); border-color: color-mix(in srgb, var(--info) 25%, transparent); }
.badge.purple { background: var(--purple-bg); color: var(--purple); }
.badge.neutral { background: var(--surface-2); color: var(--muted); border-color: var(--border); }
.badge.primary { background: var(--primary-50); color: var(--primary); border-color: var(--primary-100); }

/* forms */
label.f { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 550; color: var(--muted); min-width: 0; }
.input, select.input, textarea.input { height: 38px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 11px; font: inherit; color: var(--text); background: var(--surface); width: 100%; outline: none; transition: border-color .15s, box-shadow .15s; }
textarea.input { height: auto; min-height: 76px; padding: 9px 11px; resize: vertical; }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-100); }
.input.sm { height: 32px; font-size: 13px; border-radius: 8px; }
.input-group { display: flex; align-items: stretch; }
.input-group .input { border-radius: 10px 0 0 10px; }
.input-group .btn { border-radius: 0 10px 10px 0; border-left: 0; height: auto; }
.input-icon { position: relative; }
.input-icon svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icon .input { padding-left: 36px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 500; color: var(--text); font-size: 14px; }
.check input { width: 16px; height: 16px; accent-color: var(--primary); }
.switch { position: relative; width: 40px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--border); border-radius: 99px; cursor: pointer; transition: .2s; }
.switch span::before { content: ''; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::before { transform: translateX(18px); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.fieldset-title { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; color: var(--primary); font-weight: 600; font-size: 13px; margin-top: 6px; }
.fieldset-title::before, .fieldset-title::after { content: ''; height: 1px; background: var(--primary-100); flex: 1; }

/* tables */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; }
.t th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; position: sticky; top: 0; }
.t th.sortable { cursor: pointer; user-select: none; }
.t th.sortable:hover { color: var(--text); }
.t td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.t tbody tr:hover { background: var(--surface-2); }
.t tr.clickable { cursor: pointer; }
.t td.num, .t th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.t tfoot td { font-weight: 700; background: var(--surface-2); border-top: 2px solid var(--border); }
.t.compact td, .t.compact th { padding: 7px 10px; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty svg { width: 42px; height: 42px; opacity: .45; margin-bottom: 8px; }

/* KPI tiles */
.kpi { padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; position: relative; overflow: hidden; }
.kpi .label { color: var(--muted); font-size: 12.5px; font-weight: 550; display: flex; align-items: center; gap: 8px; }
.kpi .value { font-size: 24px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: 12px; color: var(--muted); }
.kpi .ico { position: absolute; right: 14px; top: 14px; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); }
.delta-up { color: var(--success); font-weight: 600; } .delta-down { color: var(--danger); font-weight: 600; }

/* tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.tabs button { background: none; border: 0; padding: 10px 14px; font: inherit; font-weight: 550; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; }
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--primary); border-bottom-color: var(--primary); }
.tabs .count { background: var(--surface-2); border: 1px solid var(--border); border-radius: 99px; font-size: 11px; padding: 0 7px; }
.tabs button.active .count { background: var(--primary-50); border-color: var(--primary-100); }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 2px; }
.chip { border: 1px solid var(--border); background: var(--surface); padding: 5px 12px; border-radius: 99px; font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; color: var(--text); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* filter bar */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 14px; }
.filters .input { width: auto; min-width: 140px; }
.filters .search { flex: 1; min-width: 200px; }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(20, 14, 8, .45); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px; overflow-y: auto; animation: fade .15s; }
.modal { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); width: 100%; max-width: 560px; animation: pop .18s; display: flex; flex-direction: column; max-height: 90vh; }
.modal.lg { max-width: 820px; } .modal.xl { max-width: 1100px; } .modal.sm { max-width: 420px; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; background: var(--primary); color: #fff; border-radius: 16px 16px 0 0; }
.modal-head h2 { flex: 1; font-size: 16px; }
.modal-head .sub { font-size: 12px; opacity: .85; font-weight: 400; }
.modal-head .btn { color: #fff; }
.modal-head .btn:hover { background: rgba(255,255,255,.15); }
.modal-body { padding: 18px; overflow-y: auto; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 12px 18px; border-top: 1px solid var(--border); flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }

/* drawer */
.drawer-bg { position: fixed; inset: 0; background: rgba(20,14,8,.35); z-index: 90; animation: fade .15s; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(620px, 100vw); background: var(--surface); z-index: 91; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: slide .2s; }
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.drawer-head h2 { flex: 1; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px; }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }

/* toast */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: #1f1a14; color: #fff; padding: 11px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); display: flex; gap: 10px; align-items: center; min-width: 240px; max-width: 420px; animation: pop .2s; }
.toast.success { background: #166534; } .toast.error { background: #991b1b; } .toast.warning { background: #92400e; }

/* list-items like mobile app */
.list-item { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.list-item:hover { border-color: var(--primary-100); box-shadow: var(--shadow); }
.thumb { width: 54px; height: 54px; border-radius: 12px; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; overflow: hidden; flex: none; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb svg { width: 26px; height: 26px; }
.thumb .p-art { width: 100%; height: 100%; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--primary-100); color: var(--primary-700); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
:root[data-theme="dark"] .avatar { color: #fff; }

/* info rows (order detail) */
.info-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.info-row:last-child { border-bottom: 0; }
.info-row .k { color: var(--muted); }
.info-row .v { font-weight: 550; text-align: right; }
.info-row.editable { cursor: pointer; }
.info-row.editable:hover .v { color: var(--primary); }

/* ---------- POS ---------- */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 16px; height: calc(100vh - 60px - 40px); height: calc(100svh - 60px - 40px); }
.pos-left { display: flex; flex-direction: column; min-height: 0; gap: 12px; }
.pos-products { flex: 1; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 10px; align-content: start; padding: 2px; }
.pos-products.list { grid-template-columns: 1fr; }
.pcard { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 10px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; transition: border-color .12s, transform .05s; position: relative; user-select: none; }
.pcard:hover { border-color: var(--primary); }
.pcard:active { transform: scale(.98); }
.pcard.out { opacity: .55; }
.pcard .pimg { height: 74px; border-radius: 10px; background: var(--primary-50); display: grid; place-items: center; color: var(--primary); overflow: hidden; }
.pcard .pimg img { width: 100%; height: 100%; object-fit: cover; }
.pcard .pimg .p-art { width: 100%; height: 100%; }
.pcard .pname { font-weight: 600; font-size: 13px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 32px; }
.pcard .pprice { color: var(--primary); font-weight: 700; }
.pcard .rx { position: absolute; top: 8px; left: 8px; }
.pos-products.list .pcard { flex-direction: row; align-items: center; }
.pos-products.list .pcard .pimg { width: 44px; height: 44px; flex: none; }
.pos-products.list .pcard .pname { min-height: 0; flex: 1; }
.pos-cart { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.cart-lines { flex: 1; overflow-y: auto; padding: 6px 12px; }
.cart-line { padding: 10px 2px; border-bottom: 1px dashed var(--border); display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; }
.cart-line .name { font-weight: 600; font-size: 13.5px; }
.cart-line .controls { grid-column: 1 / -1; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; }
.qty button { width: 28px; height: 30px; border: 0; background: var(--surface-2); cursor: pointer; color: var(--text); font-size: 16px; }
.qty input { width: 48px; height: 30px; border: 0; text-align: center; font: inherit; background: var(--surface); color: var(--text); outline: none; }
.cart-totals { padding: 12px 16px; border-top: 1px solid var(--border); background: var(--surface-2); display: flex; flex-direction: column; gap: 6px; }
.cart-totals .line { display: flex; justify-content: space-between; }
.cart-totals .grand { font-size: 22px; font-weight: 800; color: var(--primary); }
@media (max-width: 1100px) { .pos { grid-template-columns: 1fr; height: auto; } .pos-products { max-height: 55vh; max-height: 55svh; } .pos-cart { min-height: 70vh; min-height: 70svh; } }

/* charts */
.chart-box { position: relative; height: 280px; }
.chart-box.sm { height: 220px; }
.heat { display: grid; grid-template-columns: 40px repeat(24, minmax(14px, 1fr)); gap: 3px; font-size: 10.5px; color: var(--muted); }
.heat div.cell { aspect-ratio: 1; border-radius: 4px; background: var(--primary); }

/* login */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; position: relative; overflow: hidden; background: var(--bg); --spd: 1; }
.login-wrap.side-left { grid-template-columns: 1fr 1.15fr; }
.login-wrap.side-left .login-hero { order: 2; }
.login-hero { position: relative; overflow: hidden; color: #fff; background: linear-gradient(140deg, var(--primary), var(--primary-700)); min-height: 100%; }
.lh-photo { position: absolute; inset: 0; background-size: cover; background-repeat: no-repeat; will-change: transform; }
.lh-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, color-mix(in srgb, var(--ov-color) calc(var(--ov-op) * 70%), transparent) 0%, color-mix(in srgb, var(--ov-color) calc(var(--ov-op) * 100%), transparent) 55%, color-mix(in srgb, var(--ov-color) calc(min(1, var(--ov-op) * 1.6) * 100%), transparent) 100%); }
.lh-content { position: relative; z-index: 2; height: 100%; min-height: inherit; padding: 44px 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 22px; }
.lh-title { font-size: 36px; margin: 14px 0 4px; text-shadow: 0 2px 16px rgba(0,0,0,.35); min-height: 1.25em; }
.lh-local { font-size: 17px; opacity: .92; text-shadow: 0 1px 8px rgba(0,0,0,.35); }
.lh-sub { opacity: .9; max-width: 480px; font-size: 15px; text-shadow: 0 1px 8px rgba(0,0,0,.4); }
.lh-foot { opacity: .75; }
.login-hero .feat { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 520px; }
.login-hero .feat div { background: rgba(255,255,255,.14); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border-radius: 12px; padding: 10px 12px; font-size: 13px; display: flex; align-items: center; gap: 10px; }
.login-form { display: grid; place-items: center; padding: 32px; background: var(--surface); position: relative; z-index: 3; }
.login-form form { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 14px; }

/* full-screen layout: photo fills the page, form floats as a glass card */
.login-wrap.layout-full { display: block; }
.login-wrap.layout-full .login-hero { position: absolute; inset: 0; }
.login-wrap.layout-full .lh-content { max-width: 56%; }
.login-wrap.layout-full .login-form { position: absolute; top: 50%; transform: translateY(-50%); right: 6%; width: 400px; border-radius: 20px; padding: 30px;
  background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--shadow-lg); }
.login-wrap.layout-full.side-left .login-form { right: auto; left: 6%; }
.login-wrap.layout-full.side-left .lh-content { margin-left: auto; }

/* photo effects */
.lh-photo.fx-kenburns { animation: kenburns calc(32s * var(--spd)) ease-in-out infinite alternate; }
.lh-photo.fx-zoom { animation: breathe calc(14s * var(--spd)) ease-in-out infinite alternate; }
.lh-photo.fx-pan { inset: 0 -8%; animation: pan calc(26s * var(--spd)) ease-in-out infinite alternate; }
@keyframes kenburns { 0% { transform: scale(1) translate(0, 0); } 50% { transform: scale(1.12) translate(-2%, -1.5%); } 100% { transform: scale(1.06) translate(2%, 1%); } }
@keyframes breathe { from { transform: scale(1); } to { transform: scale(1.09); } }
@keyframes pan { from { transform: translateX(-4%); } to { transform: translateX(4%); } }

/* background animations */
.lh-anim { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.anim-float span { position: absolute; bottom: -80px; color: rgba(255,255,255,.55); animation: floatUp linear infinite; }
.anim-float span svg { width: 100%; height: 100%; stroke-width: 1.6; }
@keyframes floatUp { 0% { transform: translateY(0) rotate(0); opacity: 0; } 10% { opacity: .9; } 90% { opacity: .6; } 100% { transform: translateY(-115vh) rotate(260deg); opacity: 0; } }
.anim-bubbles span { position: absolute; bottom: -90px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.55), rgba(255,255,255,.08) 60%, transparent 70%); border: 1px solid rgba(255,255,255,.35); animation: bubble ease-in infinite; }
@keyframes bubble { 0% { transform: translate(0, 0) scale(.6); opacity: 0; } 15% { opacity: 1; } 50% { transform: translate(18px, -55vh) scale(1); } 100% { transform: translate(-12px, -112vh) scale(1.1); opacity: 0; } }
.anim-waves .blob { position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%; filter: blur(60px); opacity: .45; mix-blend-mode: screen; }
.anim-waves .b1 { background: var(--primary); top: -18%; left: -12%; animation: blob1 calc(18s * var(--spd)) ease-in-out infinite alternate; }
.anim-waves .b2 { background: #f59e0b; bottom: -20%; right: -14%; animation: blob2 calc(22s * var(--spd)) ease-in-out infinite alternate; }
.anim-waves .b3 { background: #ec4899; top: 30%; left: 35%; width: 30vmax; height: 30vmax; opacity: .25; animation: blob1 calc(26s * var(--spd)) ease-in-out infinite alternate-reverse; }
@keyframes blob1 { to { transform: translate(18%, 22%) scale(1.15); } }
@keyframes blob2 { to { transform: translate(-22%, -16%) scale(.9); } }
.anim-waves .wave { position: absolute; bottom: 0; left: 0; width: 200%; height: 110px; fill: rgba(255,255,255,.14); }
.anim-waves .w1 { animation: waveX calc(14s * var(--spd)) linear infinite; }
.anim-waves .w2 { fill: rgba(255,255,255,.09); height: 140px; animation: waveX calc(22s * var(--spd)) linear infinite reverse; }
@keyframes waveX { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* animated message block */
.lh-block { position: relative; max-width: 460px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.28); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-radius: 16px; padding: 18px 20px 14px; box-shadow: 0 10px 30px rgba(0,0,0,.18); overflow: hidden; }
.lh-msgs { position: relative; height: 52px; perspective: 600px; }
.lh-msg { position: absolute; inset: 0; display: flex; align-items: center; font-size: 18px; font-weight: 650; text-shadow: 0 1px 6px rgba(0,0,0,.3); opacity: 0; transition: opacity .6s, transform .6s cubic-bezier(.2,.8,.2,1); }
.lh-msg.active { opacity: 1; transform: none; }
.style-slide .lh-msg { transform: translateY(100%); } .style-slide .lh-msg.leaving { transform: translateY(-100%); }
.style-fade .lh-msg { transform: none; }
.style-flip .lh-msg { transform: rotateX(-90deg); transform-origin: 50% 50%; backface-visibility: hidden; } .style-flip .lh-msg.leaving { transform: rotateX(90deg); }
.style-zoom .lh-msg { transform: scale(.7); } .style-zoom .lh-msg.leaving { transform: scale(1.25); }
.style-slide .lh-msg.active, .style-flip .lh-msg.active, .style-zoom .lh-msg.active { transform: none; }
.lh-dots { display: flex; gap: 6px; margin-top: 10px; }
.lh-dots button { width: 8px; height: 8px; border-radius: 99px; border: 0; padding: 0; background: rgba(255,255,255,.45); cursor: pointer; transition: width .3s, background .3s; }
.lh-dots button.on { width: 22px; background: #fff; }
.lh-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.15); }
.lh-progress > div { height: 100%; width: 0; background: rgba(255,255,255,.8); }

/* text effects */
.fx-text-fade .lh-top > * { animation: fadeUp .9s both; }
.fx-text-fade .lh-top > *:nth-child(2) { animation-delay: .15s; } .fx-text-fade .lh-top > *:nth-child(3) { animation-delay: .3s; } .fx-text-fade .lh-top > *:nth-child(4) { animation-delay: .45s; }
.fx-text-slide .lh-top > * { animation: slideIn .8s cubic-bezier(.2,.8,.2,1) both; }
.fx-text-slide .lh-top > *:nth-child(2) { animation-delay: .12s; } .fx-text-slide .lh-top > *:nth-child(3) { animation-delay: .24s; } .fx-text-slide .lh-top > *:nth-child(4) { animation-delay: .36s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-40px); } }
.lh-title.typing::after { content: ''; display: inline-block; width: 3px; height: .9em; background: #fff; margin-left: 4px; vertical-align: -2px; animation: caret 1s steps(1) infinite; }
.lh-title.typed::after { animation: caret 1s steps(1) 3 forwards; }
@keyframes caret { 50% { opacity: 0; } }

/* preview (settings) */
.login-wrap.preview { min-height: 0; height: 100%; }
.login-preview-box { position: relative; overflow: hidden; border-radius: 14px; border: 1px solid var(--border); box-shadow: var(--shadow); background: var(--bg); }
.login-preview-box > .scaler { position: absolute; top: 0; left: 0; width: 1280px; height: 760px; transform-origin: 0 0; pointer-events: none; }
.login-preview-box .lh-anim span { bottom: -60px; }

/* tablet & phone: photo on top, form below */
@media (max-width: 860px) {
  .login-wrap, .login-wrap.side-left { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .login-wrap.side-left .login-hero { order: 0; }
  .login-hero { min-height: 46vh; }
  .lh-content { padding: 26px 22px; min-height: 46vh; }
  .lh-title { font-size: 26px; }
  .login-hero .feat, .lh-foot, .lh-sub { display: none; }
  .lh-msg { font-size: 15px; }
  .login-wrap.layout-full .login-hero { position: relative; }
  .login-wrap.layout-full .lh-content { max-width: none; }
  .login-wrap.layout-full .login-form { position: relative; top: auto; right: auto; left: auto; transform: none; width: auto; border-radius: 0; box-shadow: none; background: var(--surface); }
}
@media (prefers-reduced-motion: reduce) {
  .lh-photo, .lh-anim *, .lh-top > * { animation: none !important; }
  .lh-msg { transition: none; }
}

/* sidebar color styles */
:root[data-sidebar="brand"] .sidebar { background: linear-gradient(180deg, var(--primary-700), var(--primary)); border-color: transparent; }
:root[data-sidebar="dark"] .sidebar { background: #1c1712; border-color: #2c241d; }
:root[data-sidebar="brand"] .sidebar .brand, :root[data-sidebar="dark"] .sidebar .brand { background: rgba(0,0,0,.18); }
:root[data-sidebar="brand"] .nav a, :root[data-sidebar="dark"] .nav a { color: rgba(255,255,255,.92); }
:root[data-sidebar="brand"] .nav a svg, :root[data-sidebar="dark"] .nav a svg { color: rgba(255,255,255,.8); }
:root[data-sidebar="brand"] .nav a:hover, :root[data-sidebar="dark"] .nav a:hover { background: rgba(255,255,255,.12); }
:root[data-sidebar="brand"] .nav a.active { background: #fff; color: var(--primary-700); }
:root[data-sidebar="brand"] .nav a.active svg { color: var(--primary); }
:root[data-sidebar="brand"] .nav-section, :root[data-sidebar="dark"] .nav-section { color: rgba(255,255,255,.6); }
.theme-preset { border: 2px solid var(--border); border-radius: 12px; padding: 8px; cursor: pointer; background: var(--surface); display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 600; min-width: 110px; }
.theme-preset:hover { border-color: var(--primary); }
.theme-preset .sw { display: flex; height: 30px; border-radius: 8px; overflow: hidden; border: 1px solid rgba(0,0,0,.08); }
.theme-preset .sw i { flex: 1; }

/* misc */
.progress { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; border: 1px solid var(--border); }
.progress > div { height: 100%; background: var(--primary); border-radius: 99px; }
.steps { display: flex; gap: 0; align-items: center; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); font-weight: 550; }
.step .dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--border); display: grid; place-items: center; font-size: 11px; background: var(--surface); }
.step.done { color: var(--success); } .step.done .dot { background: var(--success); border-color: var(--success); color: #fff; }
.step.current { color: var(--primary); } .step.current .dot { border-color: var(--primary); color: var(--primary); }
.step-line { width: 28px; height: 2px; background: var(--border); margin: 0 6px; }
.unit-ladder .rowu { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr auto; gap: 10px; align-items: end; padding: 10px 0; border-bottom: 1px solid var(--border); }
@media (max-width: 640px) { .unit-ladder .rowu { grid-template-columns: 1fr 1fr; } }
.msg-bubble { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; white-space: pre-wrap; font-size: 13px; }
.color-dot { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--border); cursor: pointer; }
.color-dot.active { box-shadow: 0 0 0 2px var(--text); }
.kbd { font-family: ui-monospace, monospace; font-size: 11px; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; color: var(--muted); }
.qr { background: #fff; padding: 8px; border-radius: 10px; display: inline-block; }
.qr img, .qr svg { display: block; }
.dropdown { position: absolute; z-index: 60; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); max-height: 320px; overflow-y: auto; min-width: 260px; }
.dropdown .opt { padding: 9px 12px; cursor: pointer; border-bottom: 1px solid var(--border); }
.dropdown .opt:last-child { border-bottom: 0; }
.dropdown .opt:hover, .dropdown .opt.hl { background: var(--primary-50); }
.rel { position: relative; }
.spinner { width: 22px; height: 22px; border: 3px solid var(--primary-100); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; margin: 30px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
video.scanner { width: 100%; border-radius: 12px; background: #000; max-height: 50vh; }

@media print {
  .sidebar, .topbar, .no-print, .toasts { display: none !important; }
  .main { margin: 0; }
  .content { padding: 0; }
  .card { box-shadow: none; border: 0; }
  body { background: #fff; color: #000; }
}
.cart-totals .chips { flex-wrap: wrap; overflow: visible; }
.filters .search .input, .filters .input-group .input { width: 100%; min-width: 0; }
input[type="range"] { accent-color: var(--primary); }

/* language flags */
.flag { display: inline-flex; width: 22px; height: 15px; border-radius: 3px; overflow: hidden; flex: none; box-shadow: 0 0 0 1px rgba(0,0,0,.12); vertical-align: middle; }
.flag svg { width: 100%; height: 100%; display: block; }
.lang-btn { gap: 7px; padding: 0 10px; }
.lang-menu { right: 0; top: calc(100% + 6px); min-width: 190px; }
.lang-menu .opt { display: flex; align-items: center; gap: 10px; }
.lang-menu .opt svg.i { color: var(--primary); }

/* secondary color accents */
.nav a svg { color: var(--secondary); }
.kpi .ico { background: var(--secondary-50); color: var(--secondary); }
.btn.soft { background: var(--secondary-50); color: var(--secondary-ink); }
:root[data-theme="dark"] .btn.soft { color: var(--secondary-ink); }
.thumb, .pcard .pimg { background: var(--secondary-50); color: var(--secondary); }
.fieldset-title { color: var(--secondary); }
.fieldset-title::before, .fieldset-title::after { background: color-mix(in srgb, var(--secondary) 25%, transparent); }
.progress > div { background: var(--secondary); }
.avatar { background: var(--secondary-50); color: var(--secondary-ink); }

/* ---- login card: base (all styles) ---- */
.login-form { overflow: hidden; }
.lf-glow, .lf-dots { display: none; }
.login-card .lc-head { display: flex; align-items: center; gap: 14px; }
.login-card .lc-head p { margin: 4px 0 0; }
.lc-badge { width: 48px; height: 48px; border-radius: 14px; flex: none; display: grid; place-items: center; overflow: hidden; color: #fff;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 80%, white), var(--primary) 50%, color-mix(in srgb, var(--primary) 75%, black)); box-shadow: 0 8px 18px color-mix(in srgb, var(--primary) 30%, transparent); }
.lc-badge img { width: 100%; height: 100%; object-fit: cover; }
.lc-badge svg { width: 24px; height: 24px; }
.login-card .input { height: 46px; }
.login-card .input-icon.pw .input { padding-right: 44px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.pw-eye:hover { background: var(--primary-50); color: var(--primary); }
.pw-eye svg { position: static; transform: none; }
.login-card .f.bad .input { border-color: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 15%, transparent); }
.lc-caps { font-size: 12.5px; color: var(--warning); font-weight: 600; margin-top: -6px; }
.lc-error { background: var(--danger-bg); color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 25%, transparent); border-radius: 10px; padding: 9px 12px; font-size: 13px; font-weight: 600; }
.lc-submit { position: relative; height: 50px; }
.lc-submit .spin { display: none; width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.lc-submit.loading { pointer-events: none; opacity: .92; }
.lc-submit.loading .spin { display: inline-block; }
.lc-submit.done { background: var(--secondary) !important; border-color: var(--secondary) !important; box-shadow: 0 10px 24px color-mix(in srgb, var(--secondary) 35%, transparent) !important; }
.lc-submit.done .lbl::before { content: '✓  '; }
.lc-secure { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; color: var(--muted); }
.lc-secure svg { width: 14px; height: 14px; color: var(--secondary); }
.lc-demo { background: var(--surface-2); border: 1px dashed var(--border); border-radius: 10px; padding: 10px; }
.login-card.shake { animation: shake .45s cubic-bezier(.36,.07,.19,.97); }
@keyframes shake { 15%, 85% { transform: translateX(-3px); } 30%, 70% { transform: translateX(6px); } 45%, 55% { transform: translateX(-8px); } }
.login-wrap:not(.preview) .login-card { animation: cardIn .7s cubic-bezier(.2,.8,.2,1) both; }
.login-wrap:not(.preview) .login-card > * { animation: fadeUp .6s both; }
.login-wrap:not(.preview) .login-card > *:nth-child(2) { animation-delay: .08s; } .login-wrap:not(.preview) .login-card > *:nth-child(3) { animation-delay: .14s; }
.login-wrap:not(.preview) .login-card > *:nth-child(n+4) { animation-delay: .2s; }
@keyframes cardIn { from { opacity: 0; transform: translateY(26px) scale(.98); } }
.login-card.success { transition: transform .5s, opacity .5s; transform: scale(.985); }

/* ---- login: "gradient" color style — pink dominant, small green accents ---- */
.login-wrap { --ov-color2: var(--secondary); }
.login-wrap.ov-gradient .lh-overlay { background:
  linear-gradient(180deg,
    color-mix(in srgb, var(--ov-color) calc(min(1, var(--ov-op) * 1.5) * 100%), transparent) 0%,
    color-mix(in srgb, var(--ov-color) calc(var(--ov-op) * 75%), transparent) 24%,
    color-mix(in srgb, var(--ov-color) calc(var(--ov-op) * 22%), transparent) 46%,
    color-mix(in srgb, var(--ov-color) calc(var(--ov-op) * 40%), transparent) 66%,
    color-mix(in srgb, color-mix(in srgb, var(--ov-color) 82%, #3b0a24) calc(min(1, var(--ov-op) * 1.5) * 100%), transparent) 100%),
  linear-gradient(90deg, color-mix(in srgb, var(--ov-color) 25%, transparent), transparent 65%); }
/* the only green on the photo side: a soft glowing line along the bottom edge */
.login-wrap.ov-gradient .login-hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; z-index: 2;
  background: linear-gradient(90deg, transparent, var(--ov-color2) 35%, var(--ov-color2) 65%, transparent); box-shadow: 0 0 18px var(--ov-color2); opacity: .85; }
.login-wrap.ov-gradient .lh-dots button.on { background: #fff; }
.login-wrap.ov-gradient .lh-progress > div { background: linear-gradient(90deg, rgba(255,255,255,.9) 82%, color-mix(in srgb, var(--ov-color2) 70%, white)); }
.login-wrap.ov-gradient .lh-block { background: color-mix(in srgb, var(--ov-color) 22%, rgba(255,255,255,.12)); border-color: rgba(255,255,255,.35); box-shadow: 0 12px 34px color-mix(in srgb, var(--ov-color) 35%, transparent); }
.login-wrap.ov-gradient .login-hero .feat div { background: color-mix(in srgb, var(--ov-color) 30%, rgba(255,255,255,.12)); border: 1px solid rgba(255,255,255,.18); }
.login-wrap.ov-gradient .login-hero .feat svg { color: #fff; }
.login-wrap.ov-gradient .brand-logo { color: var(--ov-color); box-shadow: 0 8px 24px color-mix(in srgb, var(--ov-color) 40%, transparent); }
.login-wrap.ov-gradient .anim-waves .b1 { background: var(--ov-color); }
.login-wrap.ov-gradient .anim-waves .b2 { background: color-mix(in srgb, var(--ov-color) 55%, white); }
.login-wrap.ov-gradient .anim-waves .b3 { background: color-mix(in srgb, var(--ov-color) 60%, #7c3aed); }

/* right side: blush pink background with slowly drifting glows + dot texture */
.login-wrap.ov-gradient.layout-split .login-form { background: linear-gradient(160deg,
  color-mix(in srgb, var(--primary) 11%, white) 0%, color-mix(in srgb, var(--primary) 4%, white) 50%, color-mix(in srgb, var(--primary) 13%, white) 100%); }
:root[data-theme="dark"] .login-wrap.ov-gradient.layout-split .login-form { background: linear-gradient(160deg, color-mix(in srgb, var(--primary) 16%, #17130f), #17130f 55%, color-mix(in srgb, var(--primary) 12%, #17130f)); }
.login-wrap.ov-gradient.layout-split .lf-glow, .login-wrap.ov-gradient.layout-split .lf-dots { display: block; position: absolute; pointer-events: none; }
.lf-glow { border-radius: 50%; filter: blur(50px); }
.lf-glow.g1 { width: 420px; height: 420px; top: -140px; right: -120px; background: color-mix(in srgb, var(--primary) 32%, transparent); animation: glow1 calc(16s * var(--spd)) ease-in-out infinite alternate; }
.lf-glow.g2 { width: 360px; height: 360px; bottom: -150px; left: -110px; background: color-mix(in srgb, var(--primary) 22%, transparent); animation: glow2 calc(20s * var(--spd)) ease-in-out infinite alternate; }
.lf-glow.g3 { width: 160px; height: 160px; bottom: 60px; left: 18%; background: color-mix(in srgb, var(--secondary) 14%, transparent); animation: glow1 calc(24s * var(--spd)) ease-in-out infinite alternate-reverse; }
@keyframes glow1 { to { transform: translate(-60px, 50px) scale(1.12); } }
@keyframes glow2 { to { transform: translate(70px, -40px) scale(.92); } }
.lf-dots { inset: 0; background-image: radial-gradient(color-mix(in srgb, var(--primary) 22%, transparent) 1.2px, transparent 1.6px); background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, transparent 30%, #000 85%); mask-image: radial-gradient(ellipse at 50% 50%, transparent 30%, #000 85%); opacity: .55; }
/* the login box */
.login-wrap.ov-gradient.layout-split .login-card { position: relative; z-index: 1; background: var(--surface); padding: 34px 30px 24px; border-radius: 24px; gap: 15px;
  border: 1px solid color-mix(in srgb, var(--primary) 14%, var(--border));
  box-shadow: 0 30px 70px color-mix(in srgb, var(--primary) 20%, transparent), 0 2px 8px rgba(0,0,0,.04); }
.login-wrap.ov-gradient .login-card::before, .login-wrap.ov-gradient.layout-full .login-form::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 5px; border-radius: 24px 24px 0 0;
  background: linear-gradient(90deg, color-mix(in srgb, var(--primary) 75%, black), var(--primary) 30%, color-mix(in srgb, var(--primary) 45%, white) 80%, var(--secondary) 100%); }
.login-wrap.ov-gradient.layout-full .login-form { overflow: hidden; }
.login-wrap.ov-gradient .login-card h1 { font-size: 23px; background: linear-gradient(90deg, color-mix(in srgb, var(--primary) 80%, black), var(--primary)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-wrap.ov-gradient .login-card .input { background-color: color-mix(in srgb, var(--primary) 3%, var(--surface)); border-color: color-mix(in srgb, var(--primary) 16%, var(--border)); border-radius: 12px; }
.login-wrap.ov-gradient .login-card .input:hover { border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); }
.login-wrap.ov-gradient .login-card .input:focus { background-color: var(--surface); border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 16%, transparent); }
.login-wrap.ov-gradient .login-card .input-icon svg { color: color-mix(in srgb, var(--primary) 55%, var(--muted)); transition: color .15s; }
.login-wrap.ov-gradient .login-card .input-icon:focus-within > svg { color: var(--primary); }
.login-wrap.ov-gradient .login-card .lc-submit { border: 0; border-radius: 14px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 82%, white), var(--primary) 45%, color-mix(in srgb, var(--primary) 72%, black));
  box-shadow: 0 12px 26px color-mix(in srgb, var(--primary) 35%, transparent); transition: transform .15s, box-shadow .15s, filter .15s, background .3s; }
.login-wrap.ov-gradient .login-card .lc-submit:hover { filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 16px 32px color-mix(in srgb, var(--primary) 42%, transparent); }
.login-wrap.ov-gradient .login-card .lc-submit:active { transform: translateY(1px); }
.login-wrap.ov-gradient .login-card .lc-demo { background: color-mix(in srgb, var(--primary) 5%, var(--surface)); border-color: color-mix(in srgb, var(--primary) 28%, var(--border)); }
@media (max-width: 860px) {
  .login-wrap.ov-gradient.layout-split .login-form { padding: 22px 16px 32px; overflow: visible; }
  .login-wrap.ov-gradient.layout-split .login-card { padding: 28px 22px 20px; margin-top: -60px; }
  .login-wrap.ov-gradient .login-hero::after { display: none; }
}
@media (prefers-reduced-motion: reduce) { .lf-glow, .login-card, .login-card > * { animation: none !important; } }
.login-wrap .login-card > .lc-error, .login-wrap .login-card > .lc-caps { animation: popIn .25s ease-out both !important; }
@keyframes popIn { from { opacity: 0; transform: translateY(-4px); } }

/* ================= iPhone / small phones ================= */
html { -webkit-text-size-adjust: 100%; }
body { -webkit-tap-highlight-color: transparent; }
/* real visible height on iOS Safari (address bar aware) */
.login-wrap:not(.preview) { min-height: 100vh; min-height: 100dvh; }
/* notch / home-bar safe areas */
.topbar { padding-top: env(safe-area-inset-top); height: calc(60px + env(safe-area-inset-top)); padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
.sidebar .brand { padding-top: calc(18px + env(safe-area-inset-top)); }
.nav { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
.content { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
.toasts { bottom: calc(16px + env(safe-area-inset-bottom)); }
@media (max-width: 860px) {
  /* iOS zooms into fields with text smaller than 16px — prevent it */
  .input, select.input, textarea.input, .qty input { font-size: 16px; }
  .lh-content { padding-top: calc(26px + env(safe-area-inset-top)); }
}
@media (max-width: 600px) {
  .login-hero { min-height: 44vh; min-height: 44svh; }
  .lh-content { min-height: 44vh; min-height: 44svh; padding: calc(16px + env(safe-area-inset-top)) max(18px, env(safe-area-inset-left)) 18px; gap: 12px; }
  .login-hero .brand-logo { width: 44px !important; height: 44px !important; }
  .lh-title { font-size: 22px; margin: 8px 0 2px; }
  .lh-local { font-size: 14px; }
  .lh-block { padding: 12px 14px 10px; border-radius: 14px; max-width: none; }
  .lh-msgs { height: 42px; }
  .lh-msg { font-size: 14.5px; }
  .anim-float span { transform-origin: center; scale: .7; }
  .login-form { padding: 0 12px calc(26px + env(safe-area-inset-bottom)) !important; place-items: start center; }
  .login-wrap.ov-gradient.layout-split .login-card, .login-card { width: 100%; max-width: 440px; padding: 24px 18px 18px !important; margin-top: -34px !important; border-radius: 22px !important; gap: 13px; position: relative; z-index: 2; }
  .login-wrap:not(.ov-gradient) .login-card { background: var(--surface); box-shadow: var(--shadow-lg); border: 1px solid var(--border); }
  .lc-badge { width: 42px; height: 42px; border-radius: 12px; }
  .login-wrap.ov-gradient .login-card h1, .login-card h1 { font-size: 20px; }
  .login-card .input { height: 48px; }
  .lc-submit { height: 52px; }
  .lf-dots { display: none !important; }
}
@media (max-width: 360px) { .lh-block { display: none; } }
/* phone login: keep the face clear — title & message block sit low on the photo, above the card */
@media (max-width: 600px) {
  .login-wrap .lh-content { justify-content: flex-end; padding-bottom: 50px; }
  .login-wrap .lh-top { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; }
  .login-wrap .lh-top .brand-logo { grid-row: span 2; }
  .login-wrap .lh-title { margin: 0; font-size: 21px; }
  .login-wrap .lh-local { grid-column: 2; }
}
@media (max-width: 600px) and (max-height: 700px) {
  .login-hero, .lh-content { min-height: 40vh; min-height: 40svh; }
  .lh-block { display: none; }
  .login-card .lc-demo { font-size: 11.5px; padding: 8px; }
}
/* POS / any grid page: never let wide children push past the phone screen */
.pos > *, .grid > *, .pos-left > * { min-width: 0; }
.main, .content { max-width: 100vw; }

/* text at the bottom of the photo (keeps faces visible) */
.login-wrap.text-bottom .lh-content { justify-content: flex-end; gap: 16px; }
.login-wrap.text-bottom .lh-top { display: grid; grid-template-columns: auto 1fr; column-gap: 16px; align-items: center; }
.login-wrap.text-bottom .lh-top .brand-logo { grid-row: span 2; }
.login-wrap.text-bottom .lh-title { margin: 0; font-size: 32px; }
.login-wrap.text-bottom .lh-local { grid-column: 2; }
.login-wrap.text-bottom .lh-sub { grid-column: 1 / -1; margin: 10px 0 0; }
.login-wrap.text-bottom .login-hero .feat { grid-template-columns: repeat(3, 1fr); max-width: 640px; gap: 8px; }
.login-wrap.text-bottom .login-hero .feat div { padding: 8px 10px; font-size: 12.5px; }
.login-wrap.text-bottom .lh-foot { margin-top: -4px; }
@media (max-width: 600px) { .login-wrap.text-bottom .lh-title { font-size: 21px; } .login-wrap.text-bottom .lh-top { column-gap: 12px; } }
@media (max-width: 600px) { #mode { width: 96px !important; flex: none; } }

/* ================= login: "pro" style — natural photo, one brand color, clean form ================= */
.login-wrap.ov-pro .lh-overlay { background:
  linear-gradient(180deg, rgba(18,8,13,.18) 0%, rgba(18,8,13,0) 22%, rgba(18,8,13,0) 42%,
    color-mix(in srgb, var(--ov-color) calc(var(--ov-op) * 55%), rgba(18,8,13,.35)) 68%,
    color-mix(in srgb, var(--ov-color) calc(var(--ov-op) * 70%), rgba(14,6,10,.88)) 100%); }
.login-wrap.ov-pro .lh-anim { display: none; }
.login-wrap.ov-pro .login-hero .brand-logo { box-shadow: 0 6px 18px rgba(0,0,0,.18); color: var(--primary); }
.login-wrap.ov-pro .lh-title { text-shadow: 0 2px 12px rgba(0,0,0,.35); letter-spacing: -.01em; }
.login-wrap.ov-pro .lh-sub { opacity: .92; max-width: 520px; }
.login-wrap.ov-pro .lh-block { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); box-shadow: none; border-radius: 12px; padding: 14px 18px 12px; max-width: 520px; }
.login-wrap.ov-pro .lh-msg { font-size: 16px; font-weight: 600; }
.login-wrap.ov-pro .lh-msgs { height: 40px; }
.login-wrap.ov-pro .lh-dots button { background: rgba(255,255,255,.35); }
.login-wrap.ov-pro .lh-dots button.on { background: #fff; }
.login-wrap.ov-pro .lh-progress { display: none; }
.login-wrap.ov-pro .login-hero .feat div { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); backdrop-filter: none; }
/* right side: clean white, centered form */
.login-wrap.ov-pro .login-form { background: var(--surface); }
.login-wrap.ov-pro .login-card { max-width: 380px; gap: 16px; }
.login-wrap.ov-pro .lc-head { flex-direction: column; align-items: flex-start; gap: 18px; margin-bottom: 6px; }
.login-wrap.ov-pro .lc-badge { width: 44px; height: 44px; border-radius: 12px; background: var(--primary); box-shadow: none; }
.login-wrap.ov-pro .login-card h1 { font-size: 26px; font-weight: 700; color: var(--text); letter-spacing: -.015em; }
.login-wrap.ov-pro .login-card .lc-head p { font-size: 14.5px; }
.login-wrap.ov-pro .login-card .f { color: var(--text); font-weight: 600; font-size: 13px; }
.login-wrap.ov-pro .login-card .input { height: 46px; border-radius: 10px; background-color: var(--surface); border-color: color-mix(in srgb, var(--text) 16%, var(--surface)); }
.login-wrap.ov-pro .login-card .input:hover { border-color: color-mix(in srgb, var(--text) 30%, var(--surface)); }
.login-wrap.ov-pro .login-card .input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent); }
.login-wrap.ov-pro .login-card .input-icon svg { color: var(--muted); }
.login-wrap.ov-pro .login-card .input-icon:focus-within > svg { color: var(--primary); }
.login-wrap.ov-pro .lc-submit { height: 48px; border-radius: 10px; border: 0; background: var(--primary); box-shadow: none; font-weight: 600; letter-spacing: .01em; transition: background .15s; }
.login-wrap.ov-pro .lc-submit:hover { background: var(--primary-600); }
.login-wrap.ov-pro .lc-submit.done { background: var(--primary-700) !important; box-shadow: none !important; }
.login-wrap.ov-pro .lc-secure svg { color: var(--muted); }
.login-wrap.ov-pro .lc-demo { background: var(--surface-2); border: 1px dashed var(--border); }
@media (max-width: 860px) {
  .login-wrap.ov-pro .login-card { background: var(--surface); border-radius: 20px 20px 0 0 !important; box-shadow: 0 -10px 30px rgba(0,0,0,.08) !important; border: 0 !important; max-width: none; margin-top: -24px !important; padding: 26px 22px 8px !important; }
  .login-wrap.ov-pro .login-form { padding: 0 0 calc(24px + env(safe-area-inset-bottom)) !important; }
  .login-wrap.ov-pro .lc-head { flex-direction: row; align-items: center; gap: 14px; margin-bottom: 2px; }
  .login-wrap.ov-pro .login-card h1 { font-size: 22px; }
}

/* real logo image in the login badge: show the round logo on white */
.lc-badge:has(img), .login-wrap.ov-pro .lc-badge:has(img) { background: #fff; border-radius: 50%; width: 56px; height: 56px; box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.brand-logo img { object-fit: cover; }

/* ================= sign-in side animated background ================= */
.lfb { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.lfb > *, .lfb-icons, .lfb-bubbles { display: none; }
.lfb-blob { position: absolute; border-radius: 50%; filter: blur(60px); }
.lfb-blob.b1 { width: 460px; height: 460px; top: -160px; right: -140px; background: color-mix(in srgb, var(--primary) 26%, transparent); animation: lfbA calc(18s * var(--spd)) ease-in-out infinite alternate; }
.lfb-blob.b2 { width: 400px; height: 400px; bottom: -170px; left: -130px; background: color-mix(in srgb, var(--primary) 18%, transparent); animation: lfbB calc(22s * var(--spd)) ease-in-out infinite alternate; }
.lfb-blob.b3 { width: 260px; height: 260px; top: 40%; left: 55%; background: color-mix(in srgb, var(--primary) 10%, #fbcfe8); opacity: .7; animation: lfbA calc(26s * var(--spd)) ease-in-out infinite alternate-reverse; }
@keyframes lfbA { to { transform: translate(-90px, 70px) scale(1.15); } }
@keyframes lfbB { to { transform: translate(100px, -60px) scale(.9); } }
.lfb-dots { position: absolute; inset: 0; background-image: radial-gradient(color-mix(in srgb, var(--primary) 26%, transparent) 1.2px, transparent 1.7px); background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, transparent 25%, #000 80%); mask-image: radial-gradient(ellipse at 50% 50%, transparent 25%, #000 80%); opacity: .6; }
.lfb-icons span { position: absolute; bottom: -60px; color: color-mix(in srgb, var(--primary) 30%, transparent); animation: lfbFloat linear infinite; }
.lfb-icons span svg { width: 100%; height: 100%; stroke-width: 1.7; }
@keyframes lfbFloat { 0% { transform: translateY(0) rotate(0); opacity: 0; } 10% { opacity: 1; } 85% { opacity: .8; } 100% { transform: translateY(-110vh) rotate(220deg); opacity: 0; } }
.lfb-bubbles span { position: absolute; bottom: -80px; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--primary) 30%, transparent);
  background: radial-gradient(circle at 32% 30%, rgba(255,255,255,.9), color-mix(in srgb, var(--primary) 10%, transparent) 60%, transparent 72%); animation: lfbBubble ease-in infinite; }
@keyframes lfbBubble { 0% { transform: translate(0,0) scale(.6); opacity: 0; } 15% { opacity: 1; } 55% { transform: translate(16px, -55vh) scale(1); } 100% { transform: translate(-10px, -110vh) scale(1.1); opacity: 0; } }
.lfb-wave { position: absolute; bottom: 0; left: 0; width: 200%; height: 90px; fill: color-mix(in srgb, var(--primary) 9%, transparent); }
.lfb-wave.w1 { animation: waveX calc(16s * var(--spd)) linear infinite; }
.lfb-wave.w2 { height: 120px; fill: color-mix(in srgb, var(--primary) 6%, transparent); animation: waveX calc(24s * var(--spd)) linear infinite reverse; }
/* which layers each style shows */
.fbg-playful .lfb-blob, .fbg-playful .lfb-icons, .fbg-playful .lfb-wave { display: block; }
.fbg-glow .lfb-blob { display: block; }
.fbg-icons .lfb-icons, .fbg-icons .lfb-dots, .fbg-icons .lfb-blob.b1 { display: block; }
.fbg-bubbles .lfb-bubbles, .fbg-bubbles .lfb-blob.b1, .fbg-bubbles .lfb-blob.b2 { display: block; }
.fbg-dots .lfb-dots, .fbg-dots .lfb-blob.b1, .fbg-dots .lfb-blob.b2 { display: block; }
/* soft blush base colour behind the animation */
.login-wrap:not(.fbg-plain).layout-split .login-form { background: linear-gradient(160deg, color-mix(in srgb, var(--primary) 7%, var(--surface)), var(--surface) 55%, color-mix(in srgb, var(--primary) 9%, var(--surface))) !important; }
/* keep the form crisp: white card floating above the animation */
.login-wrap:not(.fbg-plain).layout-split .login-card { position: relative; z-index: 1; background: var(--surface); padding: 32px 30px 24px; border-radius: 20px;
  border: 1px solid color-mix(in srgb, var(--primary) 10%, var(--border)); box-shadow: 0 24px 60px color-mix(in srgb, var(--primary) 14%, transparent), 0 2px 6px rgba(0,0,0,.04); }
.login-wrap:not(.fbg-plain) .lf-glow, .login-wrap:not(.fbg-plain) .lf-dots { display: none !important; }
@media (max-width: 860px) { .lfb-icons span { scale: .8; } .lfb-wave { height: 60px; } .lfb-wave.w2 { height: 80px; } }
@media (prefers-reduced-motion: reduce) { .lfb * { animation: none !important; } }

/* login: Staff / Supplier / Customer tabs */
.lc-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; }
.lc-tabs button { border: 0; background: transparent; border-radius: 9px; padding: 8px 6px; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background .15s, color .15s; }
.lc-tabs button svg { width: 15px; height: 15px; }
.lc-tabs button:hover { color: var(--text); }
.lc-tabs button.on { background: var(--surface); color: var(--primary); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.lc-help { text-align: center; }
/* purchase timeline & proposal rows */
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { display: flex; gap: 10px; padding: 7px 0; font-size: 13px; border-bottom: 1px dashed var(--border); }
.tl li:last-child { border-bottom: 0; }
.tl li::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--primary); margin-top: 5px; flex: none; }
.tl li.sup::before { background: var(--info); }
.kv-row { display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 13.5px; }
del { color: var(--muted); }

/* second currency (KHR) under totals */
.khr { display: block; font-size: 11.5px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.info-row .v .khr, .kpi .khr { display: inline; margin-left: 6px; }

/* Dropdowns: one consistent look in every browser. Safari/iOS ignores padding on native selects
   (text ran under the leading icon), so draw our own chevron and control the padding. */
select.input {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  padding-right: 34px; text-overflow: ellipsis; cursor: pointer;
  background-color: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23857a80' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 12px;
}
select.input.sm { padding-right: 28px; background-position: right 9px center; }
.input-icon select.input { padding-left: 38px; }
.input-icon > svg { z-index: 1; }

/* language switch on the login card */
.login-card { position: relative; }
.lc-lang { position: absolute; top: 14px; right: 14px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--surface);
  border-radius: 99px; padding: 4px 10px 4px 6px; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--text); cursor: pointer; z-index: 2; }
.lc-lang:hover { border-color: var(--primary); color: var(--primary); }
.lc-lang .flag { width: 20px; height: 14px; }
:lang(km) body, :lang(km) .btn, :lang(km) .input { line-height: 1.6; }

/* shop name: Khmer main name large, English below */
.brand-name { font-size: 17px; line-height: 1.35; }
.brand-sub { font-size: 11.5px; letter-spacing: .04em; opacity: .85; font-weight: 600; }

/* login "Find us" map card */
.login-form { align-content: center; gap: 16px; }
.lc-map { width: 100%; max-width: 380px; position: relative; z-index: 1; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.login-wrap.layout-split .lc-map { width: 100%; max-width: 380px; }
.lc-map-frame { position: relative; height: 150px; background: var(--surface-2); }
.lc-map-frame iframe { width: 100%; height: 100%; border: 0; display: block; pointer-events: none; }
.lc-map-hit { position: absolute; inset: 0; }
.lc-map-hit:hover { background: color-mix(in srgb, var(--primary) 8%, transparent); }
.lc-map-info { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.lc-map-info b { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; }
.lc-map-info b svg { width: 16px; height: 16px; color: var(--primary); }
.lc-addr { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.login-wrap.layout-full .lc-map { box-shadow: none; margin-top: 4px; }
@media (max-width: 860px) { .lc-map { max-width: none; width: calc(100% - 0px); border-radius: 14px; } .login-wrap.ov-pro .login-form .lc-map { width: calc(100% - 32px); margin: 0 16px; } }
/* phones: let the sign-in card overlap the photo (rounded top + language button visible) */
@media (max-width: 860px) { .login-wrap .login-form { overflow: visible; } .lfb { overflow: hidden; } }

/* Telegram confirmation code step */
.lc-code-info { display: flex; gap: 10px; align-items: flex-start; background: var(--primary-50); border: 1px solid var(--primary-100); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; margin-bottom: 14px; }
.lc-code-info svg { color: var(--primary); margin-top: 2px; }
.lc-code { font-size: 26px !important; letter-spacing: .5em; text-align: center; font-variant-numeric: tabular-nums; height: 56px !important; }
.lc-tabs.locked { opacity: .5; pointer-events: none; }

.lang-pop { z-index: 300; min-width: 220px; overflow-y: auto; }
.lang-sep { height: 1px; background: var(--border); margin: 2px 0; }
[hidden] { display: none !important; }

/* ================= login: colourful 3D icons ================= */
.ic3d { width: 30px; height: 30px; border-radius: 9px; display: inline-grid; place-items: center; color: #fff; flex: none;
  background: linear-gradient(145deg, var(--c1), var(--c2));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), inset 0 -2px 0 rgba(0,0,0,.18), 0 4px 10px color-mix(in srgb, var(--c2) 40%, transparent); }
.ic3d svg { position: static !important; transform: none !important; width: 16px; height: 16px; color: #fff !important; stroke-width: 2.3; filter: drop-shadow(0 1px 1px rgba(0,0,0,.28)); }
.ic-rose { --c1: #f9a8d4; --c2: #be185d; } .ic-gold { --c1: #fde68a; --c2: #d97706; } .ic-green { --c1: #86efac; --c2: #15803d; }
.ic-blue { --c1: #7dd3fc; --c2: #0369a1; } .ic-violet { --c1: #c4b5fd; --c2: #6d28d9; } .ic-teal { --c1: #5eead4; --c2: #0f766e; }
.input-icon.i3 > .ic3d { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); z-index: 1; pointer-events: none; }
.input-icon.i3 .input { padding-left: 48px !important; }
/* login tabs: User Login / Customer Login / Supplier Login */
.lc-tabs button { flex-direction: column; gap: 6px; padding: 10px 4px 8px; font-size: 12px; line-height: 1.2; }
.lc-tabs button:not(.on) .ic3d { filter: saturate(.35) opacity(.7); transform: scale(.92); }
.lc-tabs button .ic3d { transition: filter .2s, transform .2s; }
.lc-tabs button.on { color: var(--text); }

/* ================= login photo: moving light around the frame ================= */
@property --lh-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.lh-border { position: absolute; inset: 14px; border-radius: 22px; z-index: 3; pointer-events: none; padding: 2px;
  background: conic-gradient(from var(--lh-a), transparent 0 64%, rgba(255,255,255,.15) 70%, rgba(255,255,255,.95) 80%, color-mix(in srgb, var(--primary) 55%, white) 86%, transparent 94%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  filter: drop-shadow(0 0 6px rgba(255,255,255,.55)); animation: lhSpin calc(9s * var(--spd)) linear infinite; }
.lh-border i { position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255,255,255,.22); }
@keyframes lhSpin { to { --lh-a: 360deg; } }

/* promotion slides (Title | Description | Badge) */
.lh-msgs.promo { height: 66px; }
.lh-promo { display: flex; align-items: center; gap: 14px; width: 100%; }
.lh-tag { flex: none; min-width: 58px; height: 46px; padding: 0 10px; border-radius: 14px; display: grid; place-items: center; font-weight: 800; font-size: 15px;
  background: #fff; color: var(--primary); box-shadow: 0 6px 16px rgba(0,0,0,.18); }
.lh-ph { font-size: 17px; font-weight: 750; line-height: 1.25; }
.lh-pd { font-size: 13px; font-weight: 500; opacity: .9; margin-top: 2px; line-height: 1.35; }

/* product ticker along the bottom of the photo */
.lh-ticker { position: absolute; left: 0; right: 0; bottom: 0; height: 42px; z-index: 4; overflow: hidden; display: flex; align-items: center;
  background: linear-gradient(90deg, rgba(20,8,14,.55), rgba(20,8,14,.35)); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border-top: 1px solid rgba(255,255,255,.18);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.lh-ticker-track { display: flex; width: max-content; animation: lhTick linear infinite; }
.lh-ticker:hover .lh-ticker-track { animation-play-state: paused; }
.lh-tick { display: inline-flex; align-items: center; gap: 8px; padding: 0 22px; color: #fff; font-size: 13px; white-space: nowrap; border-right: 1px solid rgba(255,255,255,.18); }
.lh-tick svg { width: 15px; height: 15px; color: color-mix(in srgb, var(--primary) 45%, white); }
.lh-tick em { font-style: normal; opacity: .78; }
.lh-tick em::before { content: '— '; }
@keyframes lhTick { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.login-hero:has(.lh-ticker) .lh-content { padding-bottom: 66px; }
.login-hero:has(.lh-ticker) .lh-foot { display: none; }

/* map card: branch chips + compact on shorter screens */
.lc-branches { display: flex; gap: 6px; padding: 8px 10px 0; overflow-x: auto; scrollbar-width: none; }
.lc-branches button { border: 1px solid var(--border); background: var(--surface); border-radius: 99px; padding: 4px 10px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
  white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; color: var(--muted); }
.lc-branches button svg { width: 13px; height: 13px; }
.lc-branches button.on { background: var(--primary); border-color: var(--primary); color: #fff; }
@media (min-width: 861px) and (max-height: 1200px) { .lc-map-frame { height: 96px; } .login-wrap .login-card { gap: 12px; } }
@media (prefers-reduced-motion: reduce) { .lh-border { animation: none !important; } }
@media (max-width: 860px) { .lh-border { inset: 8px; border-radius: 16px; } .login-hero:has(.lh-ticker) .lh-content { padding-bottom: 60px; } }

/* desktop: photo side is exactly one screen tall and stays put while the sign-in side scrolls */
@media (min-width: 861px) {
  .login-wrap.layout-split:not(.preview) .login-hero { position: sticky; top: 0; height: 100vh; height: 100dvh; min-height: 0; align-self: start; }
  .login-wrap.layout-split:not(.preview) .lh-content { min-height: 0; height: 100%; }
}
/* shorter laptop screens: compact sign-in card + side-by-side mini map so everything fits */
@media (min-width: 861px) and (max-height: 1200px) {
  .login-wrap .login-card { padding-top: 22px !important; padding-bottom: 16px !important; gap: 10px !important; }
  .login-wrap.ov-pro .lc-head { flex-direction: row; align-items: center; gap: 12px; margin-bottom: 0; }
  .login-wrap .login-card h1 { font-size: 21px !important; }
  .login-wrap .login-card .input { height: 42px; }
  .lc-submit { height: 44px !important; }
  .lc-tabs button { padding: 6px 4px; gap: 3px; }
  .lc-tabs .ic3d { width: 26px; height: 26px; }
  .lc-demo { padding: 6px 10px; font-size: 11.5px; }
  .lc-map { display: flex; flex-wrap: wrap; align-items: center; }
  .lc-map .lc-branches { width: 100%; padding-bottom: 6px; }
  .lc-map-frame { width: 130px; height: 74px !important; flex: none; margin: 0 0 8px 10px; border-radius: 10px; overflow: hidden; }
  .lc-map-info { flex: 1; min-width: 0; flex-direction: column; align-items: flex-start; gap: 6px; padding: 4px 12px 8px; }
  .lc-map-info .lc-addr { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}
/* second-currency line under main totals */
.kpi .value .khr { display: block; font-size: 12.5px; margin-top: 2px; margin-left: 0; font-weight: 600; letter-spacing: 0; }
.t tfoot .khr { font-weight: 600; }
.cur-btn { gap: 6px; padding: 0 10px; font-weight: 700; }
.cur-btn .swap { opacity: .55; font-weight: 500; }
.cur-pop { position: fixed; z-index: 300; width: 300px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 14px; }
.cur-opt { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; margin-bottom: 8px; }
.cur-opt.on { border-color: var(--primary); background: var(--primary-50); }
.cur-opt b { font-size: 15px; }
.kpi { min-width: 0; } .kpi .value { white-space: normal; overflow-wrap: anywhere; }

/* ================= login photo v3: edge border, big promo, product spotlight, quieter field icons ================= */
.login-hero { container-type: inline-size; }
.lh-border { inset: 0 !important; border-radius: 0 !important; padding: 3px; }
.lh-border i { box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
/* promotion slides: larger */
.lh-block { max-width: 620px; }
.login-wrap.ov-pro .lh-block { max-width: 620px; padding: 16px 20px 14px; }
.lh-msgs.promo, .login-wrap.ov-pro .lh-msgs.promo { height: 84px; }
.lh-msgs.promo.has-img, .login-wrap.ov-pro .lh-msgs.promo.has-img { height: 112px; }
.lh-ph { font-size: 22px; font-weight: 750; }
.lh-pd { font-size: 14.5px; margin-top: 4px; }
.lh-tag { min-width: 72px; height: 60px; font-size: 18px; border-radius: 16px; }
.lh-pimg { position: relative; flex: none; width: 112px; height: 112px; border-radius: 14px; background: #fff center/cover no-repeat; box-shadow: 0 8px 22px rgba(0,0,0,.25); }
.lh-pimg .lh-tag { position: absolute; left: -8px; top: -8px; min-width: 0; height: 30px; font-size: 13px; padding: 0 8px; border-radius: 9px; }
/* product spotlight — text left, square photo right (~1/3 of the photo width) */
.lh-spot { position: relative; width: 100%; max-width: 640px; border-radius: 18px; padding: 12px 14px 0; overflow: hidden; color: #fff;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 14px 34px rgba(0,0,0,.22); }
.sp-head { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.sp-head svg { width: 14px; height: 14px; }
.sp-count { margin-left: auto; font-weight: 600; letter-spacing: 0; opacity: .8; }
.sp-stage { position: relative; height: clamp(110px, 30cqw, 30vh); margin-top: 8px; }
.sp-face { position: absolute; inset: 0 0 12px; display: flex; align-items: stretch; gap: 16px; transition: opacity .6s, transform .6s cubic-bezier(.2,.8,.2,1); }
.sp-face.in { opacity: 0; transform: translateX(26px); } .sp-face.out { opacity: 0; transform: translateX(-26px); }
.sp-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.sp-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.sp-chips span { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: rgba(255,255,255,.2); }
.sp-chips .rx { background: #fff; color: var(--primary); }
.sp-name { font-size: clamp(16px, 2.6cqw, 21px); font-weight: 750; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sp-gen { font-size: 12.5px; opacity: .8; }
.sp-treat { margin-top: 6px; padding: 8px 12px; border-radius: 12px; background: rgba(255,255,255,.14); border-left: 3px solid #fff; }
.sp-treat small { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .75; }
.sp-treat b { font-size: 14.5px; font-weight: 650; line-height: 1.3; }
.sp-pic { flex: none; aspect-ratio: 1; height: 100%; border-radius: 16px; background: linear-gradient(160deg, #fff, #fdf2f8); display: grid; place-items: center; overflow: hidden; box-shadow: 0 8px 20px rgba(0,0,0,.2); }
.sp-pic img { width: 100%; height: 100%; object-fit: contain; }
.sp-pic .p-art { width: 86%; height: 86%; }
.sp-bar { height: 3px; margin: 0 -14px; background: rgba(255,255,255,.15); } .sp-bar i { display: block; height: 100%; width: 0; background: #fff; }
.login-hero:has(.lh-spot) .lh-sub { display: none; }
@media (max-width: 860px) { .sp-stage { height: 110px; } .lh-ph { font-size: 17px; } .lh-pd { font-size: 13px; } .lh-pimg { width: 84px; height: 84px; } .lh-msgs.promo.has-img { height: 84px !important; } }
@media (max-width: 600px) { .lh-spot { display: none; } }
@media (min-width: 861px) and (max-height: 800px) { .sp-stage { height: 120px; } }
/* sign-in field icons: small and quiet (tabs keep the colourful 3D style) */
.input-icon.i3 > .ic3d { width: 22px; height: 22px; border-radius: 7px; left: 11px; box-shadow: none;
  background: color-mix(in srgb, var(--c2) 12%, transparent); }
.input-icon.i3 > .ic3d svg { width: 13px; height: 13px; color: var(--c2) !important; filter: none; stroke-width: 2; }
.input-icon.i3 .input { padding-left: 42px !important; }

/* ================= login v4: wider sign-in side, promo under the map, calmer spotlight ================= */
@media (min-width: 861px) { .login-wrap.layout-split, .login-wrap.layout-split.side-left { grid-template-columns: 1fr 1fr; } }
.login-wrap.ov-pro .login-card, .login-wrap .login-card { max-width: 430px; }
.lc-map, .login-wrap.layout-split .lc-map { max-width: 430px; }
/* promotion slides on the sign-in side */
.lc-promo { width: 100%; max-width: 430px; position: relative; z-index: 1; }
.lc-promo:not(:has(.lh-block)) { display: none; }
.lc-promo .lh-block, .login-wrap.ov-pro .lc-promo .lh-block, .login-wrap.ov-gradient .lc-promo .lh-block {
  max-width: none; color: var(--text); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
  backdrop-filter: none; -webkit-backdrop-filter: none; border-radius: 16px; padding: 14px 16px 12px; }
.lc-promo .lh-msg { text-shadow: none; }
.lc-promo .lh-msgs.promo, .login-wrap.ov-pro .lc-promo .lh-msgs.promo { height: 64px; }
.lc-promo .lh-msgs.promo.has-img, .login-wrap.ov-pro .lc-promo .lh-msgs.promo.has-img { height: 84px; }
.lc-promo .lh-ph { font-size: 16.5px; }
.lc-promo .lh-pd { font-size: 13px; color: var(--muted); opacity: 1; }
.lc-promo .lh-tag { min-width: 60px; height: 50px; font-size: 15px; background: var(--primary); color: #fff; box-shadow: 0 6px 14px color-mix(in srgb, var(--primary) 35%, transparent); }
.lc-promo .lh-pimg { width: 84px; height: 84px; }
.lc-promo .lh-dots button, .login-wrap.ov-pro .lc-promo .lh-dots button { background: color-mix(in srgb, var(--primary) 25%, transparent); }
.lc-promo .lh-dots button.on, .login-wrap.ov-pro .lc-promo .lh-dots button.on { background: var(--primary); }
.lc-promo .lh-progress { display: none; }
@media (max-width: 860px) { .lc-promo { max-width: none; padding: 0 16px; } }
/* product spotlight: full photo width, no box behind the product, ~20% smaller, no progress line, slow crossfade */
.lh-spot { max-width: none; }
.sp-stage { height: clamp(96px, 24cqw, 25vh); }
.sp-pic { background: none; box-shadow: none; border-radius: 0; overflow: visible; }
.sp-pic .p-art { width: 100%; height: 100%; filter: drop-shadow(0 10px 18px rgba(0,0,0,.35)); }
.sp-pic img { filter: drop-shadow(0 10px 18px rgba(0,0,0,.35)); }
.sp-bar { display: none; }
.lh-spot { padding-bottom: 2px; }
.sp-face { transition: opacity 1.4s ease-in-out, transform 1.6s cubic-bezier(.22,.61,.36,1); }
.sp-face.in { opacity: 0; transform: translateY(10px) scale(.985); }
.sp-face.out { opacity: 0; transform: translateY(-10px) scale(.985); }
@media (min-width: 861px) and (max-height: 800px) { .sp-stage { height: 100px; } }
.lh-msg { transition: opacity 1.1s ease-in-out, transform 1.1s cubic-bezier(.22,.61,.36,1); }
/* fixed-height sign-in box: spare space goes above the footer notes so every tab looks balanced */
.login-card .lc-secure { margin-top: auto; }
.login-card .lc-error:not([hidden]) + .lc-secure { margin-top: 0; }
/* spotlight v3: no header, box hugs the product image, function line under the name */
.lh-spot { padding: 12px 16px; }
.sp-stage { margin-top: 0; height: clamp(110px, 24cqw, 25vh); }
.sp-face { inset: 0; }
.sp-fn { font-size: 13.5px; font-weight: 600; color: color-mix(in srgb, var(--primary) 30%, white); line-height: 1.3; }
.sp-treat { margin-top: 4px; padding: 6px 10px; }
.sp-name { padding-bottom: 2px; line-height: 1.3; }

/* spotlight v4: box height = content; product image is a square exactly as tall as the text (no empty space) */
.lh-spot { padding: 12px 14px; }
.sp-stage { height: auto !important; display: grid; }
.sp-face { position: relative; inset: auto; grid-area: 1 / 1; align-items: stretch; }
.sp-txt { justify-content: center; }
.sp-pic { height: auto; align-self: stretch; aspect-ratio: 1; width: auto; min-width: 96px; max-width: 30%; }
.sp-pic .p-art, .sp-pic img { width: 100%; height: 100%; display: block; }

/* ================= desktop/tablet: whole login fits in one screen, no page scroll ================= */
@media (min-width: 861px) {
  .login-wrap.layout-split:not(.preview) { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
  .login-wrap.layout-split:not(.preview) .login-form { height: 100vh; height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 12px; padding: 16px 32px; overflow: hidden; }
  .login-wrap.layout-split:not(.preview) .login-form > .login-card, .login-wrap.layout-split:not(.preview) .login-form > .lc-map,
  .login-wrap.layout-split:not(.preview) .login-form > .lc-promo { flex: none; margin: 0 !important; }
}
/* shorter screens: tighter sign-in box, one-line promotion */
@media (min-width: 861px) and (max-height: 860px) {
  .login-wrap .login-card { gap: 8px !important; padding-top: 18px !important; padding-bottom: 14px !important; }
  .login-wrap .login-card .input { height: 40px; }
  .lc-submit { height: 42px !important; }
  .login-wrap .login-card .lc-demo { padding: 6px 10px; }
  .lc-map-frame { height: 80px !important; }
  .lc-promo .lh-block { padding: 10px 14px 8px !important; }
  .lc-promo .lh-msgs.promo { height: 48px !important; }
  .lc-promo .lh-tag { height: 40px; min-width: 52px; font-size: 13px; border-radius: 12px; }
  .lc-promo .lh-ph { font-size: 15px; } .lc-promo .lh-pd { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .lc-promo .lh-ptxt { min-width: 0; }
  .lc-promo .lh-dots { margin-top: 6px; }
}
/* very short screens (e.g. 1280×720): map shrinks to an address + directions bar */
@media (min-width: 861px) and (max-height: 780px) {
  .lc-map-frame { display: none; }
  .login-wrap .login-card .lc-tabs button { padding: 5px 4px; }
  .login-wrap .lc-head .brand-logo, .login-wrap .lc-head img { max-height: 44px; }
}
@media (min-width: 861px) and (max-height: 700px) { .lc-promo { display: none; } }
@media (min-width: 861px) and (max-height: 780px) {
  .login-wrap .login-card { gap: 6px !important; padding-top: 14px !important; padding-bottom: 10px !important; }
  .login-wrap .login-card .lc-tabs button { flex-direction: row; justify-content: center; gap: 6px; padding: 6px 4px; }
  .login-wrap .login-card .lc-tabs .ic3d { width: 22px; height: 22px; }
  .login-wrap .login-card .lc-secure { display: none; }
  .login-wrap .login-card .lc-help { font-size: 11px; line-height: 1.3; }
  .login-wrap .login-card h1 { font-size: 19px !important; }
  .login-wrap .lc-map-info { padding: 8px 12px; }
  .login-wrap.layout-split:not(.preview) .login-form { gap: 8px; padding-top: 8px; padding-bottom: 8px; }
}
@media (min-width: 861px) and (max-height: 730px) {
  .login-wrap .login-card .lc-demo { display: none; }
}
@media (min-width: 861px) and (max-height: 780px) { .login-wrap .login-card .lc-demo:not([hidden]) { margin-top: auto; } }
.lc-link { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: var(--primary); cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.lc-link svg { width: 14px; height: 14px; }
.lc-link:hover { text-decoration: underline; }
.su-form .hint { display: flex; gap: 8px; align-items: flex-start; }
.su-form .hint svg { flex: none; width: 16px; height: 16px; color: #229ed9; margin-top: 2px; }

/* ================= below the sign-in box: promotion (left) + square map (right) ================= */
.lc-bottom { width: 100%; max-width: 430px; display: flex; gap: 12px; align-items: stretch; position: relative; z-index: 1; flex: none; }
.lc-bottom .lc-promo { flex: 1; min-width: 0; max-width: none; padding: 0 !important; display: flex; }
.lc-bottom .lc-promo .lh-block { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.lc-bottom .lc-promo .lh-msgs.promo { height: 92px !important; }
.lc-bottom .lc-promo .lh-promo { flex-direction: column; align-items: flex-start; gap: 8px; }
.lc-bottom .lc-promo .lh-tag { height: 34px !important; min-width: 0; padding: 0 10px; font-size: 13px !important; border-radius: 10px; }
.lc-bottom .lc-promo .lh-ph { font-size: 15px !important; }
.lc-bottom .lc-promo .lh-pd { font-size: 12px !important; white-space: normal !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lc-bottom .lc-map, .login-wrap .lc-bottom .lc-map { flex: none; width: 168px !important; max-width: none; aspect-ratio: 1; height: auto; margin: 0 !important; padding: 0;
  display: block !important; position: relative; border-radius: 16px; overflow: hidden; }
.lc-bottom .lc-map-frame { display: block !important; position: absolute !important; inset: 0; width: auto !important; height: auto !important; margin: 0 !important; border-radius: 0; }
.lc-bottom .lc-map-info { position: absolute; left: 0; right: 0; bottom: 0; padding: 8px !important; display: block !important;
  background: linear-gradient(transparent, rgba(255,255,255,.92) 35%); }
.lc-bottom .lc-map-info > .grow { display: none; }
.lc-bottom .lc-map-info .btn { width: 100%; justify-content: center; }
.lc-bottom .lc-branches { position: absolute; top: 0; left: 0; right: 0; z-index: 2; padding: 6px; }
:root[data-theme="dark"] .lc-bottom .lc-map-info { background: linear-gradient(transparent, rgba(23,19,15,.92) 35%); }
@media (min-width: 861px) and (max-height: 780px) { .lc-bottom .lc-map { width: 140px !important; } .lc-bottom .lc-promo .lh-block { padding: 10px 12px 8px !important; } }
@media (max-width: 860px) { .lc-bottom { max-width: none; padding: 0 16px; } .lc-bottom .lc-map, .login-wrap .lc-bottom .lc-map { width: 140px !important; } .lc-bottom .lc-promo { display: flex !important; } }

/* spotlight v5: full photo width, sitting right on top of the moving product ticker */
.login-hero:has(.lh-spot) .lh-content { padding-bottom: 0; }
.login-hero:has(.lh-spot):has(.lh-ticker) .lh-content { padding-bottom: 42px; }
.lh-spot { margin: 0 -48px; width: auto; max-width: none; border-radius: 0; border-left: 0; border-right: 0; border-bottom: 0; padding: 14px 48px; box-shadow: none; }
@media (max-width: 860px) { .lh-spot { margin: 0 -22px; padding: 12px 22px; } .login-hero:has(.lh-spot):has(.lh-ticker) .lh-content { padding-bottom: 42px; } }

/* spotlight v6: rounded card that pops off the photo (still full width, resting on the ticker) + larger text */
.lh-spot { margin: 0 -34px 10px; border-radius: 20px; border: 1px solid rgba(255,255,255,.3); padding: 16px 22px;
  background: rgba(255,255,255,.14); box-shadow: 0 18px 40px rgba(0,0,0,.35), 0 2px 0 rgba(255,255,255,.25) inset; }
.login-hero:has(.lh-spot):has(.lh-ticker) .lh-content { padding-bottom: 42px; }
.sp-chips span { font-size: 12.5px; padding: 3px 10px; }
.sp-name { font-size: clamp(19px, 3.1cqw, 25px); }
.sp-fn { font-size: clamp(14.5px, 2.2cqw, 17px); }
.sp-gen { font-size: 14px; }
.sp-treat { padding: 8px 12px; }
.sp-treat small { font-size: 11.5px; }
.sp-treat b { font-size: clamp(15px, 2.3cqw, 18px); }
@media (max-width: 860px) { .lh-spot { margin: 0 -12px 8px; padding: 12px 14px; } }

/* spotlight + ticker in the brand pink */
.lh-spot { background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 78%, transparent), color-mix(in srgb, var(--primary) 58%, #4a0d2a 20%));
  border-color: color-mix(in srgb, var(--primary) 30%, white); box-shadow: 0 18px 40px color-mix(in srgb, var(--primary) 45%, rgba(0,0,0,.35)), 0 1px 0 rgba(255,255,255,.35) inset; }
.sp-fn { color: #ffd6e7; }
.sp-chips span { background: rgba(255,255,255,.22); }
.sp-chips .rx { background: #fff; color: var(--primary); }
.sp-treat { background: rgba(255,255,255,.16); border-left-color: #fff; }
.lh-ticker { background: linear-gradient(90deg, color-mix(in srgb, var(--primary) 92%, black 8%), var(--primary) 50%, color-mix(in srgb, var(--primary) 92%, black 8%));
  border-top: 1px solid color-mix(in srgb, var(--primary) 40%, white); backdrop-filter: none; -webkit-backdrop-filter: none; }
.lh-tick { border-right-color: rgba(255,255,255,.3); }
.lh-tick svg { color: #ffd6e7; }
.lh-tick em { opacity: .9; }
/* spotlight toolbar: search, group, < 3 / 46 > */
.sp-tools { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.sp-search { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border-radius: 10px; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.28); }
.sp-search svg { width: 15px; height: 15px; flex: none; opacity: .85; }
.sp-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: #fff; font: inherit; font-size: 13.5px; }
.sp-search input::placeholder { color: rgba(255,255,255,.75); }
.sp-search:focus-within { background: rgba(255,255,255,.28); border-color: #fff; }
.sp-tools select { height: 34px; max-width: 34%; border-radius: 10px; border: 1px solid rgba(255,255,255,.28); background-color: rgba(255,255,255,.18); color: #fff; font: inherit; font-size: 13px;
  padding: 0 26px 0 10px; appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center; background-size: 13px; }
.sp-tools select option { color: #111; }
.sp-nav { display: flex; align-items: center; gap: 4px; flex: none; }
.sp-nav button { width: 32px; height: 32px; border-radius: 99px; border: 0; background: #fff; color: var(--primary); display: grid; place-items: center; cursor: pointer; box-shadow: 0 3px 10px rgba(0,0,0,.18); transition: transform .15s; }
.sp-nav button:hover { transform: scale(1.08); } .sp-nav button svg { width: 16px; height: 16px; }
.sp-nav .sp-count { min-width: 58px; text-align: center; font-size: 13px; font-weight: 700; margin: 0; opacity: 1; font-variant-numeric: tabular-nums; }
.sp-face.in { transform: translateX(calc(var(--dir, 1) * 22px)); }
.sp-face.out { transform: translateX(calc(var(--dir, 1) * -22px)); }
.sp-empty { align-items: center; justify-content: center; gap: 8px; min-height: 90px; opacity: .9; font-weight: 600; }
.sp-empty svg { width: 18px; height: 18px; }
@media (min-width: 861px) and (max-height: 780px) { .sp-tools { margin-bottom: 6px; } .sp-search, .sp-tools select { height: 30px; } .sp-nav button { width: 28px; height: 28px; } }
.sp-search input::-webkit-search-cancel-button { filter: brightness(0) invert(1); opacity: .85; cursor: pointer; }
/* spotlight: translucent light-pink glass */
.lh-spot { background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 30%, rgba(255,214,231,.30)), color-mix(in srgb, var(--primary) 22%, rgba(255,182,213,.22)));
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid rgba(255,214,231,.55); box-shadow: 0 16px 36px rgba(120,10,60,.28), 0 1px 0 rgba(255,255,255,.45) inset; }
.lh-spot .sp-name, .lh-spot .sp-treat b { text-shadow: 0 1px 6px rgba(80,0,40,.35); }
/* spotlight: lighter, more transparent */
.lh-spot { background: linear-gradient(135deg, rgba(255,214,231,.16), rgba(255,182,213,.10));
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,224,238,.38); box-shadow: 0 10px 28px rgba(120,10,60,.14), 0 1px 0 rgba(255,255,255,.3) inset; }
.lh-spot .sp-name, .lh-spot .sp-fn, .lh-spot .sp-gen, .lh-spot .sp-treat b { text-shadow: 0 1px 8px rgba(60,0,30,.55); }
.lh-spot .sp-treat { background: rgba(255,255,255,.10); }
.lh-spot .sp-search, .lh-spot .sp-tools select { background-color: rgba(255,255,255,.12); border-color: rgba(255,255,255,.3); }

/* sign-in background: big hearts, love & family-care watermarks drifting upward */
.lfb-love { position: absolute; inset: 0; overflow: hidden; }
.lfb-love .lv { position: absolute; bottom: -260px; color: color-mix(in srgb, var(--primary) 16%, transparent); animation: lvFly linear infinite; will-change: transform; }
.lfb-love .lv svg { width: 100%; height: 100%; display: block; }
.lfb-love .lv-family, .lfb-love .lv-mother, .lfb-love .lv-care { color: color-mix(in srgb, var(--primary) 12%, transparent); }
.lfb-love .lv-heart:nth-child(odd) { color: color-mix(in srgb, var(--primary) 20%, transparent); }
@keyframes lvFly {
  0% { transform: translate(0, 0) rotate(var(--rot)) scale(.9); opacity: 0; }
  10% { opacity: 1; }
  50% { transform: translate(var(--sway), -60vh) rotate(calc(var(--rot) * -1)) scale(1); }
  90% { opacity: 1; }
  100% { transform: translate(0, calc(-100vh - 300px)) rotate(var(--rot)) scale(1.05); opacity: 0; }
}
.fbg-playful .lfb-love, .fbg-love .lfb-love, .fbg-icons .lfb-love { display: block; }
.fbg-playful .lfb-icons { display: none; }
@media (prefers-reduced-motion: reduce) { .lfb-love .lv { animation: none; bottom: auto; top: calc(var(--i, 1) * 10%); } }
.lfb-love .lv-family, .lfb-love .lv-mother, .lfb-love .lv-care { color: color-mix(in srgb, var(--primary) 17%, transparent); }
/* copyright & developer credit under the sign-in side */
.lc-copy { position: relative; z-index: 1; width: 100%; max-width: 430px; text-align: center; font-size: 11.5px; line-height: 1.5; color: var(--muted); flex: none; }
.lc-copy b { color: var(--primary); font-weight: 700; }
@media (min-width: 861px) and (max-height: 780px) { .lc-copy { font-size: 10.5px; line-height: 1.35; } }
@media (max-width: 860px) { .lc-copy { padding: 4px 16px 0; } }
/* copyright pinned to the bottom-right of the page, with a faint pink rule above */
@media (min-width: 861px) {
  .login-wrap.layout-split:not(.preview) .login-form { padding-bottom: 54px; }
  .login-wrap .lc-copy { position: absolute; right: 28px; bottom: 12px; width: auto; max-width: 420px; text-align: right; padding-top: 7px;
    border-top: 1px solid color-mix(in srgb, var(--primary) 28%, transparent); z-index: 2; }
}
@media (min-width: 861px) and (max-height: 780px) { .login-wrap.layout-split:not(.preview) .login-form { padding-bottom: 44px; } .login-wrap .lc-copy { bottom: 8px; padding-top: 5px; } }
@media (max-width: 860px) { .lc-copy { margin-top: 10px; padding-top: 8px; border-top: 1px solid color-mix(in srgb, var(--primary) 28%, transparent); width: calc(100% - 32px); } }
@media (min-width: 861px) and (min-height: 781px) and (max-height: 860px) { .login-wrap.layout-split:not(.preview) .login-form { gap: 9px; padding-top: 8px; padding-bottom: 60px; } }
.lc-dev { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: inherit; }
.lc-copy a { display: inline-flex; align-items: center; gap: 4px; color: var(--primary); font-weight: 600; text-decoration: none; }
.lc-copy a:hover { text-decoration: underline; }
.lc-copy a svg { width: 12px; height: 12px; }
@media (min-width: 861px) and (min-height: 781px) and (max-height: 860px) { .login-wrap.layout-split:not(.preview) .login-form { padding-bottom: 76px; } }
@media (min-width: 861px) and (min-height: 861px) { .login-wrap.layout-split:not(.preview) .login-form { padding-bottom: 72px; } }
@media (min-width: 861px) and (max-height: 780px) { .login-wrap.layout-split:not(.preview) .login-form { padding-bottom: 58px; } }
@media (min-width: 861px) and (max-height: 860px) { .login-wrap .lc-copy { font-size: 10.5px; line-height: 1.35; padding-top: 5px; bottom: 8px; } .login-wrap.layout-split:not(.preview) .login-form { padding-bottom: 58px; } }
/* watermarks are moved by JS in random directions */
.lfb-love .lv { left: 0; top: 0; bottom: auto; animation: none !important; }
/* see-through sign-in panel & promotion card */
.login-wrap .login-card, .login-wrap.ov-pro .login-card, .login-wrap:not(.fbg-plain).layout-split .login-card {
  background: rgba(255,255,255,.55) !important; backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border: 1px solid rgba(255,255,255,.75) !important; box-shadow: 0 18px 50px color-mix(in srgb, var(--primary) 18%, transparent) !important; }
.login-wrap .login-card .input, .login-wrap .login-card select.input { background-color: rgba(255,255,255,.75); }
.login-wrap .login-card .lc-tabs { background: rgba(255,255,255,.45); }
.login-wrap .login-card .lc-demo { background: rgba(255,255,255,.4) !important; }
.lc-bottom .lc-promo .lh-block { background: rgba(255,255,255,.55) !important; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-color: rgba(255,255,255,.75) !important; }
:root[data-theme="dark"] .login-wrap .login-card { background: rgba(30,22,28,.6) !important; border-color: rgba(255,255,255,.12) !important; }
:root[data-theme="dark"] .lc-bottom .lc-promo .lh-block { background: rgba(30,22,28,.6) !important; }
/* more see-through panels so the flying watermarks show */
.login-wrap .login-card, .login-wrap.ov-pro .login-card, .login-wrap:not(.fbg-plain).layout-split .login-card {
  background: rgba(255,255,255,.28) !important; backdrop-filter: blur(5px) saturate(1.2); -webkit-backdrop-filter: blur(5px) saturate(1.2);
  border-color: rgba(255,255,255,.65) !important; }
.login-wrap .login-card .input, .login-wrap .login-card select.input { background-color: rgba(255,255,255,.6); }
.login-wrap .login-card .lc-tabs { background: rgba(255,255,255,.25); }
.login-wrap .login-card .lc-tabs button.on { background: rgba(255,255,255,.75); }
.login-wrap .login-card .lc-demo { background: rgba(255,255,255,.22) !important; }
.lc-bottom .lc-promo .lh-block { background: rgba(255,255,255,.28) !important; backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
.lc-bottom .lc-map { background: rgba(255,255,255,.3); }
.lc-bottom .lc-map-frame { opacity: .88; }
.lc-bottom .lc-map-info { background: linear-gradient(transparent, rgba(255,255,255,.55) 40%); }
.login-wrap .lc-lang { background: rgba(255,255,255,.55); }
.lfb-love .lv { color: color-mix(in srgb, var(--primary) 22%, transparent); }
:root[data-theme="dark"] .login-wrap .login-card, :root[data-theme="dark"] .lc-bottom .lc-promo .lh-block { background: rgba(30,22,28,.35) !important; }
.sp-nav { gap: 8px; }
/* watermarks: hearts, families & pharmacy symbols — kept faint */
.lfb-love .lv, .lfb-love .lv-family, .lfb-love .lv-mother, .lfb-love .lv-care, .lfb-love .lv-heart:nth-child(odd) { color: color-mix(in srgb, var(--primary) 12%, transparent); }
.lfb-love [fill="#fff"] { opacity: .5; }
/* sign-up: choose Telegram or SMS for the code */
.su-methods { display: flex; gap: 8px; margin-top: 4px; }
.su-method { flex: 1; cursor: pointer; }
.su-method input { position: absolute; opacity: 0; pointer-events: none; }
.su-method span { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 10px; border: 1.5px solid var(--border); border-radius: 10px; font-weight: 600; font-size: 13.5px; transition: .15s; }
.su-method span svg { width: 16px; height: 16px; }
.su-method input:checked + span { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, transparent); color: var(--primary); }
.su-method input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.lc-code-info [data-via] { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--primary); }
.lc-code-info [data-via] svg { width: 15px; height: 15px; }
/* book page turn between User / Customer / Supplier sign-in */
.lc-turn-page { backface-visibility: hidden; -webkit-backface-visibility: hidden; will-change: transform; overflow: hidden; }
.lc-turn-page .lc-turn-shade { position: absolute; inset: 0; pointer-events: none; border-radius: inherit; opacity: 0; }
.lc-turn-page .lc-turn-shade.fwd { background: linear-gradient(90deg, rgba(255,255,255,0) 40%, rgba(120,10,60,.18)); }
.lc-turn-page .lc-turn-shade.back { background: linear-gradient(270deg, rgba(255,255,255,0) 40%, rgba(120,10,60,.18)); }
.lc-turn-page, .lc-turn-page * { animation: none !important; transition: none !important; }
/* the turning page is a flat snapshot: no live blur, so rotating it is cheap */
.login-wrap .login-card.lc-turn-page.lc-turn-page.lc-turn-page { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; background: linear-gradient(90deg, #fff, #fff7fb) !important; box-shadow: 0 12px 30px rgba(120,10,60,.16) !important; }
:root[data-theme="dark"] .login-wrap .login-card.lc-turn-page.lc-turn-page.lc-turn-page { background: #1e161c !important; }
.lc-turn-page .lc-turn-page, .lc-turn-page .input, .lc-turn-page .lc-tabs, .lc-turn-page .lc-lang { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
/* real-book page turn: chained strips with lighting, a paper back side and a cast shadow */
.lc-book { position: absolute; z-index: 50; pointer-events: none; perspective: 2200px; transform-style: preserve-3d; }
.lc-book .lc-strip { position: absolute; top: 0; transform-style: preserve-3d; will-change: transform; }
.lc-book .lc-face, .lc-book .lc-back { position: absolute; top: 0; height: 100%; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.lc-book .lc-back { transform: rotateY(180deg); background: linear-gradient(90deg, #fff4f9, #ffe9f3 70%, #ffdcec); }
.lc-book .lc-lit { position: absolute; inset: 0; opacity: 0; pointer-events: none; background: linear-gradient(90deg, rgba(110,20,70,.55), rgba(110,20,70,.12) 60%, rgba(255,255,255,.35)); }
.lc-book .lc-back .lc-lit { background: linear-gradient(90deg, rgba(255,255,255,.5), rgba(110,20,70,.35)); }
.lc-book .lc-book-shadow { position: absolute; inset: 0; border-radius: 20px; pointer-events: none; transform: translateZ(-1px); }
.lc-book .lc-turn-page { position: absolute; }
:root[data-theme="dark"] .lc-book .lc-back { background: linear-gradient(90deg, #2a1f27, #241a21); }
/* flat per-strip shading (driven by each strip's angle) so the bend reads as one smooth curved sheet */
.lc-book .lc-lit, .lc-book .lc-back .lc-lit { background: rgb(96, 18, 62); }
.lc-book .lc-back { background: #ffeaf4; }
.lc-book .lc-back::after { content: ''; position: absolute; inset: 0; background: rgba(255,255,255,.35); }
:root[data-theme="dark"] .lc-book .lc-back { background: #2a1f27; }
.lc-book .lc-face, .lc-book .lc-back { outline: 1px solid transparent; } /* smoother edges on 3-D transformed strips */

/* ===== login card designed as an open book: hardcover, leather spine, stacked page edges, fold shadow, ribbon ===== */
.login-wrap .login-card.bk.bk {
  --bk-cover: color-mix(in srgb, var(--primary) 62%, #5a0f3a);
  border-radius: 5px 16px 16px 5px !important;
  border: 1px solid rgba(255,255,255,.7) !important; border-left: 0 !important;
  /* fold shadow next to the spine, a soft page curve on the right, over the see-through paper */
  background-image: linear-gradient(90deg, rgba(110,20,70,.16), rgba(110,20,70,.05) 7%, transparent 14%, transparent 92%, rgba(110,20,70,.05)) !important;
  box-shadow:
    1px 1px 0 0 rgba(235,190,212,.9),
    3px 2px 0 -.5px #fffafd, 3px 2px 0 0 rgba(226,170,198,.95),
    5px 4px 0 -1px #fff6fb, 5px 4px 0 0 rgba(220,160,190,.95),
    7px 6px 0 -1px #fff3f9, 7px 6px 0 0 rgba(212,148,180,.95),
    9px 8px 0 -1px #ffeff7, 9px 8px 0 0 rgba(205,138,172,.95),
    12px 11px 0 1px var(--bk-cover),
    20px 24px 44px rgba(110,20,70,.28) !important;
  overflow: visible;
}
/* leather spine with raised bands */
.login-card.bk .bk-spine { position: absolute; z-index: 3; pointer-events: none; left: -15px; top: -7px; bottom: -18px; width: 20px; border-radius: 9px 2px 2px 9px;
  background:
    linear-gradient(180deg, transparent 9%, rgba(255,255,255,.28) 9%, rgba(255,255,255,.28) 10.5%, transparent 10.5%, transparent 89.5%, rgba(255,255,255,.28) 89.5%, rgba(255,255,255,.28) 91%, transparent 91%),
    linear-gradient(90deg, color-mix(in srgb, var(--bk-cover) 70%, #000) 0%, var(--bk-cover) 30%, color-mix(in srgb, var(--primary) 75%, #fff) 52%, var(--bk-cover) 72%, color-mix(in srgb, var(--bk-cover) 65%, #000) 100%);
  box-shadow: -4px 6px 14px rgba(90,10,50,.3), inset -2px 0 3px rgba(0,0,0,.18); }
/* satin ribbon bookmark hanging over the top edge */
.login-card.bk .bk-ribbon { position: absolute; z-index: 3; pointer-events: none; top: -9px; right: 118px; width: 15px; height: 58px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--primary) 80%, #000) 0, var(--primary) 35%, color-mix(in srgb, var(--primary) 55%, #fff) 55%, var(--primary) 75%, color-mix(in srgb, var(--primary) 80%, #000));
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 84%, 0 100%); filter: drop-shadow(0 3px 3px rgba(90,10,50,.3)); opacity: .92; }
.login-card.bk .bk-ribbon::before { content: ''; position: absolute; top: 0; left: -3px; right: -3px; height: 9px; background: color-mix(in srgb, var(--primary) 70%, #000); border-radius: 0 0 2px 2px; }
:root[data-theme="dark"] .login-wrap .login-card.bk.bk { background-image: linear-gradient(90deg, rgba(0,0,0,.35), transparent 14%) !important;
  box-shadow: 1px 1px 0 0 #3a2a34, 3px 2px 0 -.5px #2c2029, 3px 2px 0 0 #43313d, 5px 4px 0 -1px #2a1e27, 5px 4px 0 0 #4a3644, 8px 7px 0 1px var(--bk-cover), 18px 22px 40px rgba(0,0,0,.45) !important; }
/* the page copy left in place while a page turns back */
.login-wrap .login-card.bk.lc-under { pointer-events: none; z-index: 40; animation: none !important; }
.login-wrap .login-card.bk.lc-under * { animation: none !important; transition: none !important; }
/* turning paper: same corner shape as the book page */
.lc-book .lc-turn-page { border-radius: 5px 16px 16px 5px; }
/* phones: slimmer spine and stack so the book fits the screen */
@media (max-width: 860px) {
  .login-wrap .login-card.bk.bk { border-radius: 4px 14px 14px 4px !important; margin-left: 10px !important; width: calc(100% - 18px) !important;
    box-shadow: 1px 1px 0 0 rgba(235,190,212,.9), 3px 2px 0 -.5px #fffafd, 3px 2px 0 0 rgba(226,170,198,.95), 5px 4px 0 -1px #fff4fa, 5px 4px 0 0 rgba(214,150,182,.95), 7px 6px 0 1px var(--bk-cover), 10px 14px 28px rgba(110,20,70,.22) !important; }
  .login-card.bk .bk-spine { left: -10px; width: 13px; top: -4px; bottom: -10px; }
  .login-card.bk .bk-ribbon { right: 82px; height: 46px; }
}
/* ===== spiral binding (សៀវភៅចោះកង): punched holes + rose-gold rings instead of the leather spine ===== */
.login-card.bk .bk-spine { display: none; }
.login-card.bk .bk-coil { position: absolute; z-index: 4; pointer-events: none; left: -13px; top: 16px; bottom: 16px; width: 34px;
  display: flex; flex-direction: column; justify-content: space-between; }
.login-card.bk .bk-coil i { position: relative; display: block; height: 14px; }
/* punched hole in the page */
.login-card.bk .bk-coil i::before { content: ''; position: absolute; left: 22px; top: 3px; width: 8px; height: 8px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, rgba(70,10,40,.55), rgba(110,20,70,.35) 60%, rgba(255,255,255,.6) 62%);
  box-shadow: inset 1px 1px 2px rgba(0,0,0,.35), 0 1px 0 rgba(255,255,255,.8); }
/* the ring: comes out of the hole, wraps round the page edge */
.login-card.bk .bk-coil i::after { content: ''; position: absolute; left: 0; top: 1px; width: 29px; height: 9px; border-radius: 6px;
  transform: rotate(-9deg); transform-origin: 85% 50%;
  background: linear-gradient(180deg, #fff6fa 0%, #f0c3d6 22%, #c27396 52%, #e8a9c3 72%, #8e3d63 100%);
  box-shadow: 0 2px 2px rgba(90,10,50,.35), inset 0 1px 0 rgba(255,255,255,.9);
  -webkit-mask: linear-gradient(90deg, #000 86%, transparent 86%); mask: linear-gradient(90deg, #000 86%, transparent 86%); /* ring end disappears into the hole */ }
/* the card's left edge: plain page edge, no fold shadow, slight paper margin for the holes */
.login-wrap .login-card.bk.bk { border-radius: 6px 16px 16px 6px !important; border-left: 1px solid rgba(255,255,255,.7) !important;
  background-image: linear-gradient(90deg, rgba(110,20,70,.07), transparent 9%, transparent 92%, rgba(110,20,70,.05)) !important; padding-left: 38px !important; }
:root[data-theme="dark"] .login-card.bk .bk-coil i::after { background: linear-gradient(180deg, #f3e3ea, #b98aa0 50%, #5a3346); }
@media (max-width: 860px) {
  .login-wrap .login-card.bk.bk { padding-left: 30px !important; margin-left: 12px !important; width: calc(100% - 20px) !important; }
  .login-card.bk .bk-coil { left: -11px; top: 12px; bottom: 12px; width: 30px; }
  .login-card.bk .bk-coil i::before { left: 18px; width: 7px; height: 7px; }
  .login-card.bk .bk-coil i::after { width: 25px; height: 8px; }
}
/* ring drawn as a wire loop: past the page edge the whole curved end shows; on the page only the front wire,
   which runs into the punched hole (the back wire is hidden behind the page) */
.login-card.bk .bk-coil i { height: 16px; }
.login-card.bk .bk-coil i::before { left: 21px; top: 3px; width: 10px; height: 10px;
  background: radial-gradient(circle at 45% 40%, rgba(60,8,35,.7), rgba(110,20,70,.45) 55%, rgba(255,255,255,.75) 60%);
  box-shadow: inset 1px 1.5px 2px rgba(0,0,0,.4), 0 .5px 0 rgba(255,255,255,.9); }
.login-card.bk .bk-coil i::after { left: 0; top: 1px; width: 30px; height: 12px; border-radius: 7px; background: none; box-shadow: none;
  border: 2.6px solid #c47898; border-top-color: #f3c9da; border-left-color: #d98fb0; border-bottom-color: #9a4a6f;
  transform: rotate(-12deg); transform-origin: 85% 40%;
  filter: drop-shadow(0 1.5px 1px rgba(90,10,50,.35));
  -webkit-mask: linear-gradient(#000, #000) 0 0 / 13px 100% no-repeat, linear-gradient(#000, #000) 0 0 / 27px 50% no-repeat;
          mask: linear-gradient(#000, #000) 0 0 / 13px 100% no-repeat, linear-gradient(#000, #000) 0 0 / 27px 50% no-repeat; }
:root[data-theme="dark"] .login-card.bk .bk-coil i::after { background: none; border-color: #d9b6c6; border-bottom-color: #7a4a60; }
@media (max-width: 860px) {
  .login-card.bk .bk-coil i::before { left: 17px; width: 8px; height: 8px; }
  .login-card.bk .bk-coil i::after { width: 25px; height: 10px; border-width: 2.2px;
    -webkit-mask: linear-gradient(#000, #000) 0 0 / 11px 100% no-repeat, linear-gradient(#000, #000) 0 0 / 22px 50% no-repeat;
            mask: linear-gradient(#000, #000) 0 0 / 11px 100% no-repeat, linear-gradient(#000, #000) 0 0 / 22px 50% no-repeat; }
}
.lc-book .lc-turn-page, .login-card.lc-under { contain: layout paint style; } /* page copies are self-contained: cheaper to lay out and draw */
/* cast shadow: a fixed soft band that slides with the fold (no repaint per frame) */
.lc-book .lc-book-shadow { inset: 0 auto 0 0; width: 34%; border-radius: 0; background: linear-gradient(90deg, rgba(110,20,70,.30), rgba(110,20,70,.12) 45%, transparent) !important; will-change: transform, opacity; }
/* (no will-change on the shading layers: too many layers made the first frame slower) */
/* ===== corner-peel page turn ===== */
.lc-peel { position: absolute; z-index: 50; pointer-events: none; overflow: visible; }
.lc-peel .lc-pbox { position: absolute; left: 0; top: 0; overflow: hidden; transform-origin: 0 0; will-change: transform; }
.lc-peel .lc-pin { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
/* the back of the paper, with the print faintly showing through (mirrored, as on real paper) */
.lc-peel .lc-flap { border-radius: 16px 6px 6px 16px; overflow: hidden; background: linear-gradient(135deg, #fff9fc, #ffeef6 60%, #ffe4f0); }
.lc-peel .lc-ghost { opacity: .07; filter: grayscale(.3); }
/* light across the flap: darker in the bend at the fold, a soft highlight, a little darker again at the edge */
.lc-peel .lc-flapshade { position: absolute; left: 0; top: 0; transform-origin: 0 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(110,20,70,.26) 0%, rgba(110,20,70,.08) 18%, rgba(255,255,255,.35) 45%, rgba(255,255,255,0) 70%, rgba(110,20,70,.08) 100%); }
/* shadow the flap casts on the page beneath, along the fold */
.lc-peel .lc-reveal { position: absolute; left: 0; top: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(80,10,45,.34) 0%, rgba(80,10,45,.14) 30%, rgba(80,10,45,0) 100%); }
:root[data-theme="dark"] .lc-peel .lc-flap { background: linear-gradient(135deg, #34262f, #2a1f27); }
/* taller book on desktop: starts near the top and grows to fill the height above the promo & map cards */
@media (min-width: 861px) {
  .login-wrap.layout-split:not(.preview) .login-form { justify-content: flex-start !important; padding-top: clamp(18px, 3.2vh, 40px) !important; }
  .login-wrap.layout-split:not(.preview) .login-card.bk { flex: 1 1 auto; max-height: 780px; }
  .login-wrap.layout-split:not(.preview) .lc-bottom { flex: none; margin-bottom: 14px; }
}
/* the page copy that turns: same notebook page as the card (rings, holes, margin), but as solid paper in the card's own tint,
   and without the cover / page-stack edges (those stay with the book underneath) */
.login-wrap .lc-peel .login-card.bk.bk.lc-turn-page, .login-wrap .lc-book .login-card.bk.bk.lc-turn-page {
  box-shadow: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
  background: linear-gradient(90deg, rgba(110,20,70,.07), transparent 9%, transparent 92%, rgba(110,20,70,.05)), linear-gradient(160deg, #fff7fb, #fdeaf3) !important; }
.login-wrap .lc-peel .login-card.bk.bk.lc-turn-page .input, .login-wrap .lc-peel .login-card.bk.bk.lc-turn-page .lc-tabs,
.login-wrap .lc-peel .login-card.bk.bk.lc-turn-page .lc-lang { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
.lc-peel .lc-ghost.bk { box-shadow: none !important; }
:root[data-theme="dark"] .login-wrap .lc-peel .login-card.bk.bk.lc-turn-page { background: linear-gradient(160deg, #2c2129, #251b22) !important; }
/* softer shadows during the page turn */
.lc-peel .lc-reveal { background: linear-gradient(180deg, rgba(80,10,45,.22) 0%, rgba(80,10,45,.08) 40%, rgba(80,10,45,0) 100%); }
.lc-peel .lc-flapshade { background: linear-gradient(180deg, rgba(110,20,70,.14) 0%, rgba(110,20,70,.04) 14%, rgba(255,255,255,.3) 45%, rgba(255,255,255,0) 70%, rgba(110,20,70,.04) 100%); }
/* no shadows on the turning page: no shadow beneath, no glow, only a soft light on the paper */
.lc-peel .lc-reveal { display: none; }
.lc-peel .lc-flap { box-shadow: none !important; }
.lc-peel .lc-flapshade { background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.3) 45%, rgba(255,255,255,0) 75%); }
/* selected sign-in tab: light green highlight */
.login-wrap .login-card .lc-tabs button.on { background: #dcfce7 !important; color: #166534 !important; box-shadow: 0 0 0 1px #86efac inset, 0 2px 6px rgba(22,101,52,.12) !important; }
.login-wrap .login-card .lc-tabs button.on span { color: #166534; }
:root[data-theme="dark"] .login-wrap .login-card .lc-tabs button.on { background: rgba(34,197,94,.18) !important; color: #86efac !important; box-shadow: 0 0 0 1px rgba(134,239,172,.4) inset !important; }
:root[data-theme="dark"] .login-wrap .login-card .lc-tabs button.on span { color: #86efac; }
/* sign-up page inside the login book: keep the notebook, header and language button; hide the sign-in parts */
.login-card.signing-up > :not(.bk-coil):not(.bk-ribbon):not(.lc-lang):not(.lc-head):not([data-pane=signup]):not(.su-close):not(.bk-close) { display: none !important; }
.login-card.signing-up [data-pane=signup] { display: flex !important; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.su-page { display: flex; flex-direction: column; gap: 10px; flex: 1 1 auto; min-height: 0; overflow-y: auto; margin: 0 -6px; padding: 0 6px 4px; }
.su-page .su-fields { gap: 10px; }
.su-page .su-back { align-self: flex-start; font-size: 13px; }
.su-page .su-go { width: 100%; margin-top: auto; flex: none; }
.su-page .su-err:not([hidden]) { margin: 0; }
@media (min-width: 861px) and (max-height: 820px) { .su-page, .su-page .su-fields { gap: 7px; } .su-page .f .input { padding-top: 8px; padding-bottom: 8px; } }
/* sign-up page: pairs of fields side by side so the whole form fits the page */
.su-page .su-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.su-page .su-row > :only-child { grid-column: 1 / -1; }
.su-page .su-row .input { min-width: 0; }
.su-page .su-row .input::placeholder { font-size: 12.5px; }
@media (max-width: 420px) { .su-page .su-row { grid-template-columns: 1fr; } }
/* keep the heading clear of the ribbon bookmark */
.login-card.signing-up .lc-head > div:not(.lc-badge) { padding-right: 104px; }
.login-card.signing-up .lc-head h1 { font-size: 19px; line-height: 1.25; }
@media (max-width: 860px) { .login-card.signing-up .lc-head > div:not(.lc-badge) { padding-right: 88px; } }
@media (min-width: 861px) and (max-height: 940px) { .su-page, .su-page .su-fields, .su-page .su-row { gap: 7px; } .su-page .f .input { padding-top: 8px; padding-bottom: 8px; } .su-page .hint { margin-top: 2px; } }
/* on short screens only the fields scroll; the back link and the Send code / Create account button stay on the page */
.su-page { overflow: visible; }
.su-page > [data-step] { flex: 0 1 auto; min-height: 0; overflow-y: auto; margin: 0 -6px; padding: 2px 6px; }
.su-page > .su-back, .su-page > .su-err, .su-page > .su-go { flex: none; }
/* ✕ on the sign-up page: top-right corner of the book; the language button and ribbon move left to make room */
.login-card.signing-up .su-close { position: absolute; top: 14px; right: 14px; z-index: 5; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid rgba(255,255,255,.8); background: rgba(255,255,255,.7); color: var(--muted); cursor: pointer;
  box-shadow: 0 2px 6px rgba(110,20,70,.1); transition: background .15s, color .15s, transform .15s; }
.login-card.signing-up .su-close:hover { background: #fff; color: var(--primary); transform: rotate(90deg); }
.login-card.signing-up .su-close:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.login-card.signing-up .su-close svg { width: 16px; height: 16px; }
.login-card.signing-up .lc-lang { right: 56px; }
.login-card.bk.signing-up .bk-ribbon { right: 136px; }
.login-card.signing-up .lc-head > div:not(.lc-badge) { padding-right: 116px; }
.login-card.signing-up .lc-head h1 { font-size: 18px; }
@media (max-width: 860px) {
  .login-card.bk.signing-up .bk-ribbon { right: 130px; }
  .login-card.signing-up .lc-head > div:not(.lc-badge) { padding-right: 104px; }
}
/* sign-up page: no ribbon (keeps the heading clear of it); heading stops before the language button and ✕ */
.login-card.bk.signing-up .bk-ribbon { display: none; }
.login-card.signing-up .lc-head > div:not(.lc-badge) { padding-right: 100px; }
@media (max-width: 860px) { .login-card.signing-up .lc-head > div:not(.lc-badge) { padding-right: 112px; } }
/* ✕ on the sign-up page: light pink */
.login-card.signing-up .su-close { background: #ffe4f1; border-color: #ffc2df; color: #d63f8c; }
.login-card.signing-up .su-close:hover { background: #ffd1e8; color: #c0267a; }
:root[data-theme="dark"] .login-card.signing-up .su-close { background: rgba(255,102,204,.18); border-color: rgba(255,102,204,.35); color: #ffb3dd; }
/* ✕ on the sign-up page: 3-D glossy light-pink button that lifts and shines on hover */
.login-card.signing-up .su-close {
  overflow: hidden; border: 1px solid rgba(255,255,255,.9); color: #c2337f;
  background: radial-gradient(circle at 35% 28%, #fff 0%, #ffe6f2 26%, #ffc4e1 62%, #ff9fcd 100%);
  box-shadow: 0 4px 10px rgba(214,63,140,.28), 0 1px 2px rgba(214,63,140,.25), inset 0 -3px 6px rgba(214,63,140,.22), inset 0 2px 3px rgba(255,255,255,.95);
  transition: transform .2s cubic-bezier(.3,1.4,.5,1), box-shadow .2s, filter .2s; }
/* glossy cap on the upper half */
.login-card.signing-up .su-close::before { content: ''; position: absolute; left: 18%; right: 18%; top: 6%; height: 42%; border-radius: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,255,255,0)); pointer-events: none; }
/* shine that sweeps across on hover */
.login-card.signing-up .su-close::after { content: ''; position: absolute; top: -20%; bottom: -20%; left: -60%; width: 40%; transform: skewX(-20deg);
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.85), rgba(255,255,255,0)); pointer-events: none; transition: left .5s ease; }
.login-card.signing-up .su-close svg { position: relative; z-index: 1; filter: drop-shadow(0 1px 0 rgba(255,255,255,.8)); }
.login-card.signing-up .su-close:hover {
  color: #b01e6e; transform: translateY(-2px) scale(1.08); filter: brightness(1.06) saturate(1.15);
  background: radial-gradient(circle at 35% 28%, #fff 0%, #ffeef6 24%, #ffcfe6 58%, #ffacd4 100%);
  box-shadow: 0 8px 18px rgba(214,63,140,.38), 0 0 0 4px rgba(255,159,205,.25), inset 0 -3px 6px rgba(214,63,140,.2), inset 0 2px 3px #fff; }
.login-card.signing-up .su-close:hover::after { left: 120%; }
.login-card.signing-up .su-close:hover svg { transform: rotate(90deg); transition: transform .3s; }
.login-card.signing-up .su-close svg { transition: transform .3s; }
.login-card.signing-up .su-close:active { transform: translateY(0) scale(.96); box-shadow: 0 2px 6px rgba(214,63,140,.3), inset 0 2px 5px rgba(214,63,140,.25); }
@media (prefers-reduced-motion: reduce) { .login-card.signing-up .su-close, .login-card.signing-up .su-close::after, .login-card.signing-up .su-close svg { transition: none; } }
:root[data-theme="dark"] .login-card.signing-up .su-close { color: #ffd6ec; background: radial-gradient(circle at 35% 28%, #ffd6ec 0%, #e0679f 45%, #a8327f 100%); border-color: rgba(255,255,255,.3); }
/* ✕: shiny rose-pink candy button (white ✕), brighter and glowing on hover */
.login-card.signing-up .su-close {
  color: #fff; border: 1px solid rgba(255,255,255,.75);
  background: radial-gradient(circle at 34% 26%, #ffd6ef 0%, #ff8fd6 30%, #ff66cc 58%, #e0409f 100%);
  box-shadow: 0 5px 12px rgba(224,64,159,.42), 0 1px 2px rgba(150,20,90,.35), inset 0 -4px 7px rgba(170,25,110,.35), inset 0 2px 3px rgba(255,255,255,.9); }
.login-card.signing-up .su-close::before { background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.08)); }
.login-card.signing-up .su-close svg { filter: drop-shadow(0 1px 1px rgba(150,20,90,.45)); stroke-width: 2.6; }
.login-card.signing-up .su-close:hover {
  color: #fff; filter: brightness(1.08) saturate(1.2);
  background: radial-gradient(circle at 34% 26%, #ffe8f6 0%, #ff9fdc 28%, #ff70d0 56%, #ec4aa9 100%);
  box-shadow: 0 9px 20px rgba(224,64,159,.5), 0 0 0 4px rgba(255,102,204,.28), 0 0 18px rgba(255,102,204,.55), inset 0 -4px 7px rgba(170,25,110,.3), inset 0 2px 3px #fff; }
.login-card.signing-up .su-close:active { box-shadow: 0 2px 6px rgba(224,64,159,.4), inset 0 3px 6px rgba(150,20,90,.35); }
/* ribbon bookmark: lighter satin pink */
.login-card.bk .bk-ribbon {
  background: linear-gradient(90deg, #ff8fd6 0%, #ffb3e3 30%, #ffe0f2 50%, #ffb3e3 70%, #ff8fd6 100%);
  filter: drop-shadow(0 2px 2px rgba(214,63,140,.22)); opacity: 1; }
.login-card.bk .bk-ribbon::before { background: linear-gradient(180deg, #ff9fdc, #ff7fcf); }
:root[data-theme="dark"] .login-card.bk .bk-ribbon { background: linear-gradient(90deg, #e0679f, #ff9fd6 50%, #e0679f); }
/* ribbon bookmark: glossy pink plastic — sharp highlight, curved edges, a gloss that slides down now and then */
.login-card.bk .bk-ribbon { overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255,255,255,0) 22%, rgba(255,255,255,.95) 30%, rgba(255,255,255,.95) 36%, rgba(255,255,255,0) 44%),
    linear-gradient(90deg, rgba(255,255,255,0) 62%, rgba(255,255,255,.45) 68%, rgba(255,255,255,0) 74%),
    linear-gradient(90deg, #d93a9c 0%, #ff66cc 18%, #ff8fd8 45%, #ff66cc 78%, #c82d8c 100%);
  filter: drop-shadow(0 3px 3px rgba(200,45,140,.35)) drop-shadow(0 0 1px rgba(150,20,90,.3)); }
.login-card.bk .bk-ribbon::before { height: 9px; background: linear-gradient(180deg, #ffd1ee 0%, #ff7fd2 45%, #e04aa8 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.8); }
.login-card.bk .bk-ribbon::after { content: ''; position: absolute; left: -20%; right: -20%; height: 30%; top: -40%;
  background: linear-gradient(180deg, rgba(255,255,255,0), rgba(255,255,255,.75), rgba(255,255,255,0)); transform: skewY(-25deg);
  animation: ribbonGloss 4.5s ease-in-out infinite; pointer-events: none; }
@keyframes ribbonGloss { 0%, 62% { top: -40%; } 92%, 100% { top: 120%; } }
@media (prefers-reduced-motion: reduce) { .login-card.bk .bk-ribbon::after { animation: none; display: none; } }
:root[data-theme="dark"] .login-card.bk .bk-ribbon { background:
  linear-gradient(90deg, rgba(255,255,255,0) 22%, rgba(255,255,255,.7) 32%, rgba(255,255,255,0) 44%), linear-gradient(90deg, #a8327f, #ff66cc 45%, #a8327f); }
/* ribbon gloss: very slow and gentle — drifts down over ~4 s, once every ~10 s */
.login-card.bk .bk-ribbon::after { animation: ribbonGlossSlow 10s ease-in-out infinite;
  background: linear-gradient(180deg, rgba(255,255,255,0), rgba(255,255,255,.5), rgba(255,255,255,0)); }
@keyframes ribbonGlossSlow { 0%, 55% { top: -40%; } 95%, 100% { top: 120%; } }
/* ribbon: less shine — faint highlights, and only a small, soft light drifting down */
.login-card.bk .bk-ribbon {
  background:
    linear-gradient(90deg, rgba(255,255,255,0) 26%, rgba(255,255,255,.35) 33%, rgba(255,255,255,0) 42%),
    linear-gradient(90deg, #e64fae 0%, #ff70cf 25%, #ff8fd8 50%, #ff70cf 75%, #e04aa8 100%);
  filter: drop-shadow(0 2px 2px rgba(200,45,140,.25)); }
.login-card.bk .bk-ribbon::before { background: linear-gradient(180deg, #ffb3e3, #ff7fd2); box-shadow: none; }
.login-card.bk .bk-ribbon::after { height: 14%; left: 0; right: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0), rgba(255,255,255,.32), rgba(255,255,255,0)); }
.login-card.bk .bk-ribbon::after { height: 12%; background: linear-gradient(180deg, rgba(255,255,255,0), rgba(255,255,255,.6), rgba(255,255,255,0)); }
/* ribbon: no fixed reflection — just a small soft light that wanders slowly around it */
.login-card.bk .bk-ribbon { background: linear-gradient(90deg, #ea58b4 0%, #ff74d0 30%, #ff86d6 50%, #ff74d0 70%, #e652ae 100%); }
.login-card.bk .bk-ribbon::after { left: 0; right: auto; top: 0; width: 14px; height: 14px; border-radius: 50%; transform: none;
  background: radial-gradient(circle, rgba(255,255,255,.55) 0%, rgba(255,255,255,.18) 45%, rgba(255,255,255,0) 70%);
  animation: ribbonWander 14s ease-in-out infinite; }
@keyframes ribbonWander {
  0%   { transform: translate(-2px, 6px); }
  20%  { transform: translate(5px, 22px); }
  40%  { transform: translate(0px, 38px); }
  55%  { transform: translate(4px, 30px); }
  75%  { transform: translate(-3px, 14px); }
  100% { transform: translate(-2px, 6px); }
}
@media (max-width: 860px) { @keyframes ribbonWander { 0%, 100% { transform: translate(-2px, 4px); } 35% { transform: translate(4px, 18px); } 65% { transform: translate(-1px, 30px); } } }
@media (prefers-reduced-motion: reduce) { .login-card.bk .bk-ribbon::after { animation: none; display: none; } }
/* ribbon: see-through pink */
.login-card.bk .bk-ribbon { background: linear-gradient(90deg, rgba(234,88,180,.55) 0%, rgba(255,116,208,.45) 30%, rgba(255,134,214,.4) 50%, rgba(255,116,208,.45) 70%, rgba(230,82,174,.55) 100%);
  filter: drop-shadow(0 1px 2px rgba(200,45,140,.15)); }
.login-card.bk .bk-ribbon::before { background: linear-gradient(180deg, rgba(255,179,227,.7), rgba(255,127,210,.6)); }
/* squared notebook paper: light gray grid on every page (also on the page while it turns) */
.login-wrap .login-card.bk.bk {
  background-image:
    linear-gradient(90deg, rgba(110,20,70,.07), transparent 9%, transparent 92%, rgba(110,20,70,.05)),
    linear-gradient(rgba(120,120,130,.13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120,120,130,.13) 1px, transparent 1px) !important;
  background-size: 100% 100%, 20px 20px, 20px 20px !important;
  background-position: 0 0, 0 -1px, -1px 0 !important; }
.login-wrap .lc-peel .login-card.bk.bk.lc-turn-page, .login-wrap .lc-book .login-card.bk.bk.lc-turn-page {
  background:
    linear-gradient(90deg, rgba(110,20,70,.07), transparent 9%, transparent 92%, rgba(110,20,70,.05)) 0 0 / 100% 100%,
    linear-gradient(rgba(120,120,130,.13) 1px, transparent 1px) 0 -1px / 20px 20px,
    linear-gradient(90deg, rgba(120,120,130,.13) 1px, transparent 1px) -1px 0 / 20px 20px,
    linear-gradient(160deg, #fff7fb, #fdeaf3) !important; }
/* the back of a turning page shows the grid faintly too */
.lc-peel .lc-flap { background:
    linear-gradient(rgba(120,120,130,.08) 1px, transparent 1px) 0 -1px / 20px 20px,
    linear-gradient(90deg, rgba(120,120,130,.08) 1px, transparent 1px) -1px 0 / 20px 20px,
    linear-gradient(135deg, #fff9fc, #ffeef6 60%, #ffe4f0); }
:root[data-theme="dark"] .login-wrap .login-card.bk.bk {
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px) !important;
  background-size: 20px 20px, 20px 20px !important; background-position: 0 -1px, -1px 0 !important; }
/* selected sign-in tab (current page): light pink */
.login-wrap .login-card .lc-tabs button.on { background: #ffe4f1 !important; color: #c0267a !important; box-shadow: 0 0 0 1px #ffb3d9 inset, 0 2px 6px rgba(214,63,140,.14) !important; }
.login-wrap .login-card .lc-tabs button.on span { color: #c0267a; }
:root[data-theme="dark"] .login-wrap .login-card .lc-tabs button.on { background: rgba(255,102,204,.18) !important; color: #ffb3dd !important; box-shadow: 0 0 0 1px rgba(255,102,204,.4) inset !important; }
:root[data-theme="dark"] .login-wrap .login-card .lc-tabs button.on span { color: #ffb3dd; }
/* the book is solid paper: the floating animation behind it does not show through */
.login-wrap .login-card.bk.bk {
  background:
    linear-gradient(90deg, rgba(110,20,70,.07), transparent 9%, transparent 92%, rgba(110,20,70,.05)) 0 0 / 100% 100%,
    linear-gradient(rgba(120,120,130,.13) 1px, transparent 1px) 0 -1px / 20px 20px,
    linear-gradient(90deg, rgba(120,120,130,.13) 1px, transparent 1px) -1px 0 / 20px 20px,
    linear-gradient(160deg, #fff7fb, #fdeaf3) !important;
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
:root[data-theme="dark"] .login-wrap .login-card.bk.bk {
  background:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px) 0 -1px / 20px 20px,
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px) -1px 0 / 20px 20px,
    linear-gradient(160deg, #2c2129, #251b22) !important; }
/* login page: slightly bigger text */
.login-wrap .login-card .lc-head h1 { font-size: 23px; }
.login-wrap .login-card [data-sub] { font-size: 15.5px; }
.login-wrap .login-card .lc-tabs button span { font-size: 13.5px; }
.login-wrap .login-card .f { font-size: 14.5px; }
.login-wrap .login-card .input, .login-wrap .login-card select.input { font-size: 15px; }
.login-wrap .login-card .lc-submit, .login-wrap .login-card .su-go { font-size: 17px; }
.login-wrap .login-card .lc-secure, .login-wrap .login-card .lc-help, .login-wrap .login-card .hint { font-size: 13px; }
.login-wrap .login-card .lc-demo { font-size: 12.5px; }
.login-wrap .login-card .lc-lang { font-size: 13px; }
.login-wrap .login-card .lc-error { font-size: 14px; }
.login-wrap .lc-copy { font-size: 12.5px; }
.login-card.signing-up .lc-head h1 { font-size: 20px; }
@media (max-width: 860px) { .login-wrap .login-card .input, .login-wrap .login-card select.input { font-size: 16px; } }
/* bigger login text: take priority over the layout's own (smaller) sizes */
.login-wrap .login-card.bk.bk .lc-head h1 { font-size: 23px !important; }
.login-wrap .login-card.bk.bk.signing-up .lc-head h1 { font-size: 20px !important; }
.login-wrap .login-card.bk.bk .lc-head p, .login-wrap .login-card.bk.bk [data-sub] { font-size: 15.5px !important; }
.login-wrap .login-card.bk.bk .f { font-size: 14.5px !important; }
/* more room above the copyright, which is a little taller with the bigger text */
@media (min-width: 861px) { .login-wrap.layout-split:not(.preview) .lc-bottom { margin-bottom: 36px; } }
/* copyright: wide enough that each line stays on one line with the bigger text */
@media (min-width: 861px) { .login-wrap .lc-copy { max-width: 600px !important; width: max-content !important; } }
/* more space between the book and the promo / map boxes below it */
.login-wrap .lc-bottom { margin-top: 30px !important; }
@media (max-width: 860px) { .login-wrap .lc-bottom { margin-top: 24px !important; } }
/* smaller main title in the login book */
.login-wrap .login-card.bk.bk .lc-head h1 { font-size: 20px !important; }
.login-wrap .login-card.bk.bk.signing-up .lc-head h1 { font-size: 18px !important; }
/* desktop: promo + map row reaches left to just inside the photo frame; right edge stays lined up with the book */
@media (min-width: 861px) {
  .login-wrap.layout-split:not(.preview) .lc-bottom { align-self: stretch; width: auto; max-width: none;
    margin-left: -16px !important; margin-right: max(0px, calc((100% - 430px) / 2)) !important; } /* panel has 32px padding: -16px leaves a 16px gap to the photo */
}
/* promo box: label / photo on the left, text on its right */
.lc-bottom .lc-promo .lh-promo { flex-direction: row !important; align-items: center !important; gap: 14px !important; }
.lc-bottom .lc-promo .lh-promo > .lh-tag { flex: none; align-self: center; }
.lc-bottom .lc-promo .lh-ptxt { min-width: 0; flex: 1; }
.lc-bottom .lc-promo .lh-pimg { width: 76px; height: 76px; }
/* smaller gaps above and below the promo / map row */
.login-wrap .lc-bottom { margin-top: 18px !important; }
@media (min-width: 861px) { .login-wrap.layout-split:not(.preview) .lc-bottom { margin-bottom: 26px !important; } }
@media (max-width: 860px) { .login-wrap .lc-bottom { margin-top: 16px !important; } }
/* ===== promo box: bigger natural-colour tiles, vertical dots on the right, random slide motions ===== */
.lc-bottom .lc-promo .lh-block { position: relative; padding-right: 30px !important; }
.lc-bottom .lc-promo .lh-msg .lh-tag, .login-wrap .lc-bottom .lc-promo .lh-tag {
  width: 64px !important; min-width: 64px !important; height: 64px !important; padding: 0 4px !important; border-radius: 16px !important;
  font-size: 16px !important; font-weight: 800; letter-spacing: .01em; text-align: center; line-height: 1.1;
  background: linear-gradient(160deg, #eef6ee, #dcebdc) !important; color: #3f6b4a !important; border: 1px solid #c9dfca;
  box-shadow: 0 4px 10px rgba(60,90,60,.12), inset 0 1px 0 rgba(255,255,255,.8) !important; }
/* a different natural colour for each slide: sage, sky, amber, lavender, coral, teal */
.lc-bottom .lc-promo .lh-msg:nth-child(6n+2) .lh-tag { background: linear-gradient(160deg, #eaf3fa, #d6e7f4) !important; color: #2f5d82 !important; border-color: #c3d9ec; box-shadow: 0 4px 10px rgba(47,93,130,.12), inset 0 1px 0 rgba(255,255,255,.8) !important; }
.lc-bottom .lc-promo .lh-msg:nth-child(6n+3) .lh-tag { background: linear-gradient(160deg, #fdf5e6, #f8e8c8) !important; color: #8a5a12 !important; border-color: #efdcb3; box-shadow: 0 4px 10px rgba(138,90,18,.12), inset 0 1px 0 rgba(255,255,255,.8) !important; }
.lc-bottom .lc-promo .lh-msg:nth-child(6n+4) .lh-tag { background: linear-gradient(160deg, #f3effa, #e4dcf2) !important; color: #5b4a86 !important; border-color: #d6cbea; box-shadow: 0 4px 10px rgba(91,74,134,.12), inset 0 1px 0 rgba(255,255,255,.8) !important; }
.lc-bottom .lc-promo .lh-msg:nth-child(6n+5) .lh-tag { background: linear-gradient(160deg, #fcefeb, #f6dbd3) !important; color: #9a4a36 !important; border-color: #eccbc1; box-shadow: 0 4px 10px rgba(154,74,54,.12), inset 0 1px 0 rgba(255,255,255,.8) !important; }
.lc-bottom .lc-promo .lh-msg:nth-child(6n) .lh-tag { background: linear-gradient(160deg, #e9f6f4, #d3ece8) !important; color: #2d6b63 !important; border-color: #bfe0da; box-shadow: 0 4px 10px rgba(45,107,99,.12), inset 0 1px 0 rgba(255,255,255,.8) !important; }
.lc-bottom .lc-promo .lh-pimg { width: 64px; height: 64px; }
/* dots: a vertical bar on the right side */
.lc-bottom .lc-promo .lh-dots { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); flex-direction: column; gap: 5px; margin: 0 !important; }
.lc-bottom .lc-promo .lh-dots button { width: 6px !important; height: 6px; transition: height .3s, background .3s; }
.lc-bottom .lc-promo .lh-dots button.on { width: 6px !important; height: 20px; }
/* random motions (the block's data-fx is set on every change) */
.lc-promo .lh-block[data-fx] .lh-msg { transition: opacity .9s ease, transform .9s cubic-bezier(.22,.61,.36,1), filter .9s ease; transform-origin: 50% 50%; }
.lc-promo .lh-block[data-fx] .lh-msg.active { opacity: 1; transform: none; filter: none; }
.lc-promo .lh-block[data-fx=fade] .lh-msg:not(.active) { transform: none; }
.lc-promo .lh-block[data-fx=up] .lh-msg:not(.active) { transform: translateY(60%); } .lc-promo .lh-block[data-fx=up] .lh-msg.leaving { transform: translateY(-60%); }
.lc-promo .lh-block[data-fx=down] .lh-msg:not(.active) { transform: translateY(-60%); } .lc-promo .lh-block[data-fx=down] .lh-msg.leaving { transform: translateY(60%); }
.lc-promo .lh-block[data-fx=side] .lh-msg:not(.active) { transform: translateX(50px); } .lc-promo .lh-block[data-fx=side] .lh-msg.leaving { transform: translateX(-50px); }
.lc-promo .lh-block[data-fx=zoom] .lh-msg:not(.active) { transform: scale(.75); } .lc-promo .lh-block[data-fx=zoom] .lh-msg.leaving { transform: scale(1.15); }
.lc-promo .lh-block[data-fx=flip] .lh-msg:not(.active) { transform: perspective(500px) rotateX(-80deg); } .lc-promo .lh-block[data-fx=flip] .lh-msg.leaving { transform: perspective(500px) rotateX(80deg); }
.lc-promo .lh-block[data-fx=blur] .lh-msg:not(.active) { filter: blur(8px); transform: scale(1.04); } .lc-promo .lh-block[data-fx=blur] .lh-msg.leaving { filter: blur(8px); transform: scale(.96); }
.lc-promo .lh-block[data-fx=swing] .lh-msg:not(.active) { transform: rotate(-6deg) translateX(30px); transform-origin: 0 50%; } .lc-promo .lh-block[data-fx=swing] .lh-msg.leaving { transform: rotate(6deg) translateX(-30px); }
@media (prefers-reduced-motion: reduce) { .lc-promo .lh-block[data-fx] .lh-msg { transition: opacity .3s; transform: none !important; filter: none !important; } }
/* emoji icons fill the tile */
.lc-bottom .lc-promo .lh-tag.is-emoji { font-size: 34px !important; line-height: 1; filter: drop-shadow(0 2px 2px rgba(0,0,0,.12)); }
/* ===== sign-in tabs: a pink highlight with a light-green line slides to the selected tab ===== */
.login-wrap .login-card .lc-tabs { position: relative; }
.lc-tabs .lc-tab-ink { position: absolute; left: 0; top: 4px; z-index: 0; opacity: 0; pointer-events: none; border-radius: 9px;
  background: #ffe4f1; box-shadow: 0 0 0 1px #ffb3d9 inset, 0 2px 6px rgba(214,63,140,.14);
  transition: transform .42s cubic-bezier(.3,1.25,.5,1), width .42s cubic-bezier(.3,1.25,.5,1); }
.lc-tabs .lc-tab-ink::after { content: ''; position: absolute; left: 22%; right: 22%; bottom: 4px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, #b7f5c9, #7ee2a0, #b7f5c9); box-shadow: 0 0 6px rgba(126,226,160,.8); }
.lc-tabs button { position: relative; z-index: 1; transition: transform .15s ease, color .25s; }
.lc-tabs button:active { transform: scale(.94); }
/* the moving highlight does the job now: selected button itself stays clear */
.login-wrap .login-card .lc-tabs:has(.lc-tab-ink) button.on { background: transparent !important; box-shadow: none !important; }
:root[data-theme="dark"] .lc-tabs .lc-tab-ink { background: rgba(255,102,204,.18); box-shadow: 0 0 0 1px rgba(255,102,204,.4) inset; }
@media (prefers-reduced-motion: reduce) { .lc-tabs .lc-tab-ink { transition: none; } }
/* ===== photo frame light: a pink and a light-green streak circling together, thicker line ===== */
.lh-border { padding: 5px !important;
  background: conic-gradient(from var(--lh-a), transparent 0 18%, rgba(183,245,201,.25) 24%, #b7f5c9 31%, #7ee2a0 36%, transparent 43%,
    transparent 0 68%, rgba(255,179,217,.3) 74%, #ffb3d9 81%, #ff66cc 86%, transparent 93%) !important;
  filter: drop-shadow(0 0 7px rgba(255,179,217,.6)) drop-shadow(0 0 5px rgba(126,226,160,.45)) !important; }
.lc-tabs .lc-tab-ink::after { bottom: 2px; height: 2.5px; }
/* sign-up link sits right under the Sign in button */
.login-wrap .login-card .lc-help { margin-top: 2px; text-align: center; }
/* desktop: promo + map row also reaches the right side of the page (16px from the edge); the map takes the extra width */
@media (min-width: 861px) {
  .login-wrap.layout-split:not(.preview) .lc-bottom { margin-right: -16px !important; }
  .login-wrap .lc-bottom .lc-promo { flex: 1.15 1 0; }
  .lc-bottom .lc-map, .login-wrap .lc-bottom .lc-map { flex: 1 1 0 !important; width: auto !important; aspect-ratio: auto !important; min-height: 168px; }
}
@media (min-width: 861px) and (max-height: 780px) { .lc-bottom .lc-map, .login-wrap .lc-bottom .lc-map { min-height: 140px; } }
/* ===== tab bar: plain tabs on one fine base line; a thin pink line slides under the selected tab ===== */
.login-wrap .login-card .lc-tabs { background: transparent !important; border: 0 !important; border-radius: 0 !important; padding: 0 !important; gap: 0 !important;
  box-shadow: inset 0 -1px 0 rgba(120,120,130,.28) !important; }
.login-wrap .login-card .lc-tabs button, .login-wrap .login-card .lc-tabs button.on { background: transparent !important; box-shadow: none !important; border-radius: 0 !important; }
.login-wrap .login-card .lc-tabs button { padding-bottom: 10px !important; }
.login-wrap .login-card .lc-tabs button:hover:not(.on) { color: var(--text); }
.lc-tabs .lc-tab-ink { top: auto !important; bottom: 0; height: 2.5px !important; border-radius: 2px 2px 0 0; background: var(--primary) !important; box-shadow: 0 0 6px color-mix(in srgb, var(--primary) 45%, transparent) !important; }
.lc-tabs .lc-tab-ink::after { content: none !important; }
.lc-tabs button:active { transform: none; }
:root[data-theme="dark"] .login-wrap .login-card .lc-tabs { box-shadow: inset 0 -1px 0 rgba(255,255,255,.15) !important; }
/* ===== waving flags: language buttons wave all the time; flags in the language menu wave on hover ===== */
.lc-lang .flag, .lang-btn .flag, #lang .flag, .lang-menu .opt:hover .flag, .opt[data-lang]:hover .flag {
  position: relative; transform-origin: 0 50%; animation: flagWave 2.8s ease-in-out infinite; }
.lc-lang .flag::after, .lang-btn .flag::after, #lang .flag::after, .opt[data-lang]:hover .flag::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: soft-light;
  background: linear-gradient(100deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.55) 18%, rgba(0,0,0,.28) 34%, rgba(255,255,255,.5) 50%, rgba(0,0,0,.22) 66%, rgba(255,255,255,.45) 82%, rgba(255,255,255,0) 100%);
  background-size: 220% 100%; animation: flagRipple 2.8s linear infinite; }
@keyframes flagWave {
  0%, 100% { transform: perspective(70px) rotateY(0deg) skewY(0deg); }
  25% { transform: perspective(70px) rotateY(-14deg) skewY(2.5deg); }
  50% { transform: perspective(70px) rotateY(0deg) skewY(0deg); }
  75% { transform: perspective(70px) rotateY(10deg) skewY(-2deg); }
}
@keyframes flagRipple { from { background-position: 110% 0; } to { background-position: -110% 0; } }
@media (prefers-reduced-motion: reduce) { .flag, .flag::after { animation: none !important; } }
/* promo box: the icon / photo tile is a square as tall as the box (small inner margin), text beside it */
.lc-bottom .lc-promo .lh-block { padding: 10px 30px 10px 10px !important; }
.lc-bottom .lc-promo .lh-msgs.promo, .lc-bottom .lc-promo .lh-msgs.promo.has-img { flex: 1 1 auto; height: auto !important; min-height: 0; align-self: stretch; }
.lc-bottom .lc-promo .lh-msg { align-items: stretch !important; }
.lc-bottom .lc-promo .lh-promo { height: 100%; align-items: stretch !important; width: 100%; }
.lc-bottom .lc-promo .lh-promo > .lh-tag, .lc-bottom .lc-promo .lh-promo > .lh-pimg, .login-wrap .lc-bottom .lc-promo .lh-msg .lh-tag {
  height: 100% !important; width: auto !important; min-width: 0 !important; aspect-ratio: 1 / 1; flex: none; align-self: stretch;
  border-radius: 14px !important; font-size: clamp(18px, 2.2vw, 28px) !important; }
.lc-bottom .lc-promo .lh-tag.is-emoji { font-size: clamp(44px, 4.6vw, 72px) !important; }
.lc-bottom .lc-promo .lh-ptxt { align-self: center; }
.lc-bottom .lc-promo .lh-pd { -webkit-line-clamp: 3 !important; }
/* phones: promo box on top (full width, tile fills its height), map below */
@media (max-width: 860px) {
  .login-wrap .lc-bottom { flex-direction: column; }
  .login-wrap .lc-bottom .lc-promo { height: 132px; flex: none; }
  .lc-bottom .lc-map, .login-wrap .lc-bottom .lc-map { width: 100% !important; aspect-ratio: auto !important; height: 150px; }
}

/* =====================================================================================================
   Login page as an information page: tab bar on top, health news in the middle, the login book and the
   article reader open like books at the top left (next to the photo) only when needed.
   ===================================================================================================== */
/* --- top bar: tabs on one fine line + language button --- */
.login-wrap .lc-topbar { display: flex; align-items: flex-end; gap: 12px; flex: none; position: relative; z-index: 6; align-self: stretch; margin: 0 -16px 12px; }
.login-wrap .lc-topbar .lc-tabs { flex: 1; min-width: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: relative;
  background: transparent !important; border: 0 !important; border-radius: 0 !important; padding: 0 !important; gap: 0 !important; box-shadow: inset 0 -1px 0 rgba(120,120,130,.3) !important; }
.login-wrap .lc-topbar .lc-tabs button { background: transparent !important; box-shadow: none !important; border-radius: 0 !important; padding: 8px 4px 11px !important;
  display: flex; flex-direction: column; align-items: center; gap: 5px; color: var(--muted); font-weight: 600; cursor: pointer; }
.login-wrap .lc-topbar .lc-tabs button span { font-size: 13.5px; }
.login-wrap .lc-topbar .lc-tabs button:hover { color: var(--text); }
.login-wrap .lc-topbar .lc-tabs button.on, .login-wrap .lc-topbar .lc-tabs button.on span { color: #c0267a; }
.login-wrap .lc-topbar .lc-tabs.idle button.on, .login-wrap .lc-topbar .lc-tabs.idle button.on span { color: var(--muted); }
.login-wrap .lc-topbar .lc-tabs.idle .lc-tab-ink { opacity: 0 !important; }
.login-wrap .lc-topbar .lc-lang { position: static !important; flex: none; margin-bottom: 10px; }
:root[data-theme="dark"] .login-wrap .lc-topbar .lc-tabs { box-shadow: inset 0 -1px 0 rgba(255,255,255,.15) !important; }

/* --- the stage between the tab bar and the promo / map row --- */
.login-wrap .lc-stage { position: relative; flex: 1 1 auto; min-height: 0; align-self: stretch; margin: 0 -16px; container-type: inline-size; }
.login-wrap .lc-news { position: absolute; inset: 0; overflow-y: auto; padding: 2px 6px 6px 2px; display: flex; flex-direction: column; gap: 12px;
  transition: padding-left .5s cubic-bezier(.2,.8,.25,1), opacity .35s; scrollbar-width: thin; }
.lc-news-head { display: flex; align-items: center; gap: 12px; flex: none; }
.lc-news-head .ln-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; flex: none;
  background: radial-gradient(circle at 34% 26%, #ffd6ef, #ff66cc 60%, #e0409f); box-shadow: 0 4px 10px rgba(224,64,159,.35); }
.lc-news-head .ln-ico svg { width: 20px; height: 20px; }
.lc-news-head h2 { margin: 0; font-size: 18px; }
.lc-news-head p { margin: 2px 0 0; }
.lc-news-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 10px; }
.lc-news-card { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 14px; text-align: left; cursor: pointer; font: inherit; color: var(--text);
  background: rgba(255,255,255,.62); border: 1px solid rgba(255,255,255,.85); box-shadow: 0 2px 10px rgba(150,40,100,.06);
  transition: transform .2s cubic-bezier(.3,1.3,.5,1), box-shadow .2s, background .2s; }
.lc-news-card:hover { transform: translateY(-2px); background: rgba(255,255,255,.85); box-shadow: 0 8px 22px rgba(214,63,140,.16); }
.lc-news-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.lc-news-card .nc-ico { width: 54px; height: 54px; border-radius: 14px; flex: none; display: grid; place-items: center; font-size: 28px; line-height: 1;
  border: 1px solid #c9dfca; background: linear-gradient(160deg, #eef6ee, #dcebdc); }
.lc-news-card .nc-ico.c1 { background: linear-gradient(160deg, #eaf3fa, #d6e7f4); border-color: #c3d9ec; }
.lc-news-card .nc-ico.c2 { background: linear-gradient(160deg, #fdf5e6, #f8e8c8); border-color: #efdcb3; }
.lc-news-card .nc-ico.c3 { background: linear-gradient(160deg, #f3effa, #e4dcf2); border-color: #d6cbea; }
.lc-news-card .nc-ico.c4 { background: linear-gradient(160deg, #fcefeb, #f6dbd3); border-color: #eccbc1; }
.lc-news-card .nc-ico.c5 { background: linear-gradient(160deg, #e9f6f4, #d3ece8); border-color: #bfe0da; }
.lc-news-card .nc-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.lc-news-card .nc-meta { display: flex; gap: 6px; align-items: center; }
.lc-news-card .nc-cat { font-size: 11px; font-weight: 700; color: #c0267a; text-transform: uppercase; letter-spacing: .04em; }
.lc-news-card .nc-hot { display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 700; color: #8a5a12; background: #fdf0d5; padding: 1px 7px; border-radius: 99px; }
.lc-news-card .nc-hot svg { width: 11px; height: 11px; fill: currentColor; stroke: none; }
.lc-news-card b { font-size: 14.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lc-news-card .nc-sum { font-size: 12.5px; color: var(--muted); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lc-news-card .nc-date { font-size: 11.5px; color: var(--muted); opacity: .8; }
.lc-news-card .nc-go { color: var(--muted); flex: none; } .lc-news-card .nc-go svg { width: 16px; height: 16px; }
:root[data-theme="dark"] .lc-news-card { background: rgba(30,22,28,.6); border-color: rgba(255,255,255,.08); }

/* --- the books: at the top left of the stage (next to the photo), opening like a cover from that side --- */
.login-wrap .lc-stage > .login-card.bk.bk { position: absolute; top: 0; bottom: 0; left: 16px; width: min(430px, calc(100% - 32px)); max-height: none;
  margin: 0 !important; z-index: 5; transform-origin: 0 50%; animation: none; }
.login-wrap .lc-stage > .login-card.bk.is-closed { visibility: hidden; pointer-events: none; }
/* with a book open, the news moves aside when there is room; otherwise it fades behind the book */
.login-wrap .lc-stage.book-open .lc-news { opacity: .22; pointer-events: none; }
@container (min-width: 760px) { .login-wrap .lc-stage.book-open .lc-news { padding-left: 466px; opacity: 1; pointer-events: auto; } }
/* the book's ✕ (glossy rose pink) */
.login-card .bk-close { position: absolute; top: 14px; right: 14px; z-index: 6; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; overflow: hidden;
  color: #fff; border: 1px solid rgba(255,255,255,.75); background: radial-gradient(circle at 34% 26%, #ffd6ef 0%, #ff8fd6 30%, #ff66cc 58%, #e0409f 100%);
  box-shadow: 0 5px 12px rgba(224,64,159,.42), inset 0 -4px 7px rgba(170,25,110,.35), inset 0 2px 3px rgba(255,255,255,.9); transition: transform .2s cubic-bezier(.3,1.4,.5,1), box-shadow .2s, filter .2s; }
.login-card .bk-close::before { content: ''; position: absolute; left: 18%; right: 18%; top: 6%; height: 42%; border-radius: 50%; background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.08)); pointer-events: none; }
.login-card .bk-close svg { position: relative; z-index: 1; width: 16px; height: 16px; stroke-width: 2.6; filter: drop-shadow(0 1px 1px rgba(150,20,90,.45)); transition: transform .3s; }
.login-card .bk-close:hover { transform: translateY(-2px) scale(1.08); filter: brightness(1.08) saturate(1.2); box-shadow: 0 9px 20px rgba(224,64,159,.5), 0 0 0 4px rgba(255,102,204,.28), 0 0 18px rgba(255,102,204,.55); }
.login-card .bk-close:hover svg { transform: rotate(90deg); }
.login-card .bk-close:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.login-card.bk .lc-head > div:not(.lc-badge) { padding-right: 46px; }
.login-card.bk .bk-ribbon { right: 120px; }

/* --- article reader page --- */
.login-wrap .lc-reader { display: flex; flex-direction: column; gap: 10px; padding: 18px 24px 14px 40px !important; }
.lc-reader .rd-top { display: flex; justify-content: flex-start; padding-right: 48px; flex: none; }
.lc-reader .rd-lang { display: inline-flex; padding: 3px; gap: 2px; border-radius: 99px; background: rgba(255,255,255,.75); border: 1px solid rgba(214,63,140,.2); }
.lc-reader .rd-lang button { border: 0; background: transparent; padding: 5px 14px; border-radius: 99px; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.lc-reader .rd-lang button.on { background: #ffe4f1; color: #c0267a; box-shadow: 0 0 0 1px #ffb3d9 inset; }
.lc-reader .rd-head { display: flex; gap: 14px; align-items: center; flex: none; }
.lc-reader .rd-ico { width: 60px; height: 60px; border-radius: 16px; flex: none; display: grid; place-items: center; font-size: 32px; line-height: 1;
  background: linear-gradient(160deg, #fff4fa, #ffe4f1); border: 1px solid #ffc6e2; box-shadow: 0 4px 10px rgba(214,63,140,.12); }
.lc-reader .rd-cat { font-size: 11.5px; font-weight: 700; color: #c0267a; text-transform: uppercase; letter-spacing: .04em; }
.lc-reader .rd-head h1 { margin: 2px 0; font-size: 20px; line-height: 1.3; }
.lc-reader .rd-date { font-size: 12.5px; color: var(--muted); }
.lc-reader .rd-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; font-size: 15px; line-height: 1.7; color: var(--text); padding-right: 6px; scrollbar-width: thin; }
.lc-reader .rd-body[lang=km] { line-height: 1.95; }
.lc-reader .rd-body p { margin: 0 0 11px; }
.lc-reader .rd-note { font-size: 12.5px; color: var(--muted); font-style: italic; border-top: 1px dashed rgba(120,120,130,.35); padding-top: 9px; margin-top: 4px !important; }
.lc-reader .rd-foot { display: flex; justify-content: space-between; flex: none; }
.lc-reader .rd-nav { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: #fff; border: 1px solid rgba(255,255,255,.75);
  background: radial-gradient(circle at 34% 26%, #ffd6ef, #ff7fd2 45%, #e04aa8); box-shadow: 0 4px 10px rgba(224,64,159,.35); transition: transform .15s, opacity .2s; }
.lc-reader .rd-nav svg { width: 18px; height: 18px; stroke-width: 2.6; }
.lc-reader .rd-nav:hover:not(:disabled) { transform: scale(1.08); }
.lc-reader .rd-nav:disabled { opacity: .3; cursor: default; }

/* --- phones: everything in one column; an open book takes the place of the news --- */
@media (max-width: 860px) {
  .login-wrap .lc-topbar { margin: 4px 0 10px; padding: 0 16px; width: 100%; }
  .login-wrap .lc-topbar .lc-tabs button { padding: 6px 2px 9px !important; }
  .login-wrap .lc-topbar .lc-tabs button span { font-size: 12.5px; }
  .login-wrap .lc-stage { margin: 0; width: 100%; padding: 0 16px; }
  .login-wrap .lc-news { position: static; overflow: visible; padding: 0; }
  .login-wrap .lc-news-list { grid-template-columns: 1fr; }
  .login-wrap .lc-stage.book-open .lc-news { display: none; }
  .login-wrap .lc-stage > .login-card.bk.bk { position: relative; top: auto; bottom: auto; left: auto; width: calc(100% - 10px); margin: 0 0 0 10px !important; }
  .login-wrap .lc-stage > .login-card.bk.is-closed { display: none; }
  .login-wrap .lc-reader { min-height: 70vh; }
}
@media (prefers-reduced-motion: reduce) { .login-wrap .lc-news { transition: none; } }
/* reader content shows at once (no staggered fade-in when an article is redrawn) */
.login-wrap .lc-reader > *, .login-wrap .lc-reader { animation: none !important; }
/* Settings preview: a simple stack — tab bar, the open book, promo and map (no news list in the small preview) */
.login-wrap.preview .lc-news { display: none; }
.login-wrap.preview .lc-topbar { margin: 0 0 8px; }
.login-wrap.preview .lc-stage { position: static; margin: 0; flex: none; container-type: normal; }
.login-wrap.preview .lc-stage > .login-card.bk.bk { position: relative; inset: auto; left: auto; top: auto; bottom: auto; width: 100%; }
.login-wrap.preview .lc-bottom { margin-left: 0 !important; margin-right: 0 !important; }
/* promo (ads) and map boxes: thin pink border; promo has a light, see-through pink background */
.login-wrap .lc-bottom .lc-promo .lh-block { border: 1px solid rgba(214,63,140,.28) !important;
  background: rgba(255,214,234,.38) !important; backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
.login-wrap .lc-bottom .lc-map { border: 1px solid rgba(214,63,140,.28) !important; }
:root[data-theme="dark"] .login-wrap .lc-bottom .lc-promo .lh-block { background: rgba(255,102,204,.12) !important; border-color: rgba(255,102,204,.3) !important; }
:root[data-theme="dark"] .login-wrap .lc-bottom .lc-map { border-color: rgba(255,102,204,.3) !important; }
/* world-news source chip on cards; "Read as a book" button */
.lc-news-card .nc-world { display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 600; color: #2f5d82; background: #e6f0f9; padding: 1px 7px; border-radius: 99px; max-width: 170px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lc-news-card .nc-world svg { width: 11px; height: 11px; flex: none; }
.lc-news-head .grow { flex: 1; min-width: 0; }
.lc-news-head .ln-book { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 99px; cursor: pointer; font: inherit; font-size: 13px; font-weight: 700;
  color: #c0267a; background: rgba(255,228,241,.8); border: 1px solid #ffb3d9; box-shadow: 0 2px 8px rgba(214,63,140,.12); transition: transform .15s, box-shadow .15s; }
.lc-news-head .ln-book:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(214,63,140,.22); }
/* reader: source line, AI note, contents page */
.lc-reader .rd-src { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.lc-reader .rd-src svg { width: 14px; height: 14px; }
.lc-reader .rd-src a { color: #c0267a; font-weight: 600; }
.lc-reader .rd-ai { font-size: 12.5px; color: #8a5a12; background: #fdf3df; border: 1px solid #f3dfb2; border-radius: 10px; padding: 7px 10px; }
.lc-reader .rd-cover { display: flex; gap: 14px; align-items: center; flex: none; }
.lc-reader .rd-cover-ico { width: 60px; height: 60px; border-radius: 16px; display: grid; place-items: center; font-size: 32px; background: linear-gradient(160deg, #fff4fa, #ffe4f1); border: 1px solid #ffc6e2; flex: none; }
.lc-reader .rd-cover h1 { margin: 2px 0; font-size: 20px; }
.lc-reader .rd-toc { list-style: none; margin: 0; padding: 0 4px 0 0; flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; scrollbar-width: thin; }
.lc-reader .rd-toc button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px 8px; border: 0; border-bottom: 1px dashed rgba(120,120,130,.3); background: transparent;
  text-align: left; font: inherit; color: var(--text); cursor: pointer; border-radius: 8px 8px 0 0; }
.lc-reader .rd-toc button:hover { background: rgba(255,228,241,.7); }
.lc-reader .rd-toc .toc-ico { font-size: 20px; width: 28px; text-align: center; flex: none; }
.lc-reader .rd-toc .toc-t { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; line-height: 1.35; display: flex; flex-direction: column; }
.lc-reader .rd-toc .toc-t small { font-size: 11.5px; font-weight: 500; color: var(--muted); }
.lc-reader .rd-toc .toc-n { flex: none; font-weight: 700; color: #c0267a; font-size: 13px; }
.lc-news-card .nc-cat { white-space: nowrap; } .lc-news-card .nc-meta { flex-wrap: wrap; row-gap: 2px; }
/* video stories: thumbnail on the card, player in the book page */
.lc-news-card .nc-thumb { position: relative; overflow: hidden; padding: 0; background: #111 !important; border-color: rgba(0,0,0,.1) !important; width: 76px !important; }
.lc-news-card .nc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lc-news-card .nc-thumb i { position: absolute; inset: 0; margin: auto; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 11px;
  color: #fff; background: rgba(230,0,30,.88); box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.lc-news-card .nc-world.yt { color: #b4141e; background: #fde8ea; }
.lc-reader .rd-video { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; margin: 0 0 12px; box-shadow: 0 6px 16px rgba(0,0,0,.18); }
.lc-reader .rd-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.rd-video-still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Health-news reader: two facing pages, with story navigation on the right page. */
.login-wrap .lc-stage > .login-card.lc-reader {
  left: 16px;
  width: min(900px, calc(100% - 32px));
  max-width: none;
  padding: 20px 24px 16px !important;
  overflow: hidden;
  box-sizing: border-box;
}
.lc-reader .rd-spread {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  flex: 1 1 auto;
  min-height: 0;
  border: 1px solid rgba(214,63,140,.18);
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(255,255,255,.72) 0%, rgba(255,255,255,.72) 49.8%, rgba(255,246,251,.9) 50%, rgba(255,246,251,.9) 100%);
  box-shadow: inset 0 0 22px rgba(140,40,90,.06);
}
.lc-reader .rd-page { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.lc-reader .rd-page-main { padding: 14px 28px 12px 10px; }
.lc-reader .rd-more {
  padding: 15px 10px 10px 28px;
}
.lc-reader .rd-binding { position: absolute; z-index: 3; top: 10px; bottom: 10px; left: 50%; width: 24px; transform: translateX(-50%); display: flex; flex-direction: column; justify-content: space-around; pointer-events: none; }
.lc-reader .rd-binding i { display: block; width: 24px; height: 7px; flex: none; border: 2px solid #d5b3c3; border-radius: 6px; background: linear-gradient(180deg, #fff, #e8d5df); box-shadow: 0 1px 2px rgba(70,30,50,.25); }
.lc-reader .rd-more h2 { margin: 0; font-size: 17px; color: #c0267a; }
.lc-reader .rd-more-intro { margin: 3px 0 8px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.lc-reader .rd-more .rd-toc { padding-right: 2px; }
.lc-reader .rd-more .rd-toc button { padding: 8px 6px; }
.lc-reader .rd-more .rd-toc button.current { background: rgba(255,228,241,.78); }
.lc-reader .rd-more-empty { padding: 12px 8px; color: var(--muted); font-size: 13px; }
.lc-reader .rd-welcome { margin: auto; max-width: 34em; color: var(--muted); font-size: 15px; line-height: 1.7; }
.lc-reader .rd-page-main .rd-body { padding-right: 8px; }

@media (min-width: 861px) {
  .login-wrap.layout-split:has(.lc-reader:not(.is-closed)),
  .login-wrap.layout-split:has(.lc-reader:not(.is-closed)) .login-form { overflow: visible; }
  .login-wrap.layout-split .lc-stage > .login-card.lc-reader:not(.is-closed) {
    position: fixed;
    inset: 50% auto auto 50%;
    translate: -50% -50%;
    width: min(940px, calc(100vw - 48px));
    height: min(760px, calc(100vh - 48px));
    max-width: none;
    margin: 0 !important;
    z-index: 120;
  }
}

@media (max-width: 860px) {
  .login-wrap .lc-stage > .login-card.lc-reader {
    position: relative;
    inset: auto;
    left: auto;
    width: calc(100% - 10px);
    margin: 0 0 0 10px !important;
    padding: 16px !important;
  }
  .lc-reader .rd-spread { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lc-reader .rd-page-main { padding: 10px 22px 10px 4px; }
  .lc-reader .rd-more { padding: 12px 4px 8px 22px; }
}
@media (max-width: 560px) {
  .lc-reader .rd-spread { grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden; }
  .lc-reader .rd-page-main { min-height: 0; padding: 8px 18px 10px 4px; }
  .lc-reader .rd-more { min-height: 0; padding: 14px 4px 4px 18px; }
  .lc-reader .rd-more .rd-toc { max-height: none; }
  .lc-reader .rd-binding { width: 18px; }
  .lc-reader .rd-binding i { width: 18px; height: 6px; }
}

/* =====================================================================================================
   News book: an open, bound book — contents on the left page, the story on the right page
   ===================================================================================================== */
.nb-overlay { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: 18px;
  background: radial-gradient(ellipse at center, rgba(90,20,60,.35), rgba(40,8,28,.62)); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.nb-book { position: relative; width: min(1180px, 96vw); height: min(760px, 90vh); perspective: 2600px; }
/* hard cover behind the pages (rose-pink leather) */
.nb-cover-back { position: absolute; inset: 0; border-radius: 14px;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.12), transparent 40%), linear-gradient(135deg, #c43a7e, #9c2462 55%, #7e1a4f);
  box-shadow: 0 30px 70px rgba(30,0,20,.5), inset 0 0 0 2px rgba(255,255,255,.12), inset 0 0 22px rgba(0,0,0,.25); }
/* the two pages */
.nb-page { position: absolute; top: 14px; bottom: 14px; width: calc(50% - 14px); overflow-y: auto; scrollbar-width: thin;
  display: flex; flex-direction: column; gap: 12px; padding: 30px 34px 18px; color: #2b2026;
  background: linear-gradient(180deg, rgba(255,255,255,.6), rgba(255,255,255,0) 30%), #fffaf5; }
.nb-left { left: 14px; border-radius: 8px 2px 2px 8px;
  background: linear-gradient(270deg, rgba(90,40,60,.20), rgba(90,40,60,.05) 7%, transparent 16%), linear-gradient(90deg, rgba(0,0,0,.04), transparent 6%), #fffaf5;
  box-shadow: -1px 1px 0 #efe3e6, -3px 2px 0 #fff, -4px 3px 0 #ecdfe3, -6px 4px 0 #fff, -7px 5px 0 #e8d9de; }
.nb-right { left: 50%; border-radius: 2px 8px 8px 2px; padding-top: 70px;
  background: linear-gradient(90deg, rgba(90,40,60,.20), rgba(90,40,60,.05) 7%, transparent 16%), linear-gradient(270deg, rgba(0,0,0,.04), transparent 6%), #fffaf5;
  box-shadow: 1px 1px 0 #efe3e6, 3px 2px 0 #fff, 4px 3px 0 #ecdfe3, 6px 4px 0 #fff, 7px 5px 0 #e8d9de; }
/* the binding in the middle: deep gutter shadow + stitching */
.nb-spine { position: absolute; top: 10px; bottom: 10px; left: 50%; width: 34px; transform: translateX(-50%); z-index: 3; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(70,20,45,.18) 38%, rgba(70,20,45,.42) 50%, rgba(70,20,45,.18) 62%, transparent); }
.nb-spine::after { content: ''; position: absolute; top: 22px; bottom: 22px; left: 50%; border-left: 1.5px dashed rgba(160,60,110,.45); }
/* language switch and ✕ on the right page */
.nb-lang { position: absolute; top: 30px; right: 74px; z-index: 5; display: inline-flex; padding: 3px; gap: 2px; border-radius: 99px; background: #fff; border: 1px solid #f3c6dc; }
.nb-lang button { border: 0; background: transparent; padding: 5px 13px; border-radius: 99px; font: inherit; font-size: 13px; font-weight: 600; color: #8a7480; cursor: pointer; }
.nb-lang button.on { background: #ffe4f1; color: #c0267a; box-shadow: 0 0 0 1px #ffb3d9 inset; }
.nb-close { position: absolute; top: 26px; right: 28px; z-index: 5; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: #fff;
  border: 1px solid rgba(255,255,255,.75); background: radial-gradient(circle at 34% 26%, #ffd6ef 0%, #ff8fd6 30%, #ff66cc 58%, #e0409f 100%);
  box-shadow: 0 5px 12px rgba(224,64,159,.42), inset 0 -4px 7px rgba(170,25,110,.35), inset 0 2px 3px rgba(255,255,255,.9); transition: transform .2s; }
.nb-close svg { width: 16px; height: 16px; stroke-width: 2.6; }
.nb-close:hover { transform: scale(1.08) rotate(90deg); }
/* the front cover: hinged on the binding, swings open to the left */
.nb-cover { position: absolute; top: 0; bottom: 0; left: 50%; width: 50%; z-index: 8; transform-origin: 0 50%; transform-style: preserve-3d; pointer-events: none; }
.nb-cover.open { visibility: hidden; }
.nb-cover-face, .nb-cover-inside { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 3px 14px 14px 3px; }
.nb-cover-face { display: grid; place-items: center; text-align: center; color: #ffe9f4;
  background: radial-gradient(circle at 60% 25%, rgba(255,255,255,.16), transparent 45%), linear-gradient(135deg, #cc4385, #a12868 55%, #82194f);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.14), inset 14px 0 18px rgba(0,0,0,.25), 0 20px 50px rgba(30,0,20,.4); }
.nb-cover-inner { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 28px; border: 2px solid rgba(255,220,240,.55); border-radius: 12px; width: 70%; }
.nb-cover-inner img { width: 96px; height: 96px; border-radius: 50%; box-shadow: 0 6px 16px rgba(0,0,0,.3); background: #fff; }
.nb-cover-inner b { font-size: 24px; line-height: 1.3; letter-spacing: .01em; text-shadow: 0 2px 6px rgba(0,0,0,.25); }
.nb-cover-inner small { font-size: 13px; opacity: .85; }
.nb-cover-emoji { font-size: 60px; }
.nb-cover-inside { transform: rotateY(180deg); border-radius: 14px 3px 3px 14px; background: linear-gradient(90deg, #f7d3e3, #fbe3ee); box-shadow: inset -14px 0 18px rgba(0,0,0,.15); }
/* a page turning over the binding */
.nb-sheet { position: absolute; top: 14px; bottom: 14px; left: 50%; width: calc(50% - 14px); z-index: 6; transform-origin: 0 50%; transform-style: preserve-3d; pointer-events: none; }
.nb-sheet .nb-sheet-face { position: absolute; inset: 0; left: 0; width: 100%; top: 0; bottom: 0; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 0 18px rgba(60,10,40,.18); }
.nb-sheet-back { position: absolute; inset: 0; transform: rotateY(180deg); backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 8px 2px 2px 8px;
  background: linear-gradient(270deg, rgba(90,40,60,.18), transparent 18%), #fbf4ee; box-shadow: 0 0 18px rgba(60,10,40,.18); }
.nb-still { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; display: block; }
/* contents (left page) */
.nb-head, .nb-story-head { display: flex; gap: 14px; align-items: center; flex: none; }
.nb-badge, .nb-ico { width: 56px; height: 56px; border-radius: 16px; flex: none; display: grid; place-items: center; font-size: 30px; line-height: 1;
  background: linear-gradient(160deg, #fff4fa, #ffe4f1); border: 1px solid #ffc6e2; }
.nb-kicker { font-size: 11.5px; font-weight: 700; color: #c0267a; text-transform: uppercase; letter-spacing: .05em; }
.nb-head h2, .nb-story-head h1 { margin: 2px 0; font-size: 21px; line-height: 1.3; color: #2b2026; }
.nb-sub { font-size: 12.5px; color: #8a7480; }
.nb-toc { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; }
.nb-toc button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 8px; border: 0; border-bottom: 1px dashed rgba(140,110,125,.35); background: transparent;
  text-align: left; font: inherit; color: #2b2026; cursor: pointer; border-radius: 8px 8px 0 0; transition: background .15s; }
.nb-toc button:hover { background: rgba(255,228,241,.6); }
.nb-toc button.on { background: #ffe4f1; box-shadow: inset 3px 0 0 #ff66cc; }
.nb-toc .toc-ico { font-size: 19px; width: 28px; text-align: center; flex: none; color: #d0103a; }
.nb-toc .toc-t { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; line-height: 1.4; display: flex; flex-direction: column; }
.nb-toc .toc-t small { font-size: 11.5px; font-weight: 500; color: #8a7480; }
.nb-toc .toc-n { flex: none; font-weight: 700; color: #c0267a; font-size: 13px; }
/* story (right page) */
.nb-text { flex: 1 1 auto; font-size: 15.5px; line-height: 1.75; }
.nb-text[lang=km] { line-height: 2; }
.nb-text p { margin: 0 0 12px; }
.nb-video { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; margin: 0 0 14px; box-shadow: 0 6px 16px rgba(0,0,0,.2); }
.nb-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.nb-src { font-size: 13px; color: #8a7480; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.nb-src svg { width: 14px; height: 14px; } .nb-src a { color: #c0267a; font-weight: 600; }
.nb-note { font-size: 12.5px; color: #8a5a12; background: #fdf3df; border: 1px solid #f3dfb2; border-radius: 10px; padding: 7px 10px; }
.nb-disclaimer { font-size: 12.5px; color: #8a7480; font-style: italic; border-top: 1px dashed rgba(140,110,125,.35); padding-top: 9px; }
.nb-foot { display: flex; align-items: center; justify-content: space-between; flex: none; padding-top: 6px; }
.nb-folio { font-size: 13px; font-weight: 600; color: #8a7480; }
.nb-nav { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: #fff; border: 1px solid rgba(255,255,255,.75);
  background: radial-gradient(circle at 34% 26%, #ffd6ef, #ff7fd2 45%, #e04aa8); box-shadow: 0 4px 10px rgba(224,64,159,.35); transition: transform .15s, opacity .2s; }
.nb-nav svg { width: 18px; height: 18px; stroke-width: 2.6; }
.nb-nav:hover:not(:disabled) { transform: scale(1.08); }
.nb-nav:disabled { opacity: .3; cursor: default; }
.nb-back { display: none; }
/* phones: one page at a time */
@media (max-width: 860px) {
  .nb-overlay { padding: 8px; }
  .nb-book { width: 100%; height: 94vh; perspective: none; }
  .nb-page { top: 10px; bottom: 10px; left: 10px !important; width: calc(100% - 20px); padding: 22px 18px 14px; border-radius: 8px; }
  .nb-right { display: none; padding-top: 64px; }
  .nb-book.show-story .nb-left { display: none; } .nb-book.show-story .nb-right { display: flex; }
  .nb-spine, .nb-cover { display: none; }
  .nb-lang { top: 22px; right: 62px; } .nb-close { top: 18px; right: 18px; }
  .nb-left { padding-top: 64px; }
  .nb-back { display: inline-flex; align-self: flex-start; align-items: center; gap: 4px; border: 0; background: #ffe4f1; color: #c0267a; font: inherit; font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 99px; cursor: pointer; margin-top: -40px; }
}
@media (prefers-reduced-motion: reduce) { .nb-close:hover { transform: none; } }
:root[data-theme="dark"] .nb-page { background: #2a2026; color: #f3e6ec; } :root[data-theme="dark"] .nb-head h2, :root[data-theme="dark"] .nb-story-head h1, :root[data-theme="dark"] .nb-toc button { color: #f3e6ec; }
/* news book: the left page's heading stays put, only the contents list scrolls */
.nb-left { overflow: hidden !important; }
.nb-left .nb-toc { flex: 1 1 auto; min-height: 0; overflow-y: auto; scrollbar-width: thin; margin-right: -10px; padding-right: 10px;
  border-top: 1px solid rgba(140,110,125,.25); mask-image: linear-gradient(180deg, transparent 0, #000 10px, #000 calc(100% - 16px), transparent); -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 10px, #000 calc(100% - 16px), transparent); }
/* language drop-down button on the right page */
.nb-lang-btn { position: absolute; top: 28px; right: 74px; z-index: 5; display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 99px; cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 700; color: #6b5560; background: #fff; border: 1px solid #f3c6dc; box-shadow: 0 2px 6px rgba(214,63,140,.1); }
.nb-lang-btn:hover { border-color: #ff9fd0; }
.lang-pop { z-index: 1400 !important; }
.nb-wait { animation: nbPulse 1.2s ease-in-out infinite; }
@keyframes nbPulse { 50% { opacity: .55; } }
@media (max-width: 860px) { .nb-lang-btn { top: 20px; right: 62px; } .nb-left { overflow: hidden !important; } }
/* ===== news book: closed → open → closed ===== */
/* closed: only the cover shows, centred over where the open book will be */
.nb-book.closed { translate: -25% 0; }
.nb-book.closed .nb-left, .nb-book.closed .nb-spine, .nb-book.closing-book .nb-left, .nb-book.closing-book .nb-spine { visibility: hidden; }
.nb-book.closed .nb-cover-back { clip-path: inset(0 0 0 50%); }
/* the leather around the left page appears as the cover passes upright (opening) and goes with it (closing) */
.nb-book.closed.opening .nb-cover-back { animation: nbBackOpen 1150ms linear both; }
.nb-book.closing-book .nb-cover-back { animation: nbBackClose 950ms linear both; }
@keyframes nbBackOpen { 0%, 46% { clip-path: inset(0 0 0 50%); } 54%, 100% { clip-path: inset(0); } }
@keyframes nbBackClose { 0%, 46% { clip-path: inset(0); } 54%, 100% { clip-path: inset(0 0 0 50%); } }
/* the cover: the pharmacy photo with logo and names */
.nb-cover-face { overflow: hidden; background: linear-gradient(135deg, #cc4385, #a12868 55%, #82194f); }
.nb-cover-photo { position: absolute; inset: 0; background-size: cover; background-position: center 30%; }
.nb-cover-shade { position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(120,20,70,.15) 0%, rgba(110,15,65,.35) 40%, rgba(90,10,55,.82) 100%), linear-gradient(90deg, rgba(0,0,0,.28), transparent 9%); }
.nb-cover-face .nb-cover-inner { position: relative; z-index: 1; width: 78%; gap: 10px; padding: 30px 24px; border: 2px solid rgba(255,225,240,.7); border-radius: 16px;
  background: rgba(120,20,70,.28); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); box-shadow: 0 10px 30px rgba(40,0,25,.35); }
.nb-cover-logo { width: 104px; height: 104px; border-radius: 50%; background: #fff; border: 3px solid #fff; box-shadow: 0 6px 18px rgba(0,0,0,.35); object-fit: contain; }
.nb-cover-km { font-size: 30px; line-height: 1.5; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.45); }
.nb-cover-en { font-size: 20px; letter-spacing: .12em; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.45); margin-top: -6px; }
.nb-cover-rule { width: 60%; height: 2px; background: linear-gradient(90deg, transparent, rgba(255,220,240,.9), transparent); margin: 4px 0; }
.nb-cover-title { font-size: 18px; font-weight: 700; color: #ffe6f2; text-shadow: 0 1px 6px rgba(0,0,0,.4); }
.nb-cover-face small { color: #ffd6ea; }
/* the inside of the cover carries the contents page while it swings */
.nb-cover-inside { overflow: hidden; }
.nb-cover-inside .nb-inside-page { position: absolute; top: 14px; bottom: 14px; left: 14px; right: 0; width: auto; overflow: hidden; border-radius: 8px 2px 2px 8px;
  background: linear-gradient(270deg, rgba(90,40,60,.20), rgba(90,40,60,.05) 7%, transparent 16%), #fffaf5; }
.nb-cover-inside .nb-inside-page .nb-toc { flex: 1 1 auto; min-height: 0; overflow: hidden; border-top: 1px solid rgba(140,110,125,.25); }
/* phones: the cover covers the whole single page and swings away to the left */
@media (max-width: 860px) {
  .nb-cover { display: block !important; left: 0; width: 100%; }
  .nb-book.closed { translate: 0 0; }
  .nb-book.closed .nb-cover-back { clip-path: none; }
  .nb-cover-inside { display: none; }
  .nb-cover-km { font-size: 26px; } .nb-cover-en { font-size: 17px; }
}
/* news book, right page: the title stays at the top and the page number with ‹ › stays at the bottom; only the text scrolls */
.nb-book > .nb-right { overflow: hidden !important; }
.nb-right .nb-text { flex: 1 1 auto; min-height: 0; overflow-y: auto; scrollbar-width: thin; margin-right: -12px; padding-right: 12px;
  mask-image: linear-gradient(180deg, transparent 0, #000 10px, #000 calc(100% - 14px), transparent); -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 10px, #000 calc(100% - 14px), transparent); }
.nb-right .nb-foot { border-top: 1px solid rgba(140,110,125,.22); padding-top: 10px; }
/* the leather around the left page belongs to the front cover: it travels with the cover (no pink left behind) */
.nb-cover-inside { background: radial-gradient(circle at 70% 20%, rgba(255,255,255,.10), transparent 40%), linear-gradient(225deg, #c43a7e, #9c2462 55%, #7e1a4f) !important;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.12), inset -12px 0 16px rgba(0,0,0,.22) !important; border-radius: 14px 3px 3px 14px; }
.nb-book.closed.opening .nb-cover-back, .nb-book.closing-book .nb-cover-back { animation: none !important; clip-path: inset(0 0 0 50%); }
/* topic tabs: Health news | Medicines (news box and book) */
.lc-news .ln-tabs, .nb-tabs { display: flex; gap: 6px; flex: none; }
.lc-news .ln-tabs button, .nb-tabs button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 99px; cursor: pointer; font: inherit; font-size: 13.5px; font-weight: 700;
  color: #7a6570; background: rgba(255,255,255,.65); border: 1px solid rgba(214,63,140,.18); transition: background .15s, color .15s; }
.lc-news .ln-tabs button i, .nb-tabs button i { font-style: normal; font-size: 11.5px; min-width: 20px; padding: 1px 6px; border-radius: 99px; background: rgba(214,63,140,.12); color: #c0267a; text-align: center; }
.lc-news .ln-tabs button.on, .nb-tabs button.on { background: #ffe4f1; color: #c0267a; border-color: #ffb3d9; box-shadow: 0 2px 8px rgba(214,63,140,.15); }
.lc-news .lc-news-list[hidden] { display: none !important; }
.nb-tabs { margin: 2px 0 0; }
/* medicine pages: section headings and bullet lists */
.nb-text h3 { margin: 16px 0 6px; font-size: 16px; color: #c0267a; display: flex; align-items: center; gap: 8px; }
.nb-text h3::before { content: ''; width: 6px; height: 18px; border-radius: 3px; background: linear-gradient(#ff8fd6, #e04aa8); }
.nb-text h3:first-child { margin-top: 2px; }
.nb-text ul { margin: 0 0 12px; padding-left: 22px; }
.nb-text li { margin: 3px 0; }
.lc-news-card.is-med .nc-ico { background: linear-gradient(160deg, #eef6ee, #dcebdc); }
/* Settings → Online access */
.tunnel-qr { background: #fff; padding: 8px; border-radius: 12px; border: 1px solid var(--border); line-height: 0; }
.tunnel-qr svg { width: 150px; height: 150px; }
.tunnel-url { font-size: 17px; font-weight: 700; word-break: break-all; color: var(--primary); }
/* the health book fills the screen (small margin so the cover edge shows) */
.nb-overlay { padding: 10px; }
.nb-book { width: calc(100vw - 20px) !important; height: calc(100vh - 20px) !important; height: calc(100dvh - 20px) !important; }
@media (min-width: 1500px) { .nb-text { font-size: 17px; } .nb-head h2, .nb-story-head h1 { font-size: 24px; } .nb-toc .toc-t { font-size: 15px; } .nb-page { padding: 36px 44px 20px; } .nb-right { padding-top: 76px; } }
@media (max-width: 860px) { .nb-overlay { padding: 6px; } .nb-book { width: calc(100vw - 12px) !important; height: calc(100dvh - 12px) !important; } }
/* ===== news book: real pages (no scrolling), running headers, article name in the footer ===== */
.nb-book { touch-action: pan-y; } /* sideways swipes turn pages */
.nb-run { display: flex; align-items: center; gap: 8px; flex: none; font-size: 12.5px; color: #8a7480; padding-bottom: 8px; border-bottom: 1px solid rgba(140,110,125,.22); }
.nb-run img { width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.15); object-fit: contain; }
.nb-run b { color: #c0267a; font-size: 13.5px; }
.nb-run-left span { color: #8a7480; letter-spacing: .06em; font-weight: 600; font-size: 11.5px; text-transform: uppercase; }
.nb-run-right { min-height: 36px; padding-right: 170px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.nb-run-right b { font-size: 12.5px; }
.nb-book > .nb-right { padding-top: 30px !important; }
.nb-right .nb-viewport { flex: 1 1 auto; min-height: 0; overflow: hidden; position: relative; }
.nb-right .nb-flow { height: 100%; column-fill: auto; will-change: transform; }
.nb-right .nb-flow .nb-story-head { break-inside: avoid; margin-bottom: 14px; }
.nb-right .nb-flow .nb-video { break-inside: avoid; }
.nb-right .nb-flow p, .nb-right .nb-flow li { orphans: 2; widows: 2; }
.nb-right .nb-flow h3 { break-after: avoid; }
.nb-right .nb-text { overflow: visible !important; mask-image: none !important; -webkit-mask-image: none !important; margin: 0 !important; padding: 0 !important; flex: none !important; }
.nb-sheet-face .nb-viewport { flex: 1 1 auto; min-height: 0; overflow: hidden; }
.nb-sheet-face .nb-flow { height: 100%; column-fill: auto; }
/* footer: the article's name and dots for its pages */
.nb-folio { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 0 12px; }
.nb-folio b { max-width: 100%; font-size: 13.5px; font-weight: 600; color: #6b5560; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nb-dots { display: flex; gap: 5px; }
.nb-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(214,63,140,.25); }
.nb-dots i.on { width: 18px; border-radius: 3px; background: #e04aa8; }
@media (max-width: 860px) {
  .nb-book > .nb-right { padding-top: 64px !important; }
  .nb-run-right { padding-right: 0; }
  .nb-left .nb-run-left { margin-top: -40px; padding-right: 150px; }
}

/* slogan under the pharmacy name on the photo */
.lh-slogan { margin-top: 8px; }
.lh-slogan span { display: inline-block; padding: 5px 14px; border-radius: 99px; font-size: 15px; font-weight: 650; letter-spacing: .2px; color: #fff;
  background: linear-gradient(90deg, rgba(236,72,153,.55), rgba(16,185,129,.45)); border: 1px solid rgba(255,255,255,.35);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); text-shadow: 0 1px 6px rgba(0,0,0,.3); box-shadow: 0 4px 16px rgba(0,0,0,.15);
  background-size: 200% 100%; animation: lhSlogan 8s ease-in-out infinite alternate; }
@keyframes lhSlogan { from { background-position: 0 0; } to { background-position: 100% 0; } }
@media (max-width: 860px) { .lh-slogan span { font-size: 13px; padding: 4px 11px; } }

/* page number of the article, bottom right of the right page */
.nb-pageno { flex: none; min-width: 74px; text-align: right; font-size: 13px; color: #8a7480; font-variant-numeric: tabular-nums; white-space: nowrap; padding-right: 8px; }
.nb-pageno small { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; opacity: .8; }
.nb-pageno b { font-size: 15px; color: #d63f8c; }
@media (max-width: 860px) { .nb-pageno { min-width: 56px; padding-right: 4px; } .nb-pageno small { display: none; } }

/* spotlight v7: half-size card — search row, group list and ‹ › on one line, level with the top of the product photo (photo on the right) */
.lh-spot { --pic: 124px; --tools: 30px; position: relative; margin: 0 0 10px; width: min(100%, 470px); padding: 12px 14px; border-radius: 16px; }
.lh-spot .sp-tools { position: absolute; top: 12px; left: 14px; right: calc(14px + var(--pic) + 12px); margin: 0; gap: 6px; z-index: 2; }
.lh-spot .sp-search, .lh-spot .sp-tools select { height: var(--tools); font-size: 12.5px; }
.lh-spot .sp-search input { font-size: 12.5px; }
.lh-spot .sp-tools select { max-width: 38%; }
.lh-spot .sp-nav { gap: 4px; }
.lh-spot .sp-nav button { width: 28px; height: 28px; } .lh-spot .sp-nav button svg { width: 14px; height: 14px; }
.lh-spot .sp-face { gap: 12px; align-items: stretch; }
.lh-spot .sp-txt { justify-content: flex-start; padding-top: calc(var(--tools) + 16px); gap: 3px; }
.lh-spot .sp-pic { width: var(--pic); min-width: var(--pic); max-width: none; min-height: var(--pic); align-self: stretch; aspect-ratio: auto; }
.lh-spot .sp-chips span { font-size: 11px; padding: 2px 8px; }
.lh-spot .sp-name { font-size: 16.5px; }
.lh-spot .sp-fn { font-size: 13px; }
.lh-spot .sp-gen { font-size: 12px; }
.lh-spot .sp-treat { margin-top: 4px; padding: 5px 9px; }
.lh-spot .sp-treat b { font-size: 13px; }
@media (max-width: 860px) { .lh-spot { --pic: 96px; width: 100%; } }
.lh-spot .sp-pic { place-items: start center; }
.lh-spot .sp-pic .p-art, .lh-spot .sp-pic img { width: var(--pic); height: var(--pic); object-position: top; }
.lh-spot .sp-tools select { max-width: 30%; padding-right: 22px; }

/* reader: medicine picture on the right of the first page */
.nb-text .nb-medpic { float: right; width: clamp(120px, 34%, 230px); aspect-ratio: 1; margin: 2px 0 12px 18px; padding: 10px; border-radius: 18px;
  background: linear-gradient(160deg, #fff, #fdf0f7); border: 1px solid #f6d3e6; box-shadow: 0 8px 22px rgba(214,63,140,.14); display: grid; place-items: center; overflow: hidden; }
.nb-text .nb-medpic img, .nb-text .nb-medpic .p-art { width: 100%; height: 100%; object-fit: contain; display: block; }
@media (max-width: 860px) { .nb-text .nb-medpic { width: 38%; margin-left: 12px; } }
/* contents: Health news | Medicine knowledge as tabs on the right of the heading */
.nb-head { flex-wrap: wrap; }
.nb-head > div:not(.nb-tabs) { flex: 1 1 auto; min-width: 0; }
.nb-head .nb-tabs { margin: 0 0 0 auto; align-self: flex-end; gap: 2px; border-bottom: 1px solid #f1d6e4; }
.nb-head .nb-tabs button { border: 0 !important; border-radius: 0 !important; background: none !important; box-shadow: none !important; padding: 8px 10px 9px; font-size: 13px;
  color: #8a7480; position: relative; }
.nb-head .nb-tabs button::after { content: ''; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: #e04aa8; transform: scaleX(0); transition: transform .25s; }
.nb-head .nb-tabs button.on { color: #c0267a; }
.nb-head .nb-tabs button.on::after { transform: scaleX(1); }
.nb-head .nb-tabs button:hover { color: #c0267a; }
:root[data-theme="dark"] .nb-head .nb-tabs { border-color: #4a3540; }
.nb-head > div:not(.nb-tabs) { flex: 1 1 180px; }
.nb-head .nb-tabs { flex: none; }
.nb-head h2 { white-space: nowrap; } .nb-head .nb-tabs button { padding: 8px 8px 9px; }
/* product box spans the photo from the left frame line to the right frame line (frame line is ~5px) */
.lh-spot { width: auto; margin-left: -42px; margin-right: -42px; }
@media (max-width: 860px) { .lh-spot { width: auto; margin-left: -16px; margin-right: -16px; } }

/* ===== news book on phones (portrait): one page, bound on the left like a real book; cover and pages turn on the binding ===== */
@media (max-width: 860px) {
  .nb-book { perspective: 1800px !important; }
  .nb-book .nb-page { left: 26px !important; width: calc(100% - 36px) !important; border-radius: 2px 8px 8px 2px;
    background: linear-gradient(90deg, rgba(90,40,60,.22), rgba(90,40,60,.06) 4%, transparent 10%), #fffaf5 !important;
    box-shadow: 2px 0 0 #f1e6dd, 3px 0 0 #dccbc0, 5px 0 0 #f1e6dd, 6px 0 0 #d6c4b8, 8px 0 0 #efe3da, 9px 0 0 #cdb9ad; } /* page edges on the right */
  /* the binding: a stitched leather spine down the left side */
  .nb-book .nb-spine { display: block !important; left: 0; top: 0; bottom: 0; width: 26px; transform: none; z-index: 4; border-radius: 14px 0 0 14px;
    background: linear-gradient(90deg, #6e1442, #a8296c 38%, #c43a7e 55%, #8e1f59 80%, #6e1442); box-shadow: inset -3px 0 6px rgba(0,0,0,.35), 2px 0 6px rgba(60,0,30,.35); }
  .nb-book .nb-spine::before { content: ''; position: absolute; top: 18px; bottom: 18px; left: 50%; width: 2px; transform: translateX(-50%);
    background: repeating-linear-gradient(180deg, rgba(255,220,240,.85) 0 7px, transparent 7px 13px); }
  .nb-book .nb-spine::after { display: none; }
  .nb-book.closed .nb-spine { visibility: visible !important; }
  /* the cover is hinged on the spine */
  .nb-cover { left: 26px !important; width: calc(100% - 26px) !important; }
  .nb-cover-face { border-radius: 2px 14px 14px 2px; }
  .nb-cover-inside { display: block !important; }
  .nb-cover-inside .nb-inside-page { display: none; }
  /* pages turning over the binding */
  .nb-sheet { left: 26px; width: calc(100% - 36px); top: 10px; bottom: 10px; }
  .nb-sheet .nb-sheet-face { display: flex !important; left: 0 !important; top: 0 !important; bottom: 0 !important; width: 100% !important; box-shadow: 0 0 14px rgba(60,10,40,.2); }
  .nb-sheet-back { border-radius: 8px 2px 2px 8px; }
  .nb-run-right { padding-right: 0; }
}

/* ===== phones in landscape (short screens): the open two-page book, compact ===== */
@media (min-width: 861px) and (max-height: 540px) {
  .nb-overlay { padding: 4px; }
  .nb-book { width: calc(100vw - 8px) !important; height: calc(100dvh - 8px) !important; }
  .nb-page { top: 8px; bottom: 8px; padding: 12px 18px 8px !important; gap: 6px; }
  .nb-left { left: 8px; width: calc(50% - 8px); } .nb-book > .nb-right { width: calc(50% - 8px); padding-top: 12px !important; }
  .nb-run { font-size: 11px; padding-bottom: 5px; } .nb-run img { width: 20px; height: 20px; } .nb-run b { font-size: 12px; }
  .nb-run-right { min-height: 28px; padding-right: 130px; }
  .nb-head { gap: 8px; } .nb-head .nb-badge, .nb-head .nb-kicker, .nb-head .nb-sub { display: none; }
  .nb-head h2 { font-size: 15px; margin: 0; }
  .nb-head .nb-tabs button { font-size: 12px; padding: 5px 6px 6px; } .nb-head .nb-tabs button i { font-size: 10.5px; min-width: 16px; padding: 0 4px; }
  .nb-toc button { padding: 5px 6px; gap: 8px; } .nb-toc .toc-t { font-size: 12.5px; line-height: 1.3; } .nb-toc .toc-t small { font-size: 10.5px; } .nb-toc .toc-ico { font-size: 15px; width: 22px; }
  .nb-story-head { gap: 8px; } .nb-story-head .nb-ico { width: 34px; height: 34px; font-size: 18px; border-radius: 10px; }
  .nb-story-head h1 { font-size: 15.5px; line-height: 1.25; margin: 0; } .nb-story-head .nb-kicker { font-size: 10px; } .nb-story-head .nb-sub { font-size: 11px; }
  .nb-right .nb-flow .nb-story-head { margin-bottom: 6px; }
  .nb-text { font-size: 13.5px !important; line-height: 1.55 !important; } .nb-text[lang=km] { line-height: 1.75 !important; } .nb-text p { margin-bottom: 7px; }
  .nb-text .nb-medpic { width: 92px; margin: 0 0 6px 10px; padding: 5px; border-radius: 12px; }
  .nb-right .nb-foot { padding-top: 5px; } .nb-nav { width: 32px; height: 32px; } .nb-nav svg { width: 14px; height: 14px; }
  .nb-folio b { font-size: 12px; } .nb-folio { gap: 3px; } .nb-pageno { font-size: 12px; min-width: 60px; } .nb-pageno b { font-size: 13px; }
  .nb-lang-btn { top: 12px; right: 52px; padding: 3px 9px; font-size: 12px; } .nb-close { top: 10px; right: 12px; width: 30px; height: 30px; }
  .nb-spine { top: 4px; bottom: 4px; }
  .nb-cover-face .nb-cover-inner { padding: 12px 14px; gap: 5px; width: 80%; } .nb-cover-logo { width: 54px; height: 54px; }
  .nb-cover-km { font-size: 20px; } .nb-cover-en { font-size: 13px; margin-top: -2px; } .nb-cover-title { font-size: 13px; } .nb-cover-face small { font-size: 11px; }
  .nb-cover-inside .nb-inside-page { top: 8px; bottom: 8px; left: 8px; padding: 12px 18px 8px; }
  .nb-sheet { top: 8px; bottom: 8px; width: calc(50% - 8px); }
}
@media (max-width: 860px) { .nb-run-left span { display: none; } .nb-run-left b { white-space: nowrap; } }

/* ===== login panel: the login book is the main view (taller); promo and map stacked on its right; news only in "Read book" ===== */
.login-wrap .lc-news { display: none !important; }
.lc-readbook { flex: none; display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px; padding: 6px 12px; border-radius: 99px; cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 700; color: #c0267a; background: linear-gradient(160deg, #fff4fa, #ffe4f1); border: 1px solid #ffc6e2;
  box-shadow: 0 2px 8px rgba(214,63,140,.15); transition: transform .15s, box-shadow .15s; white-space: nowrap; }
.lc-readbook:hover { transform: translateY(-1px); box-shadow: 0 5px 14px rgba(214,63,140,.25); }
:root[data-theme="dark"] .lc-readbook { background: rgba(255,102,204,.12); border-color: rgba(255,102,204,.35); color: #ff9fd8; }
@media (min-width: 861px) {
  .login-wrap:not(.preview) .lc-stage > .lc-side { position: absolute; top: 0; bottom: 0; left: calc(16px + min(430px, calc(100% - 32px)) + 16px); right: 16px;
    width: auto !important; max-width: none !important; margin: 0 !important; padding: 0 !important; display: flex; flex-direction: column; gap: 14px; }
  .login-wrap:not(.preview) .lc-stage > .lc-side .lc-promo { flex: 1 1 0; min-height: 0; }
  .login-wrap:not(.preview) .lc-stage > .lc-side .lc-promo .lh-block { padding: 14px 26px 14px 14px !important; }
  .login-wrap:not(.preview) .lc-stage > .lc-side .lc-promo .lh-msgs.promo { height: 100% !important; }
  .login-wrap:not(.preview) .lc-stage > .lc-side .lc-promo .lh-promo { flex-direction: column !important; align-items: stretch !important; justify-content: center; gap: 12px !important; text-align: center; }
  .login-wrap:not(.preview) .lc-stage > .lc-side .lc-promo .lh-promo > .lh-tag { align-self: center; width: min(100%, 150px) !important; height: auto !important; aspect-ratio: 1; font-size: 26px !important; }
  .login-wrap:not(.preview) .lc-stage > .lc-side .lc-promo .lh-pimg { width: min(100%, 150px); height: auto; aspect-ratio: 1; align-self: center; }
  .login-wrap:not(.preview) .lc-stage > .lc-side .lc-map, .login-wrap:not(.preview) .lc-stage > .lc-side .lc-map { width: 100% !important; aspect-ratio: auto; flex: 1 1 0; min-height: 160px; }
  /* the panel is now only the top bar, the book and the footer: give the book the height */
  .login-wrap.layout-split:not(.preview) .lc-stage { flex: 1 1 auto; min-height: 560px; }
}
/* narrow desktop panel: not enough room beside the book → promo and map go below it */
@media (min-width: 861px) and (max-width: 1180px) {
  .login-wrap:not(.preview) .lc-stage > .login-card.bk.bk:not(.lc-reader) { width: calc(62% - 24px); }
  .login-wrap:not(.preview) .lc-stage > .lc-side { left: calc(62% + 4px); }
  .login-wrap:not(.preview) .lc-stage > .lc-side .lc-promo .lh-promo > .lh-tag { font-size: 20px !important; }
}
/* ✕ on the login book is only for leaving the sign-up page */
.login-wrap .login-card:not(.signing-up) > .bk-close { display: none !important; }
@media (max-width: 860px) {
  .login-wrap .lc-stage > .lc-side { flex-direction: column; gap: 12px; margin-top: 16px !important; padding: 0 !important; }
  .login-wrap .lc-stage > .lc-side .lc-map, .login-wrap .lc-stage > .lc-side .lc-map { width: 100% !important; aspect-ratio: 16 / 9; }
  .lc-topbar .lc-readbook { margin-bottom: 8px; padding: 5px 9px; font-size: 12px; }
}
@media (max-width: 860px) { .lc-topbar .lc-readbook span { display: none; } .lc-topbar .lc-readbook { padding: 6px 9px; font-size: 16px; } }

/* ===== health / medicine watermark on the book pages (login book and the health reading book) ===== */
:root { --wm-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180' fill='none' stroke='%23c0267a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E %3Cpath d='M24 14v20M14 24h20'/%3E %3Cg transform='rotate(-35 120 30)'%3E%3Crect x='104' y='22' width='34' height='15' rx='7.5'/%3E%3Cpath d='M121 22v15'/%3E%3C/g%3E %3Ccircle cx='42' cy='92' r='11'/%3E%3Cpath d='M34 100l16-16'/%3E %3Cpath d='M96 96h14l6-14 8 26 7-18 5 6h14'/%3E %3Cpath d='M150 130c-7-8-20-3-20 7 0 9 20 21 20 21s20-12 20-21c0-10-13-15-20-7z' transform='translate(-6 -2) scale(.8) translate(30 30)'/%3E %3Cg transform='translate(18 130)'%3E%3Crect x='0' y='8' width='22' height='30' rx='4'/%3E%3Cpath d='M4 0h14v8H4zM6 23h10M11 18v10'/%3E%3C/g%3E %3Cpath d='M84 160c10-14 26-18 36-16-2 12-14 26-34 22M86 164c8-6 16-10 26-14'/%3E %3C/svg%3E"); --wm-emblem: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200' fill='none' stroke='%23c0267a' stroke-linecap='round' stroke-linejoin='round'%3E %3Ccircle cx='100' cy='100' r='92' stroke-width='3'/%3E%3Ccircle cx='100' cy='100' r='84' stroke-width='1.5' stroke-dasharray='3 7'/%3E %3Cpath d='M100 28v150' stroke-width='7'/%3E %3Cpath d='M100 160c-30-6-30-28 0-34s30-28 0-34-28-26 0-32c12-3 16-10 10-16' stroke-width='6'/%3E %3Ccircle cx='111' cy='42' r='5' fill='%23c0267a' stroke='none'/%3E %3Cpath d='M22 150h34l8-14 10 26 8-18h96' stroke-width='3' opacity='.8'/%3E %3C/svg%3E"); }
.login-wrap .login-card.bk, .nb-page { isolation: isolate; }
.login-wrap .login-card.bk::after, .nb-page::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit;
  background-image: var(--wm-emblem), var(--wm-pattern); background-repeat: no-repeat, repeat; background-position: center 62%, 0 0;
  background-size: min(78%, 320px) auto, 180px 180px; opacity: .07; }
.nb-page::after { background-size: min(70%, 360px) auto, 200px 200px; background-position: center 60%, 0 0; opacity: .06; }
.nb-sheet-face::after, .nb-inside-page::after { opacity: .06; }
:root[data-theme="dark"] .login-wrap .login-card.bk::after, :root[data-theme="dark"] .nb-page::after { opacity: .1; filter: invert(1) hue-rotate(180deg); }

/* hero: shop name sits right next to the logo (slogan / subtitle on their own full row below) */
.login-wrap .lh-top { grid-template-columns: auto 1fr !important; justify-items: start; }
.login-wrap .lh-top .lh-title, .login-wrap .lh-top .lh-local { grid-column: 2; text-align: left; justify-self: start; }
.login-wrap .lh-top .lh-slogan, .login-wrap .lh-top .lh-sub { grid-column: 1 / -1; }

/* product box: photo fills the box height (square), bigger text */
.lh-spot { --pic: 186px; }
.lh-spot .sp-pic { width: var(--pic) !important; min-width: var(--pic) !important; height: auto; min-height: var(--pic); place-items: center !important; }
.lh-spot .sp-pic .p-art, .lh-spot .sp-pic img { width: 100% !important; height: 100% !important; object-position: center !important; }
.lh-spot .sp-txt { padding-top: calc(var(--tools) + 18px); gap: 5px; }
.lh-spot .sp-chips span { font-size: 12.5px; padding: 3px 10px; }
.lh-spot .sp-name { font-size: 22px; }
.lh-spot .sp-fn { font-size: 15.5px; }
.lh-spot .sp-gen { font-size: 14px; }
.lh-spot .sp-treat { padding: 7px 12px; }
.lh-spot .sp-treat b { font-size: 15.5px; }
@media (max-width: 860px) { .lh-spot { --pic: 140px; } .lh-spot .sp-name { font-size: 19px; } .lh-spot .sp-fn, .lh-spot .sp-treat b { font-size: 14px; } }
/* book watermark: fainter */
.login-wrap .login-card.bk::after { opacity: .035; }
.nb-page::after, .nb-sheet-face::after, .nb-inside-page::after { opacity: .03; }
:root[data-theme="dark"] .login-wrap .login-card.bk::after, :root[data-theme="dark"] .nb-page::after { opacity: .05; }

/* ===== Telegram chat window (POS → Chat): people on the left, the conversation on the right ===== */
.chat-ov { position: fixed; inset: 0; z-index: 1100; background: rgba(20,10,16,.35); display: flex; justify-content: flex-end; animation: chatFade .2s ease-out; }
.chat-ov.closing { animation: chatFade .2s ease-in reverse forwards; }
.chat { width: min(980px, 100vw); height: 100%; display: grid; grid-template-columns: 320px 1fr; background: var(--surface); box-shadow: -18px 0 40px rgba(0,0,0,.18); animation: chatIn .28s cubic-bezier(.2,.8,.25,1); }
.chat-ov.closing .chat { animation: chatIn .2s ease-in reverse forwards; }
@keyframes chatFade { from { opacity: 0; } } @keyframes chatIn { from { transform: translateX(40px); opacity: .4; } }
.chat-side { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--border); background: color-mix(in srgb, var(--primary) 3%, var(--surface)); }
.chat-side-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 10px; }
.chat-side-head b { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; } .chat-side-head b svg { width: 20px; height: 20px; color: #229ed9; }
.chat-search { margin: 0 12px 8px; }
.chat-filter { display: flex; gap: 4px; padding: 0 12px 8px; border-bottom: 1px solid var(--border); }
.chat-filter button { flex: 1; border: 0; background: none; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 6px 4px; border-radius: 8px; cursor: pointer; }
.chat-filter button.on { background: color-mix(in srgb, var(--primary) 14%, transparent); color: var(--primary); }
.chat-people { flex: 1; min-height: 0; overflow-y: auto; padding: 6px; }
.chat-person { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 8px; border: 0; background: none; border-radius: 12px; cursor: pointer; text-align: left; font: inherit; color: inherit; }
.chat-person:hover { background: color-mix(in srgb, var(--primary) 7%, transparent); }
.chat-person.on { background: color-mix(in srgb, var(--primary) 15%, transparent); }
.chat-av { position: relative; flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 700; color: #fff;
  background: linear-gradient(140deg, #ff8fd0, #e0409f); }
.chat-av.supplier { background: linear-gradient(140deg, #5fd3c4, #1f9e8f); }
.chat-dot { position: absolute; right: -1px; bottom: -1px; width: 13px; height: 13px; border-radius: 50%; background: #229ed9; border: 2px solid var(--surface); }
.chat-pt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chat-pt b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-pt small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-when { flex: none; font-size: 11px; color: var(--muted); align-self: flex-start; margin-top: 3px; }
.chat-main { display: flex; flex-direction: column; min-height: 0; min-width: 0;
  background: radial-gradient(circle at 20% 10%, color-mix(in srgb, var(--primary) 6%, transparent), transparent 40%), color-mix(in srgb, var(--primary) 2%, var(--bg, #f6f4f1)); }
.chat-empty { flex: 1; display: grid; place-items: center; align-content: center; gap: 8px; text-align: center; color: var(--muted); }
.chat-empty svg { width: 54px; height: 54px; color: #229ed9; opacity: .6; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--border); }
.chat-head .grow { min-width: 0; display: flex; flex-direction: column; } .chat-head small { color: var(--muted); font-size: 12px; }
.chat-back { display: none; }
.chat-msgs { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.chat-day { text-align: center; margin: 8px 0; } .chat-day span { font-size: 11.5px; font-weight: 600; color: var(--muted); background: var(--surface); padding: 3px 10px; border-radius: 99px; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.chat-msg { max-width: min(74%, 560px); padding: 8px 12px 6px; border-radius: 16px; font-size: 14px; line-height: 1.45; box-shadow: 0 1px 2px rgba(0,0,0,.08); word-wrap: break-word; }
.chat-msg.in { align-self: flex-start; background: var(--surface); border-bottom-left-radius: 4px; }
.chat-msg.out { align-self: flex-end; background: linear-gradient(160deg, #ffe4f2, #ffd3ea); border-bottom-right-radius: 4px; color: #3a1a2b; }
.chat-msg.failed { background: #fdecec; color: #7a1f1f; outline: 1px dashed #e8a3a3; }
.chat-tag { display: inline-block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #c0267a; margin-bottom: 2px; }
.chat-meta { font-size: 11px; color: var(--muted); text-align: right; margin-top: 2px; } .chat-msg.out .chat-meta { color: #9a5a7c; }
.chat-none { margin: auto; color: var(--muted); }
.chat-warn { margin: 0; padding: 8px 16px; font-size: 12.5px; color: #8a5a12; background: #fdf3df; border-top: 1px solid #f3dfb2; }
.chat-send { display: flex; gap: 8px; align-items: flex-end; padding: 10px 14px; background: var(--surface); border-top: 1px solid var(--border); }
.chat-send textarea { flex: 1; resize: none; min-height: 42px; max-height: 140px; line-height: 1.4; padding-top: 10px; }
.chat-send .btn { height: 42px; width: 46px; padding: 0; justify-content: center; }
:root[data-theme="dark"] .chat-msg.out { background: linear-gradient(160deg, #5a2443, #4a1d38); color: #fbe3ef; } :root[data-theme="dark"] .chat-msg.out .chat-meta { color: #d59bbb; }
:root[data-theme="dark"] .chat-warn { background: #3a2f17; color: #f3d9a4; border-color: #5a4720; }
@media (max-width: 760px) {
  .chat { grid-template-columns: 1fr; }
  .chat.show-thread .chat-side { display: none; } .chat:not(.show-thread) .chat-main { display: none; }
  .chat-back { display: inline-grid; } .chat-msg { max-width: 86%; }
}

/* Settings → Users & roles: permission checkboxes and chips */
.role-perms { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 6px; }
.role-perm { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; font-size: 13.5px; background: var(--surface); }
.role-perm:has(input:checked) { border-color: color-mix(in srgb, var(--primary) 55%, var(--border)); background: color-mix(in srgb, var(--primary) 8%, var(--surface)); }
.role-perm input { width: 17px; height: 17px; accent-color: var(--primary); flex: none; }
.role-chips { display: flex; flex-wrap: wrap; gap: 4px; max-width: 560px; } .role-chips .badge { font-weight: 600; }

/* reading book: the product / medicine picture at the top of the page, under the running header — no background, no shadow */
.nb-toppic { margin: 0 0 12px; height: clamp(130px, 24vh, 230px); display: flex; justify-content: center; align-items: center; break-inside: avoid; background: none; border: 0; box-shadow: none; padding: 0; }
.nb-toppic img, .nb-toppic .p-art { height: 100%; width: auto; max-width: 100%; object-fit: contain; display: block; background: none !important; box-shadow: none !important; filter: none !important; }
.nb-instock { display: inline-block; padding: 1px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; color: #0f7b4f; background: #e3f6ec; }
@media (min-width: 861px) and (max-height: 540px) { .nb-toppic { height: 96px; margin-bottom: 6px; } }

/* top bar: Telegram chat button (left of the language button) */
.chat-top { display: inline-flex; align-items: center; gap: 6px; } .chat-top svg { color: #229ed9; }

/* reading book: search box on the right of the left page's running header */
.nb-run-left .nb-search { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 99px;
  background: #fff; border: 1px solid #f3c6dc; box-shadow: 0 1px 4px rgba(214,63,140,.08); width: min(240px, 42%); transition: border-color .15s, width .2s; }
.nb-run-left .nb-search:focus-within { border-color: #e04aa8; width: min(300px, 55%); }
.nb-run-left .nb-search svg { width: 15px; height: 15px; color: #c0267a; flex: none; }
.nb-run-left .nb-search input { border: 0; outline: 0; background: none; font: inherit; font-size: 13px; color: #2b2026; min-width: 0; width: 100%; text-transform: none; letter-spacing: 0; }
.nb-noresult { padding: 14px 6px; color: #8a7480; font-size: 13.5px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.nb-noresult p { margin: 0; width: 100%; }
.nb-noresult button { border: 1px solid #f3c6dc; background: #fff4fa; color: #c0267a; border-radius: 99px; padding: 5px 12px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.nb-noresult button i { font-style: normal; margin-left: 4px; }
:root[data-theme="dark"] .nb-run-left .nb-search { background: #3a2a32; border-color: #5a3a4a; } :root[data-theme="dark"] .nb-run-left .nb-search input { color: #f3e6ec; }
@media (max-width: 860px) {
  .nb-left .nb-run-left { flex-wrap: wrap; row-gap: 8px; }
  .nb-run-left .nb-search, .nb-run-left .nb-search:focus-within { order: 9; flex: 1 1 100%; width: auto; margin: 0; }
  .nb-head .nb-tabs { flex: 1 1 100% !important; min-width: 0; overflow-x: auto; scrollbar-width: none; margin: 0 !important; }
  .nb-head .nb-tabs::-webkit-scrollbar { display: none; }
  .nb-head .nb-tabs button { white-space: nowrap; flex: none; }
  .nb-head > div:not(.nb-tabs) { min-width: 0; }
}

/* ===== Telegram Chat: Chats / Auto chat, select several people, image + link ===== */
.chat-mode { display: flex; gap: 4px; margin: 0 12px 10px; padding: 3px; border-radius: 12px; background: color-mix(in srgb, var(--primary) 8%, transparent); }
.chat-mode button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 700; color: var(--muted); padding: 7px 6px; border-radius: 9px; cursor: pointer; }
.chat-mode button svg { width: 15px; height: 15px; }
.chat-mode button.on { background: var(--surface); color: var(--primary); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.chat-chats { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.chat-filter .chat-selbtn { flex: none; margin-left: auto; border: 1px dashed color-mix(in srgb, var(--primary) 45%, var(--border)); color: var(--primary); }
.chat-filter .chat-selbtn.on { background: var(--primary); color: #fff; border-style: solid; }
.chat-selbar { display: flex; align-items: center; gap: 6px; padding: 6px 12px; font-size: 12.5px; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--primary) 6%, var(--surface)); }
.chat-selbar span { font-weight: 700; margin-right: auto; color: var(--primary); }
.chat-selbar button { border: 1px solid var(--border); background: var(--surface); border-radius: 99px; padding: 3px 9px; font: inherit; font-size: 12px; cursor: pointer; }
.chat-check { flex: none; width: 20px; height: 20px; border-radius: 6px; border: 2px solid color-mix(in srgb, var(--primary) 50%, var(--border)); display: grid; place-items: center; font-size: 13px; font-weight: 800; color: #fff; }
.chat-person.picked { background: color-mix(in srgb, var(--primary) 12%, transparent); } .chat-person.picked .chat-check { background: var(--primary); border-color: var(--primary); }
.chat-av.group { background: linear-gradient(140deg, #8fb8ff, #3d6fd8); } .chat-av.group svg { width: 20px; height: 20px; }
.chat-group { display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; padding: 14px 16px; overflow-y: auto; flex: 1; min-height: 0; }
.chat-pick { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px 4px 11px; border-radius: 99px; background: var(--surface); border: 1px solid color-mix(in srgb, var(--primary) 35%, var(--border)); font-size: 13px; font-weight: 600; }
.chat-pick.off { opacity: .55; text-decoration: line-through; }
.chat-pick button { border: 0; background: none; font-size: 16px; line-height: 1; cursor: pointer; color: var(--muted); padding: 0 4px; }
.chat-compose { background: var(--surface); border-top: 1px solid var(--border); }
.chat-compose .chat-send { border-top: 0; }
.chat-compose .chat-send .btn.icon.ghost { width: 38px; height: 42px; font-size: 18px; flex: none; }
.chat-att { position: relative; padding: 10px 14px 0; } .chat-att img { max-height: 120px; max-width: 220px; border-radius: 10px; display: block; }
.chat-att button { position: absolute; top: 4px; left: 216px; background: var(--surface); border-radius: 50%; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.chat-linkrow { display: flex; gap: 6px; padding: 10px 14px 0; } .chat-linkrow input:first-child { flex: 2; } .chat-linkrow input:nth-child(2) { flex: 1.2; }
.chat-photo { display: block; max-width: 100%; max-height: 260px; border-radius: 12px; margin: 2px 0 4px; }
.chat-text a { color: #1f7fc4; word-break: break-all; }
.chat-plans { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.chat-plan { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 14px; background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.chat-plan.off { opacity: .65; }
.chat-plan img, .chat-plan-ico { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; flex: none; display: grid; place-items: center; background: #e7f4fb; }
.chat-plan-ico svg { width: 26px; height: 26px; color: #229ed9; }
.chat-plan-msg { margin: 6px 0 0; font-size: 13px; color: var(--text); background: color-mix(in srgb, var(--primary) 5%, transparent); padding: 6px 9px; border-radius: 8px; }
/* Auto chat plan editor (Settings → Auto chat) */
.ac-form { display: flex; flex-direction: column; gap: 12px; }
.ac-form h4 { margin: 6px 0 0; display: flex; align-items: center; gap: 6px; font-size: 14.5px; } .ac-form h4 svg { width: 16px; height: 16px; color: var(--primary); }
.ac-media { display: flex; gap: 14px; align-items: stretch; }
.ac-img { width: 150px; min-height: 130px; flex: none; border: 2px dashed var(--border); border-radius: 14px; display: grid; place-items: center; cursor: pointer; overflow: hidden; color: var(--muted); font-size: 13px; text-align: center; }
.ac-img:hover { border-color: var(--primary); color: var(--primary); } .ac-img img { width: 100%; height: 100%; object-fit: cover; } .ac-img span { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; } .ac-img svg { width: 22px; height: 22px; }
.ac-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ac-chips button { border: 1px solid var(--border); background: var(--surface); border-radius: 99px; padding: 6px 13px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--text); }
.ac-chips button.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.ac-people { border: 1px solid var(--border); border-radius: 12px; padding: 8px; } .ac-people > input { margin-bottom: 6px; }
.ac-plist { max-height: 220px; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px 10px; }
.ac-plist label { display: flex; gap: 8px; align-items: center; padding: 5px 6px; border-radius: 8px; cursor: pointer; font-size: 13.5px; } .ac-plist label:hover { background: color-mix(in srgb, var(--primary) 6%, transparent); }
.ac-plist label[hidden] { display: none; } .ac-plist input { accent-color: var(--primary); width: 16px; height: 16px; }
.ac-plist small { display: block; color: var(--muted); font-size: 11.5px; }
.ac-year { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 12px; margin-top: 8px; }
.ac-month { border: 1px solid var(--border); border-radius: 12px; padding: 8px; background: var(--surface); }
.ac-month > b { display: block; font-size: 13px; margin: 0 0 4px 2px; color: var(--primary); }
.ac-dow, .ac-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.ac-dow i { font-style: normal; font-size: 10.5px; text-align: center; color: var(--muted); font-weight: 700; }
.ac-days button { border: 0; background: none; font: inherit; font-size: 12px; aspect-ratio: 1; border-radius: 7px; cursor: pointer; color: var(--text); padding: 0; }
.ac-days button:hover { background: color-mix(in srgb, var(--primary) 12%, transparent); }
.ac-days button.on { background: var(--primary); color: #fff; font-weight: 800; }
@media (max-width: 600px) { .ac-media { flex-direction: column; } .ac-img { width: 100%; } }

/* ---- Telegram Chat v3: clear "choose receivers", start cards, quick picks ---- */
.chat-chats > .chat-selbtn { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0 12px 8px; padding: 9px 10px; border-radius: 10px; border: 1.5px dashed color-mix(in srgb, var(--primary) 55%, var(--border)); background: color-mix(in srgb, var(--primary) 7%, var(--surface)); color: var(--primary); font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.chat-chats > .chat-selbtn:hover { background: color-mix(in srgb, var(--primary) 13%, var(--surface)); }
.chat-chats > .chat-selbtn.on { background: var(--primary); color: #fff; border-style: solid; }
.chat-start { padding: 24px; }
.chat-start h3 { margin: 4px 0 0; color: var(--text); }
.chat-start p { margin: 0 0 6px; }
.chat-starts { display: grid; grid-template-columns: repeat(3, minmax(0, 190px)); gap: 12px; justify-content: center; }
.chat-startcard { display: grid; gap: 6px; justify-items: center; text-align: center; padding: 16px 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); font: inherit; color: var(--text); cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s; }
.chat-startcard:hover { transform: translateY(-2px); border-color: var(--primary); box-shadow: 0 8px 22px -12px color-mix(in srgb, var(--primary) 60%, transparent); }
.chat-startcard span { font-size: 28px; line-height: 1; }
.chat-startcard small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.chat-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0 16px 10px; }
.chat-quick button { border: 1px solid var(--border); background: var(--surface); border-radius: 99px; padding: 4px 11px; font: inherit; font-size: 12.5px; cursor: pointer; color: var(--text); }
.chat-quick button:hover { border-color: var(--primary); color: var(--primary); }
.chat-plan-btns { display: grid; gap: 6px; align-content: start; }
.chat-people.chat-flash { animation: chatFlash .9s ease; }
@keyframes chatFlash { 0%, 100% { background: transparent; } 35% { background: color-mix(in srgb, var(--primary) 10%, transparent); } }
@media (max-width: 760px) { .chat-starts { grid-template-columns: 1fr; width: 100%; max-width: 320px; } .chat-start { overflow: auto; } }
.chat-selbar .chat-selgo { display: none; }
@media (max-width: 760px) {
  .chat-selbar { flex-wrap: wrap; }
  .chat-selbar .chat-selgo { display: block; width: 100%; margin-top: 4px; background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 700; padding: 7px; }
}

/* Table titles stay in view with no shaking: the browser itself keeps the title row (and the totals row) fixed —
   nothing is moved by code while scrolling. A table wider than the screen scrolls inside its own box (one screen tall). */
.table-wrap { overflow: auto; max-height: calc(100vh - 72px); max-height: calc(100svh - 72px); overscroll-behavior-x: contain; }
.t thead th { position: sticky; top: 0; z-index: 3; box-shadow: inset 0 -1px 0 var(--border); }
/* a table that fits its width (marked .fits by ui.js when drawn or resized — never while scrolling) needs no box:
   its title row sticks under the top bar as the page scrolls */
.table-wrap.fits { overflow: visible; max-height: none; }
.content .table-wrap.fits .t thead th { top: 60px; }
.t tfoot td { position: sticky; bottom: 0; z-index: 2; background: var(--surface-2); box-shadow: inset 0 1px 0 var(--border); }
.modal .table-wrap, .drawer .table-wrap { max-height: 60vh; max-height: 60svh; }
/* no page jumps: keep room for the scroll bar, and size the POS by the real visible phone height */
html { scrollbar-gutter: stable; }
/* no rubber-band bounce at the top/bottom edge (Mac trackpad, iPhone): the page stops dead instead of stretching,
   so the top bar, tabs and table titles never jiggle. Heights use svh (the steady screen height), not dvh, so nothing
   resizes while the phone's address bar slides in or out. */
html, body { overscroll-behavior-y: none; }
.chat-people, .chat-msgs, .chat-plans, .modal-body, .drawer-body, .nav, .dropdown { overscroll-behavior-y: contain; }

/* ---- Sign-in log ---- */
.si-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; padding-top: 4px; }
.si-filters .f { display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); font-weight: 600; min-width: 150px; flex: 0 1 180px; }
.si-now { display: grid; gap: 8px; }
.si-person { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.si-person small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.si-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--muted); }
.si-dot.online { background: var(--success); box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 20%, transparent); }
.si-dot.idle { background: var(--warning); }
.kpi.si-warn .value { color: var(--danger); }
@media (max-width: 760px) { .si-filters .f { flex: 1 1 140px; } .si-person { flex-wrap: wrap; } }
.t td.nowrap { white-space: nowrap; }
.t td.au-details { overflow-wrap: anywhere; min-width: 200px; max-width: 520px; }
.t td.si-out { min-width: 170px; }
@media (max-width: 760px) {
  #si-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  #si-kpi .kpi { padding: 12px; } #si-kpi .kpi .ico { display: none; } #si-kpi .kpi .value { font-size: 22px; }
  .si-filters .f { min-width: 0; flex: 1 1 calc(50% - 10px); }
  .si-filters .f input, .si-filters .f select { min-width: 0; width: 100%; }
}

/* "Deploy online" button next to the page title (Mac copy only) */
.deploy-slot { display: inline-flex; margin-left: 10px; }
.deploy-btn { border: 1px dashed color-mix(in srgb, var(--primary) 55%, var(--border)); color: var(--primary); background: color-mix(in srgb, var(--primary) 7%, var(--surface)); font-weight: 650; }
.deploy-btn:hover { background: color-mix(in srgb, var(--primary) 14%, var(--surface)); }
.dp-files { margin: 0; padding: 8px 10px 8px 26px; max-height: 240px; overflow: auto; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; }
.dp-steps { margin: 0; padding-left: 4px; list-style: none; display: grid; gap: 6px; }
.dp-err { margin: 8px 0 0; color: var(--danger); background: var(--danger-bg); border-radius: 10px; padding: 10px 12px; }

/* sign-in form: bigger user icon, a little further left */
.input-icon.i3:has(> [name=username]) > .ic3d { width: 30px; height: 30px; border-radius: 9px; left: 5px; }
.input-icon.i3:has(> [name=username]) > .ic3d svg { width: 18px; height: 18px; stroke-width: 2.2; }
.input-icon.i3:has(> [name=username]) .input { padding-left: 44px !important; }
.chat-side-head .chat-sender { display: block; font-size: 11.5px; color: var(--muted); font-weight: 500; margin-top: 2px; }
.chat-side-head .chat-sender b { color: #229ed9; }
.chat-sender-off a { color: var(--primary); }
.chat-side-title { display: grid; min-width: 0; }
.tg-sender { margin-top: 12px; display: grid; gap: 4px; }
/* reply attachments in Telegram Chat */
.chat-msg .chat-sticker { max-width: 150px; max-height: 150px; background: none; border: 0; box-shadow: none; object-fit: contain; }
.chat-msg video.chat-photo { display: block; max-width: 260px; border-radius: 12px; background: #000; }
.chat-msg video.chat-sticker { background: none; }
.chat-audio { display: block; width: 240px; max-width: 100%; height: 40px; }
.chat-file { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; max-width: 260px; }
.chat-file svg { width: 22px; height: 22px; color: var(--primary); flex: none; }
.chat-file span { display: grid; min-width: 0; } .chat-file b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.chat-file small { color: var(--muted); font-size: 11.5px; }

/* Telegram Chat message box: 🙂 🖼️ 📎 📍 🔗 tools, sticker / emoji / location panels */
.chat-compose { position: relative; }
.chat-send .chat-tools { display: flex; align-items: center; gap: 0; flex: none; }
.chat-send .chat-tools .btn.icon { width: 34px; padding: 0; font-size: 17px; }
.chat-pop { position: absolute; left: 10px; right: 10px; bottom: calc(100% - 4px); z-index: 5; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 8px; max-height: 320px; display: flex; flex-direction: column; }
.chat-pop-tabs { display: flex; align-items: center; gap: 4px; padding: 0 2px 6px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.chat-pop-tabs button { border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); padding: 5px 10px; border-radius: 8px; cursor: pointer; }
.chat-pop-tabs button.on { background: color-mix(in srgb, var(--primary) 14%, transparent); color: var(--primary); }
.chat-pop-tabs b { padding: 4px 6px; font-size: 13.5px; }
.chat-pop-tabs .chat-pop-x { margin-left: auto; padding: 4px; display: grid; place-items: center; } .chat-pop-tabs .chat-pop-x svg { width: 16px; height: 16px; }
.chat-stickers { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 6px; overflow-y: auto; }
.chat-stickers button { border: 0; background: none; padding: 4px; border-radius: 10px; cursor: pointer; transition: background .15s, transform .15s; }
.chat-stickers button:hover { background: var(--surface-2); transform: scale(1.05); }
.chat-stickers img { width: 100%; aspect-ratio: 1; object-fit: contain; display: block; }
.chat-emoji { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 2px; overflow-y: auto; }
.chat-emoji button { border: 0; background: none; font-size: 24px; padding: 4px; border-radius: 8px; cursor: pointer; }
.chat-emoji button:hover { background: var(--surface-2); }
.chat-locs { display: grid; gap: 6px; }
.chat-locs button { display: flex; align-items: center; gap: 10px; text-align: left; border: 1px solid var(--border); background: var(--surface); border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 20px; cursor: pointer; color: var(--text); }
.chat-locs button:hover { border-color: var(--primary); }
.chat-locs span { display: grid; } .chat-locs b { font-size: 14px; } .chat-locs small { font-size: 12px; color: var(--muted); }
.chat-attfile { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); font-size: 13px; max-width: 100%; }
.chat-attfile b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; } .chat-attfile small { color: var(--muted); }
@media (max-width: 760px) { .chat-send .chat-tools .btn.icon { width: 30px; font-size: 16px; } .chat-pop { max-height: 260px; } .chat-stickers { grid-template-columns: repeat(4, 1fr); } }
.chat-msg.sticker-only { background: none !important; box-shadow: none !important; border: 0 !important; padding: 0 !important; }
.chat-msg.sticker-only .chat-meta { background: color-mix(in srgb, var(--surface) 80%, transparent); border-radius: 8px; padding: 1px 6px; width: max-content; margin-left: auto; }
.chat-av.user { background: linear-gradient(140deg, #8fa8ff, #4c5fd6); }

/* sign-in form: the user icon in 3D (raised rose tile, glossy top, depth edge, soft shadow) */
.input-icon.i3:has(> [name=username]) > .ic3d {
  width: 32px; height: 32px; border-radius: 10px; left: 5px; overflow: hidden;
  background:
    radial-gradient(120% 90% at 30% 15%, rgba(255,255,255,.55), rgba(255,255,255,0) 45%),
    linear-gradient(160deg, #fbcfe8 0%, #f472b6 38%, #db2777 72%, #9d174d 100%);
  box-shadow:
    inset 0 1.5px 0 rgba(255,255,255,.75),
    inset 0 -3px 0 rgba(112,13,58,.45),
    inset 0 0 0 1px rgba(157,23,77,.25),
    0 3px 0 -1px #9d174d,
    0 6px 12px rgba(190,24,93,.35);
}
.input-icon.i3:has(> [name=username]) > .ic3d::after { /* glossy shine across the top half */
  content: ''; position: absolute; left: 3px; right: 3px; top: 2px; height: 45%; border-radius: 8px 8px 12px 12px;
  background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0)); pointer-events: none;
}
.input-icon.i3:has(> [name=username]) > .ic3d svg {
  width: 19px; height: 19px; color: #fff !important; stroke-width: 2.4; position: relative; z-index: 1;
  filter: drop-shadow(0 1.5px 0 rgba(112,13,58,.55)) drop-shadow(0 2px 3px rgba(0,0,0,.25));
}
.input-icon.i3:has(> [name=username]) .input { padding-left: 46px !important; }
:root[data-theme="dark"] .input-icon.i3:has(> [name=username]) > .ic3d { box-shadow: inset 0 1.5px 0 rgba(255,255,255,.6), inset 0 -3px 0 rgba(112,13,58,.5), 0 3px 0 -1px #831843, 0 6px 14px rgba(0,0,0,.45); }

/* sign-in book: swipe between User / Customer / Supplier on touch screens */
.login-wrap form.login-card { touch-action: pan-y; }
.login-wrap form.login-card.lc-swipe-edge { animation: lcSwipeEdge .35s ease; }
@keyframes lcSwipeEdge { 0%, 100% { translate: 0 0; } 30% { translate: -8px 0; } 60% { translate: 6px 0; } }
/* full screen button in the top bar: ✕ (exit) while in full screen */
.topbar .fs-btn.fs-on { color: var(--danger); background: var(--danger-bg); }
.topbar .fs-btn.fs-on:hover { background: color-mix(in srgb, var(--danger) 18%, var(--surface)); }

/* hero brand: logo, then a compact block right beside it — Khmer name, English name and slogan centred on each other */
.login-wrap .lh-top { display: grid !important; grid-template-columns: auto max-content !important; justify-content: start; column-gap: 14px; align-items: center; justify-items: center; }
.login-wrap .lh-top .brand-logo { grid-column: 1; grid-row: 1 / span 3; align-self: center; justify-self: start; }
.login-wrap .lh-top .lh-title { grid-column: 2; grid-row: 1; text-align: center !important; justify-self: center !important; margin: 0; }
.login-wrap .lh-top .lh-local { grid-column: 2; grid-row: 2; text-align: center !important; justify-self: center !important; margin-top: 1px; }
.login-wrap .lh-top .lh-slogan { grid-column: 2 !important; grid-row: 3; justify-self: center; margin-top: 6px; }
.login-wrap .lh-top .lh-sub { grid-column: 1 / -1; grid-row: 4; justify-self: start; text-align: left; }
/* slogan: no button — soft italic text between two fine lines (pink and green) */
.lh-slogan { display: flex; align-items: center; gap: 10px; }
.lh-slogan span { display: inline; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; animation: none;
  backdrop-filter: none; -webkit-backdrop-filter: none; font-style: italic; font-weight: 600; font-size: 16px; letter-spacing: .4px; color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.45), 0 0 14px rgba(255,255,255,.35); white-space: nowrap; }
.lh-slogan::before, .lh-slogan::after { content: ''; width: 26px; height: 2px; border-radius: 2px; flex: none; }
.lh-slogan::before { background: linear-gradient(90deg, transparent, #ff6fb5); }
.lh-slogan::after { background: linear-gradient(90deg, #34d399, transparent); }
@media (max-width: 860px) { .lh-slogan span { font-size: 13.5px; padding: 0; } .lh-slogan::before, .lh-slogan::after { width: 18px; } .login-wrap .lh-top { column-gap: 10px; } }
/* slogan as wide as the name, so the centred block stays close to the logo: one short pink→green line above the slogan */
.lh-slogan { flex-direction: column; gap: 5px; margin-top: 5px !important; }
.lh-slogan::after { display: none; }
.lh-slogan::before { width: 54px; height: 2px; background: linear-gradient(90deg, #ff6fb5, #34d399); box-shadow: 0 0 8px rgba(255,255,255,.35); }
.lh-slogan span { font-size: 15px; letter-spacing: .15px; }
.login-wrap .lh-top .lh-title { font-size: 36px; }
.login-wrap .lh-top { column-gap: 12px; }
@media (max-width: 860px) { .lh-slogan span { font-size: 12.5px; letter-spacing: 0; } .lh-slogan::before { width: 40px; } .login-wrap .lh-top .lh-title { font-size: 23px; } .login-wrap .lh-top { column-gap: 10px; } }
/* knowledge book: references at the end of each article */
.nb-refs { margin-top: 16px; padding-top: 10px; border-top: 1px dashed #e7c9d9; font-size: 12.5px; color: #6f5a66; }
.nb-refs h4 { margin: 0 0 6px; font-size: 13px; letter-spacing: .4px; text-transform: uppercase; color: #a3326f; }
.nb-refs ol { margin: 0; padding-left: 18px; display: grid; gap: 6px; line-height: 1.5; }
.nb-refs a { color: #c0267a; font-weight: 600; word-break: break-word; }
.nb-refs small { color: #8a7480; }
.nb-refs-note { margin: 8px 0 0; font-size: 12px; color: #8a5a12; }
:root[data-theme="dark"] .nb-refs { color: #cbb6c2; border-top-color: #5b3a4b; }

/* login running text: 16pt */
.lh-ticker { height: 54px; }
.lh-tick { font-size: 16pt; gap: 10px; padding: 0 26px; }
.lh-tick svg { width: 21px; height: 21px; }
.login-hero:has(.lh-ticker) .lh-content { padding-bottom: 78px; }
.login-hero:has(.lh-spot):has(.lh-ticker) .lh-content { padding-bottom: 54px; }
@media (max-width: 860px) { .login-hero:has(.lh-ticker) .lh-content { padding-bottom: 72px; } .login-hero:has(.lh-spot):has(.lh-ticker) .lh-content { padding-bottom: 54px; } }
@media (max-width: 860px) { .login-hero:has(.lh-spot):has(.lh-ticker) .lh-content { padding-bottom: 66px; } }
/* ✨ AI card designer */
.aic { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.aic-form { display: grid; gap: 10px; align-content: start; }
.aic-ideas { display: flex; flex-wrap: wrap; gap: 6px; }
.aic-ideas button { border: 1px solid var(--border); background: var(--surface); border-radius: 99px; padding: 4px 10px; font: inherit; font-size: 12px; cursor: pointer; color: var(--text); }
.aic-ideas button:hover { border-color: var(--primary); color: var(--primary); }
.aic-view { border: 1px dashed var(--border); border-radius: 14px; background: var(--surface-2); min-height: 320px; display: grid; place-items: center; padding: 10px; }
.aic-empty { text-align: center; color: var(--muted); font-size: 13px; display: grid; justify-items: center; gap: 8px; }
.aic-err { color: var(--danger); }
.aic-img { max-width: 100%; max-height: 52vh; border-radius: 10px; box-shadow: 0 10px 30px -12px rgba(0,0,0,.35); display: block; }
.aic-cap { margin: 8px 0 0; font-size: 13px; color: var(--muted); text-align: center; }
@media (max-width: 760px) { .aic { grid-template-columns: 1fr; } }
/* pop-up windows opened from Telegram Chat (AI card, confirmations) appear above the chat */
.chat-ov ~ .modal-bg { z-index: 1200; }
.toasts { z-index: 1300; }
/* running text: smooth, steady movement on its own layer */
.lh-ticker-track { will-change: transform; backface-visibility: hidden; transform: translate3d(0, 0, 0); animation-name: lhTickSmooth; animation-timing-function: linear; animation-iteration-count: infinite; }
@keyframes lhTickSmooth { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-50%, 0, 0); } }
.lh-tick { -webkit-font-smoothing: antialiased; }
@media (prefers-reduced-motion: reduce) { .lh-ticker-track { animation-duration: 0s !important; animation-play-state: paused; } }
.aic-tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.aic-tabs button { border: 1px solid var(--border); background: var(--surface); border-radius: 12px; padding: 7px 12px; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; color: var(--text); display: grid; text-align: left; }
.aic-tabs button small { font-weight: 500; color: var(--muted); font-size: 11px; }
.aic-tabs button.on { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, var(--surface)); color: var(--primary); }
.aic-pane { display: grid; gap: 10px; }
.aic-themes { display: flex; flex-wrap: wrap; gap: 6px; }
.aic-themes button { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--surface); border-radius: 99px; padding: 4px 10px 4px 5px; font: inherit; font-size: 12.5px; cursor: pointer; color: var(--text); }
.aic-themes button i { width: 18px; height: 18px; border-radius: 50%; background: linear-gradient(135deg, var(--c1), var(--c2)); }
.aic-themes button.on { border-color: var(--primary); box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 25%, transparent); }
/* the sign-in book page: a hint that tapping turns the page */
@media (hover: hover) { .login-wrap form.login-card { cursor: pointer; } .login-wrap form.login-card :is(input, select, textarea, label, .lc-error, [data-help]) { cursor: auto; } .login-wrap form.login-card :is(button, a, select) { cursor: pointer; } }

/* full-screen button: far right of the top bar; leaving full screen = a 3D exit door */
.topbar .fs-btn { margin-left: 2px; order: 99; }
.topbar .fs-btn.fs-on { background: none !important; color: inherit; padding: 0; width: 42px; }
.exit3d { position: relative; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(120% 90% at 30% 15%, rgba(255,255,255,.5), rgba(255,255,255,0) 45%), linear-gradient(160deg, #fda4af 0%, #f43f5e 40%, #e11d48 72%, #9f1239 100%);
  box-shadow: inset 0 1.5px 0 rgba(255,255,255,.75), inset 0 -3px 0 rgba(110,10,35,.45), inset 0 0 0 1px rgba(159,18,57,.25), 0 3px 0 -1px #9f1239, 0 6px 12px rgba(225,29,72,.35);
  transition: transform .15s ease, box-shadow .15s ease; }
.exit3d::after { content: ''; position: absolute; left: 3px; right: 3px; top: 2px; height: 45%; border-radius: 8px 8px 12px 12px; background: linear-gradient(180deg, rgba(255,255,255,.5), rgba(255,255,255,0)); pointer-events: none; }
.exit3d svg { width: 22px; height: 22px; position: relative; z-index: 1; filter: drop-shadow(0 1.5px 0 rgba(110,10,35,.55)); }
.topbar .fs-btn.fs-on:hover .exit3d { transform: translateY(-1px); box-shadow: inset 0 1.5px 0 rgba(255,255,255,.75), inset 0 -3px 0 rgba(110,10,35,.45), 0 4px 0 -1px #9f1239, 0 9px 16px rgba(225,29,72,.4); }
.topbar .fs-btn.fs-on:active .exit3d { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.6), inset 0 -1px 0 rgba(110,10,35,.4), 0 1px 0 -1px #9f1239, 0 2px 5px rgba(225,29,72,.3); }
/* full screen lock: shown if full screen was left any way other than the exit door */
.fs-return { position: fixed; inset: 0; z-index: 5000; display: grid; place-items: center; cursor: pointer;
  background: radial-gradient(circle at 50% 40%, rgba(236,28,125,.35), rgba(20,8,14,.88)); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: fsrIn .25s ease; }
@keyframes fsrIn { from { opacity: 0; } to { opacity: 1; } }
.fs-return-box { text-align: center; color: #fff; display: grid; justify-items: center; gap: 10px; padding: 24px; }
.fs-return-ico { font-size: 54px; filter: drop-shadow(0 6px 14px rgba(0,0,0,.35)); }
.fs-return h2 { margin: 0; font-size: 26px; } .fs-return p { margin: 0 0 8px; opacity: .85; }
.fs-return-exit { margin-top: 18px; display: inline-flex; align-items: center; gap: 10px; border: 0; background: rgba(255,255,255,.12); color: #fff; padding: 6px 14px 6px 6px; border-radius: 14px; font: inherit; font-size: 14px; cursor: pointer; }
.fs-return-exit:hover { background: rgba(255,255,255,.2); }

/* ===== iPad / tablet login: slimmer login book, promo + map always in a column on its right ===== */
/* tablet landscape & small laptops: give the sign-in side more room and the book less, so the right column is usable */
@media (min-width: 861px) and (max-width: 1400px) {
  .login-wrap.layout-split:not(.preview) { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
  .login-wrap.layout-split.side-left:not(.preview) { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
  .login-wrap:not(.preview) .lc-stage > .login-card.bk.bk:not(.lc-reader) { width: min(430px, calc(56% - 24px)); }
  .login-wrap:not(.preview) .lc-stage > .lc-side { left: calc(min(430px, calc(56% - 24px)) + 32px); }
  .login-wrap:not(.preview) .lc-stage > .lc-side .lc-promo .lh-promo > .lh-tag { font-size: 22px !important; }
}
/* tablet portrait (iPad mini / Air / 11"): book on the left, promo + map stacked on its right instead of below */
@media (min-width: 700px) and (max-width: 860px) {
  .login-wrap:not(.preview) .lc-stage { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
  .login-wrap:not(.preview) .lc-stage > .login-card.bk.bk:not(.lc-reader) { grid-column: 1; grid-row: 1; width: calc(100% - 10px); max-width: none; }
  .login-wrap:not(.preview) .lc-stage > .login-card.lc-reader:not(.is-closed) { grid-column: 1 / -1; }
  .login-wrap:not(.preview) .lc-stage > .lc-side { grid-column: 2; grid-row: 1; margin: 0 !important; width: auto !important; max-width: none !important;
    display: flex; flex-direction: column; gap: 14px; min-width: 0; }
  .login-wrap:not(.preview) .lc-stage > .lc-side .lc-promo { flex: 1 1 0; height: auto; min-height: 150px; }
  .login-wrap:not(.preview) .lc-stage > .lc-side .lc-promo .lh-msgs.promo { height: 100% !important; }
  .login-wrap:not(.preview) .lc-stage > .lc-side .lc-promo .lh-promo { flex-direction: column !important; align-items: stretch !important; justify-content: center; gap: 10px !important; text-align: center; }
  .login-wrap:not(.preview) .lc-stage > .lc-side .lc-promo .lh-promo > .lh-tag { align-self: center; width: min(100%, 120px) !important; height: auto !important; aspect-ratio: 1; font-size: 20px !important; }
  .login-wrap:not(.preview) .lc-stage > .lc-side .lc-promo .lh-pimg { width: min(100%, 120px); height: auto; aspect-ratio: 1; align-self: center; }
  .login-wrap:not(.preview) .lc-stage > .lc-side .lc-map { width: 100% !important; flex: 1 1 0; height: auto; min-height: 180px; aspect-ratio: auto !important; }
}
/* iPad Pro 12.9" portrait (≈1024 wide): photo side narrower still, so the book keeps room for its fields */
@media (min-width: 861px) and (max-width: 1100px) {
  .login-wrap.layout-split:not(.preview) { grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); }
  .login-wrap.layout-split.side-left:not(.preview) { grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); }
  .login-wrap:not(.preview) .lc-stage > .login-card.bk.bk:not(.lc-reader) { width: min(430px, calc(58% - 24px)); }
  .login-wrap:not(.preview) .lc-stage > .lc-side { left: calc(min(430px, calc(58% - 24px)) + 32px); }
}

/* ===== Screen test (admin): the app in a laptop / phone / iPad sized frame ===== */
.st-overlay { position: fixed; inset: 0; z-index: 400; display: flex; flex-direction: column; background: #2a2128; color: #fff; }
.st-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; background: #1d171c; border-bottom: 1px solid rgba(255,255,255,.08); }
.st-title { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; margin-right: 6px; }
.st-title svg { width: 18px; height: 18px; }
.st-devs { display: flex; flex-wrap: wrap; gap: 4px; padding: 3px; border-radius: 12px; background: rgba(255,255,255,.07); }
.st-devs button { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 9px; padding: 7px 11px; font: inherit; font-size: 13px; font-weight: 600;
  color: rgba(255,255,255,.75); background: transparent; cursor: pointer; transition: background .15s, color .15s; }
.st-devs button:hover { color: #fff; background: rgba(255,255,255,.08); }
.st-devs button.on { color: #fff; background: var(--primary); box-shadow: 0 4px 12px color-mix(in srgb, var(--primary) 45%, transparent); }
.st-emo { display: inline-block; font-size: 15px; } .st-emo.rot { transform: rotate(-90deg); }
.st-overlay .input { width: auto; height: 36px; background-color: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.15); }
.st-overlay .input option { color: #222; }
.st-overlay .btn.ghost { color: #fff; }
.st-overlay .btn.ghost:hover { background: rgba(255,255,255,.1); }
.st-close { margin-left: auto; }
.st-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: radial-gradient(circle at 50% 40%, #3a2e37, #211a20 75%); }
.st-device { flex: none; padding: 12px; border-radius: 28px; background: #0d0b0d; box-shadow: 0 30px 70px rgba(0,0,0,.55), inset 0 0 0 2px #3b3439; transform-origin: 50% 50%; }
.st-device.is-laptop { border-radius: 14px; }
.st-device.is-phone { border-radius: 44px; }
.st-frame { display: block; border: 0; border-radius: 16px; background: #fff; }
.st-device.is-laptop .st-frame { border-radius: 4px; }
.st-device.is-phone .st-frame { border-radius: 34px; }
.st-info { padding: 6px 14px 10px; text-align: center; font-size: 12.5px; color: rgba(255,255,255,.6); }

/* ===== Forgot password ===== */
.login-wrap .login-card .lc-forgot { margin-top: -4px; text-align: center; font-size: 13.5px; }
.fp { display: flex; flex-direction: column; gap: 14px; }
.fp-intro { margin: 0; }
.fp-ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 8px; margin-top: 6px; }
.fp-ways button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border-radius: 14px; cursor: pointer; font: inherit;
  background: var(--surface); border: 1.5px solid var(--border); color: var(--text); transition: border-color .15s, background .15s, transform .15s; }
.fp-ways button:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); transform: translateY(-1px); }
.fp-ways button.on { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, var(--surface)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent); }
.fp-way-ico { font-size: 22px; line-height: 1.2; }
.fp-ways small { color: var(--muted); font-size: 11.5px; }
.fp-sent { padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--primary) 7%, var(--surface)); border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--border)); font-size: 13.5px; }
.fp-code { letter-spacing: .5em; font-size: 20px !important; text-align: center; font-weight: 700; }
.fp-row { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.fp-none { text-align: center; } .fp-none .fp-ico { font-size: 34px; }
.fp .lc-error { margin: 0; }
.fp .lc-submit { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }

/* ===== Product codes (GGTTSSS) & import / classify ===== */
.pc-code { display: inline-block; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; letter-spacing: .06em; padding: 2px 8px; border-radius: 8px;
  background: color-mix(in srgb, var(--primary) 10%, var(--surface)); color: color-mix(in srgb, var(--primary) 80%, black); border: 1px solid color-mix(in srgb, var(--primary) 25%, var(--border)); }
.pc-code.sm { font-size: 11.5px; padding: 0 6px; border-radius: 6px; }
:root[data-theme="dark"] .pc-code { color: #ffb3e0; }
.pc-preview { min-height: 38px; display: flex; align-items: center; gap: 8px; }
.pc-list { display: flex; flex-direction: column; gap: 14px; }
.pc-group { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.pc-group.off { opacity: .6; }
.pc-ghead { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: color-mix(in srgb, var(--primary) 5%, var(--surface)); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.pc-types { margin: 0; } .pc-types tr.off td { opacity: .55; }
.pi-overlay { position: fixed; inset: 0; z-index: 300; background: var(--bg); display: flex; flex-direction: column; }
.pi-bar { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--border); background: var(--surface); }
.pi-title { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; } .pi-title svg { width: 18px; height: 18px; }
.pi-start { flex: 1; display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: center; align-content: center; padding: 30px; }
.pi-choice { width: min(360px, 100%); display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 28px 22px; border-radius: 20px; cursor: pointer; font: inherit;
  background: var(--surface); border: 1.5px solid var(--border); color: var(--text); box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.pi-choice:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--primary); }
.pi-choice:disabled { opacity: .55; cursor: default; }
.pi-choice b { font-size: 17px; } .pi-choice small { color: var(--muted); font-size: 13px; line-height: 1.45; } .pi-emo { font-size: 38px; }
.pi-legacy { flex-basis: 100%; justify-content: center; font-size: 13px; }
.pi-wait { flex: 1; display: grid; place-content: center; justify-items: center; gap: 10px; color: var(--muted); }
.pi-help { padding: 10px 18px; font-size: 13px; background: color-mix(in srgb, var(--primary) 5%, var(--surface)); border-bottom: 1px solid var(--border); }
.pi-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 18px 0; }
.pi-tools2 { padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.pi-filters { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.pi-chip { border: 1px solid var(--border); background: var(--surface); border-radius: 99px; padding: 5px 11px; font: inherit; font-size: 12.5px; cursor: pointer; color: var(--text); }
.pi-chip b { margin-left: 3px; } .pi-chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.pi-search { width: 240px; }
.pi-overlay .input.sm { height: 32px; font-size: 13px; padding-top: 4px; padding-bottom: 4px; }
.pi-table-wrap { flex: 1; min-height: 0; overflow: auto; padding: 0 18px; }
.pi-table thead th { position: sticky; top: 0; background: var(--surface); z-index: 1; }
.pi-table td { vertical-align: top; }
.pi-table tr.sel td { background: color-mix(in srgb, var(--primary) 5%, transparent); }
.pi-table tr.off td { opacity: .6; }
.pi-table select.input { width: 100%; }
.pi-flags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.pi-flags span { font-size: 11px; padding: 1px 7px; border-radius: 99px; background: color-mix(in srgb, #f59e0b 14%, var(--surface)); color: #92400e; }
:root[data-theme="dark"] .pi-flags span { color: #fcd34d; }
.pi-why { color: var(--muted); margin-top: 3px; } .pi-err { color: var(--danger); margin-top: 3px; font-weight: 600; }
.pi-foot { display: flex; align-items: center; gap: 10px; padding: 10px 18px; border-top: 1px solid var(--border); background: var(--surface); flex-wrap: wrap; }
.pi-pages { display: flex; align-items: center; gap: 8px; }

/* ===== "Install the app" card ===== */
.inst-card { position: fixed; z-index: 250; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); width: min(420px, calc(100vw - 24px));
  transform: translate(-50%, 140%); opacity: 0; transition: transform .35s cubic-bezier(.2,.8,.2,1), opacity .35s;
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 40px 14px 14px; border-radius: 18px; background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--primary) 25%, var(--border)); box-shadow: 0 18px 50px rgba(110,20,70,.22); }
.inst-card.show { transform: translate(-50%, 0); opacity: 1; }
.inst-logo { width: 48px; height: 48px; border-radius: 12px; flex: none; }
.inst-body { display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; min-width: 0; }
.inst-body b { font-size: 15px; } .inst-body > span { color: var(--muted); }
.inst-body ol { margin: 4px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.inst-share { width: 17px; height: 17px; vertical-align: -3px; color: #0a84ff; }
.inst-actions { display: flex; gap: 8px; margin-top: 8px; }
.inst-x { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.inst-x:hover { background: color-mix(in srgb, var(--primary) 10%, transparent); }
.inst-x svg { width: 15px; height: 15px; }
@media (prefers-reduced-motion: reduce) { .inst-card { transition: none; } }
