/* =========================================================
   Samurai Store V1.45.3 · Dashboard clásico
   Capa visual aditiva. No modifica datos ni lógica.
   Reordena el Dashboard para acercarlo al panel anterior.
   ========================================================= */

@media (min-width:1001px){
  body.samurai-classic-admin #dashboardSection{
    display:flex;
    flex-direction:column;
  }

  /* Orden clásico ajustado: título -> Empezar mi día -> KPIs -> reportes */
  body.samurai-classic-admin #dashboardSection > .premium-page-head{order:0}
  body.samurai-classic-admin #dashboardSection > #dashboardLoading{order:1}
  body.samurai-classic-admin #dashboardSection > #dailyStartPanel{order:2}
  body.samurai-classic-admin #dashboardSection > .premium-kpis{order:3}
  body.samurai-classic-admin #dashboardSection > .analytics-toolbar{order:4}
  body.samurai-classic-admin #dashboardSection > .analytics-grid-main{order:5}
  body.samurai-classic-admin #dashboardSection > .premium-dashboard-grid{order:6}
  body.samurai-classic-admin #dashboardSection > .analytics-grid-secondary{order:7}
  body.samurai-classic-admin #dashboardSection > .premium-panel[style*="margin-bottom"]{order:8}
  body.samurai-classic-admin #dashboardSection > .premium-bottom-grid.dashboard-priority-grid{order:9}

  /* Encabezado más parecido al panel anterior */
  body.samurai-classic-admin #dashboardSection > .premium-page-head{
    min-height:48px!important;
    margin-bottom:12px!important;
    border-bottom:1px solid #151f34!important;
    padding:0 2px 10px!important;
  }
  body.samurai-classic-admin #dashboardSection > .premium-page-head h1{
    font-size:18px!important;
    font-weight:900!important;
  }

  /* Primera fila de métricas tipo panel viejo */
  body.samurai-classic-admin #dashboardSection .premium-kpis{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:14px!important;
    margin:0 0 14px!important;
  }
  body.samurai-classic-admin #dashboardSection .premium-kpi{
    min-height:122px!important;
    padding:14px 16px!important;
    border-radius:15px!important;
    position:relative!important;
    overflow:hidden!important;
  }
  body.samurai-classic-admin #dashboardSection .premium-kpi:nth-child(1){
    background:linear-gradient(135deg,#07172a 0%,#06101e 72%)!important;
  }
  body.samurai-classic-admin #dashboardSection .premium-kpi:nth-child(2){
    background:linear-gradient(135deg,#171018 0%,#090d1d 72%)!important;
  }
  body.samurai-classic-admin #dashboardSection .premium-kpi:nth-child(3){
    background:linear-gradient(135deg,#0e102b 0%,#080d1d 72%)!important;
  }
  body.samurai-classic-admin #dashboardSection .premium-kpi:nth-child(4){
    background:linear-gradient(135deg,#071927 0%,#07101c 72%)!important;
  }
  body.samurai-classic-admin #dashboardSection .premium-kpi-icon{
    width:36px!important;
    height:36px!important;
    margin-bottom:12px!important;
    border-radius:9px!important;
  }
  body.samurai-classic-admin #dashboardSection .premium-kpi-label{
    font-size:9px!important;
    letter-spacing:.035em!important;
    text-transform:uppercase!important;
  }
  body.samurai-classic-admin #dashboardSection .premium-kpi-value{
    font-size:28px!important;
    line-height:1.05!important;
  }
  body.samurai-classic-admin #dashboardSection .premium-kpi-foot{
    font-size:8px!important;
    color:#7485a6!important;
  }

  /* Selector de período compacto */
  body.samurai-classic-admin #dashboardSection .analytics-toolbar{
    width:auto!important;
    align-self:flex-end!important;
    margin:-55px 8px 15px 0!important;
    z-index:3!important;
    background:transparent!important;
    border:0!important;
    min-height:30px!important;
    padding:0!important;
  }
  body.samurai-classic-admin #dashboardSection .analytics-toolbar-left{display:none!important}
  body.samurai-classic-admin #dashboardSection .period-pills{
    padding:4px!important;
    border:1px solid #1c2942!important;
    border-radius:9px!important;
    background:#0c1322!important;
    gap:2px!important;
  }
  body.samurai-classic-admin #dashboardSection .period-pill{
    min-height:24px!important;
    padding:0 9px!important;
  }

  /* Gráficos principales grandes, como el dashboard anterior */
  body.samurai-classic-admin #dashboardSection .analytics-grid-main{
    grid-template-columns:minmax(0,1.55fr) minmax(320px,.85fr)!important;
    gap:14px!important;
    margin-bottom:14px!important;
  }
  body.samurai-classic-admin #dashboardSection .analytics-grid-main > .premium-panel{
    min-height:295px!important;
    padding:15px!important;
  }
  body.samurai-classic-admin #dashboardSection .chart-shell{min-height:230px!important}

  body.samurai-classic-admin #dashboardSection .premium-dashboard-grid,
  body.samurai-classic-admin #dashboardSection .analytics-grid-secondary{
    grid-template-columns:1fr 1fr!important;
    gap:14px!important;
    margin-bottom:14px!important;
  }
  body.samurai-classic-admin #dashboardSection .premium-dashboard-grid > .premium-panel,
  body.samurai-classic-admin #dashboardSection .analytics-grid-secondary > .premium-panel{
    min-height:245px!important;
  }

  /* Reporte numérico secundario más discreto */
  body.samurai-classic-admin #dashboardSection > .premium-panel[style*="margin-bottom"]{
    margin-bottom:14px!important;
  }
  body.samurai-classic-admin #dashboardSection .advanced-report-grid{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:8px!important;
  }
  body.samurai-classic-admin #dashboardSection .advanced-report-card{
    min-height:82px!important;
    border-radius:10px!important;
    padding:10px 12px!important;
  }

  /* Alertas / atención rápida debajo de estadísticas */
  body.samurai-classic-admin #dashboardSection .dashboard-priority-grid{
    grid-template-columns:minmax(0,1.45fr) minmax(320px,.65fr)!important;
    gap:14px!important;
    margin:0 0 14px!important;
  }

  /* Empezar mi día vuelve arriba, como acceso operativo principal */
  body.samurai-classic-admin #dailyStartPanel{
    margin-top:0!important;
    margin-bottom:14px!important;
    padding:12px!important;
    border-radius:12px!important;
  }
  body.samurai-classic-admin #dailyStartPanel .v1416-day-head{
    gap:10px!important;
    align-items:center!important;
  }
  body.samurai-classic-admin #dailyStartPanel .v1416-day-icon{
    width:30px!important;
    height:30px!important;
    font-size:15px!important;
  }
  body.samurai-classic-admin #dailyStartPanel h3{font-size:12px!important}
  body.samurai-classic-admin #dailyStartPanel .v1416-day-title p{font-size:8px!important}
  body.samurai-classic-admin #dailyStartPanel .v1417-today-snapshot{
    margin-top:9px!important;
    gap:7px!important;
  }
  body.samurai-classic-admin #dailyStartPanel .v1416-day-list{
    margin-top:9px!important;
  }
  body.samurai-classic-admin #dailyStartPanel .v1416-day-item{
    padding:8px 10px!important;
    border-radius:9px!important;
  }

  /* Topbar: más limpia, similar a la vieja */
  body.samurai-classic-admin #adminView .topbar-in{min-height:58px!important}
  body.samurai-classic-admin #adminView .premium-top-title strong{
    font-size:13px!important;
    font-weight:850!important;
  }
}

@media (max-width:1180px) and (min-width:1001px){
  body.samurai-classic-admin #dashboardSection .premium-kpis{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  body.samurai-classic-admin #dashboardSection .analytics-toolbar{
    margin:0 0 12px!important;
    align-self:stretch!important;
  }
  body.samurai-classic-admin #dashboardSection .analytics-grid-main,
  body.samurai-classic-admin #dashboardSection .dashboard-priority-grid{
    grid-template-columns:1fr!important;
  }
}
