
@keyframes swipeHintChild {
    0% { transform: translateX(0); }
    25% { transform: translateX(-25px); }
    50% { transform: translateX(0); }
    75% { transform: translateX(-12px); }
    100% { transform: translateX(0); }
}


@keyframes flashGlow {
    0% { box-shadow: 0 0 0 0 rgba(41, 151, 255, 0), inset 0 0 0 0 rgba(41, 151, 255, 0); }
    30% { box-shadow: 0 0 35px 8px rgba(41, 151, 255, 0.7), inset 0 0 15px 2px rgba(41, 151, 255, 0.4); }
    100% { box-shadow: 0 0 0 0 rgba(41, 151, 255, 0), inset 0 0 0 0 rgba(41, 151, 255, 0); }
}
.flash-effect {
    animation: flashGlow 1.2s cubic-bezier(0.1, 0.8, 0.3, 1) !important;
}

/* Pages CSS */

/* === Methodology Timeline Section === */
.timeline-section {
    padding-top: calc(var(--header-height) + 60px);
    padding-bottom: 6rem;
    position: relative;
}

.timeline-section .section-header {
    margin-bottom: 4rem;
    position: sticky;
    top: var(--header-height, 80px);
    z-index: 50;
    background: var(--color-bg-secondary);
    padding: 2rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05); /* optional to give it a nice edge */
}

/* Solid shield above the sticky header to block content bleeding through the navbar */
.timeline-section .section-header::before {
    content: '';
    position: absolute;
    top: calc(-1 * var(--header-height, 70px));
    left: -9999px;
    right: -9999px;
    height: var(--header-height, 70px);
    background: #051125;
    pointer-events: none;
    z-index: 1;
}

.timeline-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 0;
}

/* Línea Central Base */
.timeline-track {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-50%);
    border-radius: 2px;
}

/* Línea Central que se ilumina con JS (Progreso) */
.timeline-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%; /* JS controlará esto */
    background: var(--color-accent);
    box-shadow: 0 0 15px var(--color-accent), 0 0 30px var(--color-accent);
    border-radius: 2px;
    transition: height 2s cubic-bezier(0.22, 1, 0.36, 1); /* Slower and smoother */
}

/* Items individuales (Izquierda y Derecha) */
.timeline-item {
    position: relative;
    width: 50%;
    padding: 0 3rem;
    margin-bottom: 40vh; /* Increased from 3rem to force more scrolling */
    display: flex;
    flex-direction: column;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item.left {
    left: 0;
    align-items: flex-end;
    text-align: right;
}

/* KEY FIX: use margin-left instead of left so position:sticky can take over */
.timeline-item.right {
    margin-left: 50%;
    align-items: flex-start;
    text-align: left;
}

/* Card stacking — Global (Desktop & Mobile) */
.timeline-section .timeline-container {
    /* Extra padding at the bottom so the last card has time to stay sticky */
    padding-bottom: 15vh;
}

.timeline-section .timeline-item {
    position: sticky !important;
    top: calc(var(--header-height, 80px) + 240px) !important;
}

/* Incremental z-index so newer cards always cover older ones */
.timeline-item:nth-child(2) { z-index: 2; }
.timeline-item:nth-child(3) { z-index: 3; }
.timeline-item:nth-child(4) { z-index: 4; }
.timeline-item:nth-child(5) { z-index: 5; }
.timeline-item:nth-child(6) { z-index: 6; }
.timeline-item:nth-child(7) { z-index: 7; }
.timeline-item:nth-child(8) { z-index: 8; }
.timeline-item:nth-child(9) { z-index: 9; }
.timeline-item:nth-child(10) { z-index: 10; }
.timeline-item:nth-child(11) { z-index: 11; }
.timeline-item:nth-child(12) { z-index: 12; }

/* Fix CSS collision from activity timeline */
.timeline-section .timeline-item::before {
    display: none !important;
}

/* Punto indicador iluminado */
.timeline-dot {
    position: absolute;
    top: 30px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--color-bg-primary);
    border: 3px solid rgba(255, 255, 255, 0.3);
    z-index: 2;
    transition: all 0.5s ease;
}

.timeline-item.left .timeline-dot {
    right: -8px;
}

.timeline-item.right .timeline-dot {
    left: -8px;
}

/* Efecto cuando el punto entra en pantalla (.is-visible desde JS) */
.timeline-item.is-visible .timeline-dot {
    background: var(--color-accent);
    border-color: #fff;
    box-shadow: 0 0 15px var(--color-accent);
}

/* Tarjeta Glassmorphic */
.timeline-content {
    position: relative;
    width: 100%;
    max-width: 400px;
    padding: 2.5rem 2rem !important; /* !important to fix collision with activity-timeline */
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 140px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
}

.step-number {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.05);
    position: absolute;
    top: 0;
    right: 20px;
    line-height: 1;
    pointer-events: none;
}

.timeline-item.left .step-number {
    right: auto;
    left: 20px;
}

.step-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-text-primary);
    position: relative;
    z-index: 1;
}

.step-desc {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85); /* Improved contrast for readability */
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

@media (max-width: 900px) {
    .timeline-track {
        left: 20px !important;
        transform: none !important;
    }
    
    .timeline-item,
    .timeline-item.left,
    .timeline-item.right,
    .timeline-section .timeline-item,
    .timeline-section .timeline-item.left,
    .timeline-section .timeline-item.right {
        width: 100% !important;
        padding-left: 60px !important;
        padding-right: 0 !important;
        align-items: flex-start !important;
        text-align: left !important;
        left: 0 !important;
        margin-left: 0 !important;
        top: calc(var(--header-height, 60px) + 210px) !important;
    }
    
    .timeline-item.left .timeline-dot,
    .timeline-item.right .timeline-dot,
    .timeline-section .timeline-item.left .timeline-dot,
    .timeline-section .timeline-item.right .timeline-dot {
        left: 12px !important;
        right: auto !important;
    }

    .step-number,
    .timeline-section .step-number,
    .timeline-section .timeline-item.left .step-number {
        right: 20px !important;
        left: auto !important;
    }

    .timeline-content,
    .timeline-section .timeline-content {
        max-width: 100% !important;
    }
}


/* Contact Form */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.form-control {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    /* Smooth rounding for inputs */
    padding: 1.2rem;
    color: var(--color-text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

select.form-control:invalid {
    color: var(--color-text-secondary);
}

select.form-control option {
    color: var(--color-text-primary);
    background-color: var(--color-bg-secondary);
}

select.form-control option[value=""] {
    color: var(--color-text-secondary);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-accent);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 4px rgba(41, 151, 255, 0.1);
}

textarea.form-control {
    min-height: 160px;
    resize: vertical;
}

/* Contact Grid Layout */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Research Listing */
.research-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.research-item {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all var(--transition-fast);
}

.research-item:hover {
    background: var(--glass-bg-hover);
    transform: scale(1.01);
}

.research-item-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.research-item-link:hover {
    background: var(--glass-bg-hover);
    transform: scale(1.01);
    border-color: rgba(255, 255, 255, 0.15);
}

.research-meta {
    font-size: 0.85rem;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    background: rgba(41, 151, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-pill);
    white-space: nowrap;
    text-align: center;
    min-width: 120px;
}

/* Process Page Phases (process.html) */
.process-phase {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 3rem;
    backdrop-filter: blur(20px);
}

.process-phase h2 {
    font-size: 2rem;
}

/* Our Story Read More Toggle */
.read-more-content {
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.read-more-content.is-expanded {
    display: block;
    opacity: 1;
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.read-more-btn {
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--color-text-secondary);
    background: transparent;
    transition: all 0.3s ease;
}

.read-more-btn:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    background: rgba(41, 151, 255, 0.05);
}

/* Our Developers - expandable cards */
.developers-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin-top: 2.5rem;
}

.developer-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
    flex: 0 1 500px;
}

.developer-card.is-expanded {
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.developer-card-trigger {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 1.25rem 1.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: inherit;
    font-family: inherit;
    font-size: 1rem;
    text-align: left;
    transition: background 0.2s;
}

.developer-card-trigger:hover {
    background: rgba(255, 255, 255, 0.04);
}

.developer-card-trigger .developer-name {
    flex: 1;
    font-weight: 600;
    color: var(--color-text-primary);
}

.developer-card-arrow {
    font-size: 0.7rem;
    opacity: 0.6;
    transition: transform 0.3s;
}

.developer-card.is-expanded .developer-card-arrow {
    transform: rotate(180deg);
}

.developer-photo {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    position: relative;
    z-index: 1;
    overflow: visible;
    /* Changed to allow glow to bleed out */
    background: linear-gradient(135deg, rgba(41, 151, 255, 0.25), rgba(225, 225, 229, 0.15));
    border: 2px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.developer-photo::before {
    content: '';
    display: inline-block;
    inset: -15px;
    background: radial-gradient(circle, rgba(40, 151, 255, 0.45) 0%, transparent 75%);
    border-radius: 50%;
    z-index: -1;
    filter: blur(15px);
    opacity: 0.7;
    animation: glowPulse 3s ease-in-out infinite alternate;
}

.developer-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    /* Ensure image stays circular since photo is now overflow visible */
    display: block;
}

.developer-initials {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text-primary);
    letter-spacing: 0.02em;
}

.developer-card-detail {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s ease-out;
}

.developer-card.is-expanded .developer-card-detail {
    grid-template-rows: 1fr;
}

.developer-card-detail-inner {
    overflow: hidden;
    min-height: 0;
}

.developer-card-detail-inner p {
    margin: 0 1.5rem 1rem 1.5rem;
    padding: 0;
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--color-text-secondary);
}

.developer-card-detail-inner p:first-child {
    padding-top: 0.25rem;
}

.developer-card-detail-inner p:last-child {
    margin-bottom: 1.5rem;
}

/* Guiding Principles Grid */
.guiding-principles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .guiding-principles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================================================
   DANIEL MORALES — PERFIL EJECUTIVO / CV (arquitectura tipo LinkedIn)

   Dos trampas que explican por qué la página se veía rota y hay que respetar:

   1. Las tarjetas son <section>, y `section { padding: var(--space-xl) 0 }` de
      components.css les metía 128 px muertos arriba y abajo A CADA UNA. Se veía
      como si el contenido «flotara» en tarjetas vacías y la página medía casi
      6000 px. El reset de `.profile-card` de abajo es obligatorio: si se quita,
      vuelve el hueco.
   2. La portada NO usa imagen de fondo. La versión anterior pedía
      `Images/bento-bg.jpg`, que no existe en el repositorio, así que el 404 se
      veía como una banda negra. El degradado es puro CSS a propósito.

   El desplegable es <details>/<summary> nativo: no necesita JS (la CSP permite
   inline, pero un perfil que solo se abre con JS es un perfil que no se puede
   imprimir ni indexar bien).
   ========================================================================== */

.profile-layout-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 1128px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 992px) {
    .profile-layout-grid {
        grid-template-columns: minmax(0, 1fr) 320px;
        align-items: start;
        gap: 1.75rem;
    }
}

.profile-main,
.profile-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 0;
}

@media (min-width: 992px) {
    .profile-sidebar {
        position: sticky;
        top: 96px;
        max-height: calc(100vh - 120px);
        overflow-y: auto;
        scrollbar-width: thin;
        overscroll-behavior: contain;
    }
}

/* --------------------------------------------------------------------------
   Sistema de tarjetas
   -------------------------------------------------------------------------- */

.profile-card {
    /* Ver nota 1 de la cabecera: neutraliza `section { padding: 8rem 0 }`. */
    padding: 0;
    background: rgba(9, 16, 30, 0.72);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 8px 28px rgba(0, 5, 20, 0.35);
}

.profile-card-padding {
    padding: 1.25rem;
}

@media (min-width: 768px) {
    .profile-card-padding {
        padding: 1.75rem 2rem;
    }
}

.profile-card-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.profile-card-title {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--color-platinum);
    margin: 0;
    line-height: 1.3;
}

.profile-card-note {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin: 0;
}

/* --------------------------------------------------------------------------
   Portada: cabecera del Europass
   -------------------------------------------------------------------------- */

/* La portada es la imagen de marca (1640×624). Se sirve en WebP —13 KB frente
   a los 321 KB del PNG— y va como fondo, no como <img>: es decoración, no
   contenido, y así el recorte lo hace `cover` sin deformarla.

   `aspect-ratio` con `max-height` mantiene la proporción del arte hasta el
   tope: a lo ancho de la columna principal recorta ~13 % arriba y abajo, y el
   arte vive en el centro (la λ empieza al 24 % y el texto acaba al 77 %), así
   que nunca se corta nada. */
/* Portada: la imagen de marca de «Estandares/PORTADAS», encuadrada en la λ.
   Se sirve en WebP —5,6 KB frente a los 321 KB del PNG— y va de fondo, no como
   <img>: es decoración, no contenido.

   El encuadre no es un capricho. Todas las portadas del manual llevan la marca
   centrada con «ELYSIUM λ DEVELOPMENT & RESEARCH» debajo, y en esta plantilla
   el avatar se apoya abajo a la izquierda: con cualquiera de ellas completa,
   la cara tapa el arranque del texto y se lee «…YSIUM λ DEVELOPMENT». Cortando
   por encima del texto (filas 99–445 del original de 1640×624) la λ queda
   centrada, el avatar se apoya sobre fondo limpio y no se parte nada. El
   nombre de la marca no se pierde: está en la barra de navegación y en la
   insignia que va junto al nombre.

   `aspect-ratio` es la del recorte, así que la λ sale igual a cualquier ancho. */
.profile-intro-cover {
    aspect-ratio: 1640 / 346;
    position: relative;
    border-bottom: 1px solid var(--glass-border);
    background:
        url('../Images/Optimized/elysium-cover-1640.webp') center / cover no-repeat,
        linear-gradient(135deg, #071633 0%, #0a1e44 45%, #05101f 100%);
    overflow: hidden;
}

/* Velo hacia la esquina del avatar, para que se apoye sobre fondo sólido. */
.profile-intro-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, rgba(2, 6, 16, 0.8) 0%, rgba(2, 6, 16, 0.3) 24%, transparent 44%);
    pointer-events: none;
}

.profile-intro-body {
    padding: 0 1.25rem 1.5rem;
}

@media (min-width: 768px) {
    .profile-intro-body {
        padding: 0 2rem 1.75rem;
    }
}

.profile-intro-avatar-wrapper {
    margin-top: -68px;
    margin-bottom: 0.9rem;
    position: relative;
    display: inline-block;
    line-height: 0;
}

.profile-intro-avatar {
    width: 132px;
    height: 132px;
    border-radius: 50%;
    border: 4px solid #0a1428;
    background-color: #0a1428;
    object-fit: cover;
    display: block;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

@media (min-width: 768px) {
    .profile-intro-avatar-wrapper {
        margin-top: -80px;
    }

    .profile-intro-avatar {
        width: 152px;
        height: 152px;
    }
}

.profile-intro-name-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    margin-bottom: 0.3rem;
}

.profile-intro-name {
    font-size: 1.55rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #fff;
    margin: 0;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .profile-intro-name {
        font-size: 1.85rem;
    }
}

.profile-intro-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-pill);
    background: rgba(41, 151, 255, 0.14);
    border: 1px solid rgba(41, 151, 255, 0.35);
    color: var(--color-accent);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
}

a.profile-intro-badge:hover {
    background: rgba(41, 151, 255, 0.24);
    color: #fff;
}

.profile-intro-headline {
    font-size: 1.02rem;
    color: var(--color-text-primary);
    margin: 0 0 0.35rem 0;
    font-weight: 400;
    line-height: 1.45;
}

.profile-intro-location {
    font-size: 0.88rem;
    color: var(--color-text-muted);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.profile-intro-location a {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 600;
}

.profile-intro-location a:hover {
    text-decoration: underline;
}

.profile-intro-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.15rem;
}

.btn-profile-primary,
.btn-profile-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1.15rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    white-space: nowrap;
    transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.btn-profile-primary {
    background: var(--color-accent);
    color: #fff;
    border: 1px solid var(--color-accent);
}

.btn-profile-primary:hover {
    background: #1e7bce;
    border-color: #1e7bce;
    color: #fff;
}

.btn-profile-secondary {
    background: transparent;
    color: var(--color-accent);
    border: 1px solid rgba(41, 151, 255, 0.5);
}

.btn-profile-secondary:hover {
    background: rgba(41, 151, 255, 0.12);
    border-color: var(--color-accent);
    color: #fff;
}

/* Bloque de identidad: es literalmente la cabecera del Europass, y va abierto
   siempre — no detrás de un clic. */
.profile-identity {
    margin-top: 1.5rem;
    padding-top: 1.35rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-identity-title {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin: 0 0 1rem 0;
}

.profile-identity-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.9rem 1.75rem;
    margin: 0;
}

/* Dos columnas y no tres: a tres, «daniel.morales@elysiumdr.eu» y la URL de
   LinkedIn no caben y se parten a mitad de palabra. */
@media (min-width: 560px) {
    .profile-identity-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* El icono es un ::before para que <dl> solo contenga <div>, <dt> y <dd>:
   un <span> ahí dentro es HTML inválido. */
.profile-identity-item {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    column-gap: 0.7rem;
    align-items: start;
    min-width: 0;
}

.profile-identity-item::before {
    content: attr(data-icon);
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: rgba(41, 151, 255, 0.1);
    border: 1px solid rgba(41, 151, 255, 0.22);
    color: var(--color-accent);
    font-size: 0.85rem;
    line-height: 1;
}

.profile-identity-label {
    grid-column: 2;
    grid-row: 1;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 0.12rem;
}

.profile-identity-value {
    grid-column: 2;
    grid-row: 2;
    margin: 0;
    font-size: 0.9rem;
    color: var(--color-text-primary);
    line-height: 1.35;
    overflow-wrap: break-word;
}

.profile-identity-value a {
    color: var(--color-text-primary);
    text-decoration: none;
    border-bottom: 1px solid rgba(41, 151, 255, 0.4);
}

.profile-identity-value a:hover {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
}

/* --------------------------------------------------------------------------
   Texto corrido
   -------------------------------------------------------------------------- */

.profile-text-body {
    font-size: 0.94rem;
    line-height: 1.65;
    color: var(--color-text-secondary);
}

.profile-text-body p {
    margin: 0 0 0.9rem 0;
}

.profile-text-body p:last-child {
    margin-bottom: 0;
}

.profile-text-body strong {
    color: var(--color-text-primary);
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   Entradas desplegables (experiencia, formación, certificaciones)
   -------------------------------------------------------------------------- */

.profile-feed-list {
    display: flex;
    flex-direction: column;
}

.profile-entry {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-entry:last-child {
    border-bottom: none;
}

.profile-entry-head {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    padding: 1.15rem 0;
    cursor: pointer;
    list-style: none;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

.profile-entry:first-child > .profile-entry-head {
    padding-top: 0;
}

.profile-entry:last-child:not([open]) > .profile-entry-head {
    padding-bottom: 0;
}

.profile-entry-head::-webkit-details-marker {
    display: none;
}

.profile-entry-head:hover .profile-entry-title,
.profile-entry-head:focus-visible .profile-entry-title {
    color: var(--color-accent);
}

.profile-entry-head:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 4px;
}

.profile-entry-logo {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: var(--color-accent);
    font-size: 1.15rem;
    font-weight: 700;
    overflow: hidden;
}

.profile-entry-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.profile-entry-heading {
    flex: 1;
    min-width: 0;
    display: block;
}

.profile-entry-title {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.35;
    transition: color var(--transition-fast);
}

.profile-entry-subtitle {
    display: block;
    font-size: 0.9rem;
    color: var(--color-text-primary);
    line-height: 1.4;
    margin-top: 0.1rem;
}

.profile-entry-meta {
    display: block;
    font-size: 0.82rem;
    color: var(--color-text-muted);
    line-height: 1.4;
    margin-top: 0.12rem;
}

.profile-entry-teaser {
    display: block;
    font-size: 0.86rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
    margin-top: 0.5rem;
}

.profile-entry[open] .profile-entry-teaser {
    display: none;
}

.profile-entry-chevron {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--color-text-muted);
    border: 1px solid transparent;
    transition: transform var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.profile-entry-chevron::before {
    content: "";
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
}

.profile-entry-head:hover .profile-entry-chevron {
    color: var(--color-accent);
    border-color: rgba(41, 151, 255, 0.35);
}

.profile-entry[open] > .profile-entry-head .profile-entry-chevron {
    transform: rotate(180deg);
    color: var(--color-accent);
}

.profile-entry-body {
    padding: 0 0 1.25rem 0;
}

@media (min-width: 560px) {
    .profile-entry-body {
        padding-left: calc(46px + 0.9rem);
    }
}

.profile-entry-points {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.profile-entry-points li {
    position: relative;
    padding-left: 1.1rem;
    font-size: 0.89rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
}

.profile-entry-points li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.62em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--color-accent);
}

.profile-entry-points strong {
    color: var(--color-text-primary);
    font-weight: 600;
}

.profile-entry-note {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
    margin: 0.9rem 0 0 0;
}

.profile-entry-note strong {
    color: var(--color-text-primary);
    font-weight: 600;
}

.profile-entry-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.9rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-accent);
    text-decoration: none;
}

.profile-entry-link:hover {
    text-decoration: underline;
}

.profile-entry-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.9rem;
}

/* Animación de apertura donde el navegador la soporta; donde no, abre y cierra
   de golpe, que es el comportamiento nativo correcto. */
@supports selector(::details-content) {
    /* Sin `interpolate-size` no se puede animar hacia `auto` y la apertura da un
       salto seco. Va acotado a la entrada, no en :root: es heredable y afectaría
       a las transiciones de todo el sitio. */
    .profile-entry {
        interpolate-size: allow-keywords;
    }

    .profile-entry::details-content {
        block-size: 0;
        overflow: hidden;
        opacity: 0;
        transition: block-size var(--transition-medium), opacity var(--transition-fast), content-visibility var(--transition-medium) allow-discrete;
        content-visibility: hidden;
    }

    .profile-entry[open]::details-content {
        block-size: auto;
        opacity: 1;
        content-visibility: visible;
    }
}

@media (prefers-reduced-motion: reduce) {
    .profile-entry::details-content,
    .profile-entry-chevron {
        transition: none;
    }
}

/* --------------------------------------------------------------------------
   Proyectos — espejo de portfolio.html (ver JS/profile-projects.js)

   Filas, no rejilla de tarjetas. Toda la página es una columna de filas
   «miniatura a la izquierda, contenido a la derecha» —experiencia, formación,
   certificaciones—, y una parrilla de capturas grandes rompía ese ritmo: las
   capturas son fotos de webs ajenas, con sus colores saturados, y a ese tamaño
   pesaban más que el contenido del perfil. Aquí van contenidas: miniatura
   pequeña, ligeramente apagada en reposo y a todo color al pasar por encima.
   -------------------------------------------------------------------------- */

.profile-projects-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.profile-project {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 0.9rem;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.025);
    transition: border-color var(--transition-fast), background var(--transition-fast);
}

@media (min-width: 620px) {
    .profile-project {
        grid-template-columns: 148px minmax(0, 1fr);
        gap: 1.15rem;
        padding: 0.9rem;
    }
}

.profile-project:hover {
    border-color: rgba(41, 151, 255, 0.4);
    background: rgba(41, 151, 255, 0.05);
}

/* Sin fondo ni `border` propios: con `overflow: hidden` y esquina redondeada,
   el borde se dibuja fuera del recorte y entre él y la imagen asomaba una
   media luna del fondo oscuro del contenedor — las «esquinas negras». El
   redondeo lo hereda el propio bitmap y el filo lo da una sombra interior,
   que se pinta encima de la imagen y por tanto no deja costura. */
.profile-project-thumb {
    display: block;
    aspect-ratio: 16 / 10;
    border-radius: 10px;
    overflow: hidden;
    background: transparent;
}

.profile-project-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top left;
    display: block;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
    /* Las capturas vienen con los colores de cada marca; apagarlas un punto
       las integra en el azul de la página sin desvirtuarlas. */
    filter: saturate(0.8) brightness(0.85);
    transition: filter var(--transition-medium), transform var(--transition-medium);
}

.profile-project:hover .profile-project-thumb img {
    filter: none;
    transform: scale(1.03);
}

/* Solo el hueco sin captura necesita fondo propio. */
.profile-project-thumb.is-blank {
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #071633, #05101f);
    box-shadow: inset 0 0 0 1px var(--glass-border);
    color: rgba(41, 151, 255, 0.5);
    font-size: 1.6rem;
}

.profile-project-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.profile-project-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.98rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
    line-height: 1.3;
}

.profile-project-title a {
    color: inherit;
    text-decoration: none;
}

.profile-project-title a:hover {
    color: var(--color-accent);
}

.profile-project-place {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--color-accent);
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    background: rgba(41, 151, 255, 0.1);
    border: 1px solid rgba(41, 151, 255, 0.25);
    white-space: nowrap;
}

.profile-project-desc {
    font-size: 0.84rem;
    line-height: 1.5;
    color: var(--color-text-secondary);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.profile-project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.15rem;
}

.profile-project-tags a {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.18rem 0.55rem;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: border-color var(--transition-fast), color var(--transition-fast);
}

.profile-project-tags a:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* Esqueleto mientras llega portfolio.html: misma altura que una fila real,
   para que la tarjeta no dé un salto al rellenarse. */
.profile-project-skeleton {
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    height: 112px;
    background: linear-gradient(100deg, rgba(255, 255, 255, 0.02) 30%, rgba(255, 255, 255, 0.06) 50%, rgba(255, 255, 255, 0.02) 70%);
    background-size: 250% 100%;
    animation: profileSkeleton 1.4s ease-in-out infinite;
}

@keyframes profileSkeleton {
    from { background-position: 150% 0; }
    to   { background-position: -50% 0; }
}

@media (prefers-reduced-motion: reduce) {
    .profile-project-skeleton {
        animation: none;
    }

    .profile-project:hover .profile-project-thumb img {
        transform: none;
    }
}

.profile-projects-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 1.15rem;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--color-accent);
    text-decoration: none;
}

.profile-projects-cta:hover {
    text-decoration: underline;
}

@media (max-width: 619px) {
    .profile-project-title {
        font-size: 0.9rem;
    }

    .profile-project-desc {
        font-size: 0.79rem;
    }

    .profile-project-skeleton {
        height: 96px;
    }
}

/* --------------------------------------------------------------------------
   Credenciales: títulos, diplomas y certificados
   -------------------------------------------------------------------------- */

.profile-credentials {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 1rem;
}

.profile-credential {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
}

.profile-credential-icon {
    flex-shrink: 0;
    width: 32px;
    height: 40px;
    border-radius: 4px;
    display: grid;
    place-items: center;
    background: rgba(41, 151, 255, 0.1);
    border: 1px solid rgba(41, 151, 255, 0.25);
    color: var(--color-accent);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.profile-credential-text {
    flex: 1;
    min-width: 0;
}

.profile-credential-name {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--color-text-primary);
    line-height: 1.35;
}

.profile-credential-note {
    display: block;
    font-size: 0.78rem;
    color: var(--color-text-muted);
    line-height: 1.4;
    margin-top: 0.1rem;
}

.profile-credential-action {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.8rem;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(41, 151, 255, 0.5);
    color: var(--color-accent);
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.profile-credential-action:hover {
    background: rgba(41, 151, 255, 0.14);
    color: #fff;
}

/* Hueco reservado: la entrada existe, el documento todavía no. */
.profile-credential.is-pending {
    border-style: dashed;
    border-color: rgba(225, 225, 229, 0.18);
    background: transparent;
}

.profile-credential.is-pending .profile-credential-icon {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(225, 225, 229, 0.18);
    border-style: dashed;
    color: var(--color-text-muted);
}

.profile-credential.is-pending .profile-credential-name {
    color: var(--color-text-secondary);
    font-weight: 500;
}

.profile-credential-status {
    flex-shrink: 0;
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius-pill);
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--color-gold);
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}

/* En móvil el botón no cabe al lado del texto: en flex solo lo encogía hasta
   dejar el nombre del título en cuatro líneas. Baja a su propia fila. */
@media (max-width: 559px) {
    .profile-credential {
        display: grid;
        grid-template-columns: 32px minmax(0, 1fr);
        column-gap: 0.75rem;
        row-gap: 0.7rem;
        align-items: start;
    }

    .profile-credential-icon {
        grid-area: 1 / 1;
    }

    .profile-credential-text {
        grid-area: 1 / 2;
    }

    .profile-credential-action,
    .profile-credential-status {
        grid-area: 2 / 2;
        justify-self: start;
    }
}

/* --------------------------------------------------------------------------
   Competencias
   -------------------------------------------------------------------------- */

.profile-skill-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.75rem;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-text-primary);
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.5;
}

.profile-skill-groups {
    display: flex;
    flex-direction: column;
    gap: 1.35rem;
}

.profile-skill-group-title {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin: 0 0 0.7rem 0;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.profile-skill-group-years {
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    color: var(--color-accent);
}

.profile-skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* --------------------------------------------------------------------------
   Idiomas: rejilla MCER
   -------------------------------------------------------------------------- */

.profile-cefr-wrapper {
    overflow-x: auto;
    scrollbar-width: thin;
    margin: 0 -0.25rem;
    padding: 0 0.25rem;
}

/* `table-layout: fixed` reparte las cinco destrezas en columnas iguales; en
   automático cada una toma el ancho de su encabezado y los niveles quedan
   desalineados entre sí. */
.profile-cefr {
    width: 100%;
    min-width: 480px;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 0.83rem;
}

.profile-cefr th:first-child,
.profile-cefr td:first-child {
    width: 24%;
}

.profile-cefr caption {
    caption-side: top;
    text-align: left;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    padding-bottom: 0.85rem;
}

.profile-cefr caption strong {
    color: var(--color-text-primary);
    font-weight: 600;
}

.profile-cefr th,
.profile-cefr td {
    padding: 0.6rem 0.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.profile-cefr thead th {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    line-height: 1.35;
    text-transform: uppercase;
    color: var(--color-text-muted);
    vertical-align: bottom;
}

.profile-cefr tbody th {
    text-align: left;
    font-weight: 600;
    color: var(--color-text-primary);
    white-space: nowrap;
}

.profile-cefr tbody tr:last-child th,
.profile-cefr tbody tr:last-child td {
    border-bottom: none;
}

.profile-cefr-level {
    display: inline-block;
    min-width: 2.2rem;
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
    background: rgba(41, 151, 255, 0.12);
    border: 1px solid rgba(41, 151, 255, 0.28);
    color: var(--color-accent);
    font-weight: 600;
    font-size: 0.78rem;
}

.profile-cefr-legend {
    font-size: 0.76rem;
    color: var(--color-text-muted);
    line-height: 1.5;
    margin: 0.9rem 0 0 0;
}

/* --------------------------------------------------------------------------
   Barra lateral
   -------------------------------------------------------------------------- */

.profile-widget {
    background: rgba(9, 16, 30, 0.72);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.profile-widget-title {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin: 0 0 1rem 0;
}

.profile-lang-switcher {
    display: flex;
    flex-direction: column;
}

.profile-lang-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.55rem 0;
    color: var(--color-text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: color var(--transition-fast);
}

.profile-lang-option:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.profile-lang-option:hover {
    color: var(--color-accent);
}

.profile-lang-option.active {
    color: var(--color-accent);
    font-weight: 600;
}

.profile-lang-option .flag-icon {
    width: 1.1em;
    height: auto;
    vertical-align: middle;
}

.profile-quick-facts {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.profile-fact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.profile-fact-item a {
    color: var(--color-text-secondary);
    text-decoration: none;
    border-bottom: 1px solid rgba(41, 151, 255, 0.35);
}

.profile-fact-item a:hover {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
}

.profile-fact-icon {
    flex-shrink: 0;
    width: 20px;
    text-align: center;
    color: var(--color-accent);
    font-size: 0.9rem;
    line-height: 1.55;
}

.profile-widget-cta {
    display: block;
    margin-top: 1rem;
    padding: 0.6rem 1rem;
    border-radius: var(--radius-pill);
    background: rgba(41, 151, 255, 0.12);
    border: 1px solid rgba(41, 151, 255, 0.4);
    color: var(--color-accent);
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.profile-widget-cta:hover {
    background: rgba(41, 151, 255, 0.22);
    color: #fff;
}

/* --------------------------------------------------------------------------
   Impresión: el perfil es un CV, así que tiene que salir entero en papel.
   -------------------------------------------------------------------------- */

@media print {
    .navbar,
    footer,
    #elysium-preloader,
    .profile-sidebar,
    .profile-intro-actions,
    .profile-entry-chevron {
        display: none !important;
    }

    .profile-entry-body,
    .profile-entry::details-content {
        display: block !important;
        block-size: auto !important;
        opacity: 1 !important;
        content-visibility: visible !important;
    }

    .profile-entry-teaser {
        display: none !important;
    }

    .profile-card {
        background: none;
        border-color: #ccc;
        box-shadow: none;
        break-inside: avoid;
    }
}

/* Developer Link Card */
.developer-card-link {
    display: block;
    text-decoration: none;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s cubic-bezier(0.25, 1, 0.5, 1), background-color 0.4s ease, border-color 0.4s ease;
}

.cv-tech-stack {
    margin-top: 1.25rem;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.cv-tech-stack strong {
    color: var(--color-text-primary);
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.75rem;
}

.developer-card-link .developer-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    padding: 1.5rem;
}

@media (min-width: 480px) {
    .developer-card-link .developer-card-content {
        flex-direction: row;
        align-items: center;
        text-align: left;
        gap: 2rem;
        padding: 2rem 2.5rem;
    }
}

.developer-card-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
}

.developer-card-link:hover .developer-photo::before {
    opacity: 1;
    inset: -22px;
    background: radial-gradient(circle, rgba(40, 151, 255, 0.6) 0%, transparent 80%);
}

.developer-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.developer-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 0.35rem;
    white-space: nowrap;
}

.developer-title {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    line-height: 1.4;
    white-space: nowrap;
}

/* On truly small screens, allow wrapping to prevent horizontal overflow */
@media (max-width: 480px) {

    .developer-name,
    .developer-title {
        white-space: normal;
    }

    .developer-card {
        overflow: hidden;
        /* Contain the photo glow on mobile */
    }
}

.developer-link-indicator {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-accent);
    opacity: 0.8;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

@media (min-width: 480px) {
    .developer-link-indicator {
        margin-top: 0;
    }
}

.developer-link-indicator .arrow {
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.developer-card-link:hover .developer-link-indicator {
    opacity: 1;
}

.developer-card-link:hover .developer-link-indicator .arrow {
    transform: translate(3px, -3px);
}

/* CV Download Links */
.cv-download-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cv-download-links .btn {
    flex: 1;
    min-width: 100px;
    padding: 0.75rem 0.25rem;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    text-align: center;
}

.cv-download-links .btn-download {
    background: rgba(255, 255, 255, 0.05);
}

/* Mobile Optimizations for Profile CV */
@media (max-width: 1024px) {

    .cv-bottom-grid {
        gap: 1.5rem;
    }

    .cv-section {
        margin-bottom: 2rem;
    }

    .cv-card {
        padding: 1.25rem;
    }

    .cv-download-links {
        flex-direction: column;
    }

    .cv-table th,
    .cv-table td {
        padding: 0.6rem 0.4rem;
        font-size: 0.8rem;
    }

    .cv-skill-tag {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .cv-section-title {
        font-size: 1.35rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════
   ELYSIUM λ — PROFESSIONAL CRM DESIGN SYSTEM
   ═══════════════════════════════════════════════════════════════════════ */

/* ── SIDEBAR ──────────────────────────────────────────────────────────── */
.admin-sidebar {
    width: 260px;
    background: rgba(4, 8, 22, 0.75);
    backdrop-filter: blur(40px) saturate(200%);
    -webkit-backdrop-filter: blur(40px) saturate(200%);
    border-right: 1px solid var(--glass-border);
    border-top: 1px solid var(--glass-border);
    border-top-right-radius: 24px;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 105px;
    left: 0;
    height: calc(100vh - 105px);
    z-index: 100;
    overflow: hidden;
}

/* Admin identity header */
.sidebar-admin-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1.5rem 1.25rem 1.25rem;
    border-bottom: 1px solid var(--glass-border);
    margin-top: 0; /* starts flush now */
}

.sidebar-admin-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #2997ff, #0a5cde);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(41, 151, 255, 0.35);
}

.sidebar-admin-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-text-primary);
    line-height: 1.2;
}

.sidebar-admin-role {
    font-size: 0.72rem;
    color: var(--color-accent);
    font-weight: 500;
    letter-spacing: 0.04em;
    margin-top: 0.15rem;
}

/* Nav group label */
.sidebar-nav-group-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-text-secondary);
    opacity: 0.4;
    font-weight: 700;
    padding: 0 1.2rem;
    margin-bottom: 0.5rem;
}

/* Sidebar nav */
.sidebar-nav {
    padding: 1.25rem 0.75rem;
    flex: 1;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.8rem 1.1rem;
    color: var(--color-text-secondary);
    border-radius: 12px;
    margin-bottom: 0.25rem;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    gap: 0.75rem;
}

.nav-item svg {
    width: 17px;
    height: 17px;
    opacity: 0.55;
    flex-shrink: 0;
    transition: opacity 0.2s ease;
}

.nav-item span:first-of-type {
    flex: 1;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text-primary);
}

.nav-item:hover svg { opacity: 0.8; }

.nav-item.active {
    background: rgba(41, 151, 255, 0.12);
    color: var(--color-accent);
    box-shadow: inset 3px 0 0 var(--color-accent);
}

.nav-item.active svg { opacity: 1; color: var(--color-accent); }

/* Sidebar badge (partner/pipeline counts) */
.sidebar-badge {
    background: rgba(41, 151, 255, 0.15);
    color: var(--color-accent);
    border: 1px solid rgba(41, 151, 255, 0.2);
    border-radius: var(--radius-pill);
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.1rem 0.5rem;
    min-width: 20px;
    text-align: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

/* Sidebar footer */
.sidebar-footer {
    padding: 1rem 0.75rem;
    border-top: 1px solid var(--glass-border);
}

.sidebar-logout-btn,
.sidebar-home-btn {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.75rem 1.1rem;
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--color-text-secondary);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s ease;
}

.sidebar-logout-btn:hover {
    border-color: rgba(255, 59, 48, 0.4);
    color: #ff6b6b;
    background: rgba(255, 59, 48, 0.05);
}

.sidebar-home-btn:hover {
    border-color: rgba(41, 151, 255, 0.4);
    color: #8ac2ff;
    background: rgba(41, 151, 255, 0.08);
}

/* ── MAIN AREA ────────────────────────────────────────────────────────── */
.admin-main {
    margin-left: 260px;
    padding: 110px 2.5rem 4rem 2.5rem;
    min-height: 100vh;
}

.admin-section {
    display: none;
    animation: adminFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-section.active { display: block; }

@keyframes adminFadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── DASHBOARD HEADER ─────────────────────────────────────────────────── */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2.5rem;
}

.dashboard-header h1 {
    font-size: 2.4rem;
    margin-bottom: 0.3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.dashboard-date {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    opacity: 0.55;
    font-weight: 500;
    text-align: right;
    padding-top: 0.5rem;
    line-height: 1.4;
}

/* ── KPI GRID ─────────────────────────────────────────────────────────── */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.kpi-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: default;
}

.kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.35);
}

/* Subtle glow in corner */
.kpi-card::after {
    content: '';
    display: inline-block;
    top: -40px;
    right: -40px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    opacity: 0.07;
    pointer-events: none;
}

.kpi-card.kpi-blue::after  { background: #2997ff; }
.kpi-card.kpi-green::after { background: #00c875; }
.kpi-card.kpi-gold::after  { background: #D4AF37; }
.kpi-card.kpi-red::after   { background: #ff3b30; }

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

.kpi-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.kpi-icon svg { width: 20px; height: 20px; }

.kpi-icon.icon-blue  { background: rgba(41, 151, 255, 0.15); color: #2997ff; }
.kpi-icon.icon-green { background: rgba(0, 200, 117, 0.12);  color: #00c875; }
.kpi-icon.icon-gold  { background: rgba(212, 175, 55, 0.12); color: #D4AF37; }
.kpi-icon.icon-red   { background: rgba(255, 59, 48, 0.1);   color: #ff6060; }

.kpi-trend {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-pill);
}

.kpi-trend.trend-up   { background: rgba(0,200,117,0.1); color: #00c875; }
.kpi-trend.trend-down { background: rgba(255,59,48,0.1); color: #ff6060; }
.kpi-trend.trend-neutral { background: rgba(255,255,255,0.06); color: var(--color-text-secondary); }

.kpi-value {
    font-size: 2.6rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 0.35rem;
    color: var(--color-text-primary);
}

.kpi-label {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    font-weight: 500;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 1.1rem;
}

.kpi-progress-bar {
    height: 3px;
    background: rgba(255,255,255,0.06);
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.kpi-progress-fill {
    height: 100%;
    border-radius: var(--radius-pill);
    transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
    width: 0; /* animated via JS */
}

.kpi-progress-fill.fill-blue  { background: linear-gradient(90deg, #1a6ecc, #2997ff); }
.kpi-progress-fill.fill-green { background: linear-gradient(90deg, #00985a, #00c875); }
.kpi-progress-fill.fill-gold  { background: linear-gradient(90deg, #a07d20, #D4AF37); }
.kpi-progress-fill.fill-red   { background: linear-gradient(90deg, #cc2020, #ff3b30); }

.kpi-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--color-text-secondary);
    opacity: 0.5;
    margin-top: 0.4rem;
}

/* ── OVERVIEW BOTTOM GRID ─────────────────────────────────────────────── */
.overview-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.overview-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.overview-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.overview-panel-title {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-text-secondary);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.overview-panel-link {
    font-size: 0.78rem;
    color: var(--color-accent);
    cursor: pointer;
    font-weight: 600;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.overview-panel-link:hover { opacity: 1; }

/* ── ACTIVITY FEED ────────────────────────────────────────────────────── */
.feed-list { display: flex; flex-direction: column; gap: 0.2rem; }

.feed-item {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    padding: 0.7rem 0.75rem;
    margin: 0 -0.75rem;
    border-radius: 12px;
    border: 1px solid transparent;
    transition: background var(--transition-fast), border-color var(--transition-fast);
}

.feed-item:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--glass-border);
}

.feed-item-dot {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 0.1rem;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 0 14px -8px currentColor;
}

.feed-item-dot svg { width: 14px; height: 14px; }

.feed-dot-join     { background: rgba(41,151,255,0.12); color: #2997ff; }
.feed-dot-onboard  { background: rgba(0,200,117,0.1);  color: #00c875; }
.feed-dot-project  { background: rgba(212,175,55,0.1);  color: #D4AF37; }
.feed-dot-suspend  { background: rgba(255,59,48,0.08);  color: #ff6060; }

.feed-item-body { flex: 1; min-width: 0; }

.feed-item-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--color-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.15rem;
}

.feed-item-sub {
    font-size: 0.76rem;
    color: var(--color-text-secondary);
    opacity: 0.55;
}

.feed-item-time {
    font-size: 0.72rem;
    color: var(--color-text-secondary);
    opacity: 0.4;
    white-space: nowrap;
    flex-shrink: 0;
    padding-top: 0.15rem;
}

/* ── CLIENT TIMELINE (Vista 360, detail panel) ───────────────────────── */
.tl {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tl::before {
    content: '';
    position: absolute;
    left: 17px;
    top: 10px;
    bottom: 10px;
    width: 1px;
    background: linear-gradient(180deg, rgba(41, 151, 255, 0.35), var(--glass-border) 35%, transparent 99%);
}

.tl-item {
    position: relative;
    display: flex;
    gap: 1.1rem;
    align-items: flex-start;
    animation: tlFadeUp 0.45s cubic-bezier(0.25, 0.1, 0.25, 1) both;
}

.tl-item:nth-child(1) { animation-delay: 0.04s; }
.tl-item:nth-child(2) { animation-delay: 0.09s; }
.tl-item:nth-child(3) { animation-delay: 0.14s; }
.tl-item:nth-child(4) { animation-delay: 0.19s; }
.tl-item:nth-child(5) { animation-delay: 0.24s; }
.tl-item:nth-child(n+6) { animation-delay: 0.3s; }

@keyframes tlFadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .tl-item { animation: none; }
}

/* Node keeps the icon color from its feed-dot-* class; solid base so the
   rail never bleeds through, plus a soft glow in the event color */
.tl .tl-node {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    background: rgba(5, 16, 37, 0.97);
    border: 1px solid var(--glass-border);
    box-shadow: 0 0 16px -7px currentColor;
}

@supports (border-color: color-mix(in srgb, red 30%, transparent)) {
    .tl .tl-node { border-color: color-mix(in srgb, currentColor 32%, transparent); }
}

.tl .tl-node svg { width: 15px; height: 15px; }

.tl-card {
    flex: 1;
    min-width: 0;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1.1rem 0.9rem;
    transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

.tl-item:hover .tl-card {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-highlight);
    transform: translateY(-1px);
}

.tl-card-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 0.3rem;
}

.tl-label {
    font-size: 0.87rem;
    font-weight: 650;
    color: var(--color-text-primary);
    letter-spacing: 0.01em;
}

.tl-time {
    font-size: 0.7rem;
    color: var(--color-text-secondary);
    opacity: 0.45;
    white-space: nowrap;
    flex-shrink: 0;
}

.tl-desc {
    display: block;
    font-size: 0.79rem;
    color: var(--color-text-secondary);
    opacity: 0.75;
    line-height: 1.5;
}

.tl-meta {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-top: 0.6rem;
}

.tl-actor {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    padding: 0.18rem 0.6rem;
    border-radius: var(--radius-pill);
}

.tl-actor-admin {
    background: rgba(212, 175, 55, 0.1);
    color: var(--color-gold);
    border: 1px solid rgba(212, 175, 55, 0.25);
}

.tl-actor-member {
    background: rgba(41, 151, 255, 0.1);
    color: var(--color-accent);
    border: 1px solid rgba(41, 151, 255, 0.25);
}

.tl-date {
    font-size: 0.7rem;
    color: var(--color-text-secondary);
    opacity: 0.4;
}

.tl-stage-flow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.15rem;
}

.tl-stage-pill {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: capitalize;
    padding: 0.22rem 0.75rem;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.04);
    color: var(--color-text-secondary);
    border: 1px solid var(--glass-border);
}

.tl-stage-pill-active {
    background: rgba(41, 151, 255, 0.12);
    color: var(--color-accent);
    border-color: rgba(41, 151, 255, 0.35);
}

.tl-arrow {
    width: 13px;
    height: 13px;
    color: var(--color-text-secondary);
    opacity: 0.5;
    flex-shrink: 0;
}

.timeline-empty {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    opacity: 0.5;
    text-align: center;
    padding: 1.5rem 0;
}

/* ── PIPELINE SNAPSHOT (overview panel) ──────────────────────────────── */
.pipeline-snapshot {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.pipeline-snapshot-row {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.pipeline-snapshot-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    width: 90px;
    flex-shrink: 0;
}

.pipeline-snapshot-bar {
    flex: 1;
    height: 6px;
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.pipeline-snapshot-fill {
    height: 100%;
    border-radius: var(--radius-pill);
    transition: width 0.9s cubic-bezier(0.16, 1, 0.3, 1);
    width: 0;
}

.pipeline-snapshot-count {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-text-primary);
    width: 24px;
    text-align: right;
    flex-shrink: 0;
}

.snap-prospect      .pipeline-snapshot-fill { background: #ffab00; }
.snap-first_contact .pipeline-snapshot-fill { background: rgba(160,165,185,0.6); }
.snap-prototyping   .pipeline-snapshot-fill { background: #D4AF37; }
.snap-development   .pipeline-snapshot-fill { background: #2997ff; }
.snap-delivery      .pipeline-snapshot-fill { background: #a855f7; }
.snap-maintenance   .pipeline-snapshot-fill { background: #00c875; }

/* ── PIPELINE KANBAN BOARD ────────────────────────────────────────────── */
.pipeline-board {
    display: flex;
    align-items: flex-start;
    gap: 1.1rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.2rem 0.2rem 1rem;
    margin: -0.2rem -0.2rem 0;
    scroll-snap-type: x proximity;
}

.pipeline-board::-webkit-scrollbar { height: 8px; }
.pipeline-board::-webkit-scrollbar-track { background: transparent; }
.pipeline-board::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: 10px; }
.pipeline-board::-webkit-scrollbar-thumb:hover { background: var(--glass-border-highlight); }

.pipeline-column {
    flex: 0 0 288px;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    max-height: min(720px, calc(100vh - 280px));
    background: rgba(6, 12, 30, 0.55);
    border: 1px solid var(--glass-border);
    border-top: 2px solid var(--stage-color, var(--glass-border));
    border-radius: 18px;
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.pipeline-column:hover { box-shadow: 0 12px 32px -16px rgba(0,0,0,0.5); }

.pipeline-col-header {
    flex-shrink: 0;
    padding: 1rem 1.15rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(6, 12, 30, 0.7);
}

.pipeline-col-title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1.3;
    min-width: 0;
}

.pipeline-col-title span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pipeline-col-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 8px 1px currentColor;
}

.pipeline-col-count {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-pill);
    flex-shrink: 0;
}

/* Stage color tokens */
.stage-prospect      { --stage-color: #ffab00; }
.stage-first_contact { --stage-color: #8b93a8; }
.stage-prototyping   { --stage-color: #D4AF37; }
.stage-development   { --stage-color: #2997ff; }
.stage-delivery      { --stage-color: #a855f7; }
.stage-maintenance   { --stage-color: #00c875; }

.pipeline-column .pipeline-col-dot   { background: var(--stage-color); }
.pipeline-column .pipeline-col-title { color: var(--stage-color); }
.pipeline-column .pipeline-col-count {
    background: rgba(255, 255, 255, 0.07); /* fallback for browsers without color-mix() */
    background: color-mix(in srgb, var(--stage-color) 14%, transparent);
    color: var(--stage-color);
}

.pipeline-col-cards {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    min-height: 100px;
    overflow-y: auto;
}

.pipeline-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-left: 2px solid var(--stage-color, var(--glass-border));
    border-radius: 12px;
    padding: 0.8rem 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.pipeline-card:hover {
    background: var(--glass-bg-hover);
    border-color: var(--stage-color, var(--color-accent));
    border-left-color: var(--stage-color, var(--color-accent));
    transform: translateY(-2px);
    box-shadow: 0 10px 24px -8px rgba(0,0,0,0.45);
}

.pipeline-card-avatar {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.07); /* fallback for browsers without color-mix() */
    background: color-mix(in srgb, var(--stage-color, var(--color-accent)) 16%, transparent);
    border: 1px solid var(--glass-border);
    border-color: color-mix(in srgb, var(--stage-color, var(--color-accent)) 25%, transparent);
    color: var(--stage-color, var(--color-accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    flex-shrink: 0;
}

.pipeline-card-body { min-width: 0; flex: 1; }

.pipeline-card-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pipeline-card-company {
    font-size: 0.72rem;
    color: var(--color-text-secondary);
    opacity: 0.6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pipeline-col-empty {
    text-align: center;
    font-size: 0.78rem;
    color: var(--color-text-secondary);
    opacity: 0.4;
    padding: 1.75rem 0.5rem;
    border: 1px dashed var(--glass-border);
    border-radius: 12px;
}

/* ── PARTNER CARDS (Clients grid) ─────────────────────────────────────── */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
}

.client-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.client-card::before {
    content: '';
    display: inline-block;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.client-card[data-stage="prospect"]   { --card-stage-color: rgba(160,165,185,0.5); }
.client-card[data-stage="onboarding"] { --card-stage-color: #2997ff; }
.client-card[data-stage="active"]     { --card-stage-color: #00c875; }
.client-card[data-stage="delivered"]  { --card-stage-color: #D4AF37; }

.client-card::before {
    background: var(--card-stage-color, transparent);
}

.client-card:hover {
    transform: translateY(-5px);
    border-color: rgba(41, 151, 255, 0.35);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.client-card:hover::before { opacity: 1; }

.client-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.client-card-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(41,151,255,0.2), rgba(41,151,255,0.05));
    border: 1px solid rgba(41,151,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-accent);
    flex-shrink: 0;
}

.client-card-stage-badge {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-pill);
}

.stage-badge-prospect   { background: rgba(160,165,185,0.1); color: rgba(160,165,185,0.8); border: 1px solid rgba(160,165,185,0.15); }
.stage-badge-onboarding { background: rgba(41,151,255,0.1);  color: #2997ff; border: 1px solid rgba(41,151,255,0.2); }
.stage-badge-active     { background: rgba(0,200,117,0.1);   color: #00c875; border: 1px solid rgba(0,200,117,0.2); }
.stage-badge-delivered  { background: rgba(212,175,55,0.1);  color: #D4AF37; border: 1px solid rgba(212,175,55,0.2); }

.client-name {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
    color: var(--color-text-primary);
    letter-spacing: -0.01em;
}

.client-company {
    color: var(--color-accent);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.client-meta {
    font-size: 0.78rem;
    color: var(--color-text-secondary);
    opacity: 0.65;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.client-meta-email {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 60%;
}

.client-joined {
    white-space: nowrap;
    flex-shrink: 0;
}

/* Suspended state */
.client-card.is-suspended {
    opacity: 0.7;
    border-color: rgba(255, 59, 48, 0.2);
}

.client-card.is-suspended:hover {
    border-color: rgba(255, 59, 48, 0.45);
}

/* ── CRM TOOLBAR ─────────────────────────────────────────────────────── */
.crm-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}

.crm-search-wrapper {
    position: relative;
    flex: 1;
    min-width: 220px;
}

.crm-search-wrapper svg {
    display: inline-block;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    opacity: 0.4;
    pointer-events: none;
    color: var(--color-text-secondary);
}

.crm-search-bar {
    width: 100%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 0.7rem 1rem 0.7rem 2.6rem;
    color: var(--color-text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: all 0.25s ease;
    backdrop-filter: blur(10px);
}

.crm-search-bar:focus {
    outline: none;
    border-color: var(--color-accent);
    background: rgba(41, 151, 255, 0.04);
    box-shadow: 0 0 0 3px rgba(41, 151, 255, 0.08);
}

.crm-search-bar::placeholder { opacity: 0.4; }

.crm-sort-toggle {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 0.7rem 1rem;
    color: var(--color-text-secondary);
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    backdrop-filter: blur(10px);
}

.crm-sort-toggle svg { width: 14px; height: 14px; }

.crm-sort-toggle:hover,
.crm-sort-toggle.is-active {
    border-color: var(--color-accent);
    color: var(--color-accent);
    background: rgba(41,151,255,0.05);
}

/* Filter pills */
.crm-filter-pills {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.crm-pill {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-pill);
    padding: 0.35rem 0.85rem;
    color: var(--color-text-secondary);
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.crm-pill:hover { border-color: rgba(255,255,255,0.25); color: var(--color-text-primary); }

.crm-pill.active {
    background: rgba(41,151,255,0.12);
    border-color: rgba(41,151,255,0.3);
    color: var(--color-accent);
}

.crm-results-count {
    font-size: 0.78rem;
    color: var(--color-text-secondary);
    opacity: 0.5;
    white-space: nowrap;
    align-self: center;
}

/* Detail sections */
.detail-section { margin-bottom: 3.5rem; }

.detail-section h3 {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--color-accent);
    margin-bottom: 1.75rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--glass-border);
    font-weight: 700;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.info-item label {
    display: block;
    font-size: 0.73rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 600;
    opacity: 0.6;
}

.info-item span, .info-item p {
    font-size: 1rem;
    line-height: 1.55;
    color: var(--color-text-primary);
}

.tag-list { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.tag {
    background: rgba(41,151,255,0.08);
    color: var(--color-accent);
    padding: 0.35rem 0.9rem;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(41,151,255,0.2);
}

.status-badge {
    padding: 0.3rem 0.85rem;
    border-radius: var(--radius-pill);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.status-active { background: rgba(0,255,136,0.1); color: #00ff88; border: 1px solid rgba(0,255,136,0.2); }
.status-used   { background: rgba(255,204,0,0.1);  color: #ffcc00; border: 1px solid rgba(255,204,0,0.2); }
.status-pending_payment { background: rgba(255,170,0,0.1); color: #ffaa00; border: 1px solid rgba(255,170,0,0.25); }
.status-suspended,
.status-canceled,
.status-cancelled { background: rgba(255,59,48,0.1); color: #ff6060; border: 1px solid rgba(255,59,48,0.25); }

.licenses-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.license-metric {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 5.5rem;
    padding: 1.15rem 1.35rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.015) 100%),
        rgba(7, 16, 34, 0.72);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.license-metric:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.license-metric-top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.license-metric-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--metric-color, #2997ff);
    box-shadow: 0 0 8px var(--metric-color, #2997ff);
    flex-shrink: 0;
}

.license-metric strong,
.license-metric .license-metric-value {
    display: block;
    font-size: 2rem;
    font-weight: 750;
    color: #ffffff;
    line-height: 1;
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
}

.license-metric span,
.license-metric .license-metric-label {
    font-size: 0.72rem;
    font-weight: 650;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.license-metric-green { --metric-color: #10b981; }
.license-metric-gold { --metric-color: #f59e0b; }
.license-metric-purple { --metric-color: #a78bfa; }

.license-row { cursor: pointer; }
.license-code-cell { font-family: monospace; font-weight: 700; color: var(--color-accent); white-space: nowrap; }
.license-source { display: inline-flex; padding: 0.28rem 0.65rem; border-radius: var(--radius-pill); font-size: 0.7rem; font-weight: 700; white-space: nowrap; }
.license-source-manual { color: #2997ff; background: rgba(41,151,255,0.1); border: 1px solid rgba(41,151,255,0.22); }
.license-empty { padding: 3rem !important; text-align: center !important; color: var(--color-text-secondary); }

@media (max-width: 900px) {
    .licenses-summary { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
}

/* ── CRM EXTENSION STYLES ─────────────────────────────────────────────── */

/* Suspended badge */
.suspended-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(255,59,48,0.12);
    color: #ff3b30;
    border: 1px solid rgba(255,59,48,0.3);
    border-radius: var(--radius-pill);
    padding: 0.25rem 0.65rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-top: 0.65rem;
}

.suspended-badge::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #ff3b30;
    animation: suspendedPulse 1.5s ease-in-out infinite;
}

@keyframes suspendedPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(0.8); }
}


.suspended-detail-banner {
    background: rgba(255,59,48,0.07);
    border: 1px solid rgba(255,59,48,0.22);
    border-radius: var(--radius-sm);
    padding: 0.9rem 1.3rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: #ff6b6b;
    font-size: 0.87rem;
    font-weight: 500;
}

.suspended-detail-banner svg { width: 16px; height: 16px; color: #ff3b30; flex-shrink: 0; }

/* Onboarding status pill */
.onboarding-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-pill);
}

.onboarding-status.status-done    { background: rgba(0,200,117,0.1); color: #00c875; border: 1px solid rgba(0,200,117,0.2); }
.onboarding-status.status-pending { background: rgba(255,204,0,0.08); color: #ffcc00; border: 1px solid rgba(255,204,0,0.2); }

.onboarding-status::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}

/* Admin notes */
.admin-notes-section { margin-bottom: 4rem; }

.admin-notes-section h3 {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--color-accent);
    margin-bottom: 1.75rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--glass-border);
    font-weight: 700;
}

.admin-notes-area {
    width: 100%;
    min-height: 110px;
    background: rgba(255,255,255,0.025);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 0.9rem 1.1rem;
    color: var(--color-text-primary);
    font-family: var(--font-body);
    font-size: 0.93rem;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.25s ease;
    box-sizing: border-box;
}

.admin-notes-area:focus {
    outline: none;
    border-color: var(--color-accent);
    background: rgba(41,151,255,0.04);
    box-shadow: 0 0 0 3px rgba(41,151,255,0.08);
}

.admin-notes-area::placeholder { opacity: 0.35; }

.admin-notes-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.65rem;
}

.admin-notes-save-msg {
    font-size: 0.82rem;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.admin-notes-save-msg.is-visible { opacity: 1; }

/* Activity Timeline */
.activity-timeline { display: flex; flex-direction: column; }

.timeline-item {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    position: relative;
    padding-bottom: 1.75rem;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-item:not(:last-child)::before {
    content: '';
    display: inline-block;
    left: 10px;
    top: 22px;
    width: 1px;
    height: calc(100% - 8px);
    background: var(--glass-border);
}

.timeline-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--glass-border);
    background: rgba(5,10,25,0.8);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.timeline-dot::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.timeline-dot.dot-success  { border-color: #00c875; background: rgba(0,200,117,0.1); }
.timeline-dot.dot-success::after { background: #00c875; }
.timeline-dot.dot-pending  { border-color: rgba(255,204,0,0.4); }
.timeline-dot.dot-pending::after { background: rgba(255,204,0,0.5); }
.timeline-dot.dot-accent   { border-color: var(--color-accent); background: rgba(41,151,255,0.1); }
.timeline-dot.dot-accent::after { background: var(--color-accent); }

.timeline-content { flex: 1; padding-top: 0.1rem; }
.timeline-event   { font-size: 0.9rem; font-weight: 600; color: var(--color-text-primary); margin-bottom: 0.25rem; }
.timeline-date    { font-size: 0.76rem; color: var(--color-text-secondary); opacity: 0.55; }

/* Suspend button */
.btn-suspend {
    background: rgba(255,59,48,0.07);
    border: 1px solid rgba(255,59,48,0.22);
    color: #ff6b6b;
    border-radius: var(--radius-sm);
    padding: 0.5rem 1rem;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: var(--font-body);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-suspend:hover {
    background: rgba(255,59,48,0.12);
    border-color: rgba(255,59,48,0.35);
}

.btn-suspend.is-active {
    background: rgba(0,200,117,0.1);
    border-color: rgba(0,200,117,0.22);
    color: #00c875;
}

.btn-suspend.is-active:hover { background: rgba(0,200,117,0.15); border-color: rgba(0,200,117,0.3); }

/* Financials & Reports */
.fin-card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.fin-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    position: relative;
    display: flex;
    flex-direction: column;
}

.fin-card label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-secondary);
    margin-bottom: 0.5rem;
}

.fin-card input, .fin-card select {
    background: transparent;
    border: none;
    color: var(--color-text-primary);
    font-size: 1.6rem;
    font-weight: 700;
    font-family: var(--font-display);
    width: 100%;
    padding: 0;
    margin: 0;
}

.fin-card input:focus, .fin-card select:focus {
    outline: none;
    box-shadow: none;
    color: var(--color-accent);
}

.fin-card .currency-symbol {
    display: inline-block;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: var(--color-text-secondary);
    opacity: 0.5;
    pointer-events: none;
}

.fin-save-btn {
    align-self: flex-start;
    margin-bottom: 2rem;
}

.report-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.report-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    padding: 0.8rem 1rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.report-item:hover { background: rgba(255,255,255,0.05); }

.report-info { display: flex; align-items: center; gap: 0.75rem; }
.report-icon { color: var(--color-accent); width: 20px; height: 20px; }
.report-title { font-weight: 600; font-size: 0.92rem; color: var(--color-text-primary); }
.report-date { font-size: 0.8rem; color: var(--color-text-secondary); opacity: 0.7; }
.report-actions { display: flex; gap: 0.5rem; }
.report-btn {
    background: transparent;
    border: none;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: color 0.2s;
    padding: 0.25rem;
}
.report-btn:hover { color: var(--color-accent); }
.report-btn.btn-delete:hover { color: #ff3b30; }

.form-inline {
    display: flex;
    gap: 0.5rem;
    background: rgba(0,0,0,0.2);
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
}
.form-inline input {
    flex: 1;
    background: rgba(255,255,255,0.05);
    border: 1px solid transparent;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--color-text-primary);
    font-size: 0.85rem;
}
.form-inline input:focus { border-color: var(--color-accent); outline: none; }

/* Premium Report Upload Card */
.report-upload-card {
    background: rgba(0, 0, 0, 0.15);
    border: 1px dashed rgba(255,255,255,0.15);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: border-color 0.3s;
}
.report-upload-card:hover { border-color: rgba(255,255,255,0.3); }

.report-upload-card h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-secondary);
    margin: 0;
    opacity: 0.8;
}

.report-inputs-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 0.75rem;
}

.report-inputs-grid input {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 0.65rem 0.8rem;
    border-radius: var(--radius-sm);
    color: var(--color-text-primary);
    font-size: 0.85rem;
    width: 100%;
    box-sizing: border-box;
}
.report-inputs-grid input:focus {
    border-color: var(--color-accent);
    outline: none;
}

.report-upload-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.25rem;
}

.btn-suspend:hover             { background: rgba(255,59,48,0.14); border-color: rgba(255,59,48,0.45); color: #ff3b30; }
.btn-suspend.is-active         { background: rgba(0,200,117,0.08); border-color: rgba(0,200,117,0.22); color: #00c875; }
.btn-suspend.is-active:hover   { background: rgba(0,200,117,0.15); border-color: rgba(0,200,117,0.45); }

/* ── RESPONSIVE ───────────────────────────────────────────────────────── */
@media (max-width: 1400px) {
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1200px) {
    .admin-main { padding: 100px 2rem 4rem 2rem; }
    .overview-bottom-grid { grid-template-columns: 1fr; }
}

@media (max-width: 992px) {
    .admin-sidebar {
        width: 72px;
        top: 105px;
        height: calc(100vh - 105px);
    }
    .admin-main { margin-left: 72px; }
    .sidebar-admin-header {
        padding: 1.5rem 0.5rem;
        justify-content: center;
        margin-top: 0;
    }
    .sidebar-admin-info { display: none; }
    .sidebar-nav-group-label { display: none; }
    .nav-item span:first-of-type { display: none; }
    .nav-item svg { width: 20px; height: 20px; }
    .nav-item { justify-content: center; padding: 0.8rem; gap: 0; }
    .sidebar-badge { display: none; }
    .sidebar-logout-btn span,
    .sidebar-home-btn span { display: none; }
    .sidebar-logout-btn,
    .sidebar-home-btn { justify-content: center; padding: 0.7rem; }
}

@media (max-width: 768px) {
    .kpi-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
    .info-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .pipeline-column { flex-basis: 78vw; max-height: min(560px, calc(100vh - 320px)); }

    /* Mobile: sidebar becomes bottom tab bar */
    .admin-sidebar {
        display: flex;
        flex-direction: row;
        align-items: center;
        width: 100%;
        height: auto;
        top: auto;
        bottom: 0;
        left: 0;
        border-right: none;
        border-top: 1px solid var(--glass-border);
        border-radius: 0;
        padding-bottom: env(safe-area-inset-bottom, 8px);
        background: rgba(4,8,22,0.96);
        z-index: 1000;
    }

    .sidebar-admin-header { display: none; }
    .sidebar-nav-group-label { display: none; }

    .sidebar-nav {
        display: flex;
        flex-direction: row;
        justify-content: space-around;
        padding: 0.5rem;
        flex: 1;
        overflow: visible;
    }

    .nav-item {
        flex-direction: column;
        margin-bottom: 0;
        padding: 0.4rem 0.5rem;
        flex: 1;
        text-align: center;
        gap: 0.2rem;
        justify-content: center;
    }

    .nav-item span:first-of-type {
        display: block;
        font-size: 0.6rem;
    }

    .nav-item svg { margin-right: 0; width: 20px; height: 20px; }
    .sidebar-badge { display: none; }

    .sidebar-footer {
        padding: 0.5rem;
        border-top: none;
        border-left: 1px solid rgba(255,255,255,0.08);
    }

    .sidebar-logout-btn,
    .sidebar-home-btn {
        flex-direction: column;
        padding: 0.4rem;
        gap: 0.2rem;
        border: none;
        background: transparent;
    }

    .sidebar-logout-btn span,
    .sidebar-home-btn span {
        display: block;
        font-size: 0.6rem;
    }

    .admin-main { margin-left: 0; padding: 100px 1.25rem 90px 1.25rem; }

    .clients-grid { grid-template-columns: 1fr; gap: 0.9rem; }
    .dashboard-header { flex-direction: column; gap: 0.5rem; }
    .dashboard-date { align-self: flex-start; }

    .crm-toolbar { flex-direction: column; align-items: stretch; }
    .crm-filter-pills { overflow-x: auto; flex-wrap: nowrap; }
    .crm-results-count { text-align: center; }

}

@media (max-width: 480px) {
    .kpi-grid { grid-template-columns: 1fr; }
    .kpi-value { font-size: 2.2rem; }
}

/* Case Study / History Pages Specifics */
.case-study-hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.case-content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

@media (max-width: 899px) {
    .case-content-grid {
        direction: ltr !important;
    }
}


@media (min-width: 900px) {
    .case-content-grid {
        grid-template-columns: 1fr 1fr;
        gap: 5rem;
    }
}

.case-text-block {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-text-secondary);
}

.case-text-block h2 {
    color: var(--color-text-primary);
    font-family: var(--font-heading);
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
}

.case-text-block h3 {
    color: var(--color-text-primary);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.case-feature-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .case-feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.case-feature-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    backdrop-filter: blur(10px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s;
    height: 100%;
}

.case-feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.case-feature-card h4 {
    color: var(--color-accent);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.case-feature-card p {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.case-quote {
    font-size: 1.5rem;
    font-family: var(--font-heading);
    font-style: italic;
    color: var(--color-text-primary);
    border-left: 4px solid var(--color-accent);
    padding-left: 2rem;
    margin: 3rem 0;
    line-height: 1.5;
}

.case-stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin: 3rem 0;
}

.case-stat {
    flex: 1;
    min-width: 200px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
    border-radius: var(--radius-md);
    padding: 2rem;
    text-align: center;
    border: 1px solid var(--glass-border);
}

.case-stat-value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
}

.case-stat-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-secondary);
}

/* Glass Table for Work Packages */
.glass-table-container {
    overflow-x: auto;
    margin: 3rem 0;
    border-radius: var(--radius-lg);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.glass-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.glass-table th, .glass-table td {
    padding: 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.glass-table th {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-accent);
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
}

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

.glass-table tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

.package-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--color-accent);
    color: var(--color-bg-primary);
    margin-left: 0.5rem;
}

/* MacBook Simulator for Prototype */
.macbook-simulator {
    position: relative;
    max-width: 1000px;
    margin: -8rem auto -3rem;
    /* CSS Variables for easy adjustment of screen bounds */
    /* Adjust these to center the scrolling content inside the MacBook frame */
    --screen-top: 25%;
    --screen-left: 24%;
    --screen-width: 52%;
    --screen-height: 45%;
}

.mac-frame-img,
.iphone-frame-img {
    width: 100%;
    height: auto;
    position: relative;
    z-index: 10; /* High z-index to stay on top of the scrolling content */
    pointer-events: none;
}

.mac-frame-img {
    display: block;
}

.iphone-frame-img {
    display: none;
}

/* The container that aligns with the inner physical screen of the MacBook */
.mac-screen-container {
    display: inline-block;
    top: var(--screen-top);
    left: var(--screen-left);
    width: var(--screen-width);
    height: var(--screen-height);
    background-color: #000;
    overflow: hidden;
    z-index: 5;
    border-radius: 10px 10px 2px 2px;
}

/* The actual scrolling content inside the screen */
.mac-screen-content {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--color-accent) var(--color-bg-primary);
}

.mac-screen-content::-webkit-scrollbar {
    width: 6px;
}
.mac-screen-content::-webkit-scrollbar-track {
    background: var(--color-bg-primary);
}
.mac-screen-content::-webkit-scrollbar-thumb {
    background-color: var(--color-accent);
    border-radius: 10px;
}

.mac-screen-content img {
    width: 100%;
    height: auto;
    display: block;
}

/* Fixes for Mobile Layout - Prototype pages */
@media (max-width: 768px) {
    .macbook-simulator {
        margin: 2rem auto;
    }

    .macbook-simulator.has-iphone {
        max-width: none;
        width: 220%; /* Moderate zoom to balance size and layout */
        margin-left: -60%; 
        margin-top: -6rem; /* Pull content closer from top */
        margin-bottom: -8rem; /* Pull content closer from bottom */
        --screen-top: 20%;
        --screen-left: 40%;
        --screen-width: 20%;
        --screen-height: 60%;
    }

    .macbook-simulator.has-iphone .mac-frame-img { 
        display: none !important; 
    }

    .macbook-simulator.has-iphone .iphone-frame-img { 
        display: block !important; 
    }

    .macbook-simulator.has-iphone .mac-screen-container {
        border-radius: 31px; /* Set to exactly 31px per user request */
    }

    .macbook-simulator.has-iphone .mac-screen-content img {
        border-radius: 31px;
    }
}

/* Inner simulator for content sections */
.macbook-simulator.is-inner {
    margin: 0 auto;
    max-width: 100%;
    direction: ltr; /* Always LTR to handle inner components correctly */
}

@media (max-width: 768px) {
    .macbook-simulator.is-inner:not(.has-iphone) {
        margin: 2rem auto;
    }
    
    .macbook-simulator.is-inner.has-iphone {
        /* This will inherit the zoom from .macbook-simulator.has-iphone */
        max-width: none;
        margin-left: -60% !important;
    }
}

.prototype-frame {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--glass-shadow);
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
}

@media (max-width: 768px) {
    .prototype-frame {
        max-width: 300px;
        margin: 2rem auto !important;
        border-radius: var(--radius-sm);
    }
}

/* ── Project Pipeline (Admin CRM) ── */
.pipeline-stepper {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    padding: 1rem 0;
    margin-bottom: 1rem;
}

.pipeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    flex: 1;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.pipeline-step:hover {
    transform: translateY(-3px);
}

.pipeline-step .step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--color-text-secondary);
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.pipeline-step .step-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
    transition: color 0.3s ease;
}

.pipeline-step .step-line {
    display: inline-block;
    top: 18px;
    
    width: 100%;
    height: 2px;
    background: var(--glass-border);
    z-index: -1;
}

.pipeline-step.completed .step-circle {
    background: rgba(16, 185, 129, 0.1);
    border-color: #10b981;
    color: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.pipeline-step.completed .step-line {
    background: #10b981;
}

.pipeline-step.active .step-circle {
    background: rgba(41, 151, 255, 0.15);
    border-color: var(--color-accent);
    color: var(--color-accent);
    box-shadow: 0 0 15px rgba(41, 151, 255, 0.3);
}

.pipeline-step.active .step-label {
    color: var(--color-accent);
}

.client-revenue-container {
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-top: 1.5rem;
}

/* ── CLIENT DASHBOARD PROFILES (ADDED VIA SCRIPT) ───────────────────────── */
.admin-wrapper {
    display: flex;
    flex-direction: row;
}

/* Subscriptions - Ultra Elegant & Compact Grid */
.profile-full-width {
    display: block;
    width: 100%;
}

.subscription-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
    padding-bottom: 2rem;
}

.sub-card {
    background: rgba(255, 255, 255, 0.01);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.sub-card:hover {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.08);
}

.sub-title {
    color: var(--color-platinum);
    font-size: 0.95rem;
    font-weight: 400;
    margin-bottom: 0.1rem;
}

.sub-subtitle {
    color: var(--color-text-secondary);
    font-size: 0.7rem;
    margin-bottom: 1rem;
}

.sub-price {
    font-size: 1.6rem;
    font-weight: 300;
    color: var(--color-platinum);
    margin-bottom: 1rem;
    display: flex;
    align-items: baseline;
    gap: 0.2rem;
}

.sub-period {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--color-text-secondary);
}

.sub-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}

.sub-features li {
    font-size: 0.75rem;
    color: rgba(225, 225, 229, 0.6);
    margin-bottom: 0.6rem;
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    line-height: 1.3;
}

.sub-features li::before {
    content: '✓';
    color: rgba(255, 255, 255, 0.3);
    font-weight: 300;
    font-size: 0.7rem;
}

.sub-btn {
    width: 100%;
    margin-top: auto;
    font-size: 0.75rem;
    padding: 0.6rem 1rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 300;
    letter-spacing: 0.5px;
}

.sub-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* Featured Sub Card */
.featured-sub {
    border-color: rgba(41, 151, 255, 0.15);
    background: linear-gradient(180deg, rgba(41, 151, 255, 0.02) 0%, rgba(255, 255, 255, 0.005) 100%);
    position: relative;
}

.featured-sub .featured-badge {
    display: inline-block;
    top: -8px;
    right: 1rem;
    background: var(--color-bg-primary);
    border: 1px solid rgba(41, 151, 255, 0.2);
    color: var(--color-accent);
    font-size: 0.55rem;
    font-weight: 500;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.featured-sub .sub-price {
    color: var(--color-accent);
}

.featured-sub .sub-btn {
    border-color: rgba(41, 151, 255, 0.2);
    color: var(--color-accent);
}
.featured-sub .sub-btn:hover {
    background: rgba(41, 151, 255, 0.05);
}

/* Profile Details */
.profile-details-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.profile-avatar-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 2rem;
}

.profile-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(41, 151, 255, 0.1);
    color: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    border: 1px solid rgba(41, 151, 255, 0.2);
}

.profile-info-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.info-field label {
    display: block;
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 1.1rem;
    color: var(--color-platinum);
    padding: 0.75rem;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
}

.license-badge {
    font-family: monospace;
    color: var(--color-accent);
    letter-spacing: 1px;
}

/* Mobile Adjustments for Profile */
@media (max-width: 768px) {
    .profile-info-fields {
        grid-template-columns: 1fr;
    }
    .admin-wrapper {
        flex-direction: column;
    }
    
    /* Make sure main content scrolls naturally on mobile above the bottom nav */
    .admin-main {
        height: calc(100vh - 70px) !important; /* approx height of bottom nav */
        padding-bottom: 20px;
    }
}

/* =========================================
   SERVICES REDESIGN (Enterprise Matrix)
   ========================================= */

/* The main container acts exactly like .unified-pricing-card */
.matrix-section-panel {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.0) 40%, rgba(255, 255, 255, 0.01) 100%);
    backdrop-filter: blur(15px) saturate(120%);
    -webkit-backdrop-filter: blur(15px) saturate(120%);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    border-right: 1px solid rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-lg);
    position: relative;
    padding: 1rem 0; /* Top padding, no side padding to let table bleed if needed, but we'll use container */
    box-shadow: 
        inset 0 1px 1px rgba(255, 255, 255, 0.2), 
        inset 1px 0 1px rgba(255, 255, 255, 0.1), 
        0 20px 40px rgba(0, 0, 0, 0.4);
    margin-bottom: 4rem;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

@media (min-width: 901px) {
    .matrix-section-panel:hover {
        transform: translateY(-4px);
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.01) 40%, rgba(41, 151, 252, 0.03) 100%);
        box-shadow: 
            inset 0 1px 2px rgba(255, 255, 255, 0.25),
            inset 1px 0 2px rgba(255, 255, 255, 0.2),
            0 30px 60px rgba(0, 0, 0, 0.5),
            0 0 100px rgba(41, 151, 252, 0.15);
    }
}

.matrix-section-panel::after {
    content: '';
    display: inline-block;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}

.matrix-glow-bg {
    display: inline-block; 
    inset: 0; 
    border-radius: var(--radius-lg); 
    overflow: hidden; 
    pointer-events: none;
    z-index: 0;
}

.pricing-matrix-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    position: relative;
    z-index: 2;
}
.pricing-matrix-container::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
}

.pricing-matrix {
    width: 100%;
    min-width: 950px;
    border-collapse: separate;
    border-spacing: 0;
    text-align: center;
}

/* Base cells */
.pricing-matrix th, .pricing-matrix td {
    padding: 1.5rem 1rem;
    position: relative;
}

/* Subtle vertical dividers */
.pricing-matrix th:not(:last-child), .pricing-matrix td:not(:last-child) {
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

/* No horizontal borders for a cleaner look, just a subtle one for the header */
.pricing-matrix thead th {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 3.5rem;
    padding-bottom: 2rem;
    width: 16%;
}

.pricing-matrix thead th:first-child {
    width: 20%;
}

/* Popular Column Styling */
.pricing-matrix thead .col-popular {
    background: linear-gradient(180deg, rgba(41, 151, 255, 0.05) 0%, transparent 100%);
}
.pricing-matrix tbody td.col-popular-body {
    background: rgba(41, 151, 255, 0.015);
}

.matrix-popular-badge {
    display: inline-block;
    background: var(--color-accent);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.3rem 1.2rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    z-index: 20;
    box-shadow: 0 4px 15px rgba(41,151,255,0.4); margin-bottom: 0.75rem;
    white-space: nowrap;
}

/* Sticky First Column - Transparent on Desktop, Solid & Floating on Mobile */
.matrix-feature-name, .matrix-feature-name-header {
    text-align: left;
    color: rgba(255,255,255,0.85);
    font-size: 0.95rem;
    position: relative;
    background: transparent; /* No grey box on desktop */
    z-index: 10;
    border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.matrix-feature-name-header {
    color: var(--color-platinum);
    vertical-align: bottom !important;
    font-weight: 600;
}

@media (max-width: 950px) {
    .desktop-only-lambda {
        display: none !important;
    }

    .matrix-feature-name, .matrix-feature-name-header {
        position: sticky;
        left: 0;
        /* Rich dark blue that perfectly matches the site background to hide scrolling text */
        background: rgba(14, 22, 42, 0.95); 
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        /* Shadow effect to show it's floating above the scrolling content */
        box-shadow: 15px 0 20px -15px rgba(0,0,0,0.8);
        border-right: 1px solid rgba(255, 255, 255, 0.05) !important;
    }
}

/* Hover effects */
.pricing-matrix tbody tr:hover td:not(.matrix-feature-name) {
    background: rgba(255,255,255,0.02);
}

/* Typography for matrix */
.matrix-plan-title {
    font-size: 1.25rem; 
    margin-bottom: 0.5rem; 
    color: var(--color-platinum);
    font-weight: normal;
}
.matrix-price { white-space: nowrap;
    font-size: 1.5rem; 
    font-weight: 700; 
    color: var(--color-accent); 
    margin-bottom: 0.25rem;
}
.matrix-price-period {
    font-size: 0.9rem; 
    font-weight: normal; 
    color: var(--color-text-secondary);
    display: inline-block;
    white-space: nowrap;
}

/* Checkmarks and Dashes */
.matrix-check {
    color: var(--color-accent);
    font-weight: bold;
    font-size: 1.1rem;
}
.matrix-dash {
    color: rgba(255,255,255,0.15);
    font-weight: bold;
}

.matrix-btn-wrapper {
    margin-top: 1.5rem;
}
.matrix-btn-wrapper .btn {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    width: 90%;
}


/* Basic Intro Panel (Split) */
.intro-panel-wrapper {
    padding: 3rem;
}
.intro-panel-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}
@media (min-width: 900px) {
    .intro-panel-grid {
        grid-template-columns: 1.5fr 1fr;
        align-items: center;
    }
}
.intro-panel-text h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #ffffff, #9095A5);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Transparencia Grid within Panel */
.transparency-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0; 
}
@media (min-width: 768px) {
    .transparency-grid {
        grid-template-columns: 1fr 1fr;
    }
}
.transparency-item {
    padding: 2.5rem;
}
@media (min-width: 768px) {
    .transparency-item:nth-child(odd) {
        border-right: 1px solid rgba(255, 255, 255, 0.05);
    }
    .transparency-item:nth-child(-n+2) {
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
}
@media (max-width: 767px) {
    .transparency-item:not(:last-child) {
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
}
.transparency-item h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    color: var(--color-platinum);
    margin-bottom: 0.8rem;
}
.transparency-item h4::before {
    content: 'λ';
    color: var(--color-accent);
    font-family: -apple-system, sans-serif;
}
.transparency-item p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}


/* ==========================================================================
   DUAL LAYOUT MATRIX (Replaces table for true mobile stickiness)
   ========================================================================== */
.matrix-dual-layout {
    display: flex;
    width: 100%;
    position: relative;
    border-radius: var(--radius-lg);
}

.matrix-labels-col {
    flex: 0 0 35%;
    max-width: 320px;
    background: transparent;
    z-index: 10;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
}

.matrix-plans-scroll {
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
}
.matrix-plans-scroll::-webkit-scrollbar {
    height: 6px;
}
.matrix-plans-scroll::-webkit-scrollbar-track {
    background: transparent;
}
.matrix-plans-scroll::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.matrix-plans-inner {
    display: flex;
    width: 100%; /* Fit container horizontally without scroll on desktop */
}

.matrix-plan-col {
    flex: 1; /* Stretch columns evenly to fill horizontal space */
    min-width: 0; /* Allow text wrapping if needed */
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}
.matrix-plan-col:last-child {
    border-right: none;
}

/* Ensure equal heights for rows - Desktop Optimized to fit vertically */
.matrix-label-cell, .matrix-plan-cell {
    min-height: 55px; /* Reduced to fit the entire table on smaller laptop screens */
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
}
.matrix-label-cell:last-child, .matrix-plan-cell:last-child {
    border-bottom: none;
}

.matrix-label-cell {
    justify-content: flex-start;
    font-size: 0.9rem; /* Slightly smaller for desktop fit */
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.3;
}

.matrix-plan-cell {
    justify-content: center;
}

/* Header Cells - Desktop Optimized */
.matrix-label-header, .matrix-plan-header {
    height: 280px; /* Increased to prevent vertical overlap with popular badge */
    padding: 2rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: flex-end; 
}

.matrix-label-header {
    align-items: flex-start;
    font-weight: 600;
    color: var(--color-platinum);
    font-size: 1.05rem;
}

.matrix-plan-header {
    align-items: center;
    text-align: center;
    position: relative; 
    min-width: 0;
}

.matrix-plan-col-popular {
    background: linear-gradient(180deg, rgba(41, 151, 255, 0.06) 0%, rgba(41, 151, 255, 0.01) 100%);
}

.matrix-popular-badge {
    display: inline-block;
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-accent);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.3rem 1.2rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    z-index: 20;
    box-shadow: 0 4px 15px rgba(41,151,255,0.4); margin-bottom: 0.75rem;
    white-space: nowrap;
}

/* Mobile behavior */
@media (max-width: 950px) {
    .desktop-only-lambda {
        display: none !important;
    }

    .matrix-labels-col {
        flex: 0 0 160px; 
        background: transparent; 
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        box-shadow: none;
        border-right: none;
    }
    .matrix-label-cell {
        font-size: 0.85rem;
        padding: 0.75rem 0.5rem;
    }
    .matrix-label-header {
        padding-left: 0.5rem;
    }
    
    .matrix-plans-inner {
        width: auto;
        min-width: max-content; /* Force horizontal scroll back on mobile */
    }
    .matrix-plan-col {
        flex: none;
        width: 190px;
        scroll-snap-align: center;
    }
    .matrix-label-cell, .matrix-plan-cell {
        min-height: 50px; /* Restored mobile touch-friendly size */
        padding: 0.6rem 0.5rem;
    }
    
    
    .matrix-label-header, .matrix-plan-header {
        height: 250px; /* Keep taller header on mobile for badge room */
    }
    .matrix-plan-header {
        padding: 2.8rem 0.5rem 1rem 0.5rem;
    }
    
    .matrix-plans-scroll {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-padding-left: 0.5rem; /* Restore horizontal scroll on mobile */
    }
    


    .matrix-plan-title {
        font-size: 1rem;
        margin-bottom: 0.2rem; /* Tighter */
    }
    .matrix-price { white-space: nowrap;
        margin-bottom: 0.2rem; /* Tighter */
    }
    .matrix-popular-badge {
        top: 14px; 
        padding: 0.2rem 0.8rem;
        font-size: 0.6rem;
    }

    .matrix-plan-price {
        font-size: 2.2rem; /* Reduced from 2.8rem */
    }
    .matrix-plan-price-label {
        font-size: 0.8rem;
    }
    .matrix-plan-optional {
        font-size: 0.65rem;
    }
    .matrix-plan-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }
    .matrix-popular-badge {
        top: 16px; /* Keep inside container on mobile so it doesn't clip */
    }

    /* Apply glass effect ONLY to the feature rows, leaving the top header transparent */
    .matrix-label-cell {
        background: transparent; /* Softer dark glass */
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border-right: 1px solid rgba(255, 255, 255, 0.08);
        font-size: 0.85rem;
        padding: 0.75rem 0.5rem;
    }
    
    /* Make the header completely transparent and floating */
    .matrix-label-header {
        background: transparent;
        backdrop-filter: none;
        border-right: 1px solid rgba(255, 255, 255, 0.05); /* keep border to separate from plans */
        padding-left: 0.5rem;
    }
}

.dynamic-price {
    display: inline-block;
    white-space: nowrap;
}

.matrix-plan-optional {
    width: 100%;
    max-width: 100%;
    line-height: 1.3;
}

/* Full colón amounts need a compact two-line layout inside narrow plan columns. */
body[data-active-currency="CRC"] .matrix-plan-header {
    padding-right: 0.5rem;
    padding-left: 0.5rem;
}

body[data-active-currency="CRC"] .matrix-price {
    display: flex;
    max-width: 100%;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    line-height: 1.1;
    white-space: normal;
}

body[data-active-currency="CRC"] .matrix-price .dynamic-price {
    font-size: 1.2rem;
}

body[data-active-currency="CRC"] .matrix-price-period {
    font-size: 0.75rem;
}

body[data-active-currency="CRC"] .matrix-plan-optional {
    min-height: 2.6em;
    padding: 0 0.2rem;
    font-size: 0.65rem !important;
    white-space: normal !important;
}


/* ── Guided onboarding session (admin) ─────────────────────────────────────
   The onboarding is filled by the administrator together with the client, so
   the form states plainly whose data is being written. Injected by
   JS/onboarding.js, which keeps the three localized pages in sync. */
.admin-session-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem 1rem;
    margin-bottom: 2rem;
    padding: 0.85rem 1.1rem;
    border: 1px solid rgba(0, 200, 117, 0.28);
    border-radius: var(--radius-md);
    background: rgba(0, 200, 117, 0.06);
    font-size: 0.8rem;
}

.admin-session-badge {
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: rgba(0, 200, 117, 0.16);
    color: #00c875;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.admin-session-who {
    flex: 1 1 12rem;
    color: var(--color-text-secondary);
}

.admin-session-back {
    color: var(--color-accent);
    font-size: 0.75rem;
    text-decoration: none;
}

.admin-session-back:hover { text-decoration: underline; }
