/* Champion v10 theme: deep navy surfaces, one accent per meaning, soft glow on key cards.
   Loaded after style.css and navigation_v8.css; every rule is scoped to body.theme-v10. */
:root {
  --c-bg: #070b18;
  --c-bg-2: #0a1022;
  --c-panel: #0c1328;
  --c-panel-2: #101935;
  --c-panel-3: #141f40;
  --c-line: #1b2648;
  --c-line-2: #26335c;
  --c-text: #eef1fb;
  --c-text-2: #c3cbe4;
  --c-muted: #8790b0;
  --c-primary: #5b47ff;
  --c-primary-2: #7a5cff;
  --c-primary-soft: rgba(91, 71, 255, .16);
  --c-green: #22d37f;
  --c-blue: #3d8bff;
  --c-amber: #f5a524;
  --c-red: #ff4d5e;
  --c-purple: #9b6bff;
  --c-cyan: #22c7e8;
  --c-radius: 14px;
  --c-radius-sm: 10px;
  --c-shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --c-font: Inter, "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
}

/* ---------- base ---------- */
body.theme-v10 {
  background: radial-gradient(1200px 600px at 70% -10%, rgba(91, 71, 255, .10), transparent 60%), var(--c-bg);
  color: var(--c-text);
  font-family: var(--c-font);
}
body.theme-v10 .shell { background: transparent; }
body.theme-v10 .main { background: transparent; }
body.theme-v10 .content { padding: 22px 26px 40px; }
body.theme-v10 a { color: inherit; }
body.theme-v10 h1, body.theme-v10 h2, body.theme-v10 h3 { color: var(--c-text); letter-spacing: -.01em; }
body.theme-v10 :focus-visible { outline: 2px solid var(--c-primary-2); outline-offset: 2px; }

/* ---------- sidebar ---------- */
body.theme-v10 .sidebar {
  background: linear-gradient(180deg, #0a1124, #070c1b);
  border-right: 1px solid var(--c-line);
  box-shadow: none;
}
body.theme-v10 .sidebar .brand { padding: 22px 20px 14px; border-bottom: 0; background: transparent; }
body.theme-v10 .sidebar .brand img { max-height: 46px; width: auto; }
body.theme-v10 .sidebar-art { display: none; }
body.theme-v10 .cnav { padding: 6px 12px 16px; }
body.theme-v10 .cnav-label {
  margin: 18px 10px 8px; font-size: 11px; font-weight: 700; letter-spacing: .16em;
  color: var(--c-muted); text-transform: uppercase;
}
body.theme-v10 .cnav-group { margin: 2px 0; border: 0; }
body.theme-v10 .cnav-group > summary { list-style: none; }
body.theme-v10 .cnav-group > summary::-webkit-details-marker { display: none; }
body.theme-v10 .cnav-item,
body.theme-v10 .sidebar nav .cnav-item {
  display: flex; align-items: center; gap: 14px; min-height: 46px; padding: 0 14px;
  border-radius: 10px; border: 1px solid transparent; color: var(--c-text-2);
  font-size: 15px; font-weight: 500; text-decoration: none; cursor: pointer; background: transparent;
  transition: background .15s, border-color .15s, color .15s;
}
body.theme-v10 .sidebar nav .cnav-item:hover { background: rgba(255, 255, 255, .04); color: var(--c-text); }
body.theme-v10 .cnav-item svg { width: 22px; height: 22px; flex: 0 0 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
body.theme-v10 .cnav-item .cnav-chev { margin-left: auto; width: 14px; height: 14px; flex-basis: 14px; opacity: .55; transition: transform .2s; }
body.theme-v10 .cnav-group[open] > summary .cnav-chev { transform: rotate(90deg); }
body.theme-v10 .sidebar nav .cnav-item.active,
body.theme-v10 .sidebar nav .cnav-group.has-active > summary {
  color: #fff; background: linear-gradient(90deg, rgba(91, 71, 255, .95), rgba(76, 58, 235, .85));
  border-color: rgba(140, 120, 255, .55); box-shadow: 0 6px 22px rgba(91, 71, 255, .35);
}
body.theme-v10 .cnav-sub { display: grid; gap: 1px; margin: 4px 0 8px 22px; padding-left: 14px; border-left: 1px solid var(--c-line-2); }
body.theme-v10 .cnav-sub a,
body.theme-v10 .sidebar nav .cnav-sub a {
  display: block; padding: 8px 10px; border-radius: 8px; font-size: 13.5px; color: var(--c-muted);
  text-decoration: none; min-height: 0; border: 0; background: transparent;
}
body.theme-v10 .sidebar nav .cnav-sub a:hover { color: var(--c-text); background: rgba(255, 255, 255, .04); }
body.theme-v10 .sidebar nav .cnav-sub a.active { color: #fff; background: var(--c-primary-soft); font-weight: 600; border: 0; box-shadow: inset 2px 0 0 var(--c-primary-2); }
body.theme-v10 .cnav-divider { height: 1px; margin: 16px 10px 0; background: var(--c-line); }
body.theme-v10 .sidebar-footer {
  display: grid; grid-template-columns: 18px 1fr; gap: 6px 10px; align-items: center;
  margin: 0 12px 14px; padding: 14px 12px 4px; border-top: 1px solid var(--c-line); background: transparent;
  color: var(--c-text-2); font-size: 13px;
}
body.theme-v10 .sidebar-footer svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
body.theme-v10 .sidebar-footer .status-dot { width: 12px; height: 12px; margin-left: 3px; border-radius: 50%; background: var(--c-green); box-shadow: 0 0 10px var(--c-green); }
body.theme-v10 .sidebar-footer small { color: var(--c-text-2); font-size: 13px; }

/* ---------- topbar ---------- */
body.theme-v10 .topbar {
  background: rgba(8, 12, 26, .85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--c-line); min-height: 64px; padding: 0 22px; gap: 16px;
}
body.theme-v10 .global-search {
  flex: 1; max-width: 920px; height: 44px; padding: 0 8px 0 14px; gap: 10px;
  background: var(--c-panel); border: 1px solid var(--c-line-2); border-radius: 10px;
}
body.theme-v10 .global-search input { background: transparent; border: 0; color: var(--c-text); font-size: 14.5px; box-shadow: none; }
body.theme-v10 .global-search input::placeholder { color: var(--c-muted); }
body.theme-v10 .topbar .global-search button[type="submit"] { display: none; }
body.theme-v10 .content .global-search { max-width: none; }
body.theme-v10 .global-search button,
body.theme-v10 .pos-search-button {
  background: linear-gradient(90deg, var(--c-primary), var(--c-primary-2)); border: 1px solid rgba(150, 130, 255, .6);
  color: #fff; border-radius: 8px; box-shadow: 0 4px 14px rgba(91, 71, 255, .35);
}
body.theme-v10 .global-search .kbd {
  padding: 3px 8px; border: 1px solid var(--c-line-2); border-radius: 6px; color: var(--c-muted);
  font-size: 12px; white-space: nowrap; background: var(--c-panel-2);
}
body.theme-v10 .top-actions { gap: 10px; }
body.theme-v10 .top-icon,
body.theme-v10 .currency-switch {
  background: transparent; border: 1px solid transparent; border-radius: 10px; color: var(--c-text-2);
}
body.theme-v10 .currency-switch { border-color: var(--c-line-2); background: var(--c-panel); padding: 0 12px; height: 40px; font-weight: 600; }
body.theme-v10 .top-icon:hover { background: rgba(255, 255, 255, .05); color: #fff; }
body.theme-v10 .notify summary i { background: var(--c-red); box-shadow: 0 0 10px rgba(255, 77, 94, .7); }
body.theme-v10 .profile-menu summary { border-left: 1px solid var(--c-line); padding-left: 14px; }
body.theme-v10 .avatar { background: var(--c-primary-soft); color: #d9d3ff; border: 1px solid rgba(140, 120, 255, .45); }
body.theme-v10 .drop-panel { background: var(--c-panel-2); border: 1px solid var(--c-line-2); border-radius: 12px; box-shadow: var(--c-shadow); }
body.theme-v10 .drop-panel a:hover { background: var(--c-primary-soft); }
body.theme-v10 .champion-connection-bar { display: none; }
body.theme-v10 .champion-connection-bar.offline,
body.theme-v10 .champion-connection-bar.update-ready { display: flex; }

/* ---------- surfaces ---------- */
body.theme-v10 .card,
body.theme-v10 .panel,
body.theme-v10 .ops-panel,
body.theme-v10 .ws-panel,
body.theme-v10 .ops-kpi,
body.theme-v10 .kpi,
body.theme-v10 .ws-kpi,
body.theme-v10 .report-kpi,
body.theme-v10 .login-card {
  background: linear-gradient(180deg, var(--c-panel-2), var(--c-panel));
  border: 1px solid var(--c-line);
  border-radius: var(--c-radius);
  box-shadow: var(--c-shadow);
  color: var(--c-text);
}
body.theme-v10 .page-head h1,
body.theme-v10 .operations-heading h1 { font-size: 24px; font-weight: 700; }
body.theme-v10 .page-head p,
body.theme-v10 .operations-heading p,
body.theme-v10 .muted,
body.theme-v10 small { color: var(--c-muted); }

/* ---------- buttons ---------- */
body.theme-v10 .btn,
body.theme-v10 button.btn {
  background: var(--c-panel-2); border: 1px solid var(--c-line-2); color: var(--c-text);
  border-radius: 10px; font-weight: 600; box-shadow: none;
}
body.theme-v10 .btn:hover { border-color: #3a4a80; background: var(--c-panel-3); }
body.theme-v10 .btn.primary,
body.theme-v10 button.primary,
body.theme-v10 .btn-primary {
  background: linear-gradient(90deg, var(--c-primary), var(--c-primary-2)); border-color: rgba(150, 130, 255, .6);
  color: #fff; box-shadow: 0 6px 20px rgba(91, 71, 255, .35);
}
body.theme-v10 .btn.primary:hover { filter: brightness(1.08); }
body.theme-v10 .btn.danger,
body.theme-v10 button.danger { background: rgba(255, 77, 94, .12); border-color: rgba(255, 77, 94, .5); color: #ffb3bb; }

body.theme-v10 .ws-drag-hint { margin: 0 0 10px; color: var(--c-muted); font-size: 13px; }
body.theme-v10 .ws-drag-hint[data-tone="ok"] { color: var(--c-green); }
body.theme-v10 .ws-drag-hint[data-tone="error"] { color: #ffb3bb; }
body.theme-v10 .ws-job[draggable="true"] { cursor: grab; }
body.theme-v10 .ws-job.dragging { opacity: .45; }
body.theme-v10 .ws-job.urgent { box-shadow: inset 3px 0 0 var(--c-red); }
body.theme-v10 .ws-job.high { box-shadow: inset 3px 0 0 var(--c-amber); }
body.theme-v10 .ws-col.drop-target { outline: 2px dashed var(--c-primary-2); outline-offset: -4px; background: rgba(91, 71, 255, .08); }
body.theme-v10 .ws-age { display: inline-block; margin-top: 6px; padding: 1px 7px; border-radius: 999px; background: var(--c-panel-3); color: var(--c-text-2); font-size: 11px; }
body.theme-v10 .ws-age.late { background: rgba(245, 165, 36, .15); color: #ffd27a; }
body.theme-v10 .is-busy { position: relative; pointer-events: none; opacity: .75; }
body.theme-v10 .is-busy::after {
  content: ""; display: inline-block; width: 14px; height: 14px; margin-left: 10px; vertical-align: -2px;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: c-spin .7s linear infinite;
}
@keyframes c-spin { to { transform: rotate(360deg); } }
body.theme-v10 .pos-shortcuts { margin: 10px 0 0; color: var(--c-muted); font-size: 12.5px; text-align: center; }
body.theme-v10 kbd { padding: 1px 6px; border: 1px solid var(--c-line-2); border-bottom-width: 2px; border-radius: 5px; background: var(--c-panel-2); color: var(--c-text-2); font: 600 11px/1.6 var(--c-font); }

/* ---------- forms ---------- */
body.theme-v10 input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
body.theme-v10 select,
body.theme-v10 textarea {
  background: var(--c-bg-2); border: 1px solid var(--c-line-2); color: var(--c-text); border-radius: 10px;
}
body.theme-v10 input:focus,
body.theme-v10 select:focus,
body.theme-v10 textarea:focus { border-color: var(--c-primary-2); box-shadow: 0 0 0 3px rgba(122, 92, 255, .2); outline: none; }
body.theme-v10 label { color: var(--c-text-2); }

/* ---------- tables ---------- */
body.theme-v10 table { border-color: var(--c-line); }
body.theme-v10 th {
  background: rgba(255, 255, 255, .02); color: var(--c-muted); font-size: 12px; font-weight: 600;
  letter-spacing: .02em; border-bottom: 1px solid var(--c-line);
}
body.theme-v10 td { border-bottom: 1px solid var(--c-line); color: var(--c-text-2); }
body.theme-v10 tbody tr:hover td { background: rgba(91, 71, 255, .05); }
body.theme-v10 .table-wrap { border: 1px solid var(--c-line); border-radius: var(--c-radius); background: var(--c-panel); }
body.theme-v10 .table-wrap thead th { position: sticky; top: 0; z-index: 1; background: var(--c-panel-2); }

/* ---------- status colours: one meaning each ---------- */
body.theme-v10 .ok, body.theme-v10 .good, body.theme-v10 .active, body.theme-v10 .healthy { --tone: var(--c-green); }
body.theme-v10 .warning, body.theme-v10 .warn, body.theme-v10 .pending, body.theme-v10 .low { --tone: var(--c-amber); }
body.theme-v10 .bad, body.theme-v10 .danger, body.theme-v10 .revoked, body.theme-v10 .out { --tone: var(--c-red); }
body.theme-v10 .alert { border-radius: 12px; border: 1px solid var(--c-line-2); background: var(--c-panel-2); }
body.theme-v10 .alert.error, body.theme-v10 .sale-error-banner { border-color: rgba(255, 77, 94, .5); background: rgba(255, 77, 94, .08); color: #ffc2c8; }
body.theme-v10 .alert.success { border-color: rgba(34, 211, 127, .45); background: rgba(34, 211, 127, .08); color: #b5f5d4; }
body.theme-v10 .empty-state { border: 1px dashed var(--c-line-2); border-radius: var(--c-radius); color: var(--c-muted); background: transparent; }

/* ---------- mobile ---------- */
body.theme-v10 .mobile-bottom-nav { background: rgba(8, 12, 26, .95); border-top: 1px solid var(--c-line); }
body.theme-v10 .mobile-bottom-nav a.active { color: #fff; background: var(--c-primary-soft); border-color: rgba(140, 120, 255, .45); box-shadow: none; }
body.theme-v10 .mobile-bottom-nav a.active svg { color: var(--c-primary-2); }
@media (max-width: 980px) {
  body.theme-v10 .content { padding: 16px 16px 90px; }
  body.theme-v10 .global-search .kbd { display: none; }
}

/* =================================================================
   Dashboard (Operations analytics)
   ================================================================= */
.theme-v10 .cd { display: grid; gap: 18px; }
.theme-v10 .cd-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.theme-v10 .cd-head h1 { margin: 0; font-size: 24px; }
.theme-v10 .cd-head .cd-date { color: var(--c-text-2); font-size: 15px; }
.theme-v10 .cd-head .cd-tools { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.theme-v10 .cd-chip {
  display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px;
  background: var(--c-panel); border: 1px solid var(--c-line-2); border-radius: 10px; color: var(--c-text-2);
  font-size: 14px; text-decoration: none;
}
.theme-v10 .cd-chip svg, .theme-v10 .cd-ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.theme-v10 .cd-state { color: var(--c-green); border-color: rgba(34, 211, 127, .35); }
.theme-v10 .cd-state.warning { color: var(--c-amber); border-color: rgba(245, 165, 36, .4); }

.theme-v10 .cd-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.theme-v10 .cd-main, .theme-v10 .cd-side { display: grid; gap: 18px; min-width: 0; }

/* glow KPI cards */
.theme-v10 .cd-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.theme-v10 .cd-kpi {
  --tone: var(--c-blue); position: relative; display: block; padding: 18px 18px 16px; min-width: 0;
  border-radius: var(--c-radius); text-decoration: none; color: var(--c-text);
  background: radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--tone) 22%, transparent), transparent 60%), var(--c-panel);
  border: 1px solid color-mix(in srgb, var(--tone) 55%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--tone) 10%, transparent), 0 10px 30px color-mix(in srgb, var(--tone) 14%, transparent);
}
.theme-v10 .cd-kpi.green { --tone: var(--c-green); }
.theme-v10 .cd-kpi.blue { --tone: var(--c-blue); }
.theme-v10 .cd-kpi.amber { --tone: var(--c-amber); }
.theme-v10 .cd-kpi.purple { --tone: var(--c-purple); }
.theme-v10 .cd-kpi-top { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; white-space: nowrap; }
.theme-v10 .cd-kpi-top .cd-ico { width: 26px; height: 26px; color: var(--tone); }
.theme-v10 .cd-period { margin-left: auto; padding: 3px 8px; border: 1px solid var(--c-line-2); border-radius: 6px; font-size: 11px; font-weight: 500; color: var(--c-muted); white-space: nowrap; }
.theme-v10 .cd-kpi strong { display: block; margin: 16px 0 6px; font-size: 32px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.theme-v10 .cd-kpi small { display: block; color: var(--c-text-2); font-size: 13px; }

/* panels */
.theme-v10 .cd-panel {
  background: linear-gradient(180deg, var(--c-panel-2), var(--c-panel)); border: 1px solid var(--c-line);
  border-radius: var(--c-radius); padding: 18px; min-width: 0; box-shadow: var(--c-shadow);
}
.theme-v10 .cd-panel-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.theme-v10 .cd-panel-head .cd-ico { width: 26px; height: 26px; color: var(--c-blue); }
.theme-v10 .cd-panel-head h2 { margin: 0; font-size: 18px; font-weight: 700; }
.theme-v10 .cd-panel-head p { margin: 2px 0 0; color: var(--c-muted); font-size: 13px; }
.theme-v10 .cd-panel-head .cd-head-link { margin-left: auto; color: #8fb4ff; font-size: 14px; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.theme-v10 .cd-panel-head .cd-head-link:hover { text-decoration: underline; }

.theme-v10 .cd-plain { text-decoration: none; color: inherit; }
.theme-v10 .cd-main > .payment-overview { padding: 0; background: transparent; border: 0; box-shadow: none; display: grid; gap: 12px; }
.theme-v10 .cd-main > .payment-overview .payment-explainer { padding: 0 4px; border: 0; background: transparent; font-size: 13px; }
.theme-v10 .cd-main > .payment-overview .payment-cost-warning { display: flex; align-items: center; gap: 10px; margin: 0; padding: 12px 14px; border-color: rgba(245, 165, 36, .45); background: rgba(245, 165, 36, .08); color: #ffd99a; }
.theme-v10 .cd-row2 { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; }

/* revenue */
.theme-v10 .cd-seg { margin-left: auto; display: inline-flex; padding: 3px; border: 1px solid var(--c-line-2); border-radius: 10px; background: var(--c-bg-2); }
.theme-v10 .cd-seg button { all: unset; cursor: pointer; padding: 7px 18px; border-radius: 8px; font-size: 14px; color: var(--c-text-2); }
.theme-v10 .cd-seg button[aria-pressed="true"] { background: var(--c-primary); color: #fff; box-shadow: 0 4px 14px rgba(91, 71, 255, .4); }
.theme-v10 .cd-seg button:focus-visible { outline: 2px solid var(--c-primary-2); }
.theme-v10 .cd-rev-total { display: flex; align-items: baseline; gap: 16px; margin: 4px 0 8px; }
.theme-v10 .cd-rev-total strong { font-size: 32px; font-weight: 750; font-variant-numeric: tabular-nums; }
.theme-v10 .cd-rev-total span { color: var(--c-text-2); }
.theme-v10 .cd-chart { position: relative; height: 230px; }
.theme-v10 .cd-chart svg { width: 100%; height: 100%; overflow: visible; }
.theme-v10 .cd-chart .grid line { stroke: var(--c-line); stroke-dasharray: 3 5; }
.theme-v10 .cd-chart .area { fill: url(#cdArea); }
.theme-v10 .cd-chart .line { fill: none; stroke: var(--c-cyan); stroke-width: 2.5; filter: drop-shadow(0 0 6px rgba(34, 199, 232, .6)); }
.theme-v10 .cd-chart .prev { fill: none; stroke: var(--c-muted); stroke-width: 1.5; stroke-dasharray: 4 5; opacity: .6; }
.theme-v10 .cd-chart .pt { fill: var(--c-cyan); }
.theme-v10 .cd-chart .pt.last { fill: #0b1736; stroke: var(--c-cyan); stroke-width: 3; }
.theme-v10 .cd-chart .ylab, .theme-v10 .cd-chart .xlab { fill: var(--c-muted); font-size: 12px; }
.theme-v10 .cd-chart .empty { fill: var(--c-text-2); font-size: 14px; }
.theme-v10 .cd-mini { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.theme-v10 .cd-mini div { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--c-line); border-radius: 12px; background: var(--c-bg-2); min-width: 0; }
.theme-v10 .cd-mini .cd-ico { width: 30px; height: 30px; color: var(--c-blue); flex: 0 0 30px; }
.theme-v10 .cd-mini span { display: block; color: var(--c-text-2); font-size: 13px; }
.theme-v10 .cd-mini b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }

/* inventory health */
.theme-v10 .cd-donut {
  --d1: 180deg; --d2: 270deg; width: 170px; height: 170px; margin: 6px auto 16px; border-radius: 50%;
  background: conic-gradient(var(--c-green) 0 var(--d1), var(--c-amber) var(--d1) var(--d2), var(--c-red) var(--d2) 360deg);
  display: grid; place-items: center; filter: drop-shadow(0 0 12px rgba(34, 211, 127, .25));
}
.theme-v10 .cd-donut > div { width: 130px; height: 130px; border-radius: 50%; background: var(--c-panel); display: grid; place-content: center; text-align: center; }
.theme-v10 .cd-donut strong { font-size: 30px; }
.theme-v10 .cd-donut span { color: var(--c-text-2); font-size: 13px; }
.theme-v10 .cd-donut.empty { background: var(--c-line-2); filter: none; }
.theme-v10 .cd-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.theme-v10 .cd-table th, .theme-v10 .cd-table td { padding: 9px 8px; text-align: left; background: transparent; }
.theme-v10 .cd-table td:not(:first-child), .theme-v10 .cd-table th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.theme-v10 .cd-dot { display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 50%; background: var(--tone); box-shadow: 0 0 8px var(--tone); }

.theme-v10 .cd-wide-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; margin-top: 14px;
  border-radius: 10px; text-decoration: none; font-weight: 600; color: #fff;
  background: linear-gradient(90deg, var(--c-primary), var(--c-primary-2)); box-shadow: 0 6px 20px rgba(91, 71, 255, .35);
}
.theme-v10 .cd-wide-btn.ghost { background: transparent; color: #9fbcff; border: 1px solid rgba(61, 139, 255, .55); box-shadow: none; }

/* module tiles */
.theme-v10 .cd-modules { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.theme-v10 .cd-module {
  --tone: var(--c-blue); display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--c-radius);
  text-decoration: none; color: var(--c-text); min-width: 0;
  background: linear-gradient(90deg, color-mix(in srgb, var(--tone) 16%, transparent), transparent 80%), var(--c-panel);
  border: 1px solid color-mix(in srgb, var(--tone) 45%, transparent);
}
.theme-v10 .cd-module.green { --tone: var(--c-green); }
.theme-v10 .cd-module.purple { --tone: var(--c-purple); }
.theme-v10 .cd-module.amber { --tone: var(--c-amber); }
.theme-v10 .cd-module .cd-ico { width: 32px; height: 32px; color: var(--tone); flex: 0 0 32px; }
.theme-v10 .cd-module b { display: block; font-size: 16px; }
.theme-v10 .cd-module small { display: block; font-size: 13px; color: var(--c-text-2); }
.theme-v10 .cd-module .cd-arrow { margin-left: auto; color: var(--c-text-2); font-size: 20px; }
.theme-v10 .cd-module:hover { filter: brightness(1.12); }

/* workshop pipeline */
.theme-v10 .cd-pipe { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px; position: relative; }
.theme-v10 .cd-stage {
  --tone: var(--c-blue); position: relative; display: flex; align-items: center; gap: 14px; padding: 16px 14px 14px;
  border: 1px solid var(--c-line); border-radius: 12px; background: var(--c-bg-2); text-decoration: none; color: var(--c-text); min-width: 0;
}
.theme-v10 .cd-stage + .cd-stage::before { content: "\2192"; position: absolute; left: -21px; top: 50%; transform: translateY(-50%); color: var(--c-muted); }
.theme-v10 .cd-stage .n { position: absolute; top: 6px; left: 10px; font-size: 11px; font-weight: 700; color: var(--c-muted); }
.theme-v10 .cd-stage .cd-ico { width: 34px; height: 34px; flex: 0 0 34px; color: var(--tone); }
.theme-v10 .cd-stage.s2 { --tone: var(--c-blue); }
.theme-v10 .cd-stage.s3 { --tone: var(--c-amber); }
.theme-v10 .cd-stage.s4 { --tone: var(--c-green); }
.theme-v10 .cd-stage b { display: block; font-size: 14px; }
.theme-v10 .cd-stage strong { display: block; font-size: 22px; }
.theme-v10 .cd-stage small { display: block; font-size: 12px; color: var(--c-muted); }
.theme-v10 .cd-stage-jobs { margin-top: 6px; display: grid; gap: 4px; }
.theme-v10 .cd-stage-jobs a { font-size: 12px; color: var(--c-text-2); text-decoration: none; }
.theme-v10 .cd-foot { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-top: 14px; padding: 12px 16px; border: 1px solid var(--c-line); border-radius: 12px; background: var(--c-bg-2); color: var(--c-text-2); }
.theme-v10 .cd-foot b { color: var(--c-text); font-size: 18px; margin-left: 8px; }
.theme-v10 .cd-foot .sep { width: 1px; align-self: stretch; background: var(--c-line-2); }

/* command center */
.theme-v10 .cd-cmd-hero { display: flex; align-items: center; gap: 16px; padding: 14px; border: 1px solid var(--c-line); border-radius: 12px; background: var(--c-bg-2); }
.theme-v10 .cd-cmd-logo { width: 74px; height: 74px; flex: 0 0 74px; border-radius: 50%; display: grid; place-items: center; background: #0b1124; border: 2px solid var(--c-primary-2); box-shadow: 0 0 18px rgba(122, 92, 255, .55); }
.theme-v10 .cd-cmd-logo img { width: 46px; height: auto; }
.theme-v10 .cd-cmd-hero b { display: block; font-size: 16px; }
.theme-v10 .cd-cmd-hero small { color: var(--c-text-2); }
.theme-v10 .cd-newsale { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 52px; margin: 12px 0; border-radius: 10px; color: #fff; text-decoration: none; font-size: 18px; font-weight: 700; background: linear-gradient(90deg, var(--c-primary), var(--c-primary-2)); box-shadow: 0 8px 24px rgba(91, 71, 255, .45); }
.theme-v10 .cd-newsale .cd-ico { width: 24px; height: 24px; }
.theme-v10 .cd-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.theme-v10 .cd-actions a { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 14px; border: 1px solid var(--c-line-2); border-radius: 10px; background: var(--c-bg-2); color: var(--c-text); text-decoration: none; font-size: 14px; }
.theme-v10 .cd-actions a:hover { border-color: #3c4d88; background: var(--c-panel-3); }

/* attention list */
.theme-v10 .cd-att { display: grid; }
.theme-v10 .cd-att-head, .theme-v10 .cd-att a { display: grid; grid-template-columns: 44px 1fr 40px 18px; align-items: center; gap: 8px; }
.theme-v10 .cd-att-head { padding: 0 6px 8px; color: var(--c-muted); font-size: 12px; border-bottom: 1px solid var(--c-line); }
.theme-v10 .cd-att a { --tone: var(--c-blue); min-height: 44px; padding: 0 6px; border-bottom: 1px solid var(--c-line); color: var(--c-text); text-decoration: none; font-size: 14px; }
.theme-v10 .cd-att a.danger { --tone: var(--c-red); box-shadow: inset 3px 0 0 var(--c-red); }
.theme-v10 .cd-att a.warning { --tone: var(--c-amber); box-shadow: inset 3px 0 0 var(--c-amber); }
.theme-v10 .cd-att a.success { --tone: var(--c-green); box-shadow: inset 3px 0 0 var(--c-green); }
.theme-v10 .cd-att a.zero { box-shadow: none; }
.theme-v10 .cd-att a .cd-ico { width: 22px; height: 22px; color: var(--tone); margin-left: 8px; }
.theme-v10 .cd-att a.zero .cd-ico { color: var(--c-blue); }
.theme-v10 .cd-att a b { text-align: right; font-size: 18px; color: var(--tone); font-variant-numeric: tabular-nums; }
.theme-v10 .cd-att a.zero b { color: var(--c-blue); }
.theme-v10 .cd-att a:hover { background: rgba(255, 255, 255, .03); }
.theme-v10 .cd-att .chev { color: var(--c-text-2); }

/* catalogue snapshot */
.theme-v10 .cd-snap { display: grid; gap: 4px; padding: 6px 0; border: 1px solid var(--c-line); border-radius: 12px; background: var(--c-bg-2); }
.theme-v10 .cd-snap div { display: flex; align-items: center; gap: 12px; padding: 9px 14px; font-size: 14px; color: var(--c-text-2); }
.theme-v10 .cd-snap .cd-ico { width: 22px; height: 22px; color: var(--c-blue); }
.theme-v10 .cd-snap b { margin-left: auto; font-size: 20px; color: var(--c-text); font-variant-numeric: tabular-nums; }

.theme-v10 .cd-activity summary { cursor: pointer; color: var(--c-text-2); font-weight: 600; padding: 4px 0; }

@media (max-width: 1400px) {
  .theme-v10 .cd-layout { grid-template-columns: minmax(0, 1fr); }
  .theme-v10 .cd-side { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
}
@media (max-width: 1100px) {
  .theme-v10 .cd-kpis, .theme-v10 .cd-modules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .theme-v10 .cd-row2 { grid-template-columns: minmax(0, 1fr); }
  .theme-v10 .cd-pipe { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .theme-v10 .cd-stage + .cd-stage::before { display: none; }
}
@media (max-width: 560px) {
  .theme-v10 .cd-kpis, .theme-v10 .cd-modules, .theme-v10 .cd-pipe, .theme-v10 .cd-mini { grid-template-columns: minmax(0, 1fr); }
  .theme-v10 .cd-kpi strong { font-size: 28px; }
  .theme-v10 .cd-head .cd-tools { margin-left: 0; }
}

/* =================================================================
   Shared page components: every page gets the dashboard's look
   (page header badge, glowing stat cards, panel heads, tabs, tables, chips).
   ================================================================= */

/* page headers */
body.theme-v10 :is(.page-head, .fc-heading, .apt-heading, .ic-heading, .pk-heading, .social-heading, .workshop-hero, .operations-heading) {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px;
  background: none; border: 0; box-shadow: none; padding: 0;
}
body.theme-v10 :is(.page-head, .fc-heading, .apt-heading, .ic-heading, .pk-heading, .social-heading) h1 {
  margin: 0; font-size: 24px; font-weight: 750; letter-spacing: -.01em; color: var(--c-text);
}
body.theme-v10 :is(.page-head, .fc-heading, .apt-heading, .ic-heading, .pk-heading, .social-heading) h1 + p,
body.theme-v10 :is(.page-head, .fc-heading, .apt-heading, .ic-heading, .pk-heading, .social-heading) > div > p { margin: 4px 0 0; color: var(--c-muted); font-size: 14px; }
body.theme-v10 .c-title-badge {
  flex: 0 0 48px; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px;
  color: #fff; background: linear-gradient(135deg, var(--c-primary), var(--c-primary-2));
  box-shadow: 0 8px 24px rgba(91, 71, 255, .45), inset 0 0 0 1px rgba(255, 255, 255, .12);
}
body.theme-v10 .c-title-badge svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
body.theme-v10 .workshop-title > span:first-child:not(.c-title-badge) { display: none; }
body.theme-v10 .workshop-title h1 { margin: 0; font-size: 24px; font-weight: 750; }
body.theme-v10 .workshop-title p { margin: 4px 0 0; color: var(--c-muted); font-size: 14px; }
body.theme-v10 .c-title-wrap { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1 1 auto; }
body.theme-v10 :is(.page-head, .fc-heading, .apt-heading, .ic-heading, .pk-heading, .social-heading) > :last-child:not(.c-title-wrap) { margin-left: auto; }

/* glowing stat cards (one accent per card, like the dashboard) */
body.theme-v10 :is(.report-kpi, .metric-card, .ic-metric, .status-kpi, .quality-kpi, .admin-kpis > div, .category-kpis > div, .audit-kpis > div,
  .pk-metric, .supply-stat, .ws-kpi, .social-stats-card, .summary-card, .kpi, .apt-summary > div) {
  --tone: var(--c-blue);
  position: relative; display: block; min-width: 0; padding: 16px 18px; border-radius: var(--c-radius);
  color: var(--c-text); text-decoration: none;
  background: radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--tone) 20%, transparent), transparent 60%), var(--c-panel);
  border: 1px solid color-mix(in srgb, var(--tone) 50%, transparent);
  box-shadow: 0 10px 28px color-mix(in srgb, var(--tone) 12%, transparent);
}
body.theme-v10 :is(.report-kpis, .metrics-grid, .fc-metrics, .ic-metrics, .status-kpi-grid, .quality-kpis, .admin-kpis, .category-kpis, .audit-kpis, .professional-kpis, .ws-kpis, .social-stats-grid, .apt-summary) > :nth-child(4n+1) { --tone: var(--c-green); }
body.theme-v10 :is(.report-kpis, .metrics-grid, .fc-metrics, .ic-metrics, .status-kpi-grid, .quality-kpis, .admin-kpis, .category-kpis, .audit-kpis, .professional-kpis, .ws-kpis, .social-stats-grid, .apt-summary) > :nth-child(4n+2) { --tone: var(--c-blue); }
body.theme-v10 :is(.report-kpis, .metrics-grid, .fc-metrics, .ic-metrics, .status-kpi-grid, .quality-kpis, .admin-kpis, .category-kpis, .audit-kpis, .professional-kpis, .ws-kpis, .social-stats-grid, .apt-summary) > :nth-child(4n+3) { --tone: var(--c-amber); }
body.theme-v10 :is(.report-kpis, .metrics-grid, .fc-metrics, .ic-metrics, .status-kpi-grid, .quality-kpis, .admin-kpis, .category-kpis, .audit-kpis, .professional-kpis, .ws-kpis, .social-stats-grid, .apt-summary) > :nth-child(4n+4) { --tone: var(--c-purple); }
body.theme-v10 :is(.quality-kpi, .status-kpi).good, body.theme-v10 .status-kpi:has(.good) { --tone: var(--c-green); }
body.theme-v10 :is(.quality-kpi, .status-kpi):is(.warn, .warning), body.theme-v10 .status-kpi:has(.warn, .warning) { --tone: var(--c-amber); }
body.theme-v10 :is(.quality-kpi, .status-kpi):is(.bad, .danger), body.theme-v10 .status-kpi:has(.bad, .danger) { --tone: var(--c-red); }
body.theme-v10 :is(.report-kpis, .metrics-grid, .fc-metrics, .ic-metrics, .status-kpi-grid, .quality-kpis, .admin-kpis, .category-kpis, .audit-kpis, .ws-kpis, .apt-summary) {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; background: none; border: 0; box-shadow: none; padding: 0;
}
/* labels */
body.theme-v10 :is(.report-kpi, .metric-card, .quality-kpi, .admin-kpis > div, .category-kpis > div, .audit-kpis > div, .supply-stat) > small:first-child,
body.theme-v10 :is(.ic-metric dt, .pk-metric dt, .status-kpi > span:first-child, .ws-kpi small, .summary-card h4) {
  display: flex; align-items: center; gap: 10px; margin: 0; color: var(--c-text); font-size: 14.5px; font-weight: 600;
  letter-spacing: 0; text-transform: none;
}
/* big values */
body.theme-v10 :is(.report-kpi, .metric-card, .quality-kpi, .admin-kpis > div, .category-kpis > div, .audit-kpis > div, .supply-stat, .status-kpi, .ws-kpi) strong,
body.theme-v10 :is(.ic-metric dd, .pk-metric dd:not(.pk-scope), .summary-card .metric) {
  display: block; margin: 12px 0 2px; font-size: 30px; font-weight: 750; line-height: 1.15; letter-spacing: -.02em;
  color: var(--c-text); font-variant-numeric: tabular-nums; overflow-wrap: anywhere;
}
body.theme-v10 :is(.supply-stat > small:last-child, .status-kpi > small, .ws-kpi span, .pk-scope) { display: block; color: var(--c-text-2); font-size: 13px; margin: 0; }
body.theme-v10 .c-kpi-ico { width: 24px; height: 24px; flex: 0 0 24px; color: var(--tone); fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
body.theme-v10 :is(.ic-metric > svg, .ws-kpi > i) { display: none; }
body.theme-v10 .ic-metric > div { display: block; }
body.theme-v10 a.metric-card:hover { filter: brightness(1.12); }

/* panel and section heads */
body.theme-v10 :is(.section-head, .report-table-title, .settings-section-head, .ic-section-heading, .quality-panel > header, .ws-panel > header, .social-panel > header, .apt-panel > header) {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; padding: 0 0 12px;
  border-bottom: 1px solid var(--c-line); background: none;
}
body.theme-v10 :is(.section-head, .report-table-title, .settings-section-head, .ic-section-heading) :is(h2, h3, b, strong):first-of-type,
body.theme-v10 :is(.ws-panel, .social-panel, .apt-panel, .quality-panel) > header > :is(b, h2, h3):first-child,
body.theme-v10 :is(.panel, .card) > :is(h2, h3):first-child { margin: 0; font-size: 17px; font-weight: 700; color: var(--c-text); letter-spacing: 0; text-transform: none; }
body.theme-v10 :is(.panel, .card) > :is(h2, h3):first-child { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--c-line); }
body.theme-v10 .settings-icon {
  width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center; border-radius: 12px; font-size: 19px;
  background: var(--c-primary-soft); border: 1px solid rgba(140, 120, 255, .4);
}
body.theme-v10 .settings-section-head h3 { margin: 0; }
body.theme-v10 .c-head-ico { width: 22px; height: 22px; flex: 0 0 22px; color: var(--c-blue); fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
body.theme-v10 :is(.ws-panel, .social-panel, .apt-panel) > header a { margin-left: auto; color: #8fb4ff; font-size: 14px; text-decoration: none; }
body.theme-v10 :is(.card, .panel, .ws-panel, .apt-panel, .quality-panel, .social-panel, .import-panel) { padding: 18px; }

/* tabs as a segmented control */
body.theme-v10 :is(.fc-tabs, .supply-tabs, .ic-navigation, .pos-mode-tabs) {
  display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin: 0 0 16px; border: 1px solid var(--c-line-2);
  border-radius: 12px; background: var(--c-bg-2);
}
body.theme-v10 :is(.fc-tabs, .supply-tabs, .ic-navigation, .pos-mode-tabs) a {
  padding: 8px 16px; border-radius: 9px; border: 0; background: transparent; color: var(--c-text-2);
  font-size: 14px; font-weight: 500; text-decoration: none; box-shadow: none;
}
body.theme-v10 :is(.fc-tabs, .supply-tabs, .ic-navigation, .pos-mode-tabs) a:hover { color: #fff; background: rgba(255, 255, 255, .05); }
body.theme-v10 :is(.fc-tabs, .supply-tabs, .ic-navigation, .pos-mode-tabs) a:is([aria-current="page"], [aria-current="true"], .active, [aria-selected="true"]) {
  color: #fff; background: var(--c-primary); box-shadow: 0 4px 14px rgba(91, 71, 255, .4);
}

/* tables like the dashboard */
body.theme-v10 .content table { width: 100%; border-collapse: collapse; font-size: 14px; }
body.theme-v10 .content th { padding: 11px 12px; text-align: left; font-size: 12.5px; font-weight: 600; color: var(--c-muted); text-transform: none; letter-spacing: .01em; white-space: nowrap; }
body.theme-v10 .content td { padding: 12px; vertical-align: middle; }
body.theme-v10 :is(.table-wrap, .table-scroll, .report-table-wrap, .ic-table-scroll, .quality-table-wrap, .purchase-table-wrap, .ops-table-wrap, .pk-table-wrap, .social-table-wrap) {
  border: 1px solid var(--c-line); border-radius: 12px; background: var(--c-bg-2); overflow: auto;
}
body.theme-v10 :is(.table-wrap, .table-scroll, .report-table-wrap, .ic-table-scroll, .quality-table-wrap, .purchase-table-wrap, .ops-table-wrap, .pk-table-wrap, .social-table-wrap) thead th { position: sticky; top: 0; z-index: 1; background: var(--c-panel-2); }
body.theme-v10 .content tbody tr:last-child td { border-bottom: 0; }

/* status chips: one colour per meaning */
body.theme-v10 :is(.status-chip, .status-pill, .status-tag, .badge, .match-badge, .supply-pill, .inventory-status, .source-status, .social-status) {
  --tone: var(--c-blue);
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 1.5; letter-spacing: .01em; text-transform: none; white-space: nowrap;
  color: color-mix(in srgb, var(--tone) 75%, white); background: color-mix(in srgb, var(--tone) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--tone) 45%, transparent);
}
body.theme-v10 :is(.status-chip, .status-pill, .status-tag, .badge, .match-badge, .supply-pill, .inventory-status, .source-status, .social-status):is(.ok, .good, .active, .healthy, .success, .paid, .status-completed, .status-ready-for-pickup) { --tone: var(--c-green); }
body.theme-v10 :is(.status-chip, .status-pill, .status-tag, .badge, .match-badge, .supply-pill, .inventory-status, .source-status, .social-status):is(.warning, .warn, .pending, .low, .status-waiting-for-parts, .status-awaiting-approval) { --tone: var(--c-amber); }
body.theme-v10 :is(.status-chip, .status-pill, .status-tag, .badge, .match-badge, .supply-pill, .inventory-status, .source-status, .social-status):is(.bad, .danger, .revoked, .out, .error, .failed, .status-cancelled) { --tone: var(--c-red); }
body.theme-v10 :is(.status-chip, .status-pill, .status-tag, .badge):is(.status-inspection, .status-in-progress, .status-quality-control) { --tone: var(--c-purple); }

/* leftover brand-red accents become the v10 accent (red stays only for danger) */
body.theme-v10 :is(.ic-button.ic-primary) {
  background: linear-gradient(90deg, var(--c-primary), var(--c-primary-2)); border-color: rgba(150, 130, 255, .6); color: #fff;
  box-shadow: 0 4px 14px rgba(91, 71, 255, .35);
}
body.theme-v10 :is(.social-button.primary) {
  background: linear-gradient(90deg, var(--c-primary), var(--c-primary-2)); border-color: rgba(150, 130, 255, .6); color: #fff;
  box-shadow: 0 6px 20px rgba(91, 71, 255, .35);
}
body.theme-v10 .content nav a[aria-current="page"] { border-bottom-color: var(--c-primary-2); }
body.theme-v10 .content .accent, body.theme-v10 .content .accent a { color: #a99bff !important; font-weight: 700; }
body.theme-v10 .content details > summary { color: #8fb4ff; }

/* My Jobs: mechanic screen, built for a phone or tablet in the workshop */
body.theme-v10 .mj-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
body.theme-v10 .mj-card {
  padding: 18px; border-radius: var(--c-radius); background: linear-gradient(180deg, var(--c-panel-2), var(--c-panel));
  border: 1px solid var(--c-line); box-shadow: var(--c-shadow);
}
body.theme-v10 .mj-card.urgent { box-shadow: inset 4px 0 0 var(--c-red), var(--c-shadow); }
body.theme-v10 .mj-card.high { box-shadow: inset 4px 0 0 var(--c-amber), var(--c-shadow); }
body.theme-v10 .mj-card.running { border-color: rgba(34, 211, 127, .6); box-shadow: 0 0 0 1px rgba(34, 211, 127, .25), 0 10px 30px rgba(34, 211, 127, .15); }
body.theme-v10 .mj-card header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
body.theme-v10 .mj-card header b { display: block; font-size: 19px; }
body.theme-v10 .mj-card header small { display: block; margin-top: 2px; }
body.theme-v10 .mj-complaint { margin: 12px 0 6px; font-size: 15.5px; color: var(--c-text); }
body.theme-v10 .mj-actions { display: grid; gap: 10px; margin-top: 14px; }
body.theme-v10 .mj-actions form { margin: 0; }
body.theme-v10 .mj-big { width: 100%; min-height: 52px; justify-content: center; font-size: 16px; }
body.theme-v10 .mj-since { font-weight: 500; opacity: .85; margin-left: 6px; }

body.theme-v10 .wa-remind { display: inline-flex; margin-top: 6px; border-color: rgba(34, 211, 127, .6); color: #b5f5d4; }

/* Bright display (daylight): lighter surfaces, brighter text, larger type. Toggled from the profile menu. */
body.theme-v10.c-bright {
  --c-bg: #141c33; --c-bg-2: #1a2440; --c-panel: #1d2848; --c-panel-2: #233056; --c-panel-3: #2a3964;
  --c-line: #33427a; --c-line-2: #42538f; --c-text: #ffffff; --c-text-2: #e3e8f8; --c-muted: #b9c2e0;
  font-size: 106%;
}
body.theme-v10.c-bright .content { filter: brightness(1.08) contrast(1.06); }
body.theme-v10.c-bright small, body.theme-v10.c-bright .muted { color: var(--c-muted); }
body.theme-v10 .drop-toggle { all: unset; display: block; padding: 9px 12px; border-radius: 8px; cursor: pointer; color: var(--c-text-2); font-size: 14px; }
body.theme-v10 .drop-toggle:hover { background: var(--c-primary-soft); }
body.theme-v10 .drop-toggle[aria-pressed="true"]::after { content: "  \2713"; color: var(--c-green); }

/* =================================================================
   Motion: short, smooth and optional. Entrance on page load, hover lift,
   number count-up (app.js) and chart drawing. Disabled for reduced motion.
   ================================================================= */
@keyframes c-rise { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes c-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes c-draw { from { stroke-dashoffset: var(--len, 2000); } to { stroke-dashoffset: 0; } }
@keyframes c-area { from { opacity: 0; } to { opacity: 1; } }
@keyframes c-ring { from { transform: rotate(-90deg) scale(.86); opacity: 0; } to { transform: rotate(0) scale(1); opacity: 1; } }
@keyframes c-pulse { 0%, 100% { box-shadow: 0 8px 24px rgba(91, 71, 255, .45); } 50% { box-shadow: 0 8px 34px rgba(122, 92, 255, .75), 0 0 0 4px rgba(122, 92, 255, .12); } }
@keyframes c-shine { from { transform: translateX(-120%) skewX(-18deg); } to { transform: translateX(220%) skewX(-18deg); } }
@keyframes c-dot { 0%, 100% { box-shadow: 0 0 6px var(--c-green); } 50% { box-shadow: 0 0 14px var(--c-green), 0 0 0 4px rgba(34, 211, 127, .15); } }

@media (prefers-reduced-motion: no-preference) {
  /* page entrance: staggered by the order set in app.js (--i) */
  body.theme-v10 .c-enter { animation: c-rise .55s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 55ms); }
  body.theme-v10 .content > .cd-head, body.theme-v10 .c-title-wrap { animation: c-fade .45s ease both; }
  body.theme-v10 .c-title-badge { animation: c-rise .6s cubic-bezier(.2, .8, .2, 1) both; }

  /* hover: lift and glow */
  body.theme-v10 :is(.cd-kpi, .cd-module, .cd-stage, .report-kpi, .metric-card, .ic-metric, .status-kpi, .quality-kpi, .ws-kpi, .admin-kpis > div, .category-kpis > div, .supply-stat, .mj-card, .ws-job) {
    transition: transform .22s cubic-bezier(.2, .8, .2, 1), box-shadow .22s ease, border-color .22s ease, filter .22s ease;
  }
  body.theme-v10 :is(.cd-kpi, .cd-module, .cd-stage, .report-kpi, .metric-card, .ic-metric, .status-kpi, .quality-kpi, .ws-kpi, .admin-kpis > div, .category-kpis > div, .supply-stat, .ws-job):hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 36px color-mix(in srgb, var(--tone, var(--c-primary)) 22%, transparent), 0 0 0 1px color-mix(in srgb, var(--tone, var(--c-primary)) 35%, transparent);
  }
  body.theme-v10 :is(.cd-panel, .panel, .card, .ws-panel):hover { border-color: var(--c-line-2); }
  body.theme-v10 :is(.cd-panel, .panel, .card, .ws-panel) { transition: border-color .25s ease; }

  /* buttons: press feel, shine sweep on primary actions */
  body.theme-v10 :is(.btn, .cd-actions a, .cd-chip, .cd-seg button, .cnav-item, .cnav-sub a) { transition: transform .12s ease, background .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease; }
  body.theme-v10 :is(.btn, .cd-actions a):active { transform: scale(.97); }
  body.theme-v10 .cd-actions a:hover { transform: translateY(-2px); }
  body.theme-v10 :is(.cd-newsale, .cd-wide-btn:not(.ghost), .btn.primary):not(.checkout-btn) { position: relative; overflow: hidden; }
  /* The till's checkout button keeps its original sticky position (it floats above the bottom bar). */
  body.theme-v10 .checkout-btn { overflow: hidden; }
  body.theme-v10 :is(.cd-newsale, .cd-wide-btn:not(.ghost), .btn.primary)::before {
    content: ""; position: absolute; inset: 0 auto 0 0; width: 40%; pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .22), transparent); transform: translateX(-120%) skewX(-18deg);
  }
  body.theme-v10 :is(.cd-newsale, .cd-wide-btn:not(.ghost), .btn.primary):hover::before { animation: c-shine .75s ease; }
  body.theme-v10 .cd-newsale { animation: c-pulse 3.2s ease-in-out infinite; }
  body.theme-v10 .cnav-sub a:hover { transform: translateX(3px); }

  /* live indicators */
  body.theme-v10 .sidebar-footer .status-dot, body.theme-v10 .mj-card.running .btn.danger { animation: c-dot 2.4s ease-in-out infinite; }

  /* charts: line draws in, area fades, ring spins in */
  body.theme-v10 .cd-chart .line { stroke-dasharray: var(--len, 2000); animation: c-draw 1.1s cubic-bezier(.3, .7, .2, 1) both; }
  body.theme-v10 .cd-chart .area { animation: c-area .9s ease .35s both; }
  body.theme-v10 .cd-chart .pt { animation: c-fade .4s ease .8s both; }
  body.theme-v10 :is(.cd-donut, .ops-donut, .donut) { animation: c-ring .9s cubic-bezier(.2, .8, .2, 1) .15s both; }

  /* sidebar groups open smoothly */
  body.theme-v10 .cnav-group[open] > .cnav-sub { animation: c-rise .28s ease both; }
  body.theme-v10 .drop-panel { animation: c-rise .2s ease both; }
}
/* Scrolling: reveal below-the-fold blocks, progress bar, floating top bar, back-to-top. */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  body.theme-v10 .c-reveal { opacity: 0; transform: translateY(26px) scale(.985); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .8, .2, 1); transition-delay: calc(var(--i, 0) * 70ms); }
  body.theme-v10 .c-reveal.c-in { opacity: 1; transform: none; }
  body.theme-v10 .topbar { transition: box-shadow .25s ease, background .25s ease, backdrop-filter .25s ease; }
  body.theme-v10 .c-to-top { transition: opacity .25s ease, transform .25s ease; }
}
body.theme-v10 .c-scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 200; pointer-events: none;
  transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--c-primary), var(--c-cyan)); box-shadow: 0 0 10px rgba(122, 92, 255, .7);
}
body.theme-v10.c-scrolled .topbar { background: rgba(8, 12, 26, .94); backdrop-filter: blur(16px); box-shadow: 0 10px 30px rgba(0, 0, 0, .45); }
body.theme-v10 .c-to-top {
  position: fixed; right: 22px; bottom: 26px; z-index: 150; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  border: 1px solid rgba(150, 130, 255, .55); color: #fff; cursor: pointer;
  background: linear-gradient(135deg, var(--c-primary), var(--c-primary-2)); box-shadow: 0 10px 26px rgba(91, 71, 255, .45);
  opacity: 0; transform: translateY(16px); pointer-events: none;
}
body.theme-v10 .c-to-top.show { opacity: 1; transform: none; pointer-events: auto; }
body.theme-v10 .c-to-top:hover { filter: brightness(1.12); }
body.theme-v10 .c-to-top svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 980px) { body.theme-v10 .c-to-top { bottom: 92px; right: 16px; } }
@media print {
  body.theme-v10 .c-reveal, body.theme-v10 .c-enter { opacity: 1 !important; transform: none !important; animation: none !important; }
  body.theme-v10 :is(.c-scroll-progress, .c-to-top) { display: none !important; }
}

/* =================================================================
   Phones (iPhone / Android): no zoom-on-tap, finger-sized targets,
   readable text, notch-safe edges, no sticky hover on touch screens.
   ================================================================= */
@media (max-width: 760px) {
  /* iOS Safari zooms into any field whose text is under 16px; 16px stops that. */
  body.theme-v10 :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea) { font-size: 16px !important; }
  body.theme-v10 :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]), select) { min-height: 44px; }
  /* Finger-sized buttons and controls (44px is the Apple/Google guideline). */
  body.theme-v10 .content :is(.btn, button:not(.icon-btn), summary, .cd-seg button, .ws-job, .attention-row) { min-height: 44px; }
  body.theme-v10 .content :is(.btn, button) { display: inline-flex; align-items: center; justify-content: center; }
  body.theme-v10 .content .icon-btn { min-width: 44px; min-height: 44px; }
  body.theme-v10 .content :is(.cd-actions a, .cd-att a, .cd-module) { min-height: 52px; }
  body.theme-v10 .content table a { display: inline-block; padding: 10px 0; }
  /* Plain text links that sit on their own line (notes, "View items", etc.) get a finger-sized tap area. */
  body.theme-v10 .content a:not(.btn):not([class*="cd-"]):not(.ws-job):not(.metric-card) { min-height: 44px; display: inline-flex; align-items: center; }
  body.theme-v10 .content :is(p, small, td, li, span) > a:not(.btn) { min-height: 0; display: inline-block; padding: 10px 0; }
  body.theme-v10 .content :is(input[type="checkbox"], input[type="radio"]) { width: 22px; height: 22px; }
  /* Tighter page edges and panels so content gets the width. */
  body.theme-v10 .content { padding-left: 12px; padding-right: 12px; }
  body.theme-v10 :is(.card, .panel, .cd-panel, .ws-panel, .apt-panel, .quality-panel, .social-panel) { padding: 14px; border-radius: 12px; }
  body.theme-v10 .cd-table { table-layout: fixed; font-size: 14px; min-width: 0 !important; width: 100%; }
  body.theme-v10 :is(.ws-panel, .social-panel, .apt-panel) > header a, body.theme-v10 .cd-head-link, body.theme-v10 .result-part-number { display: inline-flex; align-items: center; min-height: 44px; }
  body.theme-v10 .cd-table th, body.theme-v10 .cd-table td { padding: 8px 4px; }
  body.theme-v10 .cd-table th:first-child, body.theme-v10 .cd-table td:first-child { width: 48%; }
  body.theme-v10 .page-head, body.theme-v10 .cd-head { gap: 10px; }
  body.theme-v10 .c-title-badge { flex-basis: 40px; width: 40px; height: 40px; border-radius: 12px; }
  body.theme-v10 :is(.page-head, .fc-heading, .apt-heading, .ic-heading) h1, body.theme-v10 .cd-head h1 { font-size: 21px; }
  body.theme-v10 .page-head > :last-child:not(.c-title-wrap) { margin-left: 0; width: 100%; }
  body.theme-v10 :is(.fc-tabs, .supply-tabs, .ic-navigation) { display: flex; overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  body.theme-v10 :is(.fc-tabs, .supply-tabs, .ic-navigation) a { white-space: nowrap; }
  body.theme-v10 .c-to-top { width: 48px; height: 48px; }
  /* Till checkout on a phone: one big, clear button that stays reachable above the bottom bar, with room around it. */
  body.theme-v10 .checkout-panel .change-box { margin-bottom: 14px; }
  body.theme-v10 .content .checkout-panel .checkout-btn {
    position: sticky; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); z-index: 20;
    width: 100%; min-height: 56px; margin-top: 4px; font-size: 17px; border-radius: 14px;
    box-shadow: 0 -10px 24px rgba(7, 11, 24, .85), 0 10px 26px rgba(91, 71, 255, .45);
  }
  body.theme-v10 .checkout-panel .pos-shortcuts { display: none; }
}
/* iPhone notch / home-bar: keep the bottom navigation and floating button clear of the screen edges. */
body.theme-v10 .mobile-bottom-nav { padding-bottom: env(safe-area-inset-bottom, 0px); }
@media (max-width: 980px) { body.theme-v10 .c-to-top { bottom: calc(92px + env(safe-area-inset-bottom, 0px)); } }
/* Touch screens have no real hover: avoid cards staying "lifted" after a tap. */
@media (hover: none) {
  body.theme-v10 :is(.cd-kpi, .cd-module, .cd-stage, .report-kpi, .metric-card, .ic-metric, .status-kpi, .quality-kpi, .ws-kpi, .admin-kpis > div, .category-kpis > div, .supply-stat, .ws-job, .cd-actions a, .cnav-sub a):hover { transform: none; }
  body.theme-v10 :is(.btn, .cd-actions a):active { transform: scale(.96); }
}

/* Speed first at the till: no entrance or count-up animation on the POS cart and search results. */
body.theme-v10 :is(.cart-card, .pos-search-card, #posResults) { animation: none !important; }

/* training copy */
body.theme-v10 .practice-banner {
  position: sticky; top: 0; z-index: 50; padding: 8px 16px; text-align: center; font-weight: 800; letter-spacing: .04em;
  color: #1a1000; background: repeating-linear-gradient(45deg, #f5a524, #f5a524 14px, #ffbf47 14px, #ffbf47 28px);
}

/* WhatsApp message buttons on the job page */
body.theme-v10 .wa-panel { margin-bottom: 18px; border-color: rgba(34, 211, 127, .35); }
body.theme-v10 .wa-panel p { margin: 0 0 12px; }
body.theme-v10 .wa-actions { display: flex; flex-wrap: wrap; gap: 10px; }
body.theme-v10 .wa-actions .btn.primary { background: linear-gradient(90deg, #13a85f, #22d37f); border-color: rgba(34, 211, 127, .7); box-shadow: 0 6px 18px rgba(34, 211, 127, .3); }

/* empty states */
body.theme-v10 :is(.empty-state, .ic-empty-state, .empty-mini, .empty-results, .ops-empty) {
  padding: 22px; text-align: center; color: var(--c-muted); border: 1px dashed var(--c-line-2); border-radius: 12px; background: transparent;
}

/* login and first-run setup */
body.theme-v10.c-auth { min-height: 100vh; display: grid; place-items: center; }
body.theme-v10 .login-card { border-color: var(--c-line-2); box-shadow: 0 30px 80px rgba(0, 0, 0, .5), 0 0 0 1px rgba(122, 92, 255, .12); }
body.theme-v10 .login-card button[type="submit"]:not(.secondary), body.theme-v10 .login-card .btn.primary {
  background: linear-gradient(90deg, var(--c-primary), var(--c-primary-2)); border-color: rgba(150, 130, 255, .6); color: #fff;
  box-shadow: 0 8px 24px rgba(91, 71, 255, .45);
}
