/* =====================================================================
   Zatarra360 · compatibilidad con las pantallas existentes
   Clases que las vistas ya usaban (utilidades de tamaño, avatares, bandeja de
   correo, chat, notificaciones) reescritas sobre las variables de Zatarra360.
   Código propio; no depende de ninguna plantilla de terceros.
   ===================================================================== */

/* Tamaños de letra */
.font-size-10 { font-size: 10px !important; } .font-size-11 { font-size: 11px !important; } .font-size-12 { font-size: 12px !important; }
.font-size-13 { font-size: 13px !important; } .font-size-14 { font-size: 14px !important; } .font-size-15 { font-size: 15px !important; }
.font-size-16 { font-size: 16px !important; } .font-size-17 { font-size: 17px !important; } .font-size-18 { font-size: 18px !important; }
.font-size-20 { font-size: 20px !important; } .font-size-22 { font-size: 22px !important; } .font-size-24 { font-size: 24px !important; }
.mt-n2 { margin-top: -.5rem !important; }
.icon-lg { width: 20px; height: 20px; }

/* Avatares */
.avatar-xs { width: 2rem; height: 2rem; } .avatar-sm { width: 2.5rem; height: 2.5rem; } .avatar-md { width: 3.5rem; height: 3.5rem; } .avatar-lg { width: 5rem; height: 5rem; }
.avatar-title { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; border-radius: inherit; background: var(--zt-primario); color: #fff; font-weight: 600; }

/* Pestañas "custom" */
.nav-tabs-custom { border-bottom: 2px solid var(--zt-borde); }
.nav-tabs-custom .nav-item { position: relative; }
.nav-tabs-custom .nav-link { border: 0; color: var(--zt-texto-suave); font-weight: 500; }
.nav-tabs-custom .nav-link.active { color: var(--zt-primario); background: transparent; box-shadow: inset 0 -2px 0 var(--zt-primario); }
[data-bs-theme="dark"] .nav-tabs-custom .nav-link.active { color: var(--zt-acento-claro); box-shadow: inset 0 -2px 0 var(--zt-acento-claro); }

/* Caja de búsqueda con ícono */
.search-box .form-control { padding-left: 2.25rem; border-radius: var(--zt-radio-sm); }
.search-box .search-icon { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--zt-texto-suave); font-size: 1rem; pointer-events: none; }

/* Elementos de las listas de avisos (campana, mensajes) */
.notification-item { color: var(--zt-texto) !important; }
.notification-item:hover { background: var(--zt-superficie-2); text-decoration: none; }
.notification-item h6 { font-size: .8125rem; font-weight: 600; }
.dropdown-menu-lg { width: 340px; }
@media (max-width: 575.98px) { .dropdown-menu-lg { width: calc(100vw - 2rem); } }

/* Barra superior: botón de empresa y conteos */
.zt-barra .empresa-actual { max-width: 280px; display: inline-flex; align-items: center; gap: .375rem; }
.zt-barra .empresa-actual .texto { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.zt-barra .badge.rounded-pill { position: absolute; top: 4px; right: 2px; font-size: .625rem; padding: .25em .45em; }

/* ---------------- Bandeja de correo ---------------- */
.email-leftbar { width: 240px; float: left; padding: 1.25rem; margin-bottom: 1.5rem; }
.email-rightbar { margin-left: 264px; }
.mail-list a { display: block; padding: .45rem .5rem; border-radius: 8px; color: var(--zt-texto); font-size: .875rem; line-height: 1.4; }
.mail-list a:hover { background: var(--zt-superficie-2); text-decoration: none; }
.mail-list a.active { background: var(--zt-primario-suave); color: var(--zt-marca-oscuro); font-weight: 600; }
[data-bs-theme="dark"] .mail-list a.active { color: var(--zt-acento-claro); }
.message-list { display: block; padding-left: 0; list-style: none; }
.message-list li { position: relative; display: block; height: 50px; line-height: 50px; border-bottom: 1px solid var(--zt-borde); transition: background-color .15s; }
.message-list li:hover { background: var(--zt-superficie-2); }
.message-list li.unread { font-weight: 600; }
.message-list li.unread::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--zt-acento); }
.message-list li a { color: var(--zt-texto); }
.message-list li a:hover { text-decoration: none; }
.message-list li .col-mail { float: left; position: relative; }
.message-list li .col-mail-1 { width: 320px; }
.message-list li .col-mail-1 .star-toggle { float: left; margin-left: 15px; font-size: 18px; color: var(--zt-texto-suave); }
.message-list li .col-mail-1 .checkbox-wrapper-mail { float: left; margin: 15px 10px 0 20px; }
.message-list li .col-mail-1 .title { position: absolute; top: 0; left: 110px; right: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 0; }
.message-list li .col-mail-2 { position: absolute; top: 0; left: 320px; right: 0; bottom: 0; }
.message-list li .col-mail-2 .subject { position: absolute; top: 0; left: 0; right: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.message-list li .col-mail-2 .date { position: absolute; top: 0; right: 0; width: 170px; padding-left: 80px; font-size: .8125rem; color: var(--zt-texto-suave); }
@media (max-width: 767.98px) {
  .email-leftbar { width: 100%; float: none; }
  .email-rightbar { margin: 0; }
  .message-list li { height: auto; line-height: 1.4; padding: .75rem 0; }
  .message-list li .col-mail, .message-list li .col-mail-2, .message-list li .col-mail-2 .subject, .message-list li .col-mail-2 .date, .message-list li .col-mail-1 .title { position: static; float: none; width: auto; padding: 0 1rem; display: block; }
}

/* ---------------- Chat interno ---------------- */
.chat-leftsidebar { min-width: 300px; }

/* ---------------- DataTables (estilo bs4 sobre Bootstrap 5) ---------------- */
.dataTables_wrapper .dataTables_filter input, .dataTables_wrapper .dataTables_length select { border: 1px solid var(--zt-borde); border-radius: var(--zt-radio-sm); padding: .35rem .6rem; background: var(--zt-superficie); color: var(--zt-texto); }
.dataTables_wrapper .dataTables_filter input:focus { outline: none; border-color: var(--zt-acento); box-shadow: 0 0 0 .2rem rgba(var(--zt-primario-rgb), .18); }
.dataTables_wrapper .dataTables_info, .dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_filter { font-size: .8125rem; color: var(--zt-texto-suave); padding: .5rem 0; }
.dataTables_wrapper .pagination { margin: .5rem 0; }
table.dataTable { border-collapse: collapse !important; }

/* ---------------- SweetAlert2 con los colores del tema ---------------- */
.swal2-popup { font-family: var(--zt-fuente) !important; border-radius: 14px !important; }
.swal2-styled.swal2-confirm { background-color: var(--zt-primario) !important; }
.swal2-styled.swal2-confirm:focus { box-shadow: 0 0 0 3px rgba(var(--zt-primario-rgb), .35) !important; }
[data-bs-theme="dark"] .swal2-popup { background: var(--zt-superficie) !important; color: var(--zt-texto) !important; }
[data-bs-theme="dark"] .swal2-title, [data-bs-theme="dark"] .swal2-html-container { color: var(--zt-texto) !important; }
[data-bs-theme="dark"] .swal2-input, [data-bs-theme="dark"] .swal2-select, [data-bs-theme="dark"] .swal2-textarea { background: var(--zt-superficie-2) !important; color: var(--zt-texto) !important; border-color: var(--zt-borde) !important; }

/* ---------------- Clases de la plantilla anterior que ya no hacen nada ---------------- */
.waves-effect, .waves-light { position: relative; }
