@media (min-width: 768px) {
  body:has(.desktop-dashboard) main {
    max-width: 1700px;
    padding: 22px 26px 34px;
  }
  .desktop-dashboard {
    display: grid;
    gap: 16px;
    color: #17233b;
  }
  .desktop-dashboard button,
  .desktop-dashboard select {
    font: inherit;
  }
  .desktop-panel,
  .desktop-kpi {
    background: #fff;
    border: 1px solid #e4e9ef;
    border-radius: 16px;
    box-shadow: 0 6px 22px rgba(30, 46, 70, 0.055);
  }
  .desktop-kpis {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
  }
  .desktop-kpi {
    position: relative;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 11px;
    min-width: 0;
    min-height: 126px;
    padding: 16px;
  }
  .desktop-kpi-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: #e5f9f4;
    color: #079b7b;
  }
  .desktop-kpi-icon svg {
    width: 21px;
  }
  .desktop-kpi > div {
    min-width: 0;
  }
  .desktop-kpi > div > * {
    display: block;
  }
  .desktop-kpi > div > small {
    color: #6f7d91;
    font-size: 0.72rem;
  }
  .desktop-kpi strong {
    margin: 6px 0 3px;
    font-size: clamp(1.15rem, 1.5vw, 1.55rem);
    line-height: 1.05;
    overflow-wrap: anywhere;
    font-variant-numeric: tabular-nums;
  }
  .desktop-kpi em {
    color: #7b8797;
    font-size: 0.7rem;
    font-style: normal;
  }
  .desktop-kpi.danger strong {
    color: #df3848;
  }
  .desktop-kpi-static {
    position: absolute;
    right: 14px;
    bottom: 14px;
    color: #a3adba;
  }
  .desktop-kpi-compare {
    grid-column: 1/-1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    margin-top: auto;
  }
  .desktop-kpi-compare small {
    font-size: 0.63rem;
    color: #8490a0;
  }
  .desktop-kpi-trend {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 4px 7px;
    border-radius: 99px;
    font-size: 0.66rem;
    font-weight: 800;
  }
  .desktop-kpi-trend svg {
    width: 12px;
    height: 12px;
  }
  .desktop-kpi-trend.positive {
    background: #e3f8f1;
    color: #078461;
  }
  .desktop-kpi-trend.negative {
    background: #fee9ec;
    color: #c73140;
  }
  .desktop-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 17px;
  }
  .desktop-panel-head h3 {
    margin: 0;
    font-size: 0.96rem;
  }
  .desktop-panel-head button {
    display: flex;
    align-items: center;
    gap: 4px;
    border: 0;
    background: #f3f6f8;
    color: #344052;
    border-radius: 9px;
    padding: 8px 10px;
    font-size: 0.7rem;
    font-weight: 750;
  }
  .desktop-panel-head button svg {
    width: 14px;
  }
  .desktop-performance-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.9fr) minmax(260px, 0.72fr) minmax(
        300px,
        0.85fr
      );
    gap: 14px;
    align-items: stretch;
  }
  .desktop-sales-performance {
    position: relative;
    padding-bottom: 14px;
  }
  .desktop-sales-performance > label {
    position: absolute;
    right: 16px;
    top: 11px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #748096;
    font-size: 0.7rem;
  }
  .desktop-sales-performance select {
    height: 36px;
    border: 1px solid #dfe5ec;
    border-radius: 9px;
    background: #fff;
    padding: 0 26px 0 9px;
    color: #344052;
  }
  .desktop-performance-value {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 17px;
  }
  .desktop-performance-value > strong {
    font-size: 1.65rem;
  }
  .desktop-chart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 142px;
    gap: 12px;
    padding: 8px 14px 0;
  }
  .desktop-sales-chart svg {
    display: block;
    width: 100%;
    height: 220px;
    overflow: visible;
  }
  .desktop-sales-chart .chart-grid {
    stroke: #e7ecf0;
    stroke-width: 1;
  }
  .desktop-sales-chart .chart-area {
    fill: url(#desktopChartFill);
  }
  .desktop-sales-chart .chart-line {
    fill: none;
    stroke: #0ba783;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .desktop-sales-chart circle {
    fill: #0ba783;
    stroke: #fff;
    stroke-width: 2;
  }
  .desktop-sales-chart text {
    fill: #7b8798;
    font-size: 10px;
  }
  .desktop-chart-layout aside {
    display: grid;
    align-content: center;
    gap: 9px;
    padding: 12px;
    border-radius: 13px;
    background: #f6f8fa;
  }
  .desktop-chart-layout aside span {
    display: grid;
    gap: 3px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e7ec;
  }
  .desktop-chart-layout aside span:last-child {
    border: 0;
  }
  .desktop-chart-layout aside small {
    color: #7b8798;
    font-size: 0.66rem;
  }
  .desktop-chart-layout aside b {
    font-size: 0.82rem;
  }
  .desktop-chart-layout aside em {
    font-size: 0.7rem;
    color: #079b7b;
    font-style: normal;
  }
  .desktop-finance > div {
    display: grid;
    padding: 0 16px 15px;
  }
  .desktop-finance span {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 15px 4px;
    border-top: 1px solid #edf0f3;
  }
  .desktop-finance small {
    color: #6e7a8c;
  }
  .desktop-finance b {
    font-size: 0.78rem;
    text-align: right;
  }
  .desktop-finance b.positive {
    color: #078461;
  }
  .desktop-finance b.negative {
    color: #d93645;
  }
  .desktop-finance b em {
    display: block;
    color: #9aa4b2;
    font-size: 0.58rem;
    font-style: normal;
  }
  .desktop-finance .forecast {
    margin-top: 6px;
    padding: 14px 11px;
    border: 0;
    border-radius: 11px;
    background: #e8f9f4;
  }
  .desktop-finance .forecast b {
    color: #078461;
  }
  .desktop-top-products > div {
    display: grid;
    padding: 0 16px 14px;
  }
  .desktop-top-products article {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) 48px 76px;
    align-items: center;
    gap: 7px;
    padding: 10px 0;
    border-top: 1px solid #edf0f3;
  }
  .desktop-top-products article > span {
    display: grid;
    place-items: center;
    width: 23px;
    height: 23px;
    border-radius: 50%;
    background: #e4f8f2;
    color: #078461;
    font-size: 0.67rem;
    font-weight: 850;
  }
  .desktop-top-products b {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.75rem;
  }
  .desktop-top-products small {
    color: #748096;
    text-align: right;
    font-size: 0.65rem;
  }
  .desktop-top-products strong {
    text-align: right;
    font-size: 0.7rem;
  }
  .desktop-quick-actions {
    padding-bottom: 13px;
  }
  .desktop-quick-actions > div {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    padding: 0 14px;
  }
  .desktop-quick-actions > div > button {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    min-width: 0;
    padding: 11px;
    border: 1px solid transparent;
    border-radius: 11px;
    background: #f7f9fb;
    color: #17233b;
    text-align: left;
  }
  .desktop-quick-actions > div > button:hover {
    border-color: #aee7d9;
    background: #edfaf6;
  }
  .desktop-quick-actions svg {
    width: 20px;
    color: #079b7b;
  }
  .desktop-quick-actions span > * {
    display: block;
  }
  .desktop-quick-actions b {
    font-size: 0.74rem;
  }
  .desktop-quick-actions small {
    margin-top: 3px;
    color: #788497;
    font-size: 0.61rem;
  }
  .desktop-command-grid {
    display: grid;
    grid-template-columns: 1.05fr 1fr 0.95fr;
    gap: 14px;
  }
  .desktop-table {
    padding: 0 16px 13px;
  }
  .desktop-table-head,
  .desktop-table article {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr) 58px 72px;
    align-items: center;
    gap: 8px;
  }
  .desktop-table-head {
    padding: 8px 0;
    color: #7a8698;
    font-size: 0.62rem;
    text-transform: uppercase;
  }
  .desktop-table article {
    padding: 10px 0;
    border-top: 1px solid #edf0f3;
  }
  .desktop-table time,
  .desktop-table b,
  .desktop-table strong {
    font-size: 0.69rem;
  }
  .desktop-table b {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .desktop-table strong {
    text-align: right;
  }
  .desktop-status {
    justify-self: start;
    padding: 4px 7px;
    border-radius: 99px;
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: capitalize;
  }
  .desktop-status.paid {
    background: #e1f8f0;
    color: #087d62;
  }
  .desktop-status.debt {
    background: #fff0d8;
    color: #9a6100;
  }
  .desktop-alerts > div {
    display: grid;
    padding: 0 14px 13px;
  }
  .desktop-alerts button {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 9px;
    padding: 10px;
    border: 0;
    border-radius: 10px;
    background: #f6f8fa;
    color: #17233b;
    text-align: left;
    margin-bottom: 6px;
  }
  .desktop-alerts button > svg:first-child {
    padding: 8px;
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }
  .desktop-alerts button > svg:last-child {
    width: 16px;
    color: #7d8999;
  }
  .desktop-alerts button span > * {
    display: block;
  }
  .desktop-alerts button b {
    font-size: 0.7rem;
  }
  .desktop-alerts button small {
    margin-top: 2px;
    color: #748096;
    font-size: 0.6rem;
  }
  .desktop-alerts button.danger {
    background: #fff0f2;
  }
  .desktop-alerts button.danger > svg:first-child {
    color: #d93645;
    background: #ffe0e4;
  }
  .desktop-alerts button.warning {
    background: #fff7e8;
  }
  .desktop-alerts button.warning > svg:first-child {
    color: #b06c00;
    background: #ffedc8;
  }
  .desktop-alerts button.info > svg:first-child {
    color: #235fc0;
    background: #e8f0ff;
  }
  .desktop-alerts button.violet > svg:first-child {
    color: #7042bd;
    background: #f0e9ff;
  }
  .desktop-crm-summary > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 0 14px 14px;
  }
  .desktop-crm-summary article {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border-radius: 10px;
    background: #f6f8fa;
  }
  .desktop-crm-summary article > svg {
    width: 18px;
    color: #079b7b;
  }
  .desktop-crm-summary span > * {
    display: block;
  }
  .desktop-crm-summary b {
    font-size: 0.9rem;
  }
  .desktop-crm-summary small {
    color: #748096;
    font-size: 0.62rem;
  }
  .desktop-campaign-summary {
    padding-bottom: 14px;
  }
  .desktop-campaign-summary > div {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 9px;
    padding: 0 14px;
  }
  .desktop-campaign-summary article {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 70px;
    border-radius: 11px;
    background: #f6f8fa;
  }
  .desktop-campaign-summary article > svg {
    width: 20px;
    color: #079b7b;
  }
  .desktop-campaign-summary span > * {
    display: block;
  }
  .desktop-campaign-summary b {
    font-size: 1rem;
  }
  .desktop-campaign-summary small {
    color: #748096;
    font-size: 0.64rem;
  }
  .desktop-empty {
    margin: 16px;
    color: #7b8798;
    text-align: center;
  }
}
@media (min-width: 768px) and (max-width: 1180px) {
  .desktop-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .desktop-performance-grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(250px, 0.8fr);
  }
  .desktop-top-products {
    grid-column: 1/-1;
  }
  .desktop-command-grid {
    grid-template-columns: 1fr 1fr;
  }
  .desktop-crm-summary {
    grid-column: 1/-1;
  }
  .desktop-quick-actions > div {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 768px) and (max-width: 900px) {
  .desktop-performance-grid,
  .desktop-command-grid {
    grid-template-columns: 1fr;
  }
  .desktop-chart-layout {
    grid-template-columns: 1fr;
  }
  .desktop-chart-layout aside {
    grid-template-columns: repeat(4, 1fr);
  }
  .desktop-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .desktop-campaign-summary > div {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (prefers-reduced-motion: reduce) {
  .desktop-dashboard * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
