.sahl-dashboard {
  --dash-ink: #10283e;
  --dash-navy: #0a2540;
  --dash-navy-deep: #061a2d;
  --dash-blue: #315f86;
  --dash-accent: #e60012;
  --dash-green: #16865f;
  --dash-red: #c54848;
  --dash-line: #dfe6ed;
  --dash-muted: #68798b;
  max-width: 1440px;
  margin-inline: auto;
  color: var(--dash-ink);
  font-variant-numeric: tabular-nums;
}

.sahl-dashboard button { cursor: pointer; }
.sahl-dashboard button:focus-visible { outline: 3px solid rgba(230, 0, 18, .3); outline-offset: 3px; }

.sahl-dashboard-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 29px 31px 34px;
  border-radius: 25px 25px 9px 25px;
  color: #fff;
  background: var(--dash-navy-deep);
  box-shadow: 0 22px 52px rgba(6, 26, 45, .2);
}

.sahl-dashboard-hero::before,
.sahl-dashboard-hero::after {
  content: '';
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}

.sahl-dashboard-hero::before { width: 370px; height: 370px; top: -280px; right: 16%; background: rgba(49, 95, 134, .42); }
.sahl-dashboard-hero::after { width: 290px; height: 290px; left: -175px; bottom: -230px; background: rgba(230, 0, 18, .25); }
.sahl-dashboard-intro > span { display: block; margin-bottom: 5px; color: #ff9ca5; font-size: .69rem; font-weight: 900; letter-spacing: .06em; }
.sahl-dashboard-intro h2 { margin: 0; font-size: clamp(1.42rem, 3vw, 2.15rem); font-weight: 950; line-height: 1.25; letter-spacing: -.03em; text-wrap: balance; }
.sahl-dashboard-intro p { max-width: 62ch; margin: 8px 0 0; color: #d9e4ef; font-size: .82rem; font-weight: 600; line-height: 1.8; }
.sahl-dashboard-controls { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.sahl-period-switch { display: flex; gap: 3px; padding: 4px; border: 1px solid rgba(255, 255, 255, .17); border-radius: 11px; background: rgba(255, 255, 255, .07); }
.sahl-period-switch button { min-width: 58px; padding: 8px 10px; border: 0; border-radius: 7px; color: #cbd8e5; background: transparent; font-size: .7rem; font-weight: 850; transition: background .18s ease, color .18s ease, transform .18s ease; }
.sahl-period-switch button:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.sahl-period-switch button.active { color: #fff; background: var(--dash-accent); box-shadow: 0 5px 14px rgba(0, 0, 0, .18); }
.sahl-period-switch button:active { transform: scale(.97); }
.sahl-print-button { padding: 11px 14px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 10px; color: #fff; background: rgba(255, 255, 255, .08); font-size: .72rem; font-weight: 850; transition: background .18s ease, transform .18s ease; }
.sahl-print-button:hover { background: rgba(255, 255, 255, .15); transform: translateY(-1px); }

.sahl-dashboard-launchpad { display: grid; grid-template-columns: minmax(0, 1fr) 318px; gap: 14px; align-items: stretch; margin-top: 16px; }
.sahl-quick-panel,
.sahl-modules,
.sahl-cash-card,
.sahl-attention-card,
.sahl-week-card,
.sahl-top-products,
.sahl-activity { border: 1px solid var(--dash-line); background: #fff; box-shadow: 0 12px 30px rgba(10, 37, 64, .065); }
.sahl-quick-panel { padding: 21px 22px 24px; border-radius: 18px 18px 7px 18px; }
.sahl-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.sahl-section-heading span { display: block; color: var(--dash-muted); font-size: .64rem; font-weight: 850; letter-spacing: .04em; }
.sahl-section-heading h3 { margin: 3px 0 0; color: var(--dash-ink); font-size: 1.03rem; font-weight: 950; line-height: 1.35; }
.sahl-section-heading > button { padding: 5px 0; border: 0; color: #315f86; background: transparent; font-size: .68rem; font-weight: 850; transition: color .18s ease, transform .18s ease; }
.sahl-section-heading > button:hover { color: var(--dash-navy-deep); transform: translateX(-2px); }
.sahl-quick-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.sahl-quick-action { position: relative; min-width: 0; min-height: 102px; padding: 13px 11px 12px; border: 1px solid #e1e7ed; border-radius: 13px 13px 5px 13px; text-align: right; color: var(--dash-ink); background: #f9fafc; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease; }
.sahl-quick-action:hover { z-index: 1; transform: translateY(-3px); border-color: #c4d2df; background: #fff; box-shadow: 0 12px 24px rgba(16, 40, 62, .11); }
.sahl-quick-action:active { transform: translateY(0) scale(.98); }
.sahl-quick-action > b { display: grid; place-items: center; width: 31px; height: 31px; margin-bottom: 12px; border-radius: 9px 9px 3px 9px; color: #244867; background: #e5edf4; font-size: 1.05rem; font-weight: 900; }
.sahl-quick-action > span,
.sahl-quick-action > small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sahl-quick-action > span { font-size: .76rem; font-weight: 900; }
.sahl-quick-action > small { margin-top: 4px; color: var(--dash-muted); font-size: .61rem; font-weight: 700; }
.sahl-quick-primary { color: #fff; border-color: #0a2540; background: #0a2540; }
.sahl-quick-primary:hover { border-color: #061a2d; background: #061a2d; }
.sahl-quick-primary > b { color: #a9000d; background: #ffdce0; }
.sahl-quick-primary > small { color: #cfdae5; }
.sahl-quick-purchase > b { color: #9a5811; background: #ffead1; }
.sahl-quick-payment > b { color: #a9000d; background: #fde1e4; }

.sahl-modules { overflow: hidden; padding: 9px; border-radius: 18px 18px 18px 7px; background: #f1f4f7; }
.sahl-modules header { padding: 8px 9px 12px; }
.sahl-modules header span,
.sahl-modules header strong { display: block; }
.sahl-modules header span { color: var(--dash-muted); font-size: .63rem; font-weight: 800; }
.sahl-modules header strong { margin-top: 3px; font-size: .98rem; font-weight: 950; }
.sahl-modules > button { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; min-height: 57px; padding: 9px 10px; border: 0; border-top: 1px solid #e2e7ed; text-align: right; color: var(--dash-ink); background: transparent; transition: background .18s ease, transform .18s ease; }
.sahl-modules > button:hover { border-radius: 10px; background: #fff; transform: translateX(-2px); }
.sahl-modules > button > b { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px 10px 4px 10px; color: #fff; background: var(--dash-navy); font-size: 1rem; }
.sahl-modules > button span strong,
.sahl-modules > button span small { display: block; }
.sahl-modules > button span strong { font-size: .75rem; font-weight: 900; }
.sahl-modules > button span small { margin-top: 3px; color: var(--dash-muted); font-size: .6rem; font-weight: 700; }
.sahl-modules > button em { color: #94a0ad; font-style: normal; font-weight: 900; }

.sahl-metrics { overflow: hidden; display: grid; grid-template-columns: 1.2fr repeat(5, minmax(0, 1fr)); gap: 1px; margin-top: 14px; border: 1px solid var(--dash-line); border-radius: 16px 16px 6px 16px; background: var(--dash-line); box-shadow: 0 10px 25px rgba(10, 37, 64, .05); }
.sahl-metric { position: relative; min-width: 0; padding: 17px 17px 19px; background: #fff; }
.sahl-metric::after { content: ''; position: absolute; right: 0; bottom: 0; width: 100%; height: 3px; background: #cad4de; }
.sahl-metric span,
.sahl-metric small { display: block; color: var(--dash-muted); font-size: .62rem; font-weight: 750; }
.sahl-metric strong { display: block; overflow: hidden; margin: 8px 0 5px; font-size: clamp(.94rem, 1.7vw, 1.26rem); font-weight: 950; text-overflow: ellipsis; white-space: nowrap; direction: ltr; text-align: right; }
.sahl-metric-primary { color: #fff; background: var(--dash-navy); }
.sahl-metric-primary span,
.sahl-metric-primary small { color: #d2dee8; }
.sahl-metric-primary::after { background: var(--dash-accent); }
.sahl-metric-purchase::after { background: #d98222; }
.sahl-metric-success::after { background: var(--dash-green); }
.sahl-metric-danger::after { background: var(--dash-red); }

.sahl-dashboard-operations { display: grid; grid-template-columns: 1.08fr .92fr 1fr; gap: 14px; margin-top: 14px; }
.sahl-cash-card,
.sahl-attention-card,
.sahl-week-card,
.sahl-top-products,
.sahl-activity { padding: 20px; border-radius: 17px 17px 7px 17px; }
.sahl-cash-total { display: block; margin-top: 4px; color: var(--dash-navy); font-size: clamp(1.75rem, 3vw, 2.35rem); font-weight: 950; direction: ltr; text-align: right; letter-spacing: -.035em; }
.sahl-cash-card > p { margin: 6px 0 17px; color: var(--dash-muted); font-size: .68rem; font-weight: 700; line-height: 1.6; }
.sahl-cash-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin: 0; }
.sahl-cash-card dl div { padding: 10px 11px; border-radius: 9px 9px 4px 9px; background: #f4f7f9; }
.sahl-cash-card dt { color: var(--dash-muted); font-size: .6rem; font-weight: 750; }
.sahl-cash-card dd { margin: 4px 0 0; font-size: .77rem; font-weight: 900; direction: ltr; text-align: right; }
.sahl-cash-card footer { margin: 13px -20px -20px; padding: 11px 20px; color: #5d6f80; background: #edf2f6; font-size: .65rem; font-weight: 850; }
.sahl-attention-list { display: grid; gap: 7px; }
.sahl-status { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto 18px; align-items: center; gap: 9px; min-height: 50px; width: 100%; padding: 8px 9px; border: 0; border-radius: 9px; text-align: right; color: var(--dash-ink); background: #f7f9fb; transition: transform .18s ease, background .18s ease; }
.sahl-status:hover { transform: translateX(-2px); background: #edf2f6; }
.sahl-status i { width: 7px; height: 7px; border-radius: 2px; background: #91a0b0; }
.sahl-status span { color: #536174; font-size: .67rem; font-weight: 780; }
.sahl-status strong { font-size: .72rem; font-weight: 950; }
.sahl-status b { color: #95a1ad; }
.sahl-status-warning i { background: #e39a29; }
.sahl-status-danger i { background: var(--dash-red); }
.sahl-status-ok i { background: var(--dash-green); }
.sahl-week-card { min-width: 0; }
.sahl-week-bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; min-height: 182px; padding-top: 11px; }
.sahl-week-bars > div { display: grid; grid-template-rows: 146px auto; gap: 7px; min-width: 0; text-align: center; }
.sahl-week-bars > div > span { display: flex; align-items: flex-end; justify-content: center; overflow: hidden; border-radius: 7px 7px 3px 3px; background: #edf2f6; }
.sahl-week-bars i { display: block; width: 72%; min-height: 4px; border-radius: 6px 6px 2px 2px; background: var(--dash-blue); box-shadow: inset 0 1px rgba(255, 255, 255, .3); transition: height .3s ease; }
.sahl-week-bars > div:last-child i { background: var(--dash-accent); }
.sahl-week-bars small { overflow: hidden; color: var(--dash-muted); font-size: .57rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }

.sahl-dashboard-bottom { display: grid; grid-template-columns: .82fr 1.18fr; gap: 14px; margin-top: 14px; }
.sahl-top-products ol { margin: 0; padding: 0; list-style: none; }
.sahl-top-products li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 9px; min-height: 49px; border-top: 1px solid #e8edf2; }
.sahl-top-products li > b { color: #a5aeba; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .65rem; }
.sahl-top-products li > span { overflow: hidden; font-size: .7rem; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
.sahl-top-products li > strong { font-size: .67rem; font-weight: 900; }
.sahl-activity > div > article { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto; align-items: center; gap: 11px; min-height: 51px; border-top: 1px solid #e8edf2; }
.sahl-activity > div > article > b { padding: 5px 6px; border-radius: 5px; color: #315b80; background: #e7eef4; font-size: .57rem; text-align: center; }
.sahl-activity article span strong,
.sahl-activity article span small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sahl-activity article span strong { font-size: .7rem; font-weight: 900; }
.sahl-activity article span small { margin-top: 3px; color: var(--dash-muted); font-size: .59rem; font-weight: 700; }
.sahl-activity article em { font-size: .66rem; font-style: normal; font-weight: 900; direction: ltr; }
.sahl-activity article time { color: #8b98a6; font-size: .56rem; font-weight: 750; white-space: nowrap; }
.sahl-dashboard-empty { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 140px; color: #8b98a6; font-size: .7rem; font-weight: 800; }
.sahl-dashboard-empty b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: #eef2f6; }

@media (max-width: 1180px) {
  .sahl-quick-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sahl-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sahl-dashboard-operations { grid-template-columns: 1fr 1fr; }
  .sahl-week-card { grid-column: 1 / -1; }
}

@media (max-width: 850px) {
  .sahl-dashboard-hero { align-items: flex-start; flex-direction: column; }
  .sahl-dashboard-controls { width: 100%; justify-content: space-between; }
  .sahl-dashboard-launchpad { grid-template-columns: 1fr; }
  .sahl-modules { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .sahl-modules header { grid-column: 1 / -1; }
  .sahl-modules > button { display: flex; flex-direction: column; justify-content: center; gap: 6px; min-height: 94px; border-top: 1px solid #e2e7ed; text-align: center; }
  .sahl-modules > button span small,
  .sahl-modules > button em { display: none; }
  .sahl-dashboard-bottom { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .sahl-dashboard { margin: -4px; }
  .sahl-dashboard-hero { gap: 20px; padding: 23px 18px 26px; border-radius: 19px 19px 7px 19px; }
  .sahl-dashboard-intro h2 { font-size: 1.45rem; }
  .sahl-dashboard-controls { align-items: stretch; flex-direction: column; }
  .sahl-period-switch { display: grid; grid-template-columns: repeat(3, 1fr); }
  .sahl-period-switch button { min-width: 0; }
  .sahl-print-button { width: 100%; }
  .sahl-quick-panel { padding: 18px 14px 16px; }
  .sahl-quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sahl-quick-action { min-height: 93px; }
  .sahl-modules { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sahl-metrics { grid-template-columns: 1fr 1fr; }
  .sahl-metric { padding: 14px 12px 16px; }
  .sahl-metric strong { font-size: .98rem; }
  .sahl-dashboard-operations { grid-template-columns: 1fr; }
  .sahl-week-card { grid-column: auto; }
  .sahl-cash-card,
  .sahl-attention-card,
  .sahl-week-card,
  .sahl-top-products,
  .sahl-activity { padding: 17px 14px; }
  .sahl-cash-card footer { margin: 13px -14px -17px; padding-inline: 14px; }
  .sahl-activity > div > article { grid-template-columns: 38px minmax(0, 1fr) auto; }
  .sahl-activity article em { display: none; }
  .sahl-week-bars { gap: 5px; }
}

@media print {
  .sahl-dashboard-controls,
  .sahl-dashboard-launchpad,
  .sahl-dashboard-bottom,
  .sahl-section-heading button { display: none !important; }
  .sahl-dashboard-hero { color: #111; background: #fff; box-shadow: none; }
  .sahl-dashboard-intro > span,
  .sahl-dashboard-intro p { color: #444; }
}
