/* ============ Back office ============ */
.brand-mark { width: 44px; height: 44px; border-radius: 13px; background: var(--grad); flex: none; position: relative; box-shadow: var(--glow); }
.brand-mark::after { content: ''; position: absolute; inset: 0; background: url(../shared/mark.svg) center/100% no-repeat; border-radius: inherit; }

/* ---------------------------------------------------------------- login */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--bg); }
.login-art { position: relative; overflow: hidden; color: var(--on-hero); margin: 14px; border-radius: 28px; padding: 44px 52px; display: flex; flex-direction: column; justify-content: space-between; background: var(--hero); border: 1px solid rgba(255,255,255,.06); }
.mesh { position: absolute; inset: -20%; filter: blur(70px) saturate(1.2); opacity: .8; }
.mesh i { position: absolute; border-radius: 50%; animation: float 16s ease-in-out infinite; }
.mesh i:nth-child(1) { width: 50%; height: 50%; left: 0; top: 0; background: var(--accent); opacity: .55; }
.mesh i:nth-child(2) { width: 42%; height: 42%; right: 0; top: 30%; background: var(--accent-2); opacity: .4; animation-delay: -5s; }
.mesh i:nth-child(3) { width: 46%; height: 46%; left: 25%; bottom: -8%; background: #0ea5e9; opacity: .25; animation-delay: -9s; }
@keyframes float { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(6%, -5%) scale(1.08); } 66% { transform: translate(-5%, 6%) scale(.95); } }
.login-art::before { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%); }
.login-art > *:not(.mesh) { position: relative; z-index: 2; }
.login-art h1 { font-family: var(--serif); font-weight: 300; font-size: 58px; line-height: 1.02; letter-spacing: -.04em; max-width: 580px; }
.login-art h1 em { font-style: normal; font-weight: 600; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-art p { opacity: .7; max-width: 440px; font-size: 15.5px; line-height: 1.65; }
.glass-stack { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.glass { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(16px); border-radius: 18px; padding: 14px 18px; min-width: 170px; animation: fadeUp .8s var(--ease) both; }
.glass:nth-child(2) { animation-delay: .15s; } .glass:nth-child(3) { animation-delay: .3s; }
.glass small { display: block; opacity: .6; font-size: 12px; } .glass b { font-family: var(--serif); font-weight: 300; font-size: 26px; letter-spacing: -.02em; color: var(--accent); }
.login-form { display: grid; place-items: center; padding: 32px; position: relative; }
.login-form form { width: min(380px, 100%); display: grid; gap: 16px; animation: fadeUp .6s var(--ease) both; }
.login-form h2 { font-family: var(--serif); font-weight: 600; font-size: 34px; letter-spacing: -.03em; }
.login-tools { position: absolute; top: 22px; inset-inline-end: 24px; display: flex; gap: 8px; }

/* ---------------------------------------------------------------- shell */
.shell { display: grid; grid-template-columns: 276px 1fr; min-height: 100vh; }
.side { margin: 12px; margin-inline-end: 0; border-radius: 22px; background: var(--side); color: var(--side-text); border: 1px solid var(--line);
  display: flex; flex-direction: column; position: sticky; top: 12px; height: calc(100vh - 24px); box-shadow: var(--shadow); overflow: hidden; }
.side::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 180px; pointer-events: none; background: radial-gradient(260px 160px at 0% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%); }
.side-brand { position: relative; display: flex; align-items: center; gap: 12px; padding: 20px 20px 14px; color: var(--side-strong); }
.side-brand .brand-mark { width: 38px; height: 38px; border-radius: 11px; }
.side-brand b { display: block; font-size: 15px; line-height: 1.2; letter-spacing: -.02em; font-weight: 800; }
.side-brand small { color: var(--side-muted); font-size: 11.5px; }
.side-search { margin: 4px 14px 8px; display: flex; align-items: center; gap: 9px; height: 40px; padding: 0 10px 0 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); font-size: 13px; transition: .2s; }
.side-search:hover { border-color: var(--accent-200); color: var(--text); }
.side-search kbd { margin-inline-start: auto; }
.nav { flex: 1; overflow: auto; padding: 4px 12px 16px; position: relative; }
.nav-group { font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em; color: var(--side-muted); font-weight: 700; margin: 16px 10px 6px; }
.nav a { position: relative; display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 12px; color: var(--side-text); font-weight: 600; font-size: 13.5px; border: 1px solid transparent; transition: color .18s, background .18s, border-color .18s; }
.nav a .ic { opacity: .7; transition: transform .25s var(--spring), opacity .2s, color .2s; }
.nav a:hover { background: var(--side-hover); color: var(--side-strong); }
.nav a:hover .ic { opacity: 1; transform: scale(1.1); }
.nav a.on { color: var(--side-strong); background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 13%, transparent), color-mix(in srgb, var(--accent) 3%, transparent)); border-color: color-mix(in srgb, var(--accent) 22%, transparent); }
[dir="rtl"] .nav a.on { background: linear-gradient(270deg, color-mix(in srgb, var(--accent) 13%, transparent), color-mix(in srgb, var(--accent) 3%, transparent)); }
.nav a.on .ic { opacity: 1; color: var(--accent); filter: drop-shadow(0 0 6px color-mix(in srgb, var(--accent) 60%, transparent)); }
.side-foot { padding: 12px 14px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.side-foot .who { flex: 1; min-width: 0; }
.side-foot .who b { color: var(--side-strong); display: block; font-size: 13px; }
.side-foot .who small { color: var(--side-muted); text-transform: capitalize; }
.av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 12.5px; color: var(--on-accent); background: var(--grad); flex: none; }
.pos-link { margin: 0 14px 12px; display: flex; align-items: center; justify-content: center; gap: 8px; height: 44px; border-radius: 14px; background: var(--grad); color: var(--on-accent) !important; font-weight: 800; box-shadow: var(--glow); transition: transform .2s var(--ease), box-shadow .2s; }
.pos-link:hover { transform: translateY(-1px); box-shadow: 0 16px 36px -10px color-mix(in srgb, var(--accent) 70%, transparent); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; height: 68px; display: flex; align-items: center; gap: 10px; padding: 0 28px; background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(16px) saturate(1.3); border-bottom: 1px solid var(--line); }
.crumbs { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 600; }
.crumbs b { color: var(--text); }
.top-search { display: flex; align-items: center; gap: 10px; height: 40px; min-width: 300px; padding: 0 6px 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--muted); font-size: 13px; transition: .2s; }
.top-search:hover { border-color: var(--accent-200); color: var(--text-2); }
.top-search kbd { margin-inline-start: auto; background: var(--accent); color: var(--on-accent); border: 0; padding: 6px 9px; border-radius: 999px; font-weight: 800; }
.today { color: var(--muted); font-size: 12.5px; font-weight: 600; }

.page-head { display: flex; align-items: flex-end; gap: 16px; padding: 26px 32px 0; flex-wrap: wrap; animation: fadeUp .5s var(--ease) both; }
.page-head h1 { font-family: var(--serif); font-weight: 600; font-size: 32px; line-height: 1.05; letter-spacing: -.035em; }
.page-head .sub { color: var(--muted); font-size: 13.5px; margin-top: 7px; max-width: 900px; }
.page-head .sub a { font-weight: 650; }
.page-actions select.input { width: auto; }
.page-actions .input { height: 38px; }
.page-actions { display: flex; gap: 8px; margin-inline-start: auto; flex-wrap: wrap; align-items: center; }
.page-body { padding: 20px 32px 48px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-content: start; }
.page-body > * { min-width: 0; }
.page-body > * { animation: fadeUp .55s var(--ease) both; }
.page-body > *:nth-child(2) { animation-delay: .05s; } .page-body > *:nth-child(3) { animation-delay: .1s; } .page-body > *:nth-child(4) { animation-delay: .15s; }
.page-body > *:nth-child(5) { animation-delay: .2s; } .page-body > *:nth-child(n+6) { animation-delay: .25s; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.toolbar .input, .toolbar select { height: 38px; width: auto; }
.toolbar .search { position: relative; }
.toolbar .search .ic { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.toolbar .search input { padding-inline-start: 36px; width: 280px; }
.seg { display: inline-flex; padding: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; gap: 2px; }
.seg button { border: 0; background: transparent; height: 31px; padding: 0 12px; border-radius: 9px; font-weight: 650; font-size: 12.5px; color: var(--text-2); transition: background .2s, color .2s, box-shadow .2s; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }

/* ---------------------------------------------------------------- KPIs */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.kpis > * { animation: fadeUp .6s var(--ease) both; }
.kpis > *:nth-child(2) { animation-delay: .06s } .kpis > *:nth-child(3) { animation-delay: .12s } .kpis > *:nth-child(4) { animation-delay: .18s } .kpis > *:nth-child(n+5) { animation-delay: .24s }
.kpi { position: relative; padding: 18px 20px 16px; overflow: hidden; transition: transform .25s var(--ease), box-shadow .25s, border-color .25s; }
a.kpi:hover, .kpi:hover { transform: translateY(-2px); border-color: var(--accent-200); box-shadow: 0 18px 40px -20px color-mix(in srgb, var(--accent) 45%, transparent); }
.kpi::after { content: ''; position: absolute; inset-inline-end: -50px; top: -50px; width: 150px; height: 150px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%); }
.kpi .lab { position: relative; font-size: 12.5px; color: var(--text-2); font-weight: 650; display: flex; align-items: center; gap: 10px; letter-spacing: .01em; }
.kpi .lab .ic { width: 30px; height: 30px; padding: 6px; border-radius: 9px; background: var(--surface-3); color: var(--accent-t); border: 1px solid var(--line-strong); }
.kpi .val { position: relative; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--serif); font-weight: 300; font-size: 32px; line-height: 1.1; letter-spacing: -.035em; margin-top: 12px; color: var(--ink); direction: ltr; text-align: start; }
[dir="rtl"] .kpi .val { text-align: right; }
.kpi .delta { position: relative; display: inline-flex; font-size: 11.5px; font-weight: 700; margin-top: 8px; color: var(--muted); }
.kpi .delta.up, .kpi .delta.down { padding: 2px 8px; border-radius: 999px; }
.kpi .delta.up { color: var(--good); background: var(--good-50); } .kpi .delta.down { color: var(--bad); background: var(--bad-50); }
.kpi .sub { position: relative; color: var(--muted); font-size: 12px; margin-top: 4px; }

.panel-card { padding: 0; overflow: hidden; }
.panel-card > .ph { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.panel-card > .ph h3 { font-size: 15px; font-weight: 750; letter-spacing: -.01em; }
.panel-card > .ph a { font-weight: 650; font-size: 13px; }
.panel-card > .pb { padding: 18px 20px; }
.panel-card > .pt { overflow: auto; max-height: 600px; }
.cols { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; }
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: start; }

/* ---------------------------------------------------------------- charts */
.chart { position: relative; direction: ltr; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .grid line { stroke: var(--grid-line); stroke-dasharray: 2 5; }
.chart .axis text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .bar { fill: url(#barGrad); transform-box: fill-box; transform-origin: bottom; animation: grow .9s var(--ease) both; transition: opacity .2s; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--accent) 35%, transparent)); }
.chart svg:hover .bar { opacity: .45; } .chart svg:hover .bar.hl { opacity: 1; }
@keyframes grow { from { transform: scaleY(0); } }
.chart .hit { fill: transparent; cursor: pointer; }
.tip { position: absolute; pointer-events: none; background: var(--toast); color: #fff; border: 1px solid rgba(255,255,255,.08); font-size: 12px; padding: 8px 12px; border-radius: 10px; box-shadow: var(--shadow-lg); white-space: nowrap; transform: translate(-50%, calc(-100% - 12px)); z-index: 5; transition: left .15s var(--ease), top .15s var(--ease); }
.tip b { display: block; font-size: 15px; font-family: var(--serif); font-weight: 400; color: var(--accent); }
.hbars { display: grid; gap: 13px; }
.hbar { display: grid; grid-template-columns: 120px 1fr auto; gap: 12px; align-items: center; font-size: 13px; }
.hbar .track { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.hbar .fill { display: block; height: 100%; border-radius: 99px; background: var(--grad); min-width: 3px; transform-origin: left; animation: growX 1s var(--ease) both; box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 50%, transparent); }
[dir="rtl"] .hbar .fill { transform-origin: right; }
.hbar:nth-child(2) .fill { animation-delay: .08s } .hbar:nth-child(3) .fill { animation-delay: .16s } .hbar:nth-child(4) .fill { animation-delay: .24s } .hbar:nth-child(n+5) .fill { animation-delay: .32s }
@keyframes growX { from { transform: scaleX(0); } }
.hbar .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); font-weight: 600; }

/* ---------------------------------------------------------------- forms & misc */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.lines-table td { padding: 7px 10px; } .lines-table .input { height: 38px; }
.stat-inline { display: flex; gap: 30px; flex-wrap: wrap; }
.stat-inline div { font-size: 12px; color: var(--muted); font-weight: 650; } .stat-inline b { display: block; font-family: var(--serif); font-weight: 300; font-size: 24px; color: var(--ink); letter-spacing: -.03em; margin-top: 2px; direction: ltr; text-align: start; }
[dir="rtl"] .stat-inline b { text-align: right; }
.color-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; vertical-align: 0; margin-inline-end: 8px; box-shadow: 0 0 10px currentColor; }
.mono { font-family: var(--mono); font-size: 12px; }
.pill-tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 14px; width: fit-content; border: 1px solid var(--line); }
.pill-tabs a { padding: 8px 16px; font-weight: 650; font-size: 13px; color: var(--text-2); border-radius: 10px; transition: .2s var(--ease); }
.pill-tabs a:hover { color: var(--text); }
.pill-tabs a.on { background: var(--accent); color: var(--on-accent); box-shadow: var(--glow); }
.report-sheet { background: var(--surface); padding: 32px 36px; }
.report-sheet h2 { font-family: var(--serif); font-weight: 600; font-size: 28px; letter-spacing: -.03em; }
.report-sheet .meta { color: var(--muted); margin: 6px 0 20px; }
.report-sheet h4 { margin: 24px 0 10px; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.report-sheet .table td, .report-sheet .table th { padding: 8px 12px; }
.label-sheet { display: grid; grid-template-columns: repeat(auto-fill, 50mm); gap: 3mm; }
.blabel { width: 50mm; height: 25mm; border: 1px dashed #ccc; padding: 1.5mm 2mm; display: flex; flex-direction: column; align-items: center; justify-content: space-between; font: 9px/1.1 var(--font); overflow: hidden; background: #fff; color: #000; }
.blabel b { font-size: 12px; }
.blabel svg { width: 44mm !important; height: 9mm; }
.paper-frame { padding: 14px; background: var(--surface-3); }

/* ---------------------------------------------------------------- command palette */
.cmdk-wrap { position: fixed; inset: 0; z-index: 90; background: var(--overlay); backdrop-filter: blur(6px); display: flex; justify-content: center; align-items: flex-start; padding-top: 12vh; animation: fade .15s ease; }
.cmdk { width: min(640px, 92vw); background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-lg); overflow: hidden; animation: pop .3s var(--spring); border: 1px solid var(--line-strong); }
.cmdk-in { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.cmdk-in input { flex: 1; border: 0; outline: 0; font-size: 17px; background: transparent; }
.cmdk-list { max-height: 56vh; overflow: auto; padding: 8px; }
.cmdk-group { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding: 10px 12px 6px; }
.cmdk-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; cursor: pointer; color: var(--text-2); font-weight: 600; }
.cmdk-item .ic { width: 30px; height: 30px; padding: 6px; border-radius: 9px; background: var(--surface-3); color: var(--text-2); }
.cmdk-item small { margin-inline-start: auto; color: var(--muted); font-weight: 500; }
.cmdk-item.on { background: var(--accent-50); color: var(--text); }
.cmdk-item.on .ic { background: var(--grad); color: var(--on-accent); }
.cmdk-foot { display: flex; gap: 14px; padding: 10px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; background: var(--surface-2); }

@media print {
  :root, html[data-theme] { --bg: #fff; --surface: #fff; --surface-2: #f6f7f7; --surface-3: #eee; --text: #000; --text-2: #333; --muted: #666; --ink: #000; --line: #ddd; --line-strong: #ccc; --card-hi: none; --page-glow: none; }
  .side, .topbar, .page-head .page-actions, .toolbar, .no-print, .mj-root { display: none !important; }
  .shell { display: block; } body { background: #fff; } .card { box-shadow: none; border: 0; }
  .page-body { padding: 0; } .report-sheet { padding: 0; } .page-body > *, .kpis > *, .table tbody tr { animation: none !important; }
  .table th { position: static; }
}
@media (max-width: 1100px) { .cols, .cols-2, .cols-3 { grid-template-columns: 1fr; } .top-search { min-width: 0; } .today { display: none; } }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; } .side { position: static; height: auto; margin: 10px; } .nav { display: flex; flex-wrap: wrap; } .nav-group { display: none; }
  .login { grid-template-columns: 1fr; } .login-art { display: none; }
  .page-head, .page-body, .topbar { padding-left: 16px; padding-right: 16px; }
  .form-grid { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- product images & import */
.prod-cell { display: flex; align-items: center; gap: 12px; }
.thumb { width: 42px; height: 42px; border-radius: 12px; object-fit: cover; flex: none; background: var(--surface-3); box-shadow: 0 0 0 1px var(--line); }
.thumb.ph { display: grid; place-items: center; font-family: var(--serif); font-weight: 500; font-size: 15px; color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 60%, #fff), var(--c)); box-shadow: none; }
.img-field { display: grid; grid-template-columns: 150px 1fr; gap: 18px; align-items: center; padding-bottom: 6px; border-bottom: 1px dashed var(--line); margin-bottom: 4px; }
.img-drop { width: 150px; height: 150px; border-radius: 20px; border: 2px dashed var(--line-strong); background: var(--surface-2); display: grid; place-content: center; justify-items: center; gap: 6px; text-align: center; color: var(--muted); font-size: 12px; cursor: pointer; overflow: hidden; transition: .2s var(--ease); }
.img-drop:hover, .img-drop.over { border-color: var(--accent); background: var(--accent-50); color: var(--accent-t); transform: scale(1.02); }
.img-drop img { width: 150px; height: 150px; object-fit: cover; display: block; }
.img-drop.pulse { animation: pop .4s var(--spring); }
.img-actions { display: grid; gap: 4px; }
.steps { display: flex; gap: 8px; margin-bottom: 16px; }
.steps span { flex: 1; text-align: center; padding: 9px; border-radius: 12px; background: var(--surface-2); color: var(--muted); font-weight: 650; font-size: 12.5px; transition: .3s var(--ease); border: 1px solid var(--line); }
.steps span.on { background: var(--grad); color: var(--on-accent); box-shadow: var(--glow); border-color: transparent; }
.dropzone { display: grid; justify-items: center; gap: 8px; padding: 46px 20px; border: 2px dashed var(--line-strong); border-radius: 22px; background: var(--surface-2); color: var(--muted); cursor: pointer; text-align: center; transition: .25s var(--ease); }
.dropzone b { color: var(--text); font-size: 17px; }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-50); color: var(--accent-t); transform: scale(1.01); }
.dropzone .ic { width: 64px; height: 64px; padding: 15px; border-radius: 20px; background: var(--surface-3); box-shadow: var(--shadow); color: var(--accent-t); }
.map-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

/* ---------------------------------------------------------------- dashboard quick actions */
.quick-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); gap: 12px; }
.qa { position: relative; display: grid; gap: 10px; padding: 16px; border-radius: 18px; background: var(--card-hi), var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); text-align: start; color: var(--text); font-weight: 700; font-size: 13.5px; cursor: pointer; overflow: hidden; transition: transform .25s var(--spring), box-shadow .25s, border-color .2s; }
.qa small { color: var(--muted); font-weight: 500; font-size: 11.5px; line-height: 1.35; }
.qa .qi { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; color: color-mix(in srgb, var(--qs, var(--accent)) 70%, var(--text)); background: color-mix(in srgb, var(--qs, var(--accent)) 16%, var(--surface-2)); border: 1px solid color-mix(in srgb, var(--qs, var(--accent)) 28%, transparent); transition: transform .3s var(--spring), box-shadow .3s; }
.qa:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--qs, var(--accent)) 40%, transparent); box-shadow: 0 18px 40px -20px color-mix(in srgb, var(--qs, var(--accent)) 60%, transparent); }
.qa:hover .qi { transform: scale(1.1) rotate(-6deg); box-shadow: 0 0 22px -4px color-mix(in srgb, var(--qs, var(--accent)) 60%, transparent); }
.qa.primary { background: var(--hero); color: var(--on-hero); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.qa.primary small { color: rgba(255,255,255,.6); }
.qa.primary .qi { background: var(--grad); color: var(--on-accent); border: 0; box-shadow: var(--glow); }
.qa.primary::after { content: ''; position: absolute; width: 170px; height: 170px; inset-inline-end: -60px; bottom: -90px; border-radius: 50%; background: var(--accent); filter: blur(50px); opacity: .45; }
.section-title { display: flex; align-items: baseline; gap: 10px; margin: 6px 2px -4px; }
.section-title h2 { font-family: var(--serif); font-weight: 600; font-size: 21px; letter-spacing: -.03em; }
.section-title span { color: var(--muted); font-size: 13px; }
.icon-btn { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface-2); display: grid; place-items: center; color: var(--text-2); box-shadow: var(--shadow-sm); transition: .2s var(--ease); }
.icon-btn:hover { color: var(--accent-t); transform: translateY(-1px); border-color: var(--accent-200); }
.icon-btn.off { color: var(--muted); opacity: .7; }
@media (max-width: 1100px) { .map-grid { grid-template-columns: repeat(2, 1fr); } }

.side-credit { display: flex; justify-content: center; padding: 0 14px 12px; }
.side-credit:empty { display: none; }
.credit-foot { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 8px 0 4px; }

/* avatars (customers & vendors) */
.av-img { border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--line-strong); display: inline-block; vertical-align: middle; }
.av-ini { border-radius: 50%; flex: none; display: inline-grid; place-items: center; color: #fff; font-weight: 700; background: linear-gradient(135deg, hsl(var(--h) 65% 58%), hsl(calc(var(--h) + 35) 60% 40%)); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--line-strong); vertical-align: middle; }
.who-cell { display: flex; align-items: center; gap: 12px; }
.img-field.round .img-drop, .img-field.round .img-drop img { border-radius: 50%; }
.profile-head { display: flex; align-items: center; gap: 20px; }
.profile-av { position: relative; cursor: pointer; border-radius: 50%; transition: transform .3s var(--spring); }
.profile-av:hover { transform: scale(1.04); }
.profile-av .av-img, .profile-av .av-ini { box-shadow: 0 0 0 4px var(--surface), 0 0 0 5px color-mix(in srgb, var(--accent) 40%, transparent), 0 12px 30px -10px rgba(0,0,0,.5); }
.profile-av::after { content: 'Change'; position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; font-weight: 650; opacity: 0; transition: opacity .2s; }
html[lang="ur"] .profile-av::after { content: 'تبدیل کریں'; }
.profile-av:hover::after { opacity: 1; }

/* ---------------------------------------------------------------- bill of materials */
.bom-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.bom-card { display: grid; gap: 14px; padding: 18px; color: var(--text); transition: transform .25s var(--ease), box-shadow .25s, border-color .2s; animation: fadeUp .4s var(--ease) both; }
.bom-card:hover { transform: translateY(-3px); box-shadow: 0 20px 44px -20px color-mix(in srgb, var(--accent) 50%, transparent); border-color: var(--accent-200); }
.bom-top { display: flex; align-items: center; gap: 12px; }
.bom-top img, .bom-ic { width: 48px; height: 48px; border-radius: 14px; object-fit: cover; flex: none; }
.bom-ic { display: grid; place-items: center; color: var(--accent-t); background: var(--accent-100); border: 1px solid var(--accent-200); }
.bom-top > div { flex: 1; min-width: 0; } .bom-top b { display: block; font-size: 15px; } .bom-top small { font-size: 11.5px; }
.bom-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.bom-nums span, .bom-sum span { display: block; font-size: 11px; color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: .05em; }
.bom-nums b { font-family: var(--serif); font-weight: 300; font-size: 19px; letter-spacing: -.03em; }
.bom-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.bom-make { display: flex; gap: 6px; } .bom-make i { font-style: normal; font-size: 11.5px; padding: 3px 8px; border-radius: 999px; background: var(--accent-50); color: var(--accent-t); border: 1px solid var(--accent-200); }
.bom-hero { width: 72px; height: 72px; margin: 0 auto; border-radius: 22px; display: grid; place-items: center; color: var(--on-accent); background: var(--grad); box-shadow: var(--glow); animation: mjFloat 4s ease-in-out infinite; }
.bom-sum { display: flex; gap: 34px; flex-wrap: wrap; border-top: 1px solid var(--line); }
.bom-sum b { font-family: var(--serif); font-weight: 300; font-size: 26px; line-height: 1.2; display: block; letter-spacing: -.03em; }
.bom-sum small { color: var(--muted); font-size: 12px; }
.good-t { color: var(--good); } .bad-t { color: var(--bad); }
.share { width: 90px; height: 7px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin-inline-start: auto; }
.share i { display: block; height: 100%; border-radius: 99px; background: var(--grad); }
.make-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.make-row b { font-family: var(--serif); font-weight: 300; font-size: 26px; }
.badge.kit { background: var(--accent-100); color: var(--accent-t); border-color: var(--accent-200); } .badge.kit svg { vertical-align: -2px; }
.bom-box { display: grid; gap: 10px; padding: 14px; border-radius: 14px; background: var(--accent-50); border: 1px solid var(--accent-200); }
.bom-chips { display: flex; flex-wrap: wrap; gap: 6px; } .bom-chips span { padding: 4px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--accent-200); font-size: 12.5px; }

/* ================================================================ app shell (Odoo-style: home screen + one app at a time) */
.shell2 { min-height: 100vh; display: flex; flex-direction: column; }
.shell2 #content { flex: 1; min-width: 0; }
.appbar { position: sticky; top: 0; z-index: 30; height: 62px; display: flex; align-items: center; gap: 10px; padding: 0 18px;
  background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(18px) saturate(1.4); border-bottom: 1px solid var(--line); }
.appbar::after { content: ''; position: absolute; inset: auto 0 -1px 0; height: 1px; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--app-color, var(--accent)) 70%, transparent), transparent); opacity: .7; }
.home-btn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--text-2); border: 1px solid var(--line-strong); background: var(--surface-2); transition: .25s var(--spring); flex: none; }
.home-btn:hover { color: var(--accent-t); border-color: var(--accent-200); transform: rotate(90deg) scale(1.05); }
body[data-app="home"] .home-btn { color: var(--on-accent); background: var(--grad); border-color: transparent; box-shadow: var(--glow); }
.app-id { display: flex; align-items: center; gap: 10px; color: var(--text); padding: 0 6px; flex: none; }
.app-id b { font-size: 15.5px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.app-id .app-ic { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); padding: 4px; }
.app-id .app-ic svg { width: 100%; height: 100%; }
.brand-mark.sm { width: 32px; height: 32px; border-radius: 10px; }
.app-menu { display: flex; align-items: center; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; padding-inline-start: 10px; margin-inline-start: 4px; border-inline-start: 1px solid var(--line); }
.app-menu::-webkit-scrollbar { display: none; }
.app-menu:empty { border: 0; }
.app-menu.in a { animation: menuIn .4s var(--ease) both; }
.app-menu.in a:nth-child(2) { animation-delay: .04s } .app-menu.in a:nth-child(3) { animation-delay: .08s } .app-menu.in a:nth-child(4) { animation-delay: .12s } .app-menu.in a:nth-child(n+5) { animation-delay: .16s }
@keyframes menuIn { from { opacity: 0; transform: translateY(-6px); } }
.app-menu a { position: relative; display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 13px; border-radius: 11px; color: var(--text-2); font-weight: 650; font-size: 13.5px; white-space: nowrap; transition: color .18s, background .18s; }
.app-menu a .ic { opacity: .7; }
.app-menu a:hover { color: var(--text); background: var(--side-hover); }
.app-menu a.on { color: var(--text); background: color-mix(in srgb, var(--app-color, var(--accent)) 14%, transparent); }
.app-menu a.on .ic { opacity: 1; color: var(--app-color, var(--accent)); }
.app-menu a.on::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: -12px; height: 2px; border-radius: 2px; background: var(--app-color, var(--accent)); box-shadow: 0 0 10px var(--app-color, var(--accent)); }
.appbar .top-search { min-width: 0; width: 210px; border-radius: 999px; }
.appbar .top-search .ts-label { flex: 1; text-align: start; }
.user-menu { position: relative; }
.user-btn { border: 0; background: none; padding: 0; border-radius: 50%; }
.user-btn .av { width: 38px; height: 38px; box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--accent-200); transition: .2s; }
.user-btn:hover .av { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--accent); }
.user-pop { position: absolute; top: calc(100% + 10px); inset-inline-end: 0; width: 250px; padding: 8px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow-lg);
  display: grid; gap: 2px; opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.98); transform-origin: top right; transition: .2s var(--ease); z-index: 40; }
.user-pop.open { opacity: 1; visibility: visible; transform: none; }
.up-head { display: flex; align-items: center; gap: 10px; padding: 8px 8px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.up-head b { display: block; font-size: 13.5px; } .up-head small { color: var(--muted); text-transform: capitalize; font-size: 11.5px; }
.user-pop a, .user-pop button { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--text-2); font-weight: 600; font-size: 13.5px; border: 0; background: none; text-align: start; }
.user-pop a:hover, .user-pop button:hover { background: var(--side-hover); color: var(--text); }
.user-pop #logout { color: var(--bad); }

/* ---------------------------------------------------------------- home screen */
.home { min-height: calc(100vh - 62px); display: flex; flex-direction: column; align-items: center; padding: 56px 24px 28px; position: relative; }
.home::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(color-mix(in srgb, var(--text) 9%, transparent) 1px, transparent 1.2px); background-size: 22px 22px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%); }
.home-head { text-align: center; display: grid; justify-items: center; gap: 6px; margin-bottom: 38px; animation: fadeUp .5s var(--ease) both; }
.home-head h1 { font-family: var(--serif); font-weight: 600; font-size: 34px; letter-spacing: -.04em; }
.home-head p { margin: 0; }
.home-search { margin-top: 16px; display: flex; align-items: center; gap: 10px; width: min(420px, 90vw); height: 46px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--muted); transition: .2s; }
.home-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent); }
.home-search input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 15px; color: var(--text); }
.app-grid { display: grid; grid-template-columns: repeat(6, 128px); gap: 26px 22px; justify-content: center; }
.app-tile { display: grid; justify-items: center; gap: 12px; padding: 6px 4px; border-radius: 20px; color: var(--text); text-align: center; animation: tileIn .55s var(--spring) both; animation-delay: calc(var(--i) * 40ms); }
.app-tile[hidden] { display: none; }
.app-tile .app-ic { width: 84px; height: 84px; border-radius: 24px; display: grid; place-items: center; padding: 16px; background: var(--card-hi), var(--surface); border: 1px solid var(--line-strong);
  box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 12px 26px -16px rgba(0,0,0,.55); transition: transform .35s var(--spring), box-shadow .3s, border-color .3s; position: relative; }
html[data-theme="light"] .app-tile .app-ic { box-shadow: 0 1px 2px rgba(10,20,16,.06), 0 10px 24px -12px rgba(10,20,16,.18); border-color: var(--line); }
.app-tile .app-ic svg { width: 100%; height: 100%; transition: transform .45s var(--spring); }
.app-tile .app-ic::after { content: ''; position: absolute; inset: -1px; border-radius: inherit; opacity: 0; transition: opacity .3s; box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 55%, transparent), 0 18px 40px -14px color-mix(in srgb, var(--c) 70%, transparent); }
.app-tile:hover .app-ic, .app-tile:focus-visible .app-ic { transform: translateY(-5px); }
.app-tile:hover .app-ic::after, .app-tile:focus-visible .app-ic::after { opacity: 1; }
.app-tile:hover .app-ic svg { transform: scale(1.08) rotate(-4deg); }
.app-tile:active .app-ic { transform: scale(.94); }
.app-nm { font-weight: 700; font-size: 13.5px; letter-spacing: -.01em; }
.app-tile:focus-visible { outline: none; }
@keyframes tileIn { from { opacity: 0; transform: translateY(18px) scale(.9); } }
.home-foot { margin-top: auto; padding-top: 44px; }
body[data-app="home"] .mj-root { bottom: 22px; }
@media (max-width: 1000px) { .app-grid { grid-template-columns: repeat(4, 118px); } .appbar .top-search .ts-label, .appbar .top-search kbd { display: none; } .appbar .top-search { width: 40px; padding: 0; justify-content: center; } }
@media (max-width: 720px) {
  .app-grid { grid-template-columns: repeat(3, 100px); gap: 20px 12px; } .app-tile .app-ic { width: 70px; height: 70px; border-radius: 20px; padding: 13px; }
  .appbar { flex-wrap: wrap; height: auto; padding: 10px 12px; } .app-menu { order: 10; width: 100%; border: 0; padding: 4px 0 0; margin: 0; } .app-menu a.on::after { bottom: -6px; }
  .app-id b { display: none; }
}
@media print { .appbar { display: none !important; } }

/* ================================================================ list ⇄ kanban views */
.view-toggle button { display: inline-flex; align-items: center; gap: 6px; }
.view-toggle button.on { background: var(--accent); color: var(--on-accent); box-shadow: var(--glow); }
.view-toggle button.on .ic { color: inherit; }
@media (max-width: 720px) { .view-toggle span { display: none; } }
.dview.swap > * { animation: fadeUp .35s var(--ease) both; }
.kanban { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; padding: 16px; }
.kcard { position: relative; display: flex; flex-direction: column; border-radius: 18px; background: var(--card-hi), var(--surface-2); border: 1px solid var(--line); overflow: hidden;
  transition: transform .25s var(--spring), box-shadow .25s, border-color .2s; animation: kcIn .45s var(--ease) both; animation-delay: var(--d, 0ms); }
@keyframes kcIn { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.kcard.click { cursor: pointer; }
.kcard.click:hover { transform: translateY(-3px); border-color: var(--accent-200); box-shadow: 0 18px 40px -22px color-mix(in srgb, var(--accent) 60%, transparent); }
.kc-img { height: 150px; background: #f4f6f5; overflow: hidden; display: grid; place-items: center; }
.kc-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.kcard:hover .kc-img img { transform: scale(1.06); }
.kc-img.ph { background: linear-gradient(135deg, color-mix(in srgb, var(--c) 55%, var(--surface)), color-mix(in srgb, var(--c) 85%, #000)); }
.kc-img.ph span { font-family: var(--serif); font-weight: 600; font-size: 38px; color: #fff; letter-spacing: -.04em; opacity: .9; }
.kc-body { padding: 14px 16px 15px; display: grid; gap: 12px; }
.kc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.kc-title { min-width: 0; font-size: 14px; }
.kc-title .prod-cell .thumb { display: none; }
.kc-tags { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.kc-fields { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 9px 12px; padding-top: 11px; border-top: 1px dashed var(--line); }
.kc-fields div { min-width: 0; }
.kc-fields dt { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
html[lang="ur"] .kc-fields dt { text-transform: none; letter-spacing: 0; font-size: 11.5px; }
.kc-fields dd { margin: 2px 0 0; font-size: 13.5px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kc-fields .num dd { font-family: var(--serif); font-weight: 500; letter-spacing: -.02em; }
.kanban-cols { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 1fr); gap: 14px; padding: 16px; overflow-x: auto; align-items: start; }
.kcol { background: var(--surface-2); border: 1px solid var(--line); border-radius: 18px; padding: 10px; display: grid; gap: 10px; }
.kcol header { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 2px; }
.kcol-body { display: grid; gap: 10px; }
.kcol .kcard { background: var(--card-hi), var(--surface); }
.kcol-empty { text-align: center; color: var(--muted); padding: 14px; }

/* ================================================================ combobox (search + create) */
.combo { position: relative; }
.combo-in { padding-inline-end: 36px; }
.combo-chev { position: absolute; inset-inline-end: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); cursor: pointer; display: grid; }
.combo-pop { position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; right: 0; max-height: 280px; overflow: auto; padding: 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow-lg); animation: pop .2s var(--ease); }
.combo-opt { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; cursor: pointer; font-weight: 600; color: var(--text-2); }
.combo-opt img { width: 28px; height: 28px; border-radius: 8px; object-fit: cover; }
.combo-opt small { display: block; font-weight: 500; color: var(--muted); font-size: 11.5px; }
.combo-opt.on { background: var(--accent-50); color: var(--text); }
.combo-opt.create { color: var(--accent-t); border-top: 1px dashed var(--line); margin-top: 4px; }
.combo-opt.create.on { background: var(--accent); color: var(--on-accent); }
.combo-none { padding: 12px; color: var(--muted); font-size: 13px; text-align: center; }
.modal .combo-pop { position: absolute; }
.combo-opt.create em { font-style: normal; }
.empty .btn .ic { width: auto; height: auto; padding: 0; margin: 0; background: none; opacity: 1; box-sizing: border-box; }
.table tr.grp td { background: var(--surface-3); border-bottom: 1px solid var(--line-strong); font-weight: 700; cursor: pointer; }
.table tr.grp:hover td { background: color-mix(in srgb, var(--accent) 8%, var(--surface-3)); }
.grp-caret { display: inline-block; width: 16px; color: var(--accent-t); transition: transform .2s; }
.table tr.grp.folded .grp-caret { transform: rotate(-90deg); }
[dir="rtl"] .table tr.grp.folded .grp-caret { transform: rotate(90deg); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-f { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text-2); font-weight: 650; font-size: 13px; transition: .2s var(--ease); }
.chip-f:hover { color: var(--text); border-color: var(--accent-200); }
.chip-f .n { font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--surface-3); color: var(--muted); font-weight: 800; }
.chip-f.on { background: var(--accent); color: var(--on-accent); border-color: transparent; box-shadow: var(--glow); }
.chip-f.on .n { background: rgba(0,0,0,.15); color: inherit; }
.chip-f .dot { width: 8px; height: 8px; }
.stock-filters { display: grid; gap: 10px; }

/* ---------- invoicing: document summary + line editor ---------- */
.kv-grid { padding: 16px 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px 22px; margin: 0; }
.kv-grid div { min-width: 0; }
.kv-grid dt { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 3px; }
.kv-grid dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }

/* ---------- product variants + costing */
.attr-row { display: grid; grid-template-columns: 200px 1fr auto; gap: 10px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.attr-row:last-child { border-bottom: 0; }
.chip-in { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 42px; padding: 5px 8px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface-2); cursor: text; }
.chip-in:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.chip-in input { flex: 1; min-width: 140px; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; height: 30px; }
.vchip { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 4px 0 11px; border-radius: 999px; background: var(--accent-100); color: var(--accent-t); font-weight: 700; font-size: 13px; border: 1px solid var(--accent-200); }
.vchip button { border: 0; background: transparent; color: inherit; font-size: 16px; line-height: 1; width: 22px; height: 22px; border-radius: 50%; cursor: pointer; }
.vchip button:hover { background: var(--accent); color: var(--on-accent); }
.vtable td { padding: 8px 12px; }
.vtable .input { height: 36px; }
.variant-box, .cost-box { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--line-strong); background: var(--surface-2); }
.cost-box { display: block; border-style: solid; }
@media (max-width: 720px) { .attr-row { grid-template-columns: 1fr auto; } .attr-row .chip-in { grid-column: 1 / -1; } }

/* ===================================================================== dashboard (2026 redesign) */
:root, html[data-theme="dark"] { --chart-line: #1fe3a0; }
html[data-theme="light"] { --chart-line: #0b9467; }
.page-body > section, .shortcuts { animation: fadeUp .5s var(--ease) both; }
.page-body > section:nth-of-type(2) { animation-delay: .06s } .page-body > section:nth-of-type(3) { animation-delay: .12s } .page-body > section:nth-of-type(4) { animation-delay: .18s }
.eyebrow { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; color: var(--text-2); }
.eyebrow .ic { color: var(--accent-t); }
.dchip { display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 800; background: var(--surface-3); color: var(--muted); }
.dchip.up { background: var(--good-50); color: var(--good); } .dchip.down { background: var(--bad-50); color: var(--bad); }

.shortcuts { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 14px; margin-bottom: 4px; scrollbar-width: thin; }
.shortcuts .sc { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 15px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: inherit; font-size: 13.5px; font-weight: 700; white-space: nowrap; cursor: pointer; text-decoration: none; transition: .2s var(--ease); box-shadow: var(--shadow-sm); }
.shortcuts .sc .ic { color: var(--accent-t); }
.shortcuts .sc:hover { border-color: var(--accent-200); transform: translateY(-1px); background: var(--accent-50); }
.shortcuts .sc.primary { background: var(--grad); color: var(--on-accent); border-color: transparent; box-shadow: var(--glow); }
.shortcuts .sc.primary .ic { color: var(--on-accent); }
.shortcuts .sc.munshi .ic { color: #c026d3; }

.dash-hero { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; margin-bottom: 14px; }
.hero-sales { padding: 22px 22px 12px; overflow: hidden; }
.hs-head { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.hs-val { font-family: var(--serif); font-size: 46px; font-weight: 400; letter-spacing: -.045em; line-height: 1.05; margin: 10px 0 8px; color: var(--ink); }
.hs-sub { display: flex; align-items: center; gap: 8px; font-size: 12.5px; flex-wrap: wrap; }
.hs-mini { display: grid; grid-template-columns: repeat(3, auto); gap: 0; align-self: flex-start; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.hs-mini > div { display: grid; gap: 3px; padding: 12px 18px; min-width: 120px; }
.hs-mini > div + div { border-inline-start: 1px solid var(--line); }
.hs-mini span { font-size: 11.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.hs-mini b { font-family: var(--serif); font-size: 21px; font-weight: 500; letter-spacing: -.02em; }
.hs-mini small { font-size: 11.5px; color: var(--muted); }
.hs-mini .dchip { justify-self: start; height: 19px; font-size: 10.5px; }

.area { position: relative; margin-top: 14px; }
.area svg { display: block; width: 100%; height: 230px; overflow: visible; touch-action: none; cursor: crosshair; }
.area .agrid line { stroke: var(--line); stroke-dasharray: 3 5; }
.area .afill { fill: url(#areaFill); }
.area .aline { fill: none; stroke: var(--chart-line); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.area .aaxis text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.area .across { stroke: var(--line-strong); stroke-width: 1; vector-effect: non-scaling-stroke; opacity: 0; }
.area .adot { fill: var(--surface); stroke: var(--chart-line); stroke-width: 3; opacity: 0; vector-effect: non-scaling-stroke; }
.area.hover .across, .area.hover .adot { opacity: 1; }
.atip { position: absolute; transform: translate(-50%, calc(-100% - 14px)); display: grid; gap: 1px; padding: 8px 12px; border-radius: 12px; background: var(--toast); color: #fff; font-size: 12px; box-shadow: var(--shadow-lg); pointer-events: none; opacity: 0; transition: opacity .12s; white-space: nowrap; }
.atip b { font-size: 15px; font-family: var(--serif); font-weight: 600; } .atip small { opacity: .75; }
.area.hover .atip { opacity: 1; }

.hero-side { display: grid; gap: 14px; align-content: start; }
.margin-card { display: flex; align-items: center; gap: 16px; padding: 18px; }
.mc-val { font-family: var(--serif); font-size: 26px; letter-spacing: -.03em; margin: 6px 0 2px; color: var(--ink); }
.ring { width: 84px; height: 84px; flex: none; }
.ring .rt { fill: none; stroke: var(--surface-3); stroke-width: 9; }
.ring .rv { fill: none; stroke: var(--chart-line); stroke-width: 9; stroke-linecap: round; transition: stroke-dasharray 1s var(--ease); }
.ring text { fill: var(--ink); font-family: var(--serif); font-size: 17px; font-weight: 600; }
.ledger { padding: 18px 18px 8px; }
.ledger .eyebrow { margin-bottom: 8px; }
.lg-row { display: flex; align-items: baseline; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.lg-row:last-child { border-bottom: 0; }
.lg-row span { font-weight: 650; font-size: 13.5px; } .lg-row small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 500; }
.lg-row i { flex: 1; border-bottom: 1px dotted var(--line-strong); transform: translateY(-4px); }
.lg-row b { font-size: 14.5px; } .lg-row b.warn { color: var(--warn); }
a.lg-row:hover span { color: var(--accent-t); }

.dash-grid { display: grid; gap: 14px; margin-bottom: 14px; }
.dash-grid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dash-grid.g2 { grid-template-columns: 1.4fr 1fr; }
.dpanel { padding: 18px; min-width: 0; }
.dp-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.dp-h h3 { margin: 0; font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
.dp-h a, .dp-h .muted { font-size: 12.5px; }
.dp-h a { color: var(--accent-t); text-decoration: none; font-weight: 700; }
.empty.sm { padding: 26px 10px; }

.heat { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; }
.hc { height: 52px; border-radius: 6px; background: color-mix(in srgb, var(--chart-line) var(--v), var(--surface-3)); position: relative; transition: transform .15s; }
.hc:hover { transform: translateY(-2px); outline: 2px solid var(--surface); box-shadow: 0 0 0 3px var(--chart-line); }
.hc span { position: absolute; left: 0; top: 58px; font-size: 10.5px; color: var(--muted); }
.heat-legend { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 26px; font-size: 11px; color: var(--muted); }
.heat-legend i { width: 90px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, color-mix(in srgb, var(--chart-line) 12%, var(--surface-3)), var(--chart-line)); }
.heat-rows { display: grid; gap: 6px; margin-top: 12px; }
.heat-rows div { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: baseline; font-size: 13px; padding: 7px 10px; border-radius: 10px; background: var(--surface-2); }
.heat-rows small { color: var(--muted); font-size: 11.5px; }

.pbars { display: grid; gap: 12px; }
.pb-row { display: grid; gap: 5px; }
.pb-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; font-weight: 650; }
.pb-row small { font-size: 11.5px; }
.rk-bar { display: block; height: 7px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.rk-bar i { display: block; height: 100%; border-radius: 99px; background: var(--chart-line); transform-origin: left; animation: growX .9s var(--ease) both; }
@keyframes growX { from { transform: scaleX(0); } }

.rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.rank li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 8px; border-radius: 12px; transition: background .15s; }
.rank li:hover { background: var(--surface-2); }
.rk { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: 12.5px; background: var(--surface-3); color: var(--text-2); }
.rank li:nth-child(1) .rk { background: var(--grad); color: var(--on-accent); }
.rank li:nth-child(2) .rk, .rank li:nth-child(3) .rk { background: var(--accent-100); color: var(--accent-t); }
.rk-main { display: grid; gap: 6px; min-width: 0; } .rk-main b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-num { text-align: end; display: grid; } .rk-num small { font-size: 11px; color: var(--muted); }

.stores { display: grid; gap: 16px; }
.store-row { display: grid; gap: 7px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); }
.sr-top { display: flex; align-items: baseline; gap: 8px; } .sr-top .muted { flex: 1; font-size: 12.5px; }
.sr-foot { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; flex-wrap: wrap; }

.plist { list-style: none; margin: 0; padding: 0; }
.plist li { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.plist li:last-child { border-bottom: 0; }
.plist li > div { flex: 1; min-width: 0; display: grid; } .plist li > div > * { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plist small { font-size: 11.5px; color: var(--muted); }
.plist a { color: inherit; text-decoration: none; } .plist a:hover { color: var(--accent-t); }
.pdot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }
.pdot.on { background: var(--good); box-shadow: 0 0 0 4px var(--good-50); } .pdot.warn { background: var(--warn); box-shadow: 0 0 0 4px var(--warn-50); } .pdot.bad { background: var(--bad); box-shadow: 0 0 0 4px var(--bad-50); }

@media (max-width: 1180px) { .dash-hero { grid-template-columns: 1fr; } .hero-side { grid-template-columns: 1fr 1fr; } .dash-grid.g3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .hero-side, .dash-grid.g3, .dash-grid.g2 { grid-template-columns: 1fr; } .hs-val { font-size: 36px; } .hs-mini { grid-template-columns: 1fr 1fr 1fr; width: 100%; } .hs-mini > div { min-width: 0; padding: 10px; } .heat { gap: 2px; } }

/* ===================================================================== product cards (kanban) */
.kanban.compact { grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 12px; }
.kcard.custom { padding: 0; }
.pc { display: flex; gap: 14px; padding: 14px 14px 14px 16px; min-height: 118px; }
.pc-info { flex: 1; min-width: 0; display: grid; align-content: start; gap: 3px; }
.pc-name { font-weight: 800; font-size: 14.5px; letter-spacing: -.01em; line-height: 1.3; }
.pc-sub { font-size: 12.5px; color: var(--text-2); } .pc-sub .mono { font-size: 11.5px; color: var(--muted); }
.pc-price { font-weight: 800; font-size: 14px; margin-top: 3px; font-family: var(--serif); }
.pc-stock { font-size: 12.5px; color: var(--text-2); } .pc-stock b { color: var(--ink); } .pc-stock.low b { color: var(--warn); } .pc-stock.neg b { color: var(--bad); }
.pc-cat { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.pc-cat .dot { width: 8px; height: 8px; border-radius: 50%; }
.pc-img { width: 78px; height: 78px; flex: none; border-radius: 12px; overflow: hidden; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; }
.pc-img img { width: 100%; height: 100%; object-fit: contain; }
.pc-img span { width: 100%; height: 100%; display: grid; place-items: center; font-family: var(--serif); font-weight: 700; font-size: 22px; color: #fff; background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 55%, #000)); }

/* =================================================================== chatter (history, messages, notes, attachments, activities) */
.page-body.with-chatter { grid-template-columns: minmax(0, 1fr); }
.doc-main { min-width: 0; display: grid; gap: 18px; align-content: start; }
.doc-chatter { min-width: 0; }
@media (min-width: 1380px) and (max-width: 1799px) { .page-body.with-chatter.chatter-late { grid-template-columns: minmax(0, 1fr); } .chatter-late .doc-chatter { position: static; max-height: none; } }
@media (min-width: 1380px) {
  .page-body.with-chatter { grid-template-columns: minmax(0, 1fr) 410px; align-items: start; }
  .doc-chatter { position: sticky; top: 72px; max-height: calc(100vh - 86px); overflow: auto; scrollbar-width: thin; border-radius: var(--radius); }
}
.chatter { background: var(--card-hi), var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px 18px; display: grid; gap: 12px; position: relative; transition: box-shadow .2s, border-color .2s; }
.chatter.compact { box-shadow: none; padding: 4px 0 0; border: 0; background: transparent; }
.chatter.drop { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-100); }
.chatter.drop::after { content: 'Drop files to attach'; position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; color: var(--accent-t); background: color-mix(in srgb, var(--surface) 82%, transparent); border-radius: inherit; pointer-events: none; }
.ch-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.ch-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.ch-btns .btn { height: 32px; font-size: 12.5px; }
.ch-meta { display: flex; align-items: center; gap: 2px; }
.ch-ic { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 8px; border: 0; background: transparent; border-radius: 9px; color: var(--text-2); font: inherit; font-size: 12.5px; font-weight: 650; cursor: pointer; }
.ch-ic:hover { background: var(--surface-3); color: var(--text); }
.ch-ic.on { color: var(--accent-t); }
.ch-ic.plain { cursor: default; } .ch-ic.plain:hover { background: transparent; color: var(--text-2); }
.ch-ic b { font-weight: 800; }
.ch-av { --s: 32px; width: var(--s); height: var(--s); border-radius: 50%; flex: none; display: grid; place-items: center; font-size: calc(var(--s) * .38); font-weight: 800; letter-spacing: -.02em;
  color: #fff; background: linear-gradient(135deg, hsl(var(--h) 62% 52%), hsl(calc(var(--h) + 35) 62% 42%)); box-shadow: 0 0 0 2px var(--surface); }
.ch-av.sys { background: var(--grad); color: var(--on-accent); }

/* composer */
.ch-composer { display: grid; gap: 8px; padding: 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); animation: fadeUp .25s var(--ease) both; }
.ch-composer.note { background: color-mix(in srgb, var(--warn) 6%, var(--surface-2)); border-color: color-mix(in srgb, var(--warn) 22%, var(--line)); }
.ch-crow { display: flex; gap: 10px; align-items: flex-start; }
.ch-cbox { flex: 1; min-width: 0; position: relative; display: grid; gap: 6px; }
.ch-to { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.ch-to b { color: var(--text-2); }
.ch-input { width: 100%; resize: vertical; min-height: 74px; font: inherit; font-size: 13.5px; line-height: 1.5; padding: 9px 11px; }
.ch-cfoot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding-left: 42px; }
.ch-cfoot .spacer { flex: 1; }
.ch-hint { font-size: 11.5px; color: var(--muted); }
.ch-pending { display: flex; flex-wrap: wrap; gap: 6px; }
.ch-pending:empty { display: none; }
.ch-chip { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 4px 0 9px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-strong); font-size: 12px; font-weight: 650; max-width: 220px; }
.ch-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-chip button { border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; cursor: pointer; }
.ch-chip button:hover { background: var(--bad-50); color: var(--bad); }
.ch-chip .hlc-spinner.sm { width: 16px; height: 16px; margin-right: 3px; }
.hlc-spinner.sm::after { inset: 5px; }
.ch-mpop { position: absolute; left: 0; top: calc(100% - 4px); z-index: 30; min-width: 240px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 5px; display: grid; }
.ch-mpop button { display: flex; align-items: center; gap: 9px; border: 0; background: transparent; padding: 7px 8px; border-radius: 9px; text-align: left; font: inherit; color: var(--text); cursor: pointer; }
.ch-mpop button span { display: grid; } .ch-mpop small { color: var(--muted); font-size: 11.5px; }
.ch-mpop button.on, .ch-mpop button:hover { background: var(--accent-100); }

/* attachments */
.ch-files { padding: 10px 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); display: grid; gap: 10px; }
.ch-fh { display: flex; align-items: center; justify-content: space-between; }
.ch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.ch-atts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ch-file { display: flex; align-items: center; gap: 8px; padding: 5px 6px 5px 5px; border-radius: 11px; background: var(--surface); border: 1px solid var(--line-strong); max-width: 260px; min-width: 0; }
.ch-file.big { max-width: none; }
.ch-fthumb { width: 38px; height: 38px; flex: none; border-radius: 8px; border: 0; background: var(--surface-3); color: var(--text-2); display: grid; place-items: center; overflow: hidden; cursor: pointer; padding: 0; }
.ch-file.big .ch-fthumb { width: 46px; height: 46px; }
.ch-fthumb img { width: 100%; height: 100%; object-fit: cover; }
.ch-fname { min-width: 0; flex: 1; display: grid; font-size: 12.5px; font-weight: 650; }
.ch-fname span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-fname small { color: var(--muted); font-weight: 600; font-size: 11px; }
.ch-fact { display: flex; }
.ch-fact button { border: 0; background: transparent; color: var(--muted); width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; cursor: pointer; }
.ch-fact button:hover { background: var(--surface-3); color: var(--text); }

/* planned activities */
.ch-acts:empty { display: none; }
.ch-acts { display: grid; gap: 6px; }
.ch-ah { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.ch-count { background: var(--surface-3); border-radius: 999px; padding: 1px 7px; color: var(--text-2); }
.ch-act { display: flex; gap: 10px; padding: 9px 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); border-left: 3px solid var(--good); }
.ch-act.overdue { border-left-color: var(--bad); } .ch-act.today { border-left-color: var(--warn); }
.ch-aic { position: relative; flex: none; height: 30px; }
.ch-atype { position: absolute; right: -4px; bottom: -4px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--good); color: #fff; box-shadow: 0 0 0 2px var(--surface-2); }
.ch-act.overdue .ch-atype { background: var(--bad); } .ch-act.today .ch-atype { background: var(--warn); }
.ch-abody { flex: 1; min-width: 0; display: grid; gap: 2px; font-size: 13px; }
.ch-due { color: var(--good); } .ch-act.overdue .ch-due { color: var(--bad); } .ch-act.today .ch-due { color: var(--warn); }
.ch-asub { font-size: 11.5px; color: var(--muted); }
.ch-anote { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.ch-abtns { display: flex; gap: 2px; margin-top: 4px; flex-wrap: wrap; }
.ch-abtns button { border: 0; background: transparent; font: inherit; font-size: 12px; font-weight: 700; color: var(--text-2); display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border-radius: 7px; cursor: pointer; }
.ch-abtns button:hover { background: var(--surface-3); color: var(--text); }
.ch-abtns button:first-child { color: var(--accent-t); }
.ch-donebox { display: grid; gap: 6px; margin-top: 6px; }
.ch-donebox .row { gap: 6px; flex-wrap: wrap; }

/* timeline */
.ch-feed { display: grid; gap: 4px; }
.ch-sep { display: flex; align-items: center; gap: 10px; margin: 8px 0 4px; font-size: 11.5px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.ch-sep::before, .ch-sep::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.ch-msg { display: flex; gap: 10px; padding: 7px 4px; border-radius: 12px; }
.ch-msg:hover { background: color-mix(in srgb, var(--surface-3) 45%, transparent); }
.ch-mb { flex: 1; min-width: 0; }
.ch-mh { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; font-size: 13px; }
.ch-mh time { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.ch-ago { font-size: 11px; color: var(--muted); opacity: .75; }
.ch-tag { font-size: 10.5px; font-weight: 800; padding: 1px 7px; border-radius: 999px; background: var(--warn-50); color: var(--warn); text-transform: uppercase; letter-spacing: .04em; }
.ch-tag.msg { background: var(--info-50); color: var(--info); }
.ch-del { margin-left: auto; border: 0; background: transparent; color: var(--muted); width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .15s; }
.ch-msg:hover .ch-del, .ch-del:focus-visible { opacity: 1; }
.ch-del:hover { background: var(--bad-50); color: var(--bad); }
.ch-bub { margin-top: 3px; font-size: 13.5px; line-height: 1.5; color: var(--text); overflow-wrap: anywhere; }
.k-note .ch-bub, .k-message .ch-bub { padding: 8px 11px; border-radius: 4px 12px 12px 12px; background: var(--surface-2); border: 1px solid var(--line); width: fit-content; max-width: 100%; }
.k-note .ch-bub { background: color-mix(in srgb, var(--warn) 7%, var(--surface-2)); border-color: color-mix(in srgb, var(--warn) 18%, var(--line)); }
.ch-mention { color: var(--accent-t); background: var(--accent-100); border-radius: 6px; padding: 0 4px; font-weight: 700; }
.ch-log { color: var(--text-2); font-size: 13px; }
.s-created .ch-log { font-weight: 650; color: var(--text); }
.ch-track { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.ch-track li { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; font-size: 13px; }
.ch-track .o { color: var(--muted); }
.ch-track .n { font-weight: 700; color: var(--text); }
.ch-track .arr { color: var(--accent-t); display: inline-grid; }
.ch-track em { color: var(--muted); font-style: normal; font-size: 12px; }
.ch-none { color: var(--muted); }
.ch-done { display: flex; gap: 8px; align-items: flex-start; padding: 7px 10px; border-radius: 10px; background: var(--good-50); color: var(--text); font-size: 13px; width: fit-content; max-width: 100%; }
.ch-done > .ic { color: var(--good); margin-top: 2px; flex: none; }
.ch-fb { margin-top: 3px; } .ch-fb span { font-weight: 700; color: var(--text-2); }
.ch-empty { color: var(--muted); font-size: 13px; padding: 14px 4px; text-align: center; }
.ch-empty.sm { padding: 6px 0; text-align: left; }
.ch-skel { display: grid; gap: 10px; } .ch-skel i { height: 38px; border-radius: 10px; background: linear-gradient(90deg, var(--skel-a), var(--skel-b), var(--skel-a)); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.ch-quick { display: inline-flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.ch-quick button { border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text-2); font: inherit; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; cursor: pointer; }
.ch-quick button:hover { border-color: var(--accent); color: var(--accent-t); }
.form-grid .tab-pane[data-tab="chatter"] { min-height: 300px; }

/* reminders bell */
.inbox { position: relative; }
.inbox-btn { position: relative; }
.inbox-badge { position: absolute; top: 1px; right: 0; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 10.5px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--surface); }
.inbox-badge.bad { background: var(--bad); color: #fff; animation: bellPulse 2.4s ease-in-out infinite; }
@keyframes bellPulse { 0%, 100% { box-shadow: 0 0 0 2px var(--surface), 0 0 0 0 color-mix(in srgb, var(--bad) 50%, transparent); } 50% { box-shadow: 0 0 0 2px var(--surface), 0 0 0 6px transparent; } }
.inbox-pop { position: absolute; right: -8px; top: calc(100% + 10px); width: min(400px, calc(100vw - 24px)); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 16px; box-shadow: var(--shadow-lg); z-index: 80; overflow: hidden; animation: pop .25s var(--spring); }
.inbox-tabs { display: flex; border-bottom: 1px solid var(--line); padding: 6px 6px 0; gap: 2px; }
.inbox-tabs button { flex: 1; border: 0; background: transparent; font: inherit; font-size: 12.5px; font-weight: 750; color: var(--muted); padding: 9px 6px 10px; border-bottom: 2px solid transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.inbox-tabs button.on { color: var(--text); border-bottom-color: var(--accent); }
.inbox-tabs span { background: var(--accent-100); color: var(--accent-t); border-radius: 999px; padding: 0 6px; font-size: 11px; }
.inbox-tabs span.bad { background: var(--bad-50); color: var(--bad); }
.inbox-list { max-height: min(460px, 60vh); overflow: auto; padding: 6px; }
.inbox-gh { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 8px 8px 4px; }
.inbox-gh.overdue { color: var(--bad); } .inbox-gh.today { color: var(--warn); }
.inbox-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 11px; color: var(--text); text-decoration: none; }
.inbox-item:hover { background: var(--surface-3); text-decoration: none; }
.inbox-ic { width: 32px; height: 32px; border-radius: 10px; flex: none; display: grid; place-items: center; background: var(--good-50); color: var(--good); }
.inbox-item.overdue .inbox-ic { background: var(--bad-50); color: var(--bad); } .inbox-item.today .inbox-ic { background: var(--warn-50); color: var(--warn); }
.inbox-tx { flex: 1; min-width: 0; display: grid; font-size: 13px; }
.inbox-tx b { font-weight: 650; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.inbox-tx small { color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-item.note:not(.unread) b { font-weight: 500; color: var(--text-2); }
.inbox-item.unread { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.inbox-due { font-size: 11.5px; font-weight: 750; color: var(--good); white-space: nowrap; }
.inbox-item.overdue .inbox-due { color: var(--bad); } .inbox-item.today .inbox-due { color: var(--warn); }
.inbox-empty { display: grid; justify-items: center; gap: 4px; padding: 28px 16px; text-align: center; color: var(--muted); font-size: 12.5px; }
.inbox-empty b { color: var(--text); font-size: 14px; }
.inbox-foot { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-top: 1px solid var(--line); font-size: 12.5px; font-weight: 700; }
.inbox-foot button { border: 0; background: transparent; font: inherit; color: var(--accent-t); cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }

/* reminder pop-ups */
.rem-stack { position: fixed; right: 22px; bottom: 100px; z-index: 45; /* under dialogs (50) so it never covers their buttons */ display: grid; gap: 10px; width: min(360px, calc(100vw - 32px)); }
.rem-card { position: relative; display: flex; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow-lg); animation: remIn .4s var(--spring) both; border-left: 4px solid var(--warn); }
.rem-card.out { animation: remOut .25s ease forwards; }
@keyframes remIn { from { opacity: 0; transform: translateY(16px) scale(.97); } }
@keyframes remOut { to { opacity: 0; transform: translateX(30px); } }
.rem-ic { width: 38px; height: 38px; border-radius: 12px; flex: none; display: grid; place-items: center; background: var(--warn-50); color: var(--warn); }
.rem-b { flex: 1; min-width: 0; display: grid; gap: 2px; font-size: 13px; }
.rem-b small { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--warn); }
.rem-b b { font-size: 14px; }
.rem-b > span { color: var(--muted); font-size: 12.5px; }
.rem-act { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.rem-x { position: absolute; top: 8px; right: 8px; border: 0; background: transparent; color: var(--muted); width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; cursor: pointer; }
.rem-x:hover { background: var(--surface-3); color: var(--text); }

/* activities page */
.act-tabs a b { margin-left: 4px; font-size: 11.5px; padding: 0 6px; border-radius: 999px; background: var(--surface-3); }
.act-tabs a.on b { background: rgba(0,0,0,.16); color: inherit; }
.act-tabs a b.bad { background: var(--bad-50); color: var(--bad); } .act-tabs a b.warn { background: var(--warn-50); color: var(--warn); }
.seg a { display: inline-flex; align-items: center; gap: 6px; height: 31px; padding: 0 12px; border-radius: 9px; font-weight: 650; font-size: 12.5px; color: var(--text-2); text-decoration: none; }
.seg a.on { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
.act-list { padding: 6px; }
.act-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) 170px 150px auto; align-items: center; gap: 14px; padding: 12px; border-radius: 12px; border-left: 3px solid var(--good); }
.act-row + .act-row { margin-top: 2px; }
.act-row:hover { background: var(--surface-2); }
.act-row.overdue { border-left-color: var(--bad); } .act-row.today { border-left-color: var(--warn); }
.act-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--good-50); color: var(--good); }
.act-row.overdue .act-ic { background: var(--bad-50); color: var(--bad); } .act-row.today .act-ic { background: var(--warn-50); color: var(--warn); }
.act-main { display: grid; min-width: 0; } .act-main b { color: var(--text); font-size: 14px; } .act-main small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-who { display: flex; align-items: center; gap: 8px; font-size: 13px; min-width: 0; }
.act-due { display: grid; font-size: 13px; } .act-due b { color: var(--good); } .act-row.overdue .act-due b { color: var(--bad); } .act-row.today .act-due b { color: var(--warn); }
.act-due small { color: var(--muted); }
.act-btns { display: flex; gap: 6px; }
@media (max-width: 900px) { .act-row { grid-template-columns: 40px minmax(0, 1fr); } .act-who, .act-due, .act-btns { grid-column: 2; } }
@media print { .doc-chatter, .inbox, .rem-stack { display: none !important; } .page-body.with-chatter { display: block; } }
.chatter [hidden], .inbox [hidden], .inbox-pop[hidden] { display: none !important; }

/* =================================================================== journals dashboard */
.jr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.jr-card { position: relative; padding: 16px 18px 14px; display: grid; gap: 14px; align-content: start; overflow: hidden; }
.jr-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--jc); }
.jr-head { display: flex; align-items: center; gap: 12px; }
.jr-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; color: var(--jc); background: color-mix(in srgb, var(--jc) 13%, var(--surface)); }
.jr-t { flex: 1; min-width: 0; display: grid; gap: 3px; } .jr-t b { font-size: 15px; } .jr-t small { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.jr-code { display: inline-flex; align-items: center; height: 19px; padding: 0 7px; border-radius: 6px; font: 700 11px/1 var(--mono); letter-spacing: .02em; color: var(--jc); background: color-mix(in srgb, var(--jc) 12%, transparent); border: 1px solid color-mix(in srgb, var(--jc) 28%, transparent); }
.jr-set { border: 0; background: transparent; color: var(--muted); width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; cursor: pointer; }
.jr-set:hover { background: var(--surface-3); color: var(--text); }
.jr-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; }
.jr-stats > div { display: grid; gap: 2px; padding: 10px 11px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.jr-stats span, .jr-bal span { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.jr-stats b { font-family: var(--serif); font-size: 17px; font-weight: 600; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jr-stats b.sm { font-family: var(--font); font-size: 12.5px; font-weight: 650; white-space: normal; letter-spacing: 0; }
.jr-stats small, .jr-bal small { font-size: 11.5px; color: var(--muted); }
.jr-stats .bad b { color: var(--bad); }
.jr-bal { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.jr-bal > div { display: grid; gap: 2px; } .jr-bal b { font-family: var(--serif); font-size: 21px; font-weight: 600; letter-spacing: -.025em; }
.jr-spark { width: 100%; height: 46px; display: block; }
.jr-spark .l { fill: none; stroke: var(--chart-line, var(--accent)); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.jr-spark .a { fill: color-mix(in srgb, var(--chart-line, var(--accent)) 12%, transparent); }
.jr-spark .p { fill: var(--chart-line, var(--accent)); stroke: var(--surface); stroke-width: 2; }
.jr-foot2 { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; font-weight: 650; }
.jr-acts { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--line); }
.jr-link { margin-left: auto; font-size: 12.5px; font-weight: 700; color: var(--text-2); display: inline-flex; align-items: center; gap: 3px; }
.note-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px; background: var(--info-50); color: var(--text); font-size: 13px; }
.note-bar.warn { background: var(--warn-50); }
.me-table td { vertical-align: middle; } .me-table .input { height: 38px; } .input.r { text-align: right; }

/* =================================================================== bank reconciliation */
.br-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.br-wrap { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 16px; align-items: start; }
.br-list { padding: 6px; max-height: calc(100vh - 290px); min-height: 360px; overflow: auto; position: sticky; top: 76px; }
.br-line { padding: 11px 12px; border-radius: 12px; cursor: pointer; display: grid; gap: 3px; border: 1px solid transparent; }
.br-line + .br-line { margin-top: 2px; }
.br-line:hover { background: var(--surface-2); }
.br-line.on { background: var(--accent-50); border-color: var(--accent-200); }
.br-line.reconciled { opacity: .78; }
.br-l1 { display: flex; align-items: center; gap: 7px; } .br-l1 .br-amt { margin-left: auto; }
.br-date { font-size: 12px; color: var(--muted); font-weight: 650; }
.br-l2 { font-weight: 650; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.br-l3 { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.br-amt { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.br-amt.in { color: var(--good); } .br-amt.out { color: var(--text); }
.br-panel { padding: 18px 20px; display: grid; gap: 14px; min-height: 360px; align-content: start; }
.br-ph { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.br-ph small { color: var(--muted); font-size: 12px; font-weight: 650; } .br-ph h2 { font-size: 18px; margin: 3px 0; letter-spacing: -.01em; }
.br-big { text-align: right; display: grid; font-family: var(--serif); font-size: 28px; font-weight: 600; letter-spacing: -.03em; white-space: nowrap; }
.br-big small { font-family: var(--font); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.br-big.in { color: var(--good); }
.br-tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; flex-wrap: wrap; }
.br-tabs button { flex: 1; border: 0; background: transparent; font: inherit; font-size: 13px; font-weight: 700; color: var(--text-2); padding: 8px 10px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; white-space: nowrap; }
.br-tabs button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line-strong); }
.br-sec { display: grid; gap: 10px; } .br-sec[hidden] { display: none; }
.br-st { display: flex; align-items: center; gap: 6px; font-weight: 800; color: var(--good); }
.br-hint { font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.br-items { display: grid; gap: 6px; }
.br-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; color: var(--text); text-decoration: none; font: inherit; text-align: left; width: 100%; }
.br-item > div { flex: 1; min-width: 0; display: grid; gap: 2px; font-size: 13px; }
.br-item small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.br-item:hover { border-color: var(--accent-200); text-decoration: none; }
.br-item.on { border-color: var(--accent); background: var(--accent-50); }
.br-item input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.br-item.done { background: var(--good-50); border-color: color-mix(in srgb, var(--good) 25%, transparent); }
.br-item.add { border-style: dashed; }
.br-search { display: grid; gap: 6px; } #br-found { display: grid; gap: 6px; }
.br-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.br-sum > div { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); display: grid; gap: 2px; }
.br-sum span { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.br-sum b { font-size: 16px; font-variant-numeric: tabular-nums; }
.br-sum .warn { background: var(--warn-50); } .br-sum .warn b { color: var(--warn); } .br-sum .ok { background: var(--good-50); } .br-sum .ok b { color: var(--good); }
.br-go { display: flex; align-items: center; gap: 8px; } .br-go .spacer, .toolbar .spacer { flex: 1; }
.br-prog { display: inline-block; width: 80px; height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; vertical-align: middle; margin-right: 6px; }
.br-prog i { display: block; height: 100%; background: var(--good); border-radius: 99px; }
.bi-drop { display: grid; justify-items: center; gap: 6px; padding: 46px 20px; text-align: center; border: 2px dashed var(--line-strong); cursor: pointer; transition: border-color .2s, background .2s; color: var(--text-2); }
.bi-drop:hover, .bi-drop.over { border-color: var(--accent); background: var(--accent-50); }
.bi-drop b { font-size: 16px; color: var(--text); }
tr.bi-bad td { color: var(--muted); background: var(--bad-50); }
.br-report h3 { margin: 22px 0 8px; font-size: 15px; }
.br-sumtbl { max-width: 760px; } .br-sumtbl td { padding: 9px 12px; }
.br-sumtbl tr.tot td { border-top: 2px solid var(--line-strong); }
.br-sumtbl tr.bad td { color: var(--bad); } .br-sumtbl tr.ok td { color: var(--good); }
.br-sign { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 60px; } .br-sign div { border-top: 1px solid var(--line-strong); padding-top: 8px; font-size: 12.5px; color: var(--muted); }
@media (max-width: 1000px) { .br-wrap { grid-template-columns: 1fr; } .br-list { position: static; max-height: 360px; } .br-kpis { grid-template-columns: 1fr; } }
.card > .pb { padding: 18px 20px; }
.pill-tabs a { display: inline-flex; align-items: center; gap: 6px; }
.br-it1 { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* =================================================================== browser print fallback (Ctrl+P on any page) */
@media print {
  @page { size: A4; margin: 12mm; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .appbar, .page-actions, .toolbar, .stock-filters, .no-print, .doc-chatter, .mj-root, .inbox, .rem-stack, .top-progress, .view-toggle, .toasts, .lic-banner { display: none !important; }
  body:has(#content .report-sheet) #content .page-head { display: none !important; }
  .page-head { padding: 0 0 10px; } .page-body { padding: 0 !important; }
  .page-body.with-chatter { display: block !important; }
  .kpis, .br-kpis { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)) !important; gap: 8px !important; }
  .kpi { padding: 8px 10px !important; border: 1px solid #ddd !important; break-inside: avoid; }
  .kpi .val { font-size: 17px !important; font-weight: 600 !important; white-space: nowrap; overflow: visible !important; text-overflow: clip !important; margin-top: 4px !important; }
  .kpi::before, .kpi::after { display: none !important; }
  .cols, .cols-2, .cols-3, .br-wrap { display: block !important; }
  .table { font-size: 10.5px; } .table th, .table td { padding: 5px 7px !important; }
  thead { display: table-header-group; } tr { break-inside: avoid; }
  h4, h3 { break-after: avoid; }
  .report-sheet h2 { font-size: 20px; }
  .brand-mark { display: none !important; }
  .dview, .kanban { overflow: visible !important; }
}

/* =================================================================== Point of Sale dashboard (tills) */
.pd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(460px, 1fr)); gap: 16px; }
.pd-card { position: relative; display: grid; grid-template-rows: auto auto 1fr; overflow: visible; padding: 0; }
.pd-card.is-open { box-shadow: inset 4px 0 0 var(--good), var(--shadow); }
.pd-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px 6px; }
.pd-name { flex: 1; min-width: 0; display: grid; }
.pd-name b { font-size: 18px; font-weight: 800; letter-spacing: -.015em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-name span { color: var(--muted); font-size: 12.5px; font-weight: 700; }
.pd-menu { position: relative; }
.pd-dots { border: 0; background: transparent; width: 32px; height: 32px; border-radius: 6px; display: grid; place-items: center; color: var(--text-2); cursor: pointer; }
.pd-dots:hover { background: var(--surface-3); }
.pd-pop { position: absolute; right: 0; top: 36px; z-index: 20; width: 240px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: var(--shadow-lg); padding: 5px; display: grid; }
.pd-pop[hidden] { display: none; }
.pd-pop a, .pd-pop button { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 6px; border: 0; background: none; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--text); text-align: start; cursor: pointer; text-decoration: none; }
.pd-pop a:hover, .pd-pop button:hover { background: var(--surface-3); text-decoration: none; }
.pd-pop .bad-t { color: var(--bad); }
.pd-body { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(0, 1.25fr); gap: 16px; padding: 8px 18px 12px; align-items: start; }
.pd-left { display: grid; gap: 10px; justify-items: start; }
.pd-open { height: 38px; padding: 0 18px; font-size: 14px; }
.pd-dev { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.pd-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); flex: none; }
.pd-dot.on { background: var(--good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 22%, transparent); }
.pd-who { font-size: 13px; }
.pd-info { display: grid; grid-template-columns: auto 1fr; gap: 5px 16px; margin: 0; font-size: 13.5px; }
.pd-info dt { color: var(--text-2); font-weight: 700; }
.pd-info dd { margin: 0; font-weight: 700; text-align: end; font-variant-numeric: tabular-nums; }
.pd-trend { border-top: 1px solid var(--line); padding: 10px 0 0; align-self: end; }
.pd-tl { display: flex; align-items: baseline; gap: 10px; padding: 0 18px; font-size: 12px; font-weight: 700; color: var(--text-2); flex-wrap: wrap; }
.pd-tl b { font-size: 15px; font-weight: 800; color: var(--ink); }
.pd-tl .muted { margin-inline-start: auto; font-weight: 600; }
.pd-chart { display: block; width: 100%; height: 118px; }
.pd-chart .a { fill: color-mix(in srgb, var(--primary, var(--accent)) 14%, transparent); }
.pd-chart .l { fill: none; stroke: var(--primary, var(--accent)); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.pd-chart .base { stroke: var(--line-strong); stroke-width: 1; vector-effect: non-scaling-stroke; }
.pd-chart circle { fill: var(--primary, var(--accent)); stroke: var(--surface); stroke-width: 2; vector-effect: non-scaling-stroke; opacity: 0; transition: opacity .12s; }
.pd-chart .pd-pt:hover circle { opacity: 1; }
.pd-chart .lbl { font-size: 11px; fill: var(--muted); font-family: var(--font); font-weight: 600; }
@media (max-width: 620px) { .pd-grid { grid-template-columns: 1fr; } .pd-body { grid-template-columns: 1fr; } }
.panel-card > .ph h3 { display: flex; align-items: center; gap: 8px; }

/* first sign-in: demo data yes / no */
.fs-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fs-opt { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1.5px solid var(--line-strong); border-radius: 10px; cursor: pointer; background: var(--surface); transition: border-color .15s, background .15s; }
.fs-opt:has(input:checked) { border-color: var(--primary, var(--accent-t)); background: color-mix(in srgb, var(--primary, var(--accent-t)) 7%, var(--surface)); }
.fs-opt input { margin-top: 3px; accent-color: var(--primary, var(--accent-t)); }
.fs-opt b { display: block; font-size: 14px; }
.fs-opt small { display: block; color: var(--text-2); font-size: 12px; line-height: 1.35; margin-top: 3px; }
@media (max-width: 560px) { .fs-choice { grid-template-columns: 1fr; } }
.fs-ready { font-size: 12.5px; line-height: 1.45; color: var(--text-2); background: color-mix(in srgb, var(--primary, var(--accent-t)) 7%, var(--surface)); border: 1px solid color-mix(in srgb, var(--primary, var(--accent-t)) 25%, var(--line)); border-radius: 10px; padding: 10px 12px; }
.fs-ready b { color: var(--text); }

/* ---------------------------------------------------------------- phones: compact top bar (both looks) */
@media (max-width: 720px) {
  .appbar { gap: 6px; }
  .appbar .user-menu { margin-bottom: 6px; }
  .appbar #inbox-host { margin-bottom: 6px; }
  .page-head { gap: 10px; }
  .page-head .sub { font-size: 12.5px; }
  .user-pop { position: fixed; top: 56px; inset-inline-end: 8px; width: min(280px, calc(100vw - 16px)); }
}
@media (max-width: 480px) {
  .appbar #snd { display: none; }
  .appbar .home-btn, .appbar .icon-btn, .appbar .switch-btn, .appbar .top-search { width: 36px; min-width: 36px; height: 36px; padding: 0; }
  .appbar .switch-btn.lang { width: auto; min-width: 44px; padding: 0 8px; }
  .appbar .user-btn .av { width: 34px; height: 34px; }
  .page-body { padding: 14px 12px 40px; gap: 14px; }
  .page-head { padding-left: 12px; padding-right: 12px; }
}
/* phones: one reminder at a time, compact, beside the Munshi button instead of over the page */
@media (max-width: 720px) {
  .rem-stack { left: 10px; right: 82px; bottom: 12px; width: auto; }
  .rem-stack > .rem-card:not(:first-child) { display: none; }
  .rem-stack > .rem-card:first-child:not(:last-child) { box-shadow: var(--shadow-lg), 0 6px 0 -2px var(--surface-2), 0 6px 0 -1px var(--line-strong); }
  .rem-card { padding: 10px 12px; gap: 10px; }
  .rem-ic { width: 32px; height: 32px; }
  .rem-b > span { display: none; }
  .rem-act { margin-top: 6px; }
  .rem-act .btn { height: 30px; padding: 0 10px; font-size: 12.5px; }
}
/* segmented buttons & pill tabs never wrap their words — they scroll sideways on narrow screens */
.seg, .pill-tabs { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar, .pill-tabs::-webkit-scrollbar { display: none; }
.seg button, .seg a, .pill-tabs a, .pill-tabs button { white-space: nowrap; flex: none; }
@media (max-width: 900px) {
  .appbar { flex-wrap: wrap; height: auto; padding: 8px 12px 0; } .app-menu { order: 10; width: 100%; border: 0; padding: 0; margin: 0; }
  [data-look="classic"] .appbar > *, .appbar > * { margin-bottom: 0 !important; }
  .appbar { row-gap: 6px; padding-bottom: 0; }
  .appbar:has(.app-menu:empty) { padding-bottom: 6px; }
}
/* forms inside dialogs never push past the dialog edge */
.form-grid > *, .modal-body .field, .modal-body .row > * { min-width: 0; }
@media (max-width: 560px) {
  .img-field { grid-template-columns: 1fr; justify-items: start; }
  .img-drop, .img-drop img { width: 120px; height: 120px; }
}
/* while a dialog is open the Munshi button and reminders step aside so they never cover Save / Cancel */
body:has(.modal-wrap) .mj-root:not(:has(.mj-panel[aria-hidden="false"])), body:has(.modal-wrap) .rem-stack { display: none; }
