/* MJDigitalCRM — styles taken from the approved design (Sora, light / night). */
:root, [data-theme="light"] {
  --bg: #F3F5F8; --surf: #FFFFFF; --sunk: #EDF0F5; --border: #E1E6EE; --text: #0F172A; --muted: #55617A;
  --acc: var(--brand, #2453FF); --onacc: #FFFFFF;
  --accsoft: color-mix(in srgb, var(--acc) 12%, #FFFFFF); --acctext: color-mix(in srgb, var(--acc) 78%, #000000);
  --mid: #94A3B8; --bad: #DC2626; --warn: #D97706; --warnText: #B45309; --good: #15803D; --violet: #7C3AED;
  --alertBg: #FEF2F2; --alertBorder: #FECACA;
  --t-blue: #E6ECFF; --i-blue: #1D4ED8; --t-green: #DCFCE7; --i-green: #15803D; --t-violet: #EDE9FE; --i-violet: #6D28D9;
  --t-amber: #FEF3C7; --i-amber: #B45309; --t-red: #FEE2E2; --i-red: #B91C1C; --t-teal: #CCFBF1; --i-teal: #0F766E;
  --t-slate: #EEF2F6; --i-slate: #475569; --t-orange: #FFEDD5; --i-orange: #C2410C;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 24px rgba(15, 23, 42, .06);
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0A0E17; --surf: #111827; --sunk: #1A2233; --border: #253047; --text: #E8EDF6; --muted: #9AA6BD;
  --acc: color-mix(in srgb, var(--brand, #2453FF) 82%, #FFFFFF);
  --accsoft: color-mix(in srgb, var(--brand, #2453FF) 22%, #111827); --acctext: color-mix(in srgb, var(--brand, #2453FF) 35%, #FFFFFF);
  --mid: #475569; --bad: #F87171; --warn: #FBBF24; --warnText: #FBBF24; --good: #4ADE80; --violet: #A78BFA;
  --alertBg: #2A1416; --alertBorder: #5B2328;
  --t-blue: #16224A; --i-blue: #9DB4FF; --t-green: #123524; --i-green: #86EFAC; --t-violet: #2A1F4D; --i-violet: #C4B5FD;
  --t-amber: #3A2A0C; --i-amber: #FCD34D; --t-red: #3D1518; --i-red: #FCA5A5; --t-teal: #0F2E2B; --i-teal: #5EEAD4;
  --t-slate: #1F2937; --i-slate: #CBD5E1; --t-orange: #3B1F0E; --i-orange: #FDBA74;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font-family: 'Sora', system-ui, -apple-system, 'Segoe UI', sans-serif; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--acctext); }
a:hover { color: var(--acc); }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-size: 24px; font-weight: 700; }
h2 { font-size: 16px; font-weight: 700; }
h3 { font-size: 14px; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }

/* ---------- Shell ---------- */
.shell { display: flex; min-height: 100vh; }
.nav { width: 264px; flex: none; background: var(--surf); border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 14px; padding: 16px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; transition: width .15s; }
.nav-head { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); min-width: 0; flex: 1 1 auto; }
.brand-logo { width: 38px; height: 38px; border-radius: 11px; object-fit: cover; flex: none; background: var(--accsoft); color: var(--acctext); display: flex; align-items: center; justify-content: center; font-weight: 800; }
.brand-name { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-toggle { width: 36px; height: 36px; flex: none; border: 1px solid var(--border); border-radius: 10px; background: var(--surf); color: var(--muted); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.office-box { display: flex; flex-direction: column; gap: 6px; padding: 12px; background: var(--sunk); border-radius: 14px; }
.office-box label { font-size: 12px; font-weight: 700; color: var(--muted); }
.office-box select { height: 40px; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-group-name { font-size: 12px; font-weight: 700; color: var(--muted); padding: 0 10px 4px; }
.nav-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; padding: 0 10px; border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 14px; border: none; background: none; width: 100%; cursor: pointer; font-family: inherit; text-align: left; }
.nav-item:hover { background: var(--sunk); color: var(--text); }
.nav-item.active { background: var(--accsoft); color: var(--acctext); }
.nav-item .lbl { display: flex; align-items: center; gap: 10px; min-width: 0; }
.nav-subs { display: none; flex-direction: column; gap: 2px; margin: 2px 0 6px 19px; padding-left: 12px; border-left: 1px solid var(--border); }
.nav-item[aria-expanded="true"] + .nav-subs { display: flex; }
.nav-item[aria-expanded="true"] .chev { transform: rotate(180deg); }
.nav-sub { display: flex; align-items: center; min-height: 34px; padding: 0 10px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 600; }
.nav-sub:hover { background: var(--sunk); color: var(--text); }
.nav-sub.active { color: var(--acctext); background: var(--accsoft); }
.rail-only { display: none; }
.nav-foot { margin-top: auto; font-size: 11px; color: var(--muted); padding: 8px 10px 0; }

/* Collapsed menu: solid icons with short labels (Option B) */
.nav-collapsed .nav { width: 88px; padding: 16px 8px; align-items: stretch; }
.nav-collapsed .brand-name, .nav-collapsed .office-box, .nav-collapsed .nav-group-name, .nav-collapsed .nav-item, .nav-collapsed .nav-subs, .nav-collapsed .nav-foot { display: none !important; }
.nav-collapsed .rail-only { display: flex; }
.nav-collapsed .nav-head { flex-direction: column; }
.nav-collapsed .brand { flex: none; }
.rail-item { flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; border-radius: 12px; color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 600; }
.rail-item .pill { width: 48px; height: 32px; border-radius: 99px; display: flex; align-items: center; justify-content: center; }
.rail-item:hover .pill { background: var(--sunk); }
.rail-item.active { color: var(--acctext); }
.rail-item.active .pill { background: var(--accsoft); }
.rail-div { height: 1px; width: 40px; align-self: center; background: var(--border); margin: 4px 0; }
.rail-office { align-self: center; width: 48px; height: 30px; border-radius: 8px; background: var(--sunk); font-size: 12px; font-weight: 800; align-items: center; justify-content: center; }

.main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 12px 28px; background: var(--surf); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.topbar .menu-btn { display: none; margin-right: auto; }
.icon-btn { position: relative; width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 12px; background: var(--surf); color: var(--text); display: flex; align-items: center; justify-content: center; cursor: pointer; text-decoration: none; }
.icon-btn:hover { background: var(--sunk); }
.avatar { width: 44px; height: 44px; border-radius: 99px; border: 2px solid var(--border); background: var(--accsoft); color: var(--acctext); font-weight: 800; display: flex; align-items: center; justify-content: center; cursor: pointer; font-family: inherit; font-size: 14px; padding: 0; }
.dropdown { position: relative; }
.menu-pop { display: none; position: absolute; right: 0; top: calc(100% + 8px); width: 280px; background: var(--surf); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); padding: 8px; z-index: 40; }
.dropdown.open .menu-pop { display: block; }
.menu-pop a, .menu-pop button.link { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 0 10px; border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 600; background: none; border: none; font-family: inherit; font-size: 14px; cursor: pointer; }
.menu-pop a:hover, .menu-pop button.link:hover { background: var(--sunk); }
.menu-head { display: flex; gap: 10px; align-items: center; padding: 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.content { padding: 24px 28px 48px; display: flex; flex-direction: column; gap: 18px; max-width: 1600px; width: 100%; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-head .crumbs { font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.page-head .sub { color: var(--muted); margin-top: 4px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- Building blocks ---------- */
.card { background: var(--surf); border: 1px solid var(--border); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { background: var(--surf); border: 1px solid var(--border); border-radius: 16px; padding: 16px 18px; display: flex; gap: 14px; align-items: center; }
.stat .tile { width: 44px; height: 44px; border-radius: 12px; }
.stat .label { font-size: 12px; font-weight: 700; color: var(--muted); }
.stat .value { font-size: 22px; font-weight: 800; line-height: 1.2; }
.tile { display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: 9px; }
.t-blue { background: var(--t-blue); color: var(--i-blue); } .t-green { background: var(--t-green); color: var(--i-green); }
.t-violet { background: var(--t-violet); color: var(--i-violet); } .t-amber { background: var(--t-amber); color: var(--i-amber); }
.t-red { background: var(--t-red); color: var(--i-red); } .t-teal { background: var(--t-teal); color: var(--i-teal); }
.t-slate { background: var(--t-slate); color: var(--i-slate); } .t-orange { background: var(--t-orange); color: var(--i-orange); }
.row-actions { display: flex; gap: 6px; flex-wrap: nowrap; }
.row-actions .tile, .row-actions button.tile { width: 34px; height: 34px; border: none; cursor: pointer; text-decoration: none; padding: 0; }
.row-actions form { margin: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--border); background: var(--surf); color: var(--text); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--sunk); color: var(--text); }
.btn-primary { background: var(--acc); border-color: var(--acc); color: var(--onacc); }
.btn-primary:hover { background: var(--acctext); border-color: var(--acctext); color: var(--onacc); }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-danger:hover { filter: brightness(.92); background: var(--bad); color: #fff; }
.btn-sm { height: 36px; padding: 0 12px; border-radius: 10px; font-size: 13px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.link-btn { background: none; border: none; padding: 0; font: inherit; font-weight: 700; color: var(--acctext); cursor: pointer; }

.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.field .hint { font-weight: 500; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=time], input[type=date], input[type=search], input[type=tel], input[type=url], input:not([type]), select, textarea {
  height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surf); color: var(--text); font: inherit; font-size: 14px; font-weight: 500; width: 100%; min-width: 0;
}
textarea { height: auto; padding: 10px 12px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--acc) 35%, transparent); border-color: var(--acc); }
input[type=color] { width: 56px; height: 44px; padding: 4px; border-radius: 10px; border: 1px solid var(--border); background: var(--surf); cursor: pointer; }
input[type=file] { font: inherit; font-size: 13px; color: var(--muted); }
.field-error { color: var(--bad); font-size: 12px; font-weight: 600; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.toggle { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; }
.toggle .t-text { display: flex; flex-direction: column; gap: 2px; font-weight: 700; color: var(--text); font-size: 14px; }
.toggle .t-text span { font-weight: 500; font-size: 12px; color: var(--muted); }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch .knob { position: absolute; inset: 0; border-radius: 99px; background: var(--mid); transition: .15s; }
.switch .knob::after { content: ''; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; border-radius: 99px; background: #fff; transition: .15s; }
.switch input:checked + .knob { background: var(--acc); }
.switch input:checked + .knob::after { transform: translateX(18px); }
.switch input:focus-visible + .knob { outline: 2px solid var(--acc); outline-offset: 2px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; font-weight: 600; color: var(--text); cursor: pointer; padding: 6px 0; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--acc); flex: none; }
.check span small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }

.alert { padding: 12px 14px; border-radius: 12px; font-weight: 600; display: flex; gap: 10px; align-items: flex-start; }
.alert-ok { background: var(--t-green); color: var(--i-green); }
.alert-bad { background: var(--alertBg); color: var(--bad); border: 1px solid var(--alertBorder); }
.alert-warn { background: var(--t-amber); color: var(--i-amber); }
.alert-info { background: var(--accsoft); color: var(--acctext); }
.pill { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--bad); color: #fff; font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.toolbar .search, .phone-tools .search { position: relative; flex: 1 1 260px; margin: 0; }
.toolbar .search svg, .phone-tools .search svg { position: absolute; left: 12px; top: 13px; color: var(--muted); }
.toolbar .search input, .phone-tools .search input { padding-left: 38px; }
.toolbar select { width: auto; min-width: 150px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--border); background: var(--surf); color: var(--text); text-decoration: none; font-weight: 700; font-size: 13px; }
.chip.on { background: var(--acc); border-color: var(--acc); color: var(--onacc); }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; padding: 12px 14px; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--sunk); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: color-mix(in srgb, var(--sunk) 50%, transparent); }
.empty { padding: 36px 16px; text-align: center; color: var(--muted); }
.cell-title { font-weight: 700; color: var(--text); text-decoration: none; }
.cell-sub { font-size: 12px; color: var(--muted); }

.tabs-side { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 18px; align-items: start; }
.tab-list { display: flex; flex-direction: column; gap: 4px; background: var(--surf); border: 1px solid var(--border); border-radius: 16px; padding: 8px; }
.tab-link { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 12px; text-decoration: none; color: var(--text); }
.tab-link:hover { background: var(--sunk); color: var(--text); }
.tab-link.on { background: var(--accsoft); }
.tab-link .tile { width: 36px; height: 36px; }
.tab-link b { display: block; font-size: 14px; }
.tab-link span { font-size: 12px; color: var(--muted); }

/* Side pane (Add / Edit / Filters) */
.pane-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 50; display: none; }
.pane { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); background: var(--bg); z-index: 51; display: none; flex-direction: column; box-shadow: var(--shadow); }
.pane.open { display: flex; }
.pane-backdrop.open { display: block; }
.pane-head { padding: 22px 22px 18px; background: linear-gradient(135deg, var(--acc), color-mix(in srgb, var(--acc) 55%, #7C3AED)); color: #fff; display: flex; gap: 14px; align-items: center; }
.pane-head .round { width: 46px; height: 46px; border-radius: 99px; background: rgba(255, 255, 255, .2); display: flex; align-items: center; justify-content: center; flex: none; font-weight: 800; }
.pane-head h2 { font-size: 18px; color: #fff; }
.pane-head p { margin: 2px 0 0; font-size: 13px; opacity: .85; }
.pane-head .icon-btn { margin-left: auto; background: rgba(255, 255, 255, .16); border-color: transparent; color: #fff; }
.pane-body { flex: 1 1 auto; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.pane-card { background: var(--surf); border: 1px solid var(--border); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.pane-card-head { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.pane-card-head .tile { width: 32px; height: 32px; }
.pane-foot { padding: 14px 18px; border-top: 1px solid var(--border); background: var(--surf); display: flex; gap: 10px; }
.pane-foot .btn { flex: 1 1 0; }
body.pane-open { overflow: hidden; }

.pagination { display: flex; gap: 6px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.pagination .pages { display: flex; gap: 6px; }
.pagination a, .pagination span.cur { min-width: 36px; height: 36px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--border); display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font-weight: 700; color: var(--text); background: var(--surf); }
.pagination span.cur { background: var(--acc); color: var(--onacc); border-color: var(--acc); }

.steps { display: flex; flex-direction: column; gap: 10px; }
.step { display: flex; gap: 14px; align-items: center; padding: 14px; border: 1px solid var(--border); border-radius: 14px; text-decoration: none; color: var(--text); background: var(--surf); }
.step:hover { border-color: var(--acc); color: var(--text); }
.step .num { width: 36px; height: 36px; border-radius: 99px; display: flex; align-items: center; justify-content: center; font-weight: 800; flex: none; background: var(--sunk); color: var(--muted); }
.step.done .num { background: var(--t-green); color: var(--i-green); }
.code-box { display: flex; gap: 8px; align-items: center; background: var(--sunk); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.code-box code { flex: 1 1 auto; word-break: break-all; font-size: 13px; }
.perm-group { border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; }
.perm-group h3 { margin-bottom: 4px; }
.change-list { display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.change-list .from { color: var(--bad); text-decoration: line-through; }
.change-list .to { color: var(--good); font-weight: 600; }

/* Install / login screens */
.center-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px; gap: 18px; }
.center-card { width: min(560px, 100%); background: var(--surf); border: 1px solid var(--border); border-radius: 20px; padding: 28px; display: flex; flex-direction: column; gap: 18px; box-shadow: var(--shadow); }
.center-card.wide { width: min(720px, 100%); }
.install-steps { display: flex; gap: 6px; }
.install-steps span { flex: 1 1 0; height: 6px; border-radius: 99px; background: var(--border); }
.install-steps span.on { background: var(--acc); }
.req { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 10px; background: var(--sunk); align-items: flex-start; }
.req .ok { color: var(--good); font-weight: 700; white-space: nowrap; }
.req .no { color: var(--bad); font-weight: 700; white-space: nowrap; }
.powered { font-size: 12px; color: var(--muted); font-weight: 600; }
.radio-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 2px solid var(--border); border-radius: 14px; cursor: pointer; color: var(--text); font-weight: 700; font-size: 14px; }
.radio-card:has(input:checked) { border-color: var(--acc); background: var(--accsoft); }
.radio-card input { margin-top: 3px; accent-color: var(--acc); }
.radio-card small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }

/* Phones */
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tabs-side { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .nav { position: fixed; left: 0; top: 0; bottom: 0; z-index: 60; transform: translateX(-100%); transition: transform .2s; width: 284px !important; padding: 16px 14px !important; }
  .nav-collapsed .nav .brand-name, .nav-collapsed .nav .office-box, .nav-collapsed .nav .nav-group-name, .nav-collapsed .nav .nav-item, .nav-collapsed .nav .nav-foot { display: flex !important; }
  .nav-collapsed .nav .nav-group-name { display: block !important; }
  .nav-collapsed .nav .rail-only { display: none !important; }
  .nav-collapsed .nav .nav-head { flex-direction: row; }
  .mobile-nav-open .nav { transform: none; }
  .mobile-nav-open .nav-scrim { display: block; }
  .nav-scrim { display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 55; }
  .nav-toggle { display: none; }
  .topbar { padding: 10px 14px; }
  .topbar .menu-btn { display: flex; }
  .content { padding: 18px 14px 40px; }
  .grid-2, .grid-3, .grid-4, .form-grid { grid-template-columns: 1fr; }
  .center-card { padding: 20px; }
}

/* Order page: call desk */
.desk { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 18px; align-items: start; }
.desk-side { position: sticky; top: 18px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
@media (max-width: 1000px) { .desk { grid-template-columns: 1fr; } .desk-side { position: static; } }
.avatar-lg { width: 52px; height: 52px; border-radius: 50%; background: var(--t-blue); color: var(--i-blue); font-weight: 800; font-size: 18px; display: flex; align-items: center; justify-content: center; flex: none; }
.btn-call { background: #16A34A; color: #fff; border-color: #16A34A; height: 48px; justify-content: center; }
.btn-call:hover { background: #15803D; color: #fff; }
.btn-wa { background: var(--t-green); color: var(--i-green); border-color: transparent; height: 48px; justify-content: center; }
.btn-danger-soft { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.sunk { display: flex; flex-direction: column; gap: 4px; padding: 12px; background: var(--sunk); border-radius: 12px; }
.lbl { font-size: 12px; font-weight: 700; color: var(--muted); }
.kv { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.note-bubble { margin-top: 4px; padding: 8px 10px; background: var(--t-amber); border-radius: 10px; white-space: pre-line; }

/* Login: soft waves */
.login-page { margin: 0; min-height: 100vh; background: #DCE3EA; position: relative; overflow-x: hidden; }
.login-waves { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }
.login-wrap { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 20px; box-sizing: border-box; }
.login-card { width: min(440px, 100%); background: rgba(255,255,255,.9); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border-radius: 24px; padding: 36px 32px; box-shadow: 0 30px 60px rgba(15,23,42,.12); display: flex; flex-direction: column; gap: 18px; box-sizing: border-box; color: #0F172A; }
.login-head { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.login-head h1 { margin: 6px 0 0; font-size: 28px; }
.login-head p { margin: 0; color: #55617A; }
.login-logo .brand-logo { width: 56px; height: 56px; border-radius: 14px; font-size: 24px; background: var(--brand); color: #fff; }
.login-name { font-size: 13px; font-weight: 700; color: #55617A; letter-spacing: .08em; text-transform: uppercase; }
.login-card .field input { height: 50px; }
.login-page .powered { color: #55617A; }
@media (max-width: 520px) { .login-card { padding: 26px 20px; border-radius: 22px; gap: 14px; } .login-head h1 { font-size: 24px; } .login-logo .brand-logo { width: 48px; height: 48px; } }

/* Agent portal (phone first) */
.portal { margin: 0; background: var(--bg); min-height: 100vh; padding-bottom: 84px; }
.portal-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--surf); border-bottom: 1px solid var(--border); }
.portal-brand { flex: 1 1 auto; display: flex; align-items: center; gap: 10px; min-width: 0; }
.portal-main { max-width: 680px; margin: 0 auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 14px; }
.portal-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surf); border-top: 1px solid var(--border); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
.portal-tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 56px; border-radius: 12px; color: var(--muted); text-decoration: none; font-size: 12px; font-weight: 700; }
.portal-tabs a.on { color: var(--acctext); background: var(--accsoft); }
.deliv { display: flex; flex-direction: column; gap: 12px; }
.deliv-amt { font-size: 22px; font-weight: 800; }
.deliv-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn-done { background: #16A34A; color: #fff; border-color: #16A34A; height: 50px; justify-content: center; }
.btn-fail { background: var(--t-red); color: var(--i-red); border-color: transparent; height: 50px; justify-content: center; }

/* Status tabs: outline pills; the selected one fills with its deep colour */
:root { --d-amber: #B45309; --d-blue: #1D4ED8; --d-green: #15803D; --d-orange: #C2410C; --d-red: #B91C1C; --d-slate: #475569; --d-teal: #0F766E; --d-violet: #6D28D9; }
.chip.st { height: 40px; padding: 0 16px; background: transparent; border: 1px solid var(--border); color: var(--text); font-weight: 600; font-size: 14px; gap: 8px; transition: background .15s, box-shadow .15s; }
.chip.st b { color: var(--muted); font-weight: 700; }
.chip.st:hover { border-color: var(--acc); }
.chip.st.on { background: var(--acc); border-color: var(--acc); color: #fff; font-weight: 700; box-shadow: 0 6px 14px color-mix(in srgb, var(--acc) 25%, transparent); }
.chip.st.on b { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: rgba(255,255,255,.25); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; box-sizing: border-box; }
.nav > * { flex-shrink: 0; }

/* Bulk actions: a line that appears when orders are ticked, then a side panel */
.bulk-line { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 12px; border-radius: 12px; background: var(--accsoft); color: var(--acctext); margin-bottom: 10px; }
.bulk-line[hidden] { display: none !important; }
.bulk-choice { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--surf); color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.bulk-choice:hover { border-color: var(--acc); }
.bulk-opt { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surf); font-weight: 600; cursor: pointer; }
.bulk-opt:has(input:checked) { border-color: var(--acc); background: var(--accsoft); }
.bulk-opt input { width: 18px; height: 18px; accent-color: var(--acc); margin: 0; }
[data-bulk-step][hidden], [data-bulk-foot][hidden] { display: none !important; }

/* Phone bottom bar */
.bottom-bar { display: none; }
@media (max-width: 860px) {
  .bottom-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: grid; grid-template-columns: repeat(var(--n), 1fr); align-items: center; background: var(--surf); border-top: 1px solid var(--border); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
  .bottom-bar a, .bottom-bar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 54px; border: none; background: none; border-radius: 12px; color: var(--muted); text-decoration: none; font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
  .bottom-bar a.on { color: var(--acctext); background: var(--accsoft); }
  .bottom-bar .bb-add { width: 54px; height: 54px; min-height: 0; justify-self: center; border-radius: 18px; background: var(--acc); color: var(--onacc); box-shadow: 0 8px 18px color-mix(in srgb, var(--acc) 35%, transparent); }
  .content { padding-bottom: 96px !important; }
  .pane-open .bottom-bar { display: none; }
}
@media (max-width: 860px) {
  .grid-3:has(> .stat), .grid-4:has(> .stat) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .grid-3:has(> .stat) > .stat:last-child:nth-child(odd), .grid-4:has(> .stat) > .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .stat { padding: 14px; gap: 10px; }
  .stat > .tile { display: none; }
  .stat .value { font-size: 22px; }
}

/* WhatsApp inbox */
.wa-wrap { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 18px; align-items: start; }
.wa-list { max-height: calc(100vh - 220px); overflow: hidden; }
.wa-item { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; color: var(--text); text-decoration: none; }
.wa-item:hover { background: var(--sunk); }
.wa-item.on { background: var(--accsoft); }
.wa-chat { min-height: 520px; }
.wa-msgs { display: flex; flex-direction: column; gap: 8px; max-height: 52vh; overflow-y: auto; padding: 6px 2px; }
.wa-msg { max-width: 78%; padding: 10px 12px; border-radius: 14px; background: var(--sunk); }
.wa-msg.out { align-self: flex-end; background: var(--t-green); border-bottom-right-radius: 4px; }
.wa-msg.in { align-self: flex-start; border-bottom-left-radius: 4px; }
@media (max-width: 860px) { .wa-wrap { grid-template-columns: 1fr; } .wa-msg { max-width: 92%; } }

/* Finance */
.table th.num, .table td.num { text-align: right; white-space: nowrap; }
.table tfoot td { border-top: 2px solid var(--border); }
.meter { display: block; height: 10px; border-radius: 99px; background: var(--sunk); overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: 99px; background: var(--acc); }
.fin-bars { display: flex; align-items: flex-end; gap: 10px; height: 200px; padding-top: 8px; }
.fin-col { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; }
.fin-pair { flex: 1 1 auto; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 4px; }
.fin-bar { width: 38%; max-width: 26px; min-height: 2px; border-radius: 6px 6px 2px 2px; }
.fin-bar.s, .fin-key.s { background: var(--i-blue, #3b6fe0); }
.fin-bar.n, .fin-key.n { background: var(--i-green, #1a9b55); }
.fin-bar.neg, .fin-key.neg { background: var(--bad, #d33); }
.fin-key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.tone-good { color: var(--good); } .tone-warn { color: var(--warn, #c77700); } .tone-bad { color: var(--bad); }
.help-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.help-item { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; color: var(--text); text-decoration: none; font-weight: 600; }
.help-item:hover, .help-item.on { border-color: var(--acc); background: var(--accsoft); }
@media (max-width: 860px) { .fin-bars { height: 150px; } }
.spend-line { display: grid; grid-template-columns: minmax(0, 1fr) 160px; gap: 10px; align-items: center; font-weight: 600; }
.order-cards .stat { align-items: flex-start; }
.order-cards .value { overflow-wrap: anywhere; }

/* Summary cards (all list pages) */
.sum-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.sum-card { background: var(--surf); border: 1px solid var(--border); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sum-label { font-size: 12px; font-weight: 600; color: var(--muted); }
.sum-value { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; overflow-wrap: anywhere; line-height: 1.2; }
.sum-sub { font-size: 12px; font-weight: 600; }
.tone-muted { color: var(--muted); }
@media (max-width: 600px) { .sum-cards { grid-template-columns: 1fr 1fr; } .sum-value { font-size: 20px; } }
.order-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }

/* Menu counts, bell, quick add, phone top bar and bottom bar */
.nav-right { display: inline-flex; align-items: center; gap: 6px; }
.nav-badge, .bb-badge, .bell-badge, .rail-badge { font-style: normal; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; }
.nav-badge { background: var(--sunk); color: var(--text); }
.nav-item.active .nav-badge { background: var(--surf); }
.bell { position: relative; }
.bell-badge, .bb-badge, .rail-badge { position: absolute; background: var(--bad); color: #fff; }
.bell-badge { top: -6px; right: -6px; }
.rail-item .pill { position: relative; }
.rail-badge { top: -6px; right: -8px; min-width: 18px; height: 18px; font-size: 10px; padding: 0 4px; }
.bell-pop { width: 330px; max-height: 70vh; overflow: auto; }
.bell-item { display: flex !important; gap: 10px; align-items: flex-start !important; white-space: normal !important; }
.bell-item b { display: block; font-size: 13.5px; }
.bell-item small { color: var(--muted); font-size: 12px; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; margin-top: 6px; }
.dot-red { background: var(--bad); } .dot-amber { background: #D97706; } .dot-slate { background: #94A3B8; }
.top-brand { display: none; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; font-size: 16px; min-width: 0; flex: 1 1 auto; }
.top-brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-brand .brand-logo, .top-brand img { width: 34px; height: 34px; border-radius: 9px; }
.quick-add-top .btn { gap: 6px; }
.bottom-bar a, .bottom-bar button { position: relative; }
.bb-badge { top: 0; right: calc(50% - 26px); }
.bb-add-wrap { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; position: relative; }
.bb-add-label { font-size: 11px; font-weight: 700; color: var(--acc); margin-top: 2px; }
.bb-pop { position: absolute; bottom: 70px; left: 50%; transform: translateX(-50%); top: auto; right: auto; min-width: 220px; }
@media (max-width: 860px) { .top-brand { display: flex; } .topbar { justify-content: flex-start; } }

/* Dashboard */
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.dash-head h1 { margin: 0; }
.dash-head .sub { margin: 4px 0 0; color: var(--muted); }
.dash-updated { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.dash-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.period-btn, .filter-btn { gap: 8px; background: var(--surf); }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 16px; background: var(--surf); border: 1px solid var(--border); text-decoration: none; color: var(--text); min-width: 0; }
.kpi:hover { border-color: var(--acc); }
.kpi .tile { width: 34px; height: 34px; border-radius: 10px; margin-bottom: 10px; }
.kpi-label { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.kpi-value { font-size: 28px; font-weight: 800; line-height: 1.15; }
.kpi-sub { font-size: 12.5px; font-weight: 600; }
.tone-good { color: var(--good); } .tone-bad { color: var(--bad); } .tone-warn { color: #C2410C; } .tone-muted { color: var(--muted); font-weight: 500; }
.attn-bar { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 14px; background: color-mix(in srgb, var(--bad) 8%, var(--surf)); border: 1px solid color-mix(in srgb, var(--bad) 30%, transparent); color: var(--text); text-decoration: none; font-size: 14px; }
.attn-bar > svg { color: var(--bad); flex: none; }
.attn-bar > span:nth-child(2) { flex: 1 1 auto; }
.attn-view { color: var(--acc); font-weight: 800; }
.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.dash-grid > .card { margin: 0; }
.legend { display: flex; gap: 14px; } .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.chart-foot { display: flex; gap: 18px; font-size: 14px; color: var(--muted); } .chart-foot b { color: var(--text); }
.money-list > div { display: flex; justify-content: space-between; padding: 11px 0; border-top: 1px solid var(--border); color: var(--muted); }
.money-list b { color: var(--text); }
.net-box { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-radius: 14px; background: var(--accsoft); color: var(--acctext); text-decoration: none; font-weight: 700; margin-top: 8px; }
.net-box b { font-size: 24px; font-weight: 800; } .net-box b.neg { color: var(--bad); }
.ad-row { display: flex; justify-content: space-between; align-items: baseline; padding-top: 12px; border-top: 1px solid var(--border); color: var(--muted); }
.ad-row b { color: var(--text); font-size: 18px; } .ad-row.big b { font-size: 20px; }
.bar { height: 5px; border-radius: 99px; background: var(--sunk); overflow: hidden; margin: 6px 0; }
.bar i { display: block; height: 100%; border-radius: 99px; background: var(--acc); }
.target-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; padding: 12px; border-radius: 12px; background: var(--sunk); }
.target-form .field { flex: 1 1 140px; }
.rank-row { padding: 12px 0; border-top: 1px solid var(--border); }
.rank-row.num { display: flex; gap: 12px; align-items: center; }
.rank-top { display: flex; justify-content: space-between; gap: 10px; } .rank-top b:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-n { width: 28px; height: 28px; border-radius: 99px; flex: none; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; background: var(--sunk); }
.rank-n.first { background: var(--acc); color: var(--onacc); }
.board-sub { display: flex; justify-content: space-between; gap: 10px; scroll-margin-top: 90px; }
.attn-row { display: flex; gap: 12px; align-items: flex-start; padding: 11px 0; border-top: 1px solid var(--border); }
.attn-row > span:nth-child(2) { flex: 1 1 auto; } .attn-row b { display: block; font-size: 14px; } .attn-row small { color: var(--muted); }
.attn-row a { font-weight: 700; font-size: 13px; white-space: nowrap; }
.pane-sub { margin: 6px 0 0; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 13px; } .kpi-value { font-size: 24px; }
  .dash-updated { order: 3; } .dash-updated .icon-btn { display: none; }
  .dash-head { align-items: flex-start; flex-direction: column; gap: 2px; }
  .dash-tools .dropdown:first-child { flex: 1 1 auto; } .period-btn { width: 100%; justify-content: flex-start; } .period-btn > svg:last-child { margin-left: auto; }
  .filter-word { display: none; } .filter-btn { width: 44px; padding: 0; justify-content: center; position: relative; }
  .filter-btn .badge { position: absolute; top: -6px; right: -6px; }
  .dash-showing { flex-basis: 100%; }
}
@media (max-width: 860px) { .quick-add-top { display: none; } }

/* Orders page: phone tools, cards and order cards */
.phone-only { display: none !important; }
.order-kpis.n5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.order-kpis.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.order-kpis .kpi-value { font-size: 24px; overflow-wrap: anywhere; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field-row[hidden] { display: none; }
@media (max-width: 1100px) { .order-kpis.n5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .hide-phone { display: none !important; }
  .phone-only { display: flex !important; }
  .phone-tools { flex-direction: column; gap: 10px; }
  .phone-tools .search { width: 100%; }
  .phone-tools .search input { width: 100%; }
  .phone-tools-row { display: flex; gap: 10px; }
  .phone-tools-row .dropdown { flex: 1 1 auto; }
  .order-kpis.n5, .order-kpis.n3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-kpis.n5 .kpi:last-child, .order-kpis.n3 .kpi:last-child { grid-column: 1 / -1; }
  .chips { flex-wrap: wrap !important; overflow: visible !important; }
  .ocard-list { flex-direction: column; gap: 12px; }
  .card:has(> #bulk .ocard-list) { padding: 12px; background: transparent; border: none; box-shadow: none; }
}
.ocard { background: var(--surf); border: 1px solid var(--border); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; }
.ocard-top { display: flex; gap: 10px; align-items: flex-start; }
.ocard-top input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--acc); flex: none; }
.ocard-title { flex: 1 1 auto; min-width: 0; text-decoration: none; color: var(--text); }
.ocard-title b { display: block; font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ocard-title small { color: var(--muted); font-size: 12px; }
.ocard-top .pill { flex: none; }
.ocard-rows { list-style: none; margin: 10px 0 4px; padding: 0; display: flex; flex-direction: column; gap: 9px; font-size: 14px; }
.ocard-rows li { display: flex; gap: 10px; align-items: flex-start; }
.ocard-rows li > svg { color: var(--muted); flex: none; margin-top: 1px; }
.ocard-rows a { font-weight: 700; }
.ocard-tags { display: flex; gap: 4px; flex-wrap: wrap; } .ocard-tags .pill { height: 20px; font-size: 10px; }
.ocard-group { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-top: 10px; margin-top: 6px; border-top: 1px solid var(--border); }
.ocard-group + .ocard-acts + .ocard-group { border-top: none; margin-top: 0; padding-top: 4px; }
.ocard-acts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 8px 0 2px; }
.ocard-acts a, .ocard-acts button { display: flex; flex-direction: column; align-items: center; gap: 5px; font: inherit; font-size: 11.5px; font-weight: 600; color: var(--text); text-decoration: none; background: none; border: none; cursor: pointer; padding: 0; }
.ra { width: 42px; height: 42px; border-radius: 99px; display: flex; align-items: center; justify-content: center; font-style: normal; }
.ra-green { background: #DCFCE7; color: #15803D; } .ra-wa { background: #DCFCE7; color: #25D366; } .ra-blue { background: #DBEAFE; color: #1D4ED8; }
.ra-slate { background: var(--sunk); color: var(--text); } .ra-orange { background: #FFEDD5; color: #C2410C; } .ra-violet { background: #EDE9FE; color: #6D28D9; } .ra-red { background: #FEE2E2; color: #B91C1C; }
.phone-tools .search { flex: none; }
.bottom-bar .bb-pop a { flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 46px; padding: 0 14px; font-size: 14.5px; font-weight: 600; color: var(--text); border-radius: 10px; }
.bottom-bar .bb-pop a:hover { background: var(--sunk); }
.bottom-bar .bb-pop { left: auto; right: 50%; transform: translateX(50%); min-width: 230px; padding: 6px; }
@media (max-width: 860px) { .bell-pop { position: fixed; left: 12px; right: 12px; top: 64px; width: auto; } }
.phone-inline { display: none; }
@media (max-width: 860px) { .phone-inline { display: inline; } .kpi-value { white-space: nowrap; } }

/* Centred popups */
.modal-wrap { position: fixed; inset: 0; z-index: 70; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(15, 23, 42, .45); }
.modal-wrap.open { display: flex; }
.modal { width: min(420px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; background: var(--surf); border-radius: 20px; box-shadow: 0 24px 60px rgba(15, 23, 42, .35); overflow: hidden; margin: 0; }
.modal-sm { width: min(380px, 100%); }
.modal-head { display: flex; gap: 12px; align-items: center; padding: 18px 18px 12px; }
.modal-head h2 { margin: 0; font-size: 17px; }
.modal-head p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.modal-head > div { flex: 1 1 auto; min-width: 0; }
.modal-icon { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex: none; }
.modal-x { border: none; background: none; color: var(--muted); cursor: pointer; padding: 4px; display: flex; }
.modal-body { padding: 4px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.modal-foot { display: flex; gap: 10px; padding: 14px 18px 18px; }
.modal-foot .btn { flex: 1 1 0; justify-content: center; height: 46px; }
.btn-danger { background: var(--bad); color: #fff; border-color: transparent; gap: 6px; }
.btn-danger:hover { filter: brightness(.95); }
.modal-center { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 24px 20px 6px; }
.modal-center h2 { margin: 0; font-size: 19px; }
.modal-center p { margin: 0; font-size: 13.5px; }
.danger-round { width: 64px; height: 64px; border-radius: 99px; background: var(--t-red); color: var(--bad); display: flex; align-items: center; justify-content: center; }
.del-order { width: 100%; box-sizing: border-box; display: flex; gap: 10px; align-items: center; justify-content: space-between; text-align: left; padding: 10px 12px; border-radius: 12px; background: var(--sunk); }
.del-order[hidden] { display: none; }
.del-order b { display: block; font-size: 13px; } .del-order small { color: var(--muted); font-size: 12px; }
.modal .search { position: relative; } .modal .search svg { position: absolute; left: 12px; top: 13px; color: var(--muted); } .modal .search input { padding-left: 38px; width: 100%; }
.tick-list { display: flex; flex-direction: column; gap: 2px; }
.tick-row, .pick-row { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 4px 8px; border-radius: 12px; cursor: pointer; }
.tick-row[hidden], .pick-row[hidden] { display: none; }
.tick-row:hover, .pick-row:hover { background: var(--sunk); }
.tick-name { flex: 1 1 auto; font-weight: 600; font-size: 13.5px; }
.tick-row input { width: 22px; height: 22px; accent-color: var(--acc); flex: none; }
.dot-tag { width: 11px; height: 11px; border-radius: 99px; flex: none; background: currentColor; }
.dot-tag.t-blue { color: var(--i-blue); } .dot-tag.t-green { color: var(--i-green); } .dot-tag.t-violet { color: var(--i-violet); } .dot-tag.t-amber { color: var(--i-amber); } .dot-tag.t-red { color: var(--i-red); } .dot-tag.t-teal { color: var(--i-teal); } .dot-tag.t-slate { color: var(--i-slate); } .dot-tag.t-orange { color: var(--i-orange); }
.new-tag-box { border: 1.5px dashed var(--acc); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 10px; }
.new-tag-row { display: flex; gap: 8px; align-items: center; } .new-tag-row input { flex: 1 1 auto; height: 40px; } .new-tag-row span { white-space: nowrap; }
.colour-dots { display: flex; gap: 8px; flex-wrap: wrap; }
.colour-dots label { cursor: pointer; } .colour-dots input { position: absolute; opacity: 0; width: 0; height: 0; }
.colour-dots span { display: block; width: 24px; height: 24px; border-radius: 99px; border: 2px solid transparent; }
.colour-dots span.t-blue { background: var(--i-blue); } .colour-dots span.t-violet { background: var(--i-violet); } .colour-dots span.t-green { background: var(--i-green); } .colour-dots span.t-orange { background: var(--i-orange); } .colour-dots span.t-red { background: var(--i-red); } .colour-dots span.t-teal { background: var(--i-teal); } .colour-dots span.t-amber { background: var(--i-amber); } .colour-dots span.t-slate { background: var(--i-slate); }
.colour-dots input:checked + span { outline: 2px solid var(--text); outline-offset: 2px; }
.colour-dots input:focus-visible + span { outline: 2px solid var(--acc); outline-offset: 2px; }
.pick-row { border: 1.5px solid transparent; }
.pick-row:has(input:checked) { background: var(--accsoft); border-color: var(--acc); }
.pick-row input { width: 20px; height: 20px; accent-color: var(--acc); flex: none; }
.pick-text { flex: 1 1 auto; min-width: 0; } .pick-text b { display: block; font-size: 14px; } .pick-text small { color: var(--muted); font-size: 12px; }
.now-tag { font-style: normal; color: var(--good); font-size: 11px; }
.avatar-sm { width: 36px; height: 36px; border-radius: 99px; background: var(--accsoft); color: var(--acctext); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; flex: none; }
.pick-none .pick-text b { color: var(--bad); }
.avatar-sm.t-red { background: var(--t-red); color: var(--bad); }

/* Quick view pane (Q3) */
.quick-pane { background: var(--bg); }
.quick-load { padding: 40px 20px; text-align: center; color: var(--muted); }
.qv-top { background: var(--surf); padding: 16px; display: flex; flex-direction: column; gap: 12px; border-bottom: 1px solid var(--border); }
.qv-bar { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.qv-sum { border-radius: 16px; padding: 14px; background: var(--sunk); display: flex; flex-direction: column; gap: 6px; }
.qv-sum-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.qv-sum b.qv-title { font-size: 15px; }
.qv-sum-bottom { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 12.5px; color: var(--muted); }
.qv-amount { font-size: 22px; font-weight: 800; color: var(--acc); white-space: nowrap; }
.qv-body { flex: 1 1 auto; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.qv-card { background: var(--surf); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.qv-acts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px 8px; }
.qv-acts a, .qv-acts button { display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; color: var(--text); font: inherit; font-size: 12px; font-weight: 700; background: none; border: none; cursor: pointer; }
.qv-acts i { width: 46px; height: 46px; border-radius: 99px; display: flex; align-items: center; justify-content: center; font-style: normal; }
.qv-timeline { border-left: 2px solid var(--border); margin: 4px 0 0 7px; padding-left: 16px; display: flex; flex-direction: column; gap: 14px; }
.qv-timeline > div { position: relative; } .qv-timeline > div::before { content: ''; position: absolute; left: -23px; top: 4px; width: 12px; height: 12px; border-radius: 99px; background: #CBD3DF; border: 2px solid var(--surf); }
.qv-timeline > div:first-child::before { background: var(--acc); }
.qv-timeline p { margin: 0; font-size: 13.5px; } .qv-timeline small { color: var(--muted); font-size: 12px; }
.qv-foot { padding: 12px 14px 16px; background: var(--surf); border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.qv-note { display: flex; gap: 8px; align-items: center; border: 1px solid var(--border); border-radius: 99px; padding: 4px 4px 4px 16px; background: var(--surf); }
.qv-note input { flex: 1 1 auto; border: none; background: none; height: 38px; padding: 0; box-shadow: none; outline: none; min-width: 0; }
.qv-note button { width: 38px; height: 38px; border-radius: 99px; background: var(--acc); color: var(--onacc); border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.qv-foot .btn { justify-content: center; height: 46px; }
.ocard-row-q { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; }
.ocard-row-q > svg { color: #94A3B8; flex: none; margin-top: 2px; }
.acc-text { color: var(--acc); }
.qv-acts .ra-green { background: #DCFCE7; color: #15803D; } .qv-acts .ra-wa { background: #DCFCE7; color: #25D366; } .qv-acts .ra-blue { background: var(--accsoft); color: var(--acc); }
.info-round { background: var(--accsoft); color: var(--acc); } #confirm-pop h2 { font-size: 16px; line-height: 1.4; font-weight: 700; }
/* Coloured headers (same colours as the side panes) */
.modal-head.grad { background: linear-gradient(135deg, var(--acc), color-mix(in srgb, var(--acc) 55%, #7C3AED)); color: #fff; padding: 18px; margin-bottom: 14px; }
.modal-head.grad p { color: #fff; opacity: .85; }
.modal-head.grad .modal-icon { background: rgba(255, 255, 255, .2); color: #fff; border-radius: 99px; }
.modal-head.grad .modal-x { background: rgba(255, 255, 255, .16); color: #fff; border-radius: 10px; width: 36px; height: 36px; align-items: center; justify-content: center; }
.qv-head { background: linear-gradient(135deg, var(--acc), color-mix(in srgb, var(--acc) 55%, #7C3AED)); color: #fff; padding: 20px 18px 22px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.qv-head > div { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.qv-label { font-size: 12px; opacity: .85; }
.qv-num { font-size: 20px; font-weight: 800; }
.qv-pill { display: inline-flex; align-items: center; height: 26px; padding: 0 12px; border-radius: 99px; background: rgba(255, 255, 255, .22); font-size: 12px; font-weight: 700; margin-top: 4px; }
.qv-x { width: 36px; height: 36px; border-radius: 10px; border: none; background: rgba(255, 255, 255, .16); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.qv-acts { grid-template-columns: repeat(4, 1fr); }
.qv-acts .ra-orange { background: #FFEDD5; color: #C2410C; }

/* All orders toolbar, showing line, pager, filters */
.orders-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.orders-toolbar .search { flex: 1 1 260px; margin: 0; }
.orders-toolbar .btn { gap: 8px; background: var(--surf); }
.badge-acc { background: var(--acc); }
.menu-pop a.on { font-weight: 800; color: var(--acctext); }
.sort-menu a { display: flex !important; justify-content: space-between; align-items: center; gap: 12px; min-width: 200px; }
.sort-menu a.on { background: var(--accsoft); }
.sort-list a { display: flex; justify-content: space-between; align-items: center; min-height: 48px; border-top: 1px solid var(--border); color: var(--text); text-decoration: none; font-weight: 500; }
.sort-list a:first-child { border-top: none; }
.sort-list a.on { color: var(--acc); font-weight: 700; }
.fchips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fchips-title { font-size: 12px; font-weight: 700; color: var(--muted); margin-right: 2px; }
.fchip { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 5px 0 12px; border-radius: 99px; background: var(--accsoft); font-size: 12px; max-width: 100%; }
.fchip-l { color: var(--muted); } .fchip b { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.fchip a { width: 20px; height: 20px; border-radius: 99px; background: var(--surf); color: var(--muted); display: flex; align-items: center; justify-content: center; flex: none; }
.fclear { font-size: 12.5px; font-weight: 700; margin-left: 4px; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.pager b { color: var(--text); }
.pager-r { display: flex; gap: 8px; align-items: center; }
.pager-per { display: flex; align-items: center; gap: 8px; } .pager-per select, .pager-per-phone { height: 36px; width: auto; padding: 0 30px 0 10px; }
.btn.disabled { opacity: .45; pointer-events: none; }
.head-btn { gap: 8px; }
.ms { position: relative; }
.ms-btn { height: 46px; width: 100%; border: 1px solid var(--border); border-radius: 12px; background: var(--surf); color: var(--text); font: inherit; font-weight: 600; font-size: 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 14px; cursor: pointer; text-align: left; }
.ms-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms.open .ms-btn { border-color: var(--acc); box-shadow: 0 0 0 3px var(--accsoft); }
.ms-pop { border: 1px solid var(--border); border-radius: 12px; background: var(--surf); box-shadow: 0 14px 30px rgba(15, 23, 42, .14); padding: 6px; margin-top: 4px; display: flex; flex-direction: column; gap: 4px; }
.ms-pop[hidden] { display: none; }
.ms-pop .search { position: relative; } .ms-pop .search svg { position: absolute; left: 10px; top: 12px; color: var(--muted); } .ms-pop .search input { height: 38px; padding-left: 32px; width: 100%; }
.ms-list { max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; }
.ms-row { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 8px; border-radius: 9px; cursor: pointer; font-weight: 500; font-size: 13.5px; color: var(--text); }
.ms-row[hidden] { display: none; }
.ms-row:hover { background: var(--sunk); }
.ms-row input { width: 20px; height: 20px; accent-color: var(--acc); flex: none; }
.ms-row:has(input:checked) { font-weight: 700; }
.ms-foot { display: flex; justify-content: space-between; border-top: 1px solid var(--border); padding: 8px 6px 2px; }
.ms-foot button { border: none; background: none; font: inherit; font-weight: 700; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.ms-foot [data-ms-done] { color: var(--acc); }
@media (max-width: 860px) {
  .orders-head { flex-direction: row !important; align-items: flex-end !important; }
  .orders-head .actions { display: flex; gap: 8px; }
  .head-btn span { display: none; }
  .head-btn { width: 44px; padding: 0; }
  .phone-tools .fchips { margin-top: 2px; }
  .pager { flex-direction: column; align-items: stretch; background: var(--surf); border: 1px solid var(--border); border-radius: 16px; padding: 12px; }
  .pager-r .btn { flex: 1 1 0; }
}
@media (max-width: 860px) { .orders-head { flex-wrap: nowrap; } .orders-head > div:first-child { min-width: 0; flex: 1 1 auto; } .orders-head .actions { flex: none; } }

/* Manage statuses and tags */
.grip { border: none; background: none; color: var(--muted); cursor: grab; padding: 6px; touch-action: none; display: flex; }
.grip svg { stroke-width: 3.5; }
tr.dragging { background: var(--accsoft); box-shadow: 0 6px 18px rgba(15, 23, 42, .15); }
tr.row-off td { opacity: .6; }
.mini-switch { width: 42px; height: 24px; border-radius: 99px; border: none; background: #CBD3DF; position: relative; cursor: pointer; padding: 0; }
.mini-switch span { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 99px; background: #fff; transition: left .15s; }
.mini-switch.on { background: var(--acc); } .mini-switch.on span { left: 21px; }
.tag-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.tag-card { background: var(--surf); border: 1px solid var(--border); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.tag-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tag-kind { font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: var(--sunk); color: var(--muted); white-space: nowrap; }
.tag-kind.auto { background: var(--accsoft); color: var(--acctext); }
.tag-card p { margin: 0; font-size: 13px; color: var(--muted); min-height: 18px; flex: 1 1 auto; }
.tag-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px solid var(--border); padding-top: 10px; }
.tag-card-foot > a { color: var(--text); text-decoration: none; font-size: 13px; }
/* Period / sort menus: open from the left edge of their button and stay on screen */
.dropdown { position: relative; }
.phone-tools .dropdown .menu-pop, .dash-tools .dropdown .menu-pop, .orders-toolbar .dropdown .menu-pop { left: 0; right: auto; width: max(100%, 220px); max-width: calc(100vw - 28px); max-height: 60vh; overflow-y: auto; }
.menu-pop button[role=menuitem] { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 0 10px; border-radius: 10px; color: var(--text); font-weight: 600; background: none; border: none; font-family: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.menu-pop button[role=menuitem]:hover { background: var(--sunk); }
.prog { display: flex; flex-direction: column; gap: 5px; flex: 1 1 auto; }
.prog-bar { display: block; height: 6px; border-radius: 99px; background: var(--sunk); overflow: hidden; }
.prog-bar i { display: block; height: 100%; background: #F59E0B; border-radius: 99px; }
.prog small { font-size: 12.5px; color: var(--muted); } .prog small b { color: var(--text); }
.ra-amber { background: #FEF3C7; color: #B45309; }
.pthumb { width: 46px; height: 46px; border-radius: 12px; background: var(--accsoft); color: var(--acc); display: flex; align-items: center; justify-content: center; flex: none; object-fit: cover; }
.pthumb.sm { width: 40px; height: 40px; border-radius: 10px; }
.low-tag { display: inline-block; font-size: 11px; font-weight: 800; color: #B91C1C; background: #FEE2E2; border-radius: 99px; padding: 2px 8px; margin-left: 4px; }
.ra-violet { background: #EDE9FE; color: #6D28D9; }

/* Product overview */
.ov-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.ov-title { display: flex; gap: 14px; align-items: center; min-width: 0; }
.ov-title h1 { margin: 0; } .ov-title .sub { margin: 4px 0 0; color: var(--muted); }
.ov-pic { width: 56px; height: 56px; border-radius: 14px; background: var(--accsoft); color: var(--acc); font-weight: 800; font-size: 22px; display: flex; align-items: center; justify-content: center; flex: none; object-fit: cover; }
.ov-actions { display: flex; gap: 8px; } .ov-actions form { margin: 0; }
.ov-btn { width: 42px; height: 42px; border: none; cursor: pointer; }
.ov-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.ov-col { display: flex; flex-direction: column; gap: 18px; } .ov-col > .card { margin: 0; }
.ov-stats { display: flex; gap: 22px; flex-wrap: wrap; }
.ov-stats div { display: flex; flex-direction: column; gap: 2px; } .ov-stats span { font-size: 12px; color: var(--muted); } .ov-stats b { font-size: 20px; }
.ov-kv { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); color: var(--muted); }
.ov-kv b { color: var(--text); }
@media (max-width: 1000px) { .ov-grid { grid-template-columns: minmax(0, 1fr); } }
.menu-group { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 10px 10px 4px; border-top: 1px solid var(--border); margin-top: 4px; }
.menu-group:first-child { border-top: none; margin-top: 0; padding-top: 4px; }
.sort-list.grouped a { border-top: none; min-height: 42px; }
.pthumb.t-blue { background: var(--t-blue); color: var(--i-blue); } .pthumb.t-green { background: var(--t-green); color: var(--i-green); } .pthumb.t-violet { background: var(--t-violet); color: var(--i-violet); } .pthumb.t-amber { background: var(--t-amber); color: var(--i-amber); } .pthumb.t-red { background: var(--t-red); color: var(--i-red); } .pthumb.t-teal { background: var(--t-teal); color: var(--i-teal); } .pthumb.t-orange { background: var(--t-orange); color: var(--i-orange); } .pthumb.t-slate { background: var(--t-slate); color: var(--i-slate); }
.pthumb.t-blue, .pthumb.t-green, .pthumb.t-violet, .pthumb.t-amber, .pthumb.t-teal, .pthumb.t-orange, .pthumb.t-red, .pthumb.t-slate { font-weight: 800; font-size: 16px; }
.check-row { display: flex; gap: 24px; } .check-row label, .radio-col label { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; cursor: pointer; }
.check-row input, .radio-col input { width: 18px; height: 18px; accent-color: var(--acc); }
.radio-col { display: flex; flex-direction: column; gap: 10px; }

.cat-prod { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 0; border-top: 1px solid var(--line); color: var(--ink); font-weight: 600; text-decoration: none; }
.cat-prod:first-of-type { border-top: 0; }
.cat-prod:hover { color: var(--acc); }

/* Product guide (A · Guide sheet) */
.guide { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 18px; align-items: start; }
.g-list { padding: 14px; display: flex; flex-direction: column; gap: 10px; position: sticky; top: 84px; }
.g-search { display: flex; align-items: center; gap: 8px; height: 44px; border: 1px solid var(--border); border-radius: 12px; padding: 0 12px; color: var(--muted); }
.g-search input { border: 0; outline: 0; flex: 1; min-width: 0; height: 100%; background: transparent; font: inherit; color: var(--text); padding: 0; }
.g-list nav { display: flex; flex-direction: column; gap: 4px; }
.g-item { display: flex; gap: 12px; align-items: center; padding: 9px 10px; border-radius: 12px; border: 1px solid transparent; color: var(--text); text-decoration: none; }
.g-item:hover { background: var(--sunk); }
.g-item.on { background: color-mix(in srgb, var(--acc) 12%, var(--surf)); border-color: var(--acc); }
.g-item > span:not(.g-tile) { display: flex; flex-direction: column; min-width: 0; }
.g-item b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-item small, .g-pick-btn small { font-size: 12px; color: var(--muted); }
.g-tile { border-radius: 11px; object-fit: cover; flex: none; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; }
.g-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.g-main > .card h3 { margin: 0 0 12px; }
.g-main .card-head h3 { margin: 0; }
.g-card { display: flex; flex-direction: column; gap: 16px; }
.g-head { display: flex; gap: 16px; align-items: flex-start; }
.g-head .g-tile { font-size: 20px; border-radius: 14px; }
.g-title { flex: 1; min-width: 0; }
.g-title h2 { margin: 0; font-size: 22px; }
.g-title p { margin: 3px 0 0; color: var(--muted); font-size: 13.5px; }
.g-title small { display: block; margin-top: 6px; color: #94A3B8; font-size: 12px; }
.g-btns { display: flex; gap: 8px; flex: none; }
.g-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.g-facts > div { background: var(--sunk); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; }
.g-facts small { font-size: 12px; color: var(--muted); }
.g-facts b { font-size: 14px; line-height: 1.35; }
.g-deliv { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: color-mix(in srgb, var(--acc) 12%, var(--surf)); border-radius: 12px; padding: 10px 14px; font-size: 13.5px; }
.g-deliv svg { color: var(--acc); }
.g-sell { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; }
.g-label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 10px; }
.g-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.g-bun { border: 1px solid var(--border); border-radius: 12px; padding: 9px 14px; display: flex; flex-direction: column; }
.g-bun b { font-size: 13.5px; } .g-bun small { font-size: 12px; color: var(--muted); }
.g-bun strong { font-size: 15px; color: var(--acc); margin-top: 2px; }
.g-stock { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 99px; font-weight: 700; font-size: 13px; background: #DCFCE7; color: #15803D; }
.g-stock i { width: 8px; height: 8px; border-radius: 99px; background: currentColor; }
.g-stock.low { background: #FEE2E2; color: #B91C1C; }
.g-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.g-steps li { display: flex; gap: 12px; align-items: flex-start; line-height: 1.5; padding-top: 4px; }
.g-steps li span, .g-num { width: 28px; height: 28px; margin-top: -4px; border-radius: 99px; background: color-mix(in srgb, var(--acc) 12%, var(--surf)); color: var(--acc); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; flex: none; }
.g-num { margin-top: 0; align-self: center; }
.g-media { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.g-media figure { margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.g-thumb { position: relative; display: block; height: 120px; border-radius: 12px; overflow: hidden; background: #334155; }
.g-thumb.sm { height: 64px; width: 96px; flex: none; }
.g-thumb img, .g-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.g-play { position: absolute; inset: 0; margin: auto; width: 40px; height: 40px; border-radius: 99px; background: rgba(15,23,42,.6); color: #fff; display: flex; align-items: center; justify-content: center; }
.g-thumb.sm .g-play { width: 28px; height: 28px; }
.g-media figcaption { display: flex; align-items: center; gap: 6px; }
.g-media figcaption span { flex: 1; min-width: 0; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-ib { width: 32px; height: 32px; border-radius: 9px; background: var(--sunk); color: var(--text); border: 0; display: inline-flex; align-items: center; justify-content: center; flex: none; cursor: pointer; }
.g-ib.wa { background: #DCFCE7; color: #16A34A; }
.g-faq { border: 1px solid var(--border); border-radius: 12px; padding: 13px 14px; margin-top: 8px; }
.g-faq[open] { background: var(--sunk); }
.g-faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; font-weight: 700; }
.g-faq summary::-webkit-details-marker { display: none; }
.g-faq summary span::after { content: '+'; color: var(--muted); font-weight: 700; }
.g-faq[open] summary span::after { content: '−'; }
.g-ans { margin-top: 8px; font-size: 13.5px; line-height: 1.55; white-space: pre-line; }
.g-acts { display: flex; gap: 16px; margin-top: 10px; flex-wrap: wrap; }
.g-acts button { border: 0; background: none; padding: 0; display: inline-flex; gap: 5px; align-items: center; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--acc); cursor: pointer; }
.g-acts button.wa { color: #15803D; }
.g-edit { display: flex; flex-direction: column; gap: 12px; }
.g-edit h2 { margin: 0; }
.g-rows { display: flex; flex-direction: column; gap: 8px; }
.g-row2 { display: grid; grid-template-columns: 200px 1fr 44px; gap: 8px; align-items: center; }
.g-row1 { display: grid; grid-template-columns: 28px 1fr 44px; gap: 8px; align-items: center; }
.g-x { width: 44px; height: 44px; border: none; }
.g-media-edit { display: flex; flex-direction: column; gap: 8px; }
.g-medit { display: flex; gap: 10px; align-items: center; }
.g-medit input[type=text], .g-medit input:not([type]) { flex: 1; min-width: 0; }
.g-pick { margin: 0; }
.g-pick-btn { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; text-align: left; font: inherit; color: var(--text); cursor: pointer; }
.g-pick-btn > span:not(.g-tile) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.g-pick .menu-pop { left: 0; right: 0; max-height: 60vh; overflow: auto; }
@media (max-width: 1100px) { .g-media { grid-template-columns: repeat(2, 1fr); } .g-sell { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .guide { grid-template-columns: 1fr; }
  .g-head { flex-wrap: wrap; }
  .g-head .g-tile { display: none; }
  .g-btns { width: 100%; }
  .g-facts { grid-template-columns: 1fr 1fr; }
  .g-media { grid-template-columns: 1fr 1fr; }
  .g-thumb { height: 100px; }
  .g-row2 { grid-template-columns: 1fr 44px; }
  .g-row2 > input:nth-child(2) { grid-column: 1; }
  .g-row2 > .g-x { grid-row: 1 / span 2; grid-column: 2; }
}
.g-pick-btn.card { flex-direction: row; align-items: center; text-align: left; }
.g-main .card-head { flex-wrap: nowrap; align-items: center; }
.g-main .card-head h3 { flex: 1; min-width: 0; }

.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); z-index: 90; background: #0F172A; color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; font-size: 14px; box-shadow: 0 10px 30px rgba(15,23,42,.3); }
.menu-dates { display: flex; gap: 6px; align-items: flex-end; padding: 0 6px 6px; }
.menu-dates label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); flex: 1 1 0; }
.menu-dates input { height: 40px; padding: 0 8px; min-width: 0; }

/* Order form builder */
.fb { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 22px; align-items: start; }
.fb-left { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.fb-sec { background: var(--surf); border: 1px solid var(--border); border-radius: 16px; }
.fb-sec > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; }
.fb-sec > summary::-webkit-details-marker { display: none; }
.fb-sec > summary > span { display: flex; flex-direction: column; gap: 2px; }
.fb-sec > summary b { font-size: 15px; }
.fb-sec > summary small { font-size: 12px; color: var(--muted); }
.fb-sec > summary i::after { content: '+'; font-style: normal; font-size: 20px; color: var(--muted); }
.fb-sec[open] > summary i::after { content: '−'; }
.fb-body { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.fb-lbl { font-size: 12.5px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.fb-sub { display: flex; flex-direction: column; gap: 2px; }
.fb-sub small { font-size: 12px; color: var(--muted); }
.fb-rows { display: flex; flex-direction: column; gap: 10px; }
.fb-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fb-fields { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.fb-field { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 6px; border: 1px solid var(--border); border-radius: 12px; background: var(--surf); }
.fb-field.dragging { opacity: .7; box-shadow: 0 8px 22px rgba(15,23,42,.18); }
.fb-field[data-custom] { background: var(--sunk); }
.fb-field .grip { border: 0; background: none; color: var(--muted); cursor: grab; padding: 4px; display: flex; touch-action: none; }
.fb-fl { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.fb-fl small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fb-lab { border: 0 !important; background: transparent !important; padding: 0 !important; height: auto !important; font-weight: 700; font-size: 14px; color: var(--text); width: 100%; outline: none; box-shadow: none !important; }
.fb-lab:focus { text-decoration: underline; text-decoration-color: var(--acc); }
.fb-req { cursor: pointer; flex: none; }
.fb-req input { position: absolute; opacity: 0; width: 0; height: 0; }
.fb-req span { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--sunk); color: var(--muted); border: 1px solid var(--border); }
.fb-req span::after { content: 'Optional'; }
.fb-req input:checked + span { background: color-mix(in srgb, var(--acc) 12%, var(--surf)); color: var(--acc); border-color: color-mix(in srgb, var(--acc) 35%, var(--surf)); }
.fb-req input:checked + span::after { content: 'Required'; }
.fb-req input:disabled + span { opacity: .75; }
.fb-req input:focus-visible + span { outline: 2px solid var(--acc); outline-offset: 2px; }
.fb-x { width: 28px; height: 28px; border-radius: 8px; border: 0; background: var(--t-red); color: var(--i-red); display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.fb-add { border: 1px dashed var(--border); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.fb-add-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.fb-bundles { display: flex; flex-direction: column; gap: 6px; }
.fb-bun { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; font-weight: 600; }
.fb-bun input { width: 18px; height: 18px; accent-color: var(--acc); }
.fb-bun span { flex: 1; }
.fb-bun b { color: var(--muted); font-weight: 600; font-size: 13px; }
.fb-bump { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; }
.fb-wide { grid-column: 1 / -1; }
.fb-pay { border: 1px solid var(--border); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.fb-pay-top { display: flex; align-items: center; gap: 10px; }
.fb-bank { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fb-email { display: grid; grid-template-columns: 1fr 44px; gap: 8px; }
.fb-save { display: flex; justify-content: flex-end; gap: 10px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--sunk); border-radius: 12px; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; width: 0; height: 0; }
.seg span { display: inline-flex; align-items: center; height: 34px; padding: 0 12px; border-radius: 9px; font-size: 13px; font-weight: 700; color: var(--text); }
.seg input:checked + span { background: var(--acc); color: var(--onacc); }
.seg input:focus-visible + span { outline: 2px solid var(--acc); outline-offset: 2px; }
.fb-swatches { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.fb-swatches label { cursor: pointer; display: flex; }
.fb-swatches input[type=radio] { position: absolute; opacity: 0; width: 0; height: 0; }
.fb-swatches span { width: 32px; height: 32px; border-radius: 99px; box-shadow: 0 0 0 3px var(--surf), 0 0 0 5px transparent; }
.fb-swatches input:checked + span, .fb-own input[type=radio]:checked + input { box-shadow: 0 0 0 3px var(--surf), 0 0 0 5px var(--text); }
.fb-own input[type=color] { width: 32px; height: 32px; padding: 0; border: 1px dashed var(--muted); border-radius: 99px; background: none; cursor: pointer; }
.fb-right { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 10px; }
.fb-prev-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.fb-prev-head small { color: var(--muted); font-size: 12px; }
.fb-phone { border: 10px solid #0F172A; border-radius: 34px; overflow: hidden; background: #0F172A; box-shadow: 0 18px 40px rgba(15,23,42,.18); }
.fb-screen { height: min(720px, calc(100vh - 170px)); overflow-y: auto; color: #0F172A; border-radius: 24px; font-size: 13px; }
.pv-banner { height: 120px; background: linear-gradient(135deg, #334155, #0F172A) center / cover; color: #fff; font-weight: 800; font-size: 16px; display: flex; align-items: flex-end; padding: 12px 14px; }
.pv-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.pv-h { font-weight: 800; font-size: 15px; text-align: center; margin-bottom: 4px; }
.pv-l { font-size: 11.5px; font-weight: 700; color: #334155; margin-top: 2px; }
.pv-in { height: 38px; display: flex; align-items: center; justify-content: space-between; padding: 0 10px; color: #94A3B8; font-size: 12px; }
.pv-in i { font-style: normal; }
.pv-opt { display: flex; align-items: center; gap: 8px; padding: 10px; border: 2px solid #E1E6EE; font-weight: 700; font-size: 12.5px; }
.pv-opt b { margin-left: auto; }
.pv-opt em { margin-left: auto; font-style: normal; font-size: 11px; color: #15803D; background: #DCFCE7; border-radius: 99px; padding: 2px 8px; }
.pv-dot { width: 14px; height: 14px; border-radius: 99px; border: 2px solid; flex: none; }
.pv-radio { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.pv-radio span { width: 14px; height: 14px; border-radius: 99px; border: 1.5px solid #94A3B8; }
.pv-bump { display: flex; gap: 8px; align-items: flex-start; padding: 10px; border: 2px dashed #16A34A; background: #F0FDF4; font-size: 12px; }
.pv-bump b { margin-left: auto; white-space: nowrap; }
.pv-box { width: 14px; height: 14px; border: 1.5px solid #16A34A; border-radius: 4px; flex: none; margin-top: 1px; }
.pv-btn { color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; margin-top: 6px; }
.pv-note { text-align: center; font-size: 11px; color: #64748B; }
@media (max-width: 1100px) { .fb { grid-template-columns: 1fr; } .fb-right { position: static; max-width: 400px; margin: 0 auto; width: 100%; } }
@media (max-width: 700px) { .fb-two, .fb-bank, .fb-bump { grid-template-columns: 1fr; } .page-head .actions { flex-wrap: wrap; } }

/* Customers */
.good-text { color: var(--i-green); } .bad-text { color: var(--bad); }
.cq-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.cq-tags .pill { height: 22px; font-size: 10.5px; }
.cq-ava { width: 48px; height: 48px; border-radius: 99px; background: color-mix(in srgb, var(--acc) 14%, var(--surf)); color: var(--acc); display: flex; align-items: center; justify-content: center; font-weight: 800; flex: none; }
.cq-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cq-stats > div { background: var(--surf); border: 1px solid var(--border); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.cq-stats small { font-size: 11.5px; color: var(--muted); } .cq-stats b { font-size: 16px; }
.cq-order { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); color: var(--text); text-decoration: none; }
.cq-order:first-of-type { border-top: 0; }
.cq-order > span:first-child { display: flex; flex-direction: column; min-width: 0; }
.cq-order b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cq-order small { font-size: 11.5px; color: var(--muted); }
.cq-order .pill { flex: none; }
.cell-title.link-btn { padding: 0; font: inherit; font-weight: 700; color: var(--text); text-align: left; }
.cell-title.link-btn:hover { color: var(--acc); }
.bl-found { background: var(--t-amber); color: var(--i-amber); border-radius: 10px; padding: 10px 12px; font-size: 13px; font-weight: 600; }
.radio-col { display: flex; flex-direction: column; gap: 4px; }

.rate-bar { height: 6px; border-radius: 99px; background: var(--sunk); overflow: hidden; margin-bottom: 4px; max-width: 110px; }
.rate-bar span { display: block; height: 100%; border-radius: 99px; background: var(--i-green); }
.rate-bar span.mid { background: var(--i-amber); } .rate-bar span.low { background: var(--bad); }
/* Agent coverage */
.cov { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 18px; align-items: start; }
.cov-list { padding: 14px; display: flex; flex-direction: column; gap: 10px; position: sticky; top: 84px; max-height: calc(100vh - 110px); overflow: auto; }
.cov-states { display: flex; flex-direction: column; gap: 6px; }
.cov-st { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; color: var(--text); text-decoration: none; }
.cov-st:hover { background: var(--sunk); }
.cov-st.on { border-color: var(--acc); background: color-mix(in srgb, var(--acc) 10%, var(--surf)); }
.cov-st > span:first-child { display: flex; flex-direction: column; min-width: 0; }
.cov-st small { font-size: 12px; color: var(--muted); }
.cov-st .pill { flex: none; }
.cov-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.cov-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.cov-stats > div { background: var(--sunk); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.cov-stats small { font-size: 12px; color: var(--muted); } .cov-stats b { font-size: 20px; }
.cov-gap { display: inline-flex; gap: 6px; align-items: center; background: var(--sunk); border-radius: 99px; padding: 6px 12px; font-size: 13px; font-weight: 700; }
.cov-gap b { font-weight: 500; color: var(--muted); }
.town-box { border: 1px solid var(--border); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.town-box input { border: 0 !important; height: 34px !important; padding: 0 4px !important; box-shadow: none !important; }
.town-chip { gap: 4px; }
.town-chip button { border: 0; background: none; color: inherit; font-size: 15px; cursor: pointer; padding: 0 0 0 2px; line-height: 1; }
@media (max-width: 900px) { .cov { grid-template-columns: 1fr; } .cov-list { position: static; max-height: none; } .cov-stats { grid-template-columns: 1fr 1fr; } }
.cov-list > * { flex: none; }
/* Agent scorecard */
.rate-bar.target { position: relative; overflow: visible; }
.rate-bar.target span { border-radius: 99px; }
.rate-bar.target i { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text); opacity: .5; }
.sc-row { cursor: pointer; }
.sc-row.on td { background: color-mix(in srgb, var(--acc) 8%, var(--surf)); }
.sc-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; scroll-margin-top: 90px; }
.sc-std { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.sc-std li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--border); }
.sc-std li:first-child { border-top: 0; }
.sc-std li > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.sc-std small { font-size: 12px; color: var(--muted); }
.sc-mark { width: 26px; height: 26px; border-radius: 99px; display: flex; align-items: center; justify-content: center; flex: none; }
.sc-mark.ok { background: var(--t-green); color: var(--i-green); } .sc-mark.no { background: var(--t-red); color: var(--bad); }
.sc-links { display: flex; gap: 8px; flex-wrap: wrap; }
.sc-chart { position: relative; height: 150px; display: grid; grid-template-columns: repeat(14, 1fr); gap: 6px; align-items: end; border-bottom: 1px solid var(--border); }
.sc-bar { height: 100%; display: flex; align-items: flex-end; }
.sc-bar span { width: 100%; border-radius: 6px 6px 0 0; background: var(--i-green); min-height: 3px; }
.sc-bar span.low { background: var(--i-amber); } .sc-bar span.none { background: var(--border); }
.sc-target { position: absolute; left: 0; right: 0; border-top: 2px dashed var(--muted); opacity: .6; pointer-events: none; }
.sc-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
@media (max-width: 1000px) { .sc-detail { grid-template-columns: 1fr; } }
/* Inventory 1.17 */
.tr-lines { display: grid; gap: 8px; }
.tr-line { display: grid; grid-template-columns: 1fr 84px 36px; gap: 8px; align-items: center; }
.tr-line select, .tr-line input { height: 42px; min-width: 0; }
.st-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); margin: 4px 0 10px; }
.st-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.st-low { color: var(--bad); font-weight: 800; }
.st-cell small { display: block; color: var(--muted); font-size: 11px; font-weight: 500; }
.mv-list { list-style: none; margin: 0; padding: 0; display: grid; }
.mv-list li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); }
.mv-list li:first-child { border-top: 0; }
.mv-list .mv-t { min-width: 0; } .mv-list .mv-t b { display: block; font-size: 13px; } .mv-list .mv-t small { color: var(--muted); font-size: 12px; }
.mv-q { font-weight: 800; } .mv-q.in { color: var(--good); } .mv-q.out { color: var(--bad); }
.card-head-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.card-head-row h2 { margin: 0; font-size: 16px; }
.tr-kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 13px; }
.tr-kv dt { color: var(--muted); } .tr-kv dd { margin: 0; font-weight: 600; }
.st-grid th:first-child, .st-grid td:first-child { position: sticky; left: 0; z-index: 1; }
.st-grid th:last-child, .st-grid td:last-child { position: sticky; right: 0; z-index: 1; box-shadow: -8px 0 12px -10px rgba(0,0,0,.25); }
.st-grid td:first-child, .st-grid td:last-child { background: var(--surf); }
/* Remittance 1.18 */
.pay-orders { display: grid; gap: 6px; max-height: 320px; overflow: auto; }
.pay-order { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
.pay-order small { display: block; color: var(--muted); font-size: 12px; }
.pay-order:has(input:checked) { border-color: var(--acc); background: color-mix(in srgb, var(--acc) 6%, transparent); }
.seg.seg-col { display: grid; grid-template-columns: 1fr 1fr; }
/* Staff 1.19 */
.av-dot { position: relative; }
.av-dot > i { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 99px; background: #94A3B8; border: 2px solid var(--surf); }
.av-dot > i.on { background: #16A34A; }
.up-table th, .up-table td { padding: 8px 6px; font-size: 13px; }
.up-table td:nth-child(2), .up-table td:nth-child(3), .up-table th:nth-child(2), .up-table th:nth-child(3) { text-align: center; }
.up-table input[type=checkbox] { width: 20px; height: 20px; }
.up-table input:disabled { opacity: .4; }
.perm-grid { width: 100%; border-collapse: collapse; }
.perm-grid th { font-size: 12px; color: var(--muted); font-weight: 600; text-align: center; padding: 8px 6px; }
.perm-grid th:first-child { text-align: left; }
.perm-grid td { border-top: 1px solid var(--border); padding: 10px 6px; text-align: center; }
.perm-grid td:first-child { text-align: left; }
.perm-grid td:first-child small { display: block; color: var(--muted); font-size: 12px; }
.perm-grid input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--acc); }
.perm-grid .grp td { background: var(--sunk); font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.role-list .tab-link small { display: block; color: var(--muted); font-size: 12px; font-weight: 500; }
.pane.pane-wide { width: min(640px, 100vw); max-width: 640px; }
.sw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 16px; }
/* Scorecard 1.20 */
.rank { display: inline-flex; width: 28px; height: 28px; border-radius: 99px; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; background: var(--sunk); color: var(--muted); flex: none; }
.rank.top { background: var(--accsoft); color: var(--acctext); }
.click-row { cursor: pointer; } .click-row:hover td { background: var(--sunk); }
.chk { display: flex; gap: 12px; align-items: center; min-height: 50px; border-top: 1px solid var(--border); }
.chk > span:last-child { display: flex; flex-direction: column; gap: 2px; } .chk small { color: var(--muted); font-size: 12px; }
.chk-i { width: 28px; height: 28px; flex: none; border-radius: 99px; display: flex; align-items: center; justify-content: center; }
.chk-pass { background: var(--t-green); color: var(--i-green); } .chk-fail { background: var(--t-red); color: var(--i-red); }
.chk-wait { background: var(--t-amber); color: var(--i-amber); } .chk-info { background: var(--sunk); color: var(--muted); }
.trend { position: relative; display: flex; align-items: flex-end; gap: 5px; height: 150px; margin: 6px 0; }
.trend-bar { flex: 1 1 0; border-radius: 5px 5px 0 0; }
.trend-target { position: absolute; left: 0; right: 0; border-top: 2px dashed var(--muted); }
.rule-card { border: 1px solid var(--border); border-radius: 12px; padding: 10px; display: grid; gap: 8px; margin-top: 8px; background: var(--surf); }
.rule-top { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; } .rule-top input { height: 40px; }
.rule-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; } .rule-fields .field { margin: 0; }
.rule-fields [hidden] { display: none; }
/* Ads 1.21 */
.good-text { color: var(--good); } .warn-text { color: var(--warn); }
.ads-pick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 10px; }
.pick-dd { position: relative; } .pick-dd > summary { list-style: none; height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--surf); font-weight: 600; font-size: 13px; display: flex; align-items: center; cursor: pointer; }
.pick-dd > summary::-webkit-details-marker { display: none; }
.pick-pop { position: absolute; z-index: 30; top: 44px; left: 0; width: 300px; max-height: 360px; overflow: auto; background: var(--surf); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: 12px; display: grid; gap: 6px; }
.pick-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; font-size: 13px; }
.ads-table td, .ads-table th { white-space: nowrap; } .ads-table td:first-child { white-space: normal; min-width: 200px; }
.ads-table tr.lvl-2 td:first-child { padding-left: 30px; } .ads-table tr.lvl-3 td:first-child { padding-left: 54px; }
.ads-table tr.lvl-2 td, .ads-table tr.lvl-3 td { background: var(--sunk); font-size: 13px; }
.ads-table tfoot td { border-top: 2px solid var(--border); font-weight: 600; background: var(--sunk); }
.caret { border: 0; background: none; cursor: pointer; font-size: 14px; width: 22px; color: var(--muted); padding: 0; }
.muted-row td { color: var(--muted); }
.drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 12px; border: 2px dashed var(--border); border-radius: 14px; text-align: center; cursor: pointer; color: var(--muted); margin-bottom: 10px; }
.drop.on, .drop:hover { border-color: var(--acc); color: var(--acctext); }
.drop input[type=file] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.drop b { color: var(--text); font-size: 14px; }
/* Funding 1.22 */
.fund-accts { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.fund-acct { display: flex; flex-direction: column; gap: 4px; }
.fund-bal { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.fund-bar { height: 8px; border-radius: 99px; background: var(--sunk); overflow: hidden; margin: 6px 0 2px; } .fund-bar i { display: block; height: 100%; border-radius: 99px; }
.fund-lines { display: grid; gap: 8px; }
.fund-line { display: grid; grid-template-columns: 1fr 130px; gap: 10px; align-items: center; } .fund-line small { display: block; color: var(--muted); font-size: 12px; } .fund-line input { height: 42px; }
/* Media buyer analysis */
.mb-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.mb-card { display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: 18px; background: var(--surf); border: 2px solid var(--border); color: var(--text); text-decoration: none; }
.mb-card:hover { border-color: var(--mid, var(--border)); }
.mb-card.on { border-color: var(--acc); }
.mb-who { display: flex; align-items: center; gap: 12px; } .mb-who > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.mb-ini { width: 44px; height: 44px; border-radius: 99px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; flex: none; }
.mb-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.mb-stats > span { display: flex; flex-direction: column; gap: 2px; } .mb-stats > span > span { font-size: 12px; color: var(--muted); } .mb-stats b small { font-weight: 600; }
.mb-two { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; align-items: start; }
.mb-split { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; } .mb-split > div:first-child { display: flex; justify-content: space-between; gap: 8px; }
@media (max-width: 1100px) { .mb-two { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .mb-stats { grid-template-columns: repeat(2, 1fr); } }
/* ---------- Live chat (WhatsApp-style) ---------- */
:root, [data-theme="light"] { --lc-head: #F0F2F5; --lc-bg: #EFEAE2; --lc-out: #D9FDD3; --lc-in: #FFFFFF; --lc-green: #00A884; --lc-dark: #008069; --lc-meta: #667781; --lc-day: #FFFFFF; --lc-sel: #F0F2F5; --lc-dot: rgba(0,0,0,.035); }
[data-theme="dark"] { --lc-head: #202C33; --lc-bg: #0B141A; --lc-out: #005C4B; --lc-in: #202C33; --lc-green: #00A884; --lc-dark: #00A884; --lc-meta: #8696A0; --lc-day: #182229; --lc-sel: #2A3942; --lc-dot: rgba(255,255,255,.025); }
.lc-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.lc-stat { display: flex; flex-direction: column; gap: 1px; padding: 10px 14px; border-radius: 14px; background: var(--surf); border: 1px solid var(--border); min-width: 0; }
.lc-stat span { font-size: 12px; color: var(--muted); font-weight: 600; } .lc-stat b { font-size: 20px; line-height: 1.2; } .lc-stat small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-stat .tone-bad { color: var(--bad); } .lc-stat .tone-good { color: var(--good); }
.lc { position: relative; display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); height: calc(100vh - 250px); min-height: 540px; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: var(--surf); }
.lc.info-open { grid-template-columns: minmax(280px, 380px) minmax(0, 1fr) 320px; }
.lc-side { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--border); background: var(--surf); }
.lc-side-head { padding: 10px 12px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--border); }
.lc-search { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 10px; background: var(--lc-head); color: var(--lc-meta); }
.lc-search input { flex: 1 1 auto; border: 0; background: transparent; height: 36px; padding: 0; color: var(--text); font: inherit; font-size: 14px; outline: none; min-width: 0; }
.lc-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.lc-tabs button { height: 32px; padding: 0 12px; border-radius: 99px; border: 0; background: var(--lc-head); color: var(--lc-meta); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.lc-tabs button.on { background: #D9FDD3; color: #008069; } [data-theme="dark"] .lc-tabs button.on { background: #0A332C; color: #00A884; }
.lc-list { flex: 1 1 auto; overflow-y: auto; }
.lc-row { display: flex; gap: 12px; align-items: center; width: 100%; padding: 10px 14px; border: 0; background: transparent; text-align: left; font: inherit; color: var(--text); cursor: pointer; }
.lc-row:hover { background: var(--lc-sel); } .lc-row.on { background: var(--lc-sel); } .lc-row.done { opacity: .65; }
.lc-row-b { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding-bottom: 10px; margin-bottom: -10px; border-bottom: 1px solid var(--border); }
.lc-row-1, .lc-row-2 { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.lc-row-1 b { font-size: 15.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-time { font-size: 12px; color: var(--lc-meta); white-space: nowrap; } .lc-time.new { color: var(--lc-green); font-weight: 700; } .lc-time.warn { color: #D97706; font-weight: 700; } .lc-time.bad { color: var(--bad); font-weight: 700; }
.lc-last { font-size: 14px; color: var(--lc-meta); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 3px; min-width: 0; }
.lc-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--lc-green); color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.lc-row-3 { font-size: 12px; color: var(--lc-meta); opacity: .85; }
.lc-av { width: 46px; height: 46px; flex: none; border-radius: 99px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; background: var(--t-blue); color: var(--i-blue); }
.lc-av.t-blue { background: var(--t-blue); color: var(--i-blue); } .lc-av.t-green { background: var(--t-green); color: var(--i-green); } .lc-av.t-violet { background: var(--t-violet); color: var(--i-violet); }
.lc-av.t-amber { background: var(--t-amber); color: var(--i-amber); } .lc-av.t-teal { background: var(--t-teal); color: var(--i-teal); } .lc-av.t-red { background: var(--t-red); color: var(--i-red); }
.lc-av-lg { width: 96px; height: 96px; font-size: 32px; }
.lc-none { padding: 30px 18px; text-align: center; color: var(--lc-meta); font-size: 14px; }
.lc-main { position: relative; display: flex; flex-direction: column; min-height: 0; min-width: 0; background-color: var(--lc-bg);
  background-image: radial-gradient(var(--lc-dot) 1.2px, transparent 1.3px), radial-gradient(var(--lc-dot) 1.2px, transparent 1.3px); background-size: 22px 22px; background-position: 0 0, 11px 11px; }
.lc-blank { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; background: var(--lc-head); border-bottom: 6px solid var(--lc-green); }
.lc-blank-in { text-align: center; color: var(--lc-meta); display: flex; flex-direction: column; align-items: center; gap: 6px; max-width: 360px; padding: 20px; } .lc-blank-in h2 { margin: 6px 0 0; color: var(--text); font-weight: 400; font-size: 26px; } .lc-blank-in svg { color: var(--lc-green); }
.lc-open { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
.lc-open[hidden], .lc-blank[hidden] { display: none; }
.lc-top { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: var(--lc-head); border-bottom: 1px solid var(--border); min-height: 60px; }
.lc-who { flex: 1 1 auto; display: flex; align-items: center; gap: 12px; border: 0; background: transparent; font: inherit; color: var(--text); text-align: left; cursor: pointer; min-width: 0; padding: 0; }
.lc-who .lc-av { width: 40px; height: 40px; font-size: 14px; }
.lc-who-t { display: flex; flex-direction: column; min-width: 0; } .lc-who-t b { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .lc-who-t small { font-size: 13px; color: var(--lc-meta); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-acts { display: flex; align-items: center; gap: 2px; }
.lc-ibtn { width: 40px; height: 40px; border-radius: 99px; border: 0; background: transparent; color: var(--lc-meta); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: 21px; flex: none; text-decoration: none; }
.lc-ibtn:hover { background: rgba(0,0,0,.06); } [data-theme="dark"] .lc-ibtn:hover { background: rgba(255,255,255,.08); }
.lc-back { display: none; }
.lc-pop-wrap { position: relative; }
.lc-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 220px; max-height: 340px; overflow-y: auto; background: var(--surf); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 6px; display: flex; flex-direction: column; }
.lc-pop[hidden] { display: none; }
.lc-pop button, .lc-pop a { text-align: left; padding: 10px 12px; border: 0; background: transparent; border-radius: 8px; font: inherit; font-size: 14px; color: var(--text); cursor: pointer; text-decoration: none; }
.lc-pop button:hover { background: var(--lc-sel); } .lc-pop button.on { color: var(--lc-dark); font-weight: 700; }
.lc-pop-h { padding: 8px 12px 6px; font-size: 12px; font-weight: 700; color: var(--lc-meta); text-transform: uppercase; letter-spacing: .03em; display: flex; justify-content: space-between; gap: 8px; } .lc-pop-h small { text-transform: none; font-weight: 600; color: #D97706; letter-spacing: 0; }
.lc-pop-up { top: auto; bottom: calc(100% + 8px); left: 0; right: auto; }
.lc-emoji { display: grid; grid-template-columns: repeat(8, 36px); gap: 2px; min-width: 0; } .lc-emoji button { font-size: 22px; padding: 4px; text-align: center; }
.lc-clip-i { display: flex !important; align-items: center; gap: 10px; cursor: pointer; padding: 10px 12px; border-radius: 8px; font-size: 14px; } .lc-clip-i:hover { background: var(--lc-sel); }
.lc-sheet { left: 12px; right: 12px; top: auto; bottom: calc(100% + 4px); max-height: 50vh; }
.lc-sheet button { display: flex; flex-direction: column; gap: 3px; border-bottom: 1px solid var(--border); border-radius: 0; } .lc-sheet button span { color: var(--lc-meta); font-size: 13px; white-space: pre-line; } .lc-sheet button:disabled { opacity: .45; cursor: not-allowed; }
.lc-strip { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 16px; background: var(--surf); border-bottom: 1px solid var(--border); font-size: 13px; }
.lc-strip[hidden] { display: none; } .lc-strip-r { display: flex; align-items: center; gap: 10px; } .lc-strip a { font-weight: 700; }
.lc-msgs { flex: 1 1 auto; overflow-y: auto; padding: 14px 6% 10px; display: flex; flex-direction: column; gap: 2px; }
.lc-day { display: flex; justify-content: center; margin: 10px 0 8px; } .lc-day span { background: var(--lc-day); color: var(--lc-meta); font-size: 12.5px; padding: 5px 12px; border-radius: 8px; box-shadow: 0 1px .5px rgba(0,0,0,.13); }
.lc-msg { display: flex; flex-direction: column; margin-top: 4px; } .lc-msg.out { align-items: flex-end; } .lc-msg.in { align-items: flex-start; }
.lc-bub { position: relative; max-width: min(65%, 560px); padding: 6px 8px 8px 9px; border-radius: 8px; font-size: 14.5px; line-height: 1.4; color: var(--text); box-shadow: 0 1px .5px rgba(0,0,0,.13); display: flex; flex-direction: column; gap: 3px; word-wrap: break-word; overflow-wrap: anywhere; }
.lc-msg.out .lc-bub { background: var(--lc-out); border-top-right-radius: 0; } .lc-msg.in .lc-bub { background: var(--lc-in); border-top-left-radius: 0; }
.lc-msg.out .lc-bub::after { content: ''; position: absolute; top: 0; right: -8px; border-width: 0 0 10px 8px; border-style: solid; border-color: transparent transparent transparent var(--lc-out); }
.lc-msg.in .lc-bub::after { content: ''; position: absolute; top: 0; left: -8px; border-width: 0 8px 10px 0; border-style: solid; border-color: transparent var(--lc-in) transparent transparent; }
.lc-txt { white-space: pre-wrap; } .lc-txt a { color: #027EB5; }
.lc-tpl { font-size: 11.5px; font-weight: 700; color: var(--lc-dark); }
.lc-meta { align-self: flex-end; display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--lc-meta); margin-top: -2px; white-space: nowrap; }
.lc-by { margin-right: 4px; font-style: italic; }
.lc-tk { display: inline-flex; } .tk { color: var(--lc-meta); } .tk-read { color: #53BDEB; } .tk-bad { color: var(--bad); }
.lc-err { font-size: 12px; color: var(--bad); margin-top: 3px; max-width: 65%; text-align: right; }
.lc-img img { display: block; max-width: 300px; max-height: 320px; width: 100%; border-radius: 6px; object-fit: cover; }
.lc-bub audio { width: 260px; max-width: 100%; height: 40px; } .lc-bub video { max-width: 300px; border-radius: 6px; }
.lc-doc { display: block; padding: 10px; border-radius: 6px; background: rgba(0,0,0,.05); font-weight: 600; text-decoration: none; color: var(--text); }
.lc-compose { position: relative; background: var(--lc-head); padding: 8px 12px; display: flex; flex-direction: column; gap: 6px; }
.lc-bar { display: flex; align-items: flex-end; gap: 4px; } .lc-bar[hidden] { display: none; }
.lc-bar textarea { flex: 1 1 auto; min-height: 42px; max-height: 140px; resize: none; border: 0; border-radius: 10px; padding: 11px 14px; background: var(--surf); color: var(--text); font: inherit; font-size: 15px; line-height: 1.35; outline: none; }
.lc-send { width: 44px; height: 44px; flex: none; border-radius: 99px; border: 0; background: var(--lc-green); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; } .lc-send:disabled { opacity: .5; }
.lc-closed { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: #B45309; font-weight: 600; padding: 4px 2px; } .lc-closed[hidden] { display: none; } .lc-closed span { flex: 1 1 220px; }
.lc-file { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 12px; border-radius: 10px; background: var(--surf); font-size: 13px; font-weight: 600; } .lc-file[hidden] { display: none; }
.lc-info { display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--border); background: var(--surf); }
.lc-info[hidden] { display: none; }
.lc-info-h { display: flex; align-items: center; gap: 12px; padding: 8px 12px; min-height: 60px; background: var(--lc-head); border-bottom: 1px solid var(--border); } .lc-info-h b { font-size: 16px; font-weight: 600; }
.lc-info-b { flex: 1 1 auto; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; } .lc-info-b h3 { margin: 6px 0 0; font-size: 14px; color: var(--lc-meta); font-weight: 600; }
.lc-info-who { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; } .lc-info-who b { font-size: 19px; font-weight: 600; }
.lc-facts { display: flex; flex-direction: column; gap: 10px; } .lc-facts div { display: flex; flex-direction: column; gap: 1px; } .lc-facts span { font-size: 12px; color: var(--lc-meta); } .lc-facts b { font-size: 14px; font-weight: 600; }
.lc-quick-list { display: flex; flex-direction: column; gap: 8px; } .lc-quick-list button { text-align: left; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surf); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; } .lc-quick-list button:hover { background: var(--lc-sel); }
@media (max-width: 1200px) { .lc.info-open { grid-template-columns: minmax(260px, 320px) minmax(0, 1fr); } .lc.info-open .lc-info { position: absolute; right: 0; top: 0; bottom: 0; width: min(340px, 100%); z-index: 40; box-shadow: -8px 0 24px rgba(0,0,0,.15); } }
@media (max-width: 900px) {
  .lc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lc, .lc.info-open { grid-template-columns: minmax(0, 1fr); }
  .lc[data-view="list"] { height: auto; min-height: 0; } .lc[data-view="list"] .lc-list { overflow: visible; }
  .lc[data-view="chat"] { position: fixed; inset: 0; z-index: 80; height: auto; min-height: 0; border: 0; border-radius: 0; }
  .lc[data-view="list"] .lc-main { display: none; } .lc[data-view="chat"] .lc-side { display: none; }
  .lc-back { display: inline-flex; } .lc-msgs { padding: 10px 10px; } .lc-bub { max-width: 85%; } .lc-err { max-width: 85%; }
  .lc-acts #lc-call, .lc-acts .lc-ibtn { width: 36px; }
  .lc .lc-info { position: absolute; inset: 0; width: auto; z-index: 40; }
}
@media (max-width: 600px) { .lc-stats { display: none; } .lc-sheet { left: 0; right: 0; } }
.lc-note { display: flex; justify-content: center; margin: 6px 0; } .lc-note span { background: #FFF5C4; color: #54656F; font-size: 12.5px; padding: 5px 12px; border-radius: 8px; box-shadow: 0 1px .5px rgba(0,0,0,.13); text-align: center; max-width: 85%; }
[data-theme="dark"] .lc-note span { background: #182229; color: #FFD279; }
/* WhatsApp setup */
.wa-setup { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.wa-num { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--sunk); }
.wa-num.off { opacity: .6; } .wa-num-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.copy-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .copy-row .small { min-width: 90px; } .copy-row code { overflow-wrap: anywhere; }
@media (max-width: 1100px) { .wa-setup { grid-template-columns: 1fr; } }
.lc-tabrow { display: flex; align-items: center; justify-content: space-between; gap: 6px; } .lc-tabrow .lc-pop { min-width: 260px; }
.lc-alert { display: flex !important; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 8px; font-size: 14px; cursor: pointer; } .lc-alert:hover { background: var(--lc-sel); }
.lc-alert span { display: flex; flex-direction: column; } .lc-alert small { color: var(--lc-meta); font-size: 12px; } .lc-alert input { width: 18px; height: 18px; accent-color: var(--lc-green); }
/* WhatsApp templates */
.tpl-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.tpl-name { padding: 0; text-align: left; } .tpl-name.on b { text-decoration: underline; text-underline-offset: 3px; }
.tpl-preview-card { position: sticky; top: 84px; }
.tpl-phone { background: var(--lc-bg); background-image: radial-gradient(var(--lc-dot) 1.2px, transparent 1.3px); background-size: 22px 22px; border-radius: 14px; padding: 18px 14px; display: flex; flex-direction: column; gap: 4px; min-height: 160px; }
.tpl-bub { position: relative; align-self: flex-start; max-width: 92%; background: var(--lc-in); border-radius: 8px; border-top-left-radius: 0; padding: 8px 10px 6px; box-shadow: 0 1px .5px rgba(0,0,0,.13); display: flex; flex-direction: column; gap: 4px; font-size: 14px; line-height: 1.4; color: var(--text); }
.tpl-bub::after { content: ''; position: absolute; top: 0; left: -8px; border-width: 0 8px 10px 0; border-style: solid; border-color: transparent var(--lc-in) transparent transparent; }
.tpl-h[hidden], .tpl-f[hidden], .tpl-bub[hidden] { display: none; } .tpl-b { white-space: pre-line; } .tpl-f { color: var(--lc-meta); font-size: 12.5px; } .tpl-time { align-self: flex-end; font-size: 11px; color: var(--lc-meta); }
.tpl-btns { display: flex; flex-direction: column; gap: 4px; max-width: 92%; } .tpl-btns span { background: var(--lc-in); border-radius: 8px; padding: 9px; text-align: center; color: #027EB5; font-weight: 600; font-size: 14px; box-shadow: 0 1px .5px rgba(0,0,0,.13); }
@media (max-width: 1100px) { .tpl-layout { grid-template-columns: 1fr; } .tpl-preview-card { position: static; } }
/* WhatsApp automations */
.auto-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(460px, 1fr)); gap: 14px; }
.auto-card { gap: 12px; } .auto-card.off { opacity: .6; }
.auto-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.auto-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .auto-name b { font-size: 16px; }
.auto-acts { display: flex; align-items: center; gap: 8px; } .auto-acts .switch { cursor: pointer; display: block; } .auto-acts form { display: flex; }
.auto-flow { display: flex; flex-wrap: wrap; align-items: stretch; gap: 6px; }
.auto-step { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border-radius: 10px; background: var(--sunk); font-size: 13px; font-weight: 600; min-width: 0; }
.auto-tag { align-self: flex-start; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; display: inline-flex; align-items: center; }
.auto-tag.t-blue { background: var(--t-blue); color: var(--i-blue); } .auto-tag.t-amber { background: var(--t-amber); color: var(--i-amber); } .auto-tag.t-green { background: var(--t-green); color: var(--i-green); } .auto-tag.t-violet { background: var(--t-violet); color: var(--i-violet); }
.auto-arrow { align-self: center; color: var(--muted); font-weight: 700; }
.auto-stats { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--muted); } .auto-stats b { color: var(--text); font-size: 15px; }
@media (max-width: 560px) { .auto-list { grid-template-columns: 1fr; } }
/* Financials */
.seg-a { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 9px; font-size: 13px; font-weight: 700; color: var(--muted); text-decoration: none; }
.seg-a.on { background: var(--surf); color: var(--text); box-shadow: 0 1px 3px rgba(15,23,42,.15); }
.fin-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.fin-side { display: flex; flex-direction: column; gap: 16px; }
.fin-pl .pl-label { font-weight: 600; } .fin-pl .pl-minus .pl-label { padding-left: 14px; font-weight: 500; } .fin-pl .pl-minus .cell-sub { padding-left: 14px; }
.fin-pl .pl-sub td { background: var(--sunk); } .fin-pl .pl-sub .pl-label { font-weight: 700; }
.fin-pl .pl-total td { background: var(--accsoft); } .fin-pl .pl-total .pl-label { font-weight: 800; font-size: 15px; }
.fin-split { display: flex; height: 16px; border-radius: 99px; overflow: hidden; background: var(--sunk); } .fin-split i { display: block; height: 100%; }
.fin-legend { display: flex; flex-direction: column; gap: 8px; } .fin-legend div { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.fin-legend span { display: flex; align-items: center; gap: 8px; } .fin-legend span i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.fin-cash { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); } .fin-cash > b { font-size: 16px; white-space: nowrap; }
@media (max-width: 1100px) { .fin-grid { grid-template-columns: 1fr; } }
/* Expenses */
.exp-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.exp-side { display: flex; flex-direction: column; gap: 16px; }
.exp-cat { display: flex; flex-direction: column; gap: 4px; } .exp-cat > div:first-child { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.t-blue-bar { background: var(--i-blue); } .t-amber-bar { background: var(--i-amber); } .t-green-bar { background: var(--i-green); } .t-violet-bar { background: var(--i-violet); } .t-teal-bar { background: var(--i-teal); } .t-red-bar { background: var(--i-red); } .t-slate-bar { background: var(--muted); }
@media (max-width: 1400px) { .exp-layout { grid-template-columns: 1fr; } .exp-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); } }

/* Reports */
.rp-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 16px; align-items: start; }
.rp-lib { display: flex; flex-direction: column; gap: 14px; padding: 14px; position: sticky; top: 16px; }
.rp-group { display: flex; flex-direction: column; gap: 2px; }
.rp-group-name { font-size: 12px; font-weight: 700; color: var(--muted); padding: 0 8px 4px; text-transform: uppercase; letter-spacing: .04em; }
.rp-item { display: flex; gap: 10px; align-items: flex-start; padding: 8px; border-radius: 10px; text-decoration: none; color: var(--text); }
.rp-item:hover { background: var(--sunk); color: var(--text); }
.rp-item.on { background: var(--accsoft); box-shadow: inset 3px 0 0 var(--acc); }
.rp-item .tile { width: 30px; height: 30px; flex: none; }
.rp-item b { display: block; font-size: 14px; } .rp-item small { display: block; color: var(--muted); font-size: 12px; line-height: 1.35; margin-top: 1px; }
.rp-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.rp-head { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.rp-head-ic { width: 42px; height: 42px; flex: none; }
.rp-head-t { flex: 1 1 220px; min-width: 0; } .rp-head-t h2 { margin: 0; font-size: 20px; } .rp-head-t p { margin: 2px 0 0; }
.rp-head-a { display: flex; gap: 8px; flex-wrap: wrap; }
.rp-showing { margin: 0; color: var(--muted); } .rp-showing b { color: var(--text); }
.rp-sort { color: inherit; text-decoration: none; display: inline-flex; gap: 4px; align-items: center; } .rp-sort:hover { color: var(--acc); }
.rp-table tfoot td { background: var(--sunk); border-top: 2px solid var(--border); }
.rp-foot { display: flex; gap: 8px; align-items: flex-start; margin: 0; } .rp-foot svg { flex: none; margin-top: 2px; }
.rp-off td { opacity: .6; }
.rp-pick { display: none; padding: 14px; }
.rp-seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--sunk); border-radius: 11px; flex-wrap: wrap; }
.rp-seg label { position: relative; cursor: pointer; }
.rp-seg input { position: absolute; opacity: 0; width: 0; height: 0; }
.rp-seg span { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 9px; font-size: 13px; font-weight: 700; color: var(--muted); }
.rp-seg input:checked + span { background: var(--surf); color: var(--text); box-shadow: 0 1px 3px rgba(15,23,42,.15); }
.rp-seg input:focus-visible + span { outline: 2px solid var(--acc); }
@media (max-width: 1000px) { .rp-layout { grid-template-columns: minmax(0, 1fr); } .rp-lib { position: static; } .rp-group { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px; } .rp-group-name { grid-column: 1 / -1; } }
@media (max-width: 640px) { .rp-lib { display: none; } .rp-pick { display: block !important; } .rp-head-a { width: 100%; } .rp-head-a .btn { flex: 1 1 auto; } }

/* Performance */
.rp-seg a { text-decoration: none; } .rp-seg a span.on { background: var(--surf); color: var(--text); box-shadow: 0 1px 3px rgba(15,23,42,.15); }
.pf-cmp { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pf-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 1280px) { .pf-cards { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.pf-card { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; padding: 16px; border-radius: 16px; cursor: pointer; text-align: left; font: inherit; color: var(--text); background: var(--surf); border: 2px solid var(--border); }
.pf-card:hover { border-color: var(--acc); } .pf-card.on { border-color: var(--acc); box-shadow: 0 0 0 3px var(--accsoft); }
.pf-label { font-size: 13px; font-weight: 700; color: var(--muted); }
.pf-value { font-size: 24px; font-weight: 800; letter-spacing: -.01em; }
.pf-ch { font-size: 12px; }
.pf-spark { display: flex; align-items: flex-end; gap: 3px; height: 28px; width: 100%; margin-top: 6px; }
.pf-spark i { flex: 1; background: var(--border); border-radius: 2px; } .pf-spark i.now { background: var(--acc); } .pf-spark i.neg { background: #F3B4B4; }
.pf-chart { display: flex; align-items: flex-end; gap: 10px; height: 240px; padding-top: 8px; }
.pf-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; min-width: 0; }
.pf-bar { width: 100%; max-width: 64px; background: #C7D2FE; border-radius: 8px 8px 0 0; } .pf-bar.now { background: var(--acc); } .pf-bar.neg { background: #F3B4B4; }
.pf-v { font-size: 12px; font-weight: 700; white-space: nowrap; }
.pf-l { font-size: 11px; color: var(--muted); text-align: center; line-height: 1.25; }
.pf-two { display: flex; flex-direction: column; gap: 16px; }
.pf-notes .pf-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 8px; }
.pf-notes { display: flex; flex-direction: column; gap: 8px; }
.pf-note { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--sunk); font-size: 13px; line-height: 1.4; color: var(--text); text-decoration: none; }
.pf-note svg { flex: none; margin-top: 2px; } .pf-note > span { flex: 1; }
a.pf-note:hover { box-shadow: inset 0 0 0 1px var(--acc); color: var(--text); }
.pf-good svg { color: var(--ok); } .pf-bad svg { color: var(--bad); } .pf-warn svg { color: #B45309; } .pf-info svg { color: var(--acc); }
.pf-sub { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-top: 6px; }
@media (max-width: 640px) { .pf-cards { grid-template-columns: 1fr 1fr; } .pf-notes .pf-list { grid-template-columns: 1fr; } .pf-value { font-size: 19px; } .pf-chart { gap: 4px; height: 200px; } .pf-v { font-size: 10px; transform: rotate(-35deg); } .pf-l { font-size: 10px; } }

/* Exchange rates */
.fx-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.fx-card { display: flex; flex-direction: column; gap: 6px; }
.fx-top { display: flex; gap: 10px; align-items: center; }
.fx-code { width: auto; min-width: 46px; height: 34px; padding: 0 8px; font-weight: 800; font-size: 13px; }
.fx-rate { font-size: 22px; font-weight: 800; letter-spacing: -.01em; margin-top: 4px; }
.fx-out { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 14px; border-radius: 12px; background: var(--sunk); } .fx-out b { font-size: 20px; }
.fx-uses { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--muted); line-height: 1.45; }

/* General settings: one page */
.set-form { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.set-sec { scroll-margin-top: 16px; }
.set-sec-head { display: flex; gap: 12px; align-items: center; } .set-sec-head h2 { margin: 0; } .set-sec-head p { margin: 2px 0 0; }
.set-nav { position: sticky; top: 16px; }
.set-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 4px 2px 24px; }
@media (max-width: 900px) { .set-nav { position: static; } }
.set-sec-head .tile { width: 38px; height: 38px; flex: none; }

/* Offices */
.of-share { display: flex; flex-direction: column; gap: 12px; }
.of-share-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; } .of-share-head b { font-size: 15px; }
.of-bar { display: flex; height: 18px; border-radius: 99px; overflow: hidden; background: var(--sunk); }
.of-legend { display: flex; gap: 20px; flex-wrap: wrap; font-size: 13px; }
.of-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; align-content: start; }
.of-card { display: flex; flex-direction: column; gap: 14px; }
.of-head { display: flex; gap: 12px; align-items: center; }
.of-code { width: 44px; height: 44px; border-radius: 12px; font-weight: 800; font-size: 15px; flex: none; }
.of-t { flex: 1; min-width: 0; } .of-t h2 { margin: 0; font-size: 17px; }
.of-pills { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.of-money { display: flex; flex-direction: column; gap: 2px; } .of-money b { font-size: 28px; line-height: 1.15; }
.of-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.of-stats > div { background: var(--sunk); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; }
.of-stats span { font-size: 11px; color: var(--muted); font-weight: 700; } .of-stats b { font-size: 17px; }
.of-setup { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.of-setup-head { padding: 8px 14px; background: var(--sunk); font-size: 12px; font-weight: 700; color: var(--muted); }
.of-setup a { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 14px; border-top: 1px solid var(--sunk); text-decoration: none; color: var(--text); }
.of-setup a:hover { background: var(--accsoft); color: var(--text); }
.of-setup-l { display: flex; gap: 10px; align-items: center; } .of-setup-l .tile { width: 28px; height: 28px; border-radius: 8px; }
.of-setup-r { display: flex; gap: 6px; align-items: center; color: var(--muted); } .of-setup-r b { font-size: 15px; color: var(--text); }
.of-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; } .of-actions form { display: contents; } .of-actions .btn { flex: 1; justify-content: center; }
.of-del { color: var(--bad); }
@media (max-width: 640px) { .of-cards { grid-template-columns: 1fr; } }
/* General settings: never wider than the screen; sections open as panes on small screens */
.tabs-side { grid-template-columns: 280px minmax(0, 1fr); }
.set-form .form-grid > *, .set-form .field, .set-form .field > input, .set-form .field > select { min-width: 0; max-width: 100%; }
.set-close, .set-sec-foot, .set-backdrop { display: none; }
@media (max-width: 900px) {
  .tabs-side { grid-template-columns: minmax(0, 1fr); }
  .set-form > .set-sec { display: none; }
  .set-form > .set-sec.open { display: flex; flex-direction: column; gap: 14px; position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); z-index: 51; margin: 0; border-radius: 0; border: none; overflow-y: auto; padding: 0 18px 0; box-sizing: border-box; background: var(--bg); box-shadow: var(--shadow); }
  .set-sec.open .set-sec-head { margin: 0 -18px; padding: 22px 18px 18px; background: linear-gradient(135deg, var(--acc), color-mix(in srgb, var(--acc) 55%, #7C3AED)); color: #fff; position: sticky; top: 0; z-index: 2; }
  .set-sec.open .set-sec-head h2 { color: #fff; } .set-sec.open .set-sec-head p { color: #fff; opacity: .85; }
  .set-sec.open .set-sec-head .tile { background: rgba(255,255,255,.2); color: #fff; border-radius: 99px; }
  .set-sec.open .set-close { display: inline-flex; margin-left: auto; background: rgba(255,255,255,.16); border-color: transparent; color: #fff; }
  .set-sec.open .set-sec-foot { display: flex; gap: 10px; position: sticky; bottom: 0; margin: auto -18px 0; padding: 14px 18px; background: var(--surf); border-top: 1px solid var(--border); }
  .set-sec.open .set-sec-foot .btn { flex: 1; justify-content: center; }
  .set-backdrop.open { display: block; position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 50; }
  .set-nav { position: static; }
}
@media (max-width: 900px) { .set-nav .tab-link.on { background: transparent; } }

/* Integrations */
.int-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.int-card { display: flex; flex-direction: column; gap: 10px; }
.int-head { display: flex; gap: 12px; align-items: center; }
.int-ini { width: 44px; height: 44px; border-radius: 12px; font-weight: 800; font-size: 14px; flex: none; }
.int-t { flex: 1; min-width: 0; display: flex; flex-direction: column; } .int-t b { font-size: 16px; }
.int-what { margin: 0; } .int-detail { margin: 0; flex: 1; }
.int-copy { display: flex; gap: 8px; align-items: center; background: var(--sunk); border-radius: 10px; padding: 8px 10px; } .int-copy code { flex: 1; min-width: 0; word-break: break-all; font-size: 12px; }
.int-test { display: flex; flex-direction: column; gap: 8px; }
.bk-layout { grid-template-columns: minmax(0, 1fr) 300px; } @media (max-width: 1400px) { .bk-layout { grid-template-columns: minmax(0, 1fr); } }

/* Help center */
.hc-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 28px 16px 8px; }
.hc-hero h1 { margin: 0; font-size: 30px; } .hc-hero > p { margin: 0; color: var(--muted); }
.hc-search { display: flex; gap: 8px; align-items: center; width: min(640px, 100%); margin-top: 10px; background: var(--surf); border: 1px solid var(--border); border-radius: 14px; padding: 6px 6px 6px 14px; box-shadow: var(--shadow); }
.hc-search input { flex: 1; border: none; background: transparent; height: 44px; font: inherit; font-size: 15px; outline: none; min-width: 0; color: var(--text); }
.hc-admin { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
.hc-topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.hc-topic { display: flex; flex-direction: row !important; gap: 12px; align-items: center; text-decoration: none; color: var(--text); padding: 16px; }
.hc-topic:hover, .hc-topic.on { border-color: var(--acc); color: var(--text); } .hc-topic.on { box-shadow: 0 0 0 3px var(--accsoft); }
.hc-topic .tile { width: 42px; height: 42px; flex: none; } .hc-topic b { display: block; } .hc-topic small { color: var(--muted); }
.hc-list { display: flex; flex-direction: column; }
.hc-item { display: flex; align-items: center; gap: 12px; padding: 12px 6px; border-top: 1px solid var(--sunk); text-decoration: none; color: var(--text); }
.hc-item:first-child { border-top: none; } .hc-item:hover, .hc-item.on { background: var(--accsoft); color: var(--text); border-radius: 10px; }
.hc-item-t { flex: 1; min-width: 0; display: flex; flex-direction: column; } .hc-item-t small { color: var(--muted); font-size: 12px; } .hc-item svg { color: var(--muted); flex: none; }
.hc-art-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; } .hc-art-head h2 { margin: 2px 0 4px; font-size: 24px; }
.hc-crumb { font-size: 12px; font-weight: 700; color: var(--acc); text-transform: uppercase; letter-spacing: .04em; }
.hc-steps { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.hc-steps li { display: flex; gap: 14px; align-items: flex-start; font-size: 15px; line-height: 1.55; }
.hc-n { width: 30px; height: 30px; border-radius: 99px; background: var(--accsoft); color: var(--acctext); font-weight: 800; display: flex; align-items: center; justify-content: center; flex: none; }
.hc-tip { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--t-amber); color: var(--i-amber); } .hc-tip svg { flex: none; margin-top: 2px; }
.hc-stuck { flex-direction: row !important; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; }
.hc-stuck-a { display: flex; gap: 8px; flex-wrap: wrap; }
.ms-acc { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--sunk); } .ms-acc:first-of-type { border-top: none; }
.ms-st { text-align: right; max-width: 55%; } .ms-sync { display: flex; gap: 8px; align-items: flex-end; } .ms-sync .field { flex: 1; margin: 0; }

/* Licence */
/* Alerts */
.al-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.al-kind { margin-left: auto; } .al-kind select { height: 40px; }
.al-card { padding: 6px; }
.al-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto 10px; gap: 12px; align-items: center; padding: 12px 10px; border-radius: 12px; color: var(--text); text-decoration: none; }
.al-row + .al-row { border-top: 1px solid var(--border); }
.al-row:hover { background: var(--hover, var(--bg)); }
.al-row.unread { background: color-mix(in srgb, var(--acc) 5%, transparent); }
.al-ic { width: 38px; height: 38px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; }
.al-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.al-text b { font-size: 14px; } .al-row:not(.unread) .al-text b { font-weight: 600; }
.al-text small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.al-when { color: var(--muted); font-size: 12px; white-space: nowrap; }
.al-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--acc); }
.al-device { display: flex; flex-direction: row; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.al-device h2 { margin: 0 0 4px; } .al-device p { margin: 0 0 4px; }
.al-note { font-weight: 600; } .al-note.ok { color: var(--i-green); }
.al-table td.c, .al-table th.c { text-align: center; width: 90px; }
.al-roles th.c { width: auto; font-size: 12px; white-space: normal; }
.al-roles input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--acc); }
.al-foot { display: flex; justify-content: flex-end; padding-top: 14px; }
.bell-all { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px 4px; border-top: 1px solid var(--border); margin-top: 6px; font-size: 13px; font-weight: 700; }
.bell-all a { color: var(--acc); text-decoration: none; }
.bell-item.unread b::after { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--acc); margin-left: 6px; vertical-align: middle; }
@media (max-width: 640px) { .al-row { grid-template-columns: 34px minmax(0, 1fr) 10px; } .al-when { grid-column: 2; grid-row: 2; } .al-row .al-dot { grid-column: 3; grid-row: 1; } .al-kind { margin-left: 0; width: 100%; } .al-kind select { width: 100%; } }
.al-device-text { flex: 1 1 320px; min-width: 0; } .al-device-btns { flex: none; }
.al-sw { display: inline-flex; cursor: pointer; vertical-align: middle; }
