/* =========================================================================
   OApol.org — Estilos del portal público y panel /adminpol
   Plataforma desarrollada por Científicos Unidos del Perú.
   ========================================================================= */
:root {
  --oa-red: #C8102E;
  --oa-red-700: #A00D25;
  --oa-red-50: #FDECEF;
  --oa-ink: #0F172A;
  --oa-ink-2: #334155;
  --oa-muted: #64748B;
  --oa-line: #E2E8F0;
  --oa-bg: #F6F7FB;
  --oa-card: #FFFFFF;
  --oa-blue: #1D4ED8;
  --oa-sky: #0EA5E9;
  --oa-green: #16A34A;
  --oa-amber: #F59E0B;
  --oa-violet: #7C3AED;
  --oa-gold: #F5B301;
  --oa-silver: #94A3B8;
  --oa-bronze: #C2702D;
  --oa-radius: 14px;
  --oa-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);
  --oa-shadow-lg: 0 20px 50px rgba(15, 23, 42, .16);
  --oa-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --oa-font-head: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  --nav-h: 64px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--oa-font); background: var(--oa-bg); color: var(--oa-ink); font-size: 15px; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5, .oa-head { font-family: var(--oa-font-head); letter-spacing: -.015em; }
a { color: var(--oa-blue); text-decoration: none; }
a:hover { color: var(--oa-red); }
.text-muted { color: var(--oa-muted) !important; }
.small-caps { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--oa-muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
:focus-visible { outline: 3px solid rgba(200, 16, 46, .45); outline-offset: 2px; }

/* ----------------------------------------------------------- franja y cabecera */
.oa-stripe { background: linear-gradient(90deg, var(--oa-red) 0 33.3%, #fff 33.3% 66.6%, var(--oa-red) 66.6%); height: 4px; }
.oa-topbar { background: #0B1220; color: #CBD5E1; font-size: .76rem; }
.oa-topbar .container-xxl { min-height: 30px; }
.oa-header { position: sticky; top: 0; z-index: 1030; background: rgba(255, 255, 255, .96); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--oa-line); }
.oa-header .container-xxl { height: var(--nav-h); }
.oa-brand { display: flex; align-items: center; gap: .65rem; color: var(--oa-ink); min-width: 0; flex-shrink: 0; }
.oa-brand:hover { color: var(--oa-ink); }
.oa-brand-mark { width: 40px; height: 40px; border-radius: 11px; background: linear-gradient(135deg, var(--oa-red), #7F0A1C); color: #fff; display: grid; place-items: center; font-size: 1.2rem; box-shadow: 0 6px 16px rgba(200, 16, 46, .35); overflow: hidden; }
.oa-brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.oa-brand-name { font-family: var(--oa-font-head); font-weight: 800; font-size: 1.12rem; line-height: 1; }
.oa-brand-name span { color: var(--oa-red); }
.oa-brand-tag { font-size: .68rem; color: var(--oa-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px; }
@media (max-width: 1499.98px) { .oa-brand-tag { display: none !important; } }

/* Menú principal en UNA sola línea con submenús y desborde automático "Más" */
.oa-nav { display: flex; align-items: center; flex-wrap: nowrap; gap: 2px; min-width: 0; flex: 1 1 auto; justify-content: center; overflow: visible; }
.oa-nav > .oa-nav-item { position: relative; flex: 0 0 auto; }
.oa-nav-link { display: inline-flex; align-items: center; gap: .35rem; padding: .5rem .62rem; border-radius: 10px; color: var(--oa-ink-2); font-weight: 600; font-size: .88rem; white-space: nowrap; border: 0; background: transparent; cursor: pointer; }
.oa-nav-link:hover, .oa-nav-item.open > .oa-nav-link { background: var(--oa-red-50); color: var(--oa-red); }
.oa-nav-link.active { color: var(--oa-red); background: var(--oa-red-50); box-shadow: inset 0 -2px 0 var(--oa-red); }
.oa-nav-link .bi-chevron-down { font-size: .65rem; transition: transform .2s; }
.oa-nav-item.open > .oa-nav-link .bi-chevron-down { transform: rotate(180deg); }
.oa-sub { position: absolute; top: calc(100% + 8px); left: 0; min-width: 270px; background: #fff; border: 1px solid var(--oa-line); border-radius: 14px; box-shadow: var(--oa-shadow-lg); padding: .45rem; opacity: 0; visibility: hidden; transform: translateY(-6px); transition: .18s ease; z-index: 1040; }
.oa-nav-item.open > .oa-sub { opacity: 1; visibility: visible; transform: none; }
.oa-sub a, .oa-sub button { display: flex; gap: .7rem; align-items: flex-start; padding: .55rem .65rem; border-radius: 10px; color: var(--oa-ink); width: 100%; text-align: left; border: 0; background: transparent; }
.oa-sub a:hover, .oa-sub button:hover { background: var(--oa-bg); color: var(--oa-red); }
.oa-sub i.lead-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--oa-red-50); color: var(--oa-red); flex-shrink: 0; font-size: 1rem; }
.oa-sub .t { font-weight: 650; font-size: .88rem; line-height: 1.2; }
.oa-sub .d { font-size: .74rem; color: var(--oa-muted); }
.oa-nav-more .oa-sub { right: 0; left: auto; }
.oa-actions { display: flex; align-items: center; gap: .4rem; flex-shrink: 0; }
.oa-search-btn { display: inline-flex; align-items: center; gap: .5rem; border: 1px solid var(--oa-line); background: #fff; border-radius: 11px; padding: .45rem .7rem; color: var(--oa-muted); font-size: .85rem; min-width: 150px; }
@media (max-width: 1299.98px) { .oa-search-btn .lbl { display: none; } .oa-search-btn { min-width: 0; } }
.oa-search-btn kbd { font-size: .65rem; background: var(--oa-bg); color: var(--oa-muted); border: 1px solid var(--oa-line); padding: .05rem .35rem; border-radius: 5px; margin-left: auto; }
.oa-search-btn:hover { border-color: var(--oa-red); color: var(--oa-red); }
.oa-burger { display: none; }
@media (max-width: 991.98px) {
  .oa-nav { display: none; }
  .oa-burger { display: inline-flex; }
  .oa-search-btn { min-width: 0; }
  .oa-search-btn .lbl, .oa-search-btn kbd { display: none; }
}

/* ----------------------------------------------------------- tarjetas y bloques */
.oa-card { background: var(--oa-card); border: 1px solid var(--oa-line); border-radius: var(--oa-radius); box-shadow: var(--oa-shadow); }
.oa-card-h { padding: 1rem 1.15rem; border-bottom: 1px solid var(--oa-line); display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; }
.oa-card-h h2, .oa-card-h h3 { font-size: 1.02rem; margin: 0; font-weight: 750; }
.oa-card-b { padding: 1.1rem 1.15rem; }
.oa-section-title { display: flex; align-items: center; gap: .6rem; margin-bottom: .9rem; }
.oa-section-title .ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--oa-red-50); color: var(--oa-red); font-size: 1.15rem; }
.oa-section-title h2 { font-size: 1.25rem; margin: 0; font-weight: 800; }

.oa-hero { position: relative; border-radius: 22px; overflow: hidden; background: radial-gradient(1200px 400px at 10% -20%, rgba(200, 16, 46, .55), transparent 60%), radial-gradient(900px 400px at 110% 10%, rgba(14, 165, 233, .35), transparent 60%), #0B1220; color: #fff; padding: 2.2rem; }
.oa-hero h1 { font-weight: 800; font-size: clamp(1.5rem, 2.6vw, 2.35rem); line-height: 1.12; }
.oa-hero p { color: #CBD5E1; }
.oa-hero .oa-hero-search { background: #fff; border-radius: 16px; padding: .45rem; display: flex; gap: .4rem; box-shadow: 0 16px 40px rgba(0, 0, 0, .35); }
.oa-hero .oa-hero-search input { border: 0; outline: 0; flex: 1; font-size: 1.02rem; padding: .55rem .7rem; min-width: 0; color: var(--oa-ink); }
.oa-hero-chips a { color: #E2E8F0; border: 1px solid rgba(255, 255, 255, .22); padding: .25rem .6rem; border-radius: 999px; font-size: .78rem; display: inline-block; margin: .2rem .15rem 0 0; }
.oa-hero-chips a:hover { background: rgba(255, 255, 255, .12); color: #fff; }

.oa-kpi { padding: 1rem 1.1rem; display: flex; gap: .9rem; align-items: center; height: 100%; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.oa-kpi:hover { transform: translateY(-2px); box-shadow: var(--oa-shadow-lg); }
.oa-kpi .ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.35rem; color: #fff; flex-shrink: 0; }
.oa-kpi .v { font-family: var(--oa-font-head); font-weight: 800; font-size: 1.55rem; line-height: 1; }
.oa-kpi .l { font-size: .76rem; color: var(--oa-muted); font-weight: 600; margin-top: .2rem; }
.bg-g-red { background: linear-gradient(135deg, #EF4444, #B91C1C); }
.bg-g-blue { background: linear-gradient(135deg, #3B82F6, #1D4ED8); }
.bg-g-green { background: linear-gradient(135deg, #22C55E, #15803D); }
.bg-g-amber { background: linear-gradient(135deg, #FBBF24, #D97706); }
.bg-g-violet { background: linear-gradient(135deg, #A78BFA, #6D28D9); }
.bg-g-sky { background: linear-gradient(135deg, #38BDF8, #0369A1); }
.bg-g-pink { background: linear-gradient(135deg, #F472B6, #BE185D); }
.bg-g-teal { background: linear-gradient(135deg, #2DD4BF, #0F766E); }

/* ----------------------------------------------------------- listados con buscador en vivo */
.oa-livebar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.oa-livesearch { position: relative; flex: 1 1 320px; }
.oa-livesearch i.bi-search { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--oa-muted); }
.oa-livesearch input { width: 100%; padding: .7rem 2.4rem .7rem 2.4rem; border: 1.5px solid var(--oa-line); border-radius: 12px; background: #fff; font-size: .95rem; transition: border-color .15s, box-shadow .15s; }
.oa-livesearch input:focus { outline: 0; border-color: var(--oa-red); box-shadow: 0 0 0 4px rgba(200, 16, 46, .12); }
.oa-livesearch .spin { position: absolute; right: .8rem; top: 50%; transform: translateY(-50%); display: none; }
.oa-livesearch.loading .spin { display: block; }
.oa-livesearch .clear { position: absolute; right: .55rem; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--oa-muted); display: none; }
.oa-livesearch.has-value:not(.loading) .clear { display: block; }
.oa-livebar .form-select { width: auto; min-width: 150px; border-radius: 11px; border: 1.5px solid var(--oa-line); font-size: .88rem; padding-top: .6rem; padding-bottom: .6rem; }
.oa-result-meta { font-size: .82rem; color: var(--oa-muted); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; }
mark, .oa-hl { background: #FEF08A; color: inherit; padding: 0 .1em; border-radius: 3px; }
.oa-pager { display: flex; gap: .3rem; flex-wrap: wrap; justify-content: center; align-items: center; }
.oa-pager button { min-width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--oa-line); background: #fff; font-weight: 600; font-size: .85rem; color: var(--oa-ink-2); }
.oa-pager button.active { background: var(--oa-red); border-color: var(--oa-red); color: #fff; }
.oa-pager button:disabled { opacity: .45; }
.oa-skel { background: linear-gradient(90deg, #EEF2F7 25%, #F8FAFC 37%, #EEF2F7 63%); background-size: 400% 100%; animation: oaSk 1.2s ease infinite; border-radius: 12px; }
@keyframes oaSk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.oa-empty { text-align: center; padding: 2.5rem 1rem; color: var(--oa-muted); }
.oa-empty i { font-size: 2.2rem; color: #CBD5E1; }

/* ----------------------------------------------------------- tarjetas de artículo y universidad */
.oa-pub { padding: 1rem 1.1rem; border-bottom: 1px solid var(--oa-line); transition: background .15s; }
.oa-pub:hover { background: #FBFCFE; }
.oa-pub:last-child { border-bottom: 0; }
.oa-pub-title { font-weight: 700; font-size: 1rem; color: var(--oa-ink); line-height: 1.35; display: block; }
.oa-pub-title:hover { color: var(--oa-red); }
.oa-pub-meta { font-size: .8rem; color: var(--oa-muted); margin-top: .25rem; }
.oa-pub-abs { font-size: .84rem; color: var(--oa-ink-2); margin-top: .35rem; }
.oa-chip { display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; font-weight: 650; padding: .2rem .55rem; border-radius: 999px; border: 1px solid var(--oa-line); background: #fff; color: var(--oa-ink-2); white-space: nowrap; }
.oa-chip.univ { border-color: transparent; color: #fff; }
.oa-chip.ods { color: #fff; border-color: transparent; }
.oa-chip.oa { background: #ECFDF5; color: #047857; border-color: #A7F3D0; }
.oa-chip.cite { background: #EFF6FF; color: #1D4ED8; border-color: #BFDBFE; }
.oa-chip.ford { background: #F5F3FF; color: #6D28D9; border-color: #DDD6FE; }
.oa-chip.career { background: #FFF7ED; color: #C2410C; border-color: #FED7AA; }
a.oa-chip:hover { filter: brightness(.96); }
.oa-univ-card { padding: 1rem; display: flex; gap: .85rem; height: 100%; border-top: 4px solid var(--uc, var(--oa-red)); }
.oa-shield { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; color: #fff; font-weight: 800; font-family: var(--oa-font-head); font-size: .78rem; flex-shrink: 0; background: linear-gradient(135deg, var(--uc, #C8102E), var(--uc2, #1E3A8A)); box-shadow: 0 6px 16px rgba(15, 23, 42, .18); overflow: hidden; text-align: center; line-height: 1; padding: 3px; }
.oa-shield.lg { width: 86px; height: 86px; border-radius: 22px; font-size: 1.15rem; }
.oa-shield img { width: 100%; height: 100%; object-fit: contain; background: #fff; border-radius: 10px; }
.oa-stat-row { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .78rem; color: var(--oa-muted); }
.oa-stat-row b { color: var(--oa-ink); font-size: .92rem; }

/* ----------------------------------------------------------- perfiles */
.oa-profile-head { border-radius: 22px; color: #fff; padding: 1.8rem; position: relative; overflow: hidden; background: linear-gradient(120deg, var(--uc, #C8102E), var(--uc2, #1E3A8A)); }
.oa-profile-head::after { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 240px at 90% 0%, rgba(255, 255, 255, .22), transparent 60%); pointer-events: none; }
.oa-profile-head a:not(.btn) { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.oa-profile-head .btn-light { color: #0F172A; }
.oa-profile-head .btn-warning { color: #1F2937; }
.oa-profile-head .badge-soft { background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .3); color: #fff; font-weight: 600; }
.oa-tabs { display: flex; gap: .25rem; overflow-x: auto; border-bottom: 1px solid var(--oa-line); scrollbar-width: thin; }
.oa-tabs button { border: 0; background: transparent; padding: .75rem .9rem; font-weight: 650; color: var(--oa-muted); white-space: nowrap; border-bottom: 3px solid transparent; font-size: .9rem; }
.oa-tabs button.active { color: var(--oa-red); border-bottom-color: var(--oa-red); }
.oa-bar { height: 8px; border-radius: 99px; background: #EEF2F7; overflow: hidden; }
.oa-bar > span { display: block; height: 100%; border-radius: 99px; background: var(--oa-red); transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.oa-meta-table th { width: 32%; color: var(--oa-muted); font-weight: 600; font-size: .84rem; vertical-align: top; }
.oa-meta-table td { font-size: .9rem; }
.oa-author sup { color: var(--oa-red); font-weight: 700; }

/* ----------------------------------------------------------- ranking (colores vivos) */
.oa-rank-hero { border-radius: 24px; color: #fff; padding: 2rem; position: relative; overflow: hidden; background: linear-gradient(115deg, #1D4ED8 0%, #7C3AED 45%, #DB2777 75%, #F59E0B 100%); background-size: 200% 200%; animation: oaGrad 14s ease infinite; }
@keyframes oaGrad { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.oa-rank-hero .big-ico { font-size: 4.2rem; line-height: 1; filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .3)); animation: oaFloat 4s ease-in-out infinite; }
@keyframes oaFloat { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-8px) rotate(4deg); } }
.oa-podium { display: grid; grid-template-columns: 1fr 1.12fr 1fr; gap: 1rem; align-items: end; }
.oa-podium .p { background: #fff; border-radius: 20px; padding: 1.2rem 1rem 1rem; text-align: center; box-shadow: var(--oa-shadow-lg); position: relative; border-top: 6px solid var(--pc); opacity: 0; transform: translateY(24px); animation: oaUp .7s cubic-bezier(.2, .8, .2, 1) forwards; }
.oa-podium .p.first { padding-top: 1.8rem; }
.oa-podium .p:nth-child(1) { animation-delay: .15s; }
.oa-podium .p:nth-child(2) { animation-delay: 0s; }
.oa-podium .p:nth-child(3) { animation-delay: .3s; }
@keyframes oaUp { to { opacity: 1; transform: none; } }
.oa-podium .medal { width: 64px; height: 64px; margin: -3.1rem auto .5rem; border-radius: 50%; display: grid; place-items: center; font-size: 1.9rem; color: #fff; background: var(--pc); box-shadow: 0 10px 24px rgba(0, 0, 0, .22); border: 4px solid #fff; }
.oa-podium .p.first .medal { width: 78px; height: 78px; font-size: 2.3rem; margin-top: -3.8rem; }
.oa-podium .score { font-family: var(--oa-font-head); font-weight: 800; font-size: 1.8rem; color: var(--pc); }
@media (max-width: 767.98px) { .oa-podium { grid-template-columns: 1fr; } .oa-podium .p { order: initial !important; } }
.oa-rank-row { display: grid; grid-template-columns: 64px minmax(0, 2.6fr) 1.3fr repeat(4, minmax(0, .8fr)) 70px; gap: .75rem; align-items: center; padding: .8rem 1rem; border-bottom: 1px solid var(--oa-line); }
.oa-rank-row.head { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--oa-muted); background: #F8FAFC; }
.oa-rank-pos { font-family: var(--oa-font-head); font-weight: 800; font-size: 1.25rem; width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: #F1F5F9; color: var(--oa-ink); }
.oa-rank-row:nth-child(2) .oa-rank-pos { background: var(--oa-gold); color: #fff; }
.oa-rank-row:nth-child(3) .oa-rank-pos { background: var(--oa-silver); color: #fff; }
.oa-rank-row:nth-child(4) .oa-rank-pos { background: var(--oa-bronze); color: #fff; }
.oa-move { font-weight: 700; font-size: .78rem; display: inline-flex; align-items: center; gap: .15rem; }
.oa-move.up { color: #16A34A; } .oa-move.down { color: #DC2626; } .oa-move.eq { color: #94A3B8; } .oa-move.new { color: #7C3AED; }
.oa-scorebar { height: 10px; border-radius: 99px; background: #EEF2F7; overflow: hidden; }
.oa-scorebar span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #1D4ED8, #7C3AED, #DB2777, #F59E0B); width: 0; transition: width 1.1s cubic-bezier(.2, .8, .2, 1); }
@media (max-width: 991.98px) {
  .oa-rank-row { grid-template-columns: 52px minmax(0, 1fr) 80px; }
  .oa-rank-row .hide-md { display: none; }
}

/* ----------------------------------------------------------- ODS / OCDE */
.oa-ods-tile { border-radius: 16px; color: #fff; padding: 1rem; min-height: 132px; display: flex; flex-direction: column; justify-content: space-between; cursor: pointer; transition: transform .15s, box-shadow .15s; position: relative; overflow: hidden; }
.oa-ods-tile:hover { transform: translateY(-3px) scale(1.01); box-shadow: var(--oa-shadow-lg); }
.oa-ods-tile .n { font-family: var(--oa-font-head); font-weight: 800; font-size: 2.2rem; line-height: 1; opacity: .95; }
.oa-ods-tile .nm { font-weight: 700; font-size: .86rem; line-height: 1.2; }
.oa-ods-tile .c { font-size: .78rem; opacity: .92; }
.oa-heat td { text-align: center; font-size: .78rem; font-weight: 600; min-width: 34px; }
.oa-area-card { border-radius: 16px; padding: 1rem; color: #fff; }

/* ----------------------------------------------------------- red neuronal 3D */
.oa-neural { position: relative; border-radius: 22px; overflow: hidden; background: radial-gradient(900px 500px at 50% 40%, #13213D 0%, #070B16 70%); height: 600px; box-shadow: var(--oa-shadow-lg); user-select: none; touch-action: none; }
.oa-neural canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
.oa-neural canvas.dragging { cursor: grabbing; }
.oa-neural .nn-overlay { position: absolute; z-index: 3; pointer-events: none; }
.oa-neural .nn-overlay > * { pointer-events: auto; }
.oa-neural .nn-top { top: 14px; left: 14px; right: 14px; display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; flex-wrap: wrap; pointer-events: none; }
.oa-neural .nn-box { background: rgba(9, 14, 28, .72); border: 1px solid rgba(148, 163, 184, .22); backdrop-filter: blur(8px); border-radius: 14px; padding: .65rem .8rem; color: #E2E8F0; }
.oa-neural .nn-box h3 { font-size: .95rem; margin: 0; color: #fff; }
.oa-neural .btn-nn { border: 1px solid rgba(148, 163, 184, .35); color: #E2E8F0; background: rgba(255, 255, 255, .04); font-size: .74rem; padding: .25rem .55rem; border-radius: 8px; }
.oa-neural .btn-nn:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.oa-neural .btn-nn.active { background: var(--oa-red); border-color: var(--oa-red); color: #fff; }
.oa-neural .nn-side { top: 74px; right: 14px; width: 330px; max-height: calc(100% - 150px); overflow: auto; }
.oa-neural .nn-bottom { left: 14px; bottom: 14px; right: 14px; display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; font-size: .74rem; }
.oa-neural .nn-legend span { display: inline-flex; align-items: center; gap: .35rem; margin-right: .75rem; }
.oa-neural .nn-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.oa-neural .nn-tip { position: absolute; z-index: 4; pointer-events: none; background: rgba(9, 14, 28, .92); color: #fff; border: 1px solid rgba(148, 163, 184, .3); border-radius: 10px; padding: .45rem .6rem; font-size: .76rem; max-width: 260px; transform: translate(14px, 14px); display: none; }
.oa-neural .nn-metric { display: grid; grid-template-columns: 1fr auto; gap: .2rem .6rem; font-size: .76rem; }
.oa-neural .nn-cmp-bar { height: 7px; border-radius: 9px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.oa-neural .nn-cmp-bar span { display: block; height: 100%; border-radius: 9px; transition: width .6s; }
.oa-neural:fullscreen, .oa-neural.pseudo-full { position: fixed !important; inset: 0 !important; width: 100vw !important; height: 100vh !important; height: 100dvh !important; border-radius: 0 !important; z-index: 2000; }
.oa-neural:-webkit-full-screen { width: 100vw !important; height: 100vh !important; border-radius: 0 !important; }
body.nn-lock { overflow: hidden; }
@media (max-width: 767.98px) {
  .oa-neural { height: 520px; }
  .oa-neural .nn-side { left: 14px; right: 14px; width: auto; top: auto; bottom: 54px; max-height: 42%; }
  .oa-neural .nn-hide-sm { display: none !important; }
}

/* ----------------------------------------------------------- mapas */
.oa-map { height: 420px; border-radius: 14px; overflow: hidden; border: 1px solid var(--oa-line); z-index: 1; }
.leaflet-container { font-family: var(--oa-font); }
.leaflet-popup-content { font-size: .82rem; }

/* ----------------------------------------------------------- buscador global (Ctrl+K) */
.oa-cmd { position: fixed; inset: 0; z-index: 2100; background: rgba(15, 23, 42, .55); backdrop-filter: blur(4px); display: none; padding: 8vh 1rem 1rem; }
.oa-cmd.show { display: block; }
.oa-cmd-box { max-width: 760px; margin: 0 auto; background: #fff; border-radius: 18px; box-shadow: var(--oa-shadow-lg); overflow: hidden; }
.oa-cmd-in { display: flex; align-items: center; gap: .6rem; padding: .9rem 1.1rem; border-bottom: 1px solid var(--oa-line); }
.oa-cmd-in input { border: 0; outline: 0; flex: 1; font-size: 1.1rem; }
.oa-cmd-res { max-height: 62vh; overflow: auto; padding: .4rem; }
.oa-cmd-grp { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--oa-muted); font-weight: 700; padding: .6rem .7rem .3rem; }
.oa-cmd-item { display: flex; gap: .7rem; align-items: center; padding: .55rem .7rem; border-radius: 10px; color: var(--oa-ink); cursor: pointer; }
.oa-cmd-item:hover, .oa-cmd-item.sel { background: var(--oa-red-50); color: var(--oa-red); }
.oa-cmd-item .ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--oa-bg); flex-shrink: 0; }

/* ----------------------------------------------------------- footer administrable */
.oa-footer { background: var(--ft-bg, #0B1220); color: var(--ft-text, #CBD5E1); margin-top: 3rem; position: relative; }
.oa-footer h5 { color: var(--ft-head, #fff); font-size: .95rem; font-weight: 750; margin-bottom: .85rem; }
.oa-footer a { color: var(--ft-text, #CBD5E1); }
.oa-footer a:hover { color: var(--ft-accent, #C8102E); }
.oa-footer ul { list-style: none; padding: 0; margin: 0; }
.oa-footer li { margin-bottom: .45rem; font-size: .88rem; }
.oa-footer .soc a { width: 38px; height: 38px; border-radius: 10px; display: inline-grid; place-items: center; background: rgba(255, 255, 255, .07); margin: 0 .3rem .3rem 0; font-size: 1.05rem; }
.oa-footer .soc a:hover { background: var(--ft-accent, #C8102E); color: #fff; }
.oa-footer .bottom { border-top: 1px solid rgba(255, 255, 255, .1); font-size: .8rem; }
.oa-footer .credit { color: var(--ft-head, #fff); font-weight: 600; }
.oa-footer .partners img { max-height: 42px; max-width: 120px; filter: grayscale(1) brightness(1.6); opacity: .8; transition: .2s; }
.oa-footer .partners img:hover { filter: none; opacity: 1; }

/* ----------------------------------------------------------- utilidades */
.min-w-0 { min-width: 0 !important; }
.oa-fade { animation: oaFade .35s ease both; }
@keyframes oaFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.oa-count { font-variant-numeric: tabular-nums; }
.oa-toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 2200; background: #0F172A; color: #fff; padding: .7rem 1rem; border-radius: 12px; box-shadow: var(--oa-shadow-lg); font-size: .88rem; display: none; }
.table-oa { font-size: .86rem; }
.table-oa th { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--oa-muted); font-weight: 700; background: #F8FAFC; white-space: nowrap; }
.table-oa td { vertical-align: middle; }
.oa-level-chip { border-radius: 14px; padding: .9rem; color: #fff; }
.oa-breadcrumb { font-size: .82rem; color: var(--oa-muted); }
.oa-breadcrumb a { color: var(--oa-muted); }
.oa-breadcrumb a:hover { color: var(--oa-red); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .oa-header, .oa-topbar, .oa-stripe, .oa-footer, .no-print { display: none !important; }
  body { background: #fff; }
  .oa-card { box-shadow: none; }
}

/* =========================================================================
   Panel /adminpol
   ========================================================================= */
.adm-body { background: #F1F4F9; }
.adm-shell { display: flex; min-height: 100vh; }
.adm-side { width: 262px; flex-shrink: 0; background: #0B1220; color: #CBD5E1; position: sticky; top: 0; height: 100vh; overflow-y: auto; transition: width .2s; z-index: 1035; }
.adm-side .brand { padding: 1rem 1.1rem; display: flex; align-items: center; gap: .6rem; color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.adm-side .grp { font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; color: #64748B; padding: .9rem 1.1rem .35rem; font-weight: 700; }
.adm-side a { display: flex; align-items: center; gap: .65rem; padding: .55rem 1.1rem; color: #CBD5E1; font-size: .88rem; font-weight: 550; border-left: 3px solid transparent; }
.adm-side a:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.adm-side a.active { background: rgba(200, 16, 46, .16); color: #fff; border-left-color: var(--oa-red); }
.adm-side a .badge { margin-left: auto; }
.adm-main { flex: 1; min-width: 0; }
.adm-top { position: sticky; top: 0; z-index: 1030; background: #fff; border-bottom: 1px solid var(--oa-line); padding: .6rem 1.2rem; display: flex; align-items: center; gap: .8rem; }
.adm-content { padding: 1.2rem; }
.adm-console { background: #050913; color: #CBD5E1; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .76rem; border-radius: 12px; height: 420px; overflow: auto; padding: .7rem .85rem; line-height: 1.55; border: 1px solid #1E293B; }
.adm-console .l { white-space: pre-wrap; word-break: break-word; }
.adm-console .t { color: #475569; margin-right: .5rem; }
.adm-console .ok { color: #4ADE80; } .adm-console .warn { color: #FBBF24; } .adm-console .error { color: #F87171; } .adm-console .info { color: #7DD3FC; } .adm-console .dup { color: #A78BFA; }
.adm-drop { border: 2px dashed #CBD5E1; border-radius: 16px; padding: 2rem 1rem; text-align: center; background: #fff; transition: .15s; cursor: pointer; }
.adm-drop.over { border-color: var(--oa-red); background: var(--oa-red-50); }
.adm-progress { height: 14px; border-radius: 99px; background: #E2E8F0; overflow: hidden; }
.adm-progress span { display: block; height: 100%; background: linear-gradient(90deg, #16A34A, #22C55E); transition: width .6s; border-radius: 99px; }
.adm-progress.up span { background: linear-gradient(90deg, #1D4ED8, #38BDF8); }
.adm-live-dot { width: 9px; height: 9px; border-radius: 50%; background: #22C55E; display: inline-block; box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); animation: admPulse 1.6s infinite; }
@keyframes admPulse { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); } 70% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
.adm-map { height: 460px; border-radius: 14px; overflow: hidden; border: 1px solid var(--oa-line); }
@media (max-width: 991.98px) {
  .adm-side { position: fixed; left: -280px; transition: left .2s; }
  .adm-side.show { left: 0; box-shadow: var(--oa-shadow-lg); }
}
.adm-login { min-height: 100vh; display: grid; place-items: center; padding: 1rem; background: radial-gradient(900px 500px at 20% 0%, rgba(200, 16, 46, .35), transparent 60%), #0B1220; }
.adm-login .card { width: 100%; max-width: 430px; border-radius: 20px; border: 0; box-shadow: var(--oa-shadow-lg); }
