#dashboardView {
  --dashboard-ink: #172747;
  --dashboard-muted: #61718b;
  --dashboard-line: #e6ecf4;
  --dashboard-blue: #146ef5;
  --dashboard-orange: #bd5700;
  display: grid;
  gap: 14px;
  min-width: 0;
  padding-bottom: 12px;
  color: var(--dashboard-ink);
}

#dashboardView[hidden] { display: none !important; }
#dashboardView > *,
#dashboardView .dashboard-analytics > *,
#dashboardView .dashboard-workbench > * { min-width: 0; }

#dashboardView h2,
#dashboardView h3,
#dashboardView p { margin: 0; }

#dashboardView h2 { font-size: 17px; line-height: 1.4; font-weight: 700; }
#dashboardView h3 { font-size: 15px; line-height: 1.4; font-weight: 650; }

#dashboardView .panel,
#dashboardView .quick-actions,
#dashboardView .dashboard-overview {
  margin: 0;
  padding: 17px 18px;
  border: 1px solid var(--dashboard-line);
  border-radius: 9px;
  background: #fff;
  box-shadow: none;
}

#dashboardView .panel-header {
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

#dashboardView .panel-header > div { min-width: 0; }
#dashboardView .eyebrow { display: none; }

#dashboardView .dashboard-link,
#dashboardView .dashboard-text-button,
#dashboardView .panel-header > .secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-shrink: 0;
  min-height: 30px;
  padding: 3px 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #1261cf;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: none;
}

#dashboardView .dashboard-link:hover,
#dashboardView .dashboard-text-button:hover,
#dashboardView .panel-header > .secondary-button:hover { color: #084baf; background: #f2f7ff; }
#dashboardView .dashboard-link img { width: 13px; height: 13px; }

#dashboardView button:focus-visible,
#dashboardView a:focus-visible,
#dashboardView input:focus-visible,
#dashboardView select:focus-visible,
#dashboardView .stat-card[role="button"]:focus-visible,
#dashboardView #dashboardOrderList:focus-visible {
  outline: 2px solid #146ef5;
  outline-offset: 3px;
}

#dashboardView .dashboard-overview { padding: 15px 18px 17px; }
#dashboardView .stats-panel-header { align-items: center; margin-bottom: 12px; }
#dashboardView .stats-panel-header h2 { font-size: 16px; }
#dashboardView .stats-panel-header > span { font-size: 12px; color: var(--dashboard-muted); }
#dashboardView .stats-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; }

#dashboardView .stat-card {
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  margin: 0;
  padding: 2px 16px;
  border: 0;
  border-left: 1px solid var(--dashboard-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#dashboardView .stat-card:first-child { border-left: 0; padding-left: 8px; }
#dashboardView .stat-card:last-child { padding-right: 0; }
#dashboardView .stat-card.clickable:hover { transform: none; background: #f8faff; box-shadow: none; }
#dashboardView .stat-card > div:last-child { min-width: 0; }
#dashboardView .stat-icon { flex: 0 0 34px; width: 34px; height: 34px; border: 0; border-radius: 9px; }
#dashboardView .stat-icon img { display: block; width: 24px; height: 24px; }
#dashboardView .stat-icon.stat-product { background: #f1edff; }
#dashboardView .stat-icon.stat-stock { background: #e8faf2; }
#dashboardView .stat-icon.stat-pending { background: #fff1e1; }
#dashboardView .stat-icon.stat-order { background: #e8f6ff; }
#dashboardView .stat-icon.warning-icon { background: #ffedf0; }
#dashboardView .stat-card span { color: var(--dashboard-muted); font-size: 12px; white-space: nowrap; }
#dashboardView .stat-card strong { margin: 5px 0 4px; font-size: clamp(24px, 2vw, 30px); line-height: 1.1; font-weight: 700; font-variant-numeric: tabular-nums; }
#dashboardView .stat-card p { color: var(--dashboard-muted); font-size: 12px; line-height: 1.4; white-space: nowrap; }
#dashboardView .stat-card p.warning { color: var(--dashboard-orange) !important; }

#dashboardView .dashboard-analytics {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1fr) minmax(0, 1.05fr) minmax(0, 1.35fr);
  gap: 14px;
  align-items: stretch;
}

#dashboardView .dashboard-analytics > .panel,
#dashboardView .dashboard-analytics > .quick-actions {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 280px;
  padding: 15px 16px;
}

#dashboardView .dashboard-analytics .section-title { margin: 0 0 10px; font-size: 16px; font-weight: 700; }
#dashboardView .dashboard-analytics .panel-header { margin-bottom: 10px; }
#dashboardView .dashboard-analytics h2 { font-size: 16px; }
#dashboardView .chart-body { flex: 1; min-width: 0; min-height: 0; width: 100%; }

#dashboardView .quick-grid { flex: 1; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 0; }
#dashboardView .quick-card {
  min-width: 0;
  margin: 0;
  padding: 8px 4px;
  gap: 6px;
  border: 0;
  border-bottom: 1px solid var(--dashboard-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transition: background .15s ease;
}

#dashboardView .quick-card:nth-child(odd) { border-right: 1px solid var(--dashboard-line); }
#dashboardView .quick-card:nth-last-child(-n+2) { border-bottom: 0; }
#dashboardView .quick-card:hover { transform: none; background: #f6f9fd; box-shadow: none; }
#dashboardView .quick-card span { color: var(--dashboard-ink); font-size: 13px; font-weight: 600; }
#dashboardView .quick-card > img { display: block; width: 26px; height: 26px; }
#dashboardView .quick-icon { width: 30px; height: 30px; border-radius: 0; background: transparent !important; }
#dashboardView .quick-icon img { display: block; width: 26px; height: 26px; }

#dashboardView .dashboard-category-body {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  flex: 1;
  min-height: 0;
  gap: 8px;
}

#dashboardView #chartCategory { grid-column: 1; grid-row: 1; height: 210px; }
#dashboardView #dashboardCategoryTotal {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: calc((100% - 8px) / 2.05);
  pointer-events: none;
}

#dashboardView #dashboardCategoryTotal strong { font-size: 23px; line-height: 1.2; font-weight: 700; font-variant-numeric: tabular-nums; }
#dashboardView #dashboardCategoryTotal span { margin-top: 5px; color: var(--dashboard-muted); font-size: 11px; }
#dashboardView #dashboardCategoryLegend { grid-column: 2; grid-row: 1; display: grid; align-content: center; gap: 7px; min-width: 0; margin: 0; padding: 0; list-style: none; }
#dashboardView .dashboard-category-legend-row { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--dashboard-ink); font-size: 12px; line-height: 1.5; }
#dashboardView .dashboard-category-swatch { flex: 0 0 7px; width: 7px; height: 7px; border-radius: 2px; background: var(--category-color); }
#dashboardView .dashboard-category-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#dashboardView .dashboard-category-count { flex-shrink: 0; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
#dashboardView .dashboard-category-empty { color: var(--dashboard-muted); font-size: 12px; text-align: center; }

#dashboardView .dashboard-trend-card .panel-header { flex-wrap: wrap; gap: 8px; }
#dashboardView .mini-range { gap: 0; padding: 0; border-color: var(--dashboard-line); border-radius: 6px; background: #f7f9fd; }
#dashboardView .mini-range-option { min-width: 48px; height: 28px; padding: 0 8px; border-radius: 5px; color: var(--dashboard-muted); font-size: 11px; }
#dashboardView .mini-range-option + .mini-range-option { border-left: 1px solid var(--dashboard-line); }
#dashboardView .mini-range-option.active { color: var(--dashboard-orange); background: #fff6e9; box-shadow: inset 0 0 0 1px #efb073; }
#dashboardView .mini-range-option:hover { color: var(--dashboard-orange); }

#dashboardView .dashboard-workbench { display: grid; grid-template-columns: minmax(0, 1.63fr) minmax(0, 1fr); gap: 14px; align-items: stretch; }
#dashboardView .dashboard-plan { display: flex; flex-direction: column; min-height: 510px; padding: 18px 20px; }
#dashboardView .dashboard-insights { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; gap: 14px; align-content: start; }
#dashboardView .dashboard-insights .insight-card { display: flex; flex-direction: column; min-width: 0; min-height: 0; width: 100%; padding: 16px 18px; }
#dashboardView .dashboard-insights .panel-header { margin-bottom: 8px; }

#dashboardView .dashboard-plan-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
#dashboardView .dashboard-plan-header h2 { font-size: 20px; }
#dashboardView .dashboard-plan > .panel-header { flex-wrap: wrap; margin-bottom: 14px; }
#dashboardView .dashboard-plan > .panel-header h2 { font-size: 20px; }
#dashboardView .dashboard-plan-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#dashboardView #dashboardPlanPeriod { display: inline-flex; padding: 0; border: 1px solid var(--dashboard-line); border-radius: 6px; background: #fff; }
#dashboardView #dashboardPlanPeriod button { min-width: 48px; height: 34px; padding: 0 13px; border: 0; border-radius: 5px; color: var(--dashboard-muted); background: transparent; font-size: 13px; }
#dashboardView #dashboardPlanPeriod button + button { border-left: 1px solid var(--dashboard-line); }
#dashboardView #dashboardPlanPeriod button.active,
#dashboardView #dashboardPlanPeriod button[aria-pressed="true"] { color: var(--dashboard-orange); background: #fff6e9; box-shadow: inset 0 0 0 1px #efb073; }
#dashboardView .dashboard-plan-date { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
#dashboardView .dashboard-plan-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
#dashboardView .dashboard-plan-toolbar .dashboard-plan-date { gap: 8px; margin-bottom: 0; }
#dashboardView .dashboard-plan-toolbar #dashboardPlanSettings { margin-left: auto; }
#dashboardView #dashboardPlanPrev,
#dashboardView #dashboardPlanNext { display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 6px; background: #f4f7fb; color: var(--dashboard-ink); }
#dashboardView #dashboardPlanPrev img,
#dashboardView #dashboardPlanNext img { width: 18px; height: 18px; }
#dashboardView #dashboardPlanLabel { min-width: 118px; font-size: 16px; font-weight: 650; text-align: center; }
#dashboardView #dashboardPlanStatus { margin-left: 10px; color: var(--dashboard-orange); font-size: 12px; }
#dashboardView #dashboardPlanSettings { min-height: 30px; padding: 4px 8px; border: 0; border-radius: 5px; background: transparent; color: var(--dashboard-muted); font-size: 12px; }
#dashboardView #dashboardPlanSettings:hover { background: #f4f7fb; color: var(--dashboard-ink); }
#dashboardView #dashboardPlanBody { flex: 0 0 auto; min-width: 0; }
#dashboardView .dashboard-plan-item { padding: 17px 0 19px; border-bottom: 1px solid var(--dashboard-line); }
#dashboardView .plan-item-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
#dashboardView .plan-item-header > div:first-child { min-width: 0; }
#dashboardView .plan-product-name { font-size: 16px; font-weight: 650; overflow-wrap: anywhere; }
#dashboardView .plan-sku-name { margin-left: 5px; font-size: 13px; color: var(--dashboard-muted); overflow-wrap: anywhere; }
#dashboardView .plan-quantity { display: inline-flex; align-items: baseline; gap: 5px; flex-shrink: 0; color: var(--dashboard-ink); font-size: 12px; white-space: nowrap; }
#dashboardView .plan-quantity > span:first-child { color: var(--dashboard-muted); }
#dashboardView .plan-quantity strong { font-size: 24px; line-height: 1.2; font-weight: 700; font-variant-numeric: tabular-nums; }
#dashboardView .plan-quantity small { color: var(--dashboard-ink); font-size: 12px; font-weight: 500; }
#dashboardView .plan-milestones { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
#dashboardView .plan-milestones::before { position: absolute; top: 6px; left: 16.666%; right: 16.666%; height: 1px; background: #d7e0ed; content: ""; }
#dashboardView .plan-milestone { --milestone-color: #146ef5; position: relative; min-width: 0; text-align: center; }
#dashboardView .plan-milestone.purchase { --milestone-color: #e87900; }
#dashboardView .plan-milestone.arrival { --milestone-color: #00a875; }
#dashboardView .plan-milestone::before { position: relative; z-index: 1; display: block; width: 13px; height: 13px; margin: 0 auto 8px; border: 2px solid var(--milestone-color); border-radius: 50%; background: #fff; content: ""; }
#dashboardView .milestone-label { display: block; color: var(--dashboard-muted); font-size: 13px; line-height: 1.5; }
#dashboardView .milestone-value { display: block; margin-top: 3px; color: var(--dashboard-ink); font-size: 13px; line-height: 1.5; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
#dashboardView .dashboard-plan-empty { display: grid; place-content: center; min-height: 205px; padding: 30px 15px; gap: 8px; color: var(--dashboard-muted); text-align: center; font-size: 13px; line-height: 1.6; }
#dashboardView .dashboard-plan-empty strong { color: var(--dashboard-ink); font-size: 15px; font-weight: 600; }
#dashboardView .dashboard-procurement { margin-top: 12px; }
#dashboardView .dashboard-procurement h3 { margin-bottom: 9px; }
#dashboardView .dashboard-procurement .dashboard-plan-empty { min-height: 80px; padding: 18px 8px; }
#dashboardView #dashboardProcurementList { min-width: 0; overflow-x: auto; }
#dashboardView .dashboard-table-scroll { min-width: 0; overflow-x: auto; }
#dashboardView .dashboard-procurement-table { width: 100%; min-width: 0; max-width: 100%; border-collapse: collapse; table-layout: fixed; color: var(--dashboard-ink); font-size: 12px; }
#dashboardView .dashboard-procurement-table th { padding: 7px 8px; color: var(--dashboard-muted); background: #f5f8fc; font-size: 12px; font-weight: 500; text-align: left; white-space: normal; overflow-wrap: anywhere; }
#dashboardView .dashboard-procurement-table td { padding: 9px 8px; border-bottom: 1px solid var(--dashboard-line); line-height: 1.5; white-space: normal; overflow-wrap: anywhere; }
#dashboardView .dashboard-procurement-table th:first-child { width: 36%; }
#dashboardView .dashboard-procurement-table th:nth-child(2) { width: 22%; }
#dashboardView .dashboard-procurement-table th:nth-child(3),
#dashboardView .dashboard-procurement-table th:last-child { width: 21%; }
#dashboardView .dashboard-procurement-table td:nth-child(2) { font-variant-numeric: tabular-nums; }
#dashboardView .dashboard-plan-unit { color: var(--dashboard-muted); font-size: 11px; font-weight: 400; }
#dashboardView .dashboard-procurement-empty { padding: 18px 8px; color: var(--dashboard-muted); font-size: 12px; }
#dashboardView .dashboard-plan-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
#dashboardView .dashboard-plan-footer > span,
#dashboardView .dashboard-plan-footer > p { color: var(--dashboard-muted); font-size: 12px; }
#dashboardView .dashboard-plan-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
#dashboardView .dashboard-plan-inline-warning { display: block; margin-top: 10px; color: #b53b32; font-size: 12px; line-height: 1.5; }
#dashboardView .dashboard-plan-more { margin-top: 10px; padding: 4px 7px; }
#dashboardView .dashboard-plan-details { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--dashboard-line); color: var(--dashboard-muted); font-size: 12px; line-height: 1.6; }
#dashboardView .dashboard-plan-details[hidden] { display: none; }
#dashboardView .dashboard-plan-details summary { cursor: pointer; }
#dashboardView .dashboard-plan-details ul { margin: 8px 0 0; padding-left: 18px; }
#dashboardView #dashboardPlanGenerate,
#dashboardView .dashboard-plan-actions .primary-button { min-height: 36px; padding: 8px 16px; border: 1px solid #bd5700; border-radius: 6px; color: #fff; background: #bd5700; box-shadow: none; font-size: 13px; font-weight: 600; }
#dashboardView #dashboardPlanGenerate:hover,
#dashboardView .dashboard-plan-actions .primary-button:hover { border-color: #a64c00; background: #a64c00; }
#dashboardView button:disabled { cursor: not-allowed; color: #66758a; border-color: #dce3ec; background: #f2f5f9; box-shadow: none; }

#dashboardView .dashboard-list { min-width: 0; gap: 0; margin: 0; }
#dashboardView #dashboardOrderList,
#dashboardView #dashboardStockList { min-width: 0; max-width: 100%; max-height: 220px; overflow-y: auto; overflow-x: auto; scrollbar-width: thin; scrollbar-color: #c4cedc transparent; }
#dashboardView #dashboardOrderList::-webkit-scrollbar,
#dashboardView #dashboardStockList::-webkit-scrollbar { width: 5px; }
#dashboardView #dashboardOrderList::-webkit-scrollbar-thumb,
#dashboardView #dashboardStockList::-webkit-scrollbar-thumb { border-radius: 4px; background: #c4cedc; }
#dashboardView .dashboard-list-empty { min-height: 140px; padding: 20px 8px; color: var(--dashboard-muted); font-size: 13px; }
#dashboardView .dashboard-list-item { min-width: 0; flex-shrink: 0; align-items: center; gap: 12px; padding: 12px 0; border: 0; border-bottom: 1px solid var(--dashboard-line); border-radius: 0; background: transparent; }
#dashboardView .dashboard-list-item:last-child { border-bottom: 0; }
#dashboardView .dashboard-list-item:hover { background: #f8faff; }
#dashboardView .dashboard-list-main { flex: 1; min-width: 0; gap: 6px; }
#dashboardView .dashboard-list-title { color: var(--dashboard-ink); font-size: 14px; font-weight: 600; line-height: 1.4; }
#dashboardView .dashboard-list-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; color: var(--dashboard-muted); font-size: 12px; line-height: 1.4; }
#dashboardView .dashboard-order-code { overflow-wrap: anywhere; }
#dashboardView .dashboard-order-date { white-space: nowrap; }
#dashboardView .dashboard-status { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; max-width: 30%; padding: 0; color: var(--dashboard-muted); background: transparent; font-size: 12px; white-space: normal; overflow-wrap: anywhere; }
#dashboardView .dashboard-status-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: currentColor; }
#dashboardView .dashboard-status.tag-danger { color: #c23835; }
#dashboardView .dashboard-status.tag-warning { color: #b65a00; }
#dashboardView .dashboard-status.tag-success,
#dashboardView .dashboard-status.tag-progress { color: #008561; }
#dashboardView .dashboard-status.tag-review { color: #1464d1; }
#dashboardView .dashboard-stock-table { width: 100%; min-width: 0; max-width: 100%; border-collapse: collapse; table-layout: fixed; color: var(--dashboard-ink); font-size: 12px; }
#dashboardView .dashboard-stock-table th { padding: 8px 6px; background: #f5f8fc; color: var(--dashboard-muted); font-size: 12px; font-weight: 500; line-height: 1.4; text-align: center; white-space: normal; overflow-wrap: anywhere; }
#dashboardView .dashboard-stock-table th:first-child { width: 43%; text-align: left; }
#dashboardView .dashboard-stock-table th:not(:first-child) { width: 19%; }
#dashboardView .dashboard-stock-table td { padding: 10px 6px; border-bottom: 1px solid var(--dashboard-line); text-align: center; line-height: 1.4; font-variant-numeric: tabular-nums; white-space: normal; overflow-wrap: anywhere; }
#dashboardView .dashboard-stock-table td:first-child { text-align: left; font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
#dashboardView .dashboard-stock-table .dashboard-stock-gap { color: var(--dashboard-orange); font-weight: 600; }
#dashboardView .dashboard-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

#dashboardPlanSettingsDialog { width: min(570px, calc(100vw - 36px)); max-height: calc(100vh - 40px); margin: auto; padding: 22px; overflow-y: auto; border: 1px solid #e0e7f1; border-radius: 12px; background: #fff; color: #172747; box-shadow: 0 18px 60px rgba(23, 39, 71, .2); }
#dashboardPlanSettingsDialog::backdrop { background: rgba(23, 39, 71, .38); }
#dashboardPlanSettingsDialog .panel-header { align-items: center; margin-bottom: 20px; }
#dashboardPlanSettingsDialog h2 { margin: 0; font-size: 18px; }
#dashboardPlanSettingsDialog .dashboard-plan-arrow { display: inline-grid; place-items: center; flex-shrink: 0; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 6px; background: #f4f7fb; color: #172747; }
#dashboardPlanSettingsDialog .dashboard-plan-arrow img { width: 18px; height: 18px; }
#dashboardPlanSettingsDialog .dashboard-plan-settings-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
#dashboardPlanSettingsDialog label { display: grid; gap: 8px; min-width: 0; color: #61718b; font-size: 12px; }
#dashboardPlanSettingsDialog input { width: 100%; min-width: 0; height: 38px; padding: 8px 10px; border: 1px solid #dce4ef; border-radius: 6px; background: #fff; color: #172747; font-size: 14px; font-variant-numeric: tabular-nums; }
#dashboardPlanSettingsDialog .dashboard-plan-settings-note { margin: 15px 0 0; color: #61718b; font-size: 12px; line-height: 1.6; }
#dashboardPlanSettingsDialog .dashboard-plan-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }
#dashboardPlanSettingsDialog .dashboard-plan-dialog-actions button { min-height: 36px; padding: 8px 16px; border-radius: 6px; font-size: 13px; box-shadow: none; }
#dashboardPlanSettingsDialog .secondary-button { border: 1px solid #dce4ef; color: #52627b; background: #fff; }
#dashboardPlanSettingsDialog .primary-button { border: 1px solid #bd5700; color: #fff; background: #bd5700; }
#dashboardPlanSettingsDialog .primary-button:hover { border-color: #a64c00; background: #a64c00; }
#dashboardPlanSettingsDialog button:focus-visible,
#dashboardPlanSettingsDialog input:focus-visible { outline: 2px solid #146ef5; outline-offset: 3px; }

@media (max-width: 1279px) {
  #dashboardView .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 18px; }
  #dashboardView .stat-card:nth-child(4) { border-left: 0; padding-left: 8px; }
  #dashboardView .dashboard-analytics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #dashboardView .dashboard-workbench { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }
  #dashboardView .plan-item-header { align-items: flex-start; flex-wrap: wrap; gap: 8px; }
  #dashboardView .dashboard-plan-header { align-items: flex-start; flex-wrap: wrap; }
}

@media (max-width: 1000px) {
  #dashboardView .dashboard-workbench { grid-template-columns: 1fr; }
  #dashboardView .dashboard-insights { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  #dashboardView .dashboard-plan { min-height: 0; }
  #dashboardView .stat-card { padding-left: 10px; padding-right: 10px; }
}

@media (max-width: 700px) {
  #dashboardView { gap: 12px; }
  #dashboardView .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #dashboardView .stat-card:nth-child(odd) { border-left: 0; padding-left: 4px; }
  #dashboardView .stat-card:nth-child(even) { border-left: 1px solid var(--dashboard-line); padding-left: 12px; }
  #dashboardView .stat-card span,
  #dashboardView .stat-card p { white-space: normal; }
  #dashboardView .stat-card { gap: 8px; }
  #dashboardView .stat-icon { flex-basis: 28px; width: 28px; height: 28px; }
  #dashboardView .stat-card strong { font-size: 24px; }
  #dashboardView .dashboard-analytics,
  #dashboardView .dashboard-insights { grid-template-columns: 1fr; }
  #dashboardView .dashboard-analytics > .panel,
  #dashboardView .dashboard-analytics > .quick-actions { height: 280px; }
  #dashboardView .dashboard-plan { padding: 16px; }
  #dashboardView .dashboard-plan-header h2 { font-size: 18px; }
  #dashboardView .dashboard-plan-controls { width: 100%; justify-content: space-between; }
  #dashboardView #dashboardPlanPeriod button { min-width: 44px; padding: 0 11px; }
  #dashboardView .plan-product-name { font-size: 15px; }
  #dashboardView .plan-sku-name { display: block; margin: 4px 0 0; }
  #dashboardView .plan-milestones { gap: 6px; }
  #dashboardView .milestone-label,
  #dashboardView .milestone-value { font-size: 11px; }
  #dashboardView .dashboard-stock-table th:first-child { width: 40%; }
  #dashboardView .dashboard-stock-table th:not(:first-child) { width: 20%; }
  #dashboardPlanSettingsDialog .dashboard-plan-settings-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  #dashboardView .quick-card,
  #dashboardView .stat-card,
  #dashboardView .mini-range-option,
  #dashboardView .dashboard-list-item { transition: none; }
}
