body{
  font-family: 'Montserrat', sans-serif;
  background: #f4f6fb;
  color: #1b1f3b;
  overflow-x: hidden; /* Fix horizontal scroll on mobile */
  width: 100%;
}

html {
  overflow-x: hidden; /* Fix horizontal scroll on mobile */
  max-width: 100%;
}

.app-shell{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden; /* Ensure shell doesn't overflow */
  width: 100%;
}

.app-header{
  background: linear-gradient(135deg, #5c3cfa 0%, #a461f3 100%);
  color: #fff;
  padding: 0.75rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  box-shadow: 0 10px 30px rgba(92, 60, 250, 0.32);
}

.app-header-left{
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.app-menu-toggle{
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 14px;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease, transform 0.3s ease;
}

.app-menu-toggle:focus,
.app-menu-toggle:hover{
  background: rgba(255,255,255,0.25);
  transform: translateY(-2px);
  outline: none;
}

.app-brand{
  font-weight: 600;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  letter-spacing: 0.02em;
}

.app-header-right{
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.app-header-clock{
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,255,255,0.15);
  color: #fff;
  padding: 0.5rem 0.85rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  font-family: 'Montserrat', monospace;
}

.app-header-clock i{
  font-size: 1rem;
  opacity: 0.8;
}

.app-header-clock #clockTime{
  min-width: 85px;
  text-align: center;
}

/* Modal generar factura */
#generateInvoiceModal .invoice-preview{
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 15px;
}

#generateInvoiceModal .invoice-preview p{
  margin: 5px 0;
  font-size: 0.95rem;
}

#generateInvoiceModal .form-group{
  margin-bottom: 15px;
}

#generateInvoiceModal .input-group{
  display: flex;
}

#generateInvoiceModal .input-group-addon{
  background: #e9ecef;
  border: 1px solid #ced4da;
  border-right: none;
  padding: 10px 15px;
  border-radius: 6px 0 0 6px;
  font-weight: 600;
  color: #495057;
}

#generateInvoiceModal .input-group .form-control{
  border-radius: 0 6px 6px 0;
  font-size: 1.2rem;
  font-weight: 600;
  padding: 10px 15px;
}

#generateInvoiceModal .modal-footer .btn-success{
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  border: none;
  padding: 10px 20px;
  font-weight: 600;
}

.app-header-link{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  background: rgba(255,255,255,0.12);
  color: #fff;
  text-decoration: none;
  padding: 0.55rem 0.85rem;
  border-radius: 14px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: background 0.3s ease, transform 0.3s ease;
}

.app-header-link i{
  font-size: 1.1rem;
}

.app-header-link span{
  font-weight: 500;
}

.app-header-link:hover,
.app-header-link.is-active{
  background: rgba(255,255,255,0.25);
  transform: translateY(-2px);
}

.app-header-right .dropdown{
  position: relative;
}

.app-header-right .dropdown .dropdown-menu{
  background: #fff;
  border: none;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  padding: 0.5rem 0;
  margin-top: 0.5rem;
  min-width: 200px;
}

.app-header-right .dropdown .dropdown-menu li a{
  padding: 0.6rem 1.2rem;
  color: #1b1f3b;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.2s ease;
  font-size: 0.9rem;
}

.app-header-right .dropdown .dropdown-menu li a:hover{
  background: #f4f6fb;
  color: #5c3cfa;
}

.app-header-right .dropdown .dropdown-menu li a i{
  width: 20px;
  text-align: center;
}

.app-header-dropdown{
  position: relative;
}

.app-header-dropdown .dropdown-toggle{
  cursor: pointer;
}

.app-header-dropdown .dropdown-toggle::after{
  display: none;
}

/* Estilos para paneles de reportes */
.panel{
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}

.panel-heading{
  padding: 15px 20px;
  border-bottom: 1px solid #e0e0e0;
  background: #f8f9fa;
  border-radius: 8px 8px 0 0;
}

.panel-heading h4{
  margin: 0;
  font-weight: 600;
  color: #333;
}

.panel-primary .panel-heading{
  background: #2196F3;
  color: #fff;
  border: none;
}

.panel-info .panel-heading{
  background: #00BCD4;
  color: #fff;
  border: none;
}

.panel-success .panel-heading{
  background: #4CAF50;
  color: #fff;
  border: none;
}

.panel-body{
  padding: 20px;
}

.panel-body p{
  margin-bottom: 10px;
  color: #666;
}

.panel-body strong{
  color: #333;
}

/* Menú móvil acordeón */
.app-mobile-menu{
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.6);
  z-index: 10000;
  overflow: hidden;
  backdrop-filter: blur(2px);
}

.app-mobile-menu.active{
  display: block;
  animation: fadeInOverlay 0.3s ease;
}

@keyframes fadeInOverlay{
  from{ opacity: 0; }
  to{ opacity: 1; }
}

.mobile-menu-content{
  background: #fff;
  width: 85%;
  max-width: 320px;
  height: 100vh;
  padding: 0;
  box-shadow: 2px 0 20px rgba(0,0,0,0.3);
  overflow: hidden;
  animation: slideInMenu 0.3s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}

@keyframes slideInMenu{
  from{ transform: translateX(-100%); }
  to{ transform: translateX(0); }
}

.mobile-menu-header{
  background: linear-gradient(135deg, #5c3cfa 0%, #a461f3 100%);
  color: #fff;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.mobile-menu-header h3{
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.mobile-menu-close{
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.mobile-menu-close:hover{
  background: rgba(255,255,255,0.3);
}

.mobile-menu-scroll{
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 20px;
}

.mobile-menu-item{
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 20px;
  color: #333;
  text-decoration: none;
  border-bottom: 1px solid #f0f0f0;
  transition: all 0.2s;
  font-weight: 500;
  font-size: 0.95rem;
  min-height: 50px;
}

.mobile-menu-item:hover{
  background: #f8f9fa;
  color: #5c3cfa;
  padding-left: 25px;
}

.mobile-menu-item.is-active{
  background: rgba(92,60,250,0.1);
  color: #5c3cfa;
  border-left: 3px solid #5c3cfa;
  font-weight: 600;
}

.mobile-menu-item i:first-child{
  width: 24px;
  text-align: center;
  font-size: 1.2rem;
  color: #5c3cfa;
}

.mobile-menu-item span{
  flex: 1;
}

.mobile-menu-accordion{
  border-bottom: 1px solid #f0f0f0;
}

.mobile-menu-accordion-header{
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 20px;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s;
  font-weight: 500;
  font-size: 0.95rem;
  color: #333;
  min-height: 50px;
}

.mobile-menu-accordion-header:hover{
  background: #f8f9fa;
  padding-left: 25px;
}

.mobile-menu-accordion.active .mobile-menu-accordion-header{
  background: rgba(92,60,250,0.1);
  color: #5c3cfa;
  border-left: 3px solid #5c3cfa;
}

.mobile-menu-accordion-header i:first-child{
  width: 24px;
  text-align: center;
  font-size: 1.2rem;
  color: #5c3cfa;
}

.mobile-menu-accordion-header span{
  flex: 1;
}

.mobile-menu-accordion-header i:last-child{
  transition: transform 0.3s ease;
  font-size: 0.85rem;
  color: #999;
}

.mobile-menu-accordion.active .mobile-menu-accordion-header i:last-child{
  transform: rotate(180deg);
  color: #5c3cfa;
}

.mobile-menu-accordion-content{
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease;
  opacity: 0;
  background: #fafbfc;
}

.mobile-menu-accordion.active .mobile-menu-accordion-content{
  max-height: 500px;
  opacity: 1;
}

.mobile-menu-subitem{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px 12px 60px;
  color: #666;
  text-decoration: none;
  transition: all 0.2s;
  font-size: 0.9rem;
  border-bottom: 1px solid #f0f0f0;
  min-height: 44px;
}

.mobile-menu-subitem:hover{
  background: #f0f0f0;
  color: #5c3cfa;
  padding-left: 65px;
}

.mobile-menu-subitem.is-active{
  background: rgba(92,60,250,0.08);
  color: #5c3cfa;
  font-weight: 500;
  border-left: 3px solid #5c3cfa;
}

.mobile-menu-subitem i{
  width: 20px;
  text-align: center;
  font-size: 1rem;
  color: #5c3cfa;
}

/* Estilos del modal - Header con botones fijos */
#appointmentModal .modal-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 20px;
  border-bottom: 2px solid #e0e0e0;
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

#appointmentModal .modal-header-left{
  flex: 1;
  min-width: 0;
}

#appointmentModal .modal-header .modal-title{
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.3;
}

#appointmentModal .modal-header-actions{
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

#appointmentModal .modal-header-actions .btn{
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 6px;
  min-height: 36px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
}

#appointmentModal .modal-header-actions .btn-default{
  background: #f8f9fa;
  color: #495057;
  border: 1px solid #dee2e6;
}

#appointmentModal .modal-header-actions .btn-default:hover{
  background: #e9ecef;
  border-color: #ced4da;
}

#appointmentModal .modal-header-actions .btn-primary{
  background: linear-gradient(135deg, #5c3cfa 0%, #7c5cf5 100%);
  color: #fff;
  border: none;
  box-shadow: 0 2px 6px rgba(92, 60, 250, 0.25);
}

#appointmentModal .modal-header-actions .btn-primary:hover{
  background: linear-gradient(135deg, #4a2fd9 0%, #6a4fd9 100%);
  box-shadow: 0 4px 12px rgba(92, 60, 250, 0.35);
}

#appointmentModal .modal-header-actions .btn-danger{
  background: linear-gradient(135deg, #e74c3c 0%, #ee5a4a 100%);
  color: #fff;
  border: none;
  box-shadow: 0 2px 6px rgba(231, 76, 60, 0.25);
}

#appointmentModal .modal-header-actions .btn-danger:hover{
  background: linear-gradient(135deg, #c0392b 0%, #d04535 100%);
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.35);
}

#appointmentModal .modal-header .close{
  font-size: 1.8rem;
  opacity: 0.6;
  padding: 0;
  margin: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  order: 3;
}

#appointmentModal .modal-footer{
  display: none;
}

/* Estilos del modal para mobile */
@media (max-width: 768px){
  #appointmentModal.modal{
    padding: 0 !important;
    padding-right: 0 !important;
  }
  
  #appointmentModal .modal-dialog{
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100vh !important;
    display: flex;
    align-items: stretch;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    transform: none !important;
  }
  
  #appointmentModal .modal-content{
    border-radius: 0;
    border: none;
    height: 100vh;
    width: 100% !important;
    max-width: 100% !important;
    display: flex;
    flex-direction: column;
    max-height: 100vh;
    overflow: hidden;
    margin: 0;
    box-shadow: none;
  }
  
  /* Ajustes específicos para mobile */
  #appointmentModal .modal-header{
    padding: 10px 15px;
  }
  
  #appointmentModal .modal-header .modal-title{
    font-size: 1.1rem;
  }
  
  #appointmentModal .modal-header-actions{
    gap: 6px;
  }
  
  #appointmentModal .modal-header-actions .btn{
    padding: 6px 12px;
    font-size: 0.8rem;
    min-height: 32px;
  }
  
  #appointmentModal .modal-header .close{
    width: 32px;
    height: 32px;
    font-size: 1.6rem;
  }
  
  #appointmentModal .modal-body{
    padding: 20px;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 20px;
  }
  
  #appointmentModal .modal-body .row{
    margin-left: -10px;
    margin-right: -10px;
  }
  
  #appointmentModal .modal-body .row > [class*="col-"]{
    padding-left: 10px;
    padding-right: 10px;
  }
  
  #appointmentModal .modal-body .form-group{
    margin-bottom: 20px;
  }
  
  #appointmentModal .modal-body .form-label{
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    display: block;
  }
  
  #appointmentModal .modal-body .form-control{
    font-size: 1rem;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #ddd;
    min-height: 48px;
    -webkit-appearance: none;
    appearance: none;
  }
  
  #appointmentModal .modal-body .form-control:focus{
    border-color: #5c3cfa;
    box-shadow: 0 0 0 3px rgba(92, 60, 250, 0.1);
    outline: none;
  }
  
  #appointmentModal .modal-body textarea.form-control{
    min-height: 100px;
    resize: vertical;
  }
  
  #appointmentModal .modal-body .input-group{
    display: flex;
    align-items: stretch;
  }
  
  #appointmentModal .modal-body .input-group-addon{
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 8px 0 0 8px;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    color: #666;
  }
  
  #appointmentModal .modal-body .input-group .form-control{
    border-left: none;
    border-radius: 0 8px 8px 0;
  }
  
  #appointmentModal .modal-body .input-group .form-control:focus{
    border-left: 1px solid #5c3cfa;
  }
  
  #appointmentModal .modal-body .text-muted{
    font-size: 0.85rem;
    margin-top: 5px;
    color: #999;
  }
  
  #appointmentModal .modal-body select.form-control{
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
    padding-right: 40px;
  }
  
  /* Footer ya no se usa, los botones están en el header */
  #appointmentModal .modal-footer{
    display: none;
  }
  
  #appointmentModal .modal-footer .btn{
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 6px;
    border: none;
    transition: all 0.2s ease;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.01em;
  }
  
  #appointmentModal .modal-footer .btn-default{
    background: #f8f9fa;
    color: #495057;
    order: 1;
    border: 1px solid #dee2e6;
  }
  
  #appointmentModal .modal-footer .btn-default:active,
  #appointmentModal .modal-footer .btn-default:hover{
    background: #e9ecef;
    border-color: #ced4da;
    transform: translateY(-1px);
  }
  
  #appointmentModal .modal-footer .btn-primary{
    background: linear-gradient(135deg, #5c3cfa 0%, #7c5cf5 100%);
    color: #fff;
    order: 2;
    box-shadow: 0 2px 8px rgba(92, 60, 250, 0.25);
  }
  
  #appointmentModal .modal-footer .btn-primary:active,
  #appointmentModal .modal-footer .btn-primary:hover{
    background: linear-gradient(135deg, #4a2fd9 0%, #6a4fd9 100%);
    box-shadow: 0 4px 12px rgba(92, 60, 250, 0.35);
    transform: translateY(-1px);
  }
  
  #appointmentModal .modal-footer .btn-danger{
    background: linear-gradient(135deg, #e74c3c 0%, #ee5a4a 100%);
    color: #fff;
    order: 3;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.25);
  }
  
  #appointmentModal .modal-footer .btn-danger:active,
  #appointmentModal .modal-footer .btn-danger:hover{
    background: linear-gradient(135deg, #c0392b 0%, #d04535 100%);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.35);
    transform: translateY(-1px);
  }
  
  /* Ajustar columnas en móvil */
  #appointmentModal .modal-body .col-md-6,
  #appointmentModal .modal-body .col-md-12{
    width: 100%;
    flex: 0 0 100%;
    max-width: 100%;
    margin-bottom: 0;
  }
  
  /* Mejorar el backdrop del modal */
  #appointmentModal.modal.fade .modal-backdrop,
  #appointmentModal.modal.in .modal-backdrop,
  #appointmentModal.modal.show .modal-backdrop{
    background-color: rgba(0,0,0,0.5);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
  }
  
  /* Asegurar que el modal esté en la parte superior */
  #appointmentModal .modal-dialog{
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }
  
  /* Forzar ancho completo del modal */
  body.modal-open #appointmentModal{
    padding-right: 0 !important;
    overflow: hidden;
  }
  
  body.modal-open #appointmentModal .modal-dialog{
    transform: none !important;
    margin: 0 !important;
  }
  
  /* Asegurar que el backdrop no interfiera */
  #appointmentModal + .modal-backdrop{
    width: 100% !important;
    height: 100% !important;
  }
  
  /* Mejorar el scroll en iOS */
  #appointmentModal .modal-body{
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  
  /* Ajustar el tamaño del textarea */
  #appointmentModal .modal-body textarea{
    font-family: inherit;
    line-height: 1.5;
  }
  
  /* Mejorar los inputs de fecha y hora */
  #appointmentModal .modal-body input[type="date"],
  #appointmentModal .modal-body input[type="time"]{
    font-size: 1rem;
  }
  
  /* Ajustes adicionales para mobile si es necesario */
  
  /* Ocultar menú desktop en mobile */
  .app-header-right > a:not(.app-header-cta),
  .app-header-right > .dropdown{
    display: none !important;
  }
  
  .app-header-right{
    gap: 0.5rem;
    justify-content: flex-end;
  }
  
  .app-header-cta{
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }
  
  .app-header-cta .fa{
    margin-right: 0;
  }
  
  .app-header-cta span{
    display: none;
  }
  
  .app-brand{
    font-size: 0.95rem;
  }
  
  .app-brand i{
    font-size: 1rem;
  }
}

@media (min-width: 769px){
  .app-mobile-menu{
    display: none !important;
  }
}

/* Prevenir scroll del body cuando el menú está abierto */
body.menu-open{
  overflow: hidden;
}

.app-header-cta{
  border: none;
  border-radius: 999px;
  padding: 0.55rem 1.2rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 14px 24px rgba(17, 25, 104, 0.25);
  background: #fff;
  color: #5c3cfa;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.app-header-cta:hover{
  transform: translateY(-2px);
  box-shadow: 0 18px 28px rgba(17, 25, 104, 0.28);
}

.app-main{
  flex: 1;
  padding: 1.75rem 1.5rem 2.5rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.agenda-grid{
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr);
  gap: 1.5rem;
}

.agenda-card{
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 24px 45px rgba(18, 24, 78, 0.08);
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
}

.agenda-card-header{
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.1rem;
}

.agenda-card-title{
  font-size: 1.15rem;
  font-weight: 600;
  color: #292f50;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.agenda-card-title i{
  color: #5c3cfa;
}

.agenda-calendar{
  border-radius: 18px;
  overflow: hidden;
}

.fc-view-container,
.fc-widget-content,
.fc-event{
  font-family: 'Montserrat', sans-serif;
}

.fc-toolbar h2{
  font-size: 1.35rem;
  font-weight: 600;
  color: #1b1f3b;
}

.fc-button{
  border-radius: 999px !important;
  border: none !important;
  background: #f0ecff !important;
  color: #5c3cfa !important;
  text-transform: capitalize !important;
  box-shadow: none !important;
  padding: 0.35rem 0.85rem !important;
  transition: background 0.3s ease, transform 0.3s ease;
}

.fc-button:hover{
  background: #5c3cfa !important;
  color: #fff !important;
}

.fc-day-number{
  font-weight: 600;
  color: #292f50;
}

.fc-today{
  background: rgba(92, 60, 250, 0.09) !important;
}

.fc-day.is-selected{
  background: rgba(92, 60, 250, 0.18) !important;
}

.fc-day.is-selected .fc-day-number{
  background: #5c3cfa;
  color: #fff;
  border-radius: 50%;
  padding: 0.15rem 0.45rem;
}

.day-panel{
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.day-panel-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.day-panel-date{
  font-weight: 600;
  font-size: 1.05rem;
  color: #1b1f3b;
}

.day-panel-meta{
  font-size: 0.85rem;
  color: #6c7393;
  margin-top: 0.35rem;
}

.day-list{
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 540px;
  overflow-y: auto;
  padding-right: 0.35rem;
}

.day-list::-webkit-scrollbar{
  width: 6px;
}

.day-list::-webkit-scrollbar-thumb{
  background: rgba(92, 60, 250, 0.35);
  border-radius: 999px;
}

.day-list-item{
  border: 1px solid rgba(92, 60, 250, 0.15);
  border-radius: 18px;
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  background: #fdfdff;
}

.day-list-item-header{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.day-list-item-title{
  font-weight: 600;
  color: #2d335b;
}

.day-list-item-time{
  font-size: 0.85rem;
  color: #5c3cfa;
  font-weight: 600;
}

.day-list-item-meta{
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: #6c7393;
}

.day-list-item-actions{
  display: flex;
  gap: 0.5rem;
}

.day-list-item-actions .btn{
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
}

.badge-soft{
  background: rgba(92, 60, 250, 0.12);
  color: #5c3cfa;
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.fc-more{
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  color: #5c3cfa;
}

.fc-more:hover,
.fc-more:focus{
  color: #4a2ce0;
  text-decoration: none;
}

.reminder-panel{
  margin-top: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.reminder-header{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.reminder-range{
  background: rgba(92,60,250,0.12);
  color: #5c3cfa;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  align-self: flex-start;
}

.reminder-content{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.reminder-section-past{
  border-top: 2px solid #ffc107;
  background: #fffbf0;
}

.reminder-section-past .reminder-section-header h4{
  color: #f57c00;
}

.reminder-item-past{
  border-left: 3px solid #ffc107;
}

.reminder-item-actions-group{
  display: flex;
  gap: 8px;
  align-items: center;
}

.reminder-item-actions-group .btn{
  white-space: nowrap;
}

.reminder-section{
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.reminder-section-header{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.reminder-section-header h4{
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #2d335b;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.reminder-count{
  font-size: 0.82rem;
  color: #6c7393;
}

.reminder-list{
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.reminder-item{
  border: 1px solid rgba(92, 60, 250, 0.16);
  border-radius: 18px;
  padding: 0.9rem 1.05rem;
  background: #faf9ff;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.reminder-item-header{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.reminder-item-header h5{
  margin: 0;
  font-size: 1rem;
  color: #272d4f;
}

.reminder-item-meta{
  font-size: 0.82rem;
  color: #6c7393;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.reminder-item-body{
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  font-size: 0.85rem;
  color: #464b6b;
}

.reminder-item-body span{
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(92, 60, 250, 0.08);
  padding: 0.35rem 0.65rem;
  border-radius: 12px;
}

.reminder-hint{
  margin-top: 0.75rem;
  font-size: 0.82rem;
  color: #6c7393;
}

.btn-whatsapp{
  background: linear-gradient(135deg, #28d146, #1bb741);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.45rem 1.05rem;
  font-weight: 600;
  box-shadow: 0 12px 22px rgba(27, 183, 65, 0.3);
}

.btn-whatsapp:hover,
.btn-whatsapp:focus{
  color: #fff;
  background: linear-gradient(135deg, #1fb238, #179930);
  box-shadow: 0 16px 26px rgba(27, 183, 65, 0.35);
}

.day-events-modal .modal-body{
  padding-top: 1.25rem;
}

#dayEventsModalBody.day-list{
  max-height: 420px;
  overflow-y: auto;
  padding-right: 0.35rem;
}

#dayEventsModalBody.day-list::-webkit-scrollbar{
  width: 6px;
}

#dayEventsModalBody.day-list::-webkit-scrollbar-thumb{
  background: rgba(92, 60, 250, 0.35);
  border-radius: 999px;
}

.empty-state{
  border-radius: 18px;
  border: 1px dashed rgba(92,60,250,0.25);
  background: rgba(92,60,250,0.06);
  padding: 1.25rem;
  text-align: center;
  color: #6c7393;
  font-size: 0.9rem;
}

.app-floating-button{
  position: fixed;
  bottom: 1.75rem;
  right: 1.5rem;
  background: linear-gradient(135deg, #5c3cfa, #a461f3);
  color: #fff;
  border: none;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 18px 34px rgba(92, 60, 250, 0.35);
  z-index: 1050;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.app-floating-button:hover{
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 20px 38px rgba(92, 60, 250, 0.4);
}

.modal-content{
  border-radius: 22px;
  border: none;
  box-shadow: 0 30px 60px rgba(18, 24, 78, 0.22);
}

.modal-header{
  padding: 1.25rem 1.5rem 0.75rem;
  border-bottom: none;
}

.modal-title{
  font-weight: 600;
  color: #1b1f3b;
}

.modal-body{
  padding: 0.5rem 1.5rem 1.5rem;
}

.modal-footer{
  border-top: none;
  padding: 0 1.5rem 1.5rem;
  gap: 0.5rem;
}

.form-label{
  font-weight: 600;
  color: #2d335b;
}

.form-control,
.form-select,
textarea.form-control{
  border-radius: 12px;
  border: 1px solid rgba(92, 60, 250, 0.2);
  box-shadow: none;
  padding: 0.65rem 0.75rem;
}

.form-control:focus,
.form-select:focus{
  border-color: #5c3cfa;
  box-shadow: 0 0 0 2px rgba(92, 60, 250, 0.18);
}

.btn-default{
  background: #f0ecff;
  color: #5c3cfa;
  border-radius: 999px;
  border: none;
  padding: 0.45rem 1.25rem;
  font-weight: 600;
}

.btn-default:hover{
  background: #5c3cfa;
  color: #fff;
}

.btn-primary{
  background: linear-gradient(135deg, #5c3cfa, #a461f3);
  border: none;
  border-radius: 999px;
  padding: 0.45rem 1.2rem;
  font-weight: 600;
  box-shadow: 0 12px 24px rgba(92, 60, 250, 0.26);
}

.btn-primary:hover,
.btn-primary:focus{
  background: linear-gradient(135deg, #4e2fe8, #8c4ee1);
  box-shadow: 0 18px 30px rgba(92, 60, 250, 0.3);
}

.btn-outline{
  border: 1px solid rgba(92,60,250,0.4);
  border-radius: 999px;
  padding: 0.45rem 1.05rem;
  font-weight: 600;
  color: #5c3cfa;
  background: transparent;
  transition: background 0.2s ease, color 0.2s ease;
}

.btn-outline:hover,
.btn-outline:focus{
  background: rgba(92,60,250,0.1);
  color: #4e2fe8;
}

.btn-outline-danger{
  border: 1px solid rgba(239,78,110,0.6);
  color: #ef4e6e;
  border-radius: 999px;
  padding: 0.45rem 1.05rem;
  font-weight: 600;
  background: transparent;
  transition: background 0.2s ease, color 0.2s ease;
}

.btn-outline-danger:hover,
.btn-outline-danger:focus{
  background: rgba(239,78,110,0.12);
  color: #d93a59;
}

.btn-danger{
  border-radius: 999px;
}

.app-toast{
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  background: #1b1f3b;
  color: #fff;
  padding: 0.85rem 1.25rem;
  border-radius: 14px;
  box-shadow: 0 18px 32px rgba(17, 25, 104, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 2000;
}

.app-toast.is-visible{
  opacity: 1;
  transform: translate(-50%, -12px);
}

.app-toast.is-success{
  background: #12b76a;
}

.app-toast.is-error{
  background: #ef4e6e;
}

.today-alert-card{
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.today-alert-card .item{
  border: 1px solid rgba(92, 60, 250, 0.18);
  border-radius: 16px;
  padding: 1rem;
  background: #f8f7ff;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.today-alert-card .item-header{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: #2d335b;
}

.today-alert-card .item-body{
  display: grid;
  gap: 0.75rem;
}

.today-alert-card .item-actions{
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.client-content{
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.client-toolbar{
  display: flex;
  justify-content: flex-end;
}

.client-table{
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.client-table-header{
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(180px, 1fr) minmax(150px, 1fr) auto;
  gap: 0.75rem;
  padding: 0.75rem 1.1rem;
  background: #f4f5fb;
  color: #6c7393;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  border-radius: 16px;
}

.client-filter{
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.75rem 1.1rem;
  background: #fff;
  border: 1px solid rgba(92,60,250,0.08);
  border-radius: 16px;
  box-shadow: 0 10px 20px rgba(18,24,78,0.06);
}

.client-filter-label{
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #2d335b;
}

.client-filter input{
  border-radius: 12px;
  border: 1px solid rgba(92,60,250,0.25);
  padding: 0.6rem 0.75rem;
  box-shadow: none;
}

.client-filter input:focus{
  border-color: #5c3cfa;
  box-shadow: 0 0 0 2px rgba(92,60,250,0.18);
}

.client-list{
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.client-card{
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(92,60,250,0.08);
  box-shadow: 0 14px 28px rgba(18, 24, 78, 0.08);
  padding: 1rem 1.25rem;
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(180px, 1fr) minmax(150px, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.client-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(18, 24, 78, 0.12);
}

.client-card.is-complete{
  border-color: rgba(18, 183, 106, 0.35);
}

.client-card.is-partial{
  border-color: rgba(241, 169, 61, 0.4);
}

.client-card.is-minimal{
  border-color: rgba(239, 78, 110, 0.35);
}

.client-cell{
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.client-card-header{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.client-card-name{
  margin: 0;
  font-weight: 700;
  color: #262b4b;
  font-size: 1.05rem;
}

.client-badge{
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(92,60,250,0.12);
  color: #5c3cfa;
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  font-weight: 600;
}

.client-card-row{
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: #555a78;
  line-height: 1.4;
}

.client-card-row i{
  color: #5c3cfa;
}

.client-cell.client-actions{
  justify-self: flex-end;
}

.client-card-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.client-card-actions .btn{
  flex: 0 0 auto;
}

.client-form{
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.client-form .form-row{
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.client-form .form-field{
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.client-form label{
  font-weight: 600;
  color: #2d335b;
}

.client-form-radios{
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.client-form-radios .radio{
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
  color: #464b6b;
}

.client-form textarea{
  resize: vertical;
}

.form-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.form-actions .btn-link{
  color: #5c3cfa;
  font-weight: 600;
}

.form-actions .btn-link:hover{
  text-decoration: underline;
}

.day-panel-header .btn{
  align-self: flex-start;
  font-size: 0.78rem;
  padding: 0.4rem 0.9rem;
  box-shadow: none;
}

.label-inline{
  font-size: 0.75rem;
  color: #6c7393;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@media (max-width: 992px){
  .agenda-grid{
    grid-template-columns: 1fr;
  }
  .day-list{
    max-height: none;
  }
  .client-table-header{
    grid-template-columns: minmax(150px, 1.1fr) minmax(160px, 1fr) minmax(140px, 1fr) auto;
  }
  .client-list{
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
  .client-card{
    grid-template-columns: minmax(160px, 1.1fr) minmax(160px, 1fr) minmax(140px, 1fr) auto;
    gap: 0.6rem;
  }
  .client-card-actions{
    justify-content: flex-start;
  }
  .reminder-content{
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px){
  .app-header{
    padding: 0.75rem;
  }
  .app-menu-toggle{
    width: 36px;
    height: 36px;
  }
  .app-header-right{
    width: 100%;
    display: none;
  }
  .app-header-right.is-open{
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }
  .app-header-link{
    flex-direction: row;
    gap: 0.55rem;
    font-size: 0.88rem;
    padding: 0.55rem 0.75rem;
    width: 100%;
    justify-content: flex-start;
    background: rgba(255,255,255,0.18);
  }
  .app-header-link span{
    display: inline;
  }
  .app-header-cta{
    width: 100%;
    justify-content: center;
  }
  .app-main{
    padding: 1.25rem 1rem 2.5rem;
  }
  .app-floating-button{
    right: 1rem;
    bottom: 1.25rem;
  }
  .reminder-panel{
    margin-top: 1.25rem;
  }
  .reminder-item-body{
    flex-direction: column;
    align-items: flex-start;
  }
  .reminder-item-body span{
    width: 100%;
  }
  .client-table-header{
    display: none;
  }
  .client-card{
    grid-template-columns: 1fr;
    gap: 0.75rem;
    align-items: flex-start;
  }
  .client-cell{
    width: 100%;
    border-top: 1px dashed rgba(92,60,250,0.15);
    padding-top: 0.75rem;
  }
  .client-cell:first-child{
    border-top: none;
    padding-top: 0;
  }
  .client-cell.client-actions{
    width: 100%;
  }
  .client-card-actions{
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  .client-card-actions .btn{
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 480px){
  .app-header-link{
    flex: 1;
    justify-content: center;
  }
  .app-header-cta{
    font-size: 0.85rem;
  }
  .client-form .form-row{
    grid-template-columns: 1fr;
  }
}

