
:root {
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang TC","Microsoft JhengHei",sans-serif;
  color:#202b3d;
  background:#f7f8fa;
  font-synthesis:none;
  --ink:#202b3d;
  --muted:#748094;
  --line:#e5e8ed;
  --canvas:#f7f8fa;
  --white:#fff;
  --navy:#202c41;
  --coral:#f5775e;
  --green:#1b8b6e;
  --ease:cubic-bezier(.23,1,.32,1);
  font-size:14px
}
* {
  box-sizing:border-box
}
html {
  -webkit-tap-highlight-color:transparent;
  -webkit-text-size-adjust:100%;
  overscroll-behavior:none
}
body {
  margin:0;
  min-width:320px
}
button,input,select,textarea {
  font:inherit
}
button,a,[role=button] {
  touch-action:manipulation
}
button {
  cursor:pointer;
  user-select:none;
  -webkit-user-select:none;
  -webkit-touch-callout:none;
  color:inherit
}
button:disabled {
  cursor:not-allowed;
  opacity:.5
}
button:active:not(:disabled) {
  transform:scale(.98)
}
a {
  color:inherit;
  text-decoration:none
}
a.external {
  color:#42609c;
  text-decoration:underline;
  text-underline-offset:3px;
  overflow-wrap:anywhere
}
svg {
  display:block;
  flex-shrink:0
}
button {
  transition:background-color 120ms ease,transform 100ms var(--ease),border-color 120ms ease
}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible {
  outline:3px solid #89a9e4;
  outline-offset:3px
}
input,select,textarea {
  width:100%;
  background:#fff;
  border:1px solid #dce1e8;
  border-radius:7px;
  padding:10px 11px;
  color:var(--ink);
  min-height:40px
}
input::placeholder,textarea::placeholder {
  color:#97a0af
}
input[type=checkbox] {
  width:16px;
  height:16px;
  min-height:16px;
  accent-color:var(--navy)
}
input[type=date],input[type=datetime-local] {
  min-width:0
}
.date-control{position:relative;display:flex;align-items:center;gap:4px;min-width:0;width:100%}
.date-control input[data-date-input]{min-width:0;flex:1;width:100%;font-variant-numeric:tabular-nums}
.filter-control .date-control.date-field{width:auto;flex:0 1 150px}
.filter-control .date-control.date-field input{max-width:116px;padding:0;background:transparent;border:0;font-size:11px}
.date-calendar-button{display:inline-flex;align-items:center;justify-content:center;min-width:34px;height:36px;padding:0;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--muted);cursor:pointer}
.filter-control .date-calendar-button{min-width:28px;height:28px;border:0;background:transparent}
.date-popover{position:absolute;z-index:120;top:calc(100% + 6px);left:0;width:280px;padding:12px;border:1px solid var(--line);border-radius:12px;background:#fff;box-shadow:0 12px 32px #17203324}
.date-popover[hidden]{display:none}
.calendar-popover-head,.calendar-popover-foot{display:flex;align-items:center;justify-content:space-between;gap:8px}
.calendar-popover-head button,.calendar-popover-foot button{border:0;background:transparent;color:var(--navy);padding:6px 10px;border-radius:7px;cursor:pointer}
.calendar-popover-head button{font-size:20px}
.calendar-popover-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;margin-top:8px;text-align:center}
.calendar-popover-grid>span{font-size:11px;color:var(--muted);padding:5px 0}
.calendar-popover-day{height:32px;border:0;border-radius:8px;background:transparent;color:var(--ink);cursor:pointer;font-size:12px}
.calendar-popover-day.outside{color:#aab2bd}
.calendar-popover-day.today{outline:1px solid var(--accent)}
.calendar-popover-day.selected{background:var(--navy);color:#fff}
.calendar-popover-day:focus-visible,.date-calendar-button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.date-time-control{display:flex;gap:8px;align-items:center}
.date-time-control .date-control{flex:1}
.date-time-control>[data-date-time-time]{width:145px}
textarea {
  resize:vertical;
  min-height:92px;
  line-height:1.65
}
select {
  padding-right:28px
}
label {
  display:block
}
h1,h2,h3,h4,p {
  margin:0
}
h1 {
  font-size:27px;
  line-height:1.4;
  letter-spacing:-.7px;
  font-weight:700
}
h2 {
  font-size:16px;
  letter-spacing:-.25px
}
h3 {
  font-size:14px
}
small {
  font-size:11px
}
.muted {
  color:var(--muted)
}
.mono,.numeric {
  font-variant-numeric:tabular-nums
}
.nowrap {
  white-space:nowrap
}
.sr-only {
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0
}
.skip-link {
  position:fixed;
  top:-100px;
  left:20px;
  z-index:200;
  background:var(--navy);
  color:white;
  padding:12px
}
.skip-link:focus {
  top:12px
}
.boot-screen {
  height:100dvh;
  display:flex;
  gap:20px;
  align-items:center;
  justify-content:center;
  flex-direction:column
}
.boot-screen p {
  color:var(--muted)
}
.app-shell {
  display:grid;
  grid-template-columns:214px minmax(0,1fr);
  min-height:100dvh
}
.sidebar {
  position:fixed;
  inset:0 auto 0 0;
  width:214px;
  background:#fff;
  border-right:1px solid var(--line);
  z-index:25;
  display:flex;
  flex-direction:column;
  padding:29px 18px 18px
}
.brand {
  display:flex;
  align-items:center;
  gap:11px;
  padding:0 11px 35px;
  font-size:22px;
  font-weight:750;
  letter-spacing:-1.1px
}
.brand-mark {
  position:relative;
  display:flex;
  justify-content:center;
  align-items:center;
  flex-shrink:0;
  width:29px;
  height:29px;
  background:var(--coral);
  border-radius:9px;
  color:white;
  font-size:23px;
  font-weight:750;
  font-family:Arial,sans-serif;
  line-height:1
}
.brand-mark span {
  position:absolute;
  right:-1px;
  bottom:0;
  width:9px;
  height:9px;
  background:#fff;
  border:2px solid var(--coral);
  border-radius:3px
}
.nav-group {
  margin-bottom:27px
}
.nav-caption {
  padding:0 14px;
  margin-bottom:9px;
  color:#a1a9b5;
  font-size:10px;
  letter-spacing:1.5px;
  font-weight:650
}
.nav-item {
  display:flex;
  align-items:center;
  gap:12px;
  width:100%;
  border:0;
  border-radius:7px;
  background:transparent;
  padding:11px 13px;
  margin:3px 0;
  font-size:13px;
  color:#697487;
  text-align:left;
  min-height:43px
}
.nav-item.active {
  background:var(--navy);
  color:#fff;
  box-shadow:0 3px 5px #202c4110
}
.nav-item svg {
  width:18px;
  height:18px
}
.nav-item .count {
  margin-left:auto;
  background:#f3c3b7;
  color:#864637;
  min-width:21px;
  text-align:center;
  border-radius:4px;
  font-size:10px;
  padding:2px 4px
}
.side-bottom {
  margin-top:auto
}
.workspace-badge {
  margin:8px 7px 20px;
  padding:12px;
  border:1px solid #e9edf1;
  border-radius:9px;
  font-size:11px;
  line-height:1.8;
  background:#fbfcfd
}
.workspace-badge strong {
  display:block;
  font-size:12px
}
.workspace-badge .dot {
  display:inline-block;
  width:6px;
  height:6px;
  background:#38a382;
  border-radius:100%;
  margin-right:6px
}
.profile {
  display:flex;
  align-items:center;
  gap:10px;
  padding:13px 8px 0;
  border-top:1px solid var(--line)
}
.avatar {
  width:32px;
  height:32px;
  border-radius:50%;
  background:#efe5d9;
  color:#947450;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  font-size:12px;
  flex-shrink:0
}
.profile .name {
  font-size:12px;
  font-weight:600
}
.profile .role {
  font-size:10px;
  color:var(--muted);
  margin-top:4px
}
.content-shell {
  grid-column:2;
  min-width:0
}
.topbar {
  height:69px;
  border-bottom:1px solid var(--line);
  padding:0 34px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  background:#fff;
  gap:16px
}
.breadcrumb {
  display:flex;
  gap:12px;
  align-items:center;
  font-size:12px;
  color:#8a94a2
}
.breadcrumb strong {
  color:#475365;
  font-weight:500
}
.top-tools {
  display:flex;
  gap:14px;
  align-items:center
}
.top-tools .today {
  color:#7f8999;
  font-size:11px
}
.icon-btn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  background:transparent;
  border:0;
  border-radius:6px;
  width:32px;
  height:32px;
  padding:6px;
  color:#788395;
  flex-shrink:0
}
.icon-btn svg {
  width:17px;
  height:17px
}
.mobile-menu {
  display:none
}
.main {
  padding:31px 34px 28px;
  max-width:1700px;
  margin:0 auto
}
.page-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  margin-bottom:24px
}
.eyebrow {
  font-size:10px;
  letter-spacing:1.8px;
  color:#8491a1;
  margin-bottom:6px;
  font-weight:600
}
.page-subtitle {
  color:#8791a0;
  font-size:12px;
  line-height:1.8;
  margin-top:5px
}
.page-actions {
  display:flex;
  gap:9px;
  align-items:center
}
.btn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  padding:9px 13px;
  min-height:37px;
  border:1px solid #dfe3e9;
  border-radius:7px;
  background:white;
  font-size:12px;
  font-weight:550;
  white-space:nowrap
}
.btn svg {
  width:15px;
  height:15px
}
.btn-primary {
  background:var(--navy);
  border-color:var(--navy);
  color:white
}
.btn-coral {
  background:var(--coral);
  border-color:var(--coral);
  color:white
}
.btn-danger {
  background:#fff4f1;
  border-color:#f4c8bd;
  color:#b14b35
}
.btn-quiet {
  background:transparent;
  border-color:transparent;
  color:#748092
}
.btn-small {
  padding:6px 10px;
  min-height:31px;
  font-size:11px
}
.demo-notice {
  display:flex;
  gap:8px;
  align-items:center;
  margin-bottom:20px;
  padding:9px 12px;
  background:#fff9eb;
  border:1px solid #f2e8d0;
  border-radius:6px;
  color:#9b7a3e;
  font-size:11px;
  line-height:1.5
}
.demo-notice svg {
  width:14px;
  height:14px
}
.demo-notice strong {
  font-weight:650
}
.demo-notice .link-button {
  margin-left:auto
}
.link-button {
  border:0;
  background:transparent;
  color:inherit;
  padding:0;
  text-decoration:underline;
  text-underline-offset:3px;
  font-size:inherit;
  white-space:nowrap
}
.filter-bar {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  margin-bottom:19px
}
.filter-control {
  display:flex;
  align-items:center;
  gap:7px;
  min-height:35px;
  padding:6px 9px;
  border:1px solid var(--line);
  border-radius:6px;
  background:#fff;
  font-size:11px
}
.filter-control svg {
  width:13px;
  height:13px;
  color:#8a94a2
}
.filter-control select,.filter-control input {
  border:0;
  padding:0;
  min-height:20px;
  border-radius:0;
  font-size:11px;
  background:transparent;
  width:auto;
  max-width:140px
}
.filter-control .date-field {
  max-width:116px
}
.filter-divider {
  height:22px;
  width:1px;
  background:var(--line);
  margin:0 4px
}
.filter-bar .comparison-label {
  font-size:10px;
  color:#94a0ae;
  margin-left:auto
}
.section-label {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  margin:20px 0 13px
}
.section-label h2 {
  font-size:13px;
  font-weight:650
}
.section-label span {
  font-size:10px;
  color:#99a2af
}
.metric-grid {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px
}
.metric-card {
  text-align:left;
  position:relative;
  background:white;
  border:1px solid var(--line);
  border-radius:9px;
  padding:18px;
  min-height:135px;
  color:var(--ink);
  overflow:hidden
}
.metric-label {
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-size:11px;
  color:#7d8797;
  margin-bottom:13px
}
.metric-label svg {
  width:15px;
  height:15px;
  color:#a5aebb
}
.metric-value {
  font-size:28px;
  font-weight:650;
  line-height:1.15;
  letter-spacing:-1px;
  font-variant-numeric:tabular-nums
}
.metric-value .currency {
  font-size:15px;
  margin-right:3px;
  color:#657083;
  font-weight:500
}
.metric-foot {
  margin-top:13px;
  display:flex;
  align-items:center;
  gap:7px;
  font-size:10px;
  color:#a0a8b3
}
.delta {
  color:#249273;
  display:inline-flex;
  gap:3px;
  align-items:center;
  font-weight:650
}
.delta.down {
  color:#ce735c
}
.metric-card.featured {
  background:#fff9f6;
  border-color:#f1d9cf
}
.metric-card.featured .metric-value {
  color:#c96951
}
.mini-progress {
  height:4px;
  background:#e8edf1;
  border-radius:5px;
  margin-top:13px;
  overflow:hidden
}
.mini-progress span {
  height:100%;
  display:block;
  background:var(--coral);
  border-radius:5px
}
.panel {
  background:#fff;
  border:1px solid var(--line);
  border-radius:9px;
  min-width:0;
  overflow:hidden
}
.panel-header {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:18px 20px 0;
  gap:12px
}
.panel-header h2 {
  font-size:13px
}
.panel-header p {
  font-size:10px;
  color:#98a0ad;
  margin-top:5px
}
.panel-header .legend {
  display:flex;
  gap:14px;
  font-size:10px;
  color:#8b94a1
}
.legend i {
  width:6px;
  height:6px;
  display:inline-block;
  border-radius:100%;
  margin-right:5px
}
.chart-grid {
  display:grid;
  grid-template-columns:minmax(0,1.85fr) minmax(260px,1fr);
  gap:16px;
  margin-top:17px
}
.trend-chart {
  height:225px;
  padding:17px 19px 6px;
  position:relative
}
.trend-chart svg {
  width:100%;
  height:100%;
  overflow:visible
}
.chart-label {
  font-size:10px;
  fill:#a2aab7
}
.chart-line {
  stroke:#eeb08e;
  fill:none;
  stroke-width:2.5;
  stroke-linecap:round;
  stroke-linejoin:round
}
.chart-gridline {
  stroke:#edf0f4;
  stroke-dasharray:3 5
}
.trend-bottom {
  display:flex;
  align-items:center;
  gap:8px;
  border-top:1px solid #f0f2f5;
  padding:12px 20px;
  color:#9ba5b1;
  font-size:10px
}
.revenue-chart {
  display:flex;
  align-items:center;
  justify-content:center;
  padding:17px 10px 12px;
  gap:26px;
  min-height:220px
}
.donut {
  width:154px;
  height:154px;
  border-radius:50%;
  display:grid;
  place-items:center;
  flex-shrink:0
}
.donut-inner {
  width:117px;
  height:117px;
  background:white;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:7px
}
.donut-inner .muted {
  font-size:10px
}
.donut-inner strong {
  font-size:22px;
  letter-spacing:-.8px;
  font-weight:650
}
.revenue-legend {
  display:flex;
  flex-direction:column;
  gap:22px;
  font-size:11px
}
.revenue-legend i {
  width:7px;
  height:7px;
  display:inline-block;
  border-radius:2px;
  margin-right:5px
}
.revenue-legend strong {
  display:block;
  font-size:16px;
  margin-top:7px;
  letter-spacing:-.5px
}
.revenue-legend .muted {
  font-size:10px;
  margin-left:12px
}
.bottom-grid {
  display:grid;
  grid-template-columns:1.17fr 1fr;
  gap:16px;
  margin-top:17px
}
.funnel {
  padding:21px 20px 18px;
  display:grid;
  gap:15px
}
.funnel-row {
  display:grid;
  grid-template-columns:56px minmax(30px,1fr) 43px;
  align-items:center;
  gap:14px;
  border:0;
  background:transparent;
  padding:0;
  text-align:left;
  font-size:11px
}
.funnel-track {
  height:23px;
  background:#f6f7f9;
  border-radius:4px;
  overflow:hidden
}
.funnel-track span {
  height:100%;
  min-width:4px;
  display:block;
  background:#738396;
  border-radius:4px
}
.funnel-row:nth-child(2) .funnel-track span {
  background:#96a1b0
}
.funnel-row:nth-child(3) .funnel-track span {
  background:#b3bbc7
}
.funnel-row:nth-child(4) .funnel-track span {
  background:#e0baa7
}
.funnel-row:nth-child(5) .funnel-track span {
  background:#ef997e
}
.funnel-row:last-child .funnel-track span {
  background:var(--coral)
}
.funnel-row strong {
  text-align:right;
  font-variant-numeric:tabular-nums;
  font-size:12px
}
.ranking {
  padding:12px 20px 17px
}
.rank-row {
  display:flex;
  align-items:center;
  gap:11px;
  padding:12px 0;
  border-bottom:1px solid #f0f2f5
}
.rank-row:last-child {
  border-bottom:0
}
.rank-number {
  font-size:11px;
  width:14px;
  color:#a3acb8
}
.rank-name {
  font-size:11px;
  min-width:64px
}
.rank-track {
  height:5px;
  flex:1;
  min-width:20px;
  background:#f2f4f7;
  border-radius:5px
}
.rank-track span {
  display:block;
  height:100%;
  background:#9ca9b9;
  border-radius:5px
}
.rank-row:first-child .rank-track span {
  background:var(--coral)
}
.rank-value {
  font-size:12px;
  font-weight:650;
  min-width:80px;
  text-align:right;
  font-variant-numeric:tabular-nums
}
.footnote {
  font-size:10px;
  line-height:1.8;
  color:#a2aab6;
  margin-top:17px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px
}
.view-tabs {
  display:flex;
  align-items:center;
  gap:3px;
  border-bottom:1px solid var(--line);
  padding:0 17px;
  overflow-x:auto;
  scrollbar-width:thin
}
.desktop-view-strip { display:flex; align-items:center; gap:6px; min-width:0; }
.desktop-view-strip .view-tabs { min-width:0; flex:0 1 auto; }
.desktop-view-strip .view-tab-add { flex:none; }
.view-tab {
  border:0;
  border-bottom:2px solid transparent;
  background:transparent;
  font-size:12px;
  padding:16px 12px 13px;
  white-space:nowrap;
  color:#8b94a2
}
.view-tab.active {
  color:var(--ink);
  border-bottom-color:var(--coral);
  font-weight:650
}
.view-toolbar {
  display:flex;
  gap:7px;
  align-items:center;
  padding:15px 17px;
  flex-wrap:wrap
}
.search-control {
  position:relative;
  max-width:265px;
  flex:1;
  min-width:150px;
  margin-right:auto
}
.search-control svg {
  position:absolute;
  left:11px;
  top:10px;
  width:15px;
  height:15px;
  color:#99a2b0
}
.search-control input {
  font-size:12px;
  min-height:35px;
  padding:8px 10px 8px 34px;
  background:#fbfcfd
}
.tool-btn {
  display:flex;
  align-items:center;
  gap:5px;
  border:1px solid #e5e8ee;
  border-radius:6px;
  background:white;
  font-size:11px;
  color:#697486;
  padding:7px 9px;
  min-height:33px
}
.tool-btn svg {
  width:14px;
  height:14px
}
.tool-btn.on {
  background:#edf2fa;
  border-color:#dce5f4;
  color:#48658d
}
.filter-chips {
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  padding:0 17px 13px
}
.filter-chip {
  display:flex;
  align-items:center;
  gap:7px;
  background:#f2f5fa;
  border:1px solid #e1e7f0;
  border-radius:5px;
  padding:5px 8px;
  font-size:10px;
  color:#677b96
}
.filter-chip button {
  border:0;
  background:transparent;
  padding:0;
  color:inherit;
  font-size:14px;
  line-height:1
}
.table-scroll {
  width:100%;
  overflow:auto;
  overscroll-behavior:contain;
  max-height:64dvh;
  min-height:150px
}
table {
  border-collapse:separate;
  border-spacing:0;
  table-layout:fixed;
  width:100%;
  font-size:12px
}
th {
  text-align:left;
  font-size:10px;
  font-weight:550;
  background:#f9fafc;
  color:#9099a6;
  height:40px;
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
  position:sticky;
  top:0;
  z-index:3;
  padding:0 15px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis
}
th button {
  border:0;
  background:transparent;
  color:inherit;
  padding:0;
  width:100%;
  display:flex;
  gap:4px;
  align-items:center;
  text-align:left;
  font:inherit
}
th .sort-order {
  color:#64799a;
  margin-left:3px
}
td {
  padding:15px;
  border-bottom:1px solid #f0f2f5;
  vertical-align:middle;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  background:#fff;
  height:54px;
  color:#5e6b7e
}
td strong {
  font-weight:600;
  color:#364256
}
.record-link {
  color:#374d6d;
  border:0;
  background:transparent;
  padding:0;
  font:inherit;
  font-weight:600;
  text-align:left;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap
}
.record-cell-actions {
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0
}
.record-cell-primary {
  display:block;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis
}
.record-row-preview {
  flex:none;
  color:#a85f27
}
.cell-pinned {
  position:sticky;
  z-index:2;
  box-shadow:1px 0 0 var(--line)
}
th.cell-pinned {
  z-index:5
}
tr.row-warning td {
  background:#fffcf3
}
tr.row-danger td {
  background:#fff6f4
}
tr.row-success td {
  background:#f4fbf7
}
tr.row-highlight td {
  background:#f2f6ff
}
td.cell-warning {
  background:#fff6dc!important
}
td.cell-danger {
  background:#ffeae4!important
}
td.cell-success {
  background:#e7f5ed!important
}
td.cell-highlight {
  background:#e6eefc!important
}
.group-row td {
  height:35px;
  padding:8px 15px;
  background:#f3f5f8;
  font-size:11px;
  font-weight:600;
  color:#69778b
}
.group-row span {
  color:#9aa4b1;
  font-weight:400;
  margin-left:8px
}
.table-footer {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:12px 17px;
  font-size:10px;
  color:#98a3af;
  border-top:1px solid var(--line)
}
.badge {
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding:4px 7px;
  border-radius:4px;
  font-size:10px;
  line-height:1.3;
  background:#eef1f5;
  color:#768397;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis
}
.badge.green {
  background:#eaf5ef;
  color:#3a9274
}
.badge.blue {
  background:#eef3fb;
  color:#6a86b6
}
.badge.purple {
  background:#f0eef8;
  color:#9a82b8
}
.badge.orange {
  background:#fff2e5;
  color:#c99963
}
.badge.red {
  background:#fcedea;
  color:#c87d69
}
.status-dot {
  width:5px;
  height:5px;
  background:currentColor;
  border-radius:100%;
  flex-shrink:0
}
.empty-state {
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  text-align:center;
  gap:11px;
  min-height:270px;
  padding:35px;
  color:#909bac
}
.empty-state svg {
  width:35px;
  height:35px;
  color:#b5bfcc
}
.empty-state h3 {
  color:#5f6c7e
}
.empty-state p {
  font-size:12px;
  max-width:410px;
  line-height:1.7
}
.calendar-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 17px;
  border-top:1px solid var(--line)
}
.calendar-grid {
  display:grid;
  grid-template-columns:repeat(7,minmax(100px,1fr));
  min-width:700px
}
.calendar-weekday {
  font-size:10px;
  color:#8e98a7;
  padding:11px 12px;
  text-align:center;
  background:#f8fafc;
  border-bottom:1px solid var(--line)
}
.calendar-day {
  min-height:125px;
  border-bottom:1px solid var(--line);
  border-right:1px solid var(--line);
  padding:8px;
  overflow:hidden
}
.calendar-date {
  font-size:11px;
  color:#7d899a;
  margin-bottom:7px;
  width:24px;
  height:24px;
  display:grid;
  place-items:center;
  border-radius:50%
}
.calendar-date.today {
  background:var(--coral);
  color:#fff
}
.calendar-event {
  display:block;
  width:100%;
  text-align:left;
  border:0;
  border-left:2px solid #8ea6c3;
  background:#f0f4fa;
  border-radius:3px;
  font-size:10px;
  color:#617b9b;
  padding:6px;
  margin-bottom:5px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap
}
.calendar-event.attended {
  border-color:#8ab699;
  background:#eef6f0;
  color:#629674
}
.calendar-event.cancelled {
  opacity:.6;
  text-decoration:line-through
}
.calendar-scroll {
  overflow-x:auto
}
.subnav {
  display:flex;
  gap:5px;
  margin-bottom:19px;
  flex-wrap:wrap
}
.subnav button {
  border:1px solid var(--line);
  background:white;
  padding:9px 14px;
  border-radius:6px;
  font-size:12px
}
.subnav button.active {
  background:var(--navy);
  color:#fff;
  border-color:var(--navy)
}
.settings-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:15px
}
.settings-card {
  padding:22px
}
.settings-card h2 {
  margin-bottom:8px
}
.settings-card p {
  font-size:12px;
  line-height:1.7;
  color:#8c96a4;
  margin-bottom:17px
}
.settings-list {
  display:grid;
  gap:9px
}
.setting-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:12px;
  border:1px solid var(--line);
  border-radius:7px
}
.setting-row strong {
  display:block;
  font-size:12px;
  overflow-wrap:anywhere
}
.setting-row small {
  color:#94a0ad;
  display:block;
  margin-top:5px
}
.setting-row .actions {
  display:flex;
  gap:5px
}
.notice-box {
  background:#f5f7fa;
  border:1px solid #e8ecf2;
  padding:13px 15px;
  border-radius:7px;
  color:#7b889a;
  font-size:11px;
  line-height:1.8
}
.notice-box.warn {
  background:#fff9ef;
  border-color:#f1e3c8;
  color:#a48a56
}
.error-box {
  background:#fff4f0;
  border:1px solid #f4d1c8;
  padding:12px 14px;
  border-radius:6px;
  color:#af5a43;
  font-size:12px;
  line-height:1.7
}
.skeleton {
  height:135px;
  background:linear-gradient(100deg,#f0f2f5,#f8f9fb,#f0f2f5);
  border:1px solid var(--line);
  border-radius:9px
}
.loading-panel {
  padding:50px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#8c96a5;
  font-size:12px;
  min-height:260px
}
.spinner {
  display:inline-block;
  width:14px;
  height:14px;
  border:2px solid #d5dde7;
  border-top-color:#5f7392;
  border-radius:100%;
  animation:spin .6s linear infinite;
  margin-right:8px
}
@keyframes spin {
  to {
    transform:rotate(360deg)
  }
}
dialog {
  border:1px solid #dce1e9;
  border-radius:13px;
  padding:0;
  width:min(680px,calc(100vw - 32px));
  max-height:calc(100dvh - 48px);
  box-shadow:0 25px 100px #1f2c452b;
  color:var(--ink);
  overflow:hidden
}
dialog::backdrop {
  background:#1c2a4566;
  backdrop-filter:blur(2px)
}
.dialog-head {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:23px 25px 18px;
  border-bottom:1px solid var(--line);
  gap:16px
}
.dialog-head h2 {
  font-size:19px
}
.dialog-head p {
  font-size:11px;
  color:#68768a;
  margin-top:6px;
  line-height:1.7
}
.dialog-body {
  padding:23px 25px;
  overflow:auto;
  overscroll-behavior:contain;
  max-height:calc(100dvh - 230px)
}
.dialog-footer {
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:9px;
  padding:15px 25px;
  border-top:1px solid var(--line);
  background:#fcfdfe
}
.dialog-footer .footer-note {
  margin-right:auto;
  color:#68768a;
  font-size:10px;
  line-height:1.6
}
.dialog-footer .btn {
  min-width:74px
}
.form-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:17px 18px
}
.form-field {
  min-width:0
}
.form-field>span {
  display:block;
  font-size:11px;
  font-weight:600;
  color:#68768a;
  margin-bottom:8px
}
.form-field>span i {
  font-style:normal;
  color:#dc856f;
  margin-left:3px
}
.form-field small {
  display:block;
  font-size:10px;
  color:#68768a;
  line-height:1.7;
  margin-top:6px
}
.form-field.full,.form-section,.full {
  grid-column:1/-1
}
.form-section {
  border-top:1px solid var(--line);
  padding-top:19px;
  margin-top:4px;
  display:flex;
  align-items:center;
  justify-content:space-between
}
.form-section:first-child {
  border-top:0;
  padding-top:0;
  margin-top:0
}
.form-section h3 {
  font-size:12px
}
.checkbox-label {
  display:flex;
  align-items:center;
  gap:8px;
  font-size:12px;
  padding:7px 0
}
.checkbox-label span {
  margin:0;
  font-weight:400
}
.allocation-row {
  display:grid;
  grid-template-columns:minmax(100px,1fr) 110px 93px 33px;
  gap:8px;
  margin-top:9px;
  align-items:center
}
.allocation-row select,.allocation-row input {
  font-size:12px
}
.allocation-total {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-top:12px;
  padding:10px;
  border-radius:6px;
  background:#eff7f2;
  font-size:11px;
  color:#4a9475
}
.allocation-total.invalid {
  color:#b87155;
  background:#fff4e9
}
.form-errors {
  margin-bottom:16px
}
.form-errors:empty {
  display:none
}
.drawer[open] {
  display:flex;
  flex-direction:column
}
.drawer {
  position:fixed;
  inset:0 0 0 auto;
  margin:0;
  width:min(590px,100vw);
  max-width:100vw;
  height:100dvh;
  max-height:100dvh;
  border-radius:0;
  border-top:0;
  border-right:0;
  border-bottom:0
}
.drawer .dialog-head {
  flex-shrink:0
}
.drawer .dialog-body {
  flex:1;
  min-height:0;
  max-height:none;
  padding-bottom:calc(30px + env(safe-area-inset-bottom,0px))
}
.detail-actions {
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin-bottom:22px
}
.detail-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:20px 25px;
  margin:20px 0 26px
}
.detail-field {
  min-width:0
}
.detail-field dt {
  color:#9aa3af;
  font-size:10px;
  margin-bottom:7px
}
.detail-field dd {
  font-size:12px;
  line-height:1.8;
  margin:0;
  overflow-wrap:anywhere
}
.detail-section-title {
  font-size:12px;
  margin:24px 0 14px;
  display:flex;
  align-items:center;
  gap:7px
}
.timeline {
  position:relative;
  padding-left:23px;
  margin-left:4px
}
.timeline:before {
  content:"";
  position:absolute;
  left:4px;
  top:7px;
  bottom:10px;
  width:1px;
  background:#e3e8ef
}
.timeline-item {
  position:relative;
  padding-bottom:22px
}
.timeline-item:before {
  content:"";
  position:absolute;
  width:7px;
  height:7px;
  border:2px solid #fff;
  border-radius:100%;
  background:#97a7bc;
  left:-22px;
  top:4px;
  box-shadow:0 0 0 1px #dce2eb
}
.timeline-item strong {
  font-size:11px;
  display:block;
  margin-bottom:6px
}
.timeline-item p {
  font-size:11px;
  line-height:1.8;
  color:#7a8798;
  white-space:pre-wrap;
  overflow-wrap:anywhere
}
.timeline-item small {
  color:#a8b0bc;
  display:block;
  margin-top:6px;
  font-size:10px
}
.session-card {
  border:1px solid var(--line);
  border-radius:6px;
  padding:12px;
  margin-bottom:9px;
  font-size:11px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px
}
.config-row {
  display:grid;
  grid-template-columns:1.1fr 1fr 1.4fr 31px;
  gap:7px;
  align-items:center;
  margin-bottom:10px
}
.config-row select,.config-row input {
  font-size:12px
}
.config-row.sort {
  grid-template-columns:1fr 130px 30px 30px 30px
}
.config-row.style-rule {
  grid-template-columns:1fr 90px 1fr 90px 90px 31px
}
.config-row.column {
  grid-template-columns:25px minmax(80px,1fr) 80px 42px 28px 28px;
  min-height:42px;
  border-bottom:1px solid #eef1f5;
  padding-bottom:9px;
  font-size:12px
}
.config-row.column input[type=number] {
  font-size:12px;
  min-height:32px;
  padding:6px
}
.config-hint {
  font-size:11px;
  color:#94a0b0;
  margin-bottom:18px;
  line-height:1.8
}
.stack {
  display:grid;
  gap:15px
}
.toast-region {
  position:fixed;
  bottom:calc(24px + env(safe-area-inset-bottom,0px));
  right:25px;
  z-index:100;
  display:flex;
  flex-direction:column;
  gap:8px;
  max-width:min(420px,calc(100vw - 32px));
  pointer-events:none
}
.toast {
  background:var(--navy);
  color:white;
  padding:13px 17px;
  border-radius:8px;
  box-shadow:0 5px 25px #25344b29;
  display:flex;
  align-items:flex-start;
  gap:9px;
  font-size:12px;
  line-height:1.7;
  pointer-events:auto
}
.toast.error {
  background:#a45543
}
.toast svg {
  width:16px;
  height:16px;
  margin-top:2px
}
.kbd {
  border:1px solid #dde2ea;
  border-radius:4px;
  padding:2px 4px;
  color:#9aa4b3;
  font-size:10px;
  line-height:1.2
}
.help-grid {
  display:grid;
  gap:15px
}
.help-row {
  font-size:12px;
  line-height:1.8
}
.help-row strong {
  display:block;
  margin-bottom:4px
}
.menu-backdrop {
  display:none
}
@media(hover:hover) and (pointer:fine) {
  .nav-item:not(.active):hover {
    background:#f3f5f8;
    color:#3f526c
  }
  .btn:not(:disabled):hover,.tool-btn:hover {
    background:#f3f5f8
  }
  .btn-primary:not(:disabled):hover {
    background:#34445f
  }
  .btn-coral:not(:disabled):hover {
    background:#e36e56
  }
  .btn-danger:not(:disabled):hover {
    background:#ffe9e3
  }
  .icon-btn:hover {
    background:#edf1f6;
    color:#536a89
  }
  .metric-card:hover {
    border-color:#bac8da;
    box-shadow:0 2px 7px #253c6410
  }
  .record-link:hover {
    text-decoration:underline;
    text-underline-offset:3px
  }
  .calendar-event:hover {
    background:#e3ecf7
  }
  .view-tab:hover {
    color:#425b7d
  }
  .funnel-row:hover .funnel-track {
    background:#edf0f4
  }
}
@media(min-width:1550px) {
  .main {
    padding:35px 44px
  }
  .metric-value {
    font-size:32px
  }
  .metric-card {
    min-height:150px
  }
  .trend-chart {
    height:250px
  }
  .revenue-chart {
    min-height:245px
  }
}
@media(max-width:1190px) {
  .sidebar {
    width:185px;
    padding-left:12px;
    padding-right:12px
  }
  .app-shell {
    grid-template-columns:185px minmax(0,1fr)
  }
  .brand {
    font-size:20px;
    padding-left:10px;
    gap:8px
  }
  .main {
    padding:25px 24px
  }
  .topbar {
    padding:0 24px
  }
  .metric-card {
    padding:15px
  }
  .metric-value {
    font-size:24px
  }
  .chart-grid {
    grid-template-columns:minmax(0,1.6fr) minmax(235px,1fr)
  }
  .revenue-chart {
    gap:15px;
    flex-direction:column;
    padding:20px 15px
  }
  .donut {
    width:128px;
    height:128px
  }
  .donut-inner {
    width:97px;
    height:97px
  }
  .donut-inner strong {
    font-size:19px
  }
  .revenue-legend {
    flex-direction:row;
    gap:24px
  }
  .revenue-legend strong {
    font-size:14px
  }
  .chart-grid>.panel {
    display:flex;
    flex-direction:column
  }
  .trend-chart {
    flex:1;
    min-height:210px
  }
  .trend-bottom {
    margin-top:auto
  }
  .comparison-label {
    display:none
  }
}
@media(max-width:680px) {
  .metric-grid {
    grid-template-columns:repeat(2,minmax(0,1fr))
  }
  .chart-grid {
    grid-template-columns:1fr
  }
  .revenue-chart {
    flex-direction:row;
    gap:40px;
    min-height:205px
  }
  .revenue-legend {
    flex-direction:column;
    gap:17px
  }
  .bottom-grid {
    grid-template-columns:1fr
  }
  .settings-grid {
    grid-template-columns:1fr
  }
  .top-tools .today {
    display:none
  }
  .page-heading {
    align-items:flex-start
  }
  .page-actions {
    flex-wrap:wrap;
    justify-content:flex-end
  }
  .filter-divider {
    display:none
  }
  .chart-grid .trend-chart {
    height:230px;
    flex:auto
  }
  .filter-control {
    min-height:36px
  }
  .main {
    padding:24px 22px
  }
  .config-row.style-rule {
    grid-template-columns:1fr 90px 1fr
  }
  .config-row.style-rule>*:nth-child(n+4) {
    margin-bottom:8px
  }
}
@media(max-width:680px) {
  .app-shell {
    display:block
  }
  .sidebar {
    transform:translateX(-100%);
    visibility:hidden;
    width:240px;
    padding-top:calc(25px + env(safe-area-inset-top,0px));
    padding-bottom:calc(18px + env(safe-area-inset-bottom,0px));
    transition:transform 200ms var(--ease)
  }
  .sidebar.open {
    transform:translateX(0);
    visibility:visible
  }
  .menu-backdrop.open {
    display:block;
    position:fixed;
    inset:0;
    z-index:24;
    background:#1d2b4460;
    border:0;
    width:100%;
    height:100%;
    border-radius:0
  }
  .mobile-menu {
    display:inline-flex
  }
  .topbar {
    height:59px;
    padding:0 17px;
    padding-top:env(safe-area-inset-top,0px)
  }
  .breadcrumb {
    gap:8px;
    font-size:11px
  }
  .breadcrumb .workspace-label {
    display:none
  }
  .top-tools {
    gap:8px
  }
  .main {
    padding:22px 17px calc(26px + env(safe-area-inset-bottom,0px))
  }
  .page-heading {
    margin-bottom:19px;
    gap:12px
  }
  .page-heading h1 {
    font-size:24px
  }
  .eyebrow {
    font-size:9px
  }
  .page-subtitle {
    font-size:11px;
    max-width:210px
  }
  .page-actions .btn {
    font-size:11px;
    padding:8px 10px
  }
  .page-heading {
    flex-wrap:wrap
  }
  .page-actions {
    flex-wrap:wrap;
    justify-content:flex-start
  }
  .demo-notice {
    font-size:10px;
    align-items:flex-start
  }
  .demo-notice .link-button {
    display:none
  }
  .filter-bar {
    gap:7px
  }
  .filter-control {
    padding:7px;
    flex:1;
    min-width:120px
  }
  .filter-control:first-child {
    flex-basis:100%
  }
  .filter-control select {
    max-width:100%;
    width:100%
  }
  .filter-control input {
    width:100%;
    max-width:140px
  }
  .metric-grid {
    gap:10px
  }
  .metric-card {
    min-height:132px;
    padding:14px 12px
  }
  .metric-value {
    font-size:24px
  }
  .metric-foot {
    gap:5px;
    font-size:9px;
    flex-wrap:wrap
  }
  .metric-label {
    font-size:10px
  }
  .metric-label svg {
    width:13px;
    height:13px
  }
  .chart-grid,.bottom-grid {
    gap:12px;
    margin-top:12px
  }
  .panel-header {
    padding:16px 15px 0
  }
  .panel-header h2 {
    font-size:12px
  }
  .panel-header .legend {
    font-size:9px;
    gap:8px
  }
  .trend-chart {
    padding:15px 14px 3px
  }
  .trend-bottom {
    padding:11px 15px;
    font-size:9px
  }
  .revenue-chart {
    gap:30px
  }
  .funnel {
    padding:20px 15px
  }
  .ranking {
    padding:10px 15px
  }
  .footnote {
    align-items:flex-start;
    flex-direction:column;
    gap:3px;
    font-size:9px
  }
  .search-control {
    max-width:none;
    flex-basis:100%
  }
  .view-toolbar {
    padding:13px 12px;
    gap:6px
  }
  .tool-btn {
    font-size:10px;
    min-height:35px
  }
  .view-tabs {
    padding:0 6px
  }
  .view-tab {
    padding:13px 10px 11px;
    font-size:11px
  }
  .table-footer {
    padding:12px;
    font-size:9px
  }
  .table-scroll {
    max-height:65dvh
  }
  .table-footer .secondary-text {
    display:none
  }
  .dialog-head {
    padding:19px 18px 15px
  }
  .dialog-head h2 {
    font-size:18px
  }
  .dialog-body {
    padding:19px 18px;
    max-height:calc(100dvh - 200px)
  }
  .dialog-footer {
    padding:13px 18px
  }
  .dialog-footer .footer-note {
    display:none
  }
  .form-grid {
    grid-template-columns:1fr;
    gap:16px
  }
  .form-field.full,.form-section {
    grid-column:1
  }
  .form-field>span {
    font-size:12px
  }
  .allocation-row {
    grid-template-columns:1fr 85px 65px 28px;
    gap:6px
  }
  .allocation-row input,.allocation-row select {
    padding:8px 5px
  }
  .config-row {
    grid-template-columns:1fr 1fr 31px
  }
  .config-row>:nth-child(3):not(button) {
    grid-column:1/3;
    grid-row:2
  }
  .config-row>:last-child {
    grid-column:3;
    grid-row:1
  }
  .config-row.sort {
    grid-template-columns:1fr 85px 27px 27px 27px
  }
  .config-row.sort>:nth-child(n) {
    grid-column:auto;
    grid-row:auto
  }
  .config-row.column {
    grid-template-columns:23px 1fr 60px 35px 25px 25px
  }
  .config-row.column>:nth-child(n) {
    grid-column:auto;
    grid-row:auto
  }
  .config-row.style-rule {
    grid-template-columns:1fr 85px 30px
  }
  .config-row.style-rule>:last-child {
    grid-column:3;
    grid-row:1
  }
  .config-row.style-rule>:nth-child(3) {
    grid-column:1/3;
    grid-row:2
  }
  .config-row.style-rule>:nth-child(4) {
    grid-column:1;
    grid-row:3
  }
  .config-row.style-rule>:nth-child(5) {
    grid-column:2;
    grid-row:3
  }
  .toast-region {
    right:16px;
    bottom:calc(16px + env(safe-area-inset-bottom,0px))
  }
  .settings-card {
    padding:18px
  }
  .notice-box {
    font-size:11px
  }
  dialog {
    max-height:calc(100dvh - 24px)
  }
  .detail-grid {
    gap:17px
  }
  .loading-panel {
    padding:25px
  }
}
@media(pointer:coarse) {
  input,textarea,select,.filter-control input,.filter-control select,.search-control input,.allocation-row input,.allocation-row select,.config-row input,.config-row select,.config-row.column input[type=number] {
    font-size:16px
  }
  button.icon-btn {
    min-width:40px;
    min-height:40px
  }
  .filter-control {
    overflow:hidden
  }
  .filter-control input {
    max-width:140px
  }
  .filter-control select {
    max-width:140px
  }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {
    animation:none!important;
    transition:none!important;
    scroll-behavior:auto!important
  }
  button:active:not(:disabled) {
    transform:none
  }
}
@media print {
  .sidebar,.topbar,.page-actions,.demo-notice button,.view-toolbar,.view-tabs,.filter-bar,.table-footer,dialog,.toast-region {
    display:none!important
  }
  .app-shell {
    display:block
  }
  .main {
    padding:0
  }
  .metric-grid {
    grid-template-columns:repeat(4,1fr)
  }
  .panel,.metric-card {
    break-inside:avoid
  }
  .table-scroll {
    max-height:none;
    overflow:visible
  }
  .content-shell {
    width:100%
  }
}
.rotate-left {
  transform:rotate(180deg)
}
.section-label>span {
  display:flex;
  align-items:center;
  gap:5px
}
.section-label>span svg {
  width:12px;
  height:12px
}
.view-tab {
  display:inline-flex;
  align-items:center
}
.view-tab svg {
  width:13px;
  height:13px
}
.config-row.column .checkbox-label {
  gap:2px
}
.config-row.column .checkbox-label svg {
  width:12px;
  height:12px
}
.rank-name {
  max-width:140px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap
}
.dialog-head h2 {
  overflow-wrap:anywhere
}
.profile .name {
  max-width:107px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap
}
.metric-value {
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap
}
.advanced-metrics summary {
  padding:18px 20px;
  font-size:12px;
  cursor:pointer;
  font-weight:600
}
.advanced-metrics summary span {
  font-size:10px;
  font-weight:400;
  margin-left:8px
}
.advanced-metrics .metric-card {
  box-shadow:none;
  min-height:124px
}
.advanced-metrics .metric-value {
  font-size:23px
}
.metric-value {
  overflow:visible;
  text-overflow:clip
}
.metric-card.extra-wide-value {
  grid-column:span 2
}
@media(max-width:1190px) {
  .metric-card.wide-value {
    grid-column:span 2
  }
}
.metric-value.large-value {
  font-size:19px;
  letter-spacing:-.8px
}
.metric-label>span {
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  max-width:calc(100% - 22px)
}
.profile>div {
  min-width:0
}
.rank-value {
  white-space:nowrap
}
.donut-inner strong {
  max-width:110px;
  overflow-wrap:anywhere;
  text-align:center
}
.rank-name {
  min-width:0;
  flex:0 1 125px
}
.revenue-legend strong {
  white-space:nowrap
}
.rank-track {
  flex-shrink:1
}
@media(max-width:680px) {
  .metric-value.large-value {
    font-size:15px;
    letter-spacing:-.7px
  }
  .rank-name {
    flex-basis:90px
  }
  .revenue-legend strong {
    font-size:13px
  }
  .revenue-chart {
    gap:24px
  }
  .detail-actions .btn {
    min-height:36px
  }
  .metric-foot {
    min-height:13px
  }
}
.rank-row {
  width:100%;
  text-align:left;
  border:0;
  border-bottom:1px solid #f0f2f5;
  background:transparent
}
.revenue-legend-item {
  border:0;
  background:transparent;
  padding:0;
  text-align:left;
  font:inherit;
  color:inherit
}
.revenue-legend-item:focus-visible {
  outline-offset:7px
}
@media(hover:hover) and (pointer:fine) {
  .rank-row:hover {
    background:#fafbfe
  }
  .revenue-legend-item:hover {
    opacity:.8
  }
}
.allocation-row {
  grid-template-columns:minmax(130px,1.2fr) minmax(120px,1fr) 82px 83px 32px
}
@media(max-width:680px) {
  .allocation-row {
    grid-template-columns:minmax(85px,1fr) minmax(85px,1fr) 66px 58px 27px;
    gap:4px
  }
  .allocation-row select,.allocation-row input {
    min-width:0;
    padding:8px 4px
  }
  .allocation-row {
    padding:8px 0;
    border-bottom:1px solid var(--line)
  }
}
@media(max-width:420px) {
  .allocation-row {
    grid-template-columns:1fr 1fr 30px;
    gap:7px
  }
  .allocation-row [data-credit-user] {
    grid-column:1
  }
  .allocation-row [data-credit-team] {
    grid-column:2
  }
  .allocation-row [data-credit-role] {
    grid-column:1;
    grid-row:2
  }
  .allocation-row [data-credit-pct] {
    grid-column:2;
    grid-row:2
  }
  .allocation-row [data-remove-credit] {
    grid-column:3;
    grid-row:1/3
  }
}
.sidebar {
  overflow-y: auto;
  overscroll-behavior: contain;
}
.dialog-head p {
  overflow-wrap: anywhere;
}
@media (max-width: 420px) {
  .metric-value {
    font-size: 21px;
  }
  .metric-value.large-value {
    font-size: 14px;
  }
}

/* Apps Script access management shares the existing system, with no external assets.
   The read-only banner and text badges communicate state without relying on color. */
.access-readonly { display:flex; align-items:center; gap:10px; margin-bottom:18px; }
.access-readonly svg { flex:none; }
.access-policy { margin-bottom:18px; }
.access-policy p { margin:7px 0 0; }
.access-header { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; padding:24px; }
.access-header h2 { margin:0 0 8px; font-size:16px; }
.access-header p { margin:0; max-width:60ch; font-size:12px; line-height:1.8; }
.access-email { overflow-wrap:anywhere; }
.access-scroll { max-height:65dvh; overscroll-behavior:contain; }
.auth-explanation { max-width:580px; line-height:1.9; overflow-wrap:anywhere; text-align:center; }
/* OneClass frontend proposal: shared foundations for records, forms and reports.
   Official original PNG logos verified and embedded locally. */
:root {
  --ink:#202733; --muted:#586272; --line:#d5dae1;
  --canvas:#f5f6f8; --navy:#202c41;
  --space-1:.25rem; --space-2:.5rem; --space-3:.75rem;
  --space-4:1rem; --space-6:1.5rem; --space-8:2rem;
  --radius-control:.5rem; --radius-panel:.75rem;
  --focus:#185abd; --ease:cubic-bezier(.23,1,.32,1);
  line-height:1.55;
}
body { background:var(--canvas); }
h1 { font-size:2rem; line-height:1.3; letter-spacing:0; font-weight:650; }
h2,h3 { line-height:1.45; letter-spacing:0; }
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,
textarea:focus-visible,summary:focus-visible,.table-scroll:focus-visible {
  outline:3px solid var(--focus); outline-offset:3px;
}
button:disabled { opacity:1; color:#657080; background:#edf0f4; border-color:var(--line); }
input,select,textarea { min-height:42px; border-color:#abb4c1; border-radius:var(--radius-control); line-height:1.5; }
input::placeholder,textarea::placeholder { color:#657080; }
input:read-only,textarea:read-only { background:#f3f5f7; }
input:disabled,select:disabled,textarea:disabled { opacity:1; color:#586272; background:#edf0f4; }
.app-shell { grid-template-columns:232px minmax(0,1fr); }
.sidebar { width:232px; padding:24px 16px 16px; background:#fafbfc; }
.brand { padding:0 12px 28px; }
.nav-caption { font-size:.8rem; letter-spacing:0; color:var(--muted); }
.nav-item { font-size:1rem; min-height:44px; border-radius:var(--radius-control); color:#465164; gap:10px; }
.nav-item.active { box-shadow:none; }
.nav-group { margin-bottom:24px; }
.workspace-badge { background:white; border-color:var(--line); margin-bottom:16px; font-size:.85rem; }
.profile .name { font-size:.9rem; }
.profile .role { font-size:.8rem; }
.topbar { height:64px; padding:0 32px; background:white; }
.breadcrumb { font-size:.9rem; color:var(--muted); }
.top-tools .today { color:var(--muted); font-size:.85rem; }
.icon-btn { width:40px; height:40px; color:#465164; border-radius:var(--radius-control); }
.main { padding:32px; max-width:1600px; }
.page-heading { margin-bottom:24px; align-items:flex-start; }
.eyebrow { font-size:.8rem; letter-spacing:0; color:var(--muted); margin-bottom:8px; }
.page-subtitle { font-size:.95rem; color:var(--muted); max-width:65ch; }
.page-actions { flex-wrap:wrap; justify-content:flex-end; }
.btn,.tool-btn { min-height:40px; font-size:.9rem; border-radius:var(--radius-control); }
.btn-small { min-height:36px; font-size:.85rem; }
.btn-quiet { color:var(--muted); }
.filter-bar { gap:8px; margin-bottom:24px; }
.filter-control { min-height:42px; padding:8px 10px; font-size:.9rem; border-color:#c3cad4; border-radius:var(--radius-control); }
.filter-control select,.filter-control input { font-size:.9rem; min-height:24px; }
.filter-control svg { color:var(--muted); width:16px; height:16px; }
.filter-bar .comparison-label { color:var(--muted); font-size:.85rem; }
.section-label { margin:24px 0 12px; align-items:baseline; }
.section-label h2,.panel-header h2 { font-size:1.05rem; font-weight:650; }
.section-label span,.panel-header p,.panel-header .legend { font-size:.85rem; color:var(--muted); }
.metric-grid { gap:16px; }
.metric-card { padding:20px; border-radius:var(--radius-panel); min-height:150px; overflow:visible; }
.metric-label { font-size:.95rem; color:var(--muted); gap:8px; }
.metric-label>span { white-space:normal; max-width:none; overflow:visible; overflow-wrap:anywhere; }
.metric-label svg { color:var(--muted); }
.metric-value { font-size:2rem; line-height:1.25; letter-spacing:0; white-space:normal; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
.metric-value.large-value { font-size:1.45rem; letter-spacing:0; }
.metric-value .currency { color:var(--muted); }
.metric-foot { font-size:.85rem; color:var(--muted); flex-wrap:wrap; }
.metric-card.featured { background:#fff7f4; border-color:#e7c6bc; }
.metric-card.featured .metric-value { color:#984932; }
.delta { color:#12684f; } .delta.down { color:#a34834; }
.panel { border-radius:var(--radius-panel); }
.panel-header { padding:20px 20px 0; align-items:flex-start; }
.chart-grid,.bottom-grid { gap:20px; margin-top:20px; }
.chart-label { fill:var(--muted); }
.trend-bottom,.footnote { color:var(--muted); font-size:.85rem; line-height:1.65; }
.revenue-chart { flex-wrap:wrap; gap:20px; padding:20px; }
.revenue-legend { min-width:0; max-width:100%; }
.revenue-legend strong,.rank-value { white-space:normal; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
.rank-row,.funnel-row { min-height:44px; }
.view-tabs { gap:4px; }
.view-tab { font-size:.95rem; min-height:44px; }
.view-toolbar { padding:16px; gap:8px; }
.search-control { min-height:40px; }
.search-control input { font-size:.95rem; }
.table-scroll { overscroll-behavior:contain; }
table th { font-size:.85rem; color:#465164; background:#f5f7f9; }
table td { font-size:.95rem; line-height:1.5; }
.table-footer { color:var(--muted); font-size:.85rem; flex-wrap:wrap; gap:12px; }
.badge { font-size:.85rem; line-height:1.4; }
.settings-card { padding:24px; }
.settings-card h2 { font-size:1.1rem; }
.settings-card p,.notice-box,.error-box { font-size:.95rem; line-height:1.7; }
.notice-box { color:#465164; border-radius:var(--radius-control); }
.error-box { color:#9a2929; background:#fff1f1; border:1px solid #d8a3a3; }
.empty-state { padding:32px 24px; gap:12px; }
.empty-state h3 { font-size:1.1rem; }
.empty-state p { font-size:.95rem; color:var(--muted); max-width:55ch; }
.loading-panel { color:var(--muted); font-size:.95rem; }
dialog { border-color:var(--line); border-radius:12px; max-height:calc(100dvh - 32px); }
dialog[open] { display:flex; flex-direction:column; overflow:hidden; }
dialog::backdrop { background:rgba(20,28,40,.36); backdrop-filter:none; }
dialog>form { display:flex; flex-direction:column; min-height:0; overflow:hidden; }
.dialog-head { flex:none; align-items:flex-start; padding:24px; }
.dialog-head>div { min-width:0; }
.dialog-head h2 { font-size:1.4rem; line-height:1.45; overflow-wrap:anywhere; }
.dialog-head p { color:var(--muted); font-size:.9rem; overflow-wrap:anywhere; }
.dialog-body,.drawer .dialog-body { min-height:0; flex:1 1 auto; max-height:none; overflow:auto; padding:24px; }
.dialog-footer { flex:none; padding:16px 24px; flex-wrap:wrap; }
.dialog-footer .footer-note { font-size:.85rem; color:var(--muted); }
.drawer { width:min(640px,100vw); border-radius:0; max-height:100dvh; }
.drawer .dialog-head { max-height:45dvh; overflow:auto; }
.form-grid { gap:24px 20px; }
.form-field>span { font-size:.95rem; color:#394556; }
.form-field small { font-size:.85rem; color:var(--muted); }
.form-section h3 { font-size:1rem; }
.detail-grid { gap:24px; }
.detail-field dt { color:var(--muted); font-size:.85rem; }
.detail-field dd { font-size:1rem; line-height:1.6; overflow-wrap:anywhere; }
.detail-actions { flex-wrap:wrap; gap:8px; }
.access-header p { font-size:.95rem; }
.advanced-metrics summary { font-size:.95rem; }
.advanced-metrics summary span { font-size:.85rem; }
@media (hover:hover) and (pointer:fine) {
  .nav-item:not(.active):hover,.icon-btn:hover { background:#e9edf2; }
  .metric-card:hover { border-color:#9ca9ba; }
  table tbody tr:has(button:not(:disabled),a[href]):hover { background:#f6f8fb; }
}
@media (max-width:1100px) {
  .metric-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .chart-grid,.bottom-grid { grid-template-columns:minmax(0,1fr); }
}
@media (max-width:680px) {
  .app-shell { grid-template-columns:232px minmax(0,1fr); }
  .content-shell { grid-column:2; }
  .main { padding:24px; }
  .sidebar { width:232px; }
}
@media (max-width:680px) {
  .app-shell { grid-template-columns:minmax(0,1fr); }
  .content-shell { grid-column:1; }
  .main { padding:24px 16px calc(24px + env(safe-area-inset-bottom,0px)); }
  .topbar { padding:0 16px; }
  .page-heading h1 { font-size:1.7rem; }
  .page-actions { justify-content:flex-start; width:100%; }
  .page-actions .btn,.btn,.tool-btn,.btn-small { min-height:44px; font-size:.95rem; }
  .icon-btn,button.icon-btn { min-width:44px; min-height:44px; }
  input,select,textarea,.filter-control input,.filter-control select,.search-control input { font-size:16px; }
  .filter-control { flex:1 1 130px; min-width:0; }
  .filter-control:first-child { flex-basis:100%; }
  .filter-control input { min-width:0; max-width:100%; }
  .filter-control select { max-width:100%; }
  .metric-grid { gap:12px; }
  .metric-card { padding:16px; }
  .metric-label { font-size:.95rem; }
  .metric-value { font-size:1.8rem; }
  .metric-value.large-value { font-size:1.4rem; }
  .metric-foot { font-size:.85rem; }
  .panel-header { padding:20px 16px 0; }
  .panel-header h2 { font-size:1.05rem; }
  .panel-header .legend,.trend-bottom { font-size:.85rem; }
  .form-grid { grid-template-columns:minmax(0,1fr); }
  .form-field>span { font-size:1rem; }
  .dialog-head,.dialog-body,.drawer .dialog-body { padding:20px 16px; }
  .dialog-footer { padding:16px; }
  .dialog-footer .footer-note,.table-footer .secondary-text { display:block; }
  .dialog-footer .footer-note { flex-basis:100%; }
  .drawer { width:100%; }
  .notice-box,.empty-state p { font-size:1rem; }
  .revenue-legend strong { font-size:1rem; }
}
@media (max-width:420px) {
  .metric-grid { grid-template-columns:minmax(0,1fr); }
  .metric-value,.metric-value.large-value { font-size:1.8rem; }
  .metric-card { min-height:140px; }
  .section-label { align-items:flex-start; flex-wrap:wrap; gap:8px; }
  .calendar-event { font-size:.85rem; }
}
@media (prefers-contrast:more) {
  :root { --muted:#364253; --line:#758194; }
  .panel,.metric-card { border-width:2px; }
}
@media (prefers-reduced-transparency:reduce) { dialog::backdrop { background:#c7cbd2; } }
@media (max-width:640px) {
  .access-header { padding:18px; }
  .access-policy { line-height:1.8; }
  .access-scroll .data-table { min-width:640px; }
  .auth-explanation { padding:0 18px; }
}

/* Preserve accepted drawer breathing room and single-column monetary cards. */
.drawer .dialog-body { padding-bottom:calc(30px + env(safe-area-inset-bottom,0px)); }
@media (max-width:420px) { .metric-card.wide-value,.metric-card.extra-wide-value { grid-column:auto; } }

/* Original OneClass PNG pixels: no filters, crop, tint, or recreated mark. */
.brand-logo { display:block; width:176px; max-width:100%; height:auto; object-fit:contain; flex:none; }
.boot-logo { display:block; width:72px; height:72px; object-fit:contain; }

/* OneClass light-orange surfaces; readable neutral text and semantic status colors. */
:root { --canvas:#fffaf7; --line:#e5d9d2; --focus:#9a4226; }
.sidebar { background:#fff7f0; }
.nav-item.active { background:#ffe0cc; color:#713420; }
.btn-primary,.btn-coral { background:#ffd2b8; border-color:#ba6844; color:#622b19; }
.metric-card.featured { background:#fff1e8; border-color:#edc3ad; }
.metric-card.featured .metric-value { color:#8a3c25; }
.funnel-track span { background:#e59a72; }
.funnel-row:nth-child(2) .funnel-track span { background:#c97f56; }
.funnel-row:nth-child(3) .funnel-track span { background:#edae88; }
.rank-track span { background:#d69874; }
@media (hover:hover) and (pointer:fine) {
 .nav-item:not(.active):hover,.icon-btn:hover { background:#fff0e4; }
 .btn-primary:not(:disabled):hover,.btn-coral:not(:disabled):hover { background:#ffc29c; border-color:#a65a38; }
 table tbody tr:has(button:not(:disabled),a[href]):hover { background:#fff7f0; }
}

@media (prefers-contrast:more) { :root { --line:#8a654f; --focus:#783419; } }

/* Reference-informed hierarchy: rounded cards, compact context, full precise values. */
:root { --radius-panel:20px; }
.page-heading h1 { font-size:34px; font-weight:650; }
.page-heading { margin-bottom:16px; }
.filter-bar { padding:12px; border:1px solid var(--line); border-radius:16px; background:#fff; gap:8px; margin-bottom:20px; }
.filter-bar .comparison-label { margin-left:auto; }
.panel,.metric-card { border-radius:20px; box-shadow:none; }
.metric-grid { gap:12px; }
.metric-card { min-height:128px; padding:18px; }
.metric-label { font-size:14px; line-height:1.5; }
.metric-value { font-size:28px; font-weight:550; line-height:1.25; }
.metric-value.large-value { font-size:23px; }
.metric-foot { font-size:12px; line-height:1.5; }
.panel-header { padding:20px 20px 0; }
.panel-header h2 { font-size:18px; font-weight:600; }
.chart-grid,.bottom-grid { gap:16px; margin-top:16px; }
.funnel-track span,.funnel-row:nth-child(2) .funnel-track span,.funnel-row:nth-child(3) .funnel-track span,.funnel-row:nth-child(4) .funnel-track span,.funnel-row:nth-child(5) .funnel-track span { background:#bac0c6; }
.funnel-row:last-child .funnel-track span { background:#eaa780; }
.rank-track span { background:#bac0c6; }
.rank-row:first-child .rank-track span { background:#eaa780; }
@media (max-width:680px) {
 .page-heading h1 { font-size:28px; }
 .page-heading { gap:12px; margin-bottom:16px; }
 .filter-bar { padding:10px; gap:8px; }
 .filter-bar .comparison-label { flex-basis:100%; margin-left:0; }
 .metric-card { padding:12px; min-height:124px; }
 .metric-label { font-size:14px; }
 .metric-value { font-size:24px; }
 .metric-value.large-value { font-size:20px; }
 .metric-foot { gap:4px; font-size:12px; }
 .panel-header { padding:18px 16px 0; }
}
@media (max-width:420px) {
 .metric-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
 .metric-card.compact-wide-value,.metric-card.wide-value,.metric-card.extra-wide-value { grid-column:1 / -1; }
 .metric-card.compact-wide-value + .metric-card:last-child,.metric-card.wide-value + .metric-card:last-child { grid-column:1 / -1; }
}
@media (max-width:420px) {
 .metric-card.wide-value:first-child ~ .metric-card { grid-column:1 / -1; }
}
@media (max-width:360px) {
 .filter-bar { padding:0; border:0; background:transparent; }
}

/* PDF composition and Apple control/chart guidance: isolated proposal. */
@media (min-width:1100px) {
 .metric-grid { grid-template-columns:minmax(0,1.45fr) repeat(3,minmax(0,1fr)); gap:16px; }
 .metric-card { padding:24px; min-height:150px; border-radius:24px; }
 .metric-card.featured { background:#fff0e5; border-color:#e1bba4; }
 .metric-card.featured .metric-value { font-size:32px; }
 .chart-grid { grid-template-columns:minmax(0,3fr) minmax(0,2fr); }
 .bottom-grid { grid-template-columns:minmax(0,2fr) minmax(0,3fr); }
 .panel { border-radius:24px; }
}
@media (pointer:coarse), (max-width:680px) {
 .filter-control { padding-top:0; padding-bottom:0; min-height:46px; }
 .filter-control input,.filter-control select { min-height:44px; font-size:16px; }
}
.trend-chart { overflow-x:auto; overscroll-behavior-x:contain; }
.trend-chart svg { min-width:440px; }
.trend-data { margin:0 20px 16px; font-size:14px; }
.trend-data summary { min-height:44px; display:flex; align-items:center; cursor:pointer; color:var(--ink); }
.trend-data table { width:100%; border-collapse:collapse; }
.trend-data th,.trend-data td { padding:8px; text-align:left; border-bottom:1px solid var(--line); }

.chart-label { font-size:14px; }

/* Approved Overview v1 */

.reference-overview { background:#f6f6f4; }
.reference-overview .content-shell { min-width:0; }
.reference-overview .main { padding:28px 32px 32px; }
.reference-overview .topbar { height:80px; background:#f6f6f4; border:0; gap:16px; padding:0 32px; }
.reference-overview .breadcrumb { display:none; }
.overview-tabs { display:flex; gap:4px; padding:5px; background:#fff; border-radius:28px; }
.overview-tabs .nav-item { min-height:40px; margin:0; padding:0 16px; width:auto; border-radius:22px; color:#53585f; font-size:13px; }
.overview-tabs .nav-item svg { display:none; }
.overview-tabs .nav-item.active { background:#ffd6b7; color:#3c2a20; }
.reference-overview .page-heading { margin:12px 0 22px; align-items:center; }
.reference-overview .page-heading h1 { font-size:34px; font-weight:500; letter-spacing:-1px; }
.reference-overview .btn { border-radius:24px; font-size:13px; }
.reference-overview .filter-bar { background:none; padding:0; border:0; border-radius:0; gap:8px; margin-bottom:22px; }
.reference-overview .filter-control { background:#fff; border:0; border-radius:24px; min-height:42px; padding:0 12px; }
.reference-overview .filter-control input,.reference-overview .filter-control select { min-height:40px; }
.reference-overview .comparison-label { font-size:11px; }
.overview-canvas { display:grid; grid-template-columns:minmax(220px,.8fr) minmax(0,1.05fr) minmax(0,1.15fr); grid-template-rows:260px 280px auto; gap:18px; }
.overview-canvas .panel { border:0; border-radius:26px; min-width:0; box-shadow:none; }
.overview-hero { grid-column:1; grid-row:1/3; background:#ffdfc6; border-radius:26px; padding:26px; display:flex; flex-direction:column; gap:20px; }
.overview-hero .metric-card { background:transparent; border:0; border-radius:0; min-height:0; padding:0 0 20px; border-bottom:1px solid #e3bea3; flex:1; width:100%; }
.overview-hero .metric-card:last-child { border-bottom:0; padding-bottom:0; }
.overview-hero .metric-label { font-size:13px; margin-bottom:14px; color:#5b4e43; }
.overview-hero .metric-label svg { display:none; }
.overview-hero .metric-value { font-size:28px; font-weight:450; color:#252829; letter-spacing:-.8px; white-space:normal; overflow-wrap:anywhere; }
.overview-hero .metric-card:first-child .metric-value { font-size:36px; }
.overview-hero .metric-foot { font-size:11px; gap:6px; margin-top:12px; }
.overview-trend { grid-column:2/4; grid-row:1; }
.overview-revenue { grid-column:2; grid-row:2; }
.overview-funnel { grid-column:3; grid-row:2; }
.overview-ranking { grid-column:1/4; grid-row:3; }
.overview-canvas .panel-header { padding:22px 24px 0; }
.overview-canvas .panel-header h2 { font-size:17px; font-weight:500; }
.overview-canvas .panel-header p { font-size:11px; }
.overview-canvas .trend-chart { height:145px; padding:4px 24px 0; }
.overview-canvas .chart-label { font-size:12px; fill:#687078; }
.overview-canvas .chart-line { stroke:#d99265; stroke-width:2; }
.overview-canvas .trend-data { margin:0 24px; font-size:11px; }
.overview-canvas .trend-data summary { min-height:26px; }
.overview-canvas .trend-bottom { padding:8px 24px; font-size:10px; border:0; }
.overview-canvas .revenue-chart { padding:20px 24px; gap:16px; flex-wrap:nowrap; }
.overview-canvas .donut { width:130px; height:130px; flex:0 0 130px; }
.overview-canvas .donut-inner { inset:17px; }
.overview-canvas .donut-inner strong { font-size:17px; }
.overview-canvas .donut-inner .muted { font-size:9px; }
.overview-canvas .revenue-legend { min-width:0; font-size:11px; }
.overview-canvas .revenue-legend strong { font-size:13px; }
.overview-canvas .funnel { padding:16px 24px; gap:7px; }
.overview-canvas .funnel-row { min-height:28px; grid-template-columns:90px 1fr 40px; font-size:11px; gap:10px; }
.overview-canvas .funnel-track { height:12px; }
.overview-canvas .ranking { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 30px; padding:16px 24px 24px; }
.overview-operations { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:18px; margin-top:18px; }
.overview-operations .metric-card { background:#fff; border:0; border-radius:26px; min-height:130px; padding:24px; }
.overview-operations .metric-label { font-size:12px; }
.overview-operations .metric-value { font-size:28px; font-weight:450; }
.reference-overview .advanced-metrics { border:0; background:#fff; }
@media(width > 680px) {
 .reference-overview { grid-template-columns:80px minmax(0,1fr); }
 .reference-overview .sidebar { width:80px; padding:20px 10px; background:#f6f6f4; border-right:0; align-items:center; }
 .reference-overview .brand { width:52px; height:52px; padding:0; overflow:hidden; }
 .reference-overview .brand-logo { width:170px; max-width:none; height:auto; object-fit:contain; object-position:left; }
 .reference-overview .sidebar nav { width:100%; }
 .reference-overview .sidebar .nav-item { width:48px; height:48px; min-height:48px; padding:0; border-radius:50%; justify-content:center; margin:6px auto; background:#fff; }
 .reference-overview .sidebar .nav-item.active { background:#ffd6b7; }
 .reference-overview .sidebar .nav-item span,.reference-overview .sidebar .nav-label,.reference-overview .sidebar .sidebar-bottom,.reference-overview .sidebar .skip-link { display:none; }
}
@media(max-width:1100px) and (width > 680px) { .overview-canvas { grid-template-columns:minmax(200px,.7fr) 1fr; grid-template-rows:auto; }.overview-hero { grid-row:1/3; }.overview-trend { grid-column:2; grid-row:1; }.overview-revenue { grid-column:2; grid-row:2; }.overview-funnel { grid-column:1; grid-row:3; }.overview-ranking { grid-column:2; grid-row:3; }.overview-operations { grid-template-columns:repeat(2,minmax(0,1fr)); } .overview-tabs .nav-item { padding:0 10px; } }
@media(max-width:680px) {
 .reference-overview .main { padding:16px; }
 .reference-overview .topbar { padding:8px 16px; height:auto; flex-wrap:wrap; }
 .reference-overview .overview-tabs { order:2; width:100%; overflow:auto; margin-top:8px; border-radius:24px; }
 .overview-tabs .nav-item { flex:0 0 auto; min-height:44px; padding:0 13px; font-size:12px; }
 .reference-overview .breadcrumb { display:flex; }
 .reference-overview .page-heading { margin:12px 0 20px; }
 .reference-overview .page-heading h1 { font-size:28px; }
 .reference-overview .filter-control { min-height:46px; }
 .reference-overview .filter-control input,.reference-overview .filter-control select { min-height:44px; font-size:16px; }
 .overview-canvas { display:flex; flex-direction:column; gap:16px; }
 .overview-hero { padding:24px; gap:18px; }
 .overview-hero .metric-card { padding-bottom:18px; }
 .overview-hero .metric-card:first-child .metric-value { font-size:36px; }
 .overview-hero .metric-value { font-size:28px; }
 .overview-canvas .panel-header { padding:22px 22px 0; }
 .overview-canvas .trend-chart { height:180px; padding:12px 16px; }
 .overview-canvas .trend-data { font-size:13px; margin:0 22px; }
 .overview-canvas .trend-data summary { min-height:44px; }
 .overview-canvas .trend-bottom { padding:12px 22px; font-size:11px; }
 .overview-canvas .funnel-row { min-height:44px; font-size:12px; }
 .overview-canvas .ranking { grid-template-columns:1fr; gap:0; padding:16px 22px; }
 .overview-operations { grid-template-columns:1fr; gap:16px; }
 .overview-operations .metric-card { min-height:120px; }
}

.reference-overview .sidebar .brand-logo { width:52px; height:52px; max-width:100%; object-fit:contain; }
.overview-brand { width:128px; height:31px; object-fit:contain; }
@media(max-width:680px) { .overview-brand { width:118px; height:29px; } .reference-overview .breadcrumb { display:none; } }
@media(width > 680px) { .reference-overview .sidebar .nav-caption,.reference-overview .sidebar .side-bottom,.reference-overview .sidebar .workspace-label { display:none; } }
.overview-trend { display:flex; flex-direction:column; }
.overview-trend .panel-header,.overview-trend .trend-data,.overview-trend .trend-bottom { flex:0 0 auto; }
.overview-trend .trend-chart { flex:1 1 auto; min-height:90px; height:auto; }
@media(max-width:680px) { .reference-overview .breadcrumb { display:flex; } .reference-overview .breadcrumb>:not(.mobile-menu) { display:none; } .reference-overview .topbar { gap:8px; } .overview-brand { margin-right:auto; } .overview-trend .trend-chart { flex-basis:180px; } }
@media(max-width:680px) {
 .overview-hero { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px 16px; }
 .overview-hero .metric-card { grid-column:auto; min-width:0; }
 .overview-hero .metric-card:first-child,.overview-hero .metric-card:last-child { grid-column:1/-1; }
 .overview-hero .metric-value { font-size:22px; }
 .overview-hero .metric-card:first-child .metric-value { font-size:36px; }
 .overview-hero .metric-card:last-child .metric-value { font-size:28px; }
}

/* Actual PDF pixels reviewed: tall-left,40/60 top row,60/40 lower row. */
.reference-overview,.reference-overview .topbar,.reference-overview .sidebar { background:#efefed; }
.reference-overview .page-heading h1 { font-weight:400; }
.overview-canvas .panel { background:#fbfbfa; }
.overview-hero { background:#fbfbfa; padding:22px; gap:18px; }
.overview-hero .metric-card { border-bottom-color:#e3e3e0; }
.overview-hero .metric-card:first-child { border:0; border-radius:20px; padding:20px; background:#ffe0c7; }
.overview-hero .metric-card:first-child .metric-value { color:#242728; }
.overview-snapshot { display:flex; flex-direction:column; padding:24px; }
.overview-snapshot .metric-card { min-height:0; padding:0; border:0; border-radius:0; background:transparent; flex:1; }
.overview-snapshot .metric-label { font-size:13px; margin-bottom:18px; }
.overview-snapshot .metric-label svg { display:none; }
.overview-snapshot .metric-value { font-size:30px; font-weight:400; }
.overview-snapshot .metric-card:first-child .metric-value { font-size:44px; }
.overview-snapshot .metric-foot { font-size:10px; margin-top:12px; }
.overview-snapshot .metric-card+ .metric-card { border-top:1px solid #e8e8e5; padding-top:20px; margin-top:20px; }
.overview-operations { grid-template-columns:repeat(2,minmax(0,1fr)); }
@media(min-width:1101px) {
 .overview-canvas { grid-template-columns:minmax(230px,1.1fr) repeat(5,minmax(0,1fr)); grid-template-rows:280px 280px auto; }
 .overview-hero { grid-column:1; grid-row:1/3; }
 .overview-snapshot { grid-column:2/4; grid-row:1; }
 .overview-trend { grid-column:4/7; grid-row:1; }
 .overview-funnel { grid-column:2/5; grid-row:2; }
 .overview-revenue { grid-column:5/7; grid-row:2; }
 .overview-ranking { grid-column:1/7; grid-row:3; }
 .overview-canvas .trend-chart { min-height:85px; padding:0 16px; }
 .overview-canvas .trend-chart svg { min-width:0; }
 .overview-canvas .revenue-chart { flex-direction:column; align-items:center; padding:16px 20px; gap:12px; }
 .overview-canvas .donut { width:110px; height:110px; flex-basis:110px; }
 .overview-canvas .donut-inner { inset:14px; }
 .overview-canvas .revenue-legend { display:grid; grid-template-columns:1fr 1fr; gap:12px; width:100%; }
 .overview-canvas .revenue-legend-item { margin:0; font-size:11px; }
 .overview-canvas .revenue-legend strong { font-size:13px; }
 .overview-canvas .panel-header { padding:20px 22px 0; }
}
@media(max-width:1100px) and (width > 680px) { .overview-snapshot { grid-column:1; grid-row:3; }.overview-funnel { grid-column:1; grid-row:4; }.overview-ranking { grid-column:2;grid-row:3/5; } }
@media(max-width:680px) {
 .overview-hero { padding:20px; }
 .overview-hero .metric-card:first-child { padding:20px; }
 .overview-snapshot { order:1; }
 .overview-trend { order:2; }
 .overview-funnel { order:3; }
 .overview-revenue { order:4; }
 .overview-ranking { order:5; }
 .overview-snapshot { flex-direction:row; gap:20px; }
 .overview-snapshot .metric-card+ .metric-card { border-top:0; padding-top:0; margin-top:0; }
 .overview-snapshot .metric-value { font-size:26px; }
 .overview-snapshot .metric-card:first-child .metric-value { font-size:36px; }
 .overview-operations { grid-template-columns:1fr; }
}

.overview-canvas .donut-inner { width:96px; height:96px; }
@media(min-width:1101px) { .overview-canvas .donut-inner { width:82px; height:82px; gap:4px; }.overview-canvas .donut-inner strong { font-size:15px; } }
.reference-overview .page-actions { align-items:center; gap:8px; }
.reference-overview .page-heading { margin-bottom:16px; }
.reference-overview .filter-bar { margin-bottom:20px; }
@media(width > 680px) { .reference-overview .page-actions .filter-control { padding:0 10px; }.reference-overview .filter-bar .comparison-label { align-self:center; } }
@media(max-width:680px) { .reference-overview .page-actions { width:100%; flex-wrap:wrap; }.reference-overview .page-actions .filter-control:first-child { flex-basis:100%; }.reference-overview .page-actions .filter-control:nth-child(2) { flex:1 1 110px; }.reference-overview .page-actions .btn { flex:0 1 auto; }.reference-overview .page-heading { margin-bottom:14px; }.reference-overview .filter-bar { margin-bottom:20px; } }
.overview-canvas .funnel { gap:5px; padding-top:12px; padding-bottom:12px; }

/* Canonical record reader inside the main application's authorized shell. */
.record-reader{max-width:100%;overflow-wrap:anywhere}.record-reader section,.record-reader article{background:#fbfbfa;border-radius:24px;padding:20px;margin:16px 0;min-width:0}.record-reader form{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:12px}.record-reader form label{grid-column:1/-1}.record-reader input{max-width:100%;min-width:0;min-height:44px}.record-reader dt{font-weight:600}.record-reader dd{margin:8px 0 20px;white-space:pre-wrap;overflow-wrap:anywhere}.record-reader button{min-height:44px}.record-reader .btn{margin:4px}.record-reader [aria-live]{overflow-wrap:anywhere}@media(max-width:680px){.record-reader form{grid-template-columns:1fr}.record-reader input{font-size:16px}.record-reader section,.record-reader article{padding:16px}.record-reader .btn{max-width:100%}}

/* Collaboration uses the same authorized record surface at desktop and phone widths. */
.record-collaboration textarea{width:100%;min-height:100px;font:inherit;font-size:16px;resize:vertical;white-space:pre-wrap}.record-collaboration fieldset{min-width:0;border:1px solid var(--line,#ddd);border-radius:12px;margin:12px 0;padding:12px}.record-collaboration fieldset fieldset{margin-left:8px}.record-collaboration label{display:flex;align-items:center;gap:8px;overflow-wrap:anywhere}.record-collaboration [id="collaboration-mentions"] input{min-height:24px}.record-collaboration [id="collaboration-body"]{white-space:pre-wrap}.record-collaboration details{padding:12px;background:#fff;border-radius:12px}.record-collaboration summary{min-height:44px;cursor:pointer}.record-collaboration button{max-width:100%;white-space:normal}.record-collaboration [hidden]{display:none!important}

.record-collaboration #collaboration-properties label{display:grid;grid-template-columns:minmax(90px,1fr) minmax(0,2fr);margin:12px 0}.record-collaboration #collaboration-properties input,.record-collaboration #collaboration-properties select{min-width:0;width:100%;min-height:44px;font:inherit;font-size:16px}@media(max-width:680px){.record-collaboration #collaboration-properties label{grid-template-columns:1fr}}


/* Preserved accepted live visual-only v3 responsive rules; source Library libfile_907eed27337c8191bdcb370f7f56905a. Styles.html SHA256 86ac79d027a7a01255a8eb33a1c3cd87f7ce962d2ceb9cdab4726251a5f1b154. */
/* Closed mobile navigation must never overlay content during viewport changes. */
@media(max-width:680px){
  .reference-overview .sidebar:not(.open){visibility:hidden;pointer-events:none;}
  .reference-overview .sidebar.open{visibility:visible;pointer-events:auto;}
}

@media(max-width:680px){.reference-overview .sidebar .nav-item.active{color:#fff;}}
/* Keep financial values, comparison text, and rankings readable between layouts. */
@media(max-width:1100px){
  .reference-overview .page-heading{align-items:flex-start;flex-direction:column;}
  .reference-overview .page-heading h1{white-space:nowrap;}
  .reference-overview .page-actions{width:100%;flex-wrap:wrap;}
  .overview-canvas .metric-card{overflow:visible;}
  .overview-canvas .metric-value{white-space:nowrap;overflow:visible;text-overflow:clip;overflow-wrap:normal;}
  .overview-canvas .metric-foot{flex-wrap:wrap;line-height:1.6;min-height:16px;}
  .overview-snapshot .metric-card{flex:0 0 auto;min-height:max-content;}
  .overview-canvas .ranking{grid-template-columns:minmax(0,1fr);}
  .overview-canvas .rank-row{display:grid;grid-template-columns:14px 25px minmax(0,1fr) auto;gap:10px;min-width:0;}
  .overview-canvas .rank-name{min-width:0;max-width:none;white-space:normal;overflow:visible;overflow-wrap:anywhere;grid-column:3;grid-row:1;}
  .overview-canvas .rank-value{min-width:0;white-space:nowrap;grid-column:4;grid-row:1;}
  .overview-canvas .rank-track{grid-column:3/5;grid-row:2;width:100%;min-width:0;}
}
@media(width > 680px) and (max-width:680px){
  .reference-overview .topbar{height:auto;min-height:80px;flex-wrap:wrap;padding:16px 24px;}
  .reference-overview .overview-tabs{order:3;width:100%;justify-content:space-between;}
  .reference-overview .overview-tabs .nav-item{white-space:nowrap;padding:0 12px;}
  .reference-overview .overview-brand{margin-right:auto;}
  .overview-canvas{display:flex;flex-direction:column;gap:18px;}
  .overview-hero{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 16px;}
  .overview-hero .metric-card:first-child,.overview-hero .metric-card:last-child{grid-column:1/-1;}
  .overview-snapshot{flex-direction:row;gap:24px;}
  .overview-snapshot .metric-card{flex:1 1 0;}
  .overview-snapshot .metric-card+.metric-card{border-top:0;padding-top:0;margin-top:0;}
  .overview-trend .trend-chart{flex-basis:180px;}
}
@media(width > 680px) and (max-width:1100px){
  .overview-canvas{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:auto;align-items:start;}
  .overview-hero{grid-column:1;grid-row:1/3;}
  .overview-snapshot{grid-column:2;grid-row:1;}
  .overview-trend{grid-column:2;grid-row:2;min-height:260px;}
  .overview-funnel{grid-column:1;grid-row:3;}
  .overview-revenue{grid-column:2;grid-row:3;}
  .overview-ranking{grid-column:1/3;grid-row:4;}
  .overview-canvas .revenue-chart{flex-wrap:wrap;justify-content:center;}
}
@media(max-width:360px){
  .overview-hero .metric-card{grid-column:1/-1;}
}


.overview-canvas .overview-snapshot .metric-card{overflow:visible;flex:1 0 auto;min-height:max-content;}
.overview-canvas .overview-snapshot .metric-foot{line-height:1.6;flex-wrap:wrap;}
@media(min-width:1101px){.overview-canvas{grid-template-rows:minmax(280px,auto) minmax(280px,auto) auto;}}

/* Mobile product layer: essential workflows, soft coral, peach surfaces and neutral typography. */
.mobile-tabbar,.mobile-record-list,.mobile-wordmark { display:none; }
.mobile-filter-disclosure { display:contents; }
.mobile-filter-disclosure > summary { display:none; }
@media(max-width:680px) {
  :root { --ink:#303034; --muted:#74747d; --line:#e8e6e8; --canvas:#f8f8fb; --navy:#303034; --coral:#c45e3c; --green:#c45e3c; --m-accent:#c45e3c; --m-soft:#fce6db; --m-surface:#fff; --m-radius:24px; background:var(--canvas); -webkit-font-smoothing:antialiased; }
  body { background:var(--canvas); color:var(--ink); font-size:15px; }
  button,input,select,textarea { font-family:inherit; }
  button { transition:transform 140ms ease-out,background-color 140ms ease-out,opacity 140ms ease-out; }
  button:active:not(:disabled) { transform:scale(.96); }
  button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible { outline:2px solid #c45e3c; outline-offset:4px; }
  h1,h2,h3 { text-wrap:balance; }
  p { text-wrap:pretty; }
  .app-shell .content-shell { min-height:100dvh; background:var(--canvas); }
  .app-shell .main { background:var(--canvas); padding:16px 20px calc(184px + env(safe-area-inset-bottom)); }
  .app-shell .topbar { position:sticky; top:0; z-index:20; min-height:72px; padding:calc(12px + env(safe-area-inset-top)) max(20px,env(safe-area-inset-right)) 12px max(20px,env(safe-area-inset-left)); background:var(--canvas); border:0; gap:12px; }
  .mobile-wordmark { display:block; order:-1; margin-right:auto; font-weight:650; font-size:20px; letter-spacing:-.8px; color:var(--ink); }
  .app-shell .topbar .breadcrumb,.app-shell .topbar .today,.app-shell .topbar .workspace-label,.app-shell .topbar .overview-brand,.app-shell .overview-tabs,.app-shell .page-subtitle,.app-shell .footnote { display:none; }
  .top-tools { gap:8px; }
  .top-tools > .icon-btn[data-action=help] { display:none; }
  .top-tools .icon-btn { border-radius:50%; background:#fcece6; color:var(--ink); width:44px; height:44px; }
  .top-tools .avatar { background:#fbe7dc; color:#b55335; width:36px; height:36px; }
  .app-shell .page-heading { margin:4px 0 24px; gap:8px; }
  .app-shell .page-heading h1 { font-size:30px; line-height:1.2; letter-spacing:-1px; font-weight:650; }
  .app-shell .page-actions { margin:0; }
  .app-shell .page-actions .secondary-action { display:none; }
  .page-actions .btn-primary { position:fixed; right:max(24px,env(safe-area-inset-right)); bottom:calc(100px + env(safe-area-inset-bottom)); z-index:31; width:auto; max-width:calc(100% - 48px); min-height:52px; padding:14px 20px; border-radius:18px; background:#ee8d6c; color:#3d2922; border:0; font-size:15px; font-weight:600; box-shadow:0 6px 18px #bd654726,inset 0 1px 0 #ffffff20; }
  .mobile-tabbar { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); position:fixed; left:max(16px,env(safe-area-inset-left)); right:max(16px,env(safe-area-inset-right)); bottom:calc(12px + env(safe-area-inset-bottom)); z-index:30; gap:4px; padding:8px; border:0; border-radius:26px; background:#fff; box-shadow:0 8px 32px #30303414,0 0 0 1px #30303408; }
  .mobile-tabbar .nav-item { display:flex; flex-direction:column; justify-content:center; gap:4px; min-height:52px; padding:6px 4px; margin:0; border-radius:18px; font-size:11px; font-weight:500; color:#7b7b84; background:transparent; }
  .mobile-tabbar .nav-item svg { width:20px; height:20px; stroke-width:1.8; }
  .mobile-tabbar .nav-item.active { background:var(--m-soft); color:var(--m-accent); }
  .mobile-tabbar .nav-item.active svg { stroke-width:2.2; }
  .btn,.icon-btn,.nav-item,.tool-btn,.mobile-option { min-height:44px; touch-action:manipulation; -webkit-tap-highlight-color:transparent; }
  .icon-btn { min-width:44px; }
  .btn { color:var(--ink); background:#fff; border-color:var(--line); border-radius:12px; }
  .btn-primary { background:#ee8d6c; color:#3d2922; border:0; }
  .btn svg,.icon-btn svg { stroke-width:1.8; }
  .app-shell .sidebar { top:auto; bottom:0; left:0; width:100%; max-width:100%; height:auto; max-height:85dvh; overflow-y:auto; z-index:50; padding:28px 24px max(24px,env(safe-area-inset-bottom)); border:0; border-radius:28px 28px 0 0; background:#fff; color:var(--ink); box-shadow:0 -8px 40px #3030341a; transform:translateY(100%); visibility:hidden; transition:transform 220ms ease-out,visibility 220ms; }
  .app-shell .sidebar.open { transform:translateY(0); visibility:visible; }
  .sidebar::before { content:''; position:absolute; width:36px; height:4px; background:#dcd8d6; border-radius:4px; top:12px; left:calc(50% - 18px); }
  .sidebar .brand { display:none; }
  .sidebar .nav-group { padding:0; margin-bottom:16px; border:0; }
  .sidebar .nav-caption { color:var(--muted); padding:4px 12px; font-size:12px; }
  .sidebar .nav-item { color:var(--ink); border-radius:14px; padding:12px; font-size:16px; }
  .sidebar .nav-item.active { color:var(--m-accent); background:var(--m-soft); }
  .sidebar .nav-item[data-nav=DASHBOARD],.sidebar .nav-item[data-nav=PD],.sidebar .nav-item[data-nav=DEALS] { display:none; }
  .sidebar .side-bottom { margin-top:0; padding-top:16px; border-top:1px solid var(--line); }
  .sidebar .workspace-badge,.sidebar .kbd { display:none; }
  .sidebar .profile { background:#f8f8fb; color:var(--ink); border:0; border-radius:16px; padding:12px; }
  .sidebar .profile .role { color:var(--muted); }
  .sidebar .avatar { background:var(--m-soft); color:var(--m-accent); }
  .app-shell .menu-backdrop { z-index:45; background:#3027234d; }
  .mobile-filter-disclosure { display:block; margin-bottom:16px; background:#fff0e9; border:0; border-radius:16px; }
  .mobile-filter-disclosure > summary { display:list-item; min-height:48px; padding:12px 16px; cursor:pointer; color:var(--ink); font-size:12px; font-weight:500; }
  .mobile-filter-disclosure > summary span { display:inline; margin-left:12px; font-size:12px; color:#796660; font-weight:400; }
  .filter-bar { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; background:#fff; border:0; }
  .mobile-filter-disclosure .filter-bar { margin:0; border:0; border-top:1px solid var(--line); border-radius:0 0 16px 16px; padding:12px; }
  .filter-bar .filter-control { min-width:0; width:100%; background:#fff; border:1px solid var(--line); border-radius:10px; padding:8px; }
  .filter-bar .filter-control:first-child:has(.date-field) { grid-column:1/-1; }
  .filter-bar input,.filter-bar select { min-width:0; width:100%; color:var(--ink); font-size:16px; }
  .filter-bar .comparison-label { grid-column:1/-1; font-size:12px; color:var(--muted); }
  .mobile-search-row { display:flex; gap:8px; margin-bottom:16px; }
  .mobile-search { display:flex; align-items:center; flex:1; min-width:0; gap:12px; min-height:52px; padding:0 16px; background:#fff; border-radius:16px; box-shadow:0 0 0 1px #30303406; }
  .mobile-search svg { width:20px; color:#88858b; }
  .mobile-search input { min-width:0; padding:12px 0; background:transparent; border:0; box-shadow:none; outline-offset:0; font-size:16px; }
  .mobile-search input::placeholder { color:#88858b; }
  .mobile-filter-button { position:relative; width:52px; border:0; border-radius:16px; background:#fff; color:var(--ink); }
  .mobile-filter-button.on { background:var(--m-soft); color:var(--m-accent); }
  .mobile-filter-count { position:absolute; right:4px; top:4px; min-width:16px; height:16px; border-radius:8px; font-size:10px; background:#ee8d6c; color:#3d2922; }
  .mobile-quick-views { display:flex; background:#f2eeec; border-radius:14px; gap:4px; padding:4px; margin-bottom:24px; }
  .mobile-quick-views button { flex:1; min-width:0; min-height:40px; border:0; border-radius:10px; font-size:13px; color:#7a7070; background:transparent; }
  .mobile-quick-views button.active { background:#fff; color:var(--ink); font-weight:600; box-shadow:0 2px 4px #30303408; }
  .mobile-list-heading { position:relative; display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:44px; margin-bottom:12px; color:var(--muted); font-size:12px; }
  .mobile-list-heading strong { color:var(--ink); font-weight:600; }
  .mobile-list-options > summary { display:flex; align-items:center; gap:6px; min-height:44px; color:var(--muted); cursor:pointer; list-style:none; }
  .mobile-list-options > summary::-webkit-details-marker { display:none; }
  .mobile-list-options > summary svg { width:16px; height:16px; }
  .mobile-list-options[open] { position:relative; }
  .mobile-option-grid,.mobile-saved-views { position:relative; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; padding:12px; background:#fff; border-radius:16px; }
  .mobile-options-panel { position:fixed; z-index:35; right:20px; bottom:calc(164px + env(safe-area-inset-bottom,0px)); width:min(350px,calc(100vw - 40px)); max-height:55dvh; overflow:auto; padding-bottom:8px; border-radius:16px; background:#fff; box-shadow:0 8px 32px #30303418,0 0 0 1px var(--line); }
  .mobile-option { display:flex; align-items:center; gap:8px; min-width:0; padding:12px; border:0; border-radius:10px; background:#f8f5f3; font-size:12px; color:var(--ink); }
  .mobile-option svg { width:16px; height:16px; }
  .mobile-option.on { background:var(--m-soft); color:var(--m-accent); }
  .mobile-saved-view { min-height:44px; padding:8px; font-size:12px; border:0; border-radius:10px; background:#f8f5f3; color:var(--ink); }
  .mobile-saved-view.active { background:var(--m-soft); color:var(--m-accent); }
  .mobile-record-list { display:grid; gap:12px; }
  .mobile-record-list + .table-scroll { display:none; }
  .mobile-record-card { position:relative; min-width:0; padding:20px; border:0; border-radius:var(--m-radius); background:#fff; box-shadow:0 2px 8px #30303404,0 0 0 1px #30303404; }
  .mobile-record-card dl { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin:0; }
  .mobile-record-field { min-width:0; overflow-wrap:anywhere; }
  .mobile-record-field dt { font-size:11px; color:var(--muted); margin-bottom:4px; font-weight:400; }
  .mobile-record-field dd { margin:0; font-size:14px; color:var(--ink); line-height:1.5; white-space:normal; font-variant-numeric:tabular-nums; }
  .mobile-record-primary { grid-column:1/-1; padding:0 40px 12px 0; border-bottom:1px solid #efedef; }
  .mobile-record-primary dt { margin-bottom:2px; }
  .mobile-record-primary dd { font-size:18px; font-weight:600; letter-spacing:-.3px; }
  .mobile-record-field .record-link { display:inline; max-width:100%; min-height:44px; text-align:left; white-space:normal; overflow-wrap:anywhere; color:var(--ink); background:transparent; }
  .mobile-record-open { position:absolute; top:24px; right:12px; min-width:44px; min-height:44px; border:0; border-radius:12px; background:#faf2ed; color:#84685e; }
  .mobile-record-open svg { width:16px; height:16px; }
  .mobile-record-details { margin-top:16px; padding-top:8px; border-top:1px solid #efedef; }
  .mobile-record-details summary { display:flex; align-items:center; justify-content:space-between; min-height:44px; color:var(--muted); font-size:12px; cursor:pointer; }
  .mobile-record-details summary span { color:#8d8582; }
  .mobile-record-details[open] dl { padding-top:12px; }
  .mobile-record-card.row-warning { background:#fffcef; }
  .mobile-record-card.row-danger { background:#fff4f2; }
  .mobile-record-card.row-success { background:#eff9f3; }
  .mobile-record-card.row-highlight { background:#eef4fc; }
  .mobile-record-field.cell-warning { background:#fff1cd; }
  .mobile-record-field.cell-danger { background:#ffe8e1; }
  .mobile-record-field.cell-success { background:#dcf2e5; }
  .mobile-record-field.cell-highlight { background:#dfebfa; }
  .mobile-record-field[class*="cell-"] { padding:8px; border-radius:8px; }
  .mobile-group-title { display:flex; justify-content:space-between; gap:12px; font-size:14px; padding:12px 4px 0; }
  .mobile-group-title span { color:var(--muted); font-size:12px; font-weight:400; }
  .mobile-pagination { display:flex; justify-content:space-between; align-items:center; gap:12px; padding-top:24px; color:var(--muted); font-size:12px; }
  .badge { padding:4px 8px; border-radius:6px; font-size:11px; }
  .badge.green { color:#20664b; background:#e5f3eb; }
  .badge.orange { color:#795719; background:#f8f0d9; }
  .badge.blue { color:#365d87; background:#e9f0f8; }
  .badge.purple { color:#5d547c; background:#efeaf6; }
  .filter-chips { padding:0 0 12px; }
  .filter-chip { background:#fce6db; color:var(--m-accent); border:0; min-height:40px; }
  .filter-chip button { min-width:44px; min-height:44px; }
  .mobile-home { display:grid; gap:24px; }
  .mobile-home .mobile-filter-disclosure { margin-bottom:0; }
  .mobile-welcome { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:-8px; font-size:12px; color:var(--muted); }
  .mobile-welcome p { max-width:65%; overflow-wrap:anywhere; }
  .mobile-welcome span { font-variant-numeric:tabular-nums; }
  .mobile-performance { border-radius:28px; background:linear-gradient(135deg,#ee8d6c,#f4a58c); color:var(--ink); overflow:hidden; box-shadow:0 8px 24px #3030340c; }
  .mobile-performance > .metric-card { width:100%; min-height:0; margin:0; padding:24px; border:0; border-radius:0; background:transparent; color:var(--ink); box-shadow:none; text-align:left; }
  .mobile-performance .metric-label { color:#53392f; font-size:12px; }
  .mobile-performance .metric-label svg { color:#53392f; }
  .mobile-performance .metric-card.featured .metric-value { color:var(--ink); font-size:38px; letter-spacing:-1.4px; font-weight:500; line-height:1.3; margin:12px 0; white-space:normal; overflow-wrap:anywhere; }
  .mobile-performance .currency { color:#53392f; font-size:20px; margin-right:4px; }
  .mobile-performance .metric-foot { color:#53392f; font-size:11px; line-height:1.5; flex-wrap:wrap; }
  .mobile-performance .delta { color:#20664b; }
  .mobile-performance .delta.down { color:#9e392b; }
  .mobile-goal { padding:0 24px 24px; }
  .mobile-goal > div { display:flex; justify-content:space-between; align-items:center; gap:12px; color:#53392f; font-size:11px; }
  .mobile-goal button { display:flex; align-items:center; gap:4px; min-height:44px; padding:0; border:0; background:transparent; color:#303034; font-size:12px; font-variant-numeric:tabular-nums; }
  .mobile-goal button svg { width:14px; height:14px; }
  .mobile-goal progress { display:block; width:100%; height:6px; margin:4px 0 8px; border:0; border-radius:6px; accent-color:#ffe9d2; background:#e97859; }
  .mobile-goal progress::-webkit-progress-bar { background:#e97859; border-radius:6px; }
  .mobile-goal progress::-webkit-progress-value { background:#ffe9d2; border-radius:6px; }
  .mobile-kpi-pair { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
  .mobile-kpi-pair .metric-card { min-width:0; min-height:0; padding:20px; margin:0; border:0; border-radius:24px; background:#fff; box-shadow:0 0 0 1px #30303404; }
  .mobile-kpi-pair .metric-label { font-size:11px; color:var(--muted); }
  .mobile-kpi-pair .metric-label svg { display:none; }
  .mobile-kpi-pair .metric-value { font-size:24px; line-height:1.2; letter-spacing:-.8px; margin:12px 0; color:var(--ink); white-space:normal; overflow-wrap:anywhere; }
  .mobile-kpi-pair .currency { font-size:12px; }
  .mobile-kpi-pair .metric-foot { font-size:10px; display:block; line-height:1.5; color:var(--muted); }
  .mobile-kpi-pair .metric-foot span { display:block; }
  .mobile-section { min-width:0; }
  .mobile-section h2 { font-size:16px; font-weight:600; letter-spacing:-.3px; }
  .mobile-section-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
  .mobile-section-heading > span { font-size:11px; color:var(--muted); }
  .mobile-shortcuts { display:grid; background:#fff; border-radius:24px; padding:8px 20px; }
  .mobile-shortcuts button { display:flex; gap:12px; align-items:center; min-height:56px; padding:12px 0; border:0; background:transparent; color:var(--ink); font-size:14px; text-align:left; }
  .mobile-shortcuts button + button { border-top:1px solid #efedef; }
  .mobile-shortcuts button > svg:first-child { color:var(--m-accent); width:20px; height:20px; }
  .mobile-shortcuts button > svg:last-child { margin-left:auto; color:#948986; width:16px; height:16px; }
  .mobile-trend { background:#fff; border-radius:24px; padding:20px; }
  .mobile-trend .trend-chart { padding:0; margin-top:16px; }
  .mobile-trend .trend-chart svg { width:100%; min-width:0; height:auto; }
  .mobile-period-button { display:flex; justify-content:center; gap:8px; align-items:center; min-height:44px; padding:12px; border:0; border-radius:14px; background:#f2eeec; color:#7a5d52; font-size:12px; }
  .mobile-report-details { border-radius:24px; background:#fff; padding:8px 20px; }
  .mobile-report-details > summary { display:flex; align-items:center; justify-content:space-between; min-height:56px; cursor:pointer; font-size:14px; font-weight:600; }
  .mobile-report-details > summary svg { width:16px; height:16px; color:#948986; }
  .mobile-report-details[open] > summary svg { transform:rotate(90deg); }
  .mobile-report-body { display:grid; gap:24px; padding:12px 0 16px; }
  .mobile-revenue button,.mobile-rank { display:flex; width:100%; align-items:center; gap:8px; min-height:56px; padding:12px 0; border:0; border-bottom:1px solid #efedef; background:transparent; font-size:12px; color:var(--ink); }
  .mobile-revenue strong { margin-left:auto; font-weight:500; font-variant-numeric:tabular-nums; }
  .mobile-revenue svg { width:14px; height:14px; color:#948986; }
  .mobile-rank > span:first-child { color:var(--muted); }
  .mobile-rank strong { flex:1; min-width:0; text-align:left; font-weight:500; }
  .mobile-rank > span:last-child { font-variant-numeric:tabular-nums; }
  .mobile-metric-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-top:12px; }
  .mobile-metric-grid .metric-card { min-width:0; min-height:0; padding:12px; border:0; border-radius:12px; background:#f8f8fb; box-shadow:none; }
  .mobile-metric-grid .metric-label { font-size:10px; color:var(--muted); }
  .mobile-metric-grid .metric-label svg { display:none; }
  .mobile-metric-grid .metric-value { font-size:20px; margin:8px 0; white-space:normal; overflow-wrap:anywhere; }
  .mobile-metric-grid .metric-foot { font-size:10px; display:block; }
  .mobile-rules-note { color:var(--muted); font-size:12px; line-height:1.7; }
  .mobile-rules-note .link-button { min-height:44px; color:var(--m-accent); }
  .mobile-agenda .calendar-header { padding:12px 0; background:transparent; border:0; }
  .mobile-agenda .calendar-header > div { display:flex; gap:4px; }
  .mobile-agenda-day { margin-top:24px; }
  .mobile-agenda-day h2 { display:flex; gap:12px; font-size:13px; color:var(--muted); margin:0 0 12px 4px; }
  .mobile-agenda-day h2 span { color:var(--m-accent); }
  .mobile-agenda-event { display:flex; align-items:center; gap:16px; min-height:76px; width:100%; margin-bottom:8px; padding:16px; border:0; border-radius:20px; background:#fff; text-align:left; color:var(--ink); }
  .mobile-agenda-event time { font-size:13px; font-variant-numeric:tabular-nums; color:var(--m-accent); }
  .mobile-agenda-event > span { flex:1; min-width:0; }
  .mobile-agenda-event strong,.mobile-agenda-event small { display:block; overflow-wrap:anywhere; }
  .mobile-agenda-event strong { font-size:14px; font-weight:600; }
  .mobile-agenda-event small { color:var(--muted); font-size:11px; margin-top:4px; }
  .mobile-agenda-event > svg { width:16px; height:16px; color:#948986; }
  .panel,.settings-card,.notice-box { border-color:var(--line); border-radius:24px; background:#fff; color:var(--ink); box-shadow:0 0 0 1px #30303404; }
  .settings-grid { grid-template-columns:minmax(0,1fr); gap:16px; }
  .settings-card { padding:24px; }
  .settings-card h2 { color:var(--ink); font-size:18px; }
  .settings-card p { font-size:14px; color:var(--muted); line-height:1.6; }
  .subnav { background:#f2eeec; border-radius:14px; padding:4px; gap:4px; border:0; overflow:auto; }
  .subnav button { min-height:44px; border-radius:10px; white-space:nowrap; }
  .subnav button.active { background:#fff; color:var(--m-accent); border:0; }
  .notice-box { padding:16px; font-size:13px; line-height:1.6; }
  .error-box { padding:24px; background:#fff; border:1px solid #e8d9d3; border-radius:24px; color:#62443a; }
  .error-box strong { font-size:18px; }
  .error-box p { margin-top:8px; font-size:14px; line-height:1.6; }
  .empty-state { padding:32px 24px; min-height:220px; border-radius:24px; background:#fff; color:var(--muted); }
  .empty-state h3 { color:var(--ink); font-size:18px; }
  .empty-state p { font-size:14px; max-width:28ch; margin:8px auto 16px; line-height:1.6; }
  .empty-state .btn { color:var(--m-accent); background:var(--m-soft); border:0; }
  .loading-panel { min-height:220px; background:#fff; border-radius:24px; color:var(--muted); font-size:14px; }
  .spinner { border-top-color:var(--m-accent); }
  dialog#dialog,dialog#drawer { inset:0; margin:0; width:100%!important; max-width:100%; height:100dvh; max-height:100dvh; border:0; border-radius:0; background:var(--canvas); color:var(--ink); padding-top:env(safe-area-inset-top); }
  dialog::backdrop { background:#3027234d; }
  #dialog-form { display:flex; flex-direction:column; min-height:100%; }
  .dialog-head { position:sticky; top:0; z-index:2; padding:20px; background:var(--canvas); border-bottom:1px solid var(--line); }
  .dialog-head h2 { color:var(--ink); font-size:24px; letter-spacing:-.6px; }
  .dialog-head p { font-size:12px; line-height:1.5; color:var(--muted); }
  .dialog-head .icon-btn { color:var(--ink); background:#f7e8e0; border-radius:50%; }
  .dialog-body { flex:1; padding:24px 20px; background:var(--canvas); }
  .dialog-body h3 { color:var(--ink); font-size:16px; margin-bottom:16px; }
  .form-grid,.detail-grid { grid-template-columns:minmax(0,1fr); gap:16px; }
  .form-field label,.field label,.form-grid label { font-size:13px; color:#7a6c67; }
  input,select,textarea { font-size:16px; background:#fff; color:var(--ink); border:1px solid var(--line); border-radius:12px; padding:12px; min-height:48px; box-shadow:none; }
  input[type=checkbox] { width:20px; height:20px; min-height:20px; accent-color:var(--m-accent); }
  .dialog-footer { position:sticky; bottom:0; z-index:2; padding:16px 20px max(20px,env(safe-area-inset-bottom)); background:var(--canvas); border-top:1px solid var(--line); gap:12px; flex-wrap:wrap; }
  .dialog-footer .btn-primary { min-height:48px; flex:1; background:#ee8d6c; color:#3d2922; border:0; border-radius:14px; }
  .dialog-footer .btn:not(.btn-primary) { border:0; color:var(--muted); background:#f7e8e0; }
  .dialog-footer > span { display:none; }
  .detail-actions { padding:0 0 20px; gap:8px; }
  .detail-actions .btn { min-height:48px; flex:1 1 140px; }
  .detail-actions .btn:not(.btn-danger) { color:var(--m-accent); background:var(--m-soft); border:0; }
  .detail-grid dt { color:var(--muted); font-size:12px; }
  .detail-grid dd { color:var(--ink); font-size:16px; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
  .allocation-row,.config-row { background:#fff; border-color:var(--line); border-radius:16px; }
  .form-errors { color:#9d4736; background:#fff0e9; border-radius:12px; padding:16px; }
  .toast-region { bottom:calc(164px + env(safe-area-inset-bottom)); left:20px; right:20px; }
  .toast { background:#303034; color:#fff; border:0; border-radius:16px; box-shadow:0 4px 24px #30303420; font-size:14px; }
  .toast .icon-btn { color:#fff; }
  /* Explicit interaction colors override earlier desktop hover rules. */
  .btn:not(:disabled):hover,.icon-btn:hover,.tool-btn:hover,.mobile-option:hover,.nav-item:hover,.record-link:hover,.mobile-saved-view:hover { background:#fff0e9; color:#ae4d2f; border-color:#edc2ae; }
  .btn-primary:not(:disabled):hover,.btn-coral:not(:disabled):hover,.page-actions .btn-primary:hover,.dialog-footer .btn-primary:hover { background:#e57b57; color:#30231e; }
  .mobile-tabbar .nav-item:hover,.mobile-tabbar .nav-item.active:hover,.sidebar .nav-item:hover { background:#fce6db; color:#b55335; }
  .metric-card:hover { background:#fff3ec; border-color:#edc2ae; }
  .mobile-performance > .metric-card:hover { background:#ffffff12; color:var(--ink); }
  .mobile-shortcuts button:hover,.mobile-rank:hover,.mobile-revenue button:hover,.mobile-goal button:hover { background:#fff0e970; color:var(--ink); }
  .top-tools .icon-btn[data-action=refresh] { color:#b55335; }
  .icon-refresh { fill:currentColor; stroke:none; }
  .numeric,.metric-value,.mobile-list-heading,.mobile-pagination { font-variant-numeric:tabular-nums; }
}
@media(max-width:360px) {
  .app-shell .main { padding-left:16px; padding-right:16px; }
  .mobile-record-card { padding:16px; }
  .mobile-record-primary { padding-right:40px; }
  .mobile-record-card dl { gap:12px; }
  .mobile-performance .metric-card.featured .metric-value { font-size:32px; }
  .mobile-kpi-pair .metric-card { padding:16px; }
  .mobile-filter-disclosure > summary span { display:block; margin:4px 0 0; }
}
@media(max-width:680px) and (prefers-reduced-motion:reduce) {
  button,.sidebar,.mobile-tabbar *,.mobile-record-list * { transition:none!important; animation:none!important; }
  button:active:not(:disabled) { transform:none; }
}

/* Approved whole-desktop presentation, rebased onto core359; mobile layouts remain scoped out. */
@media (width > 680px) {
 .desktop-workspace { min-height:100dvh; background:#efefed; color:#28313c; }
 .desktop-workspace .content-shell,.desktop-workspace .main { min-height:calc(100dvh - 80px); background:#efefed; }
 .desktop-workspace .main { padding:28px 32px 32px; }
 .desktop-workspace .topbar { gap:20px; }
 .desktop-workspace .overview-tabs { margin-left:auto; margin-right:auto; flex-shrink:0; }
 .desktop-workspace .top-tools { margin-left:0; }
 .desktop-workspace .page-heading { align-items:center; margin:12px 0 24px; }
 .desktop-workspace .page-heading h1 { font-size:34px; font-weight:400; line-height:1.2; letter-spacing:-.03em; }
 .desktop-workspace .sidebar .nav-item { color:#4e5966; }
 .desktop-workspace .sidebar .nav-item.active { color:#713420; }
 .desktop-workspace .sidebar .brand { display:flex; align-items:center; justify-content:center; }
 .desktop-workspace .sidebar .side-bottom { display:none; }
 .desktop-workspace .workspace-context,.desktop-workspace .subnav { display:flex; flex-wrap:wrap; width:fit-content; max-width:100%; gap:4px; padding:5px; border:0; border-radius:28px; background:#fff; margin:0 0 24px; }
 .desktop-workspace .subnav button { border:0; border-radius:22px; padding:10px 16px; background:transparent; color:#59616d; min-height:40px; }
 .desktop-workspace .subnav button.active { background:#ffd6b7; color:#713420; }
 .desktop-workspace .panel { border:0; border-radius:26px; box-shadow:none; }
 .desktop-workspace .workspace-query { display:flex; flex-direction:column; gap:18px; margin-bottom:18px; min-width:0; }
 .desktop-workspace .workspace-query .filter-bar { margin:0; padding:0; gap:8px; }
 .desktop-workspace .workspace-query .desktop-view-strip { align-self:flex-start; max-width:100%; }
 .desktop-workspace .workspace-query .view-tabs { display:flex; flex-wrap:wrap; align-self:flex-start; max-width:100%; gap:4px; background:#fff; border:0; padding:5px; border-radius:24px; }
 .desktop-workspace .view-tab { border:0; border-radius:20px; min-height:38px; padding:8px 15px; white-space:nowrap; }
 .desktop-workspace .view-tab.active { background:#ffe1cb; color:#713420; }
 .desktop-workspace .workspace-table { overflow:hidden; }
 .desktop-workspace .workspace-table-heading { display:flex; gap:12px; align-items:center; padding:24px 24px 0; }
 .desktop-workspace .workspace-table-heading h2 { margin:0; font-size:18px; line-height:1.4; font-weight:500; }
 .desktop-workspace .workspace-table-heading .badge { background:#f3f3f1; color:#59616d; border-radius:20px; padding:5px 10px; }
 .desktop-workspace .view-toolbar { display:flex; flex-wrap:wrap; gap:8px; padding:18px 24px 20px; border:0; background:#fff; }
 .desktop-workspace .search-control { flex:1 1 260px; max-width:390px; min-width:180px; background:#f4f4f2; border:1px solid transparent; border-radius:24px; min-height:42px; }
 .desktop-workspace .search-control:focus-within { border-color:#a85132; }
 .desktop-workspace .search-control input { background:transparent; border:0; }
 .desktop-workspace .tool-btn { border:1px solid #ecece8; background:#fff; border-radius:22px; padding:9px 13px; color:#515b67; min-height:40px; }
 .desktop-workspace .tool-btn.on { border-color:#edb894; background:#fff0e4; color:#713420; }
 .desktop-workspace .table-scroll { max-width:100%; border-top:1px solid #eeeee9; }
 .desktop-workspace table { color:#434e5e; font-size:13px; }
 .desktop-workspace th { background:#f7f7f4; color:#56606b; font-size:12px; font-weight:600; padding:13px 16px; }
 .desktop-workspace td { padding:16px; border-bottom-color:#f0f0ec; }
 .desktop-workspace .record-link { color:#573b2e; }
 .desktop-workspace .table-footer { border:0; padding:17px 24px; color:#68717d; }
 .desktop-workspace .filter-chip { border-radius:20px; background:#fff1e5; }
 .desktop-workspace .settings-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
 .desktop-workspace .settings-card { display:flex; flex-direction:column; align-items:flex-start; padding:26px; min-height:210px; }
 .desktop-workspace .settings-card>div { width:100%; }
 .desktop-workspace .settings-card h2 { font-size:19px; font-weight:500; }
 .desktop-workspace .settings-card>p { line-height:1.7; max-width:52ch; margin:0 0 24px; color:#657080; }
 .desktop-workspace .settings-card>.btn { margin-top:auto; background:#fff0e4; border-color:transparent; color:#713420; }
 .desktop-workspace .notice-box { border-radius:18px; padding:18px 22px; background:#f7f7f5; border-color:#deded8; }
 .desktop-workspace .access-policy { max-width:none; margin-bottom:22px; }
 .desktop-workspace .access-header { padding:24px; border:0; }
 .desktop-workspace .access-header h2 { font-size:20px; font-weight:500; }
 .desktop-workspace .access-header p { font-size:13px; }
 .desktop-workspace .record-reader { display:grid; grid-template-columns:minmax(300px,.85fr) minmax(360px,1.15fr); gap:20px; align-items:start; }
 .desktop-workspace .record-reader>p { grid-column:1/-1; padding:18px 22px; border-radius:18px; background:#f7f7f5; margin:0; }
 .desktop-workspace .record-reader>section,.desktop-workspace .record-reader>form { border-radius:26px; background:#fff; padding:24px; min-width:0; }
 .desktop-workspace #record-search-results article,.desktop-workspace #record-history article { border-radius:16px; border-color:#e8e8e2; }
 .desktop-workspace #record-collaboration { grid-column:1/-1; }
 .desktop-workspace .footnote { padding-top:8px; font-size:12px; }
 body:has(.desktop-workspace) dialog:not(.drawer) { border:0; border-radius:26px; box-shadow:0 24px 80px #35281929; }
 body:has(.desktop-workspace) .dialog-head { padding:26px 28px; border-color:#eeeee9; }
 body:has(.desktop-workspace) .dialog-body { padding:26px 28px; }
 body:has(.desktop-workspace) .dialog-footer { background:#f7f7f5; border-color:#eeeee9; padding:18px 28px; }
 body:has(.desktop-workspace) .btn { border-radius:24px; }
 body:has(.desktop-workspace) .form-field input,body:has(.desktop-workspace) .form-field select,body:has(.desktop-workspace) .form-field textarea { border-radius:12px; border-color:#dbdedf; background:#fff; }
 .desktop-workspace :is(button,a,input,select,textarea):focus-visible { outline:3px solid #9a4226; outline-offset:3px; }
 .desktop-workspace :is(button,a):disabled { cursor:not-allowed; }
 .desktop-workspace :is(.btn,.tool-btn,.icon-btn,.nav-item,.view-tab,.subnav button) { transition:background-color 120ms ease,border-color 120ms ease,color 120ms ease; }
}
@media (width > 680px) and (max-width:1200px) {
 .desktop-workspace .topbar { gap:10px; padding:0 24px; }
 .desktop-workspace .overview-tabs .nav-item { padding:0 11px; }
 .desktop-workspace .top-tools .today { display:none; }
 .desktop-workspace .record-reader { grid-template-columns:minmax(0,1fr); }
}
@media (width > 680px) and (hover:hover) and (pointer:fine) {
 .desktop-workspace :is(.btn,.tool-btn,.icon-btn,.nav-item,.view-tab,.subnav button):not(:disabled):not(.active):hover { background:#fff0e4; color:#713420; border-color:#edc9ae; }
 .desktop-workspace .btn-primary:not(:disabled):hover { background:#ffc29c; border-color:#a65a38; }
 .desktop-workspace :is(.btn,.tool-btn,.icon-btn,.nav-item,.view-tab,.subnav button):not(:disabled):not(:focus-visible):active { background:#ffe0cc; transform:scale(.98); }
 .desktop-workspace table tbody tr:not(:has(button:not(:disabled),a[href])):hover { background:transparent; }
 .desktop-workspace :is(.btn,.tool-btn,.icon-btn,.nav-item,.view-tab,.subnav button):disabled:hover { transform:none; }
}
@media (width > 680px) and (prefers-reduced-motion:reduce) {
 .desktop-workspace * { animation:none !important; }
 .desktop-workspace :is(.btn,.tool-btn,.icon-btn,.nav-item,.view-tab,.subnav button):active { transform:none !important; }
}
@media(width > 680px) {
 .desktop-workspace [hidden] { display:none !important; }
 .desktop-workspace #page-title:focus:not(:focus-visible) { outline:none; }
 .desktop-workspace .workspace-settings-group { margin-bottom:26px; }
 .desktop-workspace .workspace-settings-group>h2 { margin:0 0 14px; font-size:16px; font-weight:500; }
 .desktop-workspace .workspace-settings-group:last-of-type .settings-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
 .desktop-workspace .record-reader>#record-query-form { grid-column:1; grid-row:2; }
 .desktop-workspace .record-reader>#record-search-results { grid-column:1; grid-row:3; }
 .desktop-workspace .record-reader>#record-more-search { grid-column:1; grid-row:4; justify-self:start; }
 .desktop-workspace .record-reader>#record-detail { grid-column:2; grid-row:2/4; }
 .desktop-workspace .record-reader>#record-history { grid-column:2; grid-row:4; }
 .desktop-workspace .record-reader>#record-more-history { grid-column:2; grid-row:5; justify-self:start; }
 .desktop-workspace .record-reader>#record-collaboration { grid-column:1/-1; grid-row:auto; }
 .desktop-workspace .record-reader>section:empty { display:none; }
 .desktop-workspace .record-reader>p:last-child { grid-row:auto; }
 .desktop-workspace #record-query-form { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:14px; align-items:center; }
 .desktop-workspace #record-query-form label { grid-column:1/-1; font-size:16px; }
 .desktop-workspace #record-query { min-width:0; border-radius:24px; background:#f4f4f2; padding:10px 14px; }
}
@media(width > 680px) and (max-width:1200px) {
 .desktop-workspace .record-reader>:is(#record-query-form,#record-search-results,#record-more-search,#record-detail,#record-history,#record-more-history,#record-collaboration) { grid-column:1; grid-row:auto; }
 .desktop-workspace .workspace-settings-group:last-of-type .settings-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(width > 680px) {
 .desktop-workspace { display:grid; grid-template-columns:80px minmax(0,1fr); }
 .desktop-workspace .sidebar { width:80px; padding:20px 10px; background:#efefed; border:0; align-items:center; }
 .desktop-workspace .brand { width:52px; height:52px; padding:0; }
 .desktop-workspace .brand-logo { width:52px; height:52px; max-width:100%; object-fit:contain; }
 .desktop-workspace .sidebar .nav-item { width:48px; height:48px; min-height:48px; padding:0; border-radius:50%; justify-content:center; margin:6px auto; background:#fff; }
 .desktop-workspace .sidebar .nav-item.active { background:#ffd6b7; color:#713420; }
 .desktop-workspace .sidebar :is(.nav-item span,.nav-caption,.workspace-label) { display:none; }
 .desktop-workspace .topbar { height:80px; background:#efefed; border:0; padding:0 32px; }
 .desktop-workspace .breadcrumb { display:none; }
 .desktop-workspace .filter-bar { background:none; padding:0; border:0; border-radius:0; gap:8px; }
 .desktop-workspace .filter-control { background:#fff; border:0; border-radius:24px; min-height:42px; padding:0 12px; }
 .desktop-workspace .filter-control :is(input,select) { min-height:40px; }
 .desktop-workspace .btn { border-radius:24px; font-size:13px; }
}
@media(max-width:680px) {
 .desktop-workspace .topbar>:is(.overview-brand,.overview-tabs),.desktop-workspace .workspace-context { display:none; }
}

@media(width > 680px) { .desktop-workspace .record-reader>section { margin:0; } }
@media(width > 680px) {
 .desktop-workspace :is(.btn,.tool-btn,.icon-btn,.nav-item,.view-tab,.subnav button):disabled,
 .desktop-workspace :is(.btn,.tool-btn,.icon-btn,.nav-item,.view-tab,.subnav button):disabled:hover { background:#edf0f4; color:#657080; border-color:var(--line); transform:none; }
 .desktop-workspace :is(button,a):focus-visible { transition:none; }
}
@media(width > 680px) {
 .desktop-workspace button:active { transform:none; }
 .desktop-workspace button:focus-visible:active { transform:none !important; }
}
@media(width > 680px) and (hover:hover) and (pointer:fine) {
 .desktop-workspace :is(.btn,.tool-btn,.icon-btn,.nav-item,.view-tab,.subnav button):not(:disabled):not(:focus-visible):active { transform:scale(.98); }
}

/* N01 09.06: scoped mark toolbar and literal rich preview inside the record collaboration editor. */
.record-collaboration .collab-mark-toolbar{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0}
.record-collaboration .collab-mark-toolbar .btn{min-height:44px;min-width:44px;max-width:100%}
.record-collaboration .collab-rich-preview{white-space:pre-wrap;overflow-wrap:anywhere;padding:4px 0 8px}

.source-template-fallback{width:100%;min-height:4em;font:inherit;font-family:ui-monospace,monospace;white-space:pre;overflow:auto;resize:vertical}

/* N14 readable authorized history comparison */
.record-reader .history-diff{background:#fff;border-radius:16px;padding:12px;margin:12px 0;overflow-x:auto;min-width:0}
.history-diff table{width:100%;border-collapse:collapse;table-layout:fixed}
.history-diff th,.history-diff td{text-align:left;vertical-align:top;padding:6px 8px;border-bottom:1px solid #e8e8e2;overflow-wrap:anywhere;word-break:break-word}
.history-diff .history-absent{color:#6b6f6d;font-style:italic}
.history-diff h4{margin:0 0 8px;font-size:15px}
.history-diff-note{font-size:14px;color:#4a4f4d;margin:8px 0 0}

/* N15: authorized module-source freshness, outside replaceable page-content. */
.aggregate-freshness {
  margin:0 0 16px;
  padding:12px 16px;
  border:1px solid var(--line);
  border-left:3px solid #8c98aa;
  border-radius:8px;
  background:var(--white);
  color:var(--ink);
  font-size:12px;
  line-height:1.6;
  overflow-wrap:anywhere;
}
.aggregate-freshness[hidden] { display:none; }
.aggregate-freshness strong { display:block; margin-bottom:3px; font-size:13px; }
.aggregate-freshness-details { display:flex; flex-wrap:wrap; gap:3px 18px; }
.aggregate-freshness-details p { margin:0; }
.aggregate-freshness-scope { margin-top:5px; color:var(--muted); font-size:11px; }
@media (max-width:680px) {
  .aggregate-freshness { padding:10px 12px; margin-bottom:12px; }
  .aggregate-freshness-details { display:block; }
}

/* N16: an accessible decision over the intact native form, never form replacement. */
.unsaved-form-shield {
  position:absolute; inset:0; z-index:20; display:grid; place-items:center;
  padding:20px; overflow:auto; background:rgba(19,29,42,.64);
}
.unsaved-form-decision {
  width:min(420px,100%); padding:24px; border-radius:16px; background:var(--canvas,#fff);
  color:var(--ink,#1c2939); border:1px solid var(--line,#ddd);
  box-shadow:0 15px 44px rgba(0,0,0,.24);
}
.unsaved-form-decision h3 { font-size:19px; margin:0 0 12px; }
.unsaved-form-decision p { line-height:1.7; margin:0 0 22px; }
.unsaved-form-actions { display:flex; flex-wrap:wrap; gap:10px; }
.unsaved-form-actions .btn { flex:1 1 160px; min-height:44px; }
.unsaved-form-actions .btn:focus-visible { outline:3px solid currentColor; outline-offset:3px; }

/* Desktop-only read pending state: preserve the approved Overview shell. */
@media (width > 680px) {
  .reference-overview .overview-loading { min-height: 220px; padding: 32px; color: var(--muted); }
  [data-action="refresh"].refresh-pending { cursor: progress; opacity: .7; }
  [data-action="refresh"].refresh-pending svg { animation: desktop-refresh-spin 1.2s linear infinite; }
  @keyframes desktop-refresh-spin { to { transform: rotate(360deg); } }
}
@media (prefers-reduced-motion:reduce) {
  [data-action="refresh"].refresh-pending svg { animation: none; }
}


/* Shared, responsive database import workflow. */
.import-template-bar{display:flex;align-items:flex-end;gap:14px;background:#f7f8fa;padding:16px;border:1px solid var(--line);border-radius:12px;margin-bottom:16px}
.import-template-bar .form-field{flex:1;margin:0}.import-template-bar .btn{min-height:42px;white-space:nowrap}
.import-workspace{display:grid;gap:16px}.import-workspace .config-hint{margin:0}.import-upload{padding:18px;border:1px dashed #cbd2dc;border-radius:12px;display:grid;gap:14px}
.import-summary{display:flex;flex-wrap:wrap;gap:14px;padding:12px 0}.import-ready{color:var(--green)}.import-invalid{color:#b33620}
.import-table-wrap{overflow:auto;max-height:360px;border:1px solid var(--line);border-radius:8px}.import-table-wrap table{width:100%;border-collapse:collapse;text-align:left;font-size:12px}.import-table-wrap th,.import-table-wrap td{padding:10px;border-bottom:1px solid var(--line);min-width:90px;max-width:200px;overflow-wrap:anywhere}.import-table-wrap th{background:#f7f8fa;position:sticky;top:0}.import-table-wrap td small{display:block;margin-top:6px;color:var(--muted)}
.import-issues{padding:12px 16px;background:#fff4f0;border-radius:8px;color:#963a28}.import-issues p{margin:6px 0}.import-error{background:#fff4f0;color:#963a28;border-color:#f4c7bc}
.import-footer-actions{display:flex;flex-wrap:wrap;gap:8px}#import-guide summary{cursor:pointer;font-weight:600}#import-guide-content{margin-top:12px}#import-sheet-field[hidden]{display:none}
@media(max-width:600px){.import-template-bar{align-items:stretch;flex-direction:column}.import-footer-actions{width:100%}.import-footer-actions .btn{flex:1;min-width:110px}.dialog-footer:has(.import-footer-actions){flex-wrap:wrap}.dialog-footer:has(.import-footer-actions) .footer-note{width:100%}.import-upload{padding:12px}}
