:root {
    --portal-bg: #060913;
    --portal-bg-soft: #0b1326;
    --portal-card: rgba(15, 23, 42, 0.75);
    --portal-card-hover: rgba(26, 38, 66, 0.85);
    --portal-ink: #f8fafc;
    --portal-muted: #94a3b8;
    --portal-line: rgba(255, 255, 255, 0.08);
    --portal-line-hover: rgba(99, 102, 241, 0.4);
    --portal-accent: #6366f1;
    --portal-accent-2: #06b6d4;
    --portal-accent-pink: #ec4899;
    --portal-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    --portal-blur: blur(16px);
}

/* Light Theme Variables & Component Overrides */
body.theme-light {
    --portal-bg: #f1f5f9;
    --portal-bg-soft: #e2e8f0;
    --portal-card: rgba(255, 255, 255, 0.85);
    --portal-card-hover: rgba(255, 255, 255, 0.98);
    --portal-ink: #0f172a;
    --portal-muted: #475569;
    --portal-line: rgba(0, 0, 0, 0.08);
    --portal-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
}

body.theme-light .portal-bg {
    background: radial-gradient(circle at 50% 0%, #e0e7ff 0%, #f1f5f9 100%);
}

body.theme-light .portal-topbar {
    background: rgba(255, 255, 255, 0.82);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.06);
}

body.theme-light .portal-brand strong {
    background: linear-gradient(120deg, #0f172a 0%, #334155 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.theme-light .portal-hero h1 {
    background: linear-gradient(135deg, #0f172a 30%, #4338ca 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.theme-light .portal-pill {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.1);
    color: #475569;
}

body.theme-light .portal-mode-bar {
    background: rgba(255, 255, 255, 0.75);
    border-color: rgba(0, 0, 0, 0.08);
}

body.theme-light .portal-mode-btn {
    background: rgba(241, 245, 249, 0.8);
    color: #475569;
    border-color: rgba(0, 0, 0, 0.1);
}

body.theme-light .portal-mode-btn:hover {
    background: rgba(99, 102, 241, 0.15);
    color: #4338ca;
}

body.theme-light .portal-sidebar-nav {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(0, 0, 0, 0.08);
}

body.theme-light .portal-sidebar-nav__item {
    color: #334155;
}

body.theme-light .portal-sidebar-nav__item:hover {
    background: rgba(99, 102, 241, 0.12);
    color: #4338ca;
}

body.theme-light .portal-search__input {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.12);
    color: #0f172a;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

body.theme-light .portal-card {
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.92), rgba(241, 245, 249, 0.96));
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 16px 35px -12px rgba(0, 0, 0, 0.08);
}

body.theme-light .portal-card__body h2 {
    color: #0f172a;
    background: none;
    -webkit-text-fill-color: initial;
}

body.theme-light .portal-card__body p {
    color: #475569;
}

body.theme-light .portal-card__tags span {
    background: rgba(226, 232, 240, 0.8);
    color: #334155;
    border-color: rgba(0, 0, 0, 0.1);
}

body.theme-light .portal-quick {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(0, 0, 0, 0.08);
}

body.theme-light .portal-quick__link {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(0, 0, 0, 0.08);
}

body.theme-light .portal-quick__text strong {
    color: #0f172a;
}

body.theme-light .portal-quick__text span {
    color: #64748b;
}

body.theme-light .portal-footer {
    border-color: rgba(0, 0, 0, 0.08);
    color: #64748b;
}

* { box-sizing: border-box; }

body.portal-page {
    min-height: 100vh;
    margin: 0;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--portal-ink);
    background: var(--portal-bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

/* Background Canvas & Ambient Orbs */
.portal-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    background: radial-gradient(circle at 50% 0%, #0c1833 0%, #060913 100%);
}

#portalCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.portal-bg__grid {
    position: absolute;
    inset: 0;
    z-index: 2;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 25%, transparent 80%);
}

.portal-bg__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.25;
    z-index: 0;
    animation: orb-float 20s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

.portal-bg__orb--1 {
    width: 500px;
    height: 500px;
    top: -150px;
    left: -100px;
    background: radial-gradient(circle, #6366f1, #3b82f6);
}

.portal-bg__orb--2 {
    width: 450px;
    height: 450px;
    top: 20%;
    right: -150px;
    background: radial-gradient(circle, #06b6d4, #10b981);
    animation-delay: -7s;
}

.portal-bg__orb--3 {
    width: 550px;
    height: 550px;
    bottom: -200px;
    left: 30%;
    background: radial-gradient(circle, #8b5cf6, #ec4899);
    animation-delay: -12s;
}

@keyframes orb-float {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(60px, 40px) scale(1.1); }
    100% { transform: translate(-40px, 80px) scale(0.95); }
}

/* Shell Layout */
.portal-shell {
    position: relative;
    z-index: 3;
    width: min(1480px, calc(100% - 2.5rem));
    margin: 0 auto;
    padding: clamp(1.2rem, 3vw, 2.2rem) 0 3rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Topbar */
.portal-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding: 0.95rem 1.4rem;
    border: 1px solid var(--portal-line);
    border-radius: 20px;
    background: rgba(11, 19, 38, 0.7);
    backdrop-filter: var(--portal-blur);
    -webkit-backdrop-filter: var(--portal-blur);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.portal-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.portal-brand__logo {
    height: 46px;
    width: auto;
    object-fit: contain;
    background: #ffffff;
    padding: 0.35rem 0.85rem;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.portal-brand__logo:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.portal-brand__icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.35rem;
    background: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.portal-brand strong {
    display: block;
    font-family: "Orbitron", "Inter", sans-serif;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    line-height: 1.2;
    background: linear-gradient(120deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.portal-brand span {
    color: var(--portal-accent-2);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.portal-topbar__meta {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.portal-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid var(--portal-line);
    border-radius: 999px;
    padding: 0.42rem 0.95rem;
    background: rgba(15, 23, 42, 0.8);
    color: var(--portal-muted);
    font-size: 0.75rem;
    font-weight: 700;
    backdrop-filter: blur(8px);
}

.portal-pill--live {
    color: #34d399;
    border-color: rgba(52, 211, 153, 0.3);
    background: rgba(6, 78, 59, 0.3);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7);
    animation: pulse-ring 1.8s infinite;
}

@keyframes pulse-ring {
    0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.portal-pill--time {
    color: #e2e8f0;
    font-variant-numeric: tabular-nums;
    font-family: monospace, sans-serif;
}

.portal-pill--secure {
    color: #818cf8;
    border-color: rgba(99, 102, 241, 0.3);
}

/* Barra Selector de Modos de Visualización */
.portal-mode-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.75rem;
    padding: 0.65rem 1.1rem;
    border-radius: 16px;
    border: 1px solid var(--portal-line);
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: var(--portal-blur);
    flex-wrap: wrap;
}

.portal-mode-bar__label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    font-weight: 800;
    color: #a5b4fc;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.portal-mode-bar__group {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.portal-mode-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.85rem;
    border-radius: 10px;
    border: 1px solid var(--portal-line);
    background: rgba(30, 41, 69, 0.4);
    color: var(--portal-muted);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.portal-mode-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    color: #ffffff;
    border-color: rgba(99, 102, 241, 0.4);
}

.portal-mode-btn.active {
    background: linear-gradient(135deg, #6366f1, #06b6d4);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.portal-mode-btn--theme {
    padding: 0.45rem 0.75rem;
    font-size: 0.95rem;
}

/* Layout Container (para Sidebar) */
.portal-layout-container {
    display: flex;
    gap: 1.75rem;
}

.portal-sidebar-nav {
    display: none;
    width: 280px;
    flex-shrink: 0;
    padding: 1.25rem;
    border-radius: 20px;
    border: 1px solid var(--portal-line);
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: var(--portal-blur);
    height: fit-content;
}

.portal-sidebar-nav__title {
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #818cf8;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.portal-sidebar-nav__list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.portal-sidebar-nav__item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.65rem 0.85rem;
    border-radius: 12px;
    color: var(--portal-ink);
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 700;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.portal-sidebar-nav__item:hover {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateX(4px);
}

.portal-layout-container.layout-mode-sidebar .portal-sidebar-nav {
    display: block;
}

.portal-layout-main {
    flex: 1;
    min-width: 0;
}

/* Hero Section */
.portal-hero {
    margin-bottom: 1.75rem;
    max-width: 820px;
}

.portal-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.75rem;
    padding: 0.38rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(99, 102, 241, 0.35);
    background: rgba(99, 102, 241, 0.12);
    color: #a5b4fc;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.15);
}

.portal-hero h1 {
    margin: 0 0 0.65rem;
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
    font-weight: 900;
    background: linear-gradient(135deg, #ffffff 30%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.portal-hero p {
    margin: 0;
    color: var(--portal-muted);
    font-size: 1rem;
    line-height: 1.6;
    max-width: 58ch;
}

/* Search Bar */
.portal-search {
    margin-bottom: 2rem;
}

.portal-search__inner {
    position: relative;
    max-width: 580px;
    display: flex;
    align-items: center;
}

.portal-search__inner .search-icon {
    position: absolute;
    left: 1.25rem;
    color: #818cf8;
    font-size: 1.15rem;
    pointer-events: none;
}

.portal-search__input {
    width: 100%;
    padding: 0.85rem 4.5rem 0.85rem 3.1rem;
    border-radius: 16px;
    border: 1px solid var(--portal-line);
    background: rgba(15, 23, 42, 0.75);
    color: var(--portal-ink);
    font-size: 0.92rem;
    font-family: inherit;
    backdrop-filter: var(--portal-blur);
    transition: all 0.25s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.portal-search__input::placeholder { color: #64748b; }

.portal-search__input:focus {
    outline: none;
    border-color: var(--portal-accent);
    background: rgba(20, 30, 55, 0.9);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2), 0 12px 35px rgba(0, 0, 0, 0.5);
}

.portal-search__clear {
    position: absolute;
    right: 3rem;
    display: none;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    cursor: pointer;
    font-size: 0.75rem;
    transition: background 0.2s;
}

.portal-search__clear:hover {
    background: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.portal-search__kbd {
    position: absolute;
    right: 1rem;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #94a3b8;
    font-size: 0.72rem;
    font-family: monospace;
    pointer-events: none;
}

.portal-search__hint {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    padding: 0 0.5rem;
    font-size: 0.75rem;
    color: #64748b;
}

.portal-search__count {
    color: var(--portal-accent-2);
    font-weight: 700;
}

/* Empty State */
.portal-empty {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 1.5rem;
    border-radius: 20px;
    border: 1px dashed var(--portal-line);
    background: rgba(15, 23, 42, 0.4);
    margin-bottom: 2rem;
}

.portal-empty__icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #818cf8;
    background: rgba(99, 102, 241, 0.1);
    margin-bottom: 1rem;
}

.portal-empty h3 {
    margin: 0 0 0.35rem;
    font-size: 1.2rem;
    color: #f1f5f9;
}

.portal-empty p {
    margin: 0;
    color: var(--portal-muted);
    font-size: 0.9rem;
}

/* Section Labels */
.portal-section-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0 0 1.25rem;
}

.portal-section-label span {
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #a5b4fc;
}

.portal-section-label__line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.3), transparent);
}

/* ----------------------------------------------------
   MODOS DE VISUALIZACIÓN EN SISTEMAS (.portal-systems)
------------------------------------------------------- */
.portal-systems {
    margin-bottom: 2.5rem;
    transition: all 0.3s ease;
}

/* MODOS: 1. MODO CUADRÍCULA (GRID) */
.portal-systems.view-mode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

/* MODOS: 2. MODO LISTA COMPACTA (LIST) */
.portal-systems.view-mode-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.portal-systems.view-mode-list .portal-card {
    min-height: auto;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.4rem;
}

.portal-systems.view-mode-list .portal-card__head {
    margin-bottom: 0;
    flex-shrink: 0;
}

.portal-systems.view-mode-list .portal-card__icon {
    width: 44px;
    height: 44px;
    font-size: 1.25rem;
}

.portal-systems.view-mode-list .portal-card__badges {
    display: none;
}

.portal-systems.view-mode-list .portal-card__body {
    margin: 0 1.5rem;
}

.portal-systems.view-mode-list .portal-card__body h2 {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.portal-systems.view-mode-list .portal-card__body p {
    font-size: 0.82rem;
}

.portal-systems.view-mode-list .portal-card__tags {
    display: none;
}

.portal-systems.view-mode-list .portal-card__cta {
    width: auto;
    margin-top: 0;
    padding: 0.55rem 1rem;
    flex-shrink: 0;
}

/* MODOS: 3. MODO SIDEBAR (Grid ajustado) */
.portal-systems.view-mode-sidebar {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.1rem;
}

/* MODOS: 4. MODO TARJETAS HERO (HERO CARDS) */
.portal-systems.view-mode-hero {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(440px, 1fr));
    gap: 1.75rem;
}

.portal-systems.view-mode-hero .portal-card {
    min-height: 360px;
    padding: 2rem;
}

.portal-systems.view-mode-hero .portal-card__icon {
    width: 68px;
    height: 68px;
    font-size: 2rem;
    border-radius: 20px;
}

.portal-systems.view-mode-hero .portal-card__body h2 {
    font-size: 1.6rem;
    margin-bottom: 0.75rem;
}

.portal-systems.view-mode-hero .portal-card__body p {
    font-size: 0.96rem;
    line-height: 1.65;
}

/* Card Base Styles */
.portal-card {
    --card-accent: #6366f1;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 290px;
    padding: 1.5rem;
    border-radius: 22px;
    border: 1px solid var(--portal-line);
    background: linear-gradient(165deg, rgba(15, 23, 42, 0.85), rgba(11, 18, 34, 0.95));
    backdrop-filter: var(--portal-blur);
    -webkit-backdrop-filter: var(--portal-blur);
    color: var(--portal-ink);
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.js-tilt-glare,
.js-tilt-glare-inner,
.portal-card__glow {
    pointer-events: none !important;
}

.portal-card__glow {
    position: absolute;
    inset: -1px;
    border-radius: 23px;
    padding: 1px;
    background: linear-gradient(135deg, var(--card-accent), transparent 60%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.4;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.portal-card:hover {
    border-color: rgba(99, 102, 241, 0.5);
    border-color: color-mix(in srgb, var(--card-accent) 60%, transparent);
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.5);
    box-shadow: 0 25px 60px -15px color-mix(in srgb, var(--card-accent) 30%, transparent);
}

.portal-card:hover .portal-card__glow {
    opacity: 1;
}

.portal-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.85rem;
    margin-bottom: 1.15rem;
}

.portal-card__icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--card-accent);
    background: rgba(99, 102, 241, 0.15);
    background: color-mix(in srgb, var(--card-accent) 15%, transparent);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border: 1px solid color-mix(in srgb, var(--card-accent) 30%, transparent);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    box-shadow: 0 8px 20px color-mix(in srgb, var(--card-accent) 20%, transparent);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.portal-card:hover .portal-card__icon {
    transform: scale(1.1) translateZ(10px);
}

.portal-card__badges {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.4rem;
}

.portal-card__num {
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    color: #64748b;
}

.portal-card__external {
    font-size: 0.64rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: rgba(6, 182, 212, 0.15);
    color: #2dd4bf;
    border: 1px solid rgba(6, 182, 212, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.portal-card__body {
    flex: 1;
}

.portal-card__body h2 {
    margin: 0 0 0.5rem;
    font-size: clamp(1.2rem, 2.2vw, 1.45rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    font-weight: 800;
    color: #ffffff;
    transition: color 0.2s;
}

.portal-card__body p {
    margin: 0;
    color: var(--portal-muted);
    font-size: 0.88rem;
    line-height: 1.55;
}

.portal-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 1rem;
}

.portal-card__tags span {
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.6);
    color: #94a3b8;
    font-size: 0.68rem;
    font-weight: 700;
    transition: all 0.2s;
}

.portal-card:hover .portal-card__tags span {
    border-color: rgba(99, 102, 241, 0.3);
    border-color: color-mix(in srgb, var(--card-accent) 30%, transparent);
    color: #cbd5e1;
}

.portal-card__cta {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: 1.25rem;
    padding: 0.8rem 1.1rem;
    border-radius: 14px;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 800;
    background: var(--card-accent);
    background: linear-gradient(135deg, var(--card-accent), color-mix(in srgb, var(--card-accent) 65%, #060913));
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    box-shadow: 0 10px 25px color-mix(in srgb, var(--card-accent) 25%, transparent);
    transition: all 0.25s ease;
}

.portal-card:hover .portal-card__cta {
    box-shadow: 0 14px 32px color-mix(in srgb, var(--card-accent) 40%, transparent);
}

.portal-card__cta i {
    font-size: 1.1rem;
    transition: transform 0.25s ease;
}

.portal-card:hover .portal-card__cta i {
    transform: translateX(5px);
}

/* Quick Links Grid */
.portal-quick {
    margin-bottom: 2rem;
    padding: 1.4rem;
    border-radius: 24px;
    border: 1px solid var(--portal-line);
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: var(--portal-blur);
}

.portal-quick__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.75rem;
}

.portal-quick__link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: 16px;
    border: 1px solid var(--portal-line);
    background: rgba(15, 23, 42, 0.7);
    color: var(--portal-ink);
    text-decoration: none;
    transition: all 0.25s ease;
}

.portal-quick__link:hover {
    background: rgba(30, 41, 69, 0.85);
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.portal-quick__icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.portal-quick__icon.tool-blue { color: #60a5fa; background: rgba(96, 165, 250, 0.15); }
.portal-quick__icon.tool-dark { color: #cbd5e1; background: rgba(148, 163, 184, 0.15); }
.portal-quick__icon.tool-orange { color: #fb923c; background: rgba(251, 146, 60, 0.15); }
.portal-quick__icon.tool-green { color: #34d399; background: rgba(52, 211, 153, 0.15); }
.portal-quick__icon.tool-navy { color: #7dd3fc; background: rgba(27, 58, 92, 0.4); }
.portal-quick__icon.tool-teal { color: #2dd4bf; background: rgba(45, 212, 191, 0.15); }
.portal-quick__icon.tool-red { color: #f87171; background: rgba(248, 113, 113, 0.15); }

.portal-quick__text {
    flex: 1;
}

.portal-quick__text strong {
    display: block;
    font-size: 0.88rem;
    font-weight: 800;
    line-height: 1.2;
    color: #f1f5f9;
}

.portal-quick__text span {
    display: block;
    margin-top: 0.1rem;
    color: var(--portal-muted);
    font-size: 0.74rem;
    font-weight: 600;
}

.portal-quick__arrow {
    color: #64748b;
    font-size: 0.9rem;
    transition: transform 0.2s, color 0.2s;
}

.portal-quick__link:hover .portal-quick__arrow {
    color: #818cf8;
    transform: translateX(3px);
}

/* Footer */
.portal-footer {
    margin-top: auto;
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 600;
    border-top: 1px solid var(--portal-line);
}

.portal-footer__brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.portal-footer__brand i {
    color: var(--portal-accent-2);
}

.portal-footer__dev {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.portal-footer__badge {
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    font-size: 0.68rem;
    font-weight: 800;
    border: 1px solid rgba(99, 102, 241, 0.25);
}

/* Responsividad */
@media (max-width: 1024px) {
    .portal-layout-container {
        flex-direction: column;
    }
    .portal-sidebar-nav {
        width: 100%;
    }
    .portal-systems.view-mode-hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .portal-shell {
        width: min(100% - 1.5rem, 1480px);
    }

    .portal-topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .portal-topbar__meta {
        justify-content: flex-start;
        width: 100%;
    }

    .portal-systems.view-mode-list .portal-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .portal-systems.view-mode-list .portal-card__body {
        margin: 0.75rem 0;
    }

    .portal-systems.view-mode-list .portal-card__cta {
        width: 100%;
    }

    .portal-footer {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}
