/* ==========================================================================
   RIO MAR · admin.css · Panel administrativo
   Design tokens · Mobile-first · Sin frameworks externos
   ========================================================================== */

/* ===== Variables — RIO MAR Design Tokens (coherentes con app.css) ===== */
:root {
  --rm-primary: #0052A5;
  --rm-primary-dark: #003366;
  --rm-secondary: #00A651;
  --rm-secondary-dark: #007A3C;
  --rm-accent: #22C55E;
  --rm-white: #ffffff;
  --rm-gray-50: #f8fafc;
  --rm-gray-100: #f1f5f9;
  --rm-gray-200: #e2e8f0;
  --rm-gray-300: #cbd5e1;
  --rm-gray-400: #94a3b8;
  --rm-gray-500: #475569;
  --rm-gray-600: #475569;
  --rm-gray-700: #334155;
  --rm-gray-800: #1e293b;
  --rm-gray-900: #0f172a;
  --rm-breaking: #BE123C;
  --rm-success: #15803d;
  --rm-warning: #b45309;
  --rm-danger:  #b91c1c;
  --rm-info:    #0369a1;

  /* Radius */
  --rm-radius-sm: 6px;
  --rm-radius-md: 10px;
  --rm-radius: 10px;
  --rm-radius-lg: 14px;
  --rm-radius-xl: 20px;
  --rm-radius-pill: 9999px;

  /* Shadow */
  --rm-shadow-sm: 0 1px 2px 0 rgba(15,23,42,.06);
  --rm-shadow-md: 0 4px 12px -4px rgba(15,23,42,.15);
  --rm-shadow: 0 4px 12px -4px rgba(15,23,42,.15);
  --rm-shadow-lg: 0 20px 40px -12px rgba(15,23,42,.25);

  /* Transición */
  --rm-transition: 0.18s cubic-bezier(.4,0,.2,1);

  /* Spacing (multiplo 4px) */
  --rm-space-1: .25rem; --rm-space-2: .5rem; --rm-space-3: .75rem;
  --rm-space-4: 1rem;  --rm-space-5: 1.5rem; --rm-space-6: 2rem;

  /* Tipografía · scale 1.25 · base 16px */
  --rm-font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --rm-fs-overline: .75rem;   --rm-fs-caption:  .8125rem; --rm-fs-body: 1rem;
  --rm-fs-body-lg: 1.0625rem; --rm-fs-h6: 1rem; --rm-fs-h5: 1.125rem;
  --rm-fs-h4: 1.375rem;       --rm-fs-h3: 1.75rem;
  --rm-fs-h2: 2.25rem;        --rm-fs-h1: 3rem;
  --rm-lh-tight: 1.2; --rm-lh-snug: 1.35; --rm-lh-normal: 1.5; --rm-lh-relax: 1.65;
  --rm-ls-tight: -0.02em; --rm-ls-overline: 0.12em;

  /* Alias antiguos (compatibilidad) */
  --border: var(--rm-gray-200);
  --border-2: var(--rm-gray-300);
  --radius: var(--rm-radius-lg);
  --radius-sm: var(--rm-radius);
  --shadow: var(--rm-shadow-lg);
  --shadow-sm: var(--rm-shadow-sm);
  --shadow-lg: var(--rm-shadow-lg);
  --text-1: var(--rm-gray-900);
  --text-2: var(--rm-gray-800);
  --text-3: var(--rm-gray-600);
  --text-4: var(--rm-gray-400);
  --bg-soft: var(--rm-gray-50);
  --color-success: var(--rm-success);
  --color-warning: var(--rm-warning);
  --color-danger:  var(--rm-danger);
  --color-info:    var(--rm-info);
  --color-primary-l: #dbeafe;
  --color-success-l: #d1fae5;
  --color-warning-l: #fef3c7;
  --color-danger-l:  #fee2e2;
}

.admin-body {
  background: #f1f5f9;
  color: var(--text-1);
}

/* ===== Layout ===== */
.admin-layout {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
}
.admin-sidebar {
  grid-column: 1 / -1;
  grid-row: auto;
}
.admin-topbar {
  grid-column: 1 / -1;
  grid-row: auto;
}
.admin-main {
  grid-column: 1 / -1;
  grid-row: auto;
}
@media (min-width: 992px) {
  .admin-layout {
    grid-template-columns: 260px 1fr;
    grid-template-rows: auto 1fr;
    transition: grid-template-columns .28s cubic-bezier(.2,.8,.2,1);
  }
  body.sidebar-collapsed .admin-layout {
    grid-template-columns: 72px 1fr;
  }
  .admin-sidebar {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
    transition: width .28s cubic-bezier(.2,.8,.2,1), min-width .28s ease;
    min-width: 0;
    width: 100%;
  }
  body.sidebar-collapsed .admin-sidebar,
  .admin-sidebar.is-collapsed {
    width: 72px;
  }
  body.sidebar-collapsed .admin-sidebar .admin-brand-subtitle,
  body.sidebar-collapsed .admin-sidebar .admin-badge-role,
  body.sidebar-collapsed .admin-sidebar .an-label,
  body.sidebar-collapsed .admin-sidebar .an-caret,
  .admin-sidebar.is-collapsed .admin-brand-subtitle,
  .admin-sidebar.is-collapsed .admin-badge-role,
  .admin-sidebar.is-collapsed .an-label,
  .admin-sidebar.is-collapsed .an-caret {
    display: none !important;
  }
  body.sidebar-collapsed .admin-sidebar .admin-brand,
  .admin-sidebar.is-collapsed .admin-brand {
    justify-content: center;
    padding: 1rem 0;
  }
  body.sidebar-collapsed .admin-sidebar .admin-brand-link,
  .admin-sidebar.is-collapsed .admin-brand-link {
    justify-content: center;
    flex: 0 0 auto;
  }
  body.sidebar-collapsed .admin-sidebar .admin-nav-item,
  .admin-sidebar.is-collapsed .admin-nav-item {
    justify-content: center;
    padding: .85rem 0;
  }
  body.sidebar-collapsed .admin-sidebar .admin-nav-item .an-icon,
  .admin-sidebar.is-collapsed .admin-nav-item .an-icon {
    margin: 0 auto;
  }
  body.sidebar-collapsed .admin-sidebar .admin-nav-submenu,
  .admin-sidebar.is-collapsed .admin-nav-submenu { display: none !important; }
  .admin-topbar {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
  }
  .admin-main {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
  }
}

/* ===== Sidebar — RIO MAR gradient ===== */
.admin-sidebar {
  background: linear-gradient(180deg, #0052A5 0%, #003E7E 55%, #007A3D 100%);
  color: #e2e8f0;
  width: 260px;
  overflow-y: auto;
  z-index: 50;
  display: flex;
  flex-direction: column;
}

/* ====== MOBILE ONLY: drawer offcanvas ====== */
@media (max-width: 991.98px) {
  .admin-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    bottom: 0;
    transition: left .3s ease;
  }
  .sidebar-open .admin-sidebar,
  .admin-sidebar.open {
    left: 0;
    box-shadow: 0 20px 40px rgba(0, 0, 0, .4);
  }
}

/* ====== DESKTOP: sidebar en grid, sticky ====== */
@media (min-width: 992px) {
  .admin-sidebar {
    position: sticky;
    left: 0;
    top: 0;
    height: 100vh;
  }
}

.admin-brand {
  padding: 1.15rem 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.4rem;
  flex-wrap: nowrap;
  color: #fff;
  font-weight: 800;
}
.admin-brand a {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: .6rem;
  color: #fff;
  text-decoration: none;
  font-size: 1.15rem;
  font-weight: 800;
  width: 100%;
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
}
.admin-brand-logo {
  height: 46px;
  width: auto;
  max-height: 46px;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}
.admin-brand-name {
  letter-spacing: .02em;
}
.admin-badge-role {
  margin-left: 0 !important;
  margin-right: auto !important;
  margin-top: 0.2rem;
  padding: .15rem .55rem;
  border-radius: 999px;
  background: rgba(249, 115, 22, .2);
  color: #fdba74;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .02em;
  width: fit-content;
  align-self: flex-start;
  display: inline-flex;
  justify-content: flex-start;
  text-align: left;
}

.admin-nav {
  list-style: none;
  padding: .75rem 0;
  margin: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.admin-nav-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .7rem 1.2rem;
  color: #cbd5e1;
  font-weight: 500;
  font-size: .92rem;
  border-left: 3px solid transparent;
  transition: all .15s ease;
  text-decoration: none;
}
.admin-nav-item:hover {
  background: rgba(255, 255, 255, .06);
  color: #fff;
  text-decoration: none;
  border-left-color: rgba(255, 255, 255, .2);
}
.admin-nav-item.active {
  background: rgba(255, 255, 255, .14);
  color: #fff;
  border-left-color: #00A651;
  box-shadow: inset 2px 0 0 #00A651;
}
.admin-nav-item .an-icon {
  width: 20px;
  text-align: center;
  flex-shrink: 0;
  font-size: 1rem;
}
.admin-nav-item .an-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-nav-item.admin-nav-danger {
  color: #fecaca;
}
.admin-nav-item.admin-nav-danger:hover {
  background: rgba(239, 68, 68, .15);
  color: #fff;
}

.admin-sidebar-foot {
  padding: .75rem 0;
  border-top: 1px solid rgba(255, 255, 255, .08);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* ===== Sidebar backdrop (mobile) ===== */
.sidebar-backdrop,
.app-backdrop,
.admin-drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .52);
  z-index: 45;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity .25s ease;
}
.sidebar-backdrop.show,
.app-backdrop.show,
.admin-drawer-backdrop.show {
  display: block !important;
  opacity: 1;
}

/* ===== Topbar ===== */
.admin-topbar {
  grid-column: 1 / -1;
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: .75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 30;
}
@media (min-width: 992px) {
  .admin-topbar {
    grid-column: 2 / -1;
  }
}
.admin-topbar .icon-btn {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-2);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
  color: var(--text-2);
  transition: all .15s ease;
}
.admin-topbar .icon-btn:hover {
  background: var(--bg-soft);
  border-color: var(--color-primary);
  color: var(--color-primary);
}
@media (min-width: 992px) {
  .admin-topbar .icon-btn[aria-label="Abrir menú lateral"],
  .admin-topbar .icon-btn[aria-label="Cerrar menú lateral"],
  .admin-topbar .icon-btn[aria-label="Alternar menú"],
  .admin-topbar .icon-btn[aria-label="Menú"],
  .admin-topbar .sidebar-toggle,
  .admin-topbar #sidebarToggle {
    display: inline-flex !important;
  }
}
.topbar-title {
  color: var(--text-3);
  font-size: .92rem;
  font-weight: 600;
}
.admin-topbar-spacer {
  flex: 1 1 auto;
}
.admin-user-chip {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .3rem .5rem .3rem .35rem;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  max-width: 100%;
}
.admin-user-chip .auc-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .85rem;
  flex-shrink: 0;
}
.admin-user-chip .auc-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.1;
}
.admin-user-chip .auc-name {
  font-size: .88rem;
  font-weight: 700;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-user-chip .auc-email {
  font-size: .75rem;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== Main ===== */
.admin-main {
  min-width: 0;
  padding: 0 0 2.5rem;
  display: flex;
  flex-direction: column;
}
.admin-container {
  padding: 1.25rem 1.25rem 0;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

/* ===== Page head ===== */
.page-head {
  margin-bottom: 1.25rem;
}
.page-head-inner {
  padding: 1.1rem 1.25rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
}
.page-head-inner .mb-1 { margin-bottom: .25rem; }
.page-head-inner .mb-0 { margin-bottom: 0; }
.h-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-1);
  margin: 0;
}
.muted {
  color: var(--text-3) !important;
}
.muted-sm {
  color: var(--text-3);
  font-size: .8rem;
}
.mb-1 { margin-bottom: .25rem; }
.mb-2 { margin-bottom: .5rem; }
.mb-3 { margin-bottom: .75rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: .5rem; }
.mt-3 { margin-top: .75rem; }
.px-3 { padding-left: .75rem; padding-right: .75rem; }
.py-2 { padding-top: .5rem; padding-bottom: .5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.text-center { text-align: center; }
.d-none { display: none !important; }
@media (min-width: 768px) {
  .d-md-block { display: block !important; }
  .d-md-none  { display: none !important; }
}
.flex-wrap { flex-wrap: wrap; }

/* ===== Utilities flex/gap ===== */
.d-flex { display: flex; align-items: center; }
.d-flex.align-start   { align-items: flex-start; }
.d-flex.justify-between { justify-content: space-between; }
.gap-1 { gap: .25rem; }
.gap-2 { gap: .5rem; }
.gap-3 { gap: .75rem; }
.gap-4 { gap: 1rem; }
.mb-0  { margin-bottom: 0; }

/* ===== Base Card ===== */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.card-body {
  padding: 1.25rem;
  box-sizing: border-box;
}
.card-body.p-0 { padding: 0; }

/* ===== Base Tabla ===== */
.table {
  width: 100%;
  border-collapse: collapse;
}
.table th, .table td {
  padding: .75rem 1rem;
  vertical-align: middle;
}
.table thead th {
  background: var(--bg-soft);
  font-weight: 700;
  color: var(--text-3);
  font-size: .82rem;
  letter-spacing: .03em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.table tbody td {
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--bg-soft); }
.mb-0 { margin-bottom: 0; }

/* ===== Base Botones ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .55rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .9rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .15s ease;
  white-space: nowrap;
  font-family: inherit;
  color: var(--text-1);
  background: #fff;
}
.btn:hover { text-decoration: none; }
.btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
.btn-sm { padding: .35rem .75rem; font-size: .82rem; border-radius: 8px; }
.btn-primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.btn-primary:hover { filter: brightness(1.08); color: #fff; }
.btn-outline-primary {
  background: #fff;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-outline-primary:hover {
  background: var(--color-primary);
  color: #fff;
}
.btn-accent {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}
.btn-accent:hover { filter: brightness(1.06); color: #fff; }
.btn-outline-accent {
  background: #fff;
  color: var(--color-accent);
  border-color: var(--color-accent);
}
.btn-outline-accent:hover {
  background: var(--color-accent);
  color: #fff;
}
.btn-danger {
  background: var(--color-danger);
  color: #fff;
  border-color: var(--color-danger);
}
.btn-danger:hover { filter: brightness(1.06); color: #fff; }
.btn-outline-danger {
  background: #fff;
  color: var(--color-danger);
  border-color: var(--color-danger);
}
.btn-outline-danger:hover {
  background: var(--color-danger);
  color: #fff;
}
.btn-secondary {
  background: #64748b;
  color: #fff;
  border-color: #64748b;
}
.btn-secondary:hover { filter: brightness(1.08); color: #fff; }
.btn-outline-secondary {
  background: #fff;
  color: #475569;
  border-color: #94a3b8;
}
.btn-outline-secondary:hover {
  background: #475569;
  color: #fff;
  border-color: #475569;
}

/* ===== Cards (admin flavor) ===== */
.card-header {
  padding: .95rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
  background: #fff;
}
.card-title-sm {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-1);
}

/* ===== Stats cards ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all .2s ease;
  box-shadow: var(--shadow-sm);
}
.stat-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.stat-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.stat-body { flex: 1; min-width: 0; }
.stat-value {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-1);
  line-height: 1.1;
}
.stat-label {
  font-size: .85rem;
  color: var(--text-3);
  margin-top: .25rem;
}
.stat-foot {
  font-size: .78rem;
  color: var(--text-3);
  margin-top: .4rem;
}
.stat-card.sc-primary  .stat-icon { background: rgba(59, 130, 246, .12); color: #2563eb; }
.stat-card.sc-secondary .stat-icon { background: rgba(14, 165, 233, .14); color: #0369a1; }
.stat-card.sc-accent   .stat-icon { background: rgba(249, 115, 22, .14); color: #c2410c; }
.stat-card.sc-success  .stat-icon { background: rgba(16, 185, 129, .14); color: #047857; }

/* ===== Simple chart (barras inline) ===== */
.simple-chart {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
  gap: .75rem;
  align-items: end;
  min-height: 220px;
  padding: 1rem .5rem 0;
}
.sc-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  height: 220px;
  justify-content: flex-end;
}
.sc-bar {
  width: 70%;
  background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  border-radius: 8px 8px 0 0;
  min-height: 12px;
  position: relative;
  box-shadow: var(--shadow-sm);
}
.sc-value {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: .78rem;
  font-weight: 700;
  color: var(--text-2);
  white-space: nowrap;
}
.sc-label {
  font-size: .72rem;
  color: var(--text-3);
  font-weight: 600;
  text-align: center;
}

/* ===== Tabla compacta ===== */
.table-compact {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
.table-compact thead th {
  text-align: left;
  padding: .7rem 1rem;
  background: var(--bg-soft);
  color: var(--text-3);
  font-weight: 700;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  border-bottom: 1px solid var(--border);
}
.table-compact tbody td {
  padding: .65rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  vertical-align: middle;
}
.table-compact tbody tr:last-child td {
  border-bottom: none;
}
.table-compact tbody tr:hover {
  background: var(--bg-soft);
}
.list-empty {
  padding: 2rem 1rem;
  color: var(--text-3);
  font-size: .9rem;
}

/* ===== Badges ===== */
.badge {
  display: inline-block;
  padding: .2rem .55rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.2;
}
.badge-success { background: var(--color-success-l); color: #047857; }
.badge-warning { background: var(--color-warning-l); color: #b45309; }
.badge-danger  { background: var(--color-danger-l);  color: #b91c1c; }
.badge-info    { background: #e0f2fe; color: #0369a1; }
.badge-secondary{ background: #e2e8f0; color: #334155; }
.badge-accent  { background: #ffedd5; color: #c2410c; }

/* ===== Buttons ===== */
.btn-xs {
  padding: .25rem .55rem;
  font-size: .74rem;
  border-radius: 8px;
}

/* ===== Timeline (Auditoría) ===== */
.timeline {
  list-style: none;
  margin: 0;
  padding: .75rem 1rem 1rem 1rem;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: calc(1.1rem + .5px);
  top: 1.25rem;
  bottom: 1.25rem;
  width: 2px;
  background: var(--border);
}
.tl-item {
  position: relative;
  padding-left: 2.4rem;
  padding-bottom: 1rem;
}
.tl-item:last-child { padding-bottom: .25rem; }
.tl-icon {
  position: absolute;
  left: 0;
  top: .1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  z-index: 1;
  box-shadow: var(--shadow-sm);
}
.tl-body { min-width: 0; }
.tl-title {
  font-size: .9rem;
  margin-bottom: .2rem;
  color: var(--text-2);
}
.tl-title strong { color: var(--text-1); }
.tl-title .badge { margin: 0 .35rem; }
.tl-desc {
  font-size: .82rem;
  color: var(--text-3);
}

/* ===== Columnas responsive ===== */
.col-12 { width: 100%; box-sizing: border-box; padding: 0 .75rem; }
@media (min-width: 768px) {
  .col-md-6 { width: 50%; }
  .col-md-4 { width: 33.3333%; }
  .col-md-8 { width: 66.6666%; }
}
@media (min-width: 992px) {
  .col-lg-3 { width: 25%; }
  .col-lg-4 { width: 33.3333%; }
  .col-lg-5 { width: 41.6666%; }
  .col-lg-6 { width: 50%; }
  .col-lg-7 { width: 58.3333%; }
  .col-lg-8 { width: 66.6666%; }
  .col-lg-9 { width: 75%; }
}
.row {
  margin: 0 -.75rem;
  display: flex;
  flex-wrap: wrap;
}
.row.g-4 {
  row-gap: 1rem;
}
.h-100 { height: 100%; }

/* ===== Admin card base (nomenclatura alternativa) ===== */
.admin-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 1rem;
}
.admin-card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
}
.admin-card-header h3 { margin: 0; font-size: 1.05rem; }
.admin-card-body   { padding: 1.25rem; }
.admin-card-footer { padding: .9rem 1.25rem; border-top: 1px solid var(--border); background: #fbfcfe; }

/* ===== Admin toolbars ===== */
.admin-toolbar {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  justify-content: space-between;
  align-items: center;
}
.admin-toolbar .filters-inline {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  flex: 1;
}
.admin-toolbar .filters-inline .form-control,
.admin-toolbar .filters-inline .form-select {
  width: auto;
  max-width: 220px;
}

/* ===== Estados chips ===== */
.status-dot {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-weight: 600;
  font-size: .82rem;
}
.status-dot::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-3);
}
.status-published::before { background: var(--color-success); }
.status-draft::before     { background: var(--color-warning); }
.status-inactive::before  { background: var(--text-4); }
.status-active::before    { background: var(--color-success); }

/* ===== Formularios Admin ===== */
.admin-form-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.5rem;
}
.form-row {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .form-row.cols-2 { grid-template-columns: 1fr 1fr; }
  .form-row.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .form-row.cols-4 { grid-template-columns: repeat(4, 1fr); }
}
.form-section-title {
  font-size: .85rem;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .04em;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--border);
  margin: 1.2rem 0 1rem;
}
.choices-list {
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  padding: .5rem;
  max-height: 200px;
  overflow-y: auto;
  background: #fff;
}
.choices-list label {
  display: flex;
  gap: .5rem;
  align-items: center;
  padding: .35rem .55rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: .9rem;
}
.choices-list label:hover { background: var(--bg-soft); }
.choices-list input { flex-shrink: 0; }

/* ===== Editor WYSIWYG ===== */
.wysiwyg-editor {
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #fff;
}
.wysiwyg-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
  padding: .5rem;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border-2);
}
.wysiwyg-toolbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 32px;
  padding: 0 .65rem;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  font-weight: 600;
  font-size: .9rem;
  color: var(--text-2);
  transition: all .15s ease;
}
.wysiwyg-toolbar button:hover {
  background: #fff;
  border-color: var(--border-2);
  color: var(--color-primary);
}
.wysiwyg-toolbar button.is-active {
  background: var(--color-primary);
  color: #fff;
}
.wysiwyg-toolbar .toolbar-sep {
  width: 1px;
  background: var(--border-2);
  margin: .25rem .25rem;
}
.wysiwyg-content {
  padding: 1rem;
  min-height: 280px;
  max-height: 600px;
  overflow-y: auto;
  font-size: .95rem;
  line-height: 1.7;
  color: var(--text-1);
  background: #fff;
}
.wysiwyg-content:focus { outline: none; }
.wysiwyg-content > :last-child { margin-bottom: 0; }
.wysiwyg-content h1 { font-size: 1.6rem; }
.wysiwyg-content h2 { font-size: 1.35rem; }
.wysiwyg-content h3 { font-size: 1.15rem; }
.wysiwyg-content ul, .wysiwyg-content ol { padding-left: 1.5rem; }
.wysiwyg-content blockquote {
  border-left: 4px solid var(--color-primary-l);
  margin: 1rem 0;
  padding: .5rem 1rem;
  background: var(--bg-soft);
  color: var(--text-2);
}
.wysiwyg-content a { color: var(--color-primary); text-decoration: underline; }
.wysiwyg-content table { border-collapse: collapse; width: 100%; }
.wysiwyg-content table td, .wysiwyg-content table th {
  border: 1px solid var(--border-2);
  padding: .5rem;
}

/* ===== Modales ===== */
.swal-simple {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .55);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.swal-simple.show { display: flex; }
.swal-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.5rem;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.swal-card h4 { margin: 0 0 .5rem; }
.swal-card p  { color: var(--text-3); margin-bottom: 1.2rem; }
.swal-card .swal-actions {
  display: flex;
  gap: .5rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Audit log chips ===== */
.action-chip {
  display: inline-block;
  padding: .2rem .55rem;
  font-size: .72rem;
  font-weight: 700;
  border-radius: 6px;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.action-create  { background: rgba(16, 185, 129, .12); color: #047857; }
.action-update  { background: rgba(59, 130, 246, .12); color: #1d4ed8; }
.action-delete  { background: rgba(239, 68, 68, .12);  color: #b91c1c; }
.action-publish { background: rgba(139, 92, 246, .12); color: #6d28d9; }
.action-login,
.action-logout  { background: rgba(245, 158, 11, .12); color: #b45309; }
.action-upload  { background: rgba(14, 165, 233, .12);  color: #0369a1; }

/* ===== Dropzone ===== */
.dropzone {
  border: 2px dashed var(--border-2);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  text-align: center;
  background: #fbfcfe;
  transition: all .2s ease;
  cursor: pointer;
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--color-primary-l);
  background: #eff6ff;
}
.dropzone .dz-icon {
  font-size: 2rem;
  color: var(--text-4);
  margin-bottom: .5rem;
}
.dropzone p {
  margin: 0;
  color: var(--text-3);
  font-size: .88rem;
}

/* ===== Login ===== */
.login-wrap {
  min-height: 100vh;
  background: linear-gradient(135deg, #f8fafc 0%, #e0f2fe 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.login-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 420px;
  padding: 2rem 1.75rem;
}
.login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  margin-bottom: .25rem;
}
.login-brand img { height: 40px; width: auto; }
.login-title {
  font-size: 1.15rem;
  font-weight: 700;
  text-align: center;
  color: var(--text-3);
  margin: .5rem 0 1.5rem;
}
.admin-login-title {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--color-primary);
}
.login-credentials {
  margin-top: 1rem;
  padding: .6rem .75rem;
  background: var(--bg-soft);
  border: 1px dashed var(--border-2);
  border-radius: 8px;
  font-size: .78rem;
  color: var(--text-3);
  line-height: 1.5;
}
.login-credentials code {
  display: block;
  padding: .1rem 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .78rem;
  color: var(--text-2);
}
.login-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  margin-top: .5rem;
  flex-wrap: wrap;
}

/* ===== Ajustes form layout ===== */
.settings-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 992px) {
  .settings-grid.cols-2 { grid-template-columns: 1fr 1fr; }
}

/* ===== Alerts ===== */
.alert {
  border-radius: 10px;
  padding: .9rem 1.1rem;
  margin-bottom: 1rem;
  font-size: .92rem;
  border: 1px solid transparent;
}
.alert-success {
  background: var(--color-success-l);
  color: #065f46;
  border-color: #a7f3d0;
}
.alert-danger {
  background: var(--color-danger-l);
  color: #7f1d1d;
  border-color: #fecaca;
}
.alert-warning {
  background: var(--color-warning-l);
  color: #92400e;
  border-color: #fde68a;
}
.alert-info {
  background: #e0f2fe;
  color: #075985;
  border-color: #bae6fd;
}
.alert strong { font-weight: 700; }
.alert[data-autodismiss] {
  animation: alertIn .25s ease;
}
@keyframes alertIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   DESIGN TOKENS — UTILITIES (admin)
   ========================================================================== */

/* Tipografía */
.admin-body { font-family: var(--rm-font-sans); }
.h1 { font-size: var(--rm-fs-h1); line-height: var(--rm-lh-tight); letter-spacing: var(--rm-ls-tight); font-weight: 800; color: var(--rm-gray-900); }
.h2 { font-size: var(--rm-fs-h2); line-height: var(--rm-lh-tight); letter-spacing: var(--rm-ls-tight); font-weight: 800; color: var(--rm-gray-900); }
.h3 { font-size: var(--rm-fs-h3); line-height: 1.22; letter-spacing: var(--rm-ls-tight); font-weight: 700; color: var(--rm-gray-900); }
.h4 { font-size: var(--rm-fs-h4); line-height: 1.25; letter-spacing: -0.01em; font-weight: 700; color: var(--rm-gray-900); }
.h5 { font-size: var(--rm-fs-h5); line-height: 1.3; font-weight: 600; color: var(--rm-gray-900); }
.h6 { font-size: var(--rm-fs-h6); line-height: 1.35; font-weight: 600; color: var(--rm-gray-900); }
.caption  { font-size: var(--rm-fs-caption); line-height: 1.5; color: var(--rm-gray-500); }
.overline { font-size: var(--rm-fs-overline); line-height: 1.4; letter-spacing: var(--rm-ls-overline); text-transform: uppercase; font-weight: 600; color: var(--rm-gray-500); }
.text-muted   { color: var(--rm-gray-500) !important; }
.text-subtle  { color: var(--rm-gray-600) !important; }
.text-truncate{ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.fw-500 { font-weight: 500; } .fw-600 { font-weight: 600; } .fw-700 { font-weight: 700; } .fw-800 { font-weight: 800; }
.muted-sm { font-size: var(--rm-fs-caption); color: var(--rm-gray-500); }

/* Flex / Grid */
.d-flex { display: flex; } .d-inline-flex { display: inline-flex; }
.d-grid { display: grid; } .d-block { display: block; } .d-none { display: none !important; }
.flex-column { flex-direction: column; } .flex-wrap { flex-wrap: wrap; } .flex-grow-1 { flex-grow: 1; }
.justify-content-start { justify-content: flex-start; }
.justify-content-end { justify-content: flex-end; }
.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-around { justify-content: space-around; }
.align-items-start { align-items: flex-start; }
.align-items-end { align-items: flex-end; }
.align-items-center { align-items: center; }
.align-items-stretch { align-items: stretch; }
.gap-0 { gap: 0; } .gap-1 { gap: var(--rm-space-1); } .gap-2 { gap: var(--rm-space-2); }
.gap-3 { gap: var(--rm-space-3); } .gap-4 { gap: var(--rm-space-4); } .gap-5 { gap: var(--rm-space-5); } .gap-6 { gap: var(--rm-space-6); }

/* Spacing */
.m-0 { margin: 0; } .p-0 { padding: 0; } .p-4 { padding: var(--rm-space-4); }
.mt-1 { margin-top: var(--rm-space-1); } .mb-1 { margin-bottom: var(--rm-space-1); }
.mt-2 { margin-top: var(--rm-space-2); } .mb-2 { margin-bottom: var(--rm-space-2); }
.mt-3 { margin-top: var(--rm-space-3); } .mb-3 { margin-bottom: var(--rm-space-3); }
.mt-4 { margin-top: var(--rm-space-4); } .mb-4 { margin-bottom: var(--rm-space-4); }
.mt-5 { margin-top: var(--rm-space-5); } .mb-5 { margin-bottom: var(--rm-space-5); }
.mt-6 { margin-top: var(--rm-space-6); } .mb-6 { margin-bottom: var(--rm-space-6); }
.py-3 { padding-top: var(--rm-space-3); padding-bottom: var(--rm-space-3); }
.py-4 { padding-top: var(--rm-space-4); padding-bottom: var(--rm-space-4); }
.px-3 { padding-left: var(--rm-space-3); padding-right: var(--rm-space-3); }
.px-4 { padding-left: var(--rm-space-4); padding-right: var(--rm-space-4); }
.ms-auto { margin-left: auto; } .me-auto { margin-right: auto; } .mx-auto { margin-left: auto; margin-right: auto; }

/* Sombra · Radio · Width · Background · Border · Text-align */
.w-100 { width: 100%; } .h-100 { height: 100%; }
.rounded-sm { border-radius: var(--rm-radius-sm); }
.rounded    { border-radius: var(--rm-radius); }
.rounded-md { border-radius: var(--rm-radius-md); }
.rounded-lg { border-radius: var(--rm-radius-lg); }
.rounded-xl { border-radius: var(--rm-radius-xl); }
.rounded-pill { border-radius: var(--rm-radius-pill); }
.shadow-sm { box-shadow: var(--rm-shadow-sm); }
.shadow    { box-shadow: var(--rm-shadow); }
.shadow-md { box-shadow: var(--rm-shadow-md); }
.shadow-lg { box-shadow: var(--rm-shadow-lg); }
.border-top    { border-top: 1px solid var(--rm-gray-200); }
.border-bottom { border-bottom: 1px solid var(--rm-gray-200); }
.bg-white   { background: #fff; }
.bg-gray-50 { background: var(--rm-gray-50); }
.text-center { text-align: center; } .text-right { text-align: right; } .text-left { text-align: left; }

/* Responsive */
@media (min-width: 768px) { .d-md-flex { display: flex; } .d-md-block { display: block; } .d-md-none { display: none !important; } }
@media (min-width: 992px) { .d-lg-flex { display: flex; } .d-lg-block { display: block; } .d-lg-none { display: none !important; } }

/* ==========================================================================
   BOTONES · rm-btn family (admin coherente con portal)
   ========================================================================== */
.rm-btn {
  --rm-btn-bg: var(--rm-primary);
  --rm-btn-fg: #fff;
  --rm-btn-border: 1px solid transparent;
  --rm-btn-hover-bg: var(--rm-primary-dark);
  --rm-btn-hover-fg: #fff;
  --rm-btn-focus-ring: 0 0 0 3px rgba(0,82,165,.25);
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 40px; padding: 0 1.1rem;
  border: var(--rm-btn-border); border-radius: var(--rm-radius-pill);
  background: var(--rm-btn-bg); color: var(--rm-btn-fg);
  font-family: var(--rm-font-sans); font-size: .9rem; font-weight: 600;
  line-height: 1; letter-spacing: -0.01em;
  text-decoration: none; white-space: nowrap; cursor: pointer; user-select: none;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease,
              box-shadow 150ms ease, transform 150ms ease;
  box-sizing: border-box;
}
.rm-btn:hover { background: var(--rm-btn-hover-bg); color: var(--rm-btn-hover-fg); text-decoration: none; }
.rm-btn:active { transform: translateY(1px); }
.rm-btn:focus-visible { outline: none; box-shadow: var(--rm-btn-focus-ring); }
.rm-btn[disabled], .rm-btn.is-disabled { opacity: .55; cursor: not-allowed; pointer-events: none; filter: saturate(.6); }
.rm-btn-sm { min-height: 34px; padding: 0 .9rem; font-size: .82rem; }
.rm-btn-lg { min-height: 48px; padding: 0 1.5rem; font-size: .97rem; font-weight: 700; }

.rm-btn-primary { --rm-btn-bg: var(--rm-primary); --rm-btn-hover-bg: var(--rm-primary-dark); --rm-btn-focus-ring: 0 0 0 3px rgba(0,82,165,.3); }
.rm-btn-secondary { --rm-btn-bg: var(--rm-gray-800); --rm-btn-hover-bg: var(--rm-gray-900); --rm-btn-focus-ring: 0 0 0 3px rgba(30,41,59,.25); }
.rm-btn-success { --rm-btn-bg: var(--rm-success); --rm-btn-hover-bg: #166534; --rm-btn-focus-ring: 0 0 0 3px rgba(21,128,61,.3); }
.rm-btn-danger  { --rm-btn-bg: var(--rm-danger);  --rm-btn-hover-bg: #991b1b; --rm-btn-focus-ring: 0 0 0 3px rgba(185,28,28,.28); }
.rm-btn-warning { --rm-btn-bg: var(--rm-warning); --rm-btn-hover-bg: #92400e; --rm-btn-focus-ring: 0 0 0 3px rgba(180,83,9,.28); }
.rm-btn-info    { --rm-btn-bg: var(--rm-info);    --rm-btn-hover-bg: #075985; --rm-btn-focus-ring: 0 0 0 3px rgba(3,105,161,.3); }
.rm-btn-ghost   {
  --rm-btn-bg: transparent; --rm-btn-fg: var(--rm-primary);
  --rm-btn-border: 1px solid var(--rm-gray-200); --rm-btn-hover-bg: var(--rm-gray-50);
  --rm-btn-hover-fg: var(--rm-primary-dark); --rm-btn-focus-ring: 0 0 0 3px rgba(0,82,165,.2);
}
.rm-btn-link {
  --rm-btn-bg: transparent; --rm-btn-fg: var(--rm-primary); --rm-btn-hover-bg: transparent;
  --rm-btn-hover-fg: var(--rm-primary-dark); --rm-btn-focus-ring: 0 0 0 3px rgba(0,82,165,.2);
  padding: 0 .5rem; min-height: 28px; border-radius: 6px;
}
.rm-btn-link:hover { text-decoration: underline; }
.rm-btn-outline-primary { --rm-btn-bg: #fff; --rm-btn-fg: var(--rm-primary); --rm-btn-border: 1px solid var(--rm-primary); --rm-btn-hover-bg: var(--rm-primary); --rm-btn-hover-fg: #fff; }
.rm-btn-outline-success { --rm-btn-bg: #fff; --rm-btn-fg: var(--rm-success); --rm-btn-border: 1px solid var(--rm-success); --rm-btn-hover-bg: var(--rm-success); --rm-btn-hover-fg: #fff; --rm-btn-focus-ring: 0 0 0 3px rgba(21,128,61,.25); }
.rm-btn-outline-danger  { --rm-btn-bg: #fff; --rm-btn-fg: var(--rm-danger);  --rm-btn-border: 1px solid var(--rm-danger);  --rm-btn-hover-bg: var(--rm-danger);  --rm-btn-hover-fg: #fff; --rm-btn-focus-ring: 0 0 0 3px rgba(185,28,28,.25); }

/* Loading spinner */
.rm-btn.is-loading { pointer-events: none; color: transparent !important; position: relative; }
.rm-btn.is-loading::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 1.1em; height: 1.1em; margin: -.55em 0 0 -.55em;
  border: 2px solid currentColor; border-right-color: transparent !important;
  border-top-color: transparent !important; border-radius: 50%;
  animation: rm-btn-spin .75s linear infinite; color: #fff;
}
.rm-btn-ghost.is-loading::after, .rm-btn-outline-primary.is-loading::after { color: var(--rm-primary); }
.rm-btn-outline-success.is-loading::after { color: var(--rm-success); }
.rm-btn-outline-danger.is-loading::after  { color: var(--rm-danger); }
@keyframes rm-btn-spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   STATS GRID · Responsive <576 1col, ≥576 2col, ≥992 3col
   ========================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--rm-space-4);
}
@media (min-width: 576px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 992px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
}
.stat-card {
  background: #fff;
  border-radius: var(--rm-radius-lg);
  box-shadow: var(--rm-shadow-sm);
  padding: var(--rm-space-5);
  height: 100%;
  border: 1px solid var(--rm-gray-100);
  border-left: 4px solid var(--rm-primary);
  transition: box-shadow 150ms ease, transform 150ms ease;
}
.stat-card:hover { box-shadow: var(--rm-shadow-md); transform: translateY(-1px); }
.stat-card[data-accent="primary"]   { border-left-color: var(--rm-primary); }
.stat-card[data-accent="secondary"] { border-left-color: var(--rm-secondary); }
.stat-card[data-accent="success"]   { border-left-color: var(--rm-success); }
.stat-card[data-accent="warning"]   { border-left-color: var(--rm-warning); }
.stat-card[data-accent="danger"]    { border-left-color: var(--rm-danger); }
.stat-card[data-accent="info"]      { border-left-color: var(--rm-info); }
.stat-card[data-accent="breaking"]  { border-left-color: var(--rm-breaking); }
.stat-label  { font-size: var(--rm-fs-caption); color: var(--rm-gray-500); letter-spacing: 0.02em; text-transform: uppercase; font-weight: 600; margin-bottom: var(--rm-space-2); }
.stat-value  { font-size: 2rem; line-height: 1.1; letter-spacing: -0.02em; font-weight: 800; color: var(--rm-gray-900); margin: 0; }
.stat-delta  { margin-top: var(--rm-space-2); font-size: var(--rm-fs-caption); color: var(--rm-success); display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; }
.stat-delta.is-down { color: var(--rm-danger); }
.stat-icon  { font-size: 1.5rem; opacity: .85; }

/* ==========================================================================
   PAGE HEAD (encabezado páginas admin) · flex-wrap gap-3
   ========================================================================== */
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--rm-space-3);
  flex-wrap: wrap;
  margin-bottom: var(--rm-space-5);
}
.page-head-title { margin: 0; font-size: var(--rm-fs-h3); font-weight: 800; color: var(--rm-gray-900); letter-spacing: -0.01em; }
.page-head-sub { margin-top: var(--rm-space-1); font-size: var(--rm-fs-caption); color: var(--rm-gray-500); }
.page-head-actions { display: flex; align-items: center; gap: var(--rm-space-2); flex-wrap: wrap; }

/* ==========================================================================
   TABLES ADMIN · thead gray-50, hover rows, padding uniforme, col-img-thumb
   ========================================================================== */
.table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--rm-gray-100);
  border-radius: var(--rm-radius-lg);
  overflow: hidden;
  box-shadow: var(--rm-shadow-sm);
}
.table thead th {
  background: var(--rm-gray-50);
  color: var(--rm-gray-600);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.65rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--rm-gray-200);
  white-space: nowrap;
}
.table tbody td {
  padding: 0.6rem 0.85rem;
  font-size: .92rem;
  color: var(--rm-gray-800);
  border-bottom: 1px solid var(--rm-gray-100);
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--rm-gray-50); }
.table tbody tr:hover td { color: var(--rm-gray-900); }
.table .col-img-thumb,
.table th.col-img-thumb,
.table td.col-img-thumb {
  width: 72px;
  min-width: 72px;
  max-width: 72px;
}
.table .col-actions {
  width: 180px;
  white-space: nowrap;
}

/* ==========================================================================
   TIMELINE AUDITORÍA · vertical line + tl-icon 32px semáforo
   ========================================================================== */
.timeline { padding-left: 0; list-style: none; }
.tl-item {
  position: relative;
  padding: 0 0 var(--rm-space-5) var(--rm-space-6);
}
.tl-item:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 32px;
  bottom: 0;
  width: 2px;
  background: var(--rm-gray-200);
}
.tl-icon {
  position: absolute;
  left: 0; top: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--rm-primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 700;
  box-shadow: 0 0 0 4px #fff, 0 2px 6px rgba(15,23,42,.15);
}
.tl-icon[data-kind="login"]    { background: var(--rm-success); }
.tl-icon[data-kind="create"]   { background: var(--rm-info); }
.tl-icon[data-kind="update"]   { background: var(--rm-warning); }
.tl-icon[data-kind="delete"]   { background: var(--rm-danger); }
.tl-icon[data-kind="publish"]  { background: var(--rm-secondary); }
.tl-icon[data-kind="default"]  { background: var(--rm-gray-500); }
.tl-title { font-size: .94rem; font-weight: 700; color: var(--rm-gray-900); margin: 0; line-height: 1.3; }
.tl-meta  { font-size: .78rem; color: var(--rm-gray-500); margin-top: var(--rm-space-1); }
.tl-body  { margin-top: var(--rm-space-2); font-size: .85rem; color: var(--rm-gray-700);
            background: var(--rm-gray-50); border-radius: var(--rm-radius);
            padding: .7rem .9rem; border: 1px solid var(--rm-gray-100);
            font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
            max-height: 180px; overflow-x: auto; white-space: pre-wrap; word-break: break-word; }

/* ==========================================================================
   NUEVO LAYOUT APP (profesional tipo Tabler/CoreUI) — app-layout / app-wrapper / app-sidebar / app-header / app-main
   ========================================================================== */
.app-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--rm-gray-50);
}
@media (min-width: 992px) {
  .app-layout { flex-direction: row; }
}
/* Sidebar sticky 260px desktop / drawer fixed offcanvas móvil */
.app-sidebar {
  background: linear-gradient(180deg, #0052A5 0%, #003E7E 55%, #007A3D 100%);
  color: #e2e8f0;
  width: 100%;
  z-index: 50;
  display: flex;
  flex-direction: column;
}
@media (min-width: 992px) {
  .app-sidebar {
    width: 260px;
    flex: 0 0 260px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
  }
}
@media (max-width: 991.98px) {
  .app-sidebar {
    position: fixed;
    top: 0; left: -260px; bottom: 0;
    width: 260px;
    transition: transform .28s ease, left .28s ease;
  }
  .app-layout.sidebar-open .app-sidebar {
    left: 0;
    box-shadow: 0 20px 60px rgba(0,0,0,.4);
  }
}
/* Wrapper: contiene header + main */
.app-wrapper {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--rm-gray-200);
  padding: .75rem var(--rm-space-4);
  display: flex;
  align-items: center;
  gap: var(--rm-space-3);
  min-height: 56px;
}
/* Botón hamburguesa (visible solo móvil) */
.app-header .sidebar-toggle {
  display: inline-flex;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  border: 1px solid var(--rm-gray-200);
  border-radius: var(--rm-radius);
  background: #fff;
  color: var(--rm-gray-700);
  font-size: 1.2rem;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}
.app-header .sidebar-toggle:hover {
  background: var(--rm-gray-50);
  border-color: var(--rm-primary);
  color: var(--rm-primary);
}
@media (min-width: 992px) {
  .app-header .sidebar-toggle { display: none; }
}
/* Backdrop (mobile — click outside close) */
.app-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.55);
  z-index: 45;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.app-layout.sidebar-open .app-backdrop {
  opacity: 1;
  pointer-events: auto;
}
/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: var(--rm-fs-caption);
  color: var(--rm-gray-500);
  margin: 0;
  padding: 0;
  list-style: none;
  flex-wrap: wrap;
}
.breadcrumbs a { color: var(--rm-gray-600); text-decoration: none; font-weight: 500; }
.breadcrumbs a:hover { color: var(--rm-primary); text-decoration: underline; }
.breadcrumbs li:last-child { color: var(--rm-gray-800); font-weight: 600; }
.breadcrumbs .sep { color: var(--rm-gray-300); }

/* Header search box */
.app-header-search {
  position: relative;
  max-width: 480px;
  width: 100%;
  flex: 1 1 280px;
}
.app-header-search .search-input {
  width: 100%;
  height: 40px;
  padding: 0 1rem 0 2.3rem;
  border-radius: var(--rm-radius-pill);
  border: 1px solid var(--rm-gray-200);
  background: var(--rm-gray-50);
  font-size: .9rem;
  color: var(--rm-gray-800);
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}
.app-header-search .search-input:focus {
  outline: none;
  border-color: var(--rm-primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0,82,165,.15);
}
.app-header-search .search-icon {
  position: absolute; left: .85rem; top: 50%;
  transform: translateY(-50%);
  color: var(--rm-gray-400);
  font-size: .9rem; pointer-events: none;
}
/* User chip header */
.user-chip {
  display: flex; align-items: center; gap: .6rem;
  padding: .25rem .4rem .25rem .3rem;
  border-radius: var(--rm-radius-pill);
  background: var(--rm-gray-50);
  border: 1px solid var(--rm-gray-200);
  max-width: 260px;
  cursor: pointer;
  position: relative;
}
.user-chip:hover { border-color: var(--rm-gray-300); }
.user-chip-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rm-primary), var(--rm-secondary));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .85rem;
  flex-shrink: 0;
}
.user-chip-info { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.user-chip-name { font-size: .88rem; font-weight: 700; color: var(--rm-gray-800); }
.user-chip-role { font-size: .75rem; color: var(--rm-gray-500); }
.user-chip-caret { color: var(--rm-gray-400); font-size: .75rem; }

/* main app */
.app-main {
  flex: 1 1 auto;
  padding: var(--rm-space-5) var(--rm-space-4);
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
}
@media (min-width: 768px) {
  .app-main { padding: var(--rm-space-6); }
}
.flash-stack {
  margin-bottom: var(--rm-space-4);
  display: flex;
  flex-direction: column;
  gap: var(--rm-space-2);
}

/* ==========================================================================
   ACCESIBILIDAD ADMIN · focus-visible / reduced-motion / dark mode
   ========================================================================== */

/* Focus-visible 3px todos los elementos interactivos */
.admin-body a:focus-visible,
.admin-body button:focus-visible,
.admin-body input:focus-visible,
.admin-body select:focus-visible,
.admin-body textarea:focus-visible,
.admin-body [role="button"]:focus-visible,
.admin-body [tabindex]:focus-visible,
.app-sidebar a:focus-visible,
.app-header a:focus-visible {
  outline: 3px solid var(--rm-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Prefers reduced motion · global admin */
@media (prefers-reduced-motion: reduce) {
  .admin-body *,
  .admin-body *::before,
  .admin-body *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .stat-card:hover { transform: none !important; }
  .alert[data-autodismiss] { animation: none !important; }
  .rm-btn.is-loading::after { animation-duration: .001ms !important; }
}

/* Prefers color-scheme: dark · admin token swap */
@media (prefers-color-scheme: dark) {
  .admin-body {
    --rm-gray-50: #0b1220;
    --rm-gray-100: #111a2e;
    --rm-gray-200: #1e2a44;
    --rm-gray-300: #334166;
    --rm-gray-400: #64748b;
    --rm-gray-500: #94a3b8;
    --rm-gray-600: #cbd5e1;
    --rm-gray-700: #e2e8f0;
    --rm-gray-800: #f1f5f9;
    --rm-gray-900: #f8fafc;
    --rm-white: #0b1220;
    --bg-soft: #0b1220;
    --color-primary-l: #0f2344;
    --color-success-l: #0a2e22;
    --color-warning-l: #3b2a06;
    --color-danger-l:  #3b0f12;
    --rm-shadow-sm: 0 1px 2px 0 rgba(0,0,0,.5);
    --rm-shadow-md: 0 4px 14px -4px rgba(0,0,0,.55);
    --rm-shadow: 0 4px 14px -4px rgba(0,0,0,.55);
    --rm-shadow-lg: 0 20px 50px -12px rgba(0,0,0,.6);
    background: #0b1220;
    color: var(--rm-gray-800);
  }
  .admin-body .card,
  .admin-body .stat-card,
  .admin-body .table,
  .admin-body .page-head,
  .admin-body .user-chip,
  .admin-body .app-header,
  .admin-body .user-chip-caret { background-color: #111a2e !important; color: var(--rm-gray-700); border-color: var(--rm-gray-200); }
  .admin-body .table thead th { background: #15213a; color: var(--rm-gray-500); border-bottom-color: var(--rm-gray-200); }
  .admin-body .table tbody tr:hover { background: #15213a; }
  .admin-body .table tbody td { border-bottom-color: #1e2a44; color: var(--rm-gray-700); }
  .admin-body .app-header { background: rgba(17,26,46,.85); border-bottom-color: var(--rm-gray-200); }
  .admin-body .app-header-search .search-input { background: #0b1220; border-color: var(--rm-gray-200); color: var(--rm-gray-700); }
  .admin-body .app-header-search .search-input:focus { background: #111a2e; }
  .admin-body .user-chip { background: #15213a; }
  .admin-body .tl-body { background: #15213a; border-color: var(--rm-gray-200); color: var(--rm-gray-600); }
  .admin-body .tl-item:not(:last-child)::before { background: var(--rm-gray-200); }
  .admin-body .form-control { background: #0b1220; border-color: var(--rm-gray-200); color: var(--rm-gray-700); }
  .admin-body .form-control:focus { background: #111a2e; border-color: var(--rm-primary); }
  .admin-body .rm-btn-ghost { color: #93c5fd; }
  .admin-body .rm-btn-outline-primary,
  .admin-body .rm-btn-outline-success,
  .admin-body .rm-btn-outline-danger { background: #111a2e; }
  .admin-body .card-header {
    background-color: #15213a !important;
    border-bottom-color: var(--rm-gray-200) !important;
    color: var(--rm-gray-700) !important;
  }
  .admin-body .card-title-sm {
    color: var(--rm-gray-800) !important;
    font-weight: 700 !important;
  }
  .admin-body .card-header .muted-sm {
    color: var(--rm-gray-500) !important;
    opacity: 1 !important;
  }
  .admin-body .settings-accordion .card-header {
    cursor: pointer;
  }
}

/* ==========================================================================
   APPEND BATCH T5+T6 — Clases nuevas layout profesional (última actualización)
   ========================================================================== */

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.img-thumb-rounded {
  width: 54px !important;
  height: 40px !important;
  object-fit: cover !important;
  border-radius: 6px !important;
  border: 1px solid var(--rm-gray-200);
  background: var(--rm-bg-soft, #f8fafc);
  display: block;
}

.col-img-thumb {
  width: 96px !important;
  min-width: 96px;
  max-width: 96px;
  text-align: center;
}
.col-img-thumb img {
  margin: 0 auto;
}

.col-actions {
  width: 144px;
  min-width: 144px;
  max-width: 144px;
  text-align: right;
  white-space: nowrap;
}

/* ——— App Breadcrumbs (estructura ol / li con separador / ) ——— */
.app-breadcrumbs {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
}
.app-breadcrumbs nav { min-width: 0; }
.app-breadcrumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: var(--rm-gray-500);
}
.app-breadcrumbs li {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.app-breadcrumbs li + li::before {
  content: "/";
  margin: 0 0.5rem;
  color: var(--rm-gray-400);
  opacity: 0.75;
}
.app-breadcrumbs a {
  color: var(--rm-gray-600);
  text-decoration: none;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 6px;
  transition: background .15s ease, color .15s ease;
}
.app-breadcrumbs a:hover {
  color: var(--rm-primary);
  background: var(--rm-primary-l, rgba(0,82,165,.08));
}
.app-breadcrumbs .rm-active {
  color: var(--rm-gray-800);
  font-weight: 600;
  padding: 2px 6px;
  max-width: 36ch;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ——— App Search (searchbox pill 40px) ——— */
.app-search {
  flex: 0 1 auto;
  max-width: 520px;
  width: 100%;
  min-width: 220px;
  display: flex;
  align-items: center;
}
.searchbox {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--rm-gray-200);
  border-radius: 9999px;
  background: var(--rm-white, #ffffff);
  transition: box-shadow .2s ease, border-color .2s ease, background .2s ease;
  overflow: hidden;
}
.searchbox:focus-within {
  border-color: var(--rm-primary);
  box-shadow: 0 0 0 3px rgba(0, 82, 165, .15);
  outline: none;
}
.searchbox-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 40px;
  padding: 0 1rem 0 2.75rem;
  border: 0;
  border-radius: 9999px;
  background: transparent;
  color: var(--rm-gray-800);
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-family: inherit;
  outline: none;
}
.searchbox-input::placeholder {
  color: var(--rm-gray-500);
}
.searchbox::before {
  content: "";
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='8'/><path d='m21 21-4.3-4.3'/></svg>");
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
}
.searchbox-btn {
  height: 32px;
  min-height: 32px;
  margin-right: 4px;
  padding: 0 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1;
  border-radius: 9999px;
  border: 0;
  background: var(--rm-primary);
  color: #fff;
  cursor: pointer;
  transition: background .2s ease, transform .05s ease;
  font-family: inherit;
}
.searchbox-btn:hover { background: #004285; }
.searchbox-btn:active { transform: translateY(1px); }
.searchbox-btn:focus-visible {
  outline: 3px solid var(--rm-primary-l, rgba(0,82,165,.3));
  outline-offset: 2px;
}

/* ——— User Chip + Dropdown (estructura nueva) ——— */
.user-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 40px;
  min-height: 40px;
  padding: 0 0.375rem 0 0.125rem;
  border-radius: 9999px;
  background: var(--rm-white, #ffffff);
  border: 1px solid var(--rm-gray-200);
  cursor: pointer;
  user-select: none;
  transition: box-shadow .15s ease, border-color .15s ease;
  z-index: 2;
}
.user-chip:hover { border-color: var(--rm-gray-300); }
.user-chip:focus-within {
  border-color: var(--rm-primary);
  box-shadow: 0 0 0 3px rgba(0, 82, 165, .15);
}
.user-chip-toggle {
  all: unset;
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  cursor: pointer;
  border-radius: inherit;
  padding: 0 0.25rem 0 0;
}
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  background: linear-gradient(135deg, var(--rm-primary) 0%, var(--rm-secondary) 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  flex: 0 0 36px;
  overflow: hidden;
  border: 2px solid var(--rm-white, #ffffff);
  box-shadow: 0 0 0 1px var(--rm-gray-200);
}
.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.user-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
  line-height: 1.1;
}
.user-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--rm-gray-800);
  max-width: 20ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-role {
  font-size: 0.75rem;
  color: var(--rm-gray-500);
  font-weight: 500;
  max-width: 20ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-chip-caret {
  width: 20px;
  height: 20px;
  color: var(--rm-gray-500);
  margin-left: 0.125rem;
  transition: transform .2s ease;
  flex: 0 0 20px;
}
.user-chip[aria-expanded="true"] .user-chip-caret { transform: rotate(180deg); }

.user-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  padding: 0.5rem;
  margin: 0;
  list-style: none;
  background: var(--rm-white, #ffffff);
  border: 1px solid var(--rm-gray-200);
  border-radius: 12px;
  box-shadow: var(--rm-shadow-lg);
  flex-direction: column;
  gap: 0.125rem;
  z-index: 1320;
}
.user-menu.is-open {
  display: flex;
  animation: userMenuIn .15s ease-out;
}
.user-menu[hidden],
.user-menu.hidden { display: none !important; }
@keyframes userMenuIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.user-menu a {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  color: var(--rm-gray-700);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background .15s ease, color .15s ease;
}
.user-menu a:hover {
  background: var(--rm-gray-50);
  color: var(--rm-gray-900);
}
.user-menu a:focus-visible {
  outline: 3px solid var(--rm-primary-l, rgba(0,82,165,.3));
  outline-offset: 1px;
}
.user-menu a.user-menu-danger {
  color: #be123c;
}
.user-menu a.user-menu-danger:hover {
  background: rgba(190, 18, 60, .08);
  color: #9f1233;
}
.user-menu-sep {
  height: 1px;
  background: var(--rm-gray-200);
  margin: 0.375rem 0.25rem;
}

/* ——— Timeline: selector corregido data-kind PADRE tl-item ——— */
.tl-item[data-kind="login"]    .tl-icon { background: var(--rm-info,    #0ea5e9); color: #fff; }
.tl-item[data-kind="create"]   .tl-icon { background: var(--rm-success, #22c55e); color: #fff; }
.tl-item[data-kind="update"]   .tl-icon { background: var(--rm-warning, #f59e0b); color: #1f2937; }
.tl-item[data-kind="delete"]   .tl-icon { background: var(--rm-danger,  #ef4444); color: #fff; }
.tl-item[data-kind="publish"]  .tl-icon { background: var(--rm-primary, #0052A5); color: #fff; }
.tl-item[data-kind="logout"]   .tl-icon { background: var(--rm-gray-500, #64748b); color: #fff; }
.tl-item[data-kind="warning"]  .tl-icon { background: #f97316; color: #fff; }
.tl-item[data-kind="info"]     .tl-icon { background: var(--rm-secondary, #00A651); color: #fff; }
.tl-item[data-kind="default"]  .tl-icon { background: var(--rm-gray-400, #94a3b8); color: #fff; }

/* ——— Utilities helpers display / margin / spacing ——— */
.ms-auto { margin-left: auto !important; }
.me-auto { margin-right: auto !important; }

.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }
.d-inline-block { display: inline-block !important; }
.flex-column { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.align-items-center { align-items: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-end { justify-content: flex-end !important; }
.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 0.75rem !important; }
.gap-4 { gap: 1rem !important; }
.fw-bold { font-weight: 700 !important; }
.fw-semibold { font-weight: 600 !important; }
.text-muted { color: var(--rm-gray-500) !important; }

/* ——— Responsive display helpers (md ≥768 / lg ≥992) ——— */
@media (min-width: 768px) {
  .d-md-none { display: none !important; }
  .d-md-block { display: block !important; }
  .d-md-flex { display: flex !important; }
  .d-md-inline-flex { display: inline-flex !important; }
}
@media (min-width: 992px) {
  .d-lg-none { display: none !important; }
  .d-lg-block { display: block !important; }
  .d-lg-flex { display: flex !important; }
  .sidebar-toggle { display: none !important; }
}

/* ==========================================================================
   T7 · Admin Login — Split layout profesional (ipsos-style) desacoplado
   ========================================================================== */

body.login-body {
  --l-bg-navy: var(--rm-primary, #0052A5);
  --l-bg-teal: var(--rm-secondary, #00A651);
  --l-primary: var(--rm-primary, #0052A5);
  --l-radius: 18px;
  --l-radius-sm: 10px;
  --l-shadow: 0 24px 60px rgba(2, 6, 23, 0.18);
  --l-shadow-sm: 0 6px 16px rgba(2, 6, 23, 0.08);
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  color: #0f172a;
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ——— Split layout wrapper ——— */
.l-wrap {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
  min-height: 100vh;
  width: 100%;
}
@media (min-width: 992px) {
  .l-wrap { grid-template-columns: 1.05fr 1fr; grid-template-rows: 1fr; }
}

/* ——— Hero izquierdo ——— */
.l-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  padding: 36px 28px 32px;
  display: flex;
  align-items: stretch;
  background:
    radial-gradient(1200px 600px at 120% -10%, rgba(0, 166, 81, 0.35), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(0, 50, 120, 0.6), transparent 60%),
    linear-gradient(150deg, var(--l-bg-navy) 0%, #003569 55%, #00683a 100%);
}
.l-hero-bg, .l-hero-bg-pattern { display: none; }
.l-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 28px;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}
.l-hero-logo-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  text-decoration: none;
  font-weight: 800;
  font-size: 18px;
  width: fit-content;
  border-radius: 12px;
  padding: 8px;
  transition: transform .2s ease;
}
.l-hero-logo-link:focus-visible {
  outline: 3px solid #93C5FD;
  outline-offset: 3px;
  border-radius: 12px;
}
.l-hero-logo-link:hover { transform: translateY(-1px); }
.l-hero-logo {
  height: 52px;
  width: auto;
  max-width: 260px;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.25));
}

.l-hero-copy { display: flex; flex-direction: column; gap: 16px; }
.l-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  width: fit-content;
}
.dot-pulse {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
  animation: dot-pulse 2s infinite;
}
@keyframes dot-pulse {
  0%   { box-shadow: 0 0 0 0   rgba(34, 197, 94, 0.55); }
  70%  { box-shadow: 0 0 0 14px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0   rgba(34, 197, 94, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .dot-pulse { animation: none; }
}

.l-hero-h1 {
  font-size: clamp(26px, 3.6vw, 38px);
  line-height: 1.15;
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #ffffff !important;
}
.l-hero-h1 strong { color: #86efac; font-weight: 900; }
.l-hero-p {
  font-size: clamp(14.5px, 1.5vw, 16px);
  line-height: 1.65;
  margin: 0;
  color: #ffffff !important;
  max-width: 46ch;
}

.l-hero-bullets {
  list-style: none;
  padding: 0;
  margin: 6px 0 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.l-hero-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 14px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.l-hero-bullets li > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.l-hero-bullets li > div > strong {
  font-size: 14.5px;
  font-weight: 700;
  color: #ffffff !important;
}
.l-hero-bullets li > div > span {
  font-size: 13.5px;
  color: #ffffff !important;
}
.bh-ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  flex: 0 0 40px;
  border-radius: 12px;
  background: rgba(255,255,255,0.14);
  font-size: 18px;
}

.l-hero-foot {
  margin-top: auto;
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12.5px;
  color: rgba(255,255,255,0.75);
  border-top: 1px dashed rgba(255,255,255,0.18);
}
@media (min-height: 760px) {
  .l-hero { padding: 48px 44px 40px; }
}

/* ——— Card login derecho ——— */
.l-card-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 22px 28px;
}
@media (min-width: 520px) {
  .l-card-wrap { padding: 40px 28px; }
}
.l-card {
  width: 100%;
  max-width: 480px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: var(--l-radius);
  box-shadow: var(--l-shadow);
  padding: 30px 26px 24px;
}
@media (min-width: 520px) {
  .l-card { padding: 36px 32px 28px; }
}

.l-card-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.l-card-title {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #0f172a;
}
.l-card-sub { margin: 0; color: #475569; font-size: 14.5px; }

/* ——— Form ——— */
.l-form { display: flex; flex-direction: column; gap: 18px; }
.lf-group { display: flex; flex-direction: column; gap: 7px; }
.lf-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: #0f172a;
}
.lf-label-ic { opacity: .85; }
.lf-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.lf-forgot {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--l-primary);
  text-decoration: none;
}
.lf-forgot:hover { text-decoration: underline; }
.lf-forgot:focus-visible {
  outline: 3px solid #93C5FD;
  outline-offset: 2px;
  border-radius: 6px;
}

.lf-input {
  position: relative;
  display: flex;
  align-items: center;
}
.lf-input > input[type="email"],
.lf-input > input[type="password"],
.lf-input > input[type="text"] {
  width: 100%;
  padding: 12.5px 14px;
  min-height: 48px;
  font: inherit;
  font-size: 15px;
  color: #0f172a;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--l-radius-sm);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.lf-input > input::placeholder { color: #94a3b8; }
.lf-input > input:focus-visible {
  outline: none;
  border-color: var(--l-primary);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}
.lf-input-pass > input { padding-right: 48px; }
.lf-eye {
  position: absolute;
  right: 6px; top: 50%;
  transform: translateY(-50%);
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
  color: #475569;
}
.lf-eye:hover { background: #e2e8f0; }
.lf-eye:focus-visible { outline: 3px solid #93C5FD; outline-offset: 2px; }

.lf-row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.lf-remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: #334155;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}
.lf-remember > input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: var(--l-primary);
}
.lf-remember:focus-within {
  outline: 2px dashed #93C5FD;
  outline-offset: 3px;
  border-radius: 6px;
}

.lf-submit {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 12.5px 18px;
  font: inherit;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #ffffff;
  background: linear-gradient(135deg, var(--l-primary) 0%, var(--l-bg-teal) 100%);
  border: none;
  border-radius: var(--l-radius-sm);
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 82, 165, 0.22);
  transition: transform .12s ease, box-shadow .2s ease, filter .2s ease;
}
.lf-submit:hover:not(:disabled) {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(0, 82, 165, 0.28);
}
.lf-submit:active:not(:disabled) { transform: translateY(0); }
.lf-submit:focus-visible { outline: 3px solid #93C5FD; outline-offset: 3px; }
.lf-submit:disabled {
  cursor: not-allowed;
  opacity: .85;
  filter: grayscale(0.1);
}
.s-ic { font-size: 16px; }
.s-spinner {
  display: none;
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #ffffff;
  border-radius: 999px;
  animation: lf-spin .8s linear infinite;
}
.lf-submit.is-loading .s-spinner { display: inline-block; }
@keyframes lf-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .s-spinner { animation-duration: 1.8s; }
}

.lf-bottom-links {
  margin-top: 6px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: #475569;
}
.lf-bottom-links a {
  color: var(--l-primary);
  font-weight: 600;
  text-decoration: none;
}
.lf-bottom-links a:hover { text-decoration: underline; }
.lf-bottom-links a:focus-visible {
  outline: 3px solid #93C5FD;
  outline-offset: 2px;
  border-radius: 6px;
}
.lf-bottom-links .sep { color: #cbd5e1; }

.l-card-foot {
  margin-top: 16px;
  width: 100%;
  max-width: 480px;
  text-align: center;
  font-size: 12px;
  color: #64748b;
}
.muted-sm { color: #64748b !important; }

/* ——— Alertas (rm-alert + legacy alert compat) ——— */
.rm-alert {
  padding: 12px 14px;
  border-radius: var(--l-radius-sm);
  font-size: 13.5px;
  border: 1px solid transparent;
  margin-bottom: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.rm-alert-icon {
  width: 20px; height: 20px;
  flex: 0 0 20px;
  margin-top: 1px;
}
.rm-alert-content { flex: 1 1 auto; }
.rm-alert-title { font-weight: 700; margin-bottom: 2px; }
.rm-alert-error,
.alert-error {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fecaca;
}
.rm-alert-success,
.alert-success {
  background: #dcfce7;
  color: #166534;
  border-color: #bbf7d0;
}
.rm-alert-info,
.alert-info {
  background: #dbeafe;
  color: #1e40af;
  border-color: #bfdbfe;
}
.rm-alert-warning {
  background: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
}

/* ——— Overrides de contraste ——— */
.login-body section.l-hero div.l-hero-copy h1.l-hero-h1,
.login-body section.l-hero div.l-hero-copy p.l-hero-p,
.login-body section.l-hero ul.l-hero-bullets li > div > strong,
.login-body section.l-hero ul.l-hero-bullets li > div > span {
  color: #ffffff !important;
}

@media (prefers-color-scheme: dark) {
  body.login-body {
    background: linear-gradient(135deg, #0b1220 0%, #0f172a 100%);
    color: #e2e8f0;
  }
  body.login-body .l-card {
    background: #111a2e;
    border-color: #1e2a44;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  }
  body.login-body .l-card-title { color: #f1f5f9; }
  body.login-body .l-card-sub { color: #cbd5e1; }
  body.login-body .lf-label { color: #e2e8f0; }
  body.login-body .lf-input > input {
    background: #0b1220;
    border-color: #334166;
    color: #e2e8f0;
  }
  body.login-body .lf-input > input::placeholder { color: #64748b; }
  body.login-body .lf-input > input:focus-visible {
    background: #111a2e;
    border-color: #2563eb;
  }
  body.login-body .lf-remember { color: #cbd5e1; }
  body.login-body .lf-eye { color: #cbd5e1; }
  body.login-body .lf-eye:hover { background: #1e2a44; }
  body.login-body .lf-bottom-links { color: #cbd5e1; border-top-color: #1e2a44; }
  body.login-body .l-card-foot { color: #94a3b8; }
  body.login-body .lf-forgot,
  body.login-body .lf-bottom-links a { color: #93c5fd; }
}

/* ========================================================================
   RENOVACION UI 2026-09-25 · Task 2 + Task 3
   Page-head + Cards + Filters + Form controls + Tables + Badges
   Coherencia profesional light/dark, tokens, radius, spacing, focus ring
   ======================================================================== */

/* ---------- PAGE HEAD (Task 2) ---------- */
.page-head {
  display: block;
  width: 100%;
  margin-bottom: var(--rm-space-4);
}
.page-head-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--rm-space-4);
  padding: var(--rm-space-5) var(--rm-space-5) 0;
  margin: 0 calc(var(--rm-space-5) * -1) var(--rm-space-4);
  border-bottom: 1px solid var(--rm-gray-200, #e2e8f0);
  padding-bottom: var(--rm-space-4);
  flex-wrap: wrap;
}
.page-head-inner .h-title {
  font-size: 1.625rem;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--rm-gray-900, #0f172a);
}
.page-head-inner .muted {
  color: var(--rm-gray-500, #64748b);
  font-size: 0.9375rem;
  margin-top: var(--rm-space-1);
}
.page-head-inner > :last-child { flex-shrink: 0; }

/* ---------- CARDS + FILTERS CARD (Task 2) ---------- */
.card {
  --card-bg: #ffffff;
  --card-border: #e2e8f0;
  --card-radius: 12px;
  --card-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.04), 0 1px 3px 0 rgba(15, 23, 42, 0.06);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  margin-bottom: var(--rm-space-4);
  transition: box-shadow 220ms ease, border-color 220ms ease, transform 220ms ease;
  will-change: box-shadow, transform;
}
.card:hover {
  box-shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.08), 0 8px 24px -8px rgba(15, 23, 42, 0.12);
  border-color: #cbd5e1;
}
.card-sm, .filters-card {
  --card-bg: #ffffff;
  --card-border: #e2e8f0;
  --card-radius: 12px;
  --card-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  margin-bottom: var(--rm-space-4);
}
.card-body {
  padding: var(--rm-space-5);
  color: var(--rm-gray-800, #1e293b);
}
.card-body.p-0 { padding: 0; }
.card-footer {
  padding: var(--rm-space-3) var(--rm-space-5);
  border-top: 1px solid var(--rm-gray-200, #e2e8f0);
  background: var(--rm-gray-50, #f8fafc);
}
.filters-card .card-body {
  padding: var(--rm-space-3);
}
.filters-card .input-group,
.filters-card .form-control-sm,
.filters-card .form-select-sm {
  height: 38px;
  font-size: 0.875rem;
}

/* ---------- FORM CONTROLS (Task 3) ---------- */
.form-control,
.form-control-sm,
.form-select,
.form-select-sm {
  --fc-bg: #ffffff;
  --fc-border: #cbd5e1;
  --fc-text: #0f172a;
  --fc-placeholder: #94a3b8;
  --fc-focus-ring: rgba(0, 82, 165, 0.42);
  --fc-radius: 8px;
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  font-family: inherit;
  color: var(--fc-text);
  background-color: var(--fc-bg);
  background-clip: padding-box;
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius);
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease, color 180ms ease;
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
}
.form-control-sm,
.form-select-sm {
  height: 36px;
  padding: 0.4rem 0.7rem;
  font-size: 0.875rem;
  line-height: 1.4;
}
.form-control::placeholder,
.form-control-sm::placeholder {
  color: var(--fc-placeholder);
  opacity: 1;
}
.form-control:focus,
.form-control-sm:focus,
.form-select:focus,
.form-select-sm:focus {
  border-color: #0052A5;
  outline: 0;
  box-shadow: 0 0 0 3px var(--fc-focus-ring);
  background-color: #ffffff;
}
.form-select,
.form-select-sm {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 20 20' fill='none'><path d='M5.5 7.5l4.5 4.5 4.5-4.5' stroke='%230052A5' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 14px 14px;
  padding-right: 2.25rem;
  cursor: pointer;
}
textarea.form-control,
textarea.form-control-sm {
  min-height: 96px;
  resize: vertical;
}
.input-group {
  display: flex;
  align-items: stretch;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  gap: 0;
}
.input-group > .form-control,
.input-group > .form-control-sm {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right-width: 0;
  flex: 1 1 auto;
}
.input-group > .btn,
.input-group > .btn-sm {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}
.btn,
.btn-sm {
  --btn-radius: 8px;
  --btn-py: 0.55rem;
  --btn-px: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: var(--btn-py) var(--btn-px);
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.4;
  color: #ffffff;
  background: #0052A5;
  border: 1px solid #0052A5;
  border-radius: var(--btn-radius);
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  vertical-align: middle;
  user-select: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease, border-color 180ms ease, color 180ms ease, opacity 180ms ease;
  height: 40px;
  box-sizing: border-box;
  white-space: nowrap;
}
.btn-sm {
  --btn-py: 0.35rem;
  --btn-px: 0.75rem;
  height: 36px;
  font-size: 0.8125rem;
}
.btn:hover,
.btn-sm:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px -4px rgba(0, 82, 165, 0.45);
  background: #004485;
  border-color: #004485;
}
.btn:active,
.btn-sm:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 1px 2px 0 rgba(0, 82, 165, 0.25);
}
.btn:focus-visible,
.btn-sm:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(0, 166, 81, 0.45);
}
.btn-primary {
  background: linear-gradient(180deg, #005eaa 0%, #0052A5 100%);
  border-color: #0052A5;
  color: #fff;
}
.btn-primary:hover {
  background: linear-gradient(180deg, #006cc7 0%, #004485 100%);
  border-color: #004485;
}
.btn-outline-secondary {
  background: #ffffff;
  color: #475569;
  border-color: #cbd5e1;
}
.btn-outline-secondary:hover {
  background: #f8fafc;
  color: #0f172a;
  border-color: #94a3b8;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px -4px rgba(148, 163, 184, 0.35);
}
.btn-group {
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  overflow: hidden;
  gap: 0;
}
.btn-group > .btn,
.btn-group > .btn-sm {
  border-radius: 0;
  border-right-width: 0;
}
.btn-group > .btn:first-child,
.btn-group > .btn-sm:first-child {
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}
.btn-group > .btn:last-child,
.btn-group > .btn-sm:last-child {
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
  border-right-width: 1px;
}

/* ---------- TABLES ADMIN (Task 3) ---------- */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f1f5f9;
}
.table-wrap::-webkit-scrollbar { height: 8px; width: 8px; }
.table-wrap::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.table-wrap::-webkit-scrollbar-track { background: #f1f5f9; }
.admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.875rem;
  color: var(--rm-gray-800, #1e293b);
  line-height: 1.45;
}
.admin-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 0.75rem 0.85rem;
  background: var(--rm-gray-50, #f8fafc);
  color: var(--rm-gray-500, #64748b);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: left;
  border-bottom: 1px solid var(--rm-gray-200, #e2e8f0);
  white-space: nowrap;
}
.admin-table thead th:first-child { border-top-left-radius: 0; }
.admin-table thead th:last-child { border-top-right-radius: 0; }
.admin-table tbody td {
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--rm-gray-100, #f1f5f9);
  vertical-align: middle;
  transition: background-color 160ms ease;
}
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:hover td {
  background: rgba(0, 82, 165, 0.04);
}
.admin-table .col-img-thumb { width: 96px; }
.admin-table .col-actions { width: 168px; }
.list-empty {
  color: var(--rm-gray-500, #64748b);
}
.list-empty h3 {
  color: var(--rm-gray-800, #1e293b);
  margin: 0.5rem 0;
  font-size: 1.125rem;
  font-weight: 700;
}

/* ---------- BADGES (Task 3) ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.22rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
  border-radius: 999px;
  color: #0f172a;
  background: #e2e8f0;
  white-space: nowrap;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}
.badge-sm { padding: 0.18rem 0.5rem; font-size: 0.6875rem; }
.badge-success {
  background: #dcfce7;
  color: #166534;
}
.badge-danger {
  background: #fee2e2;
  color: #7f1d1d;
}
.badge-warning {
  background: #fef3c7;
  color: #854d0e;
}
.badge-info {
  background: #dbeafe;
  color: #1e40af;
}
.badge-accent {
  background: linear-gradient(135deg, #16a34a 0%, #00A651 100%);
  color: #ffffff;
  box-shadow: 0 1px 4px 0 rgba(0, 166, 81, 0.25);
}
.badge-primary {
  background: #dbeafe;
  color: #0052A5;
}
.badge-secondary {
  background: #e2e8f0;
  color: #475569;
}

/* ---------- PAGINATION (Task 3 visual) ---------- */
.pagination {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
}
.pagination .page-item .page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 0.65rem;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #475569;
  background: #ffffff;
  text-decoration: none;
  transition: all 180ms ease;
}
.pagination .page-item .page-link:hover {
  background: #f8fafc;
  color: #0052A5;
  border-color: #94a3b8;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px -3px rgba(148, 163, 184, 0.4);
}
.pagination .page-item.active .page-link {
  background: linear-gradient(180deg, #005eaa 0%, #0052A5 100%);
  color: #ffffff;
  border-color: #0052A5;
  box-shadow: 0 3px 10px -3px rgba(0, 82, 165, 0.45);
}
.pagination .page-item.disabled .page-link {
  opacity: 0.45;
  pointer-events: none;
  cursor: not-allowed;
}

/* ---------- DARK MODE OVERRIDES (prefers-color-scheme: dark) ---------- */
@media (prefers-color-scheme: dark) {
  /* page head — FIX: quitar fondo blanco + bordes oscuros completos */
  .page-head-inner {
    background-color: #0e1728 !important;
    border-color: #1e293b !important;
    border-bottom-color: #1e293b;
  }
  .page-head-inner .h-title {
    color: #f1f5f9;
  }
  .page-head-inner .muted {
    color: #94a3b8;
  }

  /* cards */
  .card,
  .card-sm,
  .filters-card {
    --card-bg: #111a2e;
    --card-border: #1e293b;
    --card-shadow: 0 1px 3px 0 rgba(2, 6, 23, 0.55), 0 1px 2px 0 rgba(2, 6, 23, 0.35);
  }
  .card:hover {
    border-color: #334155;
    box-shadow: 0 6px 18px -6px rgba(2, 6, 23, 0.85);
  }
  .card-body {
    color: #e2e8f0;
  }
  .card-footer {
    border-top-color: #1e293b;
    background: #0e1728;
  }

  /* form controls */
  .form-control,
  .form-control-sm,
  .form-select,
  .form-select-sm {
    --fc-bg: #0f172a;
    --fc-border: #1e293b;
    --fc-text: #e2e8f0;
    --fc-placeholder: #64748b;
    --fc-focus-ring: rgba(0, 82, 165, 0.55);
  }
  .form-control:focus,
  .form-control-sm:focus,
  .form-select:focus,
  .form-select-sm:focus {
    background: #111a2e;
    border-color: #2563eb;
  }
  .form-select,
  .form-select-sm {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 20 20' fill='none'><path d='M5.5 7.5l4.5 4.5 4.5-4.5' stroke='%2360a5fa' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  }

  /* buttons */
  .btn-outline-secondary {
    background: #111a2e;
    color: #cbd5e1;
    border-color: #334155;
  }
  .btn-outline-secondary:hover {
    background: #1e293b;
    color: #f8fafc;
    border-color: #475569;
    box-shadow: 0 4px 10px -4px rgba(2, 6, 23, 0.85);
  }

  /* tables */
  .table-wrap::-webkit-scrollbar-thumb { background: #334155; }
  .table-wrap::-webkit-scrollbar-track { background: #0e1728; }
  .admin-table {
    color: #e2e8f0;
  }
  .admin-table thead th {
    background: #0b1220;
    color: #94a3b8;
    border-bottom-color: #1e293b;
  }
  .admin-table tbody td {
    border-bottom-color: #1e293b;
  }
  .admin-table tbody tr:hover td {
    background: rgba(0, 82, 165, 0.10);
  }
  .col-img-thumb img {
    border-color: #1e293b !important;
  }
  .list-empty {
    color: #94a3b8;
  }
  .list-empty h3 {
    color: #f1f5f9;
  }

  /* badges */
  .badge-secondary {
    background: #1e293b;
    color: #cbd5e1;
  }
  .badge-success {
    background: rgba(22, 101, 52, 0.55);
    color: #bbf7d0;
  }
  .badge-danger {
    background: rgba(127, 29, 29, 0.55);
    color: #fecaca;
  }
  .badge-warning {
    background: rgba(133, 77, 14, 0.55);
    color: #fde68a;
  }
  .badge-info {
    background: rgba(30, 64, 175, 0.55);
    color: #bfdbfe;
  }
  .badge-primary {
    background: rgba(0, 82, 165, 0.55);
    color: #bfdbfe;
  }
  .badge-accent {
    background: linear-gradient(135deg, #15803d 0%, #00A651 100%);
    color: #ecfdf5;
  }

  /* pagination dark */
  .pagination .page-item .page-link {
    background: #111a2e;
    border-color: #334155;
    color: #cbd5e1;
  }
  .pagination .page-item .page-link:hover {
    background: #1e293b;
    border-color: #475569;
    color: #93c5fd;
  }
  .pagination .page-item.active .page-link {
    background: linear-gradient(180deg, #2563eb 0%, #0052A5 100%);
    border-color: #2563eb;
    color: #ffffff;
  }
}

/* ==========================================================================
   RENOVACION UI 2026-09-25 · Task5 · Animaciones Admin fluidas optimizadas
   GPU-only transform / opacity · Accesibilidad reduce-motion
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {
  .admin-sidebar {
    transition: transform 250ms cubic-bezier(.2,.7,.2,1);
    will-change: transform;
  }
  .admin-sidebar.is-closed {
    transform: translateX(-260px);
  }

  .admin-nav-item {
    transition: transform 150ms ease-out,
                background-color 150ms ease-out,
                color 150ms ease-out,
                border-left-color 150ms ease-out;
  }
  .admin-nav-item:hover {
    transform: translateX(4px);
  }
  .admin-nav-item:focus-visible {
    outline: 3px solid rgba(0, 166, 81, 0.45);
    outline-offset: 2px;
    border-radius: 8px;
  }

  .admin-nav-submenu {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 300ms ease-out,
                opacity 200ms ease-out;
  }
  .admin-nav-group.is-open > .admin-nav-submenu {
    max-height: 500px;
    opacity: 1;
  }
  .admin-nav-subitem {
    transition: background-color 140ms ease-out,
                color 140ms ease-out,
                padding-left 140ms ease-out;
  }
  .admin-nav-subitem:hover {
    padding-left: 1.75rem;
  }

  .btn, .btn-sm {
    transition: transform 180ms cubic-bezier(.2,.7,.2,1),
                box-shadow 180ms ease-out,
                background-color 180ms ease-out,
                border-color 180ms ease-out,
                opacity 180ms ease-out;
    will-change: transform;
  }
  .btn:hover {
    transform: translateY(-1px);
  }
  .btn:active { transform: scale(0.98); }

  .card, .card-sm {
    transition: transform 220ms cubic-bezier(.2,.7,.2,1),
                box-shadow 220ms ease-out,
                border-color 220ms ease-out;
    will-change: transform;
  }
  .card:hover {
    box-shadow: 0 12px 28px -16px rgba(2, 6, 23, 0.6);
  }

  .stat-card {
    transition: transform 220ms cubic-bezier(.2,.7,.2,1),
                box-shadow 220ms ease-out;
    will-change: transform;
  }
  .stat-card:hover {
    transform: translateY(-3px);
  }

  .form-control, .form-select, .form-control-sm, .form-select-sm {
    transition: border-color 150ms ease-out,
                box-shadow 150ms ease-out,
                background-color 150ms ease-out;
  }

  .admin-table tbody tr {
    transition: background-color 120ms ease-out;
  }

  .badge-success.rm-badge-pulse {
    animation: rm-success-pulse 2400ms infinite ease-in-out;
    will-change: opacity, transform;
  }
  @keyframes rm-success-pulse {
    0%, 100% { opacity: 1.0;  transform: scale(1); }
    50%      { opacity: 0.78; transform: scale(1.02); }
  }

  .admin-drawer-backdrop {
    transition: opacity 200ms ease-out;
  }
  .admin-toast-enter {
    animation: rm-toast-in 260ms cubic-bezier(.2,.7,.2,1) forwards;
    will-change: opacity, transform;
  }
  @keyframes rm-toast-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .admin-nav-submenu { max-height: none !important; opacity: 1 !important; }
}

/* ==========================================================================
   ADMIN DARK SAAS REDESIGN 2026-09-25
   Tokens independientes --rm-admin-* (R4 flyer intacto: --rm-primary/secondary NO TOCADOS)
   Estilo: Vercel / TailwindAdmin / Shadcn UI — Flat Dark Elevation
   ========================================================================== */

/* ---------- T1.1 · 11 Design Tokens Dark SaaS Independientes ---------- */
:root {
  --rm-admin-bg:         #0B1220;   /* fondo global body */
  --rm-admin-surface:    #111A2E;   /* superficie cards / topbar */
  --rm-admin-elevated:   #172036;   /* elevación tarjetas KPI / hover */
  --rm-admin-border:     #1E293B;   /* bordes base sutiles */
  --rm-admin-border-2:   #334155;   /* bordes divisores secundarios */
  --rm-admin-text-1:     #F8FAFC;   /* títulos / principal */
  --rm-admin-text-2:     #CBD5E1;   /* cuerpo / lectura */
  --rm-admin-text-3:     #94A3B8;   /* metadatos / muted */
  --rm-admin-text-4:     #64748B;   /* placeholders / deshabilitado */
  --rm-admin-accent:     #3B82F6;   /* azul Vercel / CTA principal */
  --rm-admin-accent-2:   #93C5FD;   /* azul claro / links hover */
}

/* ---------- T1.2 · Body Dark EXPLÍCITO (SIN @media prefers-color-scheme) ---------- */
.admin-body {
  background: var(--rm-admin-bg) !important;
  color: var(--rm-admin-text-2);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.admin-body .page-head-inner {
  background: var(--rm-admin-surface) !important;
  border-color: var(--rm-admin-border) !important;
  border-bottom-color: var(--rm-admin-border) !important;
}
.admin-body .page-head-inner .h-title { color: var(--rm-admin-text-1); }
.admin-body .page-head-inner .muted   { color: var(--rm-admin-text-3); }
.admin-body .h1, .admin-body .h2, .admin-body .h3,
.admin-body .h4, .admin-body .h5, .admin-body .h6 {
  color: var(--rm-admin-text-1);
}
.admin-body .card,
.admin-body .card-sm,
.admin-body .filters-card {
  --card-bg: var(--rm-admin-surface);
  --card-border: var(--rm-admin-border);
  --card-shadow: 0 1px 2px 0 rgba(2,6,23,0.55), 0 1px 1px 0 rgba(2,6,23,0.35);
  background: var(--rm-admin-surface) !important;
  border: 1px solid var(--rm-admin-border) !important;
}
.admin-body .card:hover {
  border-color: var(--rm-admin-border-2) !important;
  box-shadow: 0 6px 20px -8px rgba(2,6,23,0.85);
}
.admin-body .card-body   { color: var(--rm-admin-text-2); }
.admin-body .card-footer {
  border-top-color: var(--rm-admin-border) !important;
  background: var(--rm-admin-bg) !important;
}
.admin-body .form-control,
.admin-body .form-control-sm,
.admin-body .form-select,
.admin-body .form-select-sm {
  --fc-bg: var(--rm-admin-elevated);
  --fc-border: var(--rm-admin-border);
  --fc-text: var(--rm-admin-text-2);
  --fc-placeholder: var(--rm-admin-text-4);
  --fc-focus-ring: rgba(59,130,246,0.45);
  background: var(--rm-admin-elevated) !important;
  border-color: var(--rm-admin-border) !important;
  color: var(--rm-admin-text-2) !important;
}
.admin-body .form-control::placeholder,
.admin-body .form-control-sm::placeholder {
  color: var(--rm-admin-text-4);
}
.admin-body .form-control:focus,
.admin-body .form-control-sm:focus,
.admin-body .form-select:focus,
.admin-body .form-select-sm:focus {
  background: var(--rm-admin-surface) !important;
  border-color: var(--rm-admin-accent) !important;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.18) !important;
}
.admin-body .form-select,
.admin-body .form-select-sm {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 20 20' fill='none'><path d='M5.5 7.5l4.5 4.5 4.5-4.5' stroke='%2360a5fa' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/></svg>") !important;
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 14px 14px;
}
.admin-body .btn-outline-secondary {
  background: var(--rm-admin-surface);
  color: var(--rm-admin-text-2);
  border-color: var(--rm-admin-border-2);
}
.admin-body .btn-outline-secondary:hover {
  background: var(--rm-admin-elevated);
  color: var(--rm-admin-text-1);
  border-color: var(--rm-admin-text-4);
}
.admin-body .list-empty       { color: var(--rm-admin-text-3); }
.admin-body .list-empty h3    { color: var(--rm-admin-text-1); }
.admin-body .col-img-thumb img { border-color: var(--rm-admin-border) !important; }

/* ---------- T1.3 · Sidebar Flat Dark · Fondo uniforme #0F172A · SIN gradients ---------- */
.admin-sidebar,
.app-sidebar.admin-sidebar {
  background: #0F172A !important;
  background-image: none !important;
  border-right: 1px solid var(--rm-admin-border) !important;
  color: var(--rm-admin-text-2) !important;
}
.admin-sidebar .admin-brand {
  border-bottom: 1px solid var(--rm-admin-border) !important;
  background: #0F172A !important;
}
.admin-sidebar .admin-nav-item {
  color: var(--rm-admin-text-2) !important;
  border-left: 3px solid transparent;
  border-radius: 0 8px 8px 0;
  margin-right: 0.5rem;
}
.admin-sidebar .admin-nav-item:hover {
  background: rgba(59,130,246,0.08) !important;
  color: var(--rm-admin-text-1) !important;
  border-left-color: var(--rm-admin-accent);
}
.admin-sidebar .admin-nav-item.is-active {
  background: rgba(59,130,246,0.14) !important;
  color: #FFFFFF !important;
  border-left-color: var(--rm-admin-accent) !important;
  font-weight: 600;
}
/* ---- R4 · Sidebar Grupos Colapsables V56F: toggles funcionales ---- */
.admin-sidebar .admin-nav-group > .admin-nav-item {
  cursor: pointer;
  position: relative;
}
.admin-sidebar .admin-nav-group > .admin-nav-item .an-caret {
  margin-left: auto;
  transition: transform 200ms cubic-bezier(.2,.8,.2,1);
  flex-shrink: 0;
}
.admin-sidebar .admin-nav-group.is-open > .admin-nav-item .an-caret,
.admin-sidebar .admin-nav-group[data-open="1"] > .admin-nav-item .an-caret {
  transform: rotate(180deg);
}
.admin-sidebar .admin-nav-group.is-open > .admin-nav-item {
  background: rgba(59, 130, 246, 0.10);
  color: #FFFFFF !important;
}
.admin-sidebar .admin-nav-group > .admin-nav-item .an-label {
  flex: 1 1 auto;
  pointer-events: none;
}
.admin-sidebar .admin-nav-group-title {
  color: var(--rm-admin-text-4) !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.7rem;
  font-weight: 700;
}
.admin-sidebar .admin-nav-subitem {
  color: var(--rm-admin-text-3) !important;
  border-radius: 6px;
  margin: 2px 0.5rem 2px 1.5rem;
  padding-left: 0.9rem !important;
}
.admin-sidebar .admin-nav-subitem:hover {
  background: rgba(59,130,246,0.06) !important;
  color: var(--rm-admin-text-1) !important;
  padding-left: 1.1rem !important;
}
.admin-sidebar .admin-nav-subitem.is-active {
  color: var(--rm-admin-accent-2) !important;
  background: rgba(59,130,246,0.10);
  font-weight: 600;
}
.admin-sidebar .sidebar-footer {
  border-top: 1px solid var(--rm-admin-border) !important;
  background: #0F172A !important;
  color: var(--rm-admin-text-3);
}

/* ---------- T1.4 · 6 Badges Dark Pastel · radio 9999px · Flat SIN gradients ---------- */
.admin-body .badge,
.admin-body [class*="badge-"] {
  border-radius: 9999px !important;
  font-weight: 600;
  font-size: 0.72rem;
  padding: 0.3rem 0.72rem;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
}
.admin-body .badge-sm {
  padding: 0.15rem 0.55rem;
  font-size: 0.6875rem;
}
.admin-body .badge-success {
  background: #052E1E !important;
  color: #4ADE80 !important;
  border-color: rgba(74,222,128,0.18);
}
.admin-body .badge-warning {
  background: #3B2A06 !important;
  color: #FACC15 !important;
  border-color: rgba(250,204,21,0.18);
}
.admin-body .badge-danger {
  background: #3B0F12 !important;
  color: #F87171 !important;
  border-color: rgba(248,113,113,0.18);
}
.admin-body .badge-info {
  background: #0B2855 !important;
  color: #60A5FA !important;
  border-color: rgba(96,165,250,0.18);
}
.admin-body .badge-secondary {
  background: #1E293B !important;
  color: #94A3B8 !important;
  border-color: rgba(148,163,184,0.18);
}
.admin-body .badge-accent {
  background: #11325A !important;
  background-image: none !important;
  color: #93C5FD !important;
  border-color: rgba(147,197,253,0.22);
  box-shadow: none !important;
}
.admin-body .badge-primary {
  background: #0F2744 !important;
  color: #93C5FD !important;
  border-color: rgba(147,197,253,0.18);
}

/* ---------- Pagination Dark Flat ---------- */
.admin-body .pagination .page-item .page-link {
  background: var(--rm-admin-surface) !important;
  border-color: var(--rm-admin-border) !important;
  color: var(--rm-admin-text-2) !important;
  border-radius: 8px;
  font-weight: 600;
}
.admin-body .pagination .page-item .page-link:hover {
  background: var(--rm-admin-elevated) !important;
  border-color: var(--rm-admin-border-2) !important;
  color: var(--rm-admin-accent-2) !important;
}
.admin-body .pagination .page-item.active .page-link {
  background: var(--rm-admin-accent) !important;
  background-image: none !important;
  border-color: var(--rm-admin-accent) !important;
  color: #FFFFFF !important;
  box-shadow: 0 3px 10px -3px rgba(59,130,246,0.45);
}

/* ---------- T1.5 · Grid KPIs 4 columnas (1/2/3/4 responsive) ---------- */
.admin-kpi-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(1, 1fr);
}
@media (min-width: 768px) {
  .admin-kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 992px) {
  .admin-kpi-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1200px) {
  .admin-kpi-grid { grid-template-columns: repeat(4, 1fr); }
}
.admin-kpi-card {
  position: relative;
  overflow: hidden;
  background: var(--rm-admin-surface);
  border: 1px solid var(--rm-admin-border);
  border-radius: 14px;
  padding: 1.25rem 1.35rem;
  transition: transform 220ms cubic-bezier(.2,.7,.2,1),
              border-color 220ms ease-out,
              box-shadow 220ms ease-out;
}
.admin-kpi-card:hover {
  transform: translateY(-3px);
  border-color: var(--rm-admin-border-2);
  box-shadow: 0 12px 30px -14px rgba(2,6,23,0.85);
}
.admin-kpi-card .kpi-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--rm-admin-text-3);
  letter-spacing: 0.02em;
  margin: 0 0 0.65rem 0;
  text-transform: uppercase;
}
.admin-kpi-card .kpi-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--rm-admin-text-1);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 0.55rem 0;
  font-variant-numeric: tabular-nums;
}
.admin-kpi-card .kpi-trend {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.18rem 0.55rem;
  border-radius: 9999px;
}
.admin-kpi-card .kpi-trend.up {
  background: #052E1E;
  color: #4ADE80;
}
.admin-kpi-card .kpi-trend.down {
  background: #3B0F12;
  color: #F87171;
}
.admin-kpi-card .kpi-icon-bg {
  position: absolute;
  right: -0.75rem;
  top: -0.75rem;
  opacity: 0.06;
  width: 110px;
  height: 110px;
  pointer-events: none;
}
.admin-kpi-card .kpi-icon-bg svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  stroke-width: 1.2;
}

/* ---------- T1.6 · Table Headers Fix · blanco-sobre-blanco RESUELTO ---------- */
.admin-body .admin-table,
.admin-body .table {
  color: var(--rm-admin-text-2) !important;
  border-collapse: separate;
  border-spacing: 0;
}
.admin-body .admin-table thead th,
.admin-body .table thead th {
  background: #1E293B !important;
  color: var(--rm-admin-text-3) !important;
  border-bottom-color: var(--rm-admin-border-2) !important;
  border-top: none !important;
  font-weight: 700 !important;
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.85rem 1rem;
  white-space: nowrap;
}
.admin-body .admin-table thead th:first-child {
  border-top-left-radius: 10px;
}
.admin-body .admin-table thead th:last-child {
  border-top-right-radius: 10px;
}
.admin-body .admin-table tbody td,
.admin-body .table tbody td {
  border-bottom-color: var(--rm-admin-border) !important;
  padding: 0.9rem 1rem;
  vertical-align: middle;
  font-size: 0.875rem;
}
.admin-body .admin-table tbody tr:hover td,
.admin-body .table tbody tr:hover td {
  background: rgba(59,130,246,0.06) !important;
}
.admin-body .admin-table tbody tr:last-child td:first-child {
  border-bottom-left-radius: 10px;
}
.admin-body .admin-table tbody tr:last-child td:last-child {
  border-bottom-right-radius: 10px;
}
.admin-body .table-wrap {
  background: var(--rm-admin-surface);
  border: 1px solid var(--rm-admin-border);
  border-radius: 14px;
  padding: 0.35rem;
}

/* ---------- Row actions compactas (solo iconos SVG 32px pill) ---------- */
.admin-body .row-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.admin-body .row-actions .btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  border: 1px solid var(--rm-admin-border);
  background: var(--rm-admin-elevated);
  color: var(--rm-admin-text-3);
  text-decoration: none;
  cursor: pointer;
  padding: 0;
  transition: all 140ms ease-out;
}
.admin-body .row-actions .btn-icon svg {
  width: 15px;
  height: 15px;
  stroke-width: 1.9;
}
.admin-body .row-actions .btn-icon:hover {
  background: var(--rm-admin-surface);
  color: var(--rm-admin-text-1);
  border-color: var(--rm-admin-border-2);
  transform: translateY(-1px);
}
.admin-body .row-actions .btn-icon.edit:hover    { color: var(--rm-admin-accent-2); border-color: rgba(96,165,250,0.35); }
.admin-body .row-actions .btn-icon.view:hover    { color: #4ADE80; border-color: rgba(74,222,128,0.35); }
.admin-body .row-actions .btn-icon.toggle:hover  { color: #FACC15; border-color: rgba(250,204,21,0.35); }
.admin-body .row-actions .btn-icon.delete:hover  { color: #F87171; border-color: rgba(248,113,113,0.35); }

/* ---------- Timeline Auditoría Dark ---------- */
.admin-body .audit-timeline {
  position: relative;
  padding-left: 1.5rem;
}
.admin-body .audit-timeline::before {
  content: '';
  position: absolute;
  left: 0.5rem;
  top: 0.35rem;
  bottom: 0.35rem;
  width: 2px;
  background: var(--rm-admin-border);
  border-radius: 2px;
}
.admin-body .audit-item {
  position: relative;
  padding-bottom: 1.1rem;
}
.admin-body .audit-item::before {
  content: '';
  position: absolute;
  left: -1.19rem;
  top: 0.4rem;
  width: 12px;
  height: 12px;
  border-radius: 9999px;
  background: var(--rm-admin-elevated);
  border: 2px solid var(--rm-admin-border-2);
}
.admin-body .audit-item.create::before   { border-color: #4ADE80; background: #052E1E; }
.admin-body .audit-item.update::before   { border-color: #60A5FA; background: #0B2855; }
.admin-body .audit-item.delete::before   { border-color: #F87171; background: #3B0F12; }
.admin-body .audit-item.login::before    { border-color: #FACC15; background: #3B2A06; }
.admin-body .audit-item.logout::before   { border-color: #94A3B8; background: #1E293B; }
.admin-body .audit-item.publish::before  { border-color: #4ADE80; background: #052E1E; }
.admin-body .audit-item.unpublish::before{ border-color: #FACC15; background: #3B2A06; }
.admin-body .audit-item.toggle::before   { border-color: #C084FC; background: #2A1452; }
.admin-body .audit-meta {
  font-size: 0.72rem;
  color: var(--rm-admin-text-4);
  margin-bottom: 0.15rem;
}
.admin-body .audit-text {
  font-size: 0.85rem;
  color: var(--rm-admin-text-2);
  margin: 0;
}
.admin-body .audit-text strong {
  color: var(--rm-admin-text-1);
  font-weight: 600;
}

/* ---------- T1.7 · Topbar Surface ---------- */
.admin-body .app-header.admin-topbar {
  background: var(--rm-admin-surface) !important;
  border-bottom-color: var(--rm-admin-border) !important;
  border-bottom: 1px solid var(--rm-admin-border) !important;
}
.admin-body .app-header .topbar-title,
.admin-body .app-header .topbar-breadcrumb {
  color: var(--rm-admin-text-2);
}
.admin-body .app-header .topbar-breadcrumb a {
  color: var(--rm-admin-text-3);
  text-decoration: none;
}
.admin-body .app-header .topbar-breadcrumb a:hover {
  color: var(--rm-admin-accent-2);
}
.admin-body .app-header .user-chip {
  background: var(--rm-admin-elevated) !important;
  border: 1px solid var(--rm-admin-border) !important;
  color: var(--rm-admin-text-2) !important;
  border-radius: 9999px;
}
.admin-body .app-header .user-chip:hover {
  background: var(--rm-admin-surface) !important;
  border-color: var(--rm-admin-border-2) !important;
}

/* ---------- T1.8 · Search Pill 9999px radius + submit transparent suffix ---------- */
.admin-body .app-search {
  position: relative;
}
.admin-body .app-search .searchbox,
.admin-body .app-search input[type=search] {
  border-radius: 9999px !important;
  background: var(--rm-admin-elevated) !important;
  border: 1px solid var(--rm-admin-border) !important;
  color: var(--rm-admin-text-2) !important;
  padding: 0.55rem 2.6rem 0.55rem 1rem;
  height: 40px;
  min-width: 280px;
  font-size: 0.875rem;
}
.admin-body .app-search input[type=search]::placeholder {
  color: var(--rm-admin-text-4);
}
.admin-body .app-search input[type=search]:focus {
  background: var(--rm-admin-surface) !important;
  border-color: var(--rm-admin-accent) !important;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.18) !important;
  outline: none;
}
.admin-body .app-search .searchbox-btn,
.admin-body .app-search .rm-btn-primary {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent !important;
  background-image: none !important;
  border: none !important;
  color: var(--rm-admin-text-3) !important;
  width: 32px;
  height: 32px;
  min-width: 32px;
  padding: 0;
  border-radius: 9999px;
  box-shadow: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.admin-body .app-search .searchbox-btn:hover,
.admin-body .app-search .rm-btn-primary:hover {
  background: rgba(59,130,246,0.10) !important;
  color: var(--rm-admin-accent-2) !important;
}
.admin-body .app-search .searchbox-btn svg,
.admin-body .app-search .rm-btn-primary svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

/* ---------- User Menu Dropdown Dark ---------- */
.admin-body [data-user-menu] .dropdown-menu,
.admin-body .user-dropdown-menu {
  background: var(--rm-admin-elevated) !important;
  border: 1px solid var(--rm-admin-border-2) !important;
  border-radius: 12px;
  padding: 0.4rem;
  box-shadow: 0 20px 45px -18px rgba(2,6,23,0.92), 0 2px 8px -2px rgba(2,6,23,0.5);
  min-width: 220px;
}
.admin-body [data-user-menu] .dropdown-menu a,
.admin-body .user-dropdown-menu a {
  color: var(--rm-admin-text-2) !important;
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.875rem;
  text-decoration: none;
}
.admin-body [data-user-menu] .dropdown-menu a:hover,
.admin-body .user-dropdown-menu a:hover {
  background: rgba(59,130,246,0.08);
  color: var(--rm-admin-text-1) !important;
}
.admin-body [data-user-menu] .dropdown-menu a.danger:hover,
.admin-body .user-dropdown-menu a.danger:hover {
  background: rgba(248,113,113,0.10);
  color: #F87171 !important;
}
.admin-body [data-user-menu] .dropdown-menu .dropdown-divider,
.admin-body .user-dropdown-menu .dropdown-divider {
  border-color: var(--rm-admin-border);
  margin: 0.35rem 0;
}

/* ---------- T1.9 · Scrollbar Dark Tablas + Global Admin ---------- */
.admin-body .table-wrap::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.admin-body .table-wrap::-webkit-scrollbar-track {
  background: #0F172A;
  border-radius: 4px;
}
.admin-body .table-wrap::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
  border: 1px solid transparent;
  background-clip: padding-box;
}
.admin-body .table-wrap::-webkit-scrollbar-thumb:hover {
  background: #475569;
  background-clip: padding-box;
  border: 1px solid transparent;
}
.admin-body .table-wrap {
  scrollbar-width: thin;
  scrollbar-color: #334155 #0F172A;
}
.admin-body .admin-sidebar::-webkit-scrollbar {
  width: 6px;
}
.admin-body .admin-sidebar::-webkit-scrollbar-track { background: #0F172A; }
.admin-body .admin-sidebar::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 3px;
}
.admin-body .admin-sidebar {
  scrollbar-width: thin;
  scrollbar-color: #334155 #0F172A;
}

/* ---------- T1.10 · Focus-Visible WCAG AA Global ---------- */
.admin-body a:focus-visible,
.admin-body button:focus-visible,
.admin-body input:focus-visible,
.admin-body select:focus-visible,
.admin-body textarea:focus-visible,
.admin-body [tabindex]:focus-visible,
.admin-body .btn:focus-visible,
.admin-body .btn-icon:focus-visible,
.admin-body .admin-nav-item:focus-visible,
.admin-body .admin-nav-subitem:focus-visible,
.admin-body .page-link:focus-visible {
  outline: 2px solid rgba(59,130,246,0.65) !important;
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- Skip Link Accesibilidad ---------- */
.admin-body .skip-link {
  position: absolute;
  top: -100px;
  left: 0.5rem;
  background: var(--rm-admin-accent);
  color: #FFFFFF;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  z-index: 9999;
  text-decoration: none;
  transition: top 180ms ease-out;
}
.admin-body .skip-link:focus {
  top: 0.5rem;
  outline: 3px solid #FFFFFF;
  outline-offset: 2px;
}

/* ---------- Stat Cards compatibilidad legacy ---------- */
.admin-body .stat-card {
  background: var(--rm-admin-surface) !important;
  border: 1px solid var(--rm-admin-border) !important;
  border-radius: 14px;
  color: var(--rm-admin-text-2);
}
.admin-body .stat-card .stat-label { color: var(--rm-admin-text-3); }
.admin-body .stat-card .stat-value { color: var(--rm-admin-text-1); }

/* ---------- Chart barras Flat · SIN gradients ---------- */
.admin-body .chart-bar {
  background: var(--rm-admin-accent) !important;
  background-image: none !important;
  border-radius: 6px 6px 0 0;
  transition: opacity 140ms ease-out, background-color 140ms ease-out;
}
.admin-body .chart-bar:hover {
  background: var(--rm-admin-accent-2) !important;
  opacity: 0.92;
}
.admin-body .chart-y-label,
.admin-body .chart-x-label {
  color: var(--rm-admin-text-4);
  font-size: 0.72rem;
}

/* ---------- Placeholders SVG imágenes dark 16:9 ---------- */
.admin-body .img-placeholder,
.admin-body .news-thumb-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rm-admin-text-4);
  border: 1px solid var(--rm-admin-border);
}
.admin-body .img-placeholder svg,
.admin-body .news-thumb-placeholder svg {
  width: 38%;
  height: 38%;
  opacity: 0.55;
}

/* ---------- Buttons Dark Flat (SaaS) ---------- */
.admin-body .btn,
.admin-body .btn-sm {
  border-radius: 8px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.admin-body .rm-btn-primary {
  background: var(--rm-admin-accent) !important;
  background-image: none !important;
  color: #FFFFFF !important;
  border-color: var(--rm-admin-accent) !important;
  box-shadow: 0 3px 10px -3px rgba(59,130,246,0.45);
}
.admin-body .rm-btn-primary:hover {
  background: #2563EB !important;
  border-color: #2563EB !important;
  box-shadow: 0 5px 16px -4px rgba(59,130,246,0.55);
  transform: translateY(-1px);
}
.admin-body .rm-btn-secondary {
  background: var(--rm-admin-elevated) !important;
  color: var(--rm-admin-text-2) !important;
  border-color: var(--rm-admin-border-2) !important;
}
.admin-body .rm-btn-secondary:hover {
  background: var(--rm-admin-surface) !important;
  color: var(--rm-admin-text-1) !important;
  border-color: var(--rm-admin-text-4) !important;
}
.admin-body .rm-btn-danger {
  background: #DC2626 !important;
  background-image: none !important;
  color: #FFFFFF !important;
  border-color: #DC2626 !important;
  box-shadow: 0 3px 10px -3px rgba(220,38,38,0.45);
}
.admin-body .rm-btn-danger:hover {
  background: #B91C1C !important;
  border-color: #B91C1C !important;
}

/* ---------- Drawer / Backdrop móvil Dark ---------- */
.admin-body .admin-drawer-backdrop,
.admin-body #appBackdrop {
  background: rgba(2,6,23,0.72) !important;
  backdrop-filter: blur(2px);
}
@media (max-width: 991.98px) {
  .admin-body .admin-sidebar.is-open {
    box-shadow: 12px 0 40px -10px rgba(2,6,23,0.95);
  }
}

/* ---------- Filtros Noticias compactos (AC7 single-row desktop) ---------- */
.admin-body .admin-filters-row {
  gap: 0.42rem !important;
  padding-bottom: 2px;
}
.admin-body .admin-filters-row > * {
  min-width: 0 !important;
}
.admin-body .admin-filters-row > div:first-child {
  flex: 0 0 210px !important;
  max-width: 210px;
}
.admin-body .admin-filters-row > div:not(:first-child):not(:last-child) {
  flex: 0 0 112px;
  width: 112px;
}
.admin-body .admin-filters-row > div:not(:first-child):not(:last-child) > .form-control,
.admin-body .admin-filters-row > div:not(:first-child):not(:last-child) > .form-select {
  width: 100%;
  min-width: 0;
}
.admin-body .admin-filters-row .form-label.muted-sm {
  font-size: 0.7rem;
  margin-bottom: 0.18rem !important;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-body .admin-filters-row .form-control.form-control-sm,
.admin-body .admin-filters-row .form-select.form-select-sm {
  padding: 0.35rem 0.55rem;
  font-size: 0.78rem;
  line-height: 1.2;
  min-height: 31px;
  height: 31px;
  border-radius: 6px;
}
.admin-body .admin-filters-row > div:last-child {
  margin-left: auto !important;
  padding-bottom: 0 !important;
  flex: 0 0 auto;
  gap: 0.35rem !important;
}
.admin-body .admin-filters-row > div:last-child .rm-btn-sm {
  padding: 0.32rem 0.7rem;
  font-size: 0.78rem;
  min-height: 31px;
  height: 31px;
}
@media (min-width: 1180px) {
  .admin-body .admin-filters-row {
    flex-wrap: nowrap;
    overflow-x: visible;
  }
  .admin-body .admin-filters-row > div:first-child {
    flex: 1 1 250px !important;
    max-width: 290px;
  }
  .admin-body .admin-filters-row > div:not(:first-child):not(:last-child) {
    flex: 0 0 125px;
    width: 125px;
  }
}
@media (max-width: 1179.98px) {
  .admin-body .admin-filters-row {
    flex-wrap: wrap;
  }
}

/* ---------- Selects Dark: Fix carets repetidos (no-repeat + posición) ---------- */
.admin-body .form-select,
.admin-body .form-select-sm,
.admin-body select.form-control,
.admin-body select.form-control-sm {
  background-color: var(--rm-admin-surface) !important;
  color: var(--rm-admin-text-1) !important;
  border-color: var(--rm-admin-border-2) !important;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none'><path d='m6 9 6 6 6-6' stroke='%2394A3B8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/></svg>") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.78rem center !important;
  background-size: 16px 16px !important;
  padding-right: 2.4rem !important;
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.admin-body .form-select:focus,
.admin-body .form-select-sm:focus {
  border-color: var(--rm-admin-accent) !important;
  background-color: var(--rm-admin-elevated) !important;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.18) !important;
  outline: 0 !important;
}
.admin-body .form-select option,
.admin-body .form-select-sm option {
  background: var(--rm-admin-surface) !important;
  color: var(--rm-admin-text-1) !important;
}

/* ---------- Topbar user dropdown: z-index alto + elevación ---------- */
.admin-body .app-header.admin-topbar {
  position: relative;
  z-index: 90;
}
.admin-body [data-user-menu],
.admin-body #userMenuBtn,
.admin-body .user-chip {
  position: relative;
  z-index: 120;
}
.admin-body .user-dropdown-menu,
.admin-body [class*="user-dropdown-menu"],
.admin-body .dropdown-menu.user-menu,
.admin-body .topbar-user-menu {
  position: absolute !important;
  top: calc(100% + 10px) !important;
  right: 0 !important;
  left: auto !important;
  min-width: 230px !important;
  z-index: 1320 !important;
  background: var(--rm-admin-elevated) !important;
  color: var(--rm-admin-text-1) !important;
  border: 1px solid var(--rm-admin-border-2) !important;
  border-radius: 14px !important;
  box-shadow:
    0 18px 40px -12px rgba(2,6,23,.75),
    0 6px 16px -6px rgba(2,6,23,.45) !important;
  padding: 0.55rem 0.4rem !important;
  margin: 0 !important;
  transform-origin: top right;
  animation: rmUserMenuIn .18s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes rmUserMenuIn {
  from { opacity: 0; transform: translateY(-6px) scale(.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.admin-body .user-dropdown-menu::before,
.admin-body [class*="user-dropdown-menu"]::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 18px;
  width: 12px;
  height: 12px;
  background: var(--rm-admin-elevated);
  border-left: 1px solid var(--rm-admin-border-2);
  border-top: 1px solid var(--rm-admin-border-2);
  transform: rotate(45deg);
  z-index: -1;
}
.admin-body .user-dropdown-menu a,
.admin-body .user-dropdown-menu button,
.admin-body .user-dropdown-menu .menu-item,
.admin-body [class*="user-dropdown-menu"] > * {
  display: flex !important;
  align-items: center !important;
  gap: 0.7rem !important;
  width: 100% !important;
  padding: 0.58rem 0.75rem !important;
  margin: 0.1rem 0 !important;
  border-radius: 10px !important;
  color: var(--rm-admin-text-2) !important;
  background: transparent !important;
  border: 0 !important;
  text-align: left !important;
  text-decoration: none !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: background-color .15s ease, color .15s ease, transform .15s ease;
}
.admin-body .user-dropdown-menu a:hover,
.admin-body .user-dropdown-menu button:hover,
.admin-body .user-dropdown-menu .menu-item:hover {
  background: rgba(59,130,246,0.10) !important;
  color: var(--rm-admin-text-1) !important;
}
.admin-body .user-dropdown-menu .menu-divider,
.admin-body .user-dropdown-menu hr,
.admin-body .user-dropdown-menu [class*="divider"] {
  border: 0 !important;
  height: 1px !important;
  background: var(--rm-admin-border) !important;
  margin: 0.45rem 0.5rem !important;
  padding: 0 !important;
  border-radius: 0 !important;
  cursor: default !important;
  pointer-events: none !important;
  opacity: 1 !important;
}
.admin-body .user-dropdown-menu [data-danger="true"],
.admin-body .user-dropdown-menu a[href*="logout"],
.admin-body .user-dropdown-menu .logout-btn,
.admin-body .user-dropdown-menu .danger {
  color: #FCA5A5 !important;
}
.admin-body .user-dropdown-menu [data-danger="true"]:hover,
.admin-body .user-dropdown-menu a[href*="logout"]:hover,
.admin-body .user-dropdown-menu .logout-btn:hover,
.admin-body .user-dropdown-menu .danger:hover {
  background: rgba(239,68,68,0.12) !important;
  color: #FECACA !important;
}
.admin-body .user-dropdown-menu svg,
.admin-body [class*="user-dropdown-menu"] svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.9;
}

/* ---------- Inputs dark legibles: placeholders/texto ---------- */
.admin-body .form-control,
.admin-body .form-control-sm {
  background-color: var(--rm-admin-surface) !important;
  color: var(--rm-admin-text-1) !important;
  border-color: var(--rm-admin-border-2) !important;
}
.admin-body .form-control::placeholder,
.admin-body .form-control-sm::placeholder {
  color: var(--rm-admin-text-4) !important;
  opacity: 0.9 !important;
}
.admin-body .form-control:focus,
.admin-body .form-control-sm:focus,
.admin-body textarea.form-control:focus {
  border-color: var(--rm-admin-accent) !important;
  background-color: var(--rm-admin-elevated) !important;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.18) !important;
  outline: 0 !important;
  color: var(--rm-admin-text-1) !important;
}
.admin-body .muted,
.admin-body .muted-sm,
.admin-body [class*="muted"],
.admin-body .text-muted,
.admin-body .form-label.muted-sm {
  color: var(--rm-admin-text-3) !important;
}
.admin-body .form-help,
.admin-body .form-text {
  color: var(--rm-admin-text-4) !important;
  font-size: 0.78rem;
  margin-top: 0.4rem;
}
.admin-body .text-danger,
.admin-body .alert-danger strong {
  color: #FCA5A5 !important;
}

