/* Widget layout only. Existing forms, routes, permissions and modal data stay intact. */
#view-dashboard.dashboard-widgets-ready {
  --dw-blue:#2563eb;--dw-sky:#93b4fc;--dw-green:#149673;--dw-orange:#d98c28;
  --dash-accent:#2563eb;--dash-secondary:#2563eb;--dash-surface:#fff;--dash-tint:#f4f6f9;
  --dash-line:#e6e9ef;--dash-text:#20252f;--dash-muted:#626b79;
  --dw-shadow:0 2px 3px rgba(21,32,52,.025),0 8px 24px rgba(21,32,52,.04);
  --dw-line:var(--dash-line);background:#f3f5f8;
  /* Scope shared control tokens to the dashboard, not other menus. */
  --ui-surface:var(--dash-surface);--ui-tint:var(--dash-tint);--ui-hover:#edf3ff;
  --ui-line:var(--dash-line);--ui-text:var(--dash-text);--ui-muted:var(--dash-muted);
  --ui-accent:var(--dw-blue);--page-accent:var(--dw-blue);--text:var(--dash-text);
  --text-strong:var(--dash-text);--muted:var(--dash-muted);--primary-soft:#eaf1ff;
}
body.dark-theme #view-dashboard.dashboard-widgets-ready {
  --dw-blue:#79a6ff;--dw-sky:#b1c6fa;--dw-green:#52cfaa;--dw-orange:#f3b661;
  --dash-accent:#79a6ff;--dash-surface:#1d2738;--dash-tint:#253144;--dash-line:#344052;
  --dash-text:#f3f5f8;--dash-muted:#b1bac7;background:#101720;
  --dw-shadow:0 2px 3px rgba(0,0,0,.08),0 10px 26px rgba(0,0,0,.14);
  --ui-hover:#293953;--primary-soft:#263b5e;
}
#view-dashboard.dashboard-widgets-ready .topbar {padding-top:22px;padding-bottom:12px;align-items:center;gap:16px;flex-wrap:wrap}
#view-dashboard.dashboard-widgets-ready .topbar-actions {flex:1 1 710px;display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end;align-items:center}
#view-dashboard.dashboard-widgets-ready .period-range {width:auto;flex:1 1 490px;max-width:630px;grid-template-columns:minmax(150px,1.2fr) minmax(130px,1fr) minmax(130px,1fr) minmax(60px,.5fr);padding:4px;box-shadow:none;border-radius:10px}
#view-dashboard.dashboard-widgets-ready .topbar h1 {font-size:26px;font-weight:600;letter-spacing:-.03em}
#view-dashboard.dashboard-widgets-ready .topbar p {font-size:12px}
#view-dashboard.dashboard-widgets-ready .content {container-type:inline-size;container-name:dw-content}
.dw-toolbar {display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.dw-button {display:inline-flex;justify-content:center;align-items:center;gap:7px;border:1px solid var(--ui-line,#e5eaf2);background:var(--ui-surface,#fff);color:var(--text-strong,#202c40);border-radius:10px;padding:10px 13px;min-height:39px;line-height:1.3;font:inherit;font-size:12px;font-weight:500;cursor:pointer}
.dw-button:hover:not(:disabled) {border-color:#638bdf;background:var(--ui-hover,#edf3ff)}
.dw-button.dw-primary {color:#fff;background:#2866ed;border-color:#2866ed;box-shadow:0 3px 9px rgba(40,102,237,.17)}
.dw-button.dw-primary:hover:not(:disabled) {background:#1f55cc;border-color:#1f55cc}
.dw-button:disabled {opacity:.45;cursor:not-allowed;box-shadow:none}
.dw-button:focus-visible,.dw-tools button:focus-visible,.dw-close:focus-visible,.dw-library-grip:focus-visible {outline:2px solid #6298ff;outline-offset:3px}
#view-dashboard [data-dw-edit][aria-pressed=true] {border-color:var(--dw-blue);color:var(--dw-blue);background:var(--dash-tint)}
#view-dashboard .dw-grid {display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:16px;align-items:stretch}
#view-dashboard .dw-widget {grid-column:span 2;min-width:0;position:relative;display:flex;flex-direction:column;border:1px solid var(--dash-line);background:var(--dash-surface);border-radius:16px;box-shadow:var(--dw-shadow)}
#view-dashboard .dw-widget[hidden] {display:none!important}
#view-dashboard .dw-widget[data-size=wide] {grid-column:span 6}
#view-dashboard .dw-widget[data-size=narrow] {grid-column:span 4}
#view-dashboard.dashboard-widgets-ready .dw-widget>.card {width:100%;flex:1;min-width:0;margin:0;border:0;border-radius:16px;box-shadow:none;background:var(--dash-surface);padding:22px;color:var(--dash-text)}
#view-dashboard.dashboard-widgets-ready .dw-widget>.stat-card {min-height:132px;padding:17px;display:flex;flex-direction:column;position:relative;text-align:left}
#view-dashboard.dashboard-widgets-ready .stat-card-total {background:var(--dash-surface);box-shadow:none}
#view-dashboard.dashboard-widgets-ready .stat-card .stat-top {position:absolute;top:15px;right:15px;margin:0;display:flex;gap:5px;align-items:center}
#view-dashboard.dashboard-widgets-ready .stat-card .stat-icon,body.dark-theme #view-dashboard.dashboard-widgets-ready .dw-widget .stat-card .stat-icon {width:23px;height:23px;border:0;background:transparent;color:var(--dw-blue);box-shadow:none;border-radius:0}
#view-dashboard.dashboard-widgets-ready .stat-icon svg {width:19px;height:19px}
#view-dashboard.dashboard-widgets-ready .stat-card .stat-label {color:var(--dash-muted);font-size:11px;font-weight:500;padding-right:27px;line-height:1.4;min-height:23px}
#view-dashboard.dashboard-widgets-ready .stat-card .stat-value {font-size:clamp(23px,1.85vw,29px);color:var(--dash-text);font-weight:600;letter-spacing:-.025em;line-height:1.25;margin:9px 0 8px;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
#view-dashboard.dashboard-widgets-ready .stat-card .stat-foot {color:var(--dash-muted);font-size:10px;line-height:1.5}
#view-dashboard.dashboard-widgets-ready .stat-delta {position:static;align-self:flex-start;order:1;margin-top:8px;font-size:10px;padding:3px 5px;background:var(--dash-tint);color:var(--dw-green);border-radius:5px;white-space:nowrap}
#view-dashboard.dashboard-widgets-ready .stat-delta.turun {color:var(--dw-orange)}
/* Keep the comparison badge in normal flow below the amount and caption. */
#view-dashboard.dashboard-widgets-ready .stat-card-total .stat-top {display:contents}
#view-dashboard.dashboard-widgets-ready .stat-card-total .stat-icon {position:absolute;top:15px;right:15px}
#view-dashboard.dashboard-widgets-ready .stat-card-total .stat-value {color:#fff}
#view-dashboard.dashboard-widgets-ready .stat-card-total .stat-label {padding-right:27px}
#view-dashboard.dashboard-widgets-ready .dashboard-stat-action:hover {border-color:transparent;transform:none;box-shadow:inset 0 0 0 1px var(--dw-blue)}
#view-dashboard.dashboard-widgets-ready .ux-quick-actions {margin-bottom:12px;gap:10px}
#view-dashboard.dashboard-widgets-ready .ux-quick-actions button {min-height:49px;padding:9px 12px;background:var(--dash-surface);box-shadow:none;border-radius:10px}
#view-dashboard.dashboard-widgets-ready .ux-quick-actions i {width:32px;height:32px;background:var(--dash-tint);color:var(--dw-blue);box-shadow:none;border-radius:9px}
#view-dashboard.dashboard-widgets-ready .ux-quick-actions strong {font-size:12px;font-weight:500}
#view-dashboard.dashboard-widgets-ready #dashboardStatusSwitch button.active {background:var(--dash-tint);color:var(--dw-blue);box-shadow:none}
#view-dashboard.dashboard-widgets-ready .date-all-toggle.active {background:#2866ed;color:#fff}
#view-dashboard.dashboard-widgets-ready .card-header h2 {font-size:15px;font-weight:550;letter-spacing:-.015em}
#view-dashboard.dashboard-widgets-ready .card-header p {font-size:11px;line-height:1.5;margin-top:5px}
#view-dashboard.dashboard-widgets-ready .rank-name,#view-dashboard.dashboard-widgets-ready .rank-value {font-size:12px;font-weight:500}
#view-dashboard.dashboard-widgets-ready .rank-head {flex-wrap:wrap;gap:4px 8px}
#view-dashboard.dashboard-widgets-ready .rank-name {overflow-wrap:anywhere;white-space:normal}
#view-dashboard.dashboard-widgets-ready .rank-track {height:5px;background:var(--dash-tint)}
#view-dashboard.dashboard-widgets-ready .rank-fill,#view-dashboard.dashboard-widgets-ready #rankList .rank-item .rank-fill {background:var(--dw-blue);animation:none}
#view-dashboard.dashboard-widgets-ready .rank-item {animation:none}
#view-dashboard.dashboard-widgets-ready .rank-item+.rank-item {margin-top:18px}
#view-dashboard.dashboard-widgets-ready .rank-meta {font-size:11px;line-height:1.5}
#view-dashboard.dashboard-widgets-ready .dw-widget[data-widget=grafik]>.card {display:flex;flex-direction:column}
#view-dashboard.dashboard-widgets-ready .chart-body {display:flex;flex-direction:column;flex:1;margin-top:16px;min-width:0}
#view-dashboard.dashboard-widgets-ready .chart-axis,#view-dashboard.dashboard-widgets-ready .chart-grid {display:none}
#view-dashboard.dashboard-widgets-ready .chart-plot {display:flex;flex-direction:column;min-width:0;width:100%;height:auto}
#view-dashboard.dashboard-widgets-ready .dw-line-chart {display:flex;flex-direction:column;flex:1;position:relative;width:100%;height:auto;padding:0;overflow:visible}
#view-dashboard .dw-widget[data-widget=grafik] {align-self:stretch}
#view-dashboard .dw-chart-overview {display:grid;grid-template-columns:minmax(145px,.35fr) minmax(0,1fr);align-items:stretch;flex:1;gap:18px}
#view-dashboard .dw-year-total {display:flex;flex-direction:column;align-self:center;min-width:0;gap:8px}
#view-dashboard .dw-year-total>span {font-size:11px;font-weight:500;color:var(--dash-muted);line-height:1.5}
#view-dashboard .dw-year-total>strong {font-size:clamp(23px,1.9vw,29px);font-weight:600;letter-spacing:-.03em;line-height:1.25;color:var(--dash-text);overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
#view-dashboard .dw-year-total>small {font-size:11px;color:var(--dw-blue);line-height:1.5;font-variant-numeric:tabular-nums}
#view-dashboard .dw-year-total>em {font-size:10px;font-style:normal;line-height:1.5;color:var(--dash-muted)}
#view-dashboard .dw-chart-canvas {min-width:0;min-height:205px;position:relative}
#view-dashboard .dw-chart {position:absolute;top:0;left:0;width:100%;height:205px;display:block;overflow:visible}
#view-dashboard .dw-chart text {fill:var(--dash-muted);font-size:11px;font-family:inherit}
#view-dashboard .dw-chart-grid {stroke:var(--dash-line);stroke-width:1}
#view-dashboard .dw-chart-line {fill:none;stroke:var(--dw-blue);stroke-width:2.5;stroke-linejoin:round;stroke-linecap:round}
#view-dashboard .dw-chart-area {fill:var(--dw-blue);opacity:.08}
#view-dashboard .dw-chart-dot {fill:var(--dash-surface);stroke:var(--dw-blue);stroke-width:1.8}
#view-dashboard .dw-month-targets {position:absolute;left:0;right:0}
#view-dashboard .dw-month-targets button {position:absolute;top:0;height:100%;background:transparent;border:0;padding:0;min-width:0;border-radius:5px;cursor:pointer;touch-action:manipulation}
#view-dashboard .dw-month-targets button:hover:not(:disabled),#view-dashboard .dw-month-targets button:focus-visible {background:color-mix(in srgb,var(--dw-blue) 8%,transparent)}
#view-dashboard .dw-month-targets button:focus-visible {outline:2px solid var(--dw-blue);outline-offset:-2px}
#view-dashboard .dw-month-targets button:disabled {cursor:default}
#view-dashboard .dw-chart-readout {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;margin:0}
#view-dashboard .dw-chart-tooltip {position:absolute;z-index:3;display:grid;gap:5px;width:max-content;max-width:calc(100% - 8px);padding:10px 12px;border:1px solid var(--dash-line);border-radius:9px;background:var(--dash-surface);box-shadow:0 5px 20px rgba(14,27,50,.13);color:var(--dash-text);pointer-events:none}
#view-dashboard .dw-chart-tooltip>span {font-size:10px;color:var(--dash-muted)}
#view-dashboard .dw-chart-tooltip>strong {font-size:12px;font-weight:550;font-variant-numeric:tabular-nums}
#view-dashboard .dw-chart-tooltip>small {font-size:9px;color:var(--dash-muted);line-height:1.4}
#view-dashboard .dw-chart-trace {position:absolute;width:1px;border-left:1px dashed var(--dw-blue);pointer-events:none;opacity:.6}
#view-dashboard :is(.dw-chart-tooltip,.dw-chart-trace)[hidden] {display:none!important}
#view-dashboard .dw-chart-insights {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));flex:none;gap:0;margin-top:16px;border:1px solid var(--dash-line);border-radius:11px;background:var(--dash-tint);overflow:hidden}
#view-dashboard .dw-chart-insights>div {display:flex;flex-direction:column;justify-content:center;min-width:0;gap:7px;padding:14px 16px;border-bottom:3px solid var(--dw-blue)}
#view-dashboard .dw-chart-insights>div:nth-child(2) {border-left:1px solid var(--dash-line);border-right:1px solid var(--dash-line);border-bottom-color:#f8c51b}
#view-dashboard .dw-chart-insights>div:nth-child(3) {border-bottom-color:#ef3d32}
#view-dashboard .dw-chart-insights span {font-size:10px;color:var(--dash-muted);line-height:1.4}
#view-dashboard .dw-chart-insights strong {font-size:17px;font-weight:550;letter-spacing:-.015em;color:var(--dash-text);line-height:1.3;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
#view-dashboard .dw-chart-insights small {font-size:10px;color:var(--dash-muted);line-height:1.4}
#view-dashboard .dw-chart-insights strong small {font-weight:400;letter-spacing:0}
#view-dashboard .dw-widget[data-widget=grafik]>.card {container-type:inline-size;container-name:dw-chart-card}
@container dw-chart-card (max-width:530px) {
  #view-dashboard .dw-chart-overview {grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(205px,1fr);gap:12px}
  #view-dashboard .dw-year-total {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 10px;align-items:center}
  #view-dashboard .dw-year-total>span,#view-dashboard .dw-year-total>em {grid-column:1/-1}
  #view-dashboard .dw-year-total>strong {font-size:26px}
  #view-dashboard .dw-year-total>small {font-size:10px;text-align:right}
  #view-dashboard .dw-chart-insights>div {padding:12px 9px}
  #view-dashboard .dw-chart-insights strong {font-size:15px}
  #view-dashboard .dw-chart-insights strong small {display:block;margin-top:2px}
}
@container dw-chart-card (max-width:320px) {
  #view-dashboard .dw-year-total {display:flex;gap:5px;align-items:flex-start}
  #view-dashboard .dw-year-total>small {text-align:left}
  #view-dashboard .dw-chart-insights {grid-template-columns:minmax(0,1fr);margin-top:10px}
  #view-dashboard .dw-chart-insights>div {display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;border-bottom:0;border-left:3px solid var(--dw-blue);padding:10px 12px;gap:5px 8px}
  #view-dashboard .dw-chart-insights>div:nth-child(2) {border-right:0;border-left:3px solid #f8c51b;border-top:1px solid var(--dash-line)}
  #view-dashboard .dw-chart-insights>div:nth-child(3) {border-left-color:#ef3d32;border-top:1px solid var(--dash-line)}
  #view-dashboard .dw-chart-insights>div>small {grid-column:1/-1}
  #view-dashboard .dw-chart-insights strong {text-align:right}
  #view-dashboard .dw-chart-insights strong small {display:inline}
}
#view-dashboard .dw-widget[data-widget=komposisi] {align-self:stretch}
#view-dashboard .dw-widget[data-widget=produk] {align-self:start}
body.modern-ui #view-dashboard.dashboard-widgets-ready .dw-widget[data-widget=komposisi]>.card {display:flex;flex-direction:column;container-type:inline-size;container-name:dw-composition-card;--dw-source-print:#2563eb;--dw-source-packaging:#f8c51b;--dw-source-stock:#ef3d32;--dw-source-creative:#f58220}
body.dark-theme #view-dashboard.dashboard-widgets-ready .dw-widget[data-widget=komposisi]>.card {--dw-source-print:#4b8cff;--dw-source-packaging:#ffd02f;--dw-source-stock:#ff5548;--dw-source-creative:#ff922e}
#view-dashboard .dw-composition {display:grid;grid-template-rows:auto minmax(0,1fr);gap:18px;margin-top:16px;flex:1;min-width:0}
#view-dashboard .dw-composition-overview {display:grid;grid-template-columns:144px minmax(0,1fr);align-items:center;gap:22px;padding:0 0 18px;border-bottom:1px solid var(--dash-line)}
#view-dashboard.dashboard-widgets-ready .source-summary-list {display:block}
body.modern-ui #view-dashboard.dashboard-widgets-ready [data-widget=komposisi] .source-summary-list {display:flex;flex-direction:column;flex:1;min-height:0}
#view-dashboard .dw-donut {position:relative;width:144px;height:144px;display:grid;place-items:center;flex:none}
#view-dashboard .dw-donut-chart {position:absolute;inset:0;width:100%;height:100%;overflow:visible}
#view-dashboard .dw-donut-empty {stroke:var(--dw-line)}
#view-dashboard .dw-donut-empty[hidden] {display:none}
#view-dashboard .dw-donut-slice {fill:var(--source-color);cursor:pointer;transform:translate(0,0);transition:transform 180ms cubic-bezier(.2,.8,.2,1),opacity 180ms ease,filter 180ms ease;outline:none}
#view-dashboard .dw-donut-slice.is-active {transform:translate(var(--slice-x),var(--slice-y));filter:drop-shadow(0 2px 2px rgba(0,0,0,.16))}
#view-dashboard .dw-source-selecting .dw-donut-slice:not(.is-active) {opacity:.28}
#view-dashboard .dw-donut-slice:focus-visible {stroke:var(--dash-text);stroke-width:1.2}
#view-dashboard .dw-donut>div {position:relative;pointer-events:none;width:108px;height:108px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px}
#view-dashboard .dw-donut strong {font-size:18px;font-weight:600;letter-spacing:-.02em;max-width:104px;overflow-wrap:anywhere;text-align:center}
#view-dashboard .dw-donut small {font-size:10px;color:var(--dash-muted)}
#view-dashboard .dw-composition-insight {min-width:0}
#view-dashboard .dw-composition-label {display:block;font-size:11px;color:var(--dash-muted);margin-bottom:5px}
#view-dashboard .dw-composition-total {display:block;color:var(--dash-text);font-size:clamp(15px,3.7cqi,21px);font-weight:600;letter-spacing:-.025em;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
#view-dashboard .dw-composition-leader {display:grid;gap:6px;margin-top:14px;padding:10px 12px;border-radius:10px;background:color-mix(in srgb,var(--source-color) 13%,var(--dash-surface));border:1px solid color-mix(in srgb,var(--source-color) 25%,var(--dash-line))}
#view-dashboard .dw-composition-leader>span,#view-dashboard .dw-composition-leader small {font-size:10px;color:var(--dash-muted);line-height:1.4}
#view-dashboard .dw-composition-leader strong {display:flex;align-items:center;gap:6px;font-size:12px;font-weight:550;line-height:1.4;color:var(--dash-text);overflow-wrap:anywhere}
#view-dashboard .dw-composition-leader i {width:6px;height:6px;flex:none;border-radius:50%;background:var(--source-color)}
#view-dashboard .dw-composition-zero {font-size:11px;line-height:1.5;color:var(--dash-muted);margin:12px 0 0}
#view-dashboard .dw-source-legend {min-width:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;align-content:stretch}
#view-dashboard .dw-source-tile {position:relative;min-width:0;min-height:89px;display:flex;flex-direction:column;justify-content:center;gap:10px;padding:12px;border:1px solid color-mix(in srgb,var(--source-color) 25%,var(--dash-line));border-radius:11px;background:color-mix(in srgb,var(--source-color) 9%,var(--dash-surface));transition:opacity 180ms ease,transform 180ms ease,border-color 180ms ease,box-shadow 180ms ease}
#view-dashboard .dw-source-hit {position:absolute;inset:0;width:100%;height:100%;min-height:0;margin:0;padding:0;border:0;border-radius:inherit;background:transparent;box-shadow:none;cursor:pointer;z-index:1}
#view-dashboard .dw-source-hit:hover,#view-dashboard .dw-source-hit:active {background:transparent;box-shadow:none;transform:none}
#view-dashboard .dw-source-hit:focus-visible {outline:2px solid var(--source-color);outline-offset:3px}
#view-dashboard .dw-source-selecting .dw-source-tile:not(.is-active) {opacity:.4}
#view-dashboard .dw-source-tile.is-active {transform:translateY(-2px);border-color:var(--source-color);box-shadow:0 3px 12px color-mix(in srgb,var(--source-color) 17%,transparent)}
#view-dashboard .dw-source-readout {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
@media(prefers-reduced-motion:reduce) {
  #view-dashboard .dw-donut-slice,#view-dashboard .dw-source-tile {transition:none}
  #view-dashboard .dw-donut-slice.is-active,#view-dashboard .dw-source-tile.is-active {transform:none;filter:none}
}
#view-dashboard .dw-source-tile-head {display:flex;align-items:flex-start;justify-content:space-between;gap:5px}
#view-dashboard .dw-source-tile-head span {display:flex;align-items:center;gap:6px;min-width:0;font-size:11px;line-height:1.4;color:var(--dash-text);overflow-wrap:anywhere}
#view-dashboard .dw-source-tile-head span i {width:6px;height:6px;flex:none;border-radius:50%;background:var(--source-color)}
#view-dashboard .dw-source-tile-head small {flex:none;border-radius:5px;padding:2px 4px;background:var(--dash-surface);color:var(--dash-muted);font-size:10px;line-height:1.4;font-variant-numeric:tabular-nums}
#view-dashboard .dw-source-tile>strong {font-weight:550;font-size:13px;color:var(--dash-text);font-variant-numeric:tabular-nums;white-space:nowrap}
#view-dashboard .dw-source-track {height:4px;border-radius:5px;background:color-mix(in srgb,var(--source-color) 12%,var(--dash-surface));overflow:hidden}
#view-dashboard .dw-source-track i {display:block;height:100%;border-radius:inherit;background:var(--source-color)}
@container dw-composition-card (max-width:330px) {
  #view-dashboard .dw-composition-overview {grid-template-columns:112px minmax(0,1fr);gap:14px}
  #view-dashboard .dw-donut {width:112px;height:112px}
  #view-dashboard .dw-donut>div {width:84px;height:84px}
  #view-dashboard .dw-donut strong {font-size:14px;max-width:81px}
  #view-dashboard .dw-donut small {font-size:9px}
  #view-dashboard .dw-composition-total {font-size:14px}
  #view-dashboard .dw-composition-leader {padding:8px;margin-top:10px}
  #view-dashboard .dw-composition-leader strong {font-size:11px}
  #view-dashboard .dw-source-tile {padding:10px;gap:9px}
  #view-dashboard .dw-source-tile>strong {font-size:11px}
  #view-dashboard .dw-source-tile-head {flex-wrap:wrap}
}
#view-dashboard .dw-product-table {width:100%;table-layout:fixed;border-collapse:collapse;font-size:12px;color:var(--dash-text);margin:0}
#view-dashboard .dw-product-table-wrap {margin-top:12px;max-width:100%}
#view-dashboard .dw-product-table th {text-align:left;color:var(--dash-muted);font-size:11px;font-weight:500;background:transparent;padding:11px 8px;border-bottom:1px solid var(--dash-line);position:static;white-space:normal}
#view-dashboard .dw-product-table td {padding:15px 8px;border-bottom:1px solid var(--dash-line);background:transparent;overflow-wrap:anywhere;white-space:normal}
#view-dashboard .dw-product-table th:first-child {width:47%}
#view-dashboard .dw-product-table th:nth-child(2) {width:20%}
#view-dashboard .dw-product-table th:not(:first-child),#view-dashboard .dw-product-table td:not(:first-child) {text-align:right;font-variant-numeric:tabular-nums}
#view-dashboard .dw-product-table tr:last-child td {border-bottom:0}
#view-dashboard .dw-tools {display:none;align-items:center;gap:5px;flex-wrap:wrap;padding:10px 11px;border-bottom:1px dashed var(--dash-line);border-radius:18px 18px 0 0;background:var(--dash-tint)}
#view-dashboard.dw-editing .dw-tools {display:flex}
#view-dashboard .dw-tools>span {display:none}
#view-dashboard .dw-tools button {width:28px;height:28px;display:grid;place-items:center;background:var(--dash-surface);border:1px solid var(--dash-line);color:var(--dash-muted);border-radius:7px;padding:0;font:inherit;font-size:15px;cursor:pointer}
#view-dashboard .dw-tools button:disabled {opacity:.35;cursor:not-allowed}
#view-dashboard .dw-tools .dw-grip {margin-right:auto;touch-action:none;cursor:grab;font-size:19px;letter-spacing:-2px;color:var(--dw-blue)}
#view-dashboard.dw-editing .dashboard-stat-action {cursor:default;box-shadow:none}
#view-dashboard .dw-edit-bar {display:flex;flex-wrap:wrap;justify-content:space-between;gap:10px;align-items:center;background:var(--dash-tint);border:1px solid var(--dash-line);border-radius:12px;color:var(--dw-blue);padding:13px;margin:0 0 16px;font-size:12px}
#view-dashboard .dw-edit-bar[hidden],#view-dashboard .dw-empty[hidden] {display:none}
#view-dashboard .dw-edit-bar button {background:transparent;border:0;color:var(--dw-blue);font:inherit;font-size:12px;text-decoration:underline;cursor:pointer}
#view-dashboard .dw-empty {grid-column:1/-1;text-align:center;padding:45px 20px;border:1px dashed var(--dash-line);border-radius:16px;color:var(--dash-muted)}
#view-dashboard .dw-empty strong {color:var(--dash-text);font-size:18px}
#view-dashboard .dw-empty p {font-size:12px;margin:10px 0 17px}
#view-dashboard .dw-live {min-height:18px;font-size:11px;color:var(--dash-muted);margin:14px 0 0}
#view-dashboard .dw-drag-slot {opacity:.3;border:1px dashed var(--dw-blue);background:var(--dash-tint)}
.dw-drag-ghost {position:fixed;pointer-events:none;z-index:10000;width:250px;max-height:200px;overflow:hidden;background:var(--ui-surface,#fff);color:var(--text-strong,#202c40);border:1px solid var(--ui-line,#e5eaf2);border-radius:18px;box-shadow:0 18px 55px rgba(0,0,0,.26);transform:rotate(-2deg) scale(1.025);padding:0}
.dw-drag-ghost>.card {border:0;margin:0;padding:20px;background:var(--ui-surface,#fff);box-shadow:none;min-height:130px;border-radius:18px}
.dw-drag-ghost .stat-top {display:none}
.dw-drag-ghost .stat-label,.dw-drag-ghost .stat-foot {font-size:11px;color:var(--muted,#69778d)}
.dw-drag-ghost .stat-value {font-size:26px;color:var(--text-strong,#202c40);margin:12px 0;font-weight:600}
.dw-drag-ghost .card-header h2 {font-size:15px;color:var(--text-strong,#202c40)}
.dw-dragging {user-select:none;cursor:grabbing}
.dw-library {width:min(415px,calc(100% - 24px));max-width:none;max-height:calc(100dvh - 24px);height:calc(100dvh - 24px);margin:12px 12px 12px auto;padding:0;border:1px solid var(--ui-line,#e5eaf2);border-radius:20px;background:var(--ui-surface,#fff);color:var(--text-strong,#202c40);box-shadow:0 20px 80px rgba(0,0,0,.22);overflow:hidden}
.dw-library[open] {display:flex;flex-direction:column;animation:dwDrawerIn .22s cubic-bezier(.2,.8,.2,1)}
.dw-library.dw-closing {animation:dwDrawerOut .17s ease-in forwards}
.dw-library::backdrop {background:rgba(10,18,35,.42);backdrop-filter:blur(3px)}
.dw-library header {display:flex;justify-content:space-between;gap:14px;padding:24px 23px 20px;flex:none}
.dw-eyebrow {font-size:10px;letter-spacing:.12em;color:#4481ee;font-weight:600}
.dw-library h2 {font-size:22px;font-weight:550;letter-spacing:-.025em;color:var(--text-strong,#202c40);margin:8px 0}
.dw-library header p {font-size:12px;line-height:1.5;color:var(--muted,#69778d);margin:0}
.dw-close {width:34px;height:34px;flex:none;border-radius:10px;border:1px solid var(--ui-line,#e5eaf2);background:var(--ui-tint,#f5f7fb);color:var(--text-strong,#202c40);font-size:23px;cursor:pointer}
.dw-library-list {overflow:auto;overscroll-behavior:contain;min-height:0;padding:0 23px 10px}
.dw-library-item {display:flex;gap:12px;align-items:center;padding:17px 0;border-bottom:1px solid var(--ui-line,#e5eaf2)}
.dw-library-item:last-child {border:0}
.dw-library-art {width:57px;height:57px;border-radius:14px;background:var(--ui-tint,#f5f7fb);color:#4481ee;flex:none;display:grid;place-items:center}
.dw-library-art svg {width:27px;height:27px}
.dw-library-copy {min-width:0;flex:1}
.dw-library-copy strong {display:block;font-size:12px;font-weight:500;color:var(--text-strong,#202c40)}
.dw-library-copy p {font-size:11px;line-height:1.5;color:var(--muted,#69778d);margin:5px 0 0}
.dw-library-actions {display:flex;flex-direction:column;align-items:center;gap:6px}
.dw-library-actions .dw-button {font-size:11px;padding:7px 10px;min-height:30px}
.dw-library-grip {font:inherit;font-size:11px;border:0;background:transparent;color:var(--muted,#69778d);touch-action:none;cursor:grab;padding:4px}
.dw-mini-bars {height:28px;display:flex;gap:4px;align-items:flex-end}
.dw-mini-bars i {height:14px;width:6px;background:#96b7fc;border-radius:3px}
.dw-mini-bars i:nth-child(2) {height:25px;background:#2866ed}
.dw-mini-bars i:nth-child(3) {height:19px}
.dw-library footer {flex:none;padding:14px 23px;border-top:1px solid var(--ui-line,#e5eaf2);font-size:11px;color:var(--muted,#69778d)}
html.dw-library-open {overflow:hidden;scrollbar-gutter:stable}
/* Reference-inspired hierarchy: one blue focus, quiet supporting surfaces. */
body.modern-ui #view-dashboard.dashboard-widgets-ready .dw-widget[data-widget=tagihan] {
  border-color:#316de8;background:#2563eb;box-shadow:0 6px 18px rgba(37,99,235,.18);
}
body.modern-ui #view-dashboard.dashboard-widgets-ready .dw-widget>.stat-card-total {
  background:linear-gradient(125deg,#2154ce,#2a66e5);color:#fff;
}
body.modern-ui #view-dashboard.dashboard-widgets-ready .stat-card-total :is(.stat-label,.stat-foot) {color:#ecf3ff}
body.modern-ui #view-dashboard.dashboard-widgets-ready .stat-card-total .stat-value {color:#fff;font-weight:600}
body.modern-ui #view-dashboard.dashboard-widgets-ready .stat-card-total .stat-icon {color:#dce9ff}
body.modern-ui #view-dashboard.dashboard-widgets-ready .stat-card-total .stat-delta {background:#fff;color:#166747;box-shadow:0 2px 5px rgba(0,0,0,.07)}
body.modern-ui #view-dashboard.dashboard-widgets-ready .stat-card-total .stat-delta.turun {color:#9a4813}
body.modern-ui #view-dashboard.dashboard-widgets-ready .dw-widget[data-widget=bahan] {--dw-metric:var(--dw-green)}
body.modern-ui #view-dashboard.dashboard-widgets-ready .dw-widget[data-widget=cetak] {--dw-metric:var(--dw-blue)}
body.modern-ui #view-dashboard.dashboard-widgets-ready .dw-widget[data-widget=packaging] {--dw-metric:var(--dw-orange)}
body.modern-ui #view-dashboard.dashboard-widgets-ready .dw-widget[data-widget=stock] {--dw-metric:var(--dw-green)}
body.modern-ui #view-dashboard.dashboard-widgets-ready .stat-card:not(.stat-card-total) .stat-icon {
  color:var(--dw-metric,var(--dw-blue));width:27px;height:27px;border-radius:8px;
  background:color-mix(in srgb,var(--dw-metric,var(--dw-blue)) 10%,transparent);
}
body.modern-ui #view-dashboard.dashboard-widgets-ready :is(.topbar p,.card-header p,.rank-meta,.rank-empty,.chart-empty) {color:var(--dash-muted)}
body.modern-ui #view-dashboard.dashboard-widgets-ready :is(.card-header h2,.rank-name,.rank-value) {color:var(--dash-text)}
body.modern-ui #view-dashboard.dashboard-widgets-ready .dw-widget>.card {transition:box-shadow .18s ease}
body.modern-ui #view-dashboard.dashboard-widgets-ready .dashboard-stat-action:hover {box-shadow:inset 0 0 0 1px var(--dw-blue)}
body.modern-ui #view-dashboard.dashboard-widgets-ready .stat-card-total:hover {box-shadow:inset 0 0 0 1px #c9dcff}
body.modern-ui #view-dashboard.dashboard-widgets-ready .dw-widget:focus-within {outline:2px solid var(--dw-blue);outline-offset:3px}
body.modern-ui #view-dashboard.dashboard-widgets-ready .dashboard-filter-bar {justify-content:space-between;gap:12px;margin-bottom:14px}
body.modern-ui #view-dashboard.dashboard-widgets-ready .dashboard-filter-bar>span {color:var(--dash-muted);font-size:11px;font-weight:500}
body.modern-ui #view-dashboard.dashboard-widgets-ready #dashboardStatusSwitch {background:var(--dash-tint);border-color:var(--dash-line);padding:3px;border-radius:10px}
body.modern-ui #view-dashboard.dashboard-widgets-ready #dashboardStatusSwitch button {min-height:32px;color:var(--dash-muted);font-size:11px;padding:0 12px}
body.modern-ui #view-dashboard.dashboard-widgets-ready #dashboardStatusSwitch button.active {background:var(--dash-surface);color:var(--dw-blue);box-shadow:0 1px 4px rgba(0,0,0,.08)}
body.modern-ui #view-dashboard.dashboard-widgets-ready .period-range {background:transparent;border:0;padding:0;gap:6px}
body.modern-ui #view-dashboard.dashboard-widgets-ready .period-range>:is(label,button) {background:var(--dash-surface);border-color:var(--dash-line);min-height:38px;font-size:11px;padding:6px 8px}
body.modern-ui #view-dashboard.dashboard-widgets-ready .period-range input {font-size:11px;color:var(--dash-text)}
body.modern-ui #view-dashboard.dashboard-widgets-ready .period-month-trigger strong {color:var(--dash-text);font-size:11px}
body.modern-ui #view-dashboard.dashboard-widgets-ready .date-all-toggle.active {background:#2563eb;border-color:#2563eb;color:#fff}
body.modern-ui #view-dashboard.dashboard-widgets-ready .dw-toolbar .dw-button {min-height:38px;padding:9px 11px;font-size:11px;border-radius:9px}
body.modern-ui #view-dashboard.dashboard-widgets-ready .ux-quick-actions button {border-color:var(--dash-line)}
body.modern-ui #view-dashboard.dashboard-widgets-ready .ux-quick-actions button:hover {background:var(--dash-tint);border-color:var(--dw-blue);box-shadow:none;transform:none}
body.modern-ui #view-dashboard.dashboard-widgets-ready .chart-year-picker {background:transparent;border:0;padding:0;gap:8px;font-size:10px;color:var(--dash-muted)}
body.modern-ui #view-dashboard.dashboard-widgets-ready .chart-year-picker>button {border-color:var(--dash-line);border-radius:8px;background:var(--dash-tint);min-height:32px}
body.modern-ui #view-dashboard.dashboard-widgets-ready .dw-product-table {background:transparent}
body.modern-ui #view-dashboard.dashboard-widgets-ready .dw-product-table :is(th,td) {background:transparent;border-color:var(--dash-line)}
body.modern-ui #view-dashboard.dashboard-widgets-ready .dw-product-table th {color:var(--dash-muted);font-size:10px;letter-spacing:.03em}
body.modern-ui #view-dashboard.dashboard-widgets-ready .dw-product-table td {color:var(--dash-text);padding-top:13px;padding-bottom:13px}
body.modern-ui #view-dashboard.dashboard-widgets-ready .dw-product-table tbody tr:nth-child(even) {background:transparent}
body.modern-ui #view-dashboard.dashboard-widgets-ready .dw-product-table tbody tr:hover td {background:var(--dash-tint)}
/* Typography refinement only: Inter stays self-hosted; numeric data is unchanged. */
body.modern-ui #view-dashboard.dashboard-widgets-ready {font-weight:400;font-synthesis:none}
body.modern-ui #view-dashboard.dashboard-widgets-ready :is(.card-header p,.stat-foot,.rank-meta,.dw-chart-readout,.dw-source-legend small,.dw-product-table td) {font-weight:400}
body.modern-ui #view-dashboard.dashboard-widgets-ready .dw-product-table td:last-child {font-weight:500}
body.modern-ui #view-dashboard.dashboard-widgets-ready :is(.rank-name,.rank-value,.period-range input,.chart-year-picker>button) {font-weight:500}
/* Shell accents match only while Dashboard is visible. Other menus retain their themes. */
body.modern-ui:has(#view-dashboard.active:not([hidden])) #appSidebar {
  --ui-accent:#2563eb;--primary-soft:#eaf1ff;--ui-hover:#f1f4fa;background:#fff;border-color:#e6e9ef;
}
body.modern-ui.dark-theme:has(#view-dashboard.active:not([hidden])) #appSidebar {
  --ui-accent:#79a6ff;--primary-soft:#263b5e;--ui-hover:#253144;background:#182231;border-color:#344052;
}
body.modern-ui:has(#view-dashboard.active:not([hidden])) .app-toolbar {background:#fff;border-color:#e6e9ef}
body.modern-ui.dark-theme:has(#view-dashboard.active:not([hidden])) .app-toolbar {background:#182231;border-color:#344052}
@media (min-width:721px) {#view-dashboard.dashboard-widgets-ready .ux-quick-actions small {display:none}}
@media (max-width:900px) and (min-width:721px) {#view-dashboard.dashboard-widgets-ready .period-range {grid-template-columns:repeat(2,minmax(0,1fr))}#view-dashboard.dashboard-widgets-ready .ux-quick-actions {grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:720px) {
  #view-dashboard.dashboard-widgets-ready .period-range {grid-template-columns:repeat(2,minmax(0,1fr))}
  body.modern-ui #view-dashboard.dashboard-widgets-ready .period-range>:is(label,button) {min-height:54px}
  body.modern-ui #view-dashboard.dashboard-widgets-ready #dashboardStatusSwitch {display:flex;width:100%}
  body.modern-ui #view-dashboard.dashboard-widgets-ready #dashboardStatusSwitch button {flex:1;min-height:44px;white-space:normal}
  body.modern-ui #view-dashboard.dashboard-widgets-ready .dw-toolbar .dw-button {min-height:44px}
  #view-dashboard.dashboard-widgets-ready .ux-quick-actions {grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  #view-dashboard.dashboard-widgets-ready .ux-quick-actions button {flex-direction:column;justify-content:center;text-align:center;gap:6px;padding:10px 6px;min-height:78px}
  #view-dashboard.dashboard-widgets-ready .ux-quick-actions strong {font-size:10px;line-height:1.4}
  #view-dashboard.dashboard-widgets-ready .ux-quick-actions small {display:none}
}
@container dw-content (max-width:1060px) {#view-dashboard .dw-grid {grid-template-columns:repeat(6,minmax(0,1fr))}#view-dashboard .dw-widget[data-size=wide] {grid-column:span 6}#view-dashboard .dw-widget[data-size=narrow] {grid-column:span 3}}
@container dw-content (max-width:620px) {#view-dashboard .dw-grid {grid-template-columns:repeat(2,minmax(0,1fr))}#view-dashboard .dw-widget {grid-column:span 1}#view-dashboard .dw-widget[data-widget=tagihan],#view-dashboard .dw-widget[data-size=wide],#view-dashboard .dw-widget[data-size=narrow] {grid-column:span 2}}
@container dw-content (max-width:300px) {#view-dashboard .dw-widget {grid-column:span 2}#view-dashboard .dw-widget[data-size=metric]>.card {min-height:120px}#view-dashboard .dw-product-table {font-size:11px}#view-dashboard .dw-product-table th,#view-dashboard .dw-product-table td {padding-left:4px;padding-right:4px}}
@container dw-content (max-width:620px) {
  #view-dashboard .dw-product-table {font-size:11px}
  #view-dashboard .dw-product-table th:first-child {width:44%}
  #view-dashboard .dw-product-table th:nth-child(2) {width:16%}
  #view-dashboard .dw-product-table :is(th,td) {padding-left:4px;padding-right:4px}
  #view-dashboard .dw-product-table td:last-child {white-space:nowrap;font-size:10px}
}
@media(max-width:720px) {#view-dashboard.dashboard-widgets-ready .topbar-actions {flex-basis:100%;justify-content:flex-start}#view-dashboard.dashboard-widgets-ready .period-range {flex-basis:100%;width:100%}#view-dashboard .dw-toolbar {width:100%;justify-content:flex-end}#view-dashboard .dw-widget>.card {padding:17px}#view-dashboard .dw-grid {gap:12px}#view-dashboard .dw-widget[data-size=metric]>.card {padding:17px}#view-dashboard.dashboard-widgets-ready .stat-card .stat-value {font-size:25px}#view-dashboard .dw-source-legend {min-width:120px}.dw-library header {padding:21px 18px 16px}.dw-library-list {padding:0 18px 10px}.dw-library-item {gap:9px}.dw-library-art {width:42px;height:42px}.dw-library footer {padding:12px 18px}html.dw-library-open {scrollbar-gutter:auto}}
@media(max-width:720px) {#view-dashboard.dashboard-widgets-ready .period-range>label {flex-direction:column;align-items:stretch;gap:2px;padding:5px 8px;min-height:54px}#view-dashboard.dashboard-widgets-ready .period-range>label>span {font-size:10px;line-height:1.2}#view-dashboard.dashboard-widgets-ready .period-range input {height:28px;min-height:28px;width:100%;padding:0}#view-dashboard.dashboard-widgets-ready .period-month-trigger,#view-dashboard.dashboard-widgets-ready .date-all-toggle {min-height:54px}}
@media(max-width:360px) {#view-dashboard.dashboard-widgets-ready .period-range>label {grid-column:1/-1}}
@media(pointer:coarse) {.dw-toolbar .dw-button,.dw-library button {min-height:44px}#view-dashboard .dw-tools button {width:44px;height:44px}#view-dashboard .dw-edit-bar button {min-height:44px}.dw-library .dw-close {width:44px}.dw-library-grip {padding:10px 4px}}
@keyframes dwDrawerIn {from{transform:translateX(35px)}to{transform:translateX(0)}}
@keyframes dwDrawerOut {to{transform:translateX(35px);opacity:0}}
@media(prefers-reduced-motion:reduce) {.dw-library[open],.dw-library.dw-closing {animation:none}.dw-drag-ghost {transform:none}#view-dashboard.dashboard-widgets-ready * {animation:none!important;transition:none!important}}
