/* Desktop content density follows the approved schedule console.
 * Loaded only by index.html; schedule-v2 and /m/ keep their own presentation.
 * Chart options, route state and form behavior are unchanged.
 */
#view {
  --content-gap: 24px;
  --content-padding: 24px;
  --content-radius: 20px;
  font-size: 14px;
}

#view .card {
  padding: var(--content-padding) !important; /* Legacy templates set compact inline padding. */
  border-radius: var(--content-radius);
  box-shadow: 0 1px 2px rgba(52, 53, 55, .04), 0 12px 32px rgba(52, 53, 55, .06);
}
#view > .card, #view #qcBody > .card, #view .da-card {
  margin-block: 0 var(--content-gap) !important;
}
#view .grid-cards {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: var(--content-gap);
  margin-block: 0 var(--content-gap);
}
#view #statCards { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
#view .dashboard-columns { grid-template-columns: minmax(0, 1fr); gap: var(--content-gap); margin-top: var(--content-gap); }
#view .dashboard-columns > div:last-child { gap: var(--content-gap) !important; }
#view .dashboard-section-title { font-size: 20px; font-weight: 680; line-height: 1.2; }
#view .dashboard-section-title { margin: 0 0 12px; }
#view #miniCal { font-size: 13px; }
#view #miniCal [style*="font-size:11px"] { font-size: 12px !important; }
#view .card-title, #view .desktop-section-title {
  display: block;
  color: var(--gc-text);
  font-size: 20px;
  font-weight: 680;
  line-height: 1.2;
  margin-bottom: 16px;
}
#view .card-value { font-size: 28px; line-height: 1.2; margin-top: 8px; }
#view :is(#statCards, #qpKpi, #qcKpi) > .card { min-height: 120px; }
#view :is(#statCards, #qpKpi, #qcKpi) .card-title { font-size: 13px; margin-bottom: 8px; }
#view .desktop-metric { font-size: 28px; font-weight: 650; line-height: 1.2; }
#view .desktop-metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 24px; }
#view .desktop-metric-cell { padding: 24px; border-radius: 20px; background: var(--gc-canvas); }
#view .empty { font-size: 13px; line-height: 1.6; }
#view .an-muted { font-size: 12px; line-height: 1.6; }
.dashboard-live-status { display: inline-flex; align-items: center; gap: 6px; margin-inline-start: 6px; color: var(--gc-text); font-size: 12px; font-weight: 700; line-height: 1.3; letter-spacing: .04em; vertical-align: middle; }
.dashboard-live-status::before { width: 6px; height: 6px; flex: none; border-radius: 50%; background: var(--gc-gold); content: ''; }
#view :is(#todayScheduleCard, #myTodayCard, #myTodoCard, #calendarCard, #myCalendarCard) { margin-bottom: 24px; }
#dashboardDetailDialog .modal { width: min(520px, calc(100vw - 24px)) !important; max-height: 86vh; margin: 12px; padding: 24px; border-radius: 20px; }
#dashboardDetailDialog :focus-visible { outline: 2px solid rgba(201, 162, 39, .72); outline-offset: 2px; }

/* Filters share the page canvas instead of consuming another raised card. */
#view .desktop-filter-bar {
  padding: 0 0 20px !important;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  margin-bottom: 0 !important;
}
#view :is(.btn, .an-chip, .an-sel) {
  min-height: 38px;
  height: auto !important;
  font-size: 13px !important;
  line-height: 1.4;
  padding: 8px 14px;
}
#view :is(input[type="date"], input[type="text"], input[type="number"], input[type="password"], input[type="email"], select):not(.gc-select-native-hidden) {
  min-height: 38px;
  height: auto !important;
  max-width: 100%;
  font-size: 13px;
  border: 1px solid var(--gc-border);
  border-radius: 12px;
  padding: 8px 12px;
  background: var(--gc-surface);
  color: var(--gc-text);
}
#view .table { font-size: 13px; line-height: 1.5; }
#view .table :is(th, td) { padding: 12px; }
#view .table .btn { min-height: 32px; padding: 5px 10px; }
#view .desktop-data-table :is(th, td) { padding: 12px !important; }
#view .desktop-data-table { min-width: 640px; }

/* Live modules previously reintroduced a compact, separately padded dashboard. */
#view .lv-root {
  --bg: var(--gc-canvas);
  --card: var(--gc-surface);
  --text: var(--gc-text);
  --t2: var(--gc-secondary);
  --t3: var(--gc-tertiary);
  --border: var(--gc-border);
  --radius: 20px;
  font-family: var(--gc-font);
  font-size: 14px;
  background: transparent;
}
#view .lv-root .main { padding: 20px 0 40px; }
#view .lv-root .lv-toolbar { padding: 20px 0 0; flex-wrap: wrap; }
#view .lv-root .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-bottom: 24px; }
#view .lv-root .lv-skel-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-bottom: 24px; }
#view .lv-root .lv-skel-kpis .lv-skel { height: 120px; }
#view .lv-root .lv-skel-grid { gap: 24px; margin-bottom: 24px; }
#view .lv-root .kpi { min-height: 120px; padding: 24px; border-radius: 20px; }
#view .lv-root .kpi .kl { font-size: 13px; margin-bottom: 8px; color: var(--gc-secondary); }
#view .lv-root .kpi .kv { font-size: 28px; line-height: 1.2; color: var(--gc-text); }
#view .lv-root .kpi .ks { font-size: 12px; line-height: 1.5; margin-top: 8px; }
#view .lv-root :is(.g2, .g21, .g3, .g32, .g13) { gap: 24px; margin-bottom: 24px; }
#view .lv-root .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#view .lv-root :is(.g2, .g21, .g3, .g32, .g13) > * { min-width: 0; }
#view .lv-root .card .ct { font-size: 20px; line-height: 1.35; margin-bottom: 20px; padding-bottom: 0; border-bottom: 0; flex-wrap: wrap; }
#view .lv-root .card .ct::before { display: none; }
#view .lv-root .ct-note { font-size: 12px; }
#view .lv-root .cal { padding: 24px; margin-bottom: 24px; }
#view .lv-root .cal-nav .cn-t { font-size: 20px; }
#view .lv-root .cal-grid { font-size: 13px; gap: 6px; }
#view .lv-root .cal-grid .cc { min-height: 64px; padding: 10px 4px; }
#view .lv-root .cal-grid .cc .cl { font-size: 12px; }
#view .lv-root :is(.htbl, .ptbl, .sys-rec) { font-size: 13px; }
#view .lv-root :is(.htbl, .ptbl, .sys-rec) :is(th, td) { padding: 12px; }
#view .lv-root .htbl tr.sub td { font-size: 13px; }
#view .lv-root :is(.qc-chip, .sys-bind, .qc-auth-card) { padding: 24px; border-radius: 20px; }
#view .lv-root .qc-chip { flex: 1 1 220px; font-size: 13px; }
#view .lv-root .qc-chip b { font-size: 28px; color: var(--gc-text); margin-top: 8px; }
#view .lv-root .qc-auth-card h3 { font-size: 20px; }
#view .lv-root .sys-bind .sb-name { font-size: 17px; }
#view .lv-root :is(.lv-badge, .hbadge, .integrity-strip) { font-size: 12px; }

/* Human-readable object lists and analysis surfaces use the same proportions. */
#view .cr-body { gap: 24px; }
#view .cr-tree { border: 0; border-radius: 20px; padding-block: 16px; align-self: flex-start; }
#view .cr-tree :is(.tt-body_part, .tt-cat, .tt-link) { min-height: 38px; padding-block: 9px; font-size: 13px; }
#view .cr-tree :is(.tt-cnt, .cr-tree-title) { font-size: 12px; }
#view .cr-content { padding: 0; }
#view .cr-content h2 { margin-bottom: 20px; line-height: 1.35; }
#view .cr-content h3 { font-size: 17px; margin-bottom: 12px; }
#view .cr-content h4 { font-size: 17px; margin-bottom: 10px; }
#view .cr-kpis { grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 20px; margin-bottom: 24px; }
#view .cr-kpi { padding: 24px; min-height: 120px; border-radius: 20px; text-align: left; }
#view .cr-kpi .cr-kv { font-size: 28px; }
#view .cr-kpi .cr-kl { font-size: 13px; margin-top: 8px; }
#view .cr-card { border-radius: 20px; padding: 24px; margin-bottom: 24px; }
#view .cr-card .cr-ct { font-size: 17px; line-height: 1.4; margin-bottom: 16px; }
#view .cr-card .cr-cs { font-size: 12px; }
#view :is(.cr-g2, .cr-g3, .cr-g21) { gap: 24px; margin-bottom: 24px; }
#view .cr-g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#view :is(.cr-g2, .cr-g3, .cr-g21) > * { min-width: 0; }
#view :is(.cr-tbl, .cr-fmtbl) { font-size: 13px; }
#view :is(.cr-tbl, .cr-fmtbl) :is(th, td) { padding: 12px; }
#view .cr-pill { min-height: 36px; padding: 8px 14px; font-size: 13px; }

@media (max-width: 1000px) {
  #view #statCards { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  #view .lv-root :is(.g2, .g21, .g3, .g32, .g13), #view :is(.cr-g2, .cr-g3, .cr-g21) { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  #view { --content-padding: 20px; --content-gap: 20px; }
  #view .lv-root .kpis { grid-template-columns: minmax(0, 1fr); }
  #view .lv-root .lv-skel-kpis { grid-template-columns: minmax(0, 1fr); }
  #view .lv-root .lv-toolbar select { min-width: 0; }
  #view .cr-tree { width: 100%; max-height: 240px; margin-bottom: 24px; }
  #view .cr-card { padding: 20px; }
  #view #qpAcc { min-width: 0 !important; width: 100%; margin-left: 0 !important; }
  #view .desktop-filter-bar label { max-width: 100%; }
  #view .desktop-filter-bar label:has(#qpAcc) { width: 100%; }
}

/* Desktop live data: one typography hierarchy, including legacy inline notes. */
#view .lv-root { --t3: #6E6E73; font-variant-numeric: tabular-nums; }
#view .lv-root .card .ct { font-weight: 680; line-height: 1.2; letter-spacing: -.02em; }
#view .lv-root :is([style*="font-size:9px"], [style*="font-size:10px"], [style*="font-size:11px"]) { font-size: 12px !important; line-height: 1.55; }
#view .lv-root .card .ct > span:not([id]) { letter-spacing: normal; }
#view .lv-root :is(.lv-toolbar, .qc-toolbar) :is(input, select, button) { min-height: 40px; border-radius: 12px; font: 13px var(--gc-font); }
#view .lv-root .platform-summary-note { display: block; margin: 8px 0 20px; font-size: 12px; line-height: 1.55; color: var(--gc-secondary); }
#view .lv-root .platform-summary { overflow: visible; color: var(--gc-text); }
#view .lv-root .platform-summary .ct { color: var(--gc-text); }
#view .lv-root .platform-summary-note { font-weight: 400; }
#view .lv-root .platform-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
#view .lv-root .platform-metric { min-width: 0; padding: 20px; border-radius: 16px; background: var(--gc-canvas); }
#view .lv-root .platform-metric-label { margin-bottom: 8px; font-size: 12px; color: var(--gc-secondary); }
#view .lv-root .platform-metric-value { font-size: 28px; font-weight: 650; line-height: 1.2; color: var(--gc-text); overflow-wrap: anywhere; }
#view .lv-root .platform-register-scroll { max-width: 100%; margin-top: 20px; overflow-x: auto; }
#view .lv-root .platform-register-table { width: 100%; min-width: 780px; border-collapse: collapse; font-size: 13px; line-height: 1.55; }
#view .lv-root .platform-register-table :is(th, td) { padding: 12px !important; border-bottom: 1px solid var(--gc-border); }
#view .lv-root .platform-register-table th { font-weight: 600 !important; color: var(--gc-secondary); background: var(--gc-canvas); }
#view .lv-root .platform-register-table td:last-child { font-size: 12px; }
#view .lv-root .merged-banner { background: var(--gc-canvas) !important; color: var(--gc-text) !important; padding: 12px 16px; border-radius: 12px; }
@media (max-width: 760px) {
  #view .lv-root .platform-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  #view .lv-root .platform-metric { padding: 16px; }
}
@media (max-width: 480px) {
  #view .lv-root .platform-metrics { grid-template-columns: minmax(0, 1fr); }
}
