/* General dashboard. Shell, navigation and dialogs retain their shared styles. */
.bm-dashboard.bm-dashboard-signature {
  --ds-violet:var(--bm-ui-accent,#6d28d9);
  --ds-lavender:var(--bm-ui-accent-bg,#f3edff);
  --ds-ink:var(--text,#211b36);
  --ds-card:var(--card,#fff);
  --ds-muted:var(--muted,#625977);
  --ds-line:var(--line,#e5dcef);
  --ds-positive:var(--green,#15803d);
  --ds-negative:var(--red,#b91c1c);
  max-width:1360px;
  margin-inline:auto;
  color:var(--ds-ink);
}
.app-ui .ui-content:has(>.bm-dashboard-signature) { background:linear-gradient(135deg,#faf9ff,#f4f1fa); }
.bm-dashboard-signature .ds-summary {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  align-items:start;
  min-width:0;
}
.ds-summary>* { min-width:0;grid-column:1/-1; }
.ds-summary :is(.ds-projects,.ds-watch,.ds-costs,.ds-forecast) { grid-column:span 1; }
.ds-summary :is(h1,h2,h3,p,figure) { margin:0; }
.ds-summary .ui-icon { width:19px;height:19px;flex:none;color:var(--ds-violet); }
.ds-summary bdi,.ds-summary strong,.ds-kpi span { overflow-wrap:anywhere;font-variant-numeric:tabular-nums; }
.ds-summary .ds-negative,.ds-summary .bm-negative { color:var(--ds-negative); }
.ds-summary .bm-positive { color:var(--ds-positive); }
.ds-summary button:focus-visible,.ds-summary summary:focus-visible { outline:2px solid var(--ds-violet);outline-offset:2px; }
.ds-summary button,.ds-summary summary,.ds-summary select { font:inherit;cursor:pointer; }
.ds-summary summary { color:var(--ds-violet);font-weight:650; }
.ds-summary details:not([open])>:not(summary) { display:none; }
.ds-heading {
  position:relative;isolation:isolate;overflow:hidden;border-radius:16px;
  display:flex;align-items:center;min-height:86px;padding:14px 22px;
  color:white;background:linear-gradient(105deg,#6325a6,#9c61e2);
}
.ds-heading-image {
  position:absolute;inset-block:0;inset-inline-end:0;width:54%;height:100%;object-fit:cover;
  object-position:center 44%;mask-image:linear-gradient(90deg,transparent,#000 65%);z-index:-1;
}
.ds-summary[dir=rtl] .ds-heading-image {mask-image:linear-gradient(270deg,transparent,#000 65%);}
.ds-heading-copy { display:flex;align-items:center;gap:12px;max-width:72%; }
.ds-heading-copy .ui-icon { width:28px;height:28px;color:white; }
.ds-heading h1 { font-size:clamp(21px,2.1vw,28px);color:white;line-height:1.2; }
.ds-heading p { font-size:.86rem;margin-top:3px;color:#f6ecff; }
.ds-kpis { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px; }
.ds-kpi,.ds-card,.ds-summary>.ds-details {
  min-width:0;border:1px solid var(--ds-line);border-radius:14px;
  background:var(--ds-card);padding:12px 14px;box-shadow:0 2px 7px #36204f0c;
}
.ds-kpi { display:grid;align-content:space-between;gap:6px;background:linear-gradient(140deg,var(--ds-card),var(--ds-lavender));color:var(--ds-violet); }
.ds-kpi>div { display:flex;align-items:center;gap:7px;font-size:.85rem;font-weight:650;color:var(--ds-ink); }
.ds-kpi .ui-icon,.ds-action-grid .ui-icon { box-sizing:content-box;padding:5px;border-radius:8px;background:var(--ds-lavender); }
.ds-kpi strong { font-size:clamp(1.08rem,1.7vw,1.6rem);line-height:1.18; }
.ds-kpi strong small,.ds-watch-value small,.ds-positions strong small { font-size:.68em;white-space:nowrap; }
.ds-kpi>small,.bm-chart-footnote,.ds-flow-note,.ds-position-note,.ds-watch-copy small { font-size:.74rem;color:var(--ds-muted); }
.ds-kpi.ds-green { background:linear-gradient(140deg,var(--ds-card),#e7f7ed);color:var(--ds-positive); }
.ds-kpi.ds-red { background:linear-gradient(140deg,var(--ds-card),#fcebed);color:var(--ds-negative); }
.ds-green .ui-icon { color:var(--ds-positive);background:#e5f6eb; }
.ds-red .ui-icon { color:var(--ds-negative);background:#fae3e6; }
.ds-card h2 { display:flex;align-items:center;gap:7px;font-size:1rem;line-height:1.3;margin-bottom:8px; }
.ds-project,.ds-watch-row,.ds-action-grid button {
  display:grid;align-items:center;text-align:start;width:100%;min-width:0;color:var(--ds-ink);
  background:transparent;border:0;padding:5px 0;font-size:.84rem;
}
.ds-project { grid-template-columns:minmax(0,1fr) auto;gap:4px 8px; }
.ds-project span:first-child {font-weight:650;overflow-wrap:anywhere;}
.ds-project>b,.ds-summary .bm-link,.ds-text-action {color:var(--ds-violet);}
.ds-project .bm-progress-track {grid-column:1/-1;width:100%;height:6px;background:var(--ds-lavender);}
.ds-project .bm-progress-track span {display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#9b56df,var(--ds-violet));}
.ds-watch-row { grid-template-columns:20px minmax(0,1fr) minmax(0,auto) 9px;gap:6px;min-height:30px; }
.ds-watch-row+.ds-watch-row {border-top:1px solid var(--ds-line);}
.ds-watch-copy {display:grid;}
.ds-watch-value {text-align:end;font-weight:700;font-size:.88rem;}
.ds-count {background:var(--ds-lavender);color:var(--ds-violet);padding:2px 6px;border-radius:8px;font-size:.74rem;}
.ds-action-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:6px;}
.ds-action-grid button {display:flex;justify-content:center;gap:6px;border:1px solid var(--ds-line);background:linear-gradient(var(--ds-card),#faf8fd);border-radius:9px;font-weight:650;min-height:39px;padding:4px 6px;}
.ds-card .bm-link,.ds-text-action {display:inline-block;background:transparent;border:0;padding:6px 0;font-weight:650;font-size:.8rem;}
.ds-costs select {width:100%;max-width:100%;min-height:32px;background:var(--ds-card);border:1px solid var(--ds-line);border-radius:7px;padding:4px 8px;font-size:.8rem;}
.ds-summary .bm-cost-layout {gap:12px;flex-wrap:nowrap;margin:8px 0;}
.ds-summary .bm-donut {width:clamp(98px,10vw,140px);max-width:40%;flex:none;}
.ds-summary .bm-donut>div {max-width:85%;overflow-wrap:anywhere;}
.ds-summary .bm-donut strong {font-size:clamp(.72rem,1.1vw,1rem);}
.ds-summary .bm-cost-legend {min-width:0;gap:6px;}
.ds-summary .bm-cost-legend>div {gap:5px;padding:3px 0;}
.ds-summary .bm-cost-legend strong {white-space:nowrap;}
.ds-summary .ds-card>details,.ds-cost-results>details {margin:5px 0;font-size:.8rem;}
.ds-forecast .alert {padding:7px 10px;margin:6px 0;font-size:.83rem;line-height:1.4;}
.ds-forecast .ui-forecast-note,.ds-card .bm-chart-footnote {font-size:.72rem;color:var(--ds-muted);}
.ds-movements .bm-flow-values {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:0;}
.ds-movements .bm-flow-values>div {padding:6px 8px;min-width:0;}
.ds-movements .bm-flow-values span {font-size:.75rem;}
.ds-movements .bm-flow-values strong {font-size:1rem;white-space:normal;}
.ds-summary .bm-chart-bars {height:65px;margin-top:6px;}
.ds-summary .bm-chart-legend {margin:4px 0;font-size:.72rem;}
.ds-summary>.ds-details>summary,.ds-treasury>summary {min-height:26px;line-height:1.45;}
.ds-treasury>summary span {margin-inline-start:6px;color:var(--ds-muted);font-size:.78rem;}
.ds-positions {display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:8px;}
.ds-positions>div {display:flex;gap:8px;align-items:center;padding:8px;background:var(--ds-lavender);border-radius:8px;}
.ds-positions span {display:grid;}
.ds-chart {color:var(--ds-violet);margin-top:8px!important;}
.ds-chart svg {display:block;width:100%;height:58px;}
.ds-chart figcaption {display:flex;justify-content:space-between;font-size:.76rem;}
.ds-position-note {background:#fff5de;color:#704710;border-radius:8px;padding:6px 10px;}
.ds-summary>.ds-details[open]>summary {margin-bottom:10px;border-bottom:1px solid var(--ds-line);}
.ds-summary .bm-tiles,.ds-summary .financial-metrics {display:grid;grid-template-columns:repeat(auto-fit,minmax(155px,1fr));gap:7px;}
.ds-summary .bm-tile,.ds-summary .financial-metrics>div {min-height:0;padding:8px;border-radius:8px;}
.ds-summary .bm-tile-value {font-size:1rem;white-space:normal;}
.ds-summary .bm-tile-heading {font-size:.78rem;}
.ds-summary .bm-tile-icon {width:24px;height:24px;}
.ds-alert-group summary {padding:5px 0;}
.ds-alert-group b {margin-inline-start:6px;}
.ds-signal {display:inline-block;width:8px;height:8px;border-radius:50%;margin-inline-end:5px;background:#319961;}
.ds-signal.red {background:#ce394b;}.ds-signal.orange {background:#e59231;}
.ds-summary .dashboard-overdue-card {min-height:0;padding:9px;}
.ds-summary .dashboard-overdue-amount {font-size:1rem;}
.ds-summary .ds-details .alert {padding:7px 10px;margin:5px 0;}
@media(max-width:730px){
  .bm-dashboard-signature .ds-summary {gap:8px;}
  .ds-heading {min-height:72px;padding:10px 14px;}
  .ds-kpis {grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;}
  .ds-action-grid {grid-template-columns:repeat(3,minmax(0,1fr));}
  .ds-action-grid button {font-size:.75rem;}
  .ds-kpi,.ds-card,.ds-summary>.ds-details {padding:9px 10px;}
}
@media(max-width:590px){
  .ds-summary :is(.ds-projects,.ds-watch,.ds-costs,.ds-forecast) {grid-column:1/-1;}
  .ds-movements .bm-flow-values {grid-template-columns:1fr 1fr;}
  .ds-summary .bm-tiles,.ds-summary .financial-metrics {grid-template-columns:repeat(2,minmax(0,1fr));}
  .ds-summary .bm-task-table {min-width:0;overflow-wrap:anywhere;}
  .ds-summary .bm-task-table th,.ds-summary .bm-task-table td {padding:4px;font-size:.72rem;}
}
@media(max-width:339px){
  .ds-kpis,.ds-summary .bm-tiles,.ds-summary .financial-metrics {grid-template-columns:minmax(0,1fr);}
  .ds-action-grid {grid-template-columns:repeat(2,minmax(0,1fr));}
}
