/* NexoProCRM v0.17.10 · Pulido móvil del dashboard
   Corrige el bloque PDF diario, compacta acciones rápidas y unifica el botón de fecha. */

/* Acciones rápidas: en escritorio se siguen viendo como parrilla; en móvil pasan a desplegable. */
.ch301-dashboard-actions-disclosure{
  display:block;
}
.ch301-dashboard-actions-disclosure > summary{
  display:none;
}
@media(min-width:861px){
  .ch301-dashboard-actions-disclosure:not([open]) > .ch301-dashboard-action-grid{
    display:grid!important;
  }
}

/* PDF diario: un solo formulario, sin desbordes y con la misma fecha para visualizar o descargar. */
.ch301-dashboard-export-panel .ch301-export-actions{
  max-width:100%!important;
}
.ch301-dashboard-export-form{
  display:grid!important;
  grid-template-columns:minmax(170px,190px) auto!important;
  align-items:end!important;
  gap:12px!important;
  margin:0!important;
  box-sizing:border-box!important;
}
.ch301-dashboard-export-form label,
.ch301-dashboard-export-form input,
.ch301-dashboard-export-form button{
  box-sizing:border-box!important;
  max-width:100%!important;
}
.ch301-dashboard-export-form input[type="date"]{
  min-width:0!important;
  width:100%!important;
}
.ch301-dashboard-pdf-buttons{
  display:flex;
  align-items:end;
  gap:10px;
  min-width:0;
}
.ch301-dashboard-pdf-buttons .ch301-btn{
  white-space:nowrap;
}

@media(max-width:860px){
  .ch301-dashboard-actions-panel .ch301-dashboard-section-head{
    margin-bottom:12px!important;
  }
  .ch301-dashboard-actions-disclosure{
    border:1px solid #dfe5ec;
    border-radius:16px;
    background:#f8fafc;
    overflow:hidden;
  }
  .ch301-dashboard-actions-disclosure > summary{
    min-height:58px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:0 14px;
    cursor:pointer;
    list-style:none;
    color:#202832;
    font-weight:900;
  }
  .ch301-dashboard-actions-disclosure > summary::-webkit-details-marker{
    display:none;
  }
  .ch301-dashboard-actions-disclosure > summary small{
    display:block;
    margin-top:2px;
    color:#667085;
    font-size:11px;
    font-weight:800;
  }
  .ch301-dashboard-actions-disclosure > summary:after{
    content:"⌄";
    flex:0 0 auto;
    width:30px;
    height:30px;
    display:grid;
    place-items:center;
    border-radius:999px;
    background:#fff;
    border:1px solid #dfe5ec;
    color:#d71920;
    font-size:18px;
    line-height:1;
    transition:transform .18s ease;
  }
  .ch301-dashboard-actions-disclosure[open] > summary:after{
    transform:rotate(180deg);
  }
  .ch301-dashboard-actions-disclosure:not([open]) > .ch301-dashboard-action-grid{
    display:none!important;
  }
  .ch301-dashboard-actions-disclosure[open] > .ch301-dashboard-action-grid{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:8px!important;
    padding:0 10px 10px!important;
  }
  .ch301-dashboard-actions-disclosure .ch301-dashboard-action{
    min-height:48px!important;
    justify-content:flex-start!important;
    padding:11px 14px!important;
    border-radius:12px!important;
    box-shadow:none!important;
  }

  .ch301-dashboard-export-panel{
    overflow:hidden!important;
  }
  .ch301-dashboard-export-panel .ch301-export-actions{
    width:100%!important;
    max-width:100%!important;
    margin-top:14px!important;
  }
  .ch301-dashboard-export-form{
    width:100%!important;
    max-width:100%!important;
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:10px!important;
    padding:12px!important;
    margin:0!important;
    overflow:hidden!important;
  }
  .ch301-dashboard-export-form label{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }
  .ch301-dashboard-export-form input[type="date"]{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    height:48px!important;
    padding:10px 12px!important;
    margin-top:7px!important;
    border-radius:12px!important;
    text-align:center;
    -webkit-appearance:none;
    appearance:none;
  }
  .ch301-dashboard-pdf-buttons{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:10px!important;
    width:100%!important;
    min-width:0!important;
  }
  .ch301-dashboard-pdf-buttons .ch301-btn{
    width:100%!important;
    max-width:100%!important;
    justify-content:center!important;
    margin:0!important;
    white-space:normal!important;
  }

  /* Evita que la navegación inferior tape el último bloque del dashboard en móvil. */
  .ch301-main{
    padding-bottom:calc(108px + env(safe-area-inset-bottom))!important;
  }
}

@media(max-width:420px){
  .ch301-dashboard-export-panel h2{
    font-size:24px!important;
    line-height:1.18!important;
  }
  .ch301-dashboard-export-panel p{
    font-size:15px!important;
    line-height:1.55!important;
  }
}


/* v0.17.10 · La fecha del PDF diario se comporta visualmente como un botón */
.ch301-dashboard-export-form input[type="date"]{
  min-height:48px!important;
  height:48px!important;
  padding:0 14px!important;
  border:1px solid #dfe5ec!important;
  border-radius:12px!important;
  background:#fff!important;
  color:#202832!important;
  font-family:Mulish,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
  font-size:14px!important;
  font-weight:900!important;
  line-height:48px!important;
  text-align:center!important;
  text-align-last:center!important;
  box-shadow:0 8px 18px rgba(17,24,39,.05)!important;
}
.ch301-dashboard-export-form input[type="date"]:focus{
  outline:none!important;
  border-color:#cbd5df!important;
  box-shadow:0 0 0 3px rgba(215,25,32,.10),0 8px 18px rgba(17,24,39,.05)!important;
}
.ch301-dashboard-export-form input[type="date"]::-webkit-date-and-time-value{
  text-align:center!important;
}
.ch301-dashboard-export-form input[type="date"]::-webkit-calendar-picker-indicator{
  opacity:.55;
}

@media(max-width:860px){
  .ch301-dashboard-export-form{
    background:#f8fafc!important;
    border-radius:16px!important;
  }
  .ch301-dashboard-export-form label{
    color:#202832!important;
    font-weight:900!important;
  }
  .ch301-dashboard-export-form input[type="date"],
  .ch301-dashboard-pdf-buttons .ch301-btn{
    min-height:52px!important;
    height:52px!important;
    border-radius:12px!important;
    font-size:15px!important;
    font-weight:900!important;
    box-shadow:0 8px 18px rgba(17,24,39,.05)!important;
  }
  .ch301-dashboard-export-form input[type="date"]{
    line-height:52px!important;
    margin-top:8px!important;
  }
}
