/* Desktop-specific density; the mobile navigation and forms keep their own styles. */
@media (min-width: 1024px) {
  .app-shell { grid-template-columns: 224px minmax(0, 1fr); }
  .desktop-sidebar { width: 224px; padding: 16px 12px; gap: 12px; }
  .desktop-sidebar .brand { font-size: 17px; }
  .desktop-sidebar .sidebar-role { padding: 10px; }
  .desktop-sidebar .sidebar-role small { font-size: 11px; }
  .desktop-sidebar .side-link, .desktop-sidebar .nav-group > summary { min-height: 42px; padding: 9px 10px; font-size: 13px; }
  .desktop-sidebar .workspace-indicator { padding: 10px; }
  .topbar { min-height: 68px; padding: 12px 24px; }
  .topbar-title h1 { font-size: 18px; }
  .content { max-width: 1800px; margin-inline: auto; padding: 24px; }
  .queue-page, .inbox-page { max-width: none; }
  .management-users-table { font-size: 13px; }
  .management-users-table th, .management-users-table td { padding-block: 14px; }
  .desktop-dashboard { display: block; min-width: 0; color: #17282c; font-size: 13px; letter-spacing: 0; }
  .desktop-dashboard *, .desktop-dashboard *::before, .desktop-dashboard *::after { box-sizing: border-box; letter-spacing: 0; }
  .desktop-dashboard button, .desktop-dashboard input, .desktop-dashboard select { font: inherit; }
  .desktop-dashboard button { cursor: pointer; }
  .desktop-dashboard button:disabled { opacity: .45; cursor: default; }
  .desktop-dashboard :focus-visible { outline: 2px solid #00877d; outline-offset: 3px; }
  .desktop-dashboard .icon { width: 18px; height: 18px; flex-shrink: 0; }
  .desktop-dashboard h2, .desktop-dashboard h3, .desktop-dashboard h4 { margin: 0; font-weight: 750; line-height: 1.7; }
  .desktop-dashboard h2 { font-size: 25px; }
  .desktop-dashboard h3 { font-size: 17px; }
  .desktop-dashboard h4 { font-size: 13px; }
  .desktop-dashboard p { margin: 3px 0 0; }
  .dd-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 20px; }
  .dd-header p, .dd-header > div > span { color: #65767b; font-size: 12px; }
  .dd-header-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
  .dd-header-actions .button { width: auto; flex: 0 0 auto; min-height: 44px; padding: 10px 16px; border-radius: 6px; box-shadow: none; }
  .dd-header-actions .icon-button { background: #fff; border: 1px solid #d6dfe1; border-radius: 6px; width: 44px; height: 44px; }
  .dd-freshness { color: #65767b; font-size: 11px; }
  .dd-data-warning { display: flex; gap: 10px; align-items: center; padding: 12px 16px; background: #fff3d9; color: #775511; margin-bottom: 16px; border-inline-start: 3px solid #c69022; }
  .dd-kpis { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); background: #fff; border-block: 1px solid #d6dfe1; margin-bottom: 24px; }
  .dd-kpi { text-align: right; border: 0; border-inline-end: 1px solid #e3e8e9; background: transparent; padding: 16px 18px 12px; min-width: 0; display: grid; gap: 8px; }
  .dd-kpi:last-child { border-inline-end: 0; }
  .dd-kpi:hover { background: #f5f9f9; }
  .dd-kpi-label { display: flex; gap: 7px; align-items: center; min-height: 32px; font-size: 12px; color: #62777e; }
  .dd-kpi strong { font-size: 29px; line-height: 1.25; font-variant-numeric: tabular-nums; }
  .dd-kpi .teal { color: #007b73; } .dd-kpi .red { color: #b14943; } .dd-kpi .amber { color: #97691b; } .dd-kpi .blue { color: #426d9b; }
  .dd-kpi-link { font-size: 10px; color: #73878a; display: flex; justify-content: space-between; align-items: center; }
  .dd-kpi-link .icon { width: 12px; height: 12px; }
  .dd-section { background: #fff; border-block: 1px solid #d6dfe1; padding: 18px 20px; min-width: 0; }
  .dd-section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
  .dd-section-head p { color: #6a7b80; font-size: 11px; }
  .dd-control { display: flex; gap: 10px; align-items: center; color: #62767b; font-size: 11px; }
  .desktop-dashboard select { background: #fff; color: #243b40; border: 1px solid #d6dfe1; border-radius: 5px; padding: 8px 10px; min-height: 40px; width: auto; min-width: 130px; }
  .dd-analysis-totals { display: grid; grid-template-columns: 1.3fr 1fr 1fr .7fr; border-block: 1px solid #e3e8e9; padding-block: 12px; margin-bottom: 18px; gap: 16px; }
  .dd-analysis-totals > div { display: grid; gap: 4px; min-width: 0; }
  .dd-analysis-totals span { font-size: 11px; color: #6a7b80; }
  .dd-analysis-totals strong { font-size: 16px; overflow-wrap: anywhere; }
  .dd-analysis-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(200px, 1fr); gap: 26px; }
  .dd-chart-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 16px; }
  .dd-legend { display: flex; gap: 16px; }
  .dd-legend > span { display: flex; align-items: center; gap: 5px; font-size: 11px; }
  .dd-dot { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
  .dd-dot.teal, .dd-bar-goods { background: #16877d; }
  .dd-dot.blue, .dd-bar-service { background: #698ebc; }
  .dd-trend { display: flex; direction: ltr; gap: 12px; height: 228px; }
  .dd-axis { display: flex; flex-direction: column; justify-content: space-between; height: 184px; font-size: 10px; color: #7a8a8f; min-width: 65px; text-align: right; padding-bottom: 1px; }
  .dd-plot { flex: 1; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; min-width: 0; background: repeating-linear-gradient(to top, transparent 0 91px, #e9eeef 91px 92px); background-size: 100% 184px; background-repeat: no-repeat; }
  .dd-column { min-width: 0; }
  .dd-bar-space { height: 184px; display: flex; justify-content: center; align-items: flex-end; border-bottom: 1px solid #c8d4d7; }
  .dd-stacked-bar { width: min(48px, 85%); min-height: 0; display: flex; flex-direction: column; position: relative; border-radius: 3px 3px 0 0; }
  .dd-stacked-bar > span:not(.dd-chart-tooltip) { min-height: 0; flex-basis: 0; }
  .dd-stacked-bar:hover, .dd-stacked-bar:focus { filter: brightness(.94); }
  .dd-chart-tooltip { display: none; z-index: 5; position: absolute; bottom: 100%; margin-bottom: 8px; inset-inline-start: 50%; transform: translateX(-50%); width: max-content; max-width: 250px; padding: 10px 12px; border-radius: 5px; background: #20373e; color: #fff; font-size: 11px; direction: rtl; text-align: right; box-shadow: 0 4px 10px #16323918; }
  .dd-stacked-bar:hover .dd-chart-tooltip, .dd-stacked-bar:focus .dd-chart-tooltip { display: block; }
  .dd-x-label { display: block; text-align: center; font-size: 10px; line-height: 1.6; color: #657b82; padding-top: 8px; direction: rtl; white-space: nowrap; }
  .dd-vendors { border-inline-start: 1px solid #e3e8e9; padding-inline-start: 24px; }
  .dd-vendor { margin-top: 12px; }
  .dd-vendor > div:first-child { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
  .dd-vendor strong { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .dd-vendor span { color: #7d8f92; font-size: 10px; flex-shrink: 0; }
  .dd-vendor b { display: block; font-size: 10px; color: #52686e; margin-top: 3px; }
  .dd-vendor-track { height: 5px; background: #eff3f4; margin-top: 6px; border-radius: 2px; overflow: hidden; }
  .dd-vendor-track i { display: block; background: #91aaa6; height: 100%; }
  .dd-data-note { font-size: 11px; color: #927022; padding-top: 12px; }
  .dd-empty { display: flex; align-items: center; justify-content: center; min-height: 120px; color: #7b8c90; font-size: 12px; padding: 24px; text-align: center; }
  .dd-purchase-details { margin-top: 16px; border-top: 1px solid #e3e8e9; }
  .dd-purchase-details > summary { font-size: 12px; padding-block: 14px 4px; cursor: pointer; color: #197d75; }
  .dd-operations { display: grid; grid-template-columns: minmax(0, 2.3fr) minmax(260px, 1fr); gap: 24px; margin-top: 24px; align-items: start; }
  .dd-operations.dd-single { grid-template-columns: minmax(0, 1fr); }
  .dd-exceptions { display: grid; gap: 24px; min-width: 0; }
  .dd-work-mix .dd-stage-chart { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 32px; }
  .dd-work { padding-inline: 0; }
  .dd-work .dd-section-head, .dd-work-controls { padding-inline: 18px; }
  .dd-text-button { border: 0; background: transparent; padding: 8px 0; color: #007a72; font-weight: 700; font-size: 11px !important; }
  .dd-work-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
  .dd-search { display: flex; gap: 6px; align-items: center; flex: 1 1 230px; border: 1px solid #d6dfe1; border-radius: 5px; padding-inline: 10px; color: #7a8e93; }
  .dd-search input { padding: 9px 4px; border: 0; background: transparent; min-height: 40px; width: 100%; min-width: 0; outline-offset: 0; box-shadow: none; }
  .dd-work-controls select { font-size: 11px; min-width: 120px; }
  .dd-table-scroll { width: 100%; overflow-x: auto; }
  .dd-table { width: 100%; border-collapse: collapse; table-layout: fixed; margin: 0; font-size: 11px; }
  .dd-table thead { display: table-header-group; }
  .dd-table tbody { display: table-row-group; }
  .dd-table tr { display: table-row; border: 0; background: transparent; }
  .dd-table th, .dd-table td { display: table-cell; width: auto; padding: 13px 12px; border: 0; border-bottom: 1px solid #e3e8e9; text-align: right; vertical-align: top; overflow-wrap: anywhere; }
  .dd-table th { color: #74878d; background: #f7f9fa; font-weight: 600; font-size: 10px; white-space: normal; }
  .dd-table th:first-child { width: 30%; }
  .dd-table th:last-child { width: 17%; }
  .dd-table tr:hover td { background: #f7fbfa; }
  .dd-table td::before { content: none; }
  .dd-table small { display: block; color: #7b8e92; font-size: 10px; line-height: 1.8; margin-top: 3px; }
  .dd-table small[dir=ltr] { text-align: right; font-size: 9px; }
  .dd-record-link, .dd-row-action { border: 0; padding: 0; background: transparent; text-align: right; font-weight: 700 !important; line-height: 1.8; color: #213d43; }
  .dd-row-action { color: #117d75; font-size: 10px !important; }
  .dd-row-action .icon, .dd-record-link .icon { width: 12px; height: 12px; vertical-align: middle; margin-inline-start: 4px; }
  .dd-record-link:hover, .dd-row-action:hover { text-decoration: underline; }
  .dd-status { display: inline-block; font-size: 10px; border-radius: 4px; padding: 4px 6px; line-height: 1.5; }
  .dd-status.amber { color: #986215; background: #fcf2df; }
  .dd-status.blue { color: #3c669c; background: #edf3fb; }
  .dd-status.teal { color: #218274; background: #e9f5f1; }
  .dd-value { font-variant-numeric: tabular-nums; }
  .dd-pagination { display: flex; gap: 16px; justify-content: space-between; align-items: center; padding: 12px 18px 0; color: #7b8e92; font-size: 10px; }
  .dd-pagination > div { display: flex; gap: 6px; }
  .dd-pagination .icon-button { border: 1px solid #e0e6e8; border-radius: 4px; width: 34px; height: 34px; min-width: 34px; }
  [data-dd-page="-1"] .icon { transform: rotate(180deg); }
  .dd-stage-chart > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 10px; margin-bottom: 14px; font-size: 11px; }
  .dd-stage-chart b { font-size: 13px; }
  .dd-stage-track { grid-column: 1 / -1; height: 6px; background: #eff3f4; border-radius: 2px; overflow: hidden; }
  .dd-stage-track i { display: block; height: 100%; }
  .dd-stage-track .amber { background: #ca9b3d; } .dd-stage-track .teal { background: #278c82; } .dd-stage-track .blue { background: #7898c1; } .dd-stage-track .green { background: #7eaa8c; } .dd-stage-track .red { background: #ba7c77; } .dd-stage-track .gray { background: #98a7ab; }
  .dd-payment-balance { display: grid; gap: 5px; border-top: 1px solid #e3e8e9; padding-top: 14px; margin-top: 18px; }
  .dd-payment-balance span, .dd-payment-balance small { color: #71868b; font-size: 11px; }
  .dd-payment-balance strong { font-size: 18px; }
  .dd-stock-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 12px; align-items: center; gap: 10px; padding: 12px 0; border: 0; border-bottom: 1px solid #e3e8e9; background: transparent; width: 100%; text-align: right; }
  .dd-stock-row span { display: grid; gap: 5px; min-width: 0; }
  .dd-stock-row strong { overflow-wrap: anywhere; font-size: 11px; }
  .dd-stock-row small { color: #83969a; font-size: 10px; }
  .dd-stock-row b { font-size: 12px; color: #a75239; }
  .dd-stock-row .icon { width: 12px; height: 12px; }
  .dd-source { margin-top: 18px; color: #87989d; font-size: 10px; }
  .dd-loading { padding: 24px; background: #fff; border-block: 1px solid #d6dfe1; }
  .dd-loading p { margin-block: 12px; }
}
@media (min-width: 1024px) and (max-width: 1399px) {
  .content { padding: 18px; }
  .dd-kpi { padding-inline: 12px; }
  .dd-kpi-label { font-size: 10px; }
  .dd-freshness { flex-basis: 100%; text-align: left; }
  .dd-operations { grid-template-columns: minmax(0, 1fr); }
  .dd-exceptions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dd-exceptions:empty { display: none; }
  .dd-analysis-grid { gap: 18px; grid-template-columns: minmax(0, 1.6fr) minmax(190px, 1fr); }
  .dd-analysis-totals strong { font-size: 14px; }
  .dd-plot { gap: 6px; }
  .dd-vendors { padding-inline-start: 16px; }
  .dd-work-mix .dd-stage-chart { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
