/*
 * Communite Mobile / Premium Scarlet 7 — visual design system.
 * Opt-in via base.html, after executive-themes.css and motion_v6.css.
 * No new routes, scripts, data writes, layout ownership or permission changes.
 * Every interactive control remains native, keyboard reachable and legible.
 */

/* Fine warm neutrals; color semantics remain rooted in existing theme. */
html:not(.cm-dark) {
  --cm7-page:#f7f5f4;
  --cm7-paper:#fffefd;
  --cm7-muted-paper:#fcf9f8;
  --cm7-ink:#2f2630;
  --cm7-muted:#766a76;
  --cm7-line:#e8dfe3;
  --cm7-hairline:#f0e8eb;
  --cm7-berry:#982743;
  --cm7-berry-strong:#6e1b34;
  --cm7-rose:#f9ebf0;
  --cm7-soft-shadow:0 2px 5px rgba(63,25,43,.025),0 13px 35px rgba(63,25,43,.045);
  --cm7-hover-shadow:0 10px 28px rgba(63,25,43,.09);
  --cm-page:var(--cm7-page);
  --cm-surface:var(--cm7-paper);
  --cm-guide:var(--cm7-muted-paper);
  --cm-border:var(--cm7-line);
  --cm-text:var(--cm7-ink);
  --cm-secondary:var(--cm7-muted);
  --cm-accent:var(--cm7-berry);
  --cm-accent-strong:var(--cm7-berry-strong);
  --cm-shadow:var(--cm7-soft-shadow);
  --cm-radius:19px;
}
html.cm-dark {
  --cm7-page:#121820;
  --cm7-paper:#1c2632;
  --cm7-muted-paper:#202d3a;
  --cm7-ink:#f3f5f9;
  --cm7-muted:#c0c9d6;
  --cm7-line:#415064;
  --cm7-hairline:#39475a;
  --cm7-berry:#ef829b;
  --cm7-berry-strong:#ffd0de;
  --cm7-rose:#402e40;
  --cm7-soft-shadow:0 9px 26px rgba(0,0,0,.13);
  --cm7-hover-shadow:0 14px 34px rgba(0,0,0,.22);
  --cm-page:var(--cm7-page);
  --cm-surface:var(--cm7-paper);
  --cm-guide:var(--cm7-muted-paper);
  --cm-border:var(--cm7-line);
  --cm-text:var(--cm7-ink);
  --cm-secondary:var(--cm7-muted);
  --cm-accent:var(--cm7-berry);
  --cm-accent-strong:var(--cm7-berry-strong);
  --cm-shadow:var(--cm7-soft-shadow);
  --cm-radius:19px;
}

/* Calm foundation: no endless highlight crossing financial figures. */
html .workspace,
html .workspace main#main {font-family:Manrope,system-ui,"Segoe UI",sans-serif;}
html .workspace {min-width:0;}
html:not(.cm-dark) .workspace {
  background:
    radial-gradient(ellipse 75% 48% at 85% 0%,rgba(151,36,67,.055),transparent 76%),
    linear-gradient(160deg,#faf8f7,var(--cm7-page) 45%,#f6f3f4) !important;
}
html.cm-dark .workspace {background:var(--cm7-page)!important;}
html .workspace main#main {max-width:1760px;margin-inline:auto;padding-inline:clamp(16px,2.4vw,42px);}
html .workspace main#main::before {opacity:.10;max-width:420px;}
html .workspace :is(.panel,.metric-card,.cm-layout-heading,.finance-metric,.cm-repair-group,.cm-compare-card) {
  box-shadow:var(--cm7-soft-shadow);
}
html .workspace .page-heading {gap:18px;margin-bottom:22px;align-items:center;}
html .workspace .page-heading .eyebrow,
html .workspace .cm-layout-heading .eyebrow,
html .workspace .panel-header .eyebrow {
  font-size:10px;line-height:1.4;letter-spacing:.145em;font-weight:800;
  color:var(--cm-accent-strong);
}
html .workspace .page-heading h1 {
  font-size:clamp(26px,2.35vw,38px);
  font-weight:800;letter-spacing:-.047em;line-height:1.12;
  margin:6px 0 9px;
}
html .workspace .page-heading p {max-width:730px;line-height:1.68;margin-bottom:0;font-size:12px;}
html .workspace .page-heading .button-row {gap:9px;align-items:center;max-width:100%;}
html .workspace :is(.dashboard-topline,.cm-finance-nav-marker) {letter-spacing:.105em;}

/* Rich but restrained left navigation; clear locations, not a decorative wall. */
html .sidebar {
  background:linear-gradient(169deg,#411225 0%,#5e1b34 51%,#381325 100%)!important;
  border-right:1px solid rgba(255,218,231,.14)!important;
  box-shadow:8px 0 30px rgba(44,15,30,.095)!important;
}
html.cm-dark .sidebar {background:linear-gradient(168deg,#161e2a 0%,#24202d 55%,#171a24 100%)!important;}
html .sidebar .brand-official {
  border-radius:18px;
  border:1px solid rgba(255,255,255,.16)!important;
  background:linear-gradient(122deg,rgba(255,255,255,.11),rgba(255,255,255,.045))!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.11),0 12px 26px rgba(18,4,12,.12);
}
html .sidebar .brand-copy strong {letter-spacing:-.045em;}
html .sidebar :is(.sidebar-label,.nav-secondary-label,.cm4-menu-title) {letter-spacing:.13em;}
html .sidebar .nav-link {
  min-height:42px;
  border-radius:11px;
  font-weight:650;
  letter-spacing:-.008em;
  transition:background-color .18s ease,box-shadow .18s ease,color .18s ease;
}
html:not(.cm-dark) .sidebar .nav-link.active {
  background:linear-gradient(108deg,#b93358,#8f2443)!important;
  box-shadow:inset 3px 0 #ffccd9,0 7px 16px rgba(35,6,20,.13)!important;
}
html .sidebar .nav-icon {opacity:.88;}
html .sidebar .nav-link.active .nav-icon {opacity:1;}
html .sidebar .cm4-menu-search {border-radius:12px;min-height:40px;}

/* Header is an elevated command bar, without reducing touch targets. */
html .workspace .topbar {
  border-bottom:1px solid var(--cm-border)!important;
  background:color-mix(in srgb,var(--cm7-paper) 94%,transparent)!important;
  box-shadow:0 2px 15px rgba(42,25,36,.055);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
}
html .workspace :is(.topbar-global-search,.cm-search-open,.cm-live-time,.topbar-notifications summary,.working-date-summary,.date-picker) {
  border-radius:13px!important;
}
html .workspace .topbar-global-search {
  background:var(--cm7-muted-paper)!important;
  min-height:44px;
  border:1px solid var(--cm7-line)!important;
}
html .workspace .topbar-global-search:focus-within,
html .workspace .cm-search-open:focus-visible {
  border-color:var(--cm-accent)!important;
  box-shadow:0 0 0 3px rgba(176,45,84,.105);
}

/* Form, table, dashboard and task panels share one edge/shadow/radius system. */
html .workspace :is(.panel:not(.hero-summary),.metric-card,.cm-compare-card,.cm-trend-panel,.cm-layout-heading,.cm-layout-tools,.stock-valuation-panel,.cm-filter-panel,.cm-kanban-lane,.cm-kanban-card) {
  border:1px solid var(--cm7-line)!important;
  border-radius:19px!important;
  box-shadow:var(--cm7-soft-shadow);
}
html:not(.cm-dark) .workspace :is(.panel:not(.hero-summary),.metric-card,.cm-compare-card,.cm-layout-heading) {
  background:var(--cm7-paper)!important;
}
html .workspace .panel-header {
  padding:clamp(17px,1.6vw,24px);
  border-bottom:1px solid var(--cm7-hairline);
}
html .workspace .panel-header :is(h2,h3){font-size:clamp(15px,1.2vw,19px);letter-spacing:-.035em;}
html .workspace .metric-card {
  padding:clamp(17px,1.65vw,23px);
  min-width:0;
}
html .workspace .metric-card>strong,
html .workspace .metric-grid.compact .metric-card>strong {
  font-weight:800;letter-spacing:-.045em;font-variant-numeric:tabular-nums;
}
html .workspace .metric-label {font-size:11px;letter-spacing:.005em;font-weight:700;}
html .workspace .metric-card small {line-height:1.65;}
html .workspace .cm-layout-heading {padding:19px 22px;}
html .workspace .cm-layout-heading h2 {font-size:19px;letter-spacing:-.038em;}
html .workspace .cm-compare-card {overflow:hidden;}
html .workspace .stock-valuation-panel {overflow:hidden;}

/* Main KPI: premium dark garnet, generous negative space, no animated glare. */
html:not(.cm-dark) .workspace .hero-summary {
  background:linear-gradient(118deg,#411426 0%,#671d38 46%,#942b4d 100%)!important;
  border:1px solid rgba(255,255,255,.16)!important;
  border-radius:24px!important;
  box-shadow:0 20px 48px rgba(77,18,40,.20),inset 0 1px rgba(255,255,255,.16)!important;
}
html.cm-dark .workspace .hero-summary {
  background:linear-gradient(118deg,#411b34,#6e264e 66%,#823458)!important;
  border:1px solid #945574!important;
  border-radius:24px!important;
}
html .workspace .hero-summary {padding:clamp(24px,3.1vw,42px);gap:clamp(20px,2.3vw,38px);}
html .workspace .hero-text h2 {font-size:clamp(30px,3.8vw,49px);letter-spacing:-.055em;line-height:1.16;}
html .workspace .hero-premium-top {letter-spacing:.12em;}
html .workspace .hero-summary .hero-metrics>div {
  border-color:rgba(255,255,255,.16);
  border-radius:13px;
}
html .workspace .hero-summary .hero-metrics strong {font-variant-numeric:tabular-nums;letter-spacing:-.025em;}
@media(prefers-reduced-motion:no-preference){
  html .sidebar .brand-official::after,
  html .workspace :is(.hero-summary,.metric-card,.cm-layout-heading)::after{
    animation:none!important;content:none!important;
  }
}

/* Actual actions: pronounced primary, quietly elevated secondary. */
html .workspace .button,
html .workspace a.button,
html .workspace button.button,
html .workspace .cm-repair-group-action {
  font-family:Manrope,system-ui,sans-serif;
}
html .workspace :is(a.button,button.button,input.button):not(.secondary):not(.ghost):not(.small) {
  border-radius:12px;
  background:linear-gradient(135deg,#a82d50,#7e1c39);
  color:#fff;
  box-shadow:0 4px 12px rgba(114,25,55,.13);
  font-weight:800;
  letter-spacing:-.014em;
}
html .workspace :is(a.button,button.button).secondary {
  border-radius:12px;
  color:var(--cm-text);
  background:var(--cm7-paper);
  border:1px solid var(--cm7-line);
  box-shadow:0 2px 6px rgba(56,22,41,.035);
  font-weight:700;
}
html .workspace :is(a.button,button.button):is(:hover,:focus-visible) {
  filter:brightness(1.025);
}
html .workspace :is(.button-row,.record-actions,.finance-hero-actions) {gap:9px;}
html .workspace .button.small {min-height:35px;}
html .workspace .row-arrow,.workspace .record-link,
html .workspace .cm-column-sort {font-weight:750;}

/* Data density: readable financial rows, soft separators, and fixed numeric rhythm. */
html .workspace .table-panel {overflow:hidden;}
html .workspace :is(.table-scroll,.finance-table-wrap) {overscroll-behavior-x:contain;}
html .workspace :is(.table-scroll thead th, .table-panel thead th) {
  font-size:10px;font-weight:800;letter-spacing:.055em;line-height:1.5;
  background:var(--cm7-muted-paper)!important;
  border-bottom:1px solid var(--cm7-line)!important;
  color:var(--cm-text)!important;
  white-space:nowrap;
}
html .workspace :is(.table-scroll tbody td,.table-panel tbody td) {
  font-size:11px;line-height:1.65;
  padding-block:14px;
  color:var(--cm-text);
  border-bottom:1px solid var(--cm7-hairline);
  font-variant-numeric:tabular-nums;
}
html .workspace :is(.table-scroll tbody tr,.table-panel tbody tr):last-child td {border-bottom:0;}
html:not(.cm-dark) .workspace :is(.table-scroll tbody tr,.table-panel tbody tr):nth-child(even) {
  background:#fdfafb;
}
html:not(.cm-dark) .workspace :is(.table-scroll tbody tr,.table-panel tbody tr):hover {
  background:#f9eff3;
}
html.cm-dark .workspace :is(.table-scroll tbody tr,.table-panel tbody tr):hover {background:#2b3849;}
html .workspace :is(.table-scroll tbody td,.table-panel tbody td) :is(strong,.record-link){font-weight:800;}
html .workspace :is(.cm-table-heading,.table-heading){padding:16px 20px;}
html .workspace .cm-table-heading strong {font-size:13px;letter-spacing:-.02em;}
html .workspace .pagination {border-top:1px solid var(--cm7-hairline);}
html .workspace .report-strip {
  border-radius:15px;
  border:1px solid var(--cm7-line);
  background:var(--cm7-paper);
  box-shadow:var(--cm7-soft-shadow);
}
html .workspace .report-strip strong{font-variant-numeric:tabular-nums;letter-spacing:-.025em;}

/* Native inputs and validation: visible but not noisy. */
html .workspace :is(input:not([type=checkbox]):not([type=radio]),select,textarea){
  border-radius:11px!important;
  border:1px solid var(--cm-control-outline)!important;
  min-height:41px;
  font-family:Manrope,system-ui,sans-serif;
}
html .workspace :is(input,select,textarea):focus-visible {
  border-color:var(--cm-accent)!important;
  box-shadow:0 0 0 3px rgba(169,47,84,.13)!important;
  outline:2px solid transparent!important;
}
html .workspace input[type=checkbox],
html .workspace input[type=radio]{accent-color:var(--cm-accent);}
html .workspace :is(.field > label,.filter-field label,.form-grid label) {
  font-weight:750;
  letter-spacing:.005em;
}
html .workspace :is(.main-form,.help-panel,.form-aside) {overflow:visible;}
html .workspace .form-actions {border-top:1px solid var(--cm7-hairline);}
html .workspace :is(.filter-bar,.cm-filter-panel){padding:clamp(15px,1.5vw,22px);}
html .workspace :is(.tabs,.cm-filter-actions) {gap:9px;}
html .workspace .tabs a{border-radius:10px 10px 0 0;font-weight:750;}

/* Status pills for POS movement reconciliation — no semantic accounting change. */
html .workspace .cm7-pos-status {
  display:inline-flex;align-items:center;max-width:240px;gap:6px;
  padding:6px 10px;border-radius:999px;border:1px solid var(--cm7-line);
  background:var(--cm7-muted-paper);color:var(--cm-secondary);
  font-size:10px;font-weight:800;line-height:1.35;white-space:normal;
}
html .workspace .cm7-pos-status::before{
  content:"";width:6px;height:6px;flex:0 0 6px;
  background:#b18b55;border-radius:50%;
}
html .workspace .cm7-pos-status--scheduled{
  border-color:color-mix(in srgb,#b48a36 28%,var(--cm7-line));
  background:color-mix(in srgb,#f4e5c0 35%,var(--cm7-paper));
  color:var(--cm-text);
}
html .workspace .cm7-pos-status--due{
  border-color:color-mix(in srgb,#438a73 27%,var(--cm7-line));
  background:color-mix(in srgb,#b8e3d2 28%,var(--cm7-paper));
}
html .workspace .cm7-pos-status--due::before{background:#40906e;}
html .workspace .cm7-pos-status--missing::before{background:#b23b59;}
html .workspace .cm7-pos-status--missing{border-color:#bb7283;}
html .workspace .cm7-pos-status--legacy::before{background:#758398;}

/* Three repair view cards become deliberate entrance points. */
html .workspace .cm-repair-groups {gap:clamp(9px,1.3vw,16px);}
html .workspace .cm-repair-group {
  min-height:158px;
  border-radius:18px!important;
  background:var(--cm7-paper)!important;
  box-shadow:var(--cm7-soft-shadow);
  border:1px solid var(--cm7-line)!important;
  padding:clamp(14px,1.5vw,21px);
}
html .workspace .cm-repair-group.is-active{
  background:var(--cm7-paper)!important;
  border:2px solid var(--cm-accent)!important;
  padding:calc(clamp(14px,1.5vw,21px) - 1px);
}
html .workspace .cm-repair-group>strong {font-size:clamp(13px,1vw,16px);letter-spacing:-.025em;}
html .workspace .cm-repair-group-count {color:var(--cm-accent);}
html .workspace .cm-repair-group-action{font-weight:800;}
html .workspace .cm-repair-group:hover{box-shadow:var(--cm7-hover-shadow);}
html .workspace .cm-kanban-lane{box-shadow:none;}

/* Finance pages retain their own deliberately composed hero, not an overlay. */
html .workspace .finance-hero {border-radius:22px;box-shadow:0 18px 45px rgba(83,28,54,.10);}
html .workspace :is(.finance-card,.finance-metric,.finance-panel) {border-radius:18px;}
html .workspace .finance-hero :is(h1,h2) {letter-spacing:-.052em;}
html .workspace .finance-hero .button {border-radius:12px;}

/* Dark Executive: coherent dark surfaces and contrast-correct actions. */
html.cm-dark .workspace :is(.panel:not(.hero-summary),.metric-card,.cm-compare-card,.cm-layout-heading,.cm-filter-panel,.cm-repair-group){
  background:var(--cm7-paper)!important;color:var(--cm7-ink);
}
html.cm-dark .workspace :is(.table-scroll thead th,.table-panel thead th){background:var(--cm7-muted-paper)!important;}
html.cm-dark .workspace :is(.button.secondary,.cm-repair-group-action) {
  background:var(--cm7-muted-paper)!important;
  color:var(--cm7-ink)!important;
  border-color:var(--cm7-line)!important;
}
html.cm-dark .workspace .cm-repair-group>small {color:var(--cm7-muted)!important;}
html.cm-dark .workspace .cm-repair-group-action{border-top-color:var(--cm7-line)!important;}
html.cm-dark .workspace :is(.cm7-pos-status,.cm7-pos-status--scheduled,.cm7-pos-status--due) {color:var(--cm7-ink);}

/* Responsive: no horizontal viewport overflow; preserve table's own scroll. */
@media(max-width:1050px){
  html .workspace .page-heading {align-items:flex-start;}
  html .workspace .page-heading .button-row {justify-content:flex-start;}
  html .workspace .hero-summary {padding:25px;}
}
@media(max-width:760px){
  html .workspace main#main {padding-inline:clamp(13px,3.5vw,20px);}
  html .workspace .topbar {padding-inline:14px;gap:9px;}
  html .workspace .page-heading {margin-bottom:16px;gap:12px;}
  html .workspace .page-heading h1 {font-size:clamp(25px,6vw,32px);}
  html .workspace .page-heading p{font-size:11px;}
  html .workspace .page-heading .button-row {width:100%;gap:7px;}
  html .workspace .page-heading .button-row>.button {flex:0 1 auto;}
  html .workspace .hero-summary {border-radius:20px!important;padding:22px;}
  html .workspace .hero-text h2{font-size:clamp(30px,8vw,42px);}
  html .workspace .metric-card {padding:15px;}
  html .workspace .panel-header {padding:17px 15px;}
  html .workspace .cm-layout-heading {padding:16px;}
  html .workspace .cm-repair-group {min-height:0;}
  html .workspace :is(.table-scroll tbody td,.table-panel tbody td){padding-block:12px;}
}
@media(max-width:400px){
  html .workspace .button-row .button {min-height:38px;font-size:10px;}
  html .workspace .page-heading h1{font-size:25px;}
  html .workspace .report-strip{gap:10px;}
}
/* Purely visual rules do not hide, relocate or obstruct buttons at print time. */
@media print{
  html .workspace :is(.metric-card,.panel,.table-panel,.cm-repair-group,.report-strip){
    box-shadow:none!important;
  }
  html .workspace .hero-summary {box-shadow:none!important;print-color-adjust:exact;}
}
@media(prefers-reduced-motion:reduce){
  html .workspace :is(.cm-repair-group,.panel,.metric-card,.button,.nav-link){
    transform:none!important;transition:none!important;
  }
}

/*
 * Premium Scarlet 7.1: everyday workflow refinements.
 * Navigation-only links, legible list states and compact touch-friendly mobile UI.
 */

/* A compact operation command surface directly under the dashboard heading. */
html .workspace .cm7-operations-rail{
  position:relative;
  display:grid;grid-template-columns:minmax(180px,.95fr) minmax(0,3.55fr);
  align-items:stretch;gap:clamp(15px,2vw,28px);
  padding:clamp(16px,1.9vw,24px);
  margin:0 0 clamp(18px,2.3vw,27px);
  border-radius:20px;
  background:var(--cm7-paper);
  border:1px solid var(--cm7-line);
  box-shadow:var(--cm7-soft-shadow);
  isolation:isolate;
}
html .workspace .cm7-operations-caption{
  display:flex;flex-direction:column;justify-content:center;
  min-width:0;gap:4px;
  padding-right:clamp(10px,1.4vw,22px);
  border-right:1px solid var(--cm7-hairline);
}
html .workspace .cm7-operations-kicker{
  font-size:9px;letter-spacing:.13em;
  font-weight:800;color:var(--cm-accent-strong);
}
html .workspace .cm7-operations-caption>strong{
  color:var(--cm-text);
  font-size:clamp(14px,1.12vw,18px);
  line-height:1.3;letter-spacing:-.035em;font-weight:800;
}
html .workspace .cm7-operations-caption>small{
  font-size:10px;line-height:1.65;color:var(--cm-secondary);
}
html .workspace .cm7-operations-links{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(126px,1fr));
  gap:8px;min-width:0;
}
html .workspace .cm7-operations-link{
  display:flex;align-items:center;gap:10px;min-width:0;
  padding:11px 10px 12px;
  background:var(--cm7-muted-paper);
  color:var(--cm-text);
  text-decoration:none;
  border:1px solid var(--cm7-line);
  border-radius:13px;
  transition:background-color .16s ease,border-color .16s ease,
    box-shadow .16s ease,transform .16s ease;
}
html .workspace .cm7-operations-link>.cm7-operations-icon{
  flex:0 0 32px;
  display:grid;place-items:center;width:32px;height:32px;
  font-size:17px;font-weight:800;
  color:var(--cm-accent-strong);
  background:var(--cm7-rose);border-radius:10px;
}
html .workspace .cm7-operations-link>span:nth-child(2){
  display:flex;flex-direction:column;gap:2px;min-width:0;
}
html .workspace .cm7-operations-link strong{
  color:var(--cm-text);font-size:11px;font-weight:800;
  line-height:1.45;letter-spacing:-.015em;
}
html .workspace .cm7-operations-link small{
  color:var(--cm-secondary);font-size:9px;line-height:1.45;
}
html .workspace .cm7-operations-chevron{
  font-size:15px;line-height:1;color:var(--cm-accent);
  margin-left:auto;align-self:center;opacity:.65;
}
html .workspace .cm7-operations-link:is(:hover,:focus-visible){
  background:var(--cm7-paper);border-color:var(--cm-accent);
  box-shadow:0 5px 18px rgba(109,34,65,.085);
}
html .workspace .cm7-operations-link:focus-visible{
  outline:3px solid var(--cm-focus);outline-offset:2px;
}
@media(hover:hover) and (prefers-reduced-motion:no-preference){
  html .workspace .cm7-operations-link:hover{transform:translateY(-2px);}
  html .workspace .cm7-operations-link:hover .cm7-operations-chevron{opacity:1;}
}

/* Better distinction between the active category and inactive repair buckets. */
html .workspace .cm-repair-groups{
  align-items:stretch;
}
html .workspace .cm-repair-group .cm-repair-group-head{margin-bottom:2px;}
html .workspace .cm-repair-group .cm-repair-group-symbol{
  background:var(--cm7-rose);color:var(--cm-accent-strong);
  border:1px solid var(--cm7-line);
  border-radius:12px;width:40px;height:40px;
  box-shadow:inset 0 1px rgba(255,255,255,.20);
}
html .workspace .cm-repair-group.is-active{
  box-shadow:0 0 0 3px color-mix(in srgb,var(--cm-accent) 9%,transparent),
    var(--cm7-soft-shadow)!important;
}
html .workspace .cm-repair-group .cm-repair-group-count{
  font-size:clamp(22px,2vw,28px);font-weight:850;
  font-variant-numeric:tabular-nums;letter-spacing:-.055em;
}
html .workspace .cm-repair-group .cm-repair-group-action{
  border-top:1px solid var(--cm7-hairline);
  padding-top:10px;color:var(--cm-accent-strong);
}
html .workspace .cm-repair-group:hover .cm-repair-group-action{
  text-decoration:underline;text-underline-offset:3px;
}

/* A calmer command table, with stronger amounts and healthier whitespace. */
html .workspace .cm-table-heading{
  background:var(--cm7-paper);
  border-bottom:1px solid var(--cm7-hairline);
}
html .workspace .cm-table-heading small,
html .workspace .cm-filter-subtitle{
  font-size:10px;line-height:1.7;
  color:var(--cm-secondary);
}
html .workspace .table-panel :is(.record-link,.row-arrow){
  color:var(--cm-accent-strong);
  text-underline-offset:3px;
}
html .workspace .table-panel .record-link:hover{text-decoration:underline;}
html .workspace .table-panel .inline-record-actions{
  display:flex;align-items:center;gap:8px;
}
html .workspace .table-panel .record-edit-link{
  min-height:31px;
  display:inline-flex;align-items:center;
  font-weight:800;
}
html .workspace .table-panel :is(.doc-button,.row-arrow,.cm4-preview-trigger){
  border-radius:9px;
}
html .workspace .table-panel .cm-column-sort{
  font-weight:800;letter-spacing:.005em;
}
html .workspace .pagination{
  background:var(--cm7-muted-paper);padding-block:13px;
  color:var(--cm-secondary);
}
html .workspace .cm-active-filters{
  border-radius:13px;
}
html .workspace .cm-filter-chip{
  border:1px solid var(--cm7-line);
  border-radius:999px;
  background:var(--cm7-rose);
  color:var(--cm-accent-strong);
  line-height:1.55;
}
html .workspace .cm-filter-panel .cm-filter-head{
  border-bottom-color:var(--cm7-hairline);
}

/* Softer financial rows and more deliberate section hierarchy. */
html .workspace .cm-compare-head{
  align-items:center;
  gap:14px;
}
html .workspace .cm-compare-head :is(h2,h3){
  color:var(--cm-text);
  letter-spacing:-.042em;
}
html .workspace .cm-compare-grid{gap:clamp(11px,1.5vw,20px);}
html .workspace .cm-compare-card{
  padding:clamp(17px,1.7vw,23px);
}
html .workspace .cm-compare-card>strong{
  font-variant-numeric:tabular-nums;
  letter-spacing:-.04em;
}
html .workspace .cm-trend-panel{border-radius:19px;}
html .workspace .cm-chart-summary{
  border-radius:11px;
  border-color:var(--cm7-line);
}
html .workspace .page-footer{
  border-top:1px solid var(--cm7-hairline);
  color:var(--cm-secondary);
}

/* Quick add / footer navigation receive comfortable interactive affordances. */
html .workspace .cm-quick-launch>summary{
  border-radius:999px;
  box-shadow:0 10px 30px rgba(76,22,47,.18);
}
html .workspace .cm-quick-launch-menu{
  border:1px solid var(--cm7-line)!important;
  border-radius:17px!important;
  box-shadow:0 20px 42px rgba(58,25,44,.20)!important;
}
html .workspace .cm-quick-launch-menu a{
  min-height:45px;
  font-size:11px;font-weight:750;
  border-radius:10px;
}
html .workspace .cm-quick-launch-menu a:hover{
  background:var(--cm7-rose);
}

/* Explicit dark overrides for new navigation elements and report chips. */
html.cm-dark .workspace .cm7-operations-rail,
html.cm-dark .workspace .cm-table-heading{
  background:var(--cm7-paper);
  color:var(--cm7-ink);
  border-color:var(--cm7-line);
}
html.cm-dark .workspace .cm7-operations-link{
  background:var(--cm7-muted-paper);
  border-color:var(--cm7-line);
}
html.cm-dark .workspace .cm7-operations-link:hover{
  background:var(--cm7-paper);
}
html.cm-dark .workspace .cm7-operations-link>.cm7-operations-icon{
  background:var(--cm7-rose);
  color:var(--cm7-berry-strong);
}
html.cm-dark .workspace .cm-filter-chip{
  background:var(--cm7-muted-paper);color:var(--cm7-berry-strong);
}

/* Tablet displays two compact rows; phones get horizontal native navigation. */
@media(max-width:1250px){
  html .workspace .cm7-operations-rail{
    grid-template-columns:1fr;gap:12px;
  }
  html .workspace .cm7-operations-caption{
    border-right:0;padding-right:0;
    padding-bottom:11px;
    border-bottom:1px solid var(--cm7-hairline);
  }
  html .workspace .cm7-operations-links{
    grid-template-columns:repeat(auto-fit,minmax(140px,1fr));
  }
}
@media(max-width:700px){
  html .workspace .cm7-operations-rail{
    margin-bottom:17px;padding:13px;
    border-radius:17px;
  }
  html .workspace .cm7-operations-caption{
    padding:2px 3px 11px;
  }
  html .workspace .cm7-operations-caption>strong{font-size:15px;}
  html .workspace .cm7-operations-caption>small{font-size:10px;}
  html .workspace .cm7-operations-links{
    display:flex;gap:8px;overflow-x:auto;
    scroll-snap-type:x proximity;
    scroll-padding-inline:3px;
    padding:2px 3px 9px;
    -webkit-overflow-scrolling:touch;
  }
  html .workspace .cm7-operations-link{
    flex:0 0 min(65vw,175px);min-width:0;
    scroll-snap-align:start;
    padding:11px;
  }
  html .workspace .cm7-operations-link>.cm7-operations-icon{
    width:30px;height:30px;flex-basis:30px;
  }
  html .workspace .cm7-operations-link strong{font-size:11px;}
  html .workspace .cm7-operations-link small{font-size:9px;}
  html .workspace .cm-compare-grid{gap:9px;}
  html .workspace .cm-repair-group .cm-repair-group-symbol{width:35px;height:35px;}
}
@media(prefers-reduced-motion:reduce){
  html .workspace .cm7-operations-link,
  html .workspace .cm7-operations-link:hover{
    transform:none!important;
    transition:none!important;
  }
}
