/* ============================================================================
 *  Sistema DESTREZAS — assets/css/style.css
 *  Hoja de estilos maestra · Tokens de tema (claro/oscuro) · Mobile-First
 *  Replica EXACTA del diseño de los HTML modelo (teal/marino).
 *  Fase 1 — Esqueleto visual compartido
 * ============================================================================ */

/* ---------------------------------------------------------------------------
 * 1) TOKENS DE COLOR — TEMA CLARO (por defecto)
 *    Mismos valores que los HTML modelo.
 * ------------------------------------------------------------------------- */
:root,
[data-theme="light"] {
  --bg:        #F4F6FA;
  --surface:   #FFFFFF;
  --text:      #1F2937;
  --text2:     #6B7280;
  --border:    #EAECEF;
  --hover:     #F4F6FA;
  --sidebar:   #16213E;
  --sb-text:   #AEB8CC;
  --sb-hover:  #22315A;
  --topbar:    #FFFFFF;
  --shadow:    0 1px 3px rgba(16,24,40,.07), 0 1px 2px rgba(16,24,40,.04);

  /* Marca */
  --teal:      #0DCAA8;
  --teal-2:    #00B894;
  --navy:      #16213E;
  --navy-2:    #1B2A4A;

  /* Estados */
  --success:   #10B981;
  --warning:   #F59E0B;
  --danger:    #EF4444;
  --info:      #0EA5E9;
  --muted:     #5B6B8C;
}

/* ---------------------------------------------------------------------------
 * 2) TOKENS DE COLOR — TEMA OSCURO
 * ------------------------------------------------------------------------- */
[data-theme="dark"] {
  --bg:        #0B1220;
  --surface:   #16213E;
  --text:      #F1F5F9;
  --text2:     #94A3B8;
  --border:    #243049;
  --hover:     #1E2A45;
  --sidebar:   #0E1830;
  --sb-text:   #AEB8CC;
  --sb-hover:  #1E2A45;
  --topbar:    #16213E;
  --shadow:    0 1px 3px rgba(0,0,0,.35);
}

/* ---------------------------------------------------------------------------
 * 3) RESET Y BASE
 * ------------------------------------------------------------------------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background .25s ease, color .25s ease;
}

a { color: inherit; }
img { max-width: 100%; }

/* Scrollbar discreta acorde al tema */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--text2); }
::-webkit-scrollbar-track { background: transparent; }

/* Cierre uniforme para los modales que no definen su propia X. */
.dz-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 9px;
  background: var(--hover);
  color: var(--text);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.dz-modal-close:hover { background: var(--border); }
.dz-modal-close:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

/* Animación flotante (usada en login y badges) */
@keyframes flo { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes dzfade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------------------
 * 4) LAYOUT MAESTRO
 * ------------------------------------------------------------------------- */
.dz-app {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

.dz-main-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dz-content {
  flex: 1;
  overflow-y: auto;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: dzfade .25s ease;
}

/* ---------------------------------------------------------------------------
 * 5) SIDEBAR (264px) — idéntico a los HTML
 * ------------------------------------------------------------------------- */
.dz-sidebar {
  width: 264px;
  flex-shrink: 0;
  height: 100vh;
  position: sticky;
  top: 0;
  background: var(--sidebar);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 40;
}

.dz-sb-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px 16px;
}
.dz-sb-logo {
  width: 54px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.dz-sb-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.dz-sb-name { color: #fff; font-weight: 800; font-size: 17px; letter-spacing: -.3px; }
.dz-sb-tag  { color: var(--teal); font-weight: 700; font-size: 9px; line-height: 1.25; letter-spacing: .55px; }

.dz-nav { flex: 1; overflow-y: auto; padding: 4px 12px 24px; }
.dz-nav-sec {
  padding: 16px 12px 8px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 1.4px;
  color: var(--muted);
}

.dz-nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  margin-bottom: 3px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 14px; font-weight: 600;
  color: var(--sb-text);
  border-left: 3px solid transparent;
  transition: background .16s ease, color .16s ease;
}
.dz-nav-link i { width: 20px; text-align: center; font-size: 16px; }
.dz-nav-link:hover { background: var(--sb-hover); color: #fff; }

.dz-nav-link.active {
  color: #fff;
  font-weight: 700;
  background: rgba(13,202,168,.16);
  border-left: 3px solid var(--teal);
  padding-left: 9px;
}
.dz-nav-link.active i { color: var(--teal); }

/* ---------------------------------------------------------------------------
 * 6) TOPBAR (66px) — idéntico a los HTML
 * ------------------------------------------------------------------------- */
.dz-topbar {
  height: 66px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--topbar);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 20px;
}

.dz-burger {
  display: none;
  align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border: none; border-radius: 10px;
  background: var(--hover); color: var(--text);
  cursor: pointer; font-size: 18px;
}

.dz-search {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  background: var(--hover);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 9px 14px;
  width: 340px; max-width: 34vw;
}
.dz-search input {
  border: none; background: transparent; outline: none;
  width: 100%; font-family: inherit; font-size: 13.5px; color: var(--text);
}
.dz-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: min(620px, calc(100vw - 32px));
  max-height: min(520px, calc(100vh - 92px));
  overflow-y: auto;
  z-index: 80;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: 0 16px 34px rgba(15, 23, 42, .18);
}
.dz-search-results[hidden] { display: none; }
.dz-search-group-title {
  padding: 9px 10px 5px;
  color: var(--text2);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .65px;
  text-transform: uppercase;
}
.dz-search-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  color: var(--text);
  text-decoration: none;
}
.dz-search-result:hover,
.dz-search-result.is-active { background: var(--hover); }
.dz-search-result-icon {
  display: flex;
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: rgba(13, 202, 168, .12);
  color: var(--teal);
  font-size: 15px;
}
.dz-search-result-icon.senasa { background: rgba(139, 92, 246, .13); color: #8B5CF6; }
.dz-search-result-icon.avanzar { background: rgba(30, 58, 138, .13); color: #1E3A8A; }
.dz-search-result-icon.avanzar { background: rgba(30, 58, 138, .13); color: #1E3A8A; }
.dz-search-result-icon.familiar { background: rgba(59, 130, 246, .13); color: #3B82F6; }
.dz-search-result-icon.sesion { background: rgba(245, 158, 11, .14); color: #D97706; }
.dz-search-result-main {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 6px;
  row-gap: 2px;
}
.dz-search-result-title { font-size: 13px; font-weight: 750; }
.dz-search-result-detail { color: var(--text2); font-size: 11.5px; }
.dz-search-empty { padding: 18px 12px; color: var(--text2); text-align: center; font-size: 12.5px; }

.dz-icon-btn {
  position: relative;
  width: 40px; height: 40px;
  border: none; border-radius: 10px;
  background: var(--hover); color: var(--text);
  cursor: pointer; font-size: 17px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .16s ease;
}
.dz-icon-btn:hover { background: var(--border); }

.dz-badge-count {
  position: absolute; top: 6px; right: 6px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 9px; background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

.dz-btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--teal), var(--teal-2));
  color: #fff; text-decoration: none; border: none;
  font-weight: 700; font-size: 13.5px;
  padding: 10px 16px; border-radius: 11px;
  box-shadow: 0 8px 16px rgba(13,202,168,.32);
  cursor: pointer; font-family: inherit;
}
.dz-btn-primary:hover { filter: brightness(1.03); }

.dz-user { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.dz-avatar {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, var(--teal), var(--teal-2));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px;
}

/* Menú desplegable del usuario */
.dz-user-menu {
  position: absolute; top: 60px; right: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 8px;
  min-width: 210px;
  display: none;
  z-index: 50;
  animation: dzfade .15s ease;
}
.dz-user-menu.open { display: block; }
.dz-user-menu a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  text-decoration: none; font-size: 13.5px; font-weight: 600;
  color: var(--text);
}
.dz-user-menu a:hover { background: var(--hover); }
.dz-user-menu a.danger { color: var(--danger); }
.dz-user-menu hr { border: none; border-top: 1px solid var(--border); margin: 6px 0; }

.dz-divider-v { width: 1px; height: 30px; background: var(--border); }

/* ---------------------------------------------------------------------------
 * 7) ENCABEZADO DE PÁGINA, TARJETAS Y FOOTER
 * ------------------------------------------------------------------------- */
.dz-page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  flex-wrap: wrap; gap: 14px;
}
.dz-page-head h1 {
  margin: 0; font-size: 25px; font-weight: 800;
  letter-spacing: -.5px; color: var(--text);
}
.dz-page-head p {
  margin: 5px 0 0; font-size: 14px; color: var(--text2); font-weight: 500;
}

.dz-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.dz-footer {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px;
  padding: 8px 4px 4px;
  border-top: 1px solid var(--border);
  margin-top: 2px;
  font-size: 12.5px; color: var(--text2);
}
.dz-footer strong { color: var(--text); }

/* ---------------------------------------------------------------------------
 * 8) BADGES DE ESTADO (mismos colores que los HTML)
 * ------------------------------------------------------------------------- */
.dz-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-weight: 700; font-size: 12px;
  padding: 4px 10px; border-radius: 9px;
}
.dz-badge.success  { background: rgba(16,185,129,.13); color: var(--success); }
.dz-badge.warning  { background: rgba(245,158,11,.14);  color: var(--warning); }
.dz-badge.danger   { background: rgba(239,68,68,.13);   color: var(--danger); }
.dz-badge.info     { background: rgba(14,165,233,.13);  color: var(--info); }
.dz-badge.secondary{ background: rgba(107,114,128,.14); color: var(--text2); }

/* Botón secundario / contorno reutilizable */
.dz-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); font-weight: 700; font-size: 13.5px;
  padding: 10px 16px; border-radius: 11px; cursor: pointer; font-family: inherit;
  text-decoration: none; transition: background .16s ease;
}
.dz-btn:hover { background: var(--hover); }

.dz-backdrop { display: none; }

.dz-hide-sm { display: initial; }

/* ---------------------------------------------------------------------------
 * 9) RESPONSIVE — MOBILE-FIRST (la app se ve como móvil en pantallas chicas)
 *    Idéntico a los breakpoints de los HTML modelo.
 * ------------------------------------------------------------------------- */
@media (max-width: 1180px) {
  .dz-charts, .dz-lists, .dz-row2 { flex-direction: column !important; }
  .dz-col { width: 100% !important; flex: 1 1 auto !important; }
}
@media (max-width: 980px) {
  .dz-kpis { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 760px) {
  .dz-mini, .dz-ter { grid-template-columns: repeat(2, 1fr) !important; }
  .dz-sidebar {
    position: fixed !important; top: 0; left: 0; z-index: 60;
    transform: translateX(-100%); transition: transform .26s ease;
  }
  .dz-sidebar.open { transform: translateX(0); }
  .dz-burger { display: inline-flex !important; }
  .dz-search { display: none !important; }
  .dz-backdrop.open {
    display: block; position: fixed; inset: 0;
    background: rgba(8,12,24,.45); z-index: 55;
  }
  .dz-hide-sm { display: none !important; }
  .dz-content { padding: 16px; }
}
@media (max-width: 480px) {
  .dz-kpis, .dz-mini, .dz-ter { grid-template-columns: 1fr !important; }
}

/* ---------------------------------------------------------------------------
 * 10) OVERRIDES DE LIBRERÍAS (tema oscuro/claro coherente)
 *     Select2, DataTables y Toastify deben respetar el tema.
 * ------------------------------------------------------------------------- */

/* Select2 */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
  background: var(--surface) !important;
  border: 1.5px solid var(--border) !important;
  border-radius: 11px !important;
  min-height: 44px !important;
  color: var(--text) !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
  color: var(--text) !important; line-height: 42px !important; padding-left: 12px !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 42px !important; }
.select2-dropdown {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}
.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background: var(--teal) !important; color: #fff !important;
}
.select2-search--dropdown .select2-search__field {
  background: var(--bg) !important; border: 1px solid var(--border) !important; color: var(--text) !important;
}

/* DataTables */
table.dataTable { color: var(--text) !important; border-color: var(--border) !important; }
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  background: var(--surface) !important; border: 1px solid var(--border) !important;
  border-radius: 9px !important; color: var(--text) !important; padding: 6px 10px !important;
}
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate .paginate_button { color: var(--text2) !important; }
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--teal) !important; color: #fff !important; border-radius: 8px !important; border: none !important;
}
table.dataTable thead th { border-bottom: 1px solid var(--border) !important; color: var(--text2) !important; }
table.dataTable tbody td { border-top: 1px solid var(--border) !important; }
.dt-buttons .dt-button {
  background: var(--surface) !important; border: 1px solid var(--border) !important;
  color: var(--text) !important; border-radius: 9px !important; font-size: 12.5px !important;
}

/* Toastify (toasts) */
.toastify {
  border-radius: 12px !important; font-family: inherit !important; font-weight: 600 !important;
  box-shadow: var(--shadow) !important;
}

/* SweetAlert2 acorde al tema */
.swal2-popup { border-radius: 18px !important; font-family: inherit !important; }

/* Inputs base de formularios del sistema */
.dz-field {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 12px; padding: 12px 14px;
}
.dz-field:focus-within { border-color: var(--teal); }
.dz-field input, .dz-field select, .dz-field textarea {
  flex: 1; border: none; background: transparent; outline: none;
  font-family: inherit; font-size: 14px; color: var(--text);
}
.dz-label { font-size: 12.5px; font-weight: 700; color: var(--text); }

/* Utilidades */
.dz-spin { animation: rot 1s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------------------
 * Select2 — tema acorde a DESTREZAS (listas largas con buscador)
 * ------------------------------------------------------------------------- */
.select2-container { font-family: inherit; font-size: 13px; }
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
  border: 1px solid var(--border) !important;
  background: var(--bg) !important;
  border-radius: 10px !important;
  min-height: 39px !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
  color: var(--text); line-height: 37px; padding-left: 11px; padding-right: 24px;
}
.select2-container--default .select2-selection--single .select2-selection__placeholder { color: var(--text2); }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 37px; right: 8px; }
.select2-container--default .select2-selection--multiple .select2-selection__rendered { padding: 3px 8px; }
.select2-container--default .select2-selection--multiple .select2-selection__choice {
  background: var(--hover); border: 1px solid var(--border); color: var(--text);
  border-radius: 6px; padding: 1px 6px;
}
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--multiple {
  border-color: var(--teal) !important;
}
.select2-dropdown {
  border: 1px solid var(--border) !important;
  background: var(--surface); border-radius: 10px; overflow: hidden;
  box-shadow: var(--shadow); z-index: 99999;
}
.select2-search--dropdown { padding: 8px; background: var(--surface); }
.select2-search--dropdown .select2-search__field {
  background: var(--bg); color: var(--text); border: 1px solid var(--border) !important;
  border-radius: 8px; padding: 7px 9px; outline: none;
}
.select2-results__option { color: var(--text); padding: 8px 12px; }
.select2-results__option--highlighted[aria-selected] { background: var(--teal) !important; color: #fff !important; }
.select2-container--default .select2-results__option[aria-selected=true] { background: var(--hover); }
.select2-results__message { color: var(--text2); }
.select2-container--default .select2-selection--single .select2-selection__clear { color: var(--text2); margin-right: 6px; }

/* ============================================================================
   Switch de origen Pacientes / Senasa — reutilizable en modales y buscadores
   ============================================================================ */
.dz-origen-switch { display: inline-flex; align-items: center; background: var(--hover); border-radius: 20px; padding: 3px; gap: 2px; flex-shrink: 0; }
.dz-origen-opt {
  border: none; background: transparent; color: var(--text2); font-weight: 700; font-size: 11px;
  padding: 6px 12px; border-radius: 16px; cursor: pointer; font-family: inherit; white-space: nowrap;
  transition: background .15s, color .15s;
}
.dz-origen-opt.on[data-val="normal"] { background: linear-gradient(135deg,#0DCAA8,#00B894); color: #fff; }
.dz-origen-opt.on[data-val="senasa"] { background: linear-gradient(135deg,#8B5CF6,#7C3AED); color: #fff; }
.dz-origen-opt.on[data-val="avanzar"] { background: linear-gradient(135deg,#1E3A8A,#1D4ED8); color: #fff; }
.dz-badge-senasa { background: rgba(139,92,246,.15); color: #8B5CF6; font-size: 9.5px; vertical-align: middle; }
.dz-badge-avanzar { background: rgba(30,58,138,.15); color: #1E3A8A; font-size: 9.5px; vertical-align: middle; }

/* ============================================================================
   Switch booleano genérico (Sí/No) — reutilizable en cualquier formulario
   ============================================================================ */
.dz-switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.dz-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.dz-switch .dz-switch-track { position: absolute; inset: 0; background: var(--border); border-radius: 24px; cursor: pointer; transition: background .15s; }
.dz-switch .dz-switch-track:before { content: ""; position: absolute; height: 18px; width: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.dz-switch input:checked + .dz-switch-track { background: #0DCAA8; }
.dz-switch input:checked + .dz-switch-track:before { transform: translateX(18px); }
.dz-switch input:focus-visible + .dz-switch-track { outline: 2px solid #0DCAA8; outline-offset: 2px; }

/* ============================================================================
   Paginación de listados — formato único para toda la plataforma
   (Pacientes, Senasa, Familiares y cualquier otro listado con DZ.crearPaginador)
   ============================================================================ */
.dz-pg-btn { width: 39px; height: 39px; border: 1px solid var(--border); background: var(--bg); color: var(--text); border-radius: 10px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; font-family: inherit; }
.dz-pg-btn:disabled { opacity: .4; cursor: not-allowed; }
.dz-pg-btn:not(:disabled):hover { background: var(--hover); }
.dz-pg-num { min-width: 39px; height: 39px; padding: 0 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text); border-radius: 10px; cursor: pointer; font-weight: 700; font-size: 16px; font-family: inherit; }
.dz-pg-num:hover { background: var(--hover); }
.dz-pg-num.on { background: linear-gradient(135deg,#0DCAA8,#00B894); color: #fff; border-color: transparent; }

/* ---------------------------------------------------------------------------
 * Acceso rápido con PIN (pestaña "PIN" del login)
 * ------------------------------------------------------------------------- */
.dz-tabs-seg { display: flex; gap: 4px; background: var(--hover); border: 1px solid var(--border); padding: 4px; border-radius: 12px; }
.dz-tabs-seg button {
  flex: 1; padding: 9px 12px; border-radius: 9px; border: none; background: transparent;
  font-family: inherit; font-weight: 700; font-size: 13px; color: var(--text2); cursor: pointer;
}
.dz-tabs-seg button.on { background: linear-gradient(135deg, var(--teal), var(--teal-2)); color: #fff; }

.dz-pin-msg { text-align: center; font-size: 13px; color: var(--text2); padding: 18px 8px; grid-column: 1 / -1; }
.dz-pin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px; max-height: min(58vh, 470px); overflow-y: auto; padding: 2px; }
.dz-pin-user {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 12px 6px; border-radius: 14px; border: 1px solid var(--border);
  background: var(--surface); cursor: pointer; font-family: inherit; color: var(--text);
  transition: border-color .15s, transform .15s;
}
.dz-pin-user:hover, .dz-pin-user:focus-visible { border-color: var(--teal); transform: translateY(-2px); outline: none; }
.dz-pin-av {
  width: 56px; height: 56px; border-radius: 16px; color: #fff; font-weight: 800; font-size: 18px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.dz-pin-av img { width: 100%; height: 100%; object-fit: cover; }
.dz-pin-name { font-size: 12.5px; font-weight: 700; line-height: 1.2; text-align: center; }
.dz-pin-rol  { font-size: 10.5px; color: var(--text2); font-weight: 600; text-align: center; line-height: 1.2; }
.dz-pin-titulo { text-align: center; font-weight: 800; font-size: 17px; color: var(--text); }
.dz-pin-sub { text-align: center; font-size: 12.5px; color: var(--text2); margin-top: 3px; }
.dz-pin-dots { display: flex; justify-content: center; gap: 14px; margin: 18px 0; }
.dz-pin-dots span { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border); transition: background .12s, border-color .12s; }
.dz-pin-dots span.on { background: var(--teal); border-color: var(--teal); }
.dz-pin-dots.error span { border-color: var(--danger); animation: dzshake .35s; }
.dz-pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 290px; margin: 0 auto; }
.dz-pin-pad button {
  height: 58px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface);
  font-family: inherit; font-size: 22px; font-weight: 800; color: var(--text); cursor: pointer;
}
.dz-pin-pad button:hover { background: var(--hover); }
.dz-pin-pad button:active { transform: scale(.96); }
.dz-pin-pad button.muted { font-size: 15px; color: var(--text2); }
@keyframes dzshake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
