/* Sin fuente descargada (29-09-2026): Inter llegaba con display=swap y el texto
   cambiaba de letra al cargar. En las pantallas con csm.css ni se usaba (manda la
   fuente común); ahora todas usan la misma desde el primer pintado. */

/* ── Variables ───────────────────────────────────────────────── */
:root {
  --sidebar-w: 255px;
  /* Mismo azul marino que la barra lateral de Central: estandar de las 4 apps. */
  --sidebar-bg: #0f1f38;
  --sidebar-hover: rgba(255,255,255,.06);
  --sidebar-active-bg: rgba(99,102,241,.18);
  --sidebar-active-color: #818cf8;
  --sidebar-text: #94a3b8;
  --sidebar-border: rgba(255,255,255,.07);

  --body-bg: #f1f5f9;
  --card-bg: #ffffff;
  --card-shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 20px rgba(0,0,0,.05);
  --card-radius: 14px;

  --topbar-h: 58px;
  --topbar-bg: #ffffff;
  --border: #e2e8f0;

  --text: #0f172a;
  --text-2: #64748b;
  --text-3: #94a3b8;

  --blue:    #6366f1;
  --blue-d:  #4f46e5;
  --green:   #10b981;
  --yellow:  #f59e0b;
  --red:     #ef4444;
  --purple:  #8b5cf6;
  --teal:    #14b8a6;
}

/* ── Reset / Base ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--body-bg);
  color: var(--text);
  margin: 0;
  min-height: 100vh;
  font-size: 14px;
}

a { text-decoration: none; }

/* ── Sidebar ─────────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: transform .25s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1.25rem 1.1rem;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -.3px;
  border-bottom: 1px solid var(--sidebar-border);
}

.sidebar-brand .brand-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  color: #fff;
  flex-shrink: 0;
}

/* Logo CSM: fondo blanco para que la piramide (tonos oscuros) se distinga
   sobre la barra lateral oscura. Igual que en Central. */
.sidebar-brand .brand-logo {
  background: #ffffff;
  padding: 4px;
}
.sidebar-brand .brand-logo img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
}

.login-logo-csm {
  background: #ffffff;
  box-shadow: 0 8px 32px rgba(15,31,56,.35);
  padding: 12px;
}
.login-logo-csm img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
}

/* Nav sections */
.sidebar-nav {
  flex: 1;
  padding: .75rem .65rem;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #1e293b transparent;
}

.nav-section {
  margin-top: 1rem;
}

.nav-section-label {
  font-size: .65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #475569;
  padding: .25rem .6rem .5rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .55rem .75rem;
  border-radius: 8px;
  color: var(--sidebar-text);
  font-size: .83rem;
  font-weight: 500;
  transition: all .15s;
  margin-bottom: 2px;
}

.sidebar-link:hover {
  background: var(--sidebar-hover);
  color: #e2e8f0;
}

.sidebar-link.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active-color);
}

.sidebar-link i {
  font-size: .95rem;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

/* El bloque de usuario y el enlace de volver estaban en el pie de la barra lateral.
   Se movieron a la cabecera para que las tres aplicaciones se vean igual: ahi estan
   siempre visibles y no desaparecen cuando la barra se colapsa en pantalla chica. */

/* ── Main wrapper ────────────────────────────────────────────── */
.main-wrapper {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Topbar ──────────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 1rem;
}

.topbar-title {
  font-size: .95rem;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}

.topbar-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--text-2);
  cursor: pointer;
  padding: .25rem;
}

/* ── Volver a Central ────────────────────────────────────────── */
.topbar-central {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .7rem;
  border-radius: 8px;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, color .15s;
}

.topbar-central:hover {
  background: #eff4fb;
  color: var(--blue);
}

/* ── Usuario en la cabecera ──────────────────────────────────── */
.topbar-user {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .3rem .5rem;
  border-radius: 8px;
  text-decoration: none;
  transition: background .15s;
}

.topbar-user:hover { background: #f1f5f9; }
.topbar-user::after { display: none; }   /* sin el caret de Bootstrap: hay flecha propia */

.topbar-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: .8rem;
  flex-shrink: 0;
}

/* Estos colores son para fondo claro: los de la barra lateral (#e2e8f0) eran
   ilegibles aca. */
.topbar-user-name   { font-size: .875rem; font-weight: 600; color: var(--text); line-height: 1.1; }
.topbar-user-role   { font-size: .72rem; color: var(--text-2); }
.topbar-user-flecha { font-size: .7rem; color: var(--text-2); }

.topbar-menu {
  min-width: 210px;
  margin-top: .5rem;
  border: none;
  border-radius: .75rem;
  padding-top: 0;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .12);
  overflow: hidden;
}

.topbar-menu-cabecera {
  padding: .65rem .9rem;
  background: #f8fafc;
}

.topbar-menu-nombre { font-size: .875rem; font-weight: 600; color: var(--text); }
.topbar-menu-correo { font-size: .75rem; color: var(--text-2); word-break: break-all; }

.topbar-menu-salir {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .875rem;
  color: #dc2626;
}

.topbar-menu-salir:hover { background: #fef2f2; color: #b91c1c; }

/* ── Content ─────────────────────────────────────────────────── */
.content-wrapper {
  padding: 1.5rem;
  flex: 1;
}

/* ── Page header ─────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.page-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

/* ── Stat cards ──────────────────────────────────────────────── */
.stat-card {
  border-radius: var(--card-radius);
  padding: 1.25rem 1.4rem;
  color: #fff;
  position: relative;
  overflow: hidden;
  border: none;
  box-shadow: 0 4px 20px rgba(0,0,0,.12);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: -25px; right: -25px;
  width: 110px; height: 110px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
}

.stat-card::after {
  content: '';
  position: absolute;
  bottom: -35px; right: 15px;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
}

.stat-icon {
  font-size: 1.8rem;
  opacity: .9;
  margin-bottom: .6rem;
  display: block;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.stat-label {
  font-size: .78rem;
  opacity: .8;
  margin-top: .3rem;
}

.stat-link {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  color: rgba(255,255,255,.75);
  font-size: .75rem;
  margin-top: .9rem;
  transition: color .15s;
}

.stat-link:hover { color: #fff; }

.stat-blue   { background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%); }
.stat-yellow { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
.stat-green  { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
.stat-purple { background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%); }

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
}

.card-header {
  background: transparent;
  border-bottom: 1px solid var(--border);
  padding: .9rem 1.2rem;
  font-weight: 600;
  font-size: .875rem;
  color: var(--text);
  border-radius: var(--card-radius) var(--card-radius) 0 0 !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-footer {
  background: #fafafa;
  border-top: 1px solid var(--border);
  border-radius: 0 0 var(--card-radius) var(--card-radius) !important;
  padding: .75rem 1.2rem;
}

/* ── Tables ──────────────────────────────────────────────────── */
.table { font-size: .855rem; margin: 0; }

.table thead th {
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: var(--text-2);
  padding: .7rem 1.1rem;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  border-top: none;
}

.table tbody td {
  padding: .85rem 1.1rem;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
  color: var(--text);
}

.table tbody tr:last-child td { border-bottom: none; }

.table-hover tbody tr:hover td { background: #f8fafc; }

/* ── Badges ──────────────────────────────────────────────────── */
.badge {
  font-weight: 500;
  font-size: .7rem;
  padding: .3em .65em;
  border-radius: 6px;
}

.badge-programada  { background: #e0e7ff; color: #4338ca; }
.badge-realizada   { background: #d1fae5; color: #065f46; }
.badge-cancelada   { background: #fee2e2; color: #991b1b; }
.badge-sin-cerrar  { background: #fef3c7; color: #92400e; }
.badge-en_proceso  { background: #fef3c7; color: #92400e; }
.badge-cerrada     { background: #d1fae5; color: #065f46; }

/* ── Selector de estado inline ───────────────────────────────── */
.estado-select {
  border: none;
  border-radius: 20px;
  padding: .2rem .65rem;
  font-size: .75rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236b7280'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .5rem center;
  padding-right: 1.4rem;
}
.estado-select.estado-programada { background-color: #e0e7ff; color: #4338ca; }
.estado-select.estado-realizada  { background-color: #d1fae5; color: #065f46; }
.estado-select.estado-cancelada  { background-color: #fee2e2; color: #991b1b; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  font-size: .83rem;
  font-weight: 500;
  border-radius: 8px;
  padding: .45rem 1rem;
  transition: all .15s ease;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.btn-primary { background: var(--blue); border-color: var(--blue); }
.btn-primary:hover {
  background: var(--blue-d);
  border-color: var(--blue-d);
  box-shadow: 0 4px 14px rgba(99,102,241,.35);
  transform: translateY(-1px);
}

.btn-warning:hover, .btn-success:hover, .btn-danger:hover {
  transform: translateY(-1px);
}

.btn-sm { padding: .3rem .7rem; font-size: .78rem; border-radius: 7px; }

/* ── Forms ───────────────────────────────────────────────────── */
.form-control, .form-select {
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #f8fafc;
  font-size: .855rem;
  padding: .55rem .85rem;
  transition: border-color .15s, box-shadow .15s;
  color: var(--text);
}

.form-control:focus, .form-select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(99,102,241,.12);
  background: #fff;
}

.form-label {
  font-size: .8rem;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: .35rem;
}

.form-check-input:checked { background-color: var(--blue); border-color: var(--blue); }

.form-check.border {
  border-color: var(--border) !important;
  transition: border-color .15s, background .15s;
}

.form-check.border:has(.form-check-input:checked) {
  border-color: var(--blue) !important;
  background: rgba(99,102,241,.05);
}

/* ── Alerts ──────────────────────────────────────────────────── */
.alert {
  border-radius: 10px;
  border: none;
  font-size: .855rem;
  padding: .75rem 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.alert-success { background: #d1fae5; color: #065f46; }
.alert-danger  { background: #fee2e2; color: #991b1b; }
.alert-warning { background: #fef3c7; color: #92400e; }
.alert-info    { background: #e0e7ff; color: #3730a3; }

/* ── List group ──────────────────────────────────────────────── */
.list-group-item {
  border-color: #f1f5f9;
  padding: .85rem 1.2rem;
  font-size: .855rem;
}

/* ── Empty state ─────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-3);
}

.empty-state i { font-size: 2.5rem; margin-bottom: .75rem; display: block; }
.empty-state p { margin-bottom: 1rem; }

/* ── Login ───────────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
}

.login-brand-panel {
  flex: 0 0 420px;
  background: linear-gradient(160deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  position: relative;
  overflow: hidden;
}

.login-brand-panel::before {
  content: '';
  position: absolute;
  top: -80px; left: -80px;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,.25) 0%, transparent 70%);
}

.login-brand-panel::after {
  content: '';
  position: absolute;
  bottom: -60px; right: -60px;
  width: 250px; height: 250px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139,92,246,.2) 0%, transparent 70%);
}

.login-brand-content { position: relative; z-index: 1; text-align: center; color: #fff; }

.login-logo {
  width: 72px; height: 72px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1.5rem;
  box-shadow: 0 8px 32px rgba(99,102,241,.4);
}

.login-brand-content h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: .5rem;
}

.login-brand-content p {
  color: #94a3b8;
  font-size: .875rem;
  line-height: 1.6;
  max-width: 280px;
  margin: 0 auto;
}

.login-form-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--body-bg);
}

.login-form-box {
  width: 100%;
  max-width: 380px;
}

.login-form-box h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .4rem;
}

.login-form-box .subtitle {
  color: var(--text-2);
  font-size: .855rem;
  margin-bottom: 2rem;
}

.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 32px rgba(0,0,0,.08);
  border: 1px solid var(--border);
}

/* ── BI: Filtros ─────────────────────────────────────────────── */
.bi-filterbar {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .65rem 1rem;
  box-shadow: var(--card-shadow);
}

.bi-filter-label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: .35rem;
}

.bi-filter-label i { color: var(--blue); }

.bi-filter-group {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.bi-filter-group label {
  font-size: .65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--text-3);
  margin: 0;
  padding-left: 2px;
}

.bi-select {
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #f8fafc;
  font-size: .8rem;
  font-weight: 500;
  color: var(--text);
  padding: .28rem .65rem;
  cursor: pointer;
  transition: border-color .15s;
  appearance: auto;
}

.bi-select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(99,102,241,.1);
}

.bi-clear-btn {
  font-size: .78rem;
  color: var(--red);
  display: flex;
  align-items: center;
  gap: .25rem;
  padding: .3rem .6rem;
  border-radius: 6px;
  transition: background .15s;
  white-space: nowrap;
}

.bi-clear-btn:hover { background: #fee2e2; }

.bi-chip {
  background: rgba(99,102,241,.1);
  color: var(--blue);
  font-size: .72rem;
  font-weight: 600;
  padding: .25rem .6rem;
  border-radius: 20px;
  white-space: nowrap;
}

/* ── BI: KPI Cards ───────────────────────────────────────────── */
.bi-kpi {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.1rem 1.2rem;
  box-shadow: var(--card-shadow);
  border-top: 3px solid var(--accent);
  position: relative;
  overflow: hidden;
}

.bi-kpi-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: .6rem;
}

.bi-kpi-label {
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.bi-kpi-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem;
  flex-shrink: 0;
}

.bi-kpi-value {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
  margin-bottom: .35rem;
}

.bi-kpi-sub {
  font-size: .72rem;
  color: var(--text-2);
}

/* ── BI: Chart cards ─────────────────────────────────────────── */
.bi-chart-card { overflow: hidden; }

/* ── BI: Donut legend ────────────────────────────────────────── */
.bi-legend-item {
  font-size: .8rem;
  padding: .3rem 0;
  border-bottom: 1px solid #f1f5f9;
  color: var(--text-2);
}

.bi-legend-item:last-child { border-bottom: none; }

.bi-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  border-radius: 5px;
  font-size: .6rem;
  font-weight: 700;
  margin-right: .4rem;
}

/* ── Documentos adjuntos ─────────────────────────────────────── */
.doc-item {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .6rem .85rem;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fafafa;
  transition: background .15s;
}

.doc-item:hover { background: #f1f5f9; }

.doc-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.doc-icon.doc-pdf   { color: #ef4444; }
.doc-icon.doc-word  { color: #3b82f6; }
.doc-icon.doc-excel { color: #10b981; }
.doc-icon.doc-ppt   { color: #f97316; }
.doc-icon.doc-image { color: #f59e0b; }
.doc-icon.doc-other { color: #64748b; }

.doc-info  { flex: 1; min-width: 0; }

.doc-name {
  font-size: .84rem;
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-meta {
  font-size: .72rem;
  color: var(--text-3);
  margin-top: 1px;
}

.doc-btn {
  padding: .25rem .5rem;
  font-size: .8rem;
  border-radius: 7px;
  flex-shrink: 0;
}

/* ── Ley de Lobby ────────────────────────────────────────────── */
.lobby-subsection {
  background: rgba(99,102,241,.04);
  border: 1px solid rgba(99,102,241,.22);
  border-radius: 10px;
  padding: 1rem 1.1rem 1.1rem;
}

.lobby-subsection-header {
  font-size: .78rem;
  font-weight: 700;
  color: #4f46e5;
  text-transform: uppercase;
  letter-spacing: .6px;
  padding-bottom: .6rem;
  border-bottom: 1px solid rgba(99,102,241,.15);
  margin-bottom: .25rem;
}

.lobby-cert-actual {
  font-size: .82rem;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 7px;
  padding: .45rem .75rem;
  color: #065f46;
}

.lobby-cert-actual a { color: #059669; font-weight: 600; }

.lobby-detail-block {
  background: rgba(99,102,241,.03);
  border: 1px solid rgba(99,102,241,.18);
  border-radius: 10px;
  padding: 1rem 1.1rem 1.1rem;
}

/* ── MPD Landing Panel ───────────────────────────────────────── */
.mpd-panel {
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(15,23,42,.18);
}

.mpd-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 55%, #0f172a 100%);
  padding: 1.75rem 2rem 1.6rem;
  position: relative;
  overflow: hidden;
}

.mpd-hero::before {
  content: '';
  position: absolute;
  top: -70px; right: -70px;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,.32) 0%, transparent 70%);
  pointer-events: none;
}

.mpd-hero::after {
  content: '';
  position: absolute;
  bottom: -50px; left: 42%;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139,92,246,.2) 0%, transparent 70%);
  pointer-events: none;
}

.mpd-logo-badge {
  width: 54px; height: 54px;
  border-radius: 14px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem;
  color: #fff;
  box-shadow: 0 4px 20px rgba(99,102,241,.45);
  flex-shrink: 0;
  position: relative; z-index: 1;
}

/* Swap with real logo: .mpd-logo-badge img { width:100%; height:100%; object-fit:contain; border-radius:12px; } */

.mpd-logo-label {
  font-size: .65rem;
  font-weight: 600;
  color: #818cf8;
  text-transform: uppercase;
  letter-spacing: 1.1px;
  line-height: 1.3;
  position: relative; z-index: 1;
}

.mpd-company-name {
  font-size: .95rem;
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1.3;
  position: relative; z-index: 1;
}

.mpd-hero-text {
  font-size: .855rem;
  color: #cbd5e1;
  line-height: 1.7;
  margin: 0;
  position: relative; z-index: 1;
  max-width: 820px;
}

.mpd-hero-text strong { color: #e2e8f0; }

.mpd-obligatorio {
  background: rgba(239,68,68,.22);
  color: #fca5a5;
  font-weight: 600;
  padding: .1rem .45rem;
  border-radius: 4px;
}

.mpd-toggle-btn {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  color: #94a3b8;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: .88rem;
  transition: all .2s;
  flex-shrink: 0;
  padding: 0;
  position: relative; z-index: 1;
}

.mpd-toggle-btn:hover {
  background: rgba(255,255,255,.15);
  color: #e2e8f0;
}

.mpd-body {
  background: #fff;
  border: 1px solid var(--border);
  border-top: none;
  padding: 1.3rem 1.5rem 1.5rem;
}

/* Panel plegado desde el primer pintado: la clase la pone un script en línea del
   <head> (base.html) leyendo localStorage. Antes se plegaba en DOMContentLoaded y
   el panel se veía abierto un instante. */
.mpd-cerrado #mpdBody { display: none; }

.mpd-defs-label {
  font-size: .72rem;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 1rem;
}

.mpd-def-card {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.1rem;
  height: 100%;
  transition: box-shadow .18s, transform .18s;
}

.mpd-def-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,.09);
  transform: translateY(-2px);
}

.mpd-def-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  margin-bottom: .65rem;
}

.mpd-def-letter {
  font-size: .62rem;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: .15rem;
}

.mpd-def-title {
  font-size: .875rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .5rem;
}

.mpd-def-text {
  font-size: .795rem;
  color: var(--text-2);
  line-height: 1.65;
  margin: 0;
}

.mpd-motto {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: .8rem 1rem;
  background: linear-gradient(90deg, rgba(99,102,241,.06) 0%, rgba(139,92,246,.07) 100%);
  border: 1px solid rgba(99,102,241,.16);
  border-radius: 10px;
  color: #4f46e5;
  font-size: .875rem;
  font-weight: 600;
  margin-top: 1rem;
}

.mpd-motto i { font-size: 1rem; color: #f59e0b; }

/* ── Scrollbar ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }

/* ── Overlay mobile ──────────────────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 999;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .main-wrapper { margin-left: 0; }
  .topbar-toggle { display: block; }
  .login-brand-panel { display: none; }
  .content-wrapper { padding: 1rem; }
}
