:root {
  /* Superficies base (deep, premium) */
  --bg:          #0a0e20;
  --bg-2:        #0d1030;
  --surface:     #121a2e;
  --surface-2:   #0e1527;
  --surface-3:   #0f1828;
  --surface-4:   #182240;

  --border:      rgba(255, 255, 255, 0.09);
  --border-2:    rgba(255, 255, 255, 0.06);
  --border-3:    rgba(255, 255, 255, 0.16);

  --ink:         #eef4ff;
  --ink-2:       #cfdaf0;
  --muted:       #a6b8d6;
  --muted-2:     #88a0c4;
  --muted-3:     #607a9e;

  /* Paleta viva cotizador-pq */
  --pq-teal:     #14b8a6;
  --pq-teal-d:   #0d7377;
  --pq-blue:     #3b82f6;
  --pq-blue-d:   #2563eb;
  --pq-violet:   #8b5cf6;
  --pq-violet-d: #7c3aed;
  --pq-cyan:     #06b6d4;
  --pq-amber:    #f5a623;
  --pq-orange:   #ea580c;
  --pq-pink:     #ec4899;
  --pq-indigo:   #6366f1;
  --pq-emerald:  #10b981;

  /* Gradiente firma (teal → azul → violeta → ámbar) */
  --grad-signature: linear-gradient(100deg, #2dd4bf 0%, #3b82f6 34%, #8b5cf6 66%, #f5a623 100%);

  --gold:        #d4a04a;
  --amber:       #ffb547;
  --good:        #34c084;
  --bad:         #e86060;

  /* Acento por defecto (cada grupo lo redefine vía [data-group]) */
  --acc:     #14b8a6;
  --acc-2:   #0d7377;
  --acc-rgb: 20, 184, 166;

  --card-shadow: rgba(0, 0, 0, 0.45);
  --radius:   12px;
  --radius-2: 16px;
}

* { box-sizing: border-box; }

/* Toque de marca consistente con la app: selección de texto y barra de scroll
   finas con el teal del portal. */
::selection { background: rgba(20, 184, 166, 0.28); }
::-moz-selection { background: rgba(20, 184, 166, 0.28); }
* { scrollbar-width: thin; scrollbar-color: rgba(20, 184, 166, 0.35) transparent; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(20, 184, 166, 0.35);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(20, 184, 166, 0.55); }

html, body {
  margin: 0; padding: 0;
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-feature-settings: 'cv11', 'ss01';
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Fondo base profundo; el color en movimiento lo pone la capa .portal-aurora */
body {
  position: relative;
  background:
    linear-gradient(165deg, #070b1c 0%, #0b0f2b 34%, #120d30 66%, #08081e 100%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ═══════════════════════════════════════════════════════════
   AURORA — capa de color viva detrás de todo el contenido
   ═══════════════════════════════════════════════════════════ */
.portal-aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.portal-aurora-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  mix-blend-mode: screen;
  will-change: transform;
}
.portal-aurora-blob-1 {
  width: 46vw; height: 46vw; top: -12vw; left: -8vw;
  background: radial-gradient(circle at 30% 30%, #16b8a6, transparent 70%);
  animation: auroraDrift1 26s ease-in-out infinite alternate;
}
.portal-aurora-blob-2 {
  width: 42vw; height: 42vw; top: -6vw; right: -10vw;
  background: radial-gradient(circle at 60% 40%, #8b5cf6, transparent 70%);
  animation: auroraDrift2 32s ease-in-out infinite alternate;
}
.portal-aurora-blob-3 {
  width: 50vw; height: 50vw; bottom: -18vw; left: 22vw;
  background: radial-gradient(circle at 50% 50%, #3b82f6, transparent 70%);
  animation: auroraDrift3 30s ease-in-out infinite alternate;
}
.portal-aurora-blob-4 {
  width: 34vw; height: 34vw; bottom: -8vw; right: 6vw;
  background: radial-gradient(circle at 40% 60%, #f5a623, transparent 72%);
  opacity: 0.4;
  animation: auroraDrift4 36s ease-in-out infinite alternate;
}
.portal-aurora-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 20%, transparent 78%);
}
@keyframes auroraDrift1 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(9vw, 7vw) scale(1.14); }
}
@keyframes auroraDrift2 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-7vw, 9vw) scale(1.1); }
}
@keyframes auroraDrift3 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-6vw, -8vw) scale(1.12); }
}
@keyframes auroraDrift4 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(8vw, -6vw) scale(1.18); }
}
@media (prefers-reduced-motion: reduce) {
  .portal-aurora-blob { animation: none !important; }
}

/* Todo el contenido va por encima de la aurora */
.portal-topbar, .portal-hero, .portal-searchbar, .portal-quick,
.portal-main, .portal-footer { position: relative; z-index: 1; }

/* ═══════════════════════════════════════════════════════════
   TOP BAR
   ═══════════════════════════════════════════════════════════ */
.portal-topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(10, 13, 30, 0.72);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border-2);
}
.portal-topbar-inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.portal-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.portal-brand-logo { height: 38px; width: auto; }
.portal-brand-text { line-height: 1.1; }
.portal-brand-name {
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  color: var(--ink);
}
.portal-brand-name-accent {
  background: var(--grad-signature);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.portal-brand-tag {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--muted);
  margin-top: 2px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.portal-topbar-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  justify-content: center;
}
.portal-topbar-link {
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  border-radius: 8px;
  transition: color 0.12s ease, background 0.12s ease;
}
.portal-topbar-link:hover { color: var(--ink); background: rgba(255, 255, 255, 0.05); }
.portal-topbar-link.active {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px var(--border);
}

.portal-topbar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.portal-user-info {
  text-align: right;
  line-height: 1.2;
}
.portal-user-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
}
.portal-user-role {
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.portal-user-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pq-teal) 0%, var(--pq-violet) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35);
}

/* ═══════════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════════ */
.portal-hero {
  position: relative;
  border-bottom: 1px solid var(--border-2);
  overflow: hidden;
}
.portal-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
  opacity: 0.5;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 40%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 40%, #000 30%, transparent 100%);
}
.portal-hero-inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 60px 32px 48px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.portal-hero-date {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--pq-teal);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.portal-hero-date::before {
  content: '';
  width: 24px; height: 2px;
  border-radius: 2px;
  background: var(--grad-signature);
}
.portal-hero-title {
  font-family: 'Source Serif Pro', Georgia, serif;
  font-size: clamp(2rem, 4vw, 3.1rem);
  font-weight: 700;
  line-height: 1.08;
  margin: 0 0 18px;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.portal-hero-title-accent {
  display: block;
  font-style: italic;
  font-weight: 600;
  background: var(--grad-signature);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.portal-hero-desc {
  font-size: 0.96rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 540px;
  margin: 0;
}

.portal-stat-card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-2);
  padding: 18px 16px;
  text-align: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.portal-stat-card:hover { border-color: var(--border-3); transform: translateY(-2px); }
.portal-stat-card-accent {
  border-color: rgba(20, 184, 166, 0.4);
  background: linear-gradient(160deg, rgba(20, 184, 166, 0.18) 0%, rgba(59, 130, 246, 0.08) 100%);
  box-shadow: 0 0 0 1px rgba(20, 184, 166, 0.2), 0 8px 26px rgba(20, 184, 166, 0.16);
}
.portal-stat-value {
  font-family: 'Source Serif Pro', Georgia, serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 4px;
}
.portal-stat-card-accent .portal-stat-value {
  background: linear-gradient(135deg, #2dd4bf 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.portal-stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ═══════════════════════════════════════════════════════════
   SEARCH BAR
   ═══════════════════════════════════════════════════════════ */
.portal-searchbar {
  background: rgba(10, 13, 30, 0.6);
  border-bottom: 1px solid var(--border-2);
  position: sticky;
  top: 68px;
  z-index: 20;
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
}
.portal-searchbar-inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  gap: 20px;
  align-items: center;
}
.portal-search-wrap {
  position: relative;
  flex: 1;
  max-width: 560px;
}
.portal-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-2);
  font-size: 0.88rem;
  pointer-events: none;
}
.portal-search {
  width: 100%;
  padding: 11px 44px 11px 40px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.12s, box-shadow 0.12s, background 0.12s;
}
.portal-search:focus {
  border-color: var(--pq-teal);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.22);
}
.portal-search::placeholder { color: var(--muted-2); }
.portal-search-kbd {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-family: 'Inter', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 2px 8px;
  pointer-events: none;
}

.portal-legend {
  display: flex;
  gap: 16px;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
}
.portal-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.portal-legend-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
}
.portal-legend-dot-on { background: var(--pq-teal); box-shadow: 0 0 8px rgba(20, 184, 166, 0.6); }
.portal-legend-dot-off { background: var(--muted-3); }
.portal-legend-dot-locked { background: transparent; box-shadow: inset 0 0 0 2px var(--muted-3); }

/* Botón global colapsar/expandir todo */
.portal-toggle-all {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 9px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
}
.portal-toggle-all:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--border-3);
  color: var(--ink);
}
.portal-toggle-all:active { transform: translateY(1px); }
.portal-toggle-all i { font-size: 0.72rem; color: var(--pq-teal); }

/* ═══════════════════════════════════════════════════════════
   MAIN
   ═══════════════════════════════════════════════════════════ */
.portal-main {
  max-width: 1360px;
  margin: 0 auto;
  padding: 40px 32px 80px;
}

.portal-empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius-2);
  background: rgba(255, 255, 255, 0.02);
}

/* ═══════════════════════════════════════════════════════════
   GROUPS — acento por categoría
   ═══════════════════════════════════════════════════════════ */
.portal-group { margin-bottom: 44px; }
.portal-group:last-child { margin-bottom: 0; }

.portal-group[data-group="admin-finanzas"]      { --acc: #14b8a6; --acc-2: #0d7377; --acc-rgb: 20, 184, 166; }
.portal-group[data-group="compras-inventario"]  { --acc: #3b82f6; --acc-2: #2563eb; --acc-rgb: 59, 130, 246; }
.portal-group[data-group="operaciones"]         { --acc: #8b5cf6; --acc-2: #7c3aed; --acc-rgb: 139, 92, 246; }
.portal-group[data-group="ingenieria"]          { --acc: #06b6d4; --acc-2: #0891b2; --acc-rgb: 6, 182, 212; }
.portal-group[data-group="ventas"]              { --acc: #f5a623; --acc-2: #ea580c; --acc-rgb: 245, 166, 35; }
.portal-group[data-group="proyectos-especiales"]{ --acc: #ec4899; --acc-2: #db2777; --acc-rgb: 236, 72, 153; }
.portal-group[data-group="gerencia"]            { --acc: #6366f1; --acc-2: #4f46e5; --acc-rgb: 99, 102, 241; }
.portal-group[data-group="soporte"]             { --acc: #10b981; --acc-2: #059669; --acc-rgb: 16, 185, 129; }

/* Cabecera de área = panel definido, con color/borde/sombra propios del área.
   Se lee claro como bloque clickeable (sobre todo en modo colapsado). */
.portal-group-head {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 0 0 18px;
  padding: 15px 20px;
  border: 1px solid rgba(var(--acc-rgb), 0.24);
  border-left: 3px solid var(--acc);
  background:
    linear-gradient(100deg, rgba(var(--acc-rgb), 0.14) 0%, rgba(var(--acc-rgb), 0.04) 44%, rgba(255, 255, 255, 0.015) 100%),
    rgba(13, 18, 38, 0.55);
  border-radius: 14px;
  box-shadow:
    0 8px 22px -12px rgba(0, 0, 0, 0.75),
    0 2px 6px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  cursor: pointer;
  text-align: left;
  position: relative;
  transition: border-color 0.16s ease, box-shadow 0.18s ease, transform 0.14s ease;
}
.portal-group-head:hover {
  border-color: rgba(var(--acc-rgb), 0.55);
  box-shadow:
    0 14px 30px -12px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(var(--acc-rgb), 0.28),
    0 8px 22px -14px rgba(var(--acc-rgb), 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  transform: translateY(-1px);
}
.portal-group-head:focus-visible {
  outline: 2px solid rgba(var(--acc-rgb), 0.65);
  outline-offset: 2px;
}
.portal-group.is-collapsed .portal-group-head { margin-bottom: 10px; }

.portal-group-meta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.portal-group-chevron {
  width: 30px; height: 30px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--acc);
  font-size: 0.78rem;
  background: rgba(var(--acc-rgb), 0.10);
  border: 1px solid rgba(var(--acc-rgb), 0.26);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1), background 0.16s ease;
}
.portal-group-head:hover .portal-group-chevron { background: rgba(var(--acc-rgb), 0.20); }
.portal-group.is-collapsed .portal-group-chevron { transform: rotate(-90deg); }

/* Cuerpo colapsable: grid-template-rows 1fr↔0fr anima suave */
.portal-group-body {
  display: grid;
  grid-template-rows: 1fr;
  opacity: 1;
  transition: grid-template-rows 0.34s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.28s ease;
}
.portal-group.is-collapsed .portal-group-body {
  grid-template-rows: 0fr;
  opacity: 0;
}
.portal-group-inner {
  overflow: hidden;
  min-height: 0;
}
.portal-group.is-collapsed { margin-bottom: 16px; }

/* ── Peek: chips de módulos visibles solo con el área colapsada ── */
.portal-group-peek { display: none; }
.portal-group.is-collapsed .portal-group-peek {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  padding: 2px 6px 4px;
}
/* Los chips entran en cascada (como el tablero de la app), no todos de golpe. */
.portal-group.is-collapsed .portal-group-peek .portal-peek-chip {
  animation: portalPeekIn 0.36s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.portal-group-peek .portal-peek-chip:nth-child(1)  { animation-delay: 0.02s; }
.portal-group-peek .portal-peek-chip:nth-child(2)  { animation-delay: 0.05s; }
.portal-group-peek .portal-peek-chip:nth-child(3)  { animation-delay: 0.08s; }
.portal-group-peek .portal-peek-chip:nth-child(4)  { animation-delay: 0.11s; }
.portal-group-peek .portal-peek-chip:nth-child(5)  { animation-delay: 0.14s; }
.portal-group-peek .portal-peek-chip:nth-child(6)  { animation-delay: 0.17s; }
.portal-group-peek .portal-peek-chip:nth-child(7)  { animation-delay: 0.20s; }
.portal-group-peek .portal-peek-chip:nth-child(8)  { animation-delay: 0.23s; }
.portal-group-peek .portal-peek-chip:nth-child(9)  { animation-delay: 0.26s; }
.portal-group-peek .portal-peek-chip:nth-child(10) { animation-delay: 0.29s; }
.portal-group-peek .portal-peek-chip:nth-child(n+11) { animation-delay: 0.32s; }
@keyframes portalPeekIn {
  from { opacity: 0; translate: 0 8px; }
  to   { opacity: 1; translate: 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .portal-group.is-collapsed .portal-group-peek .portal-peek-chip { animation: none; }
}
.portal-peek-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.79rem;
  font-weight: 600;
  color: var(--ink-2);
  /* Relieve 3D sutil: cara con luz arriba + canto oscuro abajo. */
  background: linear-gradient(180deg, rgba(var(--acc-rgb), 0.17) 0%, rgba(var(--acc-rgb), 0.07) 100%);
  border: 1px solid rgba(var(--acc-rgb), 0.26);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 1px 2px rgba(0, 0, 0, 0.28);
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}
.portal-peek-chip i { font-size: 0.74rem; color: var(--acc); transition: color 0.16s ease; }
.portal-peek-chip:hover {
  background: linear-gradient(135deg, var(--acc) 0%, var(--acc-2) 100%);
  border-color: transparent;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 8px 20px rgba(var(--acc-rgb), 0.45);
}
.portal-peek-chip:active { transform: translateY(0); box-shadow: 0 2px 6px rgba(var(--acc-rgb), 0.35); }
.portal-peek-chip:hover i { color: #fff; }

.portal-peek-chip-soon {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  border-color: var(--border);
}
.portal-peek-chip-soon i { color: var(--amber); }
.portal-peek-chip-soon:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-3);
  color: var(--ink);
  box-shadow: none;
}
.portal-peek-chip-soon:hover i { color: var(--amber); }

.portal-peek-chip-locked {
  color: var(--muted-2);
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--border-2);
  cursor: not-allowed;
  opacity: 0.72;
}
.portal-peek-chip-locked i { color: var(--muted-3); }
.portal-peek-chip-locked:hover {
  transform: none;
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--border-2);
  color: var(--muted-2);
  box-shadow: none;
}
.portal-peek-chip-locked:hover i { color: var(--muted-3); }
.portal-group-title {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1.16rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.portal-group-icon {
  width: 40px; height: 40px;
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(var(--acc-rgb), 0.30) 0%, rgba(var(--acc-rgb), 0.12) 100%);
  border: 1px solid rgba(var(--acc-rgb), 0.42);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--acc);
  font-size: 1.05rem;
  box-shadow: 0 4px 14px rgba(var(--acc-rgb), 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.portal-group-count {
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(var(--acc-rgb), 0.09);
  border: 1px solid rgba(var(--acc-rgb), 0.22);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.portal-group-count strong {
  color: var(--acc);
  font-weight: 800;
}

/* ═══════════════════════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════════════════════ */
.portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}

.portal-card {
  position: relative;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.055) 0%, rgba(255, 255, 255, 0.015) 100%),
    rgba(14, 18, 38, 0.55);
  border: 1px solid var(--border);
  border-radius: var(--radius-2);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 150px;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28),
              0 14px 30px -16px rgba(0, 0, 0, 0.6),
              inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.15s ease,
              box-shadow 0.18s ease;
  overflow: hidden;
  /* Entrada escalonada; usa la propiedad `translate` (no `transform`)
     para no chocar con el translateY del hover. */
  animation: portalCardIn 0.42s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: calc(var(--i, 0) * 38ms);
}
@keyframes portalCardIn {
  from { opacity: 0; translate: 0 12px; }
  to   { opacity: 1; translate: 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .portal-card { animation: none; }
}
.portal-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 280px 180px at top right, rgba(var(--acc-rgb), 0.18), transparent 70%);
  pointer-events: none;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.portal-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: linear-gradient(180deg, var(--acc) 0%, var(--acc-2) 100%);
  opacity: 0.9;
}
.portal-card:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--acc-rgb), 0.6);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5),
              0 8px 28px rgba(var(--acc-rgb), 0.22),
              0 0 0 1px rgba(var(--acc-rgb), 0.3);
}
.portal-card:hover::before { opacity: 1; }
.portal-card:active { transform: translateY(-1px); }

.portal-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 1;
}
.portal-card-icon {
  flex-shrink: 0;
  width: 52px; height: 52px;
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(var(--acc-rgb), 0.32) 0%, rgba(var(--acc-rgb), 0.14) 100%);
  border: 1px solid rgba(var(--acc-rgb), 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.35rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16),
              0 4px 14px rgba(var(--acc-rgb), 0.24);
  transition: transform 0.18s ease;
}
.portal-card:hover .portal-card-icon { transform: scale(1.06); }
.portal-card-title {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.005em;
  color: var(--ink);
  line-height: 1.25;
  margin-bottom: 3px;
}
.portal-card-slug {
  font-size: 0.68rem;
  color: var(--muted-2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  font-family: ui-monospace, 'SF Mono', monospace;
}
.portal-card-desc {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
  position: relative;
  z-index: 1;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.portal-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--border-2);
  position: relative;
  z-index: 1;
}
.portal-card-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--acc);
  letter-spacing: 0.03em;
}
.portal-card-status::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--acc);
  box-shadow: 0 0 8px rgba(var(--acc-rgb), 0.7);
}
.portal-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--acc);
  padding: 7px 13px;
  border-radius: 9px;
  border: 1px solid rgba(var(--acc-rgb), 0.35);
  background: rgba(var(--acc-rgb), 0.10);
  transition: color 0.16s, background 0.16s, border-color 0.16s, box-shadow 0.16s, transform 0.16s;
}
.portal-card:hover .portal-card-cta {
  color: #fff;
  background: linear-gradient(135deg, var(--acc) 0%, var(--acc-2) 100%);
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(var(--acc-rgb), 0.42);
}
.portal-card:hover .portal-card-cta i { transform: translateX(3px); }
.portal-card-cta i { transition: transform 0.15s; }

/* Estado "En desarrollo" — neutral, sin acento. Atenuamos vía superficie,
   no con opacity fuerte sobre el texto (preserva contraste WCAG AA). */
.portal-card-soon {
  opacity: 0.86;
}
.portal-card-soon::after {
  background: linear-gradient(180deg, var(--muted-3) 0%, rgba(255, 255, 255, 0.08) 100%);
  opacity: 0.5;
}
.portal-card-soon::before {
  background: radial-gradient(ellipse 280px 180px at top right, rgba(141, 168, 200, 0.10), transparent 70%);
  opacity: 0.4;
}
.portal-card-soon:hover {
  opacity: 1;
  transform: translateY(-2px);
  border-color: var(--border-3);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}
.portal-card-soon .portal-card-icon {
  background: linear-gradient(135deg, rgba(141, 168, 200, 0.10) 0%, rgba(141, 168, 200, 0.04) 100%);
  border-color: rgba(141, 168, 200, 0.22);
  color: var(--muted);
}
.portal-card-soon:hover .portal-card-icon { transform: none; }
.portal-card-soon .portal-card-status {
  color: var(--amber);
}
.portal-card-soon .portal-card-status::before {
  background: var(--amber);
  box-shadow: 0 0 6px rgba(255, 181, 71, 0.5);
}
/* Las tarjetas "En desarrollo" ahora también navegan, así que el CTA
   resalta en hover igual que las disponibles (regla normal de arriba). */

/* ── Tarjeta BLOQUEADA (sin permiso) — apagada, no navega ──────── */
.portal-card-locked {
  cursor: not-allowed;
  filter: grayscale(0.7) brightness(0.82);
  opacity: 0.72;
}
.portal-card-locked::after {
  background: linear-gradient(180deg, var(--muted-3) 0%, rgba(255, 255, 255, 0.06) 100%);
  opacity: 0.35;
}
.portal-card-locked::before {
  background: radial-gradient(ellipse 280px 180px at top right, rgba(141, 168, 200, 0.08), transparent 70%);
  opacity: 0.3;
}
.portal-card-locked:hover {
  transform: none;
  border-color: var(--border);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28), 0 14px 30px -16px rgba(0, 0, 0, 0.6);
}
.portal-card-locked:hover::before { opacity: 0.3; }
.portal-card-locked .portal-card-icon {
  background: linear-gradient(135deg, rgba(141, 168, 200, 0.10) 0%, rgba(141, 168, 200, 0.04) 100%);
  border-color: rgba(141, 168, 200, 0.20);
  color: var(--muted);
}
.portal-card-locked:hover .portal-card-icon { transform: none; }
/* Candado sobre el ícono */
.portal-card-locked .portal-card-icon::after {
  content: '\f023'; /* fa-lock */
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  bottom: -5px; right: -5px;
  width: 20px; height: 20px;
  font-size: 0.6rem;
  border-radius: 50%;
  background: #1a2036;
  border: 1px solid var(--border-3);
  color: var(--muted-2);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
}
.portal-card-locked .portal-card-icon { position: relative; overflow: visible; }
.portal-card-locked .portal-card-status { color: var(--muted-2); }
.portal-card-locked .portal-card-status::before {
  background: transparent;
  box-shadow: inset 0 0 0 2px var(--muted-3);
}
/* CTA se convierte en "Sin acceso" neutro, sin hover-fill */
.portal-card-locked .portal-card-cta {
  color: var(--muted-2);
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border);
}
.portal-card-locked:hover .portal-card-cta {
  color: var(--muted-2);
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border);
  box-shadow: none;
}
.portal-card-locked:hover .portal-card-cta i { transform: none; }

/* ═══════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════ */
.portal-footer {
  background: rgba(10, 13, 30, 0.5);
  border-top: 1px solid var(--border-2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  margin-top: 40px;
}
.portal-footer-inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 36px 32px 28px;
  display: grid;
  grid-template-columns: 1.2fr auto auto;
  gap: 40px;
  align-items: center;
}
.portal-footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.portal-footer-logo { height: 32px; width: auto; opacity: 0.85; }
.portal-footer-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink-2);
  letter-spacing: -0.005em;
}
.portal-footer-muted {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 2px;
}
.portal-footer-links {
  display: flex;
  gap: 22px;
}
.portal-footer-link {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: color 0.12s;
}
.portal-footer-link:hover { color: var(--pq-teal); }
.portal-footer-copy {
  font-size: 0.72rem;
  color: var(--muted-2);
  text-align: right;
  grid-column: 1 / -1;
  padding-top: 18px;
  margin-top: 10px;
  border-top: 1px solid var(--border-2);
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 980px) {
  .portal-hero-inner {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 40px 24px 32px;
  }
  .portal-footer-inner {
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: left;
  }
  .portal-footer-copy { text-align: left; }
}

@media (max-width: 720px) {
  .portal-topbar-inner { padding: 12px 16px; gap: 12px; }
  .portal-topbar-nav { display: none; }
  .portal-user-info { display: none; }
  .portal-brand-tag { display: none; }
  .portal-hero-inner { padding: 32px 20px 28px; }
  .portal-hero-title { font-size: 1.8rem; }
  .portal-hero-desc { font-size: 0.88rem; }
  .portal-stat-card { padding: 12px 8px; }
  .portal-stat-value { font-size: 1.6rem; }
  .portal-stat-label { font-size: 0.6rem; }
  .portal-searchbar-inner { padding: 12px 16px; gap: 12px; flex-wrap: wrap; }
  .portal-search-kbd { display: none; }
  .portal-legend { font-size: 0.68rem; gap: 10px; }
  .portal-main { padding: 24px 16px 40px; }
  .portal-group-title { font-size: 1.05rem; gap: 10px; }
  .portal-group-icon { width: 34px; height: 34px; font-size: 0.9rem; }
  .portal-grid { grid-template-columns: 1fr; gap: 12px; }
  .portal-card { padding: 16px; min-height: 0; }
  .portal-card-icon { width: 44px; height: 44px; font-size: 1.1rem; }
  .portal-footer-inner { padding: 24px 16px 20px; }
  .portal-footer-links { flex-wrap: wrap; gap: 14px; }
}

/* Suprime overlays de password managers */
input:not([type="password"])::-webkit-credentials-auto-fill-button,
input:not([type="password"])::-webkit-contacts-auto-fill-button {
  visibility: hidden !important;
  pointer-events: none !important;
  position: absolute !important;
  right: 0 !important;
}

/* ═══════════════════════════════════════════════════════════
   TOP BAR — cluster derecho (Ir a…, reloj, usuario)
   ═══════════════════════════════════════════════════════════ */
.portal-topbar-side {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.portal-cmdk-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px 8px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-2);
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.14), rgba(139, 92, 246, 0.14));
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.18s ease, transform 0.12s ease;
}
.portal-cmdk-btn i { color: var(--pq-teal); font-size: 0.82rem; }
.portal-cmdk-btn:hover {
  border-color: rgba(20, 184, 166, 0.5);
  box-shadow: 0 6px 20px -8px rgba(20, 184, 166, 0.5);
  transform: translateY(-1px);
}
.portal-cmdk-kbd {
  font-family: 'Inter', monospace;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 2px 6px;
}
.portal-clock {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  padding: 7px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-2);
}
.portal-clock i { color: var(--pq-cyan); font-size: 0.8rem; }

/* ═══════════════════════════════════════════════════════════
   HERO — acciones + cockpit (dona radial + KPIs)
   ═══════════════════════════════════════════════════════════ */
.portal-hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 26px;
  flex-wrap: wrap;
}
.portal-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 18px;
  font-size: 0.86rem;
  font-weight: 700;
  color: #fff;
  border-radius: 11px;
  cursor: pointer;
  border: 1px solid transparent;
  background: linear-gradient(120deg, #14b8a6 0%, #3b82f6 52%, #8b5cf6 100%);
  background-size: 180% 100%;
  box-shadow: 0 10px 26px -10px rgba(59, 130, 246, 0.6);
  transition: background-position 0.5s ease, transform 0.14s ease, box-shadow 0.18s ease;
}
.portal-hero-cta:hover {
  background-position: 100% 0;
  transform: translateY(-2px);
  box-shadow: 0 16px 34px -10px rgba(139, 92, 246, 0.6);
}
.portal-hero-cta kbd {
  font-family: 'Inter', monospace;
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.22);
  border-radius: 5px;
  padding: 2px 6px;
}
.portal-hero-cta-ghost {
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border);
  box-shadow: none;
}
.portal-hero-cta-ghost:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--border-3);
  box-shadow: none;
}

.portal-cockpit {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 26px;
  align-items: center;
  padding: 26px;
  border-radius: 22px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.015) 100%),
    rgba(12, 17, 36, 0.5);
  border: 1px solid var(--border);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  box-shadow: 0 20px 60px -24px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.portal-cockpit-dial {
  position: relative;
  width: 168px; height: 168px;
  flex-shrink: 0;
}
.portal-dial { width: 100%; height: 100%; transform: rotate(-90deg); }
.portal-dial-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.07);
  stroke-width: 14;
}
.portal-dial-value {
  fill: none;
  stroke: url(#dialGrad);
  stroke-width: 14;
  stroke-linecap: round;
  stroke-dasharray: 527.79;
  stroke-dashoffset: 527.79;
  filter: drop-shadow(0 0 6px rgba(59, 130, 246, 0.55));
  transition: stroke-dashoffset 1.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.portal-dial-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.portal-dial-pct {
  font-family: 'Source Serif Pro', Georgia, serif;
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(135deg, #2dd4bf 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-variant-numeric: tabular-nums;
}
.portal-dial-cap {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
}
.portal-cockpit-stats {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.portal-cockpit-stats .portal-stat-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  text-align: left;
  padding: 12px 16px;
}
.portal-cockpit-stats .portal-stat-value {
  font-size: 1.9rem;
  margin-bottom: 0;
  order: 2;
}
.portal-cockpit-stats .portal-stat-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: 0.82rem;
  order: 1;
}
.portal-cockpit-stats .portal-stat-label i { color: var(--pq-teal); }
.portal-cockpit-stats [data-tone="soon"] .portal-stat-label i { color: var(--amber); }
.portal-cockpit-stats [data-tone="total"] .portal-stat-label i { color: var(--pq-blue); }

/* ═══════════════════════════════════════════════════════════
   ACCESOS RÁPIDOS — favoritos + recientes
   ═══════════════════════════════════════════════════════════ */
.portal-quick {
  border-bottom: 1px solid var(--border-2);
  background: rgba(10, 13, 30, 0.35);
}
.portal-quick-inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.portal-quick-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.portal-quick-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  flex-shrink: 0;
  min-width: 116px;
}
.portal-quick-row#portal-quick-fav .portal-quick-label i { color: var(--amber); }
.portal-quick-row#portal-quick-recent .portal-quick-label i { color: var(--pq-cyan); }
.portal-quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.portal-quick-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-2);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}
.portal-quick-chip i { font-size: 0.78rem; color: var(--pq-teal); }
.portal-quick-chip:hover {
  transform: translateY(-2px);
  border-color: var(--border-3);
  color: var(--ink);
  box-shadow: 0 8px 20px -8px rgba(59, 130, 246, 0.5);
}

/* ═══════════════════════════════════════════════════════════
   SPOTLIGHT + BOTÓN FAVORITO en tarjetas
   ═══════════════════════════════════════════════════════════ */
/* Glow que sigue al cursor (posición vía --mx/--my seteadas en JS) */
.portal-card-spot {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  z-index: 0;
  background: radial-gradient(220px 220px at var(--mx, 50%) var(--my, 0%), rgba(var(--acc-rgb), 0.22), transparent 60%);
  transition: opacity 0.25s ease;
}
.portal-card:hover .portal-card-spot { opacity: 1; }

.portal-fav {
  position: absolute;
  top: 12px; right: 12px;
  z-index: 2;
  width: 30px; height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  color: var(--muted-2);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-2);
  cursor: pointer;
  font-size: 0.8rem;
  opacity: 0;
  transition: opacity 0.16s ease, color 0.16s ease, background 0.16s ease, transform 0.14s ease;
}
.portal-card:hover .portal-fav { opacity: 1; }
.portal-fav:hover { color: var(--amber); background: rgba(245, 166, 35, 0.14); transform: scale(1.1); }
.portal-fav.is-fav {
  opacity: 1;
  color: var(--amber);
  background: rgba(245, 166, 35, 0.14);
  border-color: rgba(245, 166, 35, 0.4);
}
.portal-fav.is-fav i { font-weight: 900; }

/* ═══════════════════════════════════════════════════════════
   PALETA DE COMANDOS (⌘K)
   ═══════════════════════════════════════════════════════════ */
.portal-cmdk-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
  background: rgba(6, 9, 22, 0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: cmdkFade 0.16s ease;
}
.portal-cmdk-overlay[hidden] { display: none; }
@keyframes cmdkFade { from { opacity: 0; } to { opacity: 1; } }
.portal-cmdk-panel {
  width: min(640px, 92vw);
  max-height: 68vh;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(20, 27, 52, 0.98), rgba(12, 16, 36, 0.98));
  border: 1px solid var(--border-3);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(59, 130, 246, 0.14);
  animation: cmdkRise 0.2s cubic-bezier(0.2, 0.7, 0.2, 1);
}
@keyframes cmdkRise { from { opacity: 0; transform: translateY(-12px) scale(0.98); } to { opacity: 1; transform: none; } }
.portal-cmdk-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-2);
}
.portal-cmdk-head > i { color: var(--pq-teal); font-size: 1rem; }
.portal-cmdk-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--ink);
  font-size: 1.05rem;
  font-family: inherit;
}
.portal-cmdk-input::placeholder { color: var(--muted-2); }
.portal-cmdk-esc {
  font-family: 'Inter', monospace;
  font-size: 0.68rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 3px 7px;
}
.portal-cmdk-list {
  overflow-y: auto;
  padding: 8px;
  flex: 1;
}
.portal-cmdk-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 10px 12px;
  border-radius: 11px;
  cursor: pointer;
  color: var(--ink-2);
}
.portal-cmdk-item i.portal-cmdk-item-icon {
  width: 34px; height: 34px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  font-size: 0.9rem;
  color: #fff;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.3), rgba(139, 92, 246, 0.22));
  border: 1px solid var(--border);
}
.portal-cmdk-item-body { flex: 1; min-width: 0; }
.portal-cmdk-item-name { font-size: 0.9rem; font-weight: 600; color: var(--ink); }
.portal-cmdk-item-meta { font-size: 0.72rem; color: var(--muted); margin-top: 1px; }
.portal-cmdk-item-badge {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--pq-teal);
  background: rgba(20, 184, 166, 0.12);
  border: 1px solid rgba(20, 184, 166, 0.28);
}
.portal-cmdk-item-badge.is-soon { color: var(--amber); background: rgba(245, 166, 35, 0.12); border-color: rgba(245, 166, 35, 0.28); }
.portal-cmdk-item.is-active,
.portal-cmdk-item:hover {
  background: linear-gradient(100deg, rgba(59, 130, 246, 0.18), rgba(139, 92, 246, 0.1));
}
.portal-cmdk-empty {
  padding: 30px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}
.portal-cmdk-foot {
  display: flex;
  gap: 18px;
  padding: 11px 18px;
  border-top: 1px solid var(--border-2);
  font-size: 0.72rem;
  color: var(--muted-2);
}
.portal-cmdk-foot kbd {
  font-family: 'Inter', monospace;
  font-size: 0.64rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  margin-right: 3px;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — nuevos bloques
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 980px) {
  .portal-cockpit { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .portal-cockpit-stats { width: 100%; }
}
@media (max-width: 720px) {
  .portal-cmdk-btn span { display: none; }
  .portal-clock { display: none; }
  .portal-hero-actions { margin-top: 20px; }
  .portal-hero-cta { flex: 1; justify-content: center; }
  .portal-cockpit { padding: 18px; }
  .portal-quick-inner { padding: 12px 16px; }
  .portal-quick-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .portal-quick-label { min-width: 0; }
}
