:root {
  --primary: #361469;
  --primary-dark: #24113F;
  --primary-soft: #4A2A7A;

  --black: #050505;
  --bg-light: #F4F3F7;
  --white: #FFFFFF;

  --gold: #F9CF16;
  --gold-dark: #B3984D;

  --blue: #0A3794;
  --red: #C21A26;
  --green: #2F6B3F;

  --gray-metal: #76736F;
  --gray-soft: #E6E3EA;
  --text: #1F1F29;
  --muted: #666272;

  --danger: #B42318;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.12);
   --dash-bg-1: #140a22;
  --dash-bg-2: #1b1030;
  --dash-card: #0f2230;
  --dash-card-2: #132838;
  --dash-border-soft: rgba(255, 255, 255, 0.10);

  --dash-cyan: #68cfe0;
  --dash-gold: #f3c623;
  --dash-purple: #9b6dff;
  --dash-green: #3ea76a;
  --dash-red: #d45464;

  --dash-text: #ffffff;
  --dash-text-soft: rgba(255, 255, 255, 0.74);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg-light);
  color: var(--text);
}

.hidden {
  display: none !important;
}

/* LOGIN */

.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top, rgba(79, 37, 130, 0.75), transparent 42%),
    linear-gradient(135deg, #050505 0%, #160D25 50%, #050505 100%);
}

.login-card {
  width: 100%;
  max-width: 430px;
  padding: 34px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  text-align: center;
  border-top: 6px solid var(--gold);
}

.login-logo {
  width: 150px;
  height: 150px;
  object-fit: contain;
  margin-bottom: 12px;
}

.login-card h1 {
  margin: 0;
  color: var(--primary);
  font-size: 24px;
  letter-spacing: 0.4px;
}

.login-subtitle {
  margin: 8px 0 24px;
  color: var(--muted);
  font-size: 14px;
}

.login-form {
  text-align: left;
}

.login-form label,
.field label {
  display: block;
  margin-bottom: 7px;
  font-weight: 700;
  font-size: 13px;
  color: var(--primary-dark);
}

.login-form input,
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid #D9D6E1;
  border-radius: 12px;
  padding: 12px 13px;
  font-size: 14px;
  outline: none;
  background: var(--white);
}

.login-form input:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(54, 20, 105, 0.12);
}

.login-form input {
  margin-bottom: 16px;
}

.login-footer {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.error-message {
  min-height: 18px;
  margin: 12px 0 0;
  color: var(--danger);
  text-align: center;
  font-size: 13px;
}

/* BOTONES */

.btn {
  border: none;
  border-radius: 12px;
  padding: 11px 16px;
  font-weight: 700;
  cursor: pointer;
  font-size: 14px;
  transition: 0.2s ease;
}

.btn-primary {
  width: 100%;
  background: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: var(--gold);
  color: var(--primary-dark);
}

.btn-secondary:hover {
  background: #E5BE12;
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-outline-dark {
  background: var(--white);
  color: var(--primary-dark);
  border: 1px solid #D9D6E1;
}

/* APP LAYOUT */

.app-view {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 285px 1fr;
}

.sidebar {
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 20px 16px;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.sidebar-logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.sidebar-header h2 {
  margin: 0;
  font-size: 18px;
}

.sidebar-header span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
}

.menu {
  margin-top: 22px;
  display: grid;
  gap: 8px;
}

.menu button {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 700;
  cursor: pointer;
}

.menu button:hover {
  background: rgba(255, 255, 255, 0.09);
}

.menu button.active {
  background: rgba(249, 207, 22, 0.16);
  border-left: 4px solid var(--gold);
  color: var(--white);
}

.main-area {
  min-width: 0;
}

.topbar {
  min-height: 84px;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.topbar h2 {
  margin: 0;
  color: var(--primary);
  font-size: 23px;
}

.topbar p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.user-box {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--primary);
  color: var(--white);
  padding: 10px 12px;
  border-radius: 16px;
}

.user-box strong,
.user-box span {
  display: block;
}

.user-box span {
  font-size: 12px;
  opacity: 0.8;
}

/* CONTENT */

.content {
  padding: 28px;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.welcome-card,
.panel-card,
.form-card {
  background: var(--white);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.welcome-card {
  border-left: 6px solid var(--gold);
  margin-bottom: 22px;
}

.welcome-card h3,
.panel-card h3 {
  margin: 0 0 8px;
  color: var(--primary-dark);
}

.welcome-card p,
.panel-card p {
  margin: 0 0 16px;
  color: var(--muted);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 16px;
}

.stat-card {
  background: var(--white);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
  border-top: 5px solid var(--primary);
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 10px;
}

.stat-card strong {
  display: block;
  font-size: 30px;
  color: var(--primary-dark);
}

.stat-card.purple {
  border-top-color: var(--primary);
}

.stat-card.gold {
  border-top-color: var(--gold);
}

.stat-card.gray {
  border-top-color: var(--gray-metal);
}

.stat-card.red {
  border-top-color: var(--red);
}

.stat-card.green {
  border-top-color: var(--green);
}

/* FORM */

.form-card {
  max-width: 1180px;
}

.section-title {
  margin: 8px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--gray-soft);
}

.section-title h3 {
  margin: 0;
  color: var(--primary);
  font-size: 17px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.field.full {
  grid-column: 1 / -1;
}

.field textarea {
  resize: vertical;
}

.resultados-block {
  padding: 18px;
  border-radius: 18px;
  background: #FAF9FC;
  border: 1px solid #E8E3EF;
  margin-bottom: 24px;
}

.table-wrapper {
  overflow-x: auto;
  margin-top: 18px;
  border: 1px solid var(--gray-soft);
  border-radius: 14px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
}

th,
td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--gray-soft);
  font-size: 14px;
}

th {
  background: #F2EFF7;
  color: var(--primary-dark);
}

.empty-table {
  text-align: center;
  color: var(--muted);
  padding: 22px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
}

.form-actions .btn {
  width: auto;
}

.form-message {
  margin-top: 14px;
  font-weight: 700;
}

.form-message.success {
  color: var(--green);
}

.form-message.error {
  color: var(--danger);
}

/* RESPONSIVE */

@media (max-width: 980px) {
  .app-view {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .user-box {
    width: 100%;
    justify-content: space-between;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .login-card {
    padding: 24px;
  }

  .login-logo {
    width: 120px;
    height: 120px;
  }

  .content {
    padding: 18px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn {
    width: 100%;
  }
}

.coord-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.btn-location {
  white-space: nowrap;
  width: auto;
}

.field-help {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 560px) {
  .coord-row {
    grid-template-columns: 1fr;
  }

  .btn-location {
    width: 100%;
  }
}


/* ============================= */
/* MEJORAS RESPONSIVE MOBILE */
/* ============================= */

input,
select,
textarea,
button {
  font-size: 16px;
}

button,
.btn {
  min-height: 46px;
}

@media (max-width: 768px) {
  body {
    background: #F4F3F7;
  }

  .app-view {
    display: block;
    min-height: 100vh;
  }

  .sidebar {
    width: 100%;
    padding: 12px;
    position: sticky;
    top: 0;
    z-index: 50;
    border-radius: 0 0 18px 18px;
  }

  .sidebar-header {
    padding-bottom: 10px;
    gap: 10px;
  }

  .sidebar-logo {
    width: 44px;
    height: 44px;
  }

  .sidebar-header h2 {
    font-size: 15px;
  }

  .sidebar-header span {
    font-size: 11px;
  }

  .menu {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-top: 12px;
    scrollbar-width: thin;
  }

  .menu button {
    min-width: max-content;
    padding: 10px 12px;
    border-radius: 999px;
    font-size: 13px;
    white-space: nowrap;
  }

  .menu button.active {
    border-left: none;
    border-bottom: 3px solid var(--gold);
  }

  .topbar {
    padding: 14px;
    min-height: auto;
    gap: 12px;
  }

  .topbar h2 {
    font-size: 19px;
  }

  .topbar p {
    font-size: 12px;
  }

  .user-box {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    border-radius: 14px;
  }

  .content {
    padding: 14px;
  }

  .welcome-card,
  .panel-card,
  .form-card {
    padding: 16px;
    border-radius: 16px;
  }

  .section-title {
    margin-top: 18px;
  }

  .section-title h3 {
    font-size: 15px;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 16px;
  }

  .field label {
    font-size: 13px;
  }

  .field input,
  .field select,
  .field textarea,
  .login-form input {
    min-height: 46px;
    border-radius: 12px;
    padding: 11px 12px;
  }

  .coord-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .btn-location {
    width: 100%;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .stat-card {
    padding: 15px;
    border-radius: 15px;
  }

  .stat-card strong {
    font-size: 25px;
  }

  .resultados-block {
    padding: 14px;
    border-radius: 15px;
  }

  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 680px;
  }

  th,
  td {
    padding: 10px;
    font-size: 13px;
  }

  .form-actions {
    flex-direction: column;
    gap: 10px;
  }

  .form-actions .btn,
  .btn-primary,
  .btn-secondary,
  .btn-outline-dark {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .login-card {
    padding: 20px;
    border-radius: 18px;
  }

  .login-logo {
    width: 110px;
    height: 110px;
  }

  .login-card h1 {
    font-size: 20px;
  }

  .login-subtitle {
    font-size: 13px;
  }

  .content {
    padding: 10px;
  }

  .welcome-card,
  .panel-card,
  .form-card {
    padding: 14px;
  }
}

/* ============================= */
/* GESTIÓN DE USUARIOS */
/* ============================= */

.admin-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.btn-auto {
  width: auto;
}

.filters-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}

.user-form-panel {
  margin-top: 22px;
}

.role-badge,
.status-badge {
  display: inline-block;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.role-badge {
  background: rgba(54, 20, 105, 0.12);
  color: var(--primary);
}

.status-badge.activo {
  background: rgba(47, 107, 63, 0.14);
  color: var(--green);
}

.status-badge.inactivo {
  background: rgba(118, 115, 111, 0.16);
  color: var(--gray-metal);
}

.status-badge.bloqueado {
  background: rgba(180, 35, 24, 0.13);
  color: var(--danger);
}

.action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn-small {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 12px;
  border-radius: 9px;
  width: auto;
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
}

.btn-warning {
  background: var(--gold);
  color: var(--primary-dark);
}

@media (max-width: 768px) {
  .admin-toolbar {
    flex-direction: column;
  }

  .admin-toolbar .btn {
    width: 100%;
  }

  .filters-grid {
    grid-template-columns: 1fr;
  }

  .admin-table {
    min-width: 920px;
  }

  .action-buttons {
    min-width: 250px;
  }

  .user-form-panel {
    margin-top: 16px;
  }
}

/* ============================= */
/* MIS OPERACIONES */
/* ============================= */

.detail-panel {
  margin-top: 22px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.detail-item {
  background: #FAF9FC;
  border: 1px solid #E8E3EF;
  border-radius: 14px;
  padding: 12px;
}

.detail-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 5px;
}

.detail-item strong {
  color: var(--primary-dark);
  font-size: 14px;
}

.op-status {
  display: inline-block;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.op-status.registrado {
  background: rgba(10, 55, 148, 0.12);
  color: var(--blue);
}

.op-status.validado {
  background: rgba(47, 107, 63, 0.14);
  color: var(--green);
}

.op-status.observado {
  background: rgba(249, 207, 22, 0.20);
  color: #8A6500;
}

.op-status.anulado {
  background: rgba(180, 35, 24, 0.13);
  color: var(--danger);
}

.resultado-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.resultado-card {
  border: 1px solid #E8E3EF;
  background: #FFFFFF;
  border-radius: 14px;
  padding: 12px;
}

.resultado-card strong {
  color: var(--primary);
}

@media (max-width: 768px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .admin-table {
    min-width: 1050px;
  }
}

/* ============================= */
/* ADMINISTRAR OPERACIONES */
/* ============================= */

.admin-operations-filters {
  grid-template-columns: 2fr 1fr 1fr 1fr;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 360px;
}

.btn-success {
  background: var(--green);
  color: var(--white);
}

.btn-blue {
  background: var(--blue);
  color: var(--white);
}

.btn-muted {
  background: var(--gray-metal);
  color: var(--white);
}

.admin-note {
  background: #FAF9FC;
  border-left: 4px solid var(--gold);
  padding: 12px;
  border-radius: 12px;
  margin-top: 12px;
  color: var(--text);
}

@media (max-width: 768px) {
  .admin-operations-filters {
    grid-template-columns: 1fr;
  }

  .admin-actions {
    min-width: 520px;
  }
}


/* ============================= */
/* DASHBOARD TÁCTICO */
/* ============================= */

.dashboard-tactical {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 22px;
  background:
    linear-gradient(135deg, var(--dash-bg-1), var(--dash-bg-2)),
    radial-gradient(circle at top right, rgba(73, 35, 120, 0.35), transparent 35%);
  color: var(--dash-text);
  box-shadow: 0 12px 28px rgba(23, 9, 37, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.dashboard-tactical::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../assets/logo-gcm12.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 520px;
  opacity: 0.08;
  pointer-events: none;
}

.dashboard-tactical > * {
  position: relative;
  z-index: 1;
}

.dash-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.dash-hero h3 {
  margin: 0;
  font-size: 25px;
  letter-spacing: 0.5px;
}

.dash-hero p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.72);
}

.dash-badge {
  border: 1px solid rgba(249, 207, 22, 0.65);
  color: var(--gold);
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  white-space: nowrap;
}

.dash-filter-card {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(155, 109, 255, 0.22);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 16px;
  backdrop-filter: blur(8px);
}

.dash-filter-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.dash-filter-head h4 {
  margin: 0;
}

.dash-filter-head p {
  margin: 4px 0 0;
  color: var(--dash-text-soft);
  font-size: 13px;
}

.dash-filters {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
}

.dashboard-tactical .field label {
  color: rgba(255, 255, 255, 0.88);
}

.dashboard-tactical input,
.dashboard-tactical select {
  background: rgba(255, 255, 255, 0.95);
}

.dash-filter-actions .btn {
  width: 100%;
}

.dash-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 16px;
}

.dash-tab {
  border: 1px solid rgba(104, 207, 224, 0.35);
  background: rgba(255, 255, 255, 0.05);
  color: var(--dash-text);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition: 0.2s ease;
}

.dash-tab:hover {
  background: rgba(255, 255, 255, 0.09);
}

.dash-tab.active {
  background: var(--dash-gold);
  color: #24152f;
  border-color: var(--dash-gold);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.dash-tab-content {
  display: none;
}

.dash-tab-content.active {
  display: block;
}

.dash-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 14px;
}

.dash-summary-card {
  background: linear-gradient(135deg, #0d2230, #122a3a);
  border: 1px solid rgba(104, 207, 224, 0.18);
  border-radius: 16px;
  padding: 18px;
  box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.03);
}

.dash-summary-card span {
  display: block;
  color: var(--dash-text-soft);
  font-size: 13px;
  margin-bottom: 8px;
}

.dash-summary-card strong {
  font-size: 34px;
  color: var(--white);
}

.dash-neon-panel {
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(4, 28, 39, 0.88), rgba(8, 40, 53, 0.82));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
}
.dash-neon-panel.cyan {
  border-color: rgba(104, 207, 224, 0.40);
}

.dash-neon-panel.orange {
  border-color: rgba(243, 198, 35, 0.42);
}

.dash-neon-panel.purple-panel {
  border-color: rgba(155, 109, 255, 0.42);
}

.dash-neon-panel.green-panel {
  border-color: rgba(62, 167, 106, 0.42);
}

.dash-neon-panel.red-panel {
  border-color: rgba(212, 84, 100, 0.42);
}

.dash-panel-title {
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  margin-bottom: 14px;
}

.dash-panel-title h4 {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
}

.dash-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
}

.dash-metric-card {
  min-height: 105px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 14px;
  padding: 14px;
  backdrop-filter: blur(2px);
}

.dash-metric-card.large {
  grid-column: span 2;
}

.dash-metric-card span {
  display: block;
  color: var(--dash-text-soft);
  font-size: 13px;
  margin-bottom: 8px;
}

.dash-metric-card strong {
  display: block;
  color: var(--white);
  font-size: 30px;
  line-height: 1.1;
}

.dash-tables-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 16px;
}

.dash-table-panel {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(104, 224, 239, 0.25);
  border-radius: 18px;
  padding: 16px;
  overflow-x: auto;
}

.dash-table-panel h4 {
  margin: 0 0 12px;
  text-transform: uppercase;
}

.dash-table-panel table {
  min-width: 100%;
}

.dash-table-panel th {
  background: rgba(104, 224, 239, 0.14);
  color: var(--white);
}

.dash-table-panel td {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.12);
}

@media (max-width: 980px) {
  .dash-filters {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .dash-summary-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .dash-card-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .dash-tables-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .dashboard-tactical {
    padding: 14px;
    border-radius: 18px;
  }

  .dashboard-tactical::before {
    background-size: 360px;
  }

  .dash-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .dash-hero h3 {
    font-size: 20px;
  }

  .dash-badge {
    width: 100%;
    text-align: center;
  }

  .dash-filter-head {
    flex-direction: column;
  }

  .dash-filter-head .btn {
    width: 100%;
  }

  .dash-filters {
    grid-template-columns: 1fr;
  }

  .dash-summary-grid {
    grid-template-columns: 1fr;
  }

  .dash-card-grid {
    grid-template-columns: 1fr;
  }

  .dash-metric-card.large {
    grid-column: span 1;
  }

  .dash-summary-card strong,
  .dash-metric-card strong {
    font-size: 28px;
  }
}

/* Corrección visual tablas dashboard */

.dash-table-panel table {
  background: transparent !important;
  border-collapse: separate;
  border-spacing: 0;
}

.dash-table-panel thead th {
  background: rgba(46, 75, 79) !important;
  color: #ffffff !important;
  border-bottom: 1px solid rgba(104, 224, 239, 0.35);
}

.dash-table-panel tbody tr {
  background: rgba(3, 24, 33, 0.72) !important;
}

.dash-table-panel tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.06) !important;
}

.dash-table-panel tbody td {
  background: transparent !important;
  color: #ffffff !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.dash-table-panel .empty-table {
  background: rgba(3, 24, 33, 0.72) !important;
  color: rgba(255, 255, 255, 0.72) !important;
}

/* ============================= */
/* ICONOS ICONIFY DASHBOARD */
/* ============================= */

.dash-summary-card,
.dash-metric-card {
  position: relative;
  overflow: hidden;
  padding-right: 78px;
}

.dash-card-icon {
  position: absolute;
  right: 16px;
  top: 16px;
  width: 48px;
  height: 48px;
  font-size: 48px;
  color: #7bd3e2;
  opacity: 0.50;
  filter: drop-shadow(0 0 6px rgba(123, 211, 226, 0.35));
  pointer-events: none;
}

.dash-summary-card .dash-card-icon {
  opacity: 0.46;
}

.dash-neon-panel.orange .dash-card-icon {
  color: #f1c04d;
  filter: drop-shadow(0 0 6px rgba(241, 192, 77, 0.30));
}

.dash-neon-panel.purple-panel .dash-card-icon {
  color: #ae89ff;
  filter: drop-shadow(0 0 6px rgba(174, 137, 255, 0.30));
}

.dash-neon-panel.green-panel .dash-card-icon {
  color: #69c488;
  filter: drop-shadow(0 0 6px rgba(105, 196, 136, 0.30));
}

.dash-neon-panel.red-panel .dash-card-icon {
  color: #e17886;
  filter: drop-shadow(0 0 6px rgba(225, 120, 134, 0.30));
}

@media (max-width: 768px) {
  .dash-card-icon {
    width: 40px;
    height: 40px;
    font-size: 40px;
    right: 14px;
    top: 14px;
  }

  .dash-summary-card,
  .dash-metric-card {
    padding-right: 66px;
  }
}

/* ============================= */
/* DETALLE RESULTADOS DASHBOARD */
/* ============================= */

.dash-detail-full {
  margin-top: 16px;
  width: 100%;
}

.dash-detail-full table {
  min-width: 780px;
}

.dash-detail-full th,
.dash-detail-full td {
  white-space: nowrap;
}

@media (max-width: 768px) {
  .dash-detail-full {
    overflow-x: auto;
  }
}

/* ============================= */
/* REPORTES */
/* ============================= */

.report-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.report-filters {
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  margin-top: 18px;
}

.report-filter-buttons .btn {
  width: 100%;
}

.report-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.report-summary div {
  background: #FAF9FC;
  border: 1px solid #E8E3EF;
  border-radius: 14px;
  padding: 14px;
  border-left: 5px solid var(--gold);
}

.report-summary span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}

.report-summary strong {
  color: var(--primary-dark);
  font-size: 26px;
}

.report-table {
  min-width: 1500px;
}

.report-table th,
.report-table td {
  vertical-align: top;
}

@media (max-width: 768px) {
  .report-actions {
    width: 100%;
  }

  .report-actions .btn {
    width: 100%;
  }

  .report-filters {
    grid-template-columns: 1fr;
  }

  .report-summary {
    grid-template-columns: 1fr;
  }
}

/* ============================= */
/* BOTÓN MODO DETALLADO */
/* ============================= */

#repModoDetalladoBtn.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.report-table {
  min-width: 1250px;
}

.report-table.detallado {
  min-width: 1450px;
}

/* ============================= */
/* AUDITORÍA */
/* ============================= */

.auditoria-filters {
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr;
}

.auditoria-table {
  min-width: 1250px;
}

.audit-badge {
  display: inline-block;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.audit-login {
  background: rgba(47, 107, 63, 0.14);
  color: var(--green);
}

.audit-error {
  background: rgba(180, 35, 24, 0.13);
  color: var(--danger);
}

.audit-create {
  background: rgba(10, 55, 148, 0.12);
  color: var(--blue);
}

.audit-edit {
  background: rgba(249, 207, 22, 0.20);
  color: #8A6500;
}

.audit-admin {
  background: rgba(54, 20, 105, 0.12);
  color: var(--primary);
}

@media (max-width: 768px) {
  .auditoria-filters {
    grid-template-columns: 1fr;
  }
}

/* ============================= */
/* INICIO POR ROL */
/* ============================= */

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0;
}

.home-actions .btn {
  width: auto;
}

.home-recent-panel {
  margin-top: 18px;
}

.home-empty {
  color: var(--muted);
  text-align: center;
  padding: 18px;
}

@media (max-width: 768px) {
  .home-actions {
    flex-direction: column;
  }

  .home-actions .btn {
    width: 100%;
  }
}

/* ============================= */
/* TABLAS CON SCROLL CONTROLADO */
/* ============================= */

.table-wrapper {
  max-height: 520px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.table-wrapper table {
  margin: 0;
}

.table-wrapper thead th {
  position: sticky;
  top: 0;
  z-index: 3;
}

/* Alturas específicas por módulo */

#misOperacionesPage .table-wrapper {
  max-height: 460px;
}

#operacionesPage .table-wrapper {
  max-height: 520px;
}

#usuariosPage .table-wrapper {
  max-height: 500px;
}

#reportesPage .table-wrapper {
  max-height: 600px;
}

#auditoriaPage .table-wrapper {
  max-height: 560px;
}

/* Paneles de detalle no deben quedar demasiado largos */

.detail-panel {
  max-height: 620px;
  overflow-y: auto;
}

/* Mejor scroll en celular */

@media (max-width: 768px) {
  .table-wrapper {
    max-height: 430px;
    overflow: auto;
  }

  #reportesPage .table-wrapper,
  #auditoriaPage .table-wrapper {
    max-height: 480px;
  }

  .detail-panel {
    max-height: 520px;
  }
}

/* ============================= */
/* GRÁFICOS DASHBOARD */
/* ============================= */

.dash-chart-panel {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(104, 207, 224, 0.25);
  border-radius: 18px;
  padding: 16px;
  margin-top: 16px;
  margin-bottom: 16px;
}

.dash-chart-panel h4 {
  margin: 0 0 12px;
  color: #ffffff;
  text-transform: uppercase;
}

.dash-chart-box {
  position: relative;
  height: 280px;
  width: 100%;
}

.dash-chart-box.small {
  height: 240px;
}

.dash-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

@media (max-width: 768px) {
  .dash-chart-grid {
    grid-template-columns: 1fr;
  }

  .dash-chart-box {
    height: 260px;
  }

  .dash-chart-box.small {
    height: 230px;
  }
}

/* ============================= */
/* AJUSTES CUENTA / USUARIOS */
/* ============================= */

.user-box {
  position: relative;
  min-width: 390px;
  justify-content: space-between;
}

.user-info {
  min-width: 0;
}

.account-menu-btn {
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.10);
  color: var(--white);
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 800;
  cursor: pointer;
  min-height: 42px;
}

.account-menu-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.account-dropdown {
  position: absolute;
  right: 10px;
  top: calc(100% + 8px);
  width: 220px;
  background: var(--white);
  border: 1px solid #E6E3EA;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  padding: 8px;
  z-index: 200;
}

.account-dropdown button {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--primary-dark);
  text-align: left;
  padding: 11px 12px;
  border-radius: 10px;
  font-weight: 800;
  cursor: pointer;
  min-height: 40px;
}

.account-dropdown button:hover {
  background: #F2EFF7;
}

#usuariosPage .panel-card,
#usuariosPage .user-form-panel {
  width: 100%;
  max-width: none;
}

#usuariosPage .user-form-panel {
  margin-top: 22px;
}

#usuariosPage .form-grid {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
}

#usuariosFormMessage {
  margin-top: 12px;
}

/* ============================= */
/* MODAL CAMBIAR CONTRASEÑA */
/* ============================= */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 5, 0.62);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 9999;
}

.modal-card {
  width: 100%;
  max-width: 460px;
  background: var(--white);
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
  position: relative;
  border-top: 6px solid var(--gold);
}

.modal-close {
  position: absolute;
  right: 14px;
  top: 12px;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: #F2EFF7;
  color: var(--primary-dark);
  font-size: 24px;
  font-weight: 800;
  cursor: pointer;
}

.modal-close:hover {
  background: #E6E3EA;
}

.modal-help {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.modal-card .form-actions {
  justify-content: flex-end;
}

.modal-card .btn-primary {
  width: auto;
}

@media (max-width: 768px) {
  .user-box {
    min-width: 0;
    grid-template-columns: 1fr auto;
  }

  .account-dropdown {
    right: 0;
    width: 100%;
  }

  #usuariosPage .form-grid {
    grid-template-columns: 1fr;
  }

  .modal-card .form-actions {
    flex-direction: column;
  }

  .modal-card .btn,
  .modal-card .btn-primary {
    width: 100%;
  }
}

.reset-user-box {
  background: #FAF9FC;
  border: 1px solid #E8E3EF;
  border-left: 5px solid var(--gold);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 18px;
  color: var(--primary-dark);
  font-weight: 800;
}

.reset-user-box span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

/* ============================= */
/* MAPA OPERACIONAL */
/* ============================= */

.coord-row-map {
  grid-template-columns: 1fr auto auto;
}

.mapa-operacion {
  width: 100%;
  height: 430px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #D9D6E1;
  margin: 14px 0;
  background: #E6E3EA;
}

.modal-map-card {
  width: 100%;
  max-width: 980px;
}

.mapa-info-box {
  background: #FAF9FC;
  border: 1px solid #E8E3EF;
  border-left: 5px solid var(--gold);
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--primary-dark);
  margin-bottom: 10px;
}

.mapa-info-box strong {
  display: block;
  margin-bottom: 4px;
}

.mapa-info-box span {
  color: var(--muted);
  font-weight: 700;
}

.leaflet-container {
  font-family: Arial, Helvetica, sans-serif;
}

@media (max-width: 768px) {
  .coord-row-map {
    grid-template-columns: 1fr;
  }

  .modal-map-card {
    max-width: 96vw;
    padding: 18px;
  }

  .mapa-operacion {
    height: 360px;
  }
}

/* ============================= */
/* AJUSTE COORDENADAS + MAPA */
/* ============================= */

/* Hace que el bloque de coordenadas tenga más espacio en escritorio */
#registrarPage .field:has(#coordenadas) {
  grid-column: span 2;
}

/* Input amplio + botones a la derecha */
#registrarPage .coord-row-map {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
}

/* Evita que el input de coordenadas se encoja demasiado */
#registrarPage #coordenadas {
  min-width: 320px;
}

/* Botones compactos y alineados */
#registrarPage .coord-row-map .btn-location {
  width: auto;
  white-space: nowrap;
  padding-left: 16px;
  padding-right: 16px;
}

/* El mensaje debajo ocupa todo el ancho del bloque */
#registrarPage .field:has(#coordenadas) .field-help {
  grid-column: 1 / -1;
}

/* En pantallas medianas, se apilan para no romper el diseño */
@media (max-width: 1350px) {
  #registrarPage .field:has(#coordenadas) {
    grid-column: 1 / -1;
  }

  #registrarPage .coord-row-map {
    grid-template-columns: 1fr auto auto;
  }

  #registrarPage #coordenadas {
    min-width: 0;
  }
}

/* En móvil, todo vertical */
@media (max-width: 768px) {
  #registrarPage .field:has(#coordenadas) {
    grid-column: 1 / -1;
  }

  #registrarPage .coord-row-map {
    grid-template-columns: 1fr;
  }

  #registrarPage .coord-row-map .btn-location {
    width: 100%;
  }

  #registrarPage #coordenadas {
    min-width: 0;
  }
}

.correction-note {
  margin-bottom: 18px;
  border-left-color: var(--danger);
  background: rgba(249, 207, 22, 0.13);
}

.correction-note strong {
  color: var(--danger);
}

/* ============================= */
/* FILTROS ADMIN OPERACIONES */
/* ============================= */

.admin-operations-filters {
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr auto;
  align-items: end;
}

.admin-filter-buttons .btn {
  width: 100%;
  white-space: nowrap;
}

@media (max-width: 1200px) {
  .admin-operations-filters {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .admin-operations-filters {
    grid-template-columns: 1fr;
  }

  .admin-filter-buttons .btn {
    width: 100%;
  }
}

/* ============================= */
/* SCROLL VERTICAL DETALLE DASHBOARD */
/* ============================= */

.dash-detail-full {
  max-height: 420px;
  overflow: auto  ;
  -webkit-overflow-scrolling: touch;
}

/* Mantiene la cabecera fija dentro de la tabla */
.dash-detail-full thead th {
  position: sticky;
  top: 0;
  z-index: 4;
}

/* Evita que la tabla se comprima */
.dash-detail-full table {
  min-width: 780px;
  margin: 0;
}

@media (max-width: 768px) {
  .dash-detail-full {
    max-height: 360px;
    overflow: auto;
  }
}

/* ============================= */
/* SCROLL VERTICAL TABLAS DASHBOARD */
/* ============================= */

.dash-table-panel {
  max-height: 420px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

/* Mantiene el título visible arriba del panel */
.dash-table-panel h4 {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(31, 20, 48, 0.96);
  padding-bottom: 10px;
}

/* Mantiene la cabecera de la tabla fija */
.dash-table-panel thead th {
  position: sticky;
  top: 38px;
  z-index: 4;
}

/* Evita que la tabla se comprima */
.dash-table-panel table {
  margin: 0;
}

/* Ajuste específico para la tabla grande de detalle */
.dash-detail-full {
  max-height: 420px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.dash-detail-full thead th {
  position: sticky;
  top: 38px;
  z-index: 4;
}

@media (max-width: 768px) {
  .dash-table-panel,
  .dash-detail-full {
    max-height: 360px;
  }
}

.admin-action-card {
    max-width: 560px;
    width: min(92vw, 560px);
}

.admin-action-text {
    margin: 0 0 14px;
    color: #2d2140;
    font-size: 0.95rem;
    line-height: 1.45;
}

#adminActionTextarea {
    width: 100%;
    resize: vertical;
    min-height: 120px;
    border: 1px solid #D8D2E3;
    border-radius: 12px;
    padding: 12px;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
}

#adminActionTextarea:focus {
    border-color: #F3C623;
    box-shadow: 0 0 0 3px rgba(243, 198, 35, 0.22);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 12px;
}

.admin-action-card .btn-danger {
    background: #B42318;
    color: #ffffff;
    border-color: #B42318;
}

.admin-action-card .btn-blue {
    background: #164AA8;
    color: #ffffff;
    border-color: #164AA8;
}

/* ============================= */
/* LOADER GLOBAL */
/* ============================= */

.global-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  background: rgba(5, 5, 5, 0.48);
  backdrop-filter: blur(3px);
}

.global-loader-card {
  width: min(90vw, 360px);
  background: #ffffff;
  border-radius: 22px;
  padding: 28px 24px;
  text-align: center;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
  border-top: 6px solid var(--gold);
}

.global-spinner {
  width: 54px;
  height: 54px;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 5px solid rgba(54, 20, 105, 0.16);
  border-top-color: var(--primary);
  animation: globalSpin 0.85s linear infinite;
}

.global-loader-card strong {
  display: block;
  color: var(--primary-dark);
  font-size: 17px;
  margin-bottom: 8px;
}

.global-loader-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

@keyframes globalSpin {
  to {
    transform: rotate(360deg);
  }
}
/* ============================= */
/* BOTONES DE ACCIÓN CON ICONOS */
/* Estilo institucional sobrio */
/* ============================= */

.acciones-cell {
  white-space: nowrap;
}

.action-buttons-icons,
.admin-actions-icons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  min-width: max-content;
}

.icon-action {
  width: 38px;
  height: 38px;
  min-height: 38px;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: 0.18s ease;
  border: 1px solid #D8D2E3;
  background: #ffffff;
  color: var(--primary-dark);
  box-shadow: 0 3px 8px rgba(36, 17, 63, 0.08);
}

.icon-action iconify-icon {
  font-size: 21px;
}

.icon-action:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(36, 17, 63, 0.14);
}

.icon-action:active:not(:disabled) {
  transform: translateY(0);
}

.icon-action:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  box-shadow: none;
}

/* Ver / neutro */
.icon-action.neutral {
  background: #ffffff;
  color: var(--primary-dark);
  border-color: #D8D2E3;
}

/* Editar / resetear / advertencia: dorado institucional suave */
.icon-action.warning {
  background: rgba(249, 207, 22, 0.18);
  color: #6F5400;
  border-color: rgba(249, 207, 22, 0.55);
}

/* Validar / activar: verde sobrio */
.icon-action.success {
  background: rgba(47, 107, 63, 0.14);
  color: var(--green);
  border-color: rgba(47, 107, 63, 0.30);
}

/* Observar: azul sobrio */
.icon-action.blue {
  background: rgba(10, 55, 148, 0.12);
  color: var(--blue);
  border-color: rgba(10, 55, 148, 0.28);
}

/* Eliminar / anular: rojo sobrio */
.icon-action.danger {
  background: rgba(180, 35, 24, 0.12);
  color: var(--danger);
  border-color: rgba(180, 35, 24, 0.30);
}

.icon-action.neutral:hover:not(:disabled) {
  background: #F7F5FA;
  border-color: var(--primary-soft);
}

.icon-action.warning:hover:not(:disabled) {
  background: rgba(249, 207, 22, 0.28);
}

.icon-action.success:hover:not(:disabled) {
  background: rgba(47, 107, 63, 0.22);
}

.icon-action.blue:hover:not(:disabled) {
  background: rgba(10, 55, 148, 0.20);
}

.icon-action.danger:hover:not(:disabled) {
  background: rgba(180, 35, 24, 0.20);
}

@media (max-width: 768px) {
  .icon-action {
    width: 36px;
    height: 36px;
    min-height: 36px;
    border-radius: 11px;
  }

  .icon-action iconify-icon {
    font-size: 20px;
  }

  .action-buttons-icons,
  .admin-actions-icons {
    gap: 7px;
  }
}

/* ============================= */
/* ACORDEÓN DASHBOARD RESULTADOS */
/* ============================= */

.dash-collapsible {
  transition: 0.22s ease;
}

.dash-collapsible .dash-panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  margin-bottom: 0;
  padding-bottom: 0;
}

.dash-collapsible .dash-panel-title h4 {
  margin: 0;
}

.dash-collapse-btn {
  width: auto;
  min-height: 36px;
  border: 1px solid rgba(104, 207, 224, 0.35);
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
  border-radius: 999px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
}

.dash-collapse-btn iconify-icon {
  font-size: 18px;
}

.dash-collapse-btn:hover {
  background: rgba(255, 255, 255, 0.13);
}

.dash-collapsed .dash-card-grid {
  display: none;
}

.dash-collapsed {
  padding-bottom: 14px;
}

.dash-collapsible:not(.dash-collapsed) .dash-panel-title {
  margin-bottom: 14px;
  padding-bottom: 10px;
}

.dash-collapsible:not(.dash-collapsed) {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

@media (max-width: 768px) {
  .dash-collapsible .dash-panel-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .dash-collapse-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ============================= */
/* PAGINACIÓN */
/* ============================= */

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 4px 2px;
  flex-wrap: wrap;
}

.pagination-info {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.pagination-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pagination-actions button {
  width: auto;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 10px;
}

.pagination-actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 768px) {
  .pagination-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .pagination-actions {
    width: 100%;
    justify-content: space-between;
  }

  .pagination-actions button {
    flex: 1;
  }
}