/*
 * --------------------------------
 * VARIABLES Y ESTILOS BASE
 * --------------------------------
 */
:root {
  --color-primary: #07162d;
  --color-secondary: #9e1428;
  --color-black: #07080a;
  --color-green: #50AF70;
  --color-highlight: #ffc857;
  --color-background: #f5f5f5;
  --color-text-light: #f1f5f9;
  --color-text-dark: #1e293b;
  --color-secondary-rgb: 158, 20, 40;
  --color-success: #4caf50;
  --color-warning: #ff9800;
}

body {
  font-family: 'Barlow', sans-serif;
  background-color: var(--color-background);
  color: var(--color-text-dark);
  overflow-x: hidden;
}

/*
 * --------------------------------
 * ESTILOS DE SCROLLBAR
 * --------------------------------
 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #e2e8f0;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/*
 * --------------------------------
 * COMPONENTES GENERALES Y TRANSICIONES
 * --------------------------------
 */
.kanban-card,
.promo-card,
.sidebar-ad-image,
.tool-card-button {
  border-radius: 0.5rem;
}

.stat-card,
.client-card,
.service-card,
.tool-card,
.sidebar-ad-image {
  transition: transform 0.3s ease-in-out;
}

.stat-card:hover,
.client-card:hover,
.service-card:hover,
.tool-card:hover,
.promo-card:hover {
  transform: translateY(-5px);
}

.sidebar-ad-image {
  width: 100%;
  height: auto;
  cursor: pointer;
}

.sidebar-ad-image:hover {
  transform: scale(1.02);
}

/*
 * --------------------------------
 * BOTONES
 * --------------------------------
 */
.btn {
  color: var(--color-text-light);
  font-weight: 700;
  padding: 0.75rem 1.25rem;
  border-radius: 0.5rem;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease-in-out;
  border: none;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-2px);
  opacity: 0.95;
}

.btn-ghost {
  background-color: transparent;
  color: #6b7280;
  border: 1px solid #d1d5db;
}

.btn-ghost:hover {
  background-color: #f3f4f6;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn:disabled, .disabled-button { 
    opacity: 0.5; 
    cursor: not-allowed; 
    pointer-events: none; 
    transform: none;
}

.tool-card-button {
  background-color: var(--color-highlight);
  color: var(--color-primary);
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.tool-card-button:hover {
  background-color: white;
  transform: scale(1.05);
}

.tool-card-button .arrow-icon {
  transition: transform 0.2s ease-in-out;
}

.tool-card-button:hover .arrow-icon {
  transform: translateX(4px);
}

/*
 * --------------------------------
 * NAVEGACIÓN
 * --------------------------------
 */
.nav-link.active-button {
  background-color: var(--color-secondary);
  color: white;
  font-weight: 700;
  position: relative;
}

.nav-link.active-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -4px;
  transform: translateY(-50%);
  width: 8px;
  height: 80%;
  background-color: var(--color-highlight);
  border-radius: 4px;
  transition: all 0.3s ease;
}

/*
 * --------------------------------
 * ENCABEZADO DE PAGINA (HEADER)
 * --------------------------------
 */
#main-app-header {
  background-color: white;
  padding: 10px 15px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: nowrap;
  position: sticky;
  top: 0;
  z-index: 20;
}
.page-header-container {
  flex-grow: 1;
  text-align: center;
  padding: 0;
  margin: 0 auto;
  width: 100%;
}

#page-title {
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 0.9;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  width: 100%;
  word-break: break-word;
}

#page-title i {
  width: 1.5rem;
  height: 1.5rem;
  margin-right: 0.25rem;
  flex-shrink: 0;
}

#page-title .main-title-part-1,
#page-title .main-title-part-2 {
  display: inline;
  line-height: 0.9;
  white-space: normal;
}

#page-subtitle {
  font-size: 0.8rem;
  font-weight: 700;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.15rem;
  display: none;
  width: 100%;
}

/*
 * --------------------------------
 * TITULOS Y TEXTO
 * --------------------------------
 */
.main-title-part-1 {
  color: var(--color-primary);
}

.main-title-part-2 {
  color: var(--color-secondary);
}

.tab-container {
  display: flex;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 1.5rem;
  background-color: var(--color-primary);
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tab-button {
  flex-shrink: 0;
  padding: 0.75rem 1.5rem;
  color: var(--color-text-light);
  font-weight: 600;
  text-transform: uppercase;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  background-color: var(--color-primary);
  position: relative;
  z-index: 1;
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
  transition: background-color 0.3s ease, color 0.3s ease, border-bottom-color 0.3s ease;
}

.tab-button:hover {
  background-color: #1a2b42;
  border-bottom-color: #94a3b8;
}

.active-tab {
  color: var(--color-highlight);
  font-weight: 800;
  border-bottom-color: var(--color-secondary);
  border-bottom-width: 4px;
  z-index: 2;
}

/*
 * --------------------------------
 * TARJETAS Y COMPONENTES ESPECÍFICOS
 * --------------------------------
 */
.client-avatar {
  width: 64px;
  height: 64px;
  background-color: var(--color-primary);
  color: white;
  font-size: 1.875rem;
  font-weight: 600;
}

.service-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.service-card-header {
  background-color: var(--color-primary);
  color: var(--color-text-light);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.service-card-price {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--color-secondary);
  line-height: 1;
}

.service-card-body {
  padding: 1.5rem;
  flex-grow: 1;
}

.transaction-card {
  transition: background-color 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.transaction-card:hover {
  background-color: #f8fafc;
  transform: translateX(4px);
}

.transaction-income .icon-container {
  background-color: #dcfce7;
  color: #16a34a;
}

.transaction-expense .icon-container {
  background-color: #fee2e2;
  color: #dc2626;
}

.calendar-day-header.today {
  background-color: var(--color-secondary);
  color: white;
}

.appointment-card {
  border-left: 4px solid var(--color-primary);
}

.appointment-card.cancelled {
  border-left-color: #9ca3af;
  background-color: #f3f4f6;
}

.appointment-card.cancelled p {
  text-decoration: line-through;
  color: #6b7280;
}

.appointment-list-item {
  transition: background-color 0.2s ease;
}

.appointment-list-item:hover {
  background-color: #f8fafc;
}

.tool-card {
  background-image: linear-gradient(to top right, var(--color-primary), #1e3a5f);
  color: var(--color-text-light);
  position: relative;
  overflow: hidden;
}

.tool-card:before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 60%);
  transform: scale(0);
  transition: transform 0.5s ease;
  pointer-events: none;
}

.tool-card:hover:before {
  transform: scale(2);
}

.tool-card-icon {
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
}

.promo-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease-in-out;
}

.promo-card:hover {
  transform: translateY(-8px);
}

.promo-card-image {
  transition: transform 0.4s ease;
}

.promo-card:hover .promo-card-image {
  transform: scale(1.05);
}

.contact-selection-group {
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.contact-selection-group.active-selection {
  border-color: var(--color-highlight);
  background-color: #fefce8;
}

.initial-hidden {
  display: none;
}

.footer-dark-theme .footer-copyright,
.footer-dark-theme .footer-disclaimer {
  font-size: 12px;
  line-height: 1.1;
  margin: 0.1rem 0;
}

.footer-dark-theme .footer-disclaimer {
  margin-top: 0.5rem;
}

/*
 * --------------------------------
 * TABLA KANBAN Y CELDAS
 * --------------------------------
 */
.kanban-board {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.kanban-column {
  background-color: #f8fafc;
  border-radius: 0.75rem;
  display: flex;
  flex-direction: column;
  min-height: 300px;
}

.kanban-column-header {
  padding: 1rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kanban-column-title {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.875rem;
}

.kanban-column-body {
  padding: 0.5rem;
  flex-grow: 1;
  overflow-y: auto;
}

.kanban-card {
  background-color: white;
  padding: 1rem;
  margin-bottom: 0.75rem;
  cursor: pointer;
  border-left: 4px solid transparent;
  transition: transform 0.3s ease;
}

.kanban-card:hover {
  transform: translateY(-3px);
}

.kanban-card-source-web {
  border-left-color: #3b82f6;
}

.kanban-card-source-referencia {
  border-left-color: #8b5cf6;
}

.kanban-card-source-llamada {
  border-left-color: #10b981;
}

.kanban-card-source-redes {
  border-left-color: #ec4899;
}

/* ---------------------------------------------------- */
/* --- UNIFICACIÓN: NOTIFICACIONES (TOASTS) --- */
/* ---------------------------------------------------- */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.toast {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    color: white;
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
    max-width: 350px;
    min-width: 280px;
    font-weight: 600;
    border-left: 5px solid;
}
.toast.show {
    opacity: 1;
    transform: translateX(0);
}
.toast i {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.75rem;
}
.toast-success { background-color: var(--color-primary); border-left-color: var(--color-highlight); }
.toast-error, .toast-danger { background-color: var(--color-secondary); border-left-color: var(--color-highlight); }
.toast-warning { background-color: #f59e0b; border-left-color: var(--color-primary); }
.toast-info { background-color: var(--color-primary); border-left-color: var(--color-highlight); }

/* ---------------------------------------------------- */
/* --- UNIFICACIÓN: PANELES OFF-CANVAS Y MODALES --- */
/* ---------------------------------------------------- */
.off-canvas-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 600px;
    height: 100%;
    background: var(--color-background);
    transform: translateX(100%);
    transition: transform 0.3s ease-out;
    z-index: 50;
    display: flex;
    flex-direction: column;
}

.off-canvas-panel.is-open {
    transform: translateX(0);
}

.off-canvas-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); 
    z-index: 40;
    display: none;
    transition: opacity 0.3s ease;
}

.off-canvas-overlay.is-open {
    display: block;
}

.panel-header {
    font-family: 'Barlow', sans-serif;
    font-weight: 900; 
    font-size: 1.25rem; 
    line-height: 1.75rem; 
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.autocomplete-suggestions {
    border:1px solid #ddd;
    background:#fff;
    max-height:150px;
    overflow-y:auto;
    position:absolute;
    z-index:100;
    width:100%;
}
.autocomplete-suggestion-item {
    padding:8px 10px;
    cursor:pointer;
    border-bottom:1px solid #eee
}
.autocomplete-suggestion-item:last-child {
    border-bottom:none
}
.autocomplete-suggestion-item:hover {
    background:#f0f0f0
}

.modal-unificado {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.75); 
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-content-unificado {
    background-color: white;
    padding: 2rem;
    border-radius: 0.75rem;
    width: 100%;
    max-width: 28rem;
    margin: 1rem;
    text-align: center;
    transform: scale(0.95);
    opacity: 0;
    transition: all 0.3s ease;
}

.modal-unificado:not(.hidden) .modal-content-unificado {
    transform: scale(1);
    opacity: 1;
}

.modal-icon-container i {
    color: var(--color-secondary);
}

.modal-button-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
@media (min-width: 640px) {
    .modal-button-group {
        flex-direction: row;
        justify-content: center;
        gap: 1rem;
    }
}

.modal-button-cancel {
    background-color: var(--color-primary);
    color: var(--color-text-light);
    font-weight: 900;
    padding: 0.75rem 1rem; 
    border-radius: 0.5rem; 
    text-transform: uppercase;
    width: 100%;
    transition: all 0.2s ease;
}
.modal-button-cancel:hover {
    background-color: #1a2b42;
    transform: translateY(-1px);
}

.modal-button-confirm {
    background-color: var(--color-secondary);
    color: var(--color-text-light); 
    font-weight: 900;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    text-transform: uppercase;
    width: 100%;
    transition: all 0.2s ease;
}
.modal-button-confirm:hover {
    background-color: #7c1020;
    transform: translateY(-1px);
}


/*
 * --------------------------------
 * ESTILOS RESPONSIVOS Y MEDIA QUERIES
 * --------------------------------
 */
@media (min-width: 768px) {
  .kanban-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .text-xl {
    font-size: 1.2rem !important;
    line-height: 1.0rem !important;
  }

  #mobile-menu-button {
    display: none;
  }

  #main-app-header {
    justify-content: space-between;
    padding: 1rem;
  }

  #mobile-menu-button {
    margin-right: initial;
  }

  .page-header-container {
    text-align: left;
    flex-grow: 0;
    margin: 0;
    width: auto;
  }

  #page-title {
    font-size: 1.875rem;
    justify-content: flex-start;
    gap: 0.75rem;
    width: auto;
  }

  #page-title i {
    width: 1.75rem;
    height: 1.75rem;
    margin-right: initial;
  }

  #page-subtitle {
    display: block;
    font-size: 1rem;
    margin-top: 0.25rem;
    width: auto;
  }
}

@media (min-width: 1024px) {
  .kanban-board {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .kanban-board {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .nav-link {
    font-size: 24px !important;
    line-height: 1.0 !important;
    letter-spacing: 0.01em !important;
  }

  .responsive-invoices-table {
    border-collapse: separate;
  }

  .responsive-invoices-table thead {
    display: none;
  }

  .responsive-invoices-table,
  .responsive-invoices-table tbody,
  .responsive-invoices-table tr {
    display: block;
    width: 100%;
  }

  .responsive-invoices-table tr {
    margin-bottom: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.5rem;
    background-color: white;
  }

  .responsive-invoices-table td {
    display: block;
    text-align: right !important;
    padding-left: 50% !important;
    position: relative;
    border-bottom: 1px solid #edf2f7;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }

  .responsive-invoices-table td:last-child {
    border-bottom: 0;
  }

  .responsive-invoices-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 0.75rem;
    width: calc(50% - 1.5rem);
    padding-right: 1rem;
    white-space: nowrap;
    text-align: left;
    font-weight: bold;
    text-transform: uppercase;
    color: #4a5568;
  }

  .responsive-invoices-table td.actions-cell {
    text-align: center !important;
    padding-left: 0 !important;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    min-height: 48px;
  }

  .responsive-invoices-table td.actions-cell::before {
    content: none;
  }

  #calendar-grid.weekly-mobile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #calendar-grid.weekly-mobile-grid .appointment-list-day {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 0.5rem;
    overflow-y: auto;
    max-height: 90px;
  }

  #calendar-grid.weekly-mobile-grid .appointment-list-day .appointment-card {
    flex-shrink: 0;
    min-width: 0;
  }
}

/*
 * --------------------------------
 * ANIMACIONES
 * --------------------------------
 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.video-shell {
    background: rgba(0, 0, 0, .35);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, .12);
    overflow: hidden;
}

.video-shell .relative {
    padding-bottom: 56.25%; 
}

.video-shell .absolute {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-shell #playOverlay {
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}

.video-shell #playOverlay:hover .bg-black\/40 {
    background-color: rgba(0, 0, 0, 0.6);
}

.video-shell #playOverlay:hover .opacity-80 {
    opacity: 1;
}

.video-shell .bg-black\/40 {
    background-color: rgba(0, 0, 0, 0.4);
    transition: background-color 0.3s ease-in-out;
}

.video-shell .text-white\/90 {
    color: rgba(255, 255, 255, 0.9);
}

.video-shell .flex.items-center.justify-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Header & cards tweaks */
 @media (max-width: 768px){ .page-header-container{display:none!important} .dashboard-section:first-of-type,#inicio:first-of-type{margin-top:calc(var(--header-height) + 12px)!important} }
 
.video-widget{position:relative;overflow:hidden;background:linear-gradient(135deg,var(--color-primary,#07162d) 0%,#0b2242 55%,#07162d 100%);color:#fff}
.video-widget .blob{position:absolute;filter:blur(64px);opacity:.35;border-radius:9999px}
.video-widget .blob.bl1{height:280px;width:280px;left:-80px;top:-80px;background:var(--color-secondary,#9e1428)}
.video-widget .blob.bl2{height:280px;width:280px;right:-80px;bottom:-80px;background:#ffc857}
.chip{display:inline-flex;align-items:center;gap:.5rem;padding:.35rem .65rem;border-radius:999px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.15);font-size:.75rem;letter-spacing:.3px}
.hero-cta{display:inline-flex;align-items:center;gap:.5rem;padding:.6rem 1rem;border-radius:12px;background:#fff;color:#0b1220;font-weight:800}
.hero-cta.secondary{background:rgba(255,255,255,.08);color:#fff;border:1px solid rgba(255,255,255,.15);font-weight:700}
.video-shell{background:rgba(0,0,0,.35);border-radius:16px;border:1px solid rgba(255,255,255,.12);overflow:hidden}


@media (max-width: 767px) {
  .video-widget {
    margin-left: -1rem; 
    margin-right: -1rem;
    border-radius: 0 !important;
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}

@media (max-width: 768px) {
  header.sticky {
    flex-wrap: wrap;
  }

  .show-widget-container {
    width: 100%; 
    order: 3; 
    text-align: center;
    padding-top: 45px !important;
    padding-bottom: 4px;
  }
}

.interactive-module { background-color: #f7fafc; padding: 2rem; border-radius: 0.75rem; border: 1px solid #e2e8f0; }
.input-with-icon { position: relative; }
.input-with-icon input { padding-left: 2.5rem; }
.input-with-icon .search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #A0AEC0;
    pointer-events: none;
}

.modal-primary-title {
    color: var(--color-highlight); 
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-header-container {
    background-color: var(--color-primary);
    padding: 1rem;
    border-top-left-radius: 0.75rem;
    border-top-right-radius: 0.75rem;
}
.status-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
}
.status-modal-overlay.active {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.3s ease-in-out; 
}
.status-modal {
    background-color: white;
    border-radius: 0.75rem;
    width: 90%;
    max-width: 400px;
    transform: translateY(-20px);
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    opacity: 0; 
}
.status-modal-overlay.active .status-modal {
    transform: translateY(0); 
    opacity: 1; 
}

@media (max-width: 767px) {
    .responsive-table-stack tbody,
    .responsive-table-stack tr,
    .responsive-table-stack td {
        display: block;
        width: 100%;
    }
    .responsive-table-stack thead {
        display: none;
    }
    .responsive-table-stack tr {
        margin-bottom: 1rem;
        border: 1px solid #e2e8f0;
        border-radius: 0.5rem;
        padding: 0.5rem;
        background-color: white;
    }
    .responsive-table-stack td {
        text-align: right !important;
        padding-left: 50% !important;
        position: relative;
        border-bottom: 1px solid #edf2f7;
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
        white-space: normal;
        word-break: break-word;
    }
    .responsive-table-stack td:last-child {
        border-bottom: 0;
    }
    .responsive-table-stack td::before {
        content: attr(data-label);
        position: absolute;
        left: 0.75rem;
        width: calc(50% - 1.5rem);
        padding-right: 1rem;
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
        text-transform: uppercase;
        color: #4a5568;
        flex-shrink: 0;
    }
    .responsive-table-stack td.actions-cell {
        text-align: center !important;
        padding-left: 0 !important;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 0.75rem;
        min-height: 48px;
        flex-wrap: wrap;
    }
    .responsive-table-stack td.actions-cell::before {
        content: none;
    }
    .responsive-table-stack td.actions-cell button {
        width: 100%;
        flex-grow: 0;
        min-width: 80px;
    }
}

/* =================================================================
   ESTILOS CENTRO DE APRENDIZAJE (Panel Lateral y Tarjetas)
   ================================================================= */

.lesson-card {
    background-color: white; 
    padding: 1.5rem; 
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.account-card-header {
    font-weight: 800; 
    font-size: 0.875rem; 
    color: #6b7280;
    letter-spacing: 0.05em; 
    display: flex; 
    align-items: center;
    gap: 0.5rem; 
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.5rem; 
    margin-bottom: 1rem;
}

/* =================================================================
   ESTILOS EDITOR QUILL Y VISTAS PREVIAS
   ================================================================= */

.ql-toolbar.ql-snow {
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
    border-color: #d1d5db;
    background-color: #f3f4f6;
}

.ql-container.ql-snow {
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
    border-color: #d1d5db;
    background-color: #ffffff;
    font-family: 'Barlow', sans-serif;
    font-size: 1rem;
}

.ql-editor {
    min-height: 200px;
}

.display-value-text ul { 
    list-style-type: disc; 
    margin-left: 1.5rem; 
}
.display-value-text ol { 
    list-style-type: decimal; 
    margin-left: 1.5rem; 
}
.display-value-text p { 
    margin-bottom: 0.5rem; 
}
.display-value-text strong { 
    font-weight: 700; 
}

/* =================================================================
   ESTILOS PARA HERRAMIENTAS (Diagnostic Cards, Checkboxes, Steps)
   ================================================================= */

.diagnostic-card {
    background-image: linear-gradient(135deg, #f0f2f5 0%, #e2e7ed 100%);
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.diagnostic-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.axis-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.75rem;
}
.axis-icon {
    color: var(--color-secondary);
    margin-right: 1rem;
    width: 30px;
    text-align: center;
}
.axis-title {
    font-size: 1.2rem;
    line-height: 1.2;
    font-weight: 900;
    color: var(--color-primary);
    text-transform: uppercase;
}

.subpoint-item {
    display: flex;
    align-items: flex-start;
    padding: 0.5rem 0;
    cursor: pointer;
}
.subpoint-item input[type="checkbox"] {
    appearance: none; 
    -webkit-appearance: none; 
    width: 1.5rem; 
    height: 1.5rem;
    border: 2px solid #d1d5db; 
    border-radius: 0.375rem; 
    background-color: #f9fafb;
    cursor: pointer; 
    flex-shrink: 0; 
    margin-top: 2px;
    transition: all 0.2s ease-in-out; 
    position: relative;
}
.subpoint-item input[type="checkbox"]:hover { 
    border-color: var(--color-secondary); 
}
.subpoint-item input[type="checkbox"]:checked {
    background-color: var(--color-primary); 
    border-color: var(--color-primary);
}
.subpoint-item input[type="checkbox"]:checked::after {
    content: '✓'; 
    color: white; 
    position: absolute;
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
    font-size: 0.875rem;
    font-weight: bold;
}
.subpoint-item label {
    margin-left: 0.75rem; 
    color: #374151;
    font-size: 1rem; 
    line-height: 1.4; 
    cursor: pointer;
}

.plan-action-step-item {
    background-color: #f9fafb; 
    padding: 1rem; 
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb; 
    box-shadow: 0 1px 3px 0 rgba(0,0,0,0.05);
    display: flex; 
    align-items: flex-start;
}
.plan-action-number-circle {
    background-color: var(--color-secondary); 
    color: white; 
    font-weight: bold;
    border-radius: 9999px; 
    width: 2rem; 
    height: 2rem;
    display: flex; 
    align-items: center; 
    justify-content: center;
    flex-shrink: 0;
}
.plan-action-step-text {
    margin-left: 1rem; 
    flex: 1;
    color: #374151; 
    line-height: 1.6;
}

/* ======================================================= */
/* === ADAPTACIÓN MÓVIL (MOBILE RESPONSIVENESS)
/* ======================================================= */

@media (max-width: 768px) {

    .bg-white h3 span {
        display: inline;
        word-break: break-word;
    }

    .border-b h3 a.btn-view-all-leads {
        margin-left: 0 !important;
        margin-top: 0.75rem; 
        width: 100%;
        order: 1; 
        display: flex; 
        justify-content: center;
        align-items: center;
        min-height: 44px; 
    }
    
    .bg-white .border-b.pb-4 {
        padding-bottom: 1.5rem; 
    }
    
    .tasks-list li.flex.items-start {
        margin-top: 0.5rem;
    }

    .lead-item, .complaint-item {
        flex-direction: column; 
        align-items: flex-start;
        padding: 0.75rem 0.5rem;
    }
    
    .btn-view-lead, .btn-resolve-complaint {
        width: 100%;
        margin-top: 0.5rem; 
    }
    
}

@media (max-width: 768px) {
    #content-area {
        padding-left: 1rem; 
        padding-right: 1rem; 
    }

    .responsive-table-stack td {
        display: block; 
        width: 100%;
        text-align: right !important; 
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }

    .responsive-table-stack td:before {
        content: attr(data-label);
        font-weight: 700;
        float: left;
        color: var(--color-primary);
    }

    .responsive-table-stack th {
        display: none; 
    }

    .actions-cell > div {
        display: flex !important; 
        flex-direction: row !important; 
        justify-content: flex-end !important; 
        align-items: center !important;
        gap: 0.75rem; 
        margin-top: 0.5rem;
        margin-bottom: 0 !important;
    }

    .actions-cell button {
        width: auto !important;
        padding: 0.5rem;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .stat-cards-grid-main {
        grid-template-columns: 1fr;
    }

    #list-view-section .flex-col.md\:flex-row.gap-4 {
        flex-direction: column;
    }
}

.kanban-container.view-compact .client-card {
    padding: 0.5rem;
    display: flex; 
    align-items: center;
    min-height: 40px; 
}

.kanban-container.view-compact .client-card [data-element="address"],
.kanban-container.view-compact .client-card [data-element="service"],
.kanban-container.view-compact .client-card .text-xs {
    display: none;   
}

.kanban-container.view-compact .client-card [data-element="name"] {
    margin-bottom: 0;     
    font-size: 0.85rem;   
    white-space: nowrap;  
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-standard {
    @apply w-full max-w-3xl mx-auto bg-white rounded-xl shadow-lg border border-gray-100 overflow-hidden;
}

.floating-btn {
        position: fixed;
        bottom: 20px; 
        right: 20px; 
        z-index: 1000; 
        
        background-color: var(--color-secondary); 
        color: white; 
        
        width: 60px;
        height: 60px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
        
        transition: background-color 0.3s ease, transform 0.3s ease;
    }
    
    .floating-btn:hover {
        background-color: var(--color-primary); 
        transform: scale(1.05); 
    }