/* src/public/css/usuarios.css — Estilos exclusivos para el módulo de Gestión de Usuarios */

.usuarios-body {
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100vw;
}

/* Atmósfera de fondo */
.usuarios-aura {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 480px;
  background: radial-gradient(circle at 50% -20%, rgba(30, 41, 59, 0.5) 0%, rgba(10, 12, 18, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

.usuarios-main {
  position: relative;
  z-index: 1;
  padding: 32px;
  max-width: 1400px;
  width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
}

/* Cabecera de página */
.usuarios-header {
  margin-bottom: 28px;
}

.usuarios-badge-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.2);
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 8px;
}

.usuarios-title {
  font-family: 'Outfit', var(--sans);
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.usuarios-sub {
  font-size: 0.85rem;
  color: var(--text2);
}

/* Layout en dos columnas / secciones */
.usuarios-grid {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  width: 100%;
  max-width: 100%;
}

@media (max-width: 1024px) {
  .usuarios-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Tarjetas */
.panel-card {
  background: rgba(19, 22, 31, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Outfit', var(--sans);
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
}

.panel-title svg {
  color: #94a3b8;
}

.panel-count {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text3);
}

/* Formulario Crear Usuario */
.user-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: #cbd5e1;
  display: flex;
  justify-content: space-between;
}

.form-label-hint {
  font-size: 0.68rem;
  font-family: var(--mono);
  color: var(--text3);
  font-weight: 400;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  background: rgba(10, 12, 18, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #fff;
  font-size: 0.85rem;
  font-family: var(--sans);
  outline: none;
  transition: all 0.2s ease;
}

.form-input:focus {
  border-color: #64748b;
  background: rgba(15, 18, 27, 0.9);
  box-shadow: 0 0 0 2px rgba(100, 116, 139, 0.2);
}

.form-input-readonly {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  cursor: default;
  font-weight: 500;
}

.input-wrap .form-input-with-btn {
  padding-right: 42px;
}

.toggle-password-btn {
  position: absolute;
  right: 8px;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background 0.2s;
}

.toggle-password-btn:hover {
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.05);
}

/* Botón Formal Ejecutivo para Crear Usuario */
.btn-formal-create {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px 18px;
  margin-top: 6px;
  background: #1e293b;
  border: 1px solid #475569;
  border-radius: 8px;
  color: #f8fafc;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.btn-formal-create:hover {
  background: #0f172a;
  border-color: #64748b;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.btn-formal-create:active {
  transform: translateY(0);
}

.btn-formal-create:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Avisos y Alerts */
.action-alert {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 8px;
}

.alert-success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.alert-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
}

/* Tabla de Usuarios */
.table-responsive {
  overflow-x: auto;
}

.corporate-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.corporate-table th {
  text-align: left;
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.corporate-table td {
  padding: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text);
  vertical-align: middle;
}

.corporate-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.td-user-bold {
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tag-master {
  font-size: 0.6rem;
  font-family: var(--mono);
  font-weight: 700;
  text-transform: uppercase;
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 4px;
  padding: 2px 6px;
}

.role-badge-pill {
  display: inline-block;
  font-size: 0.68rem;
  font-family: var(--mono);
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.role-admin {
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #cbd5e1;
}

.role-operador {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #38bdf8;
}

.td-date-cell {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--text2);
}

.td-mobile-sub {
  display: none;
}

.td-actions-cell {
  text-align: right;
  white-space: nowrap;
}

.btn-table-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: 6px;
}

.btn-change-pass {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
}

.btn-change-pass:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.btn-delete-user {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.btn-delete-user:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fff;
}

.btn-permisos-user {
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #38bdf8;
}

.btn-permisos-user:hover {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(56, 189, 248, 0.45);
  color: #fff;
}

/* Modal de Permisos del Sistema */
.permisos-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: none;
}

.permisos-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 92%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  background: #11141e;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  z-index: 10001;
  padding: 24px;
  display: none;
}

.perm-modal-subtitle {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: #38bdf8;
  margin-top: 3px;
}

.perm-tabs-bar {
  display: flex;
  gap: 6px;
  margin: 14px 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 10px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.perm-tab-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.perm-tab-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
}

.perm-tab-btn.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #38bdf8;
  font-weight: 600;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

[data-theme="light"] .perm-tab-btn {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
}

[data-theme="light"] .perm-tab-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

[data-theme="light"] .perm-tab-btn.active {
  background: #e0f2fe;
  border-color: #0284c7;
  color: #0284c7;
}

.perm-section {
  background: #151926;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 14px;
}

.perm-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  font-weight: 600;
  color: #f8fafc;
}

.perm-section-header svg {
  color: #38bdf8;
}

.perm-section-desc {
  font-size: 0.74rem;
  color: #94a3b8;
  margin: 4px 0 12px 0;
  line-height: 1.4;
}

.perm-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.perm-toggle-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.perm-toggle-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}

.perm-card-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.perm-card-title {
  font-weight: 600;
  font-size: 0.82rem;
  color: #e2e8f0;
}

.perm-card-hint {
  font-size: 0.7rem;
  color: #64748b;
}

/* Toggle Switch */
.perm-switch-box {
  position: relative;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
}

.perm-switch-input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.perm-switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #334155;
  transition: 0.2s;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.perm-switch-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: #cbd5e1;
  transition: 0.2s;
  border-radius: 50%;
}

.perm-switch-input:checked + .perm-switch-slider {
  background-color: #0284c7;
  border-color: #38bdf8;
}

.perm-switch-input:checked + .perm-switch-slider:before {
  transform: translateX(18px);
  background-color: #ffffff;
}

/* Modal Formal para Cambiar Contraseña */
.password-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: none;
}

.password-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 440px;
  background: #11141e;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  z-index: 10001;
  padding: 24px;
  display: none;
}

.modal-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-title-text {
  font-family: 'Outfit', var(--sans);
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
}

.modal-close-icon {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 1.2rem;
  cursor: pointer;
}

.modal-close-icon:hover {
  color: #fff;
}

.modal-actions-row {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.btn-modal-cancel {
  padding: 8px 14px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #94a3b8;
  font-size: 0.8rem;
  cursor: pointer;
}

.btn-modal-cancel:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-modal-save {
  padding: 8px 16px;
  background: #1e293b;
  border: 1px solid #475569;
  border-radius: 6px;
  color: #f8fafc;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-modal-save:hover {
  background: #0f172a;
  border-color: #64748b;
  color: #fff;
}

/* ════════════════════════════════════════════════════════════════════════
   REGLAS RESPONSIVE PARA GESTIÓN DE USUARIOS (GUIA_RESPONSIVE.md)
   ════════════════════════════════════════════════════════════════════════ */

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.corporate-table {
  min-width: 540px;
}

@media (max-width: 767px) {
  .usuarios-body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }

  .usuarios-main {
    padding: 12px 10px 30px !important;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .usuarios-header {
    margin-bottom: 16px !important;
  }

  .usuarios-title {
    font-size: 1.25rem !important;
  }

  .usuarios-sub {
    font-size: 0.76rem !important;
  }

  .usuarios-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .panel-card {
    padding: 14px 12px !important;
    border-radius: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .panel-header {
    margin-bottom: 14px !important;
    padding-bottom: 10px !important;
  }

  .panel-title {
    font-size: 0.95rem !important;
  }

  /* Formulario compacto en móvil (2x2 para no ocupar espacio vertical excesivo) */
  .user-form {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .form-group {
    width: 100% !important;
    min-width: 0 !important;
    gap: 3px !important;
  }

  .form-label {
    font-size: 0.68rem !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 1px !important;
  }

  .form-label-hint {
    display: none !important;
  }

  .input-wrap {
    width: 100% !important;
    min-width: 0 !important;
  }

  .form-input {
    width: 100% !important;
    font-size: 0.82rem !important;
    min-height: 34px !important;
    padding: 6px 8px !important;
    box-sizing: border-box !important;
    border-radius: 6px !important;
  }

  .form-input-with-btn {
    padding-right: 32px !important;
  }

  .toggle-password-btn {
    width: 30px !important;
    height: 30px !important;
    right: 2px !important;
  }

  .btn-formal-create {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    min-height: 36px !important;
    font-size: 0.80rem !important;
    justify-content: center !important;
    margin-top: 4px !important;
    padding: 6px 12px !important;
  }

  /* Subtítulo de nombre completo dentro de celda Usuario */
  .td-mobile-sub {
    display: block !important;
    font-size: 0.70rem !important;
    color: var(--text2) !important;
    margin-top: 2px !important;
    white-space: normal !important;
    word-break: break-word !important;
  }

  /* Ocultar columnas redundantes para que la tabla quepa al 100% sin scroll horizontal */
  .th-name-col, .td-name-col,
  .th-date-col, .td-date-cell {
    display: none !important;
  }

  .table-responsive {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior-x: contain !important;
  }

  .corporate-table {
    min-width: 0 !important;
    width: 100% !important;
    table-layout: fixed !important;
  }

  .th-user-col, .td-user-col {
    width: 44% !important;
    padding: 8px 6px !important;
  }

  .th-role-col, .td-role-col {
    width: 24% !important;
    padding: 8px 4px !important;
    text-align: center !important;
  }

  .th-actions-col, .td-actions-cell {
    width: 32% !important;
    padding: 8px 4px !important;
    text-align: right !important;
    white-space: nowrap !important;
  }

  .btn-table-action {
    min-height: 28px !important;
    padding: 3px 6px !important;
    font-size: 0.68rem !important;
    margin-left: 2px !important;
    display: inline-flex !important;
    align-items: center !important;
  }

  .btn-table-action span {
    display: none !important;
  }

  .btn-table-action svg {
    margin: 0 !important;
    width: 14px !important;
    height: 14px !important;
  }

  .password-modal,
  .permisos-modal {
    width: 92% !important;
    max-width: 440px !important;
    max-height: 85dvh !important;
    overflow-y: auto !important;
    padding: 16px 14px !important;
    border-radius: 12px !important;
  }

  .modal-actions-row {
    flex-direction: column-reverse !important;
    gap: 8px !important;
  }

  .btn-modal-cancel,
  .btn-modal-save {
    width: 100% !important;
    min-height: 40px !important;
    justify-content: center !important;
    text-align: center !important;
  }
}

/* ==========================================================================
   MODO DÍA (LIGHT MODE) — GESTIÓN DE USUARIOS
   ========================================================================== */
[data-theme="light"] .usuarios-body {
  background: var(--bg);
  color: var(--text);
}

[data-theme="light"] .usuarios-aura {
  opacity: 0.12;
}

[data-theme="light"] .panel-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .panel-header {
  border-bottom: 1px solid #e2e8f0;
}

[data-theme="light"] .panel-title,
[data-theme="light"] .usuarios-title {
  color: #0f172a;
}

[data-theme="light"] .usuarios-badge-top {
  color: #475569;
  background: #f1f5f9;
  border-color: #cbd5e1;
}

[data-theme="light"] .panel-count {
  color: #64748b;
}

[data-theme="light"] .field-label,
[data-theme="light"] .form-label {
  color: #334155;
}

[data-theme="light"] .form-label-hint {
  color: #64748b;
}

[data-theme="light"] .corporate-table th {
  color: #475569;
  border-bottom: 1px solid #cbd5e1;
  background: #f8fafc;
}

[data-theme="light"] .corporate-table td {
  color: #1e293b;
  border-bottom: 1px solid #e2e8f0;
}

[data-theme="light"] .corporate-table tr:hover td {
  background: #eff6ff;
}

[data-theme="light"] .td-user-bold {
  color: #0f172a;
}

[data-theme="light"] .tag-master {
  color: #334155;
  background: #e2e8f0;
  border-color: #cbd5e1;
}

[data-theme="light"] .role-admin {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: #1e293b;
}

[data-theme="light"] .role-operador {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #0369a1;
}

[data-theme="light"] .td-date-cell {
  color: #475569;
}

[data-theme="light"] .btn-change-pass {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #334155;
}

[data-theme="light"] .btn-change-pass:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
  color: #0f172a;
}

[data-theme="light"] .btn-permisos-user {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #0369a1;
}

[data-theme="light"] .btn-permisos-user:hover {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
}

[data-theme="light"] .btn-delete-user {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #dc2626;
}

[data-theme="light"] .btn-delete-user:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
}

[data-theme="light"] .alert-success {
  background: #ecfdf5;
  border-color: #6ee7b7;
  color: #047857;
}

[data-theme="light"] .alert-error {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #b91c1c;
}

[data-theme="light"] .modal-header-row {
  border-bottom: 1px solid #e2e8f0;
}

[data-theme="light"] .form-input,
[data-theme="light"] .form-select {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

[data-theme="light"] .form-input:focus,
[data-theme="light"] .form-select:focus {
  border-color: var(--accent);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

[data-theme="light"] .form-input-readonly {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #64748b;
}

[data-theme="light"] .user-item-row {
  background: #f8fafc;
  border-color: #e2e8f0;
}

[data-theme="light"] .user-item-row:hover {
  background: #eff6ff;
  border-color: #93c5fd;
}

[data-theme="light"] .user-item-name {
  color: #0f172a;
}

[data-theme="light"] .user-meta-val {
  color: #334155;
}

[data-theme="light"] .password-modal,
[data-theme="light"] .permisos-modal {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .modal-header {
  border-bottom: 1px solid #e2e8f0;
}

[data-theme="light"] .modal-title,
[data-theme="light"] .modal-title-text {
  color: #0f172a;
}

[data-theme="light"] .modal-close-icon {
  color: #64748b;
  background: #f1f5f9;
  border-color: #cbd5e1;
}

[data-theme="light"] .modal-close-icon:hover {
  color: #0f172a;
  background: #e2e8f0;
}

[data-theme="light"] .perm-modal-subtitle {
  color: #0284c7;
}

[data-theme="light"] .perm-section {
  background: #f8fafc;
  border-color: #e2e8f0;
}

[data-theme="light"] .perm-section-header {
  color: #0f172a;
}

[data-theme="light"] .perm-section-desc {
  color: #475569;
}

[data-theme="light"] .perm-module-card,
[data-theme="light"] .perm-toggle-card {
  background: #ffffff;
  border-color: #e2e8f0;
}

[data-theme="light"] .perm-toggle-card:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}

[data-theme="light"] .perm-module-title,
[data-theme="light"] .perm-card-title {
  color: #0f172a;
}

[data-theme="light"] .perm-card-hint {
  color: #475569;
}

[data-theme="light"] .perm-switch-slider {
  background: #cbd5e1;
}

[data-theme="light"] .perm-switch-slider:before {
  background: #ffffff;
}

[data-theme="light"] .btn-modal-cancel {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
}


/* Panel de Correos Destinatarios de Notificaciones */
.notif-emails-desc {
  font-size: 0.82rem;
  color: var(--text2);
  margin: 0 0 14px 0;
  line-height: 1.45;
}

.notif-email-form {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}

.notif-email-form .form-input {
  flex: 1;
  min-width: 0;
}

.notif-email-add-btn {
  width: auto !important;
  margin-top: 0 !important;
  white-space: nowrap;
  padding: 10px 18px;
}

.notif-emails-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.notif-email-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.notif-email-addr {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: #e2e8f0;
  word-break: break-all;
}

.btn-remove-email {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-remove-email:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
}

.notif-emails-empty {
  font-size: 0.8rem;
  color: var(--text3);
}

@media (max-width: 640px) {
  .notif-email-form {
    flex-direction: column;
    align-items: stretch;
  }
  .notif-email-add-btn {
    width: 100% !important;
  }
}

[data-theme="light"] .notif-emails-desc {
  color: #475569;
}

[data-theme="light"] .notif-email-chip {
  background: #f8fafc;
  border-color: #cbd5e1;
}

[data-theme="light"] .notif-email-addr {
  color: #0f172a;
}

[data-theme="light"] .btn-remove-email {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #dc2626;
}

[data-theme="light"] .btn-remove-email:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
}

[data-theme="light"] .notif-emails-empty {
  color: #64748b;
}
