:root {
    --primary-green: #bfff00; /* Neon Jarvis Yellow-Green */
    --neon-green: #bfff00;    /* Alias para consistencia */
    --primary-dark: #8cb300;
    --accent-color: #0f172a; /* Grafito Base */
    --bg-light: #ffffff;      
    --bg-secondary: #f8fafc;
    --text-dark: #ffffff;     
    --text-light: #94a3b8;
    --white: #ffffff;
    --danger: #ef4444;
    --neon-red: #ff3333;
    --warning: #f59e0b;
    --neon-yellow: #ffcc00;
    --sidebar-width: 260px;
    --card-bg: #1e293b; /* Gris Grafito para tarjetas */
    --border-color: rgba(255, 255, 255, 0.1);
    --input-bg: #1e293b;

    /* Status Colors - Light Mode (Basic) */
    --status-red-bg: #fee2e2;
    --status-red-text: #b91c1c;
    --status-red-border: #fca5a5;
    --status-green-bg: #ecfdf5;
    --status-green-text: #047857;
    --status-green-border: #6ee7b7;

    /* Enterprise UI Variables (LIGHT) */
    --cc-card-bg: #1e293b;
    --cc-text-primary: #ffffff;
    --cc-text-secondary: #94a3b8;
    --cc-icon-bg: #0f172a;
    --cc-gauge-inner: #0f172a;
    --cc-btn-bg: #bfff00;
    --cc-btn-border: #bfff00;
    --cc-card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --cc-card-border: 1px solid rgba(255, 255, 255, 0.1);
    --cc-status-yellow: #f59e0b;
    --cc-status-green: #bfff00;
}

/* Modo Oscuro Overrides - Premium/Enterprise Only */
body.dark-mode {
    --bg-light: #0f172a; /* GRIS GRAFITO SOLICITADO */
    --bg-secondary: #0f172a;
    --accent-color: #1e293b; 
    --text-dark: #f8fafc;
    --text-light: #94a3b8;
    --white: #1e293b;
    --card-bg: #1e293b; /* Tarjetas sólidas grafito */
    --border-color: rgba(191, 255, 0, 0.1); /* Bordes sutiles neón */
    --input-bg: #1e293b;

    /* Enterprise UI Variables (DARK) */
    --cc-card-bg: #1e293b;
    --cc-text-primary: #ffffff;
    --cc-text-secondary: #94a3b8;
    --cc-icon-bg: #0f172a;
    --cc-gauge-inner: #0f172a;
    --cc-btn-bg: transparent;
    --cc-btn-border: #bfff00;

    /* Status Colors - Dark Mode */
    --status-red-bg: rgba(255, 49, 49, 0.1);
    --status-red-text: #ff3131;
    --status-red-border: rgba(255, 49, 49, 0.3);
    --status-green-bg: rgba(191, 255, 0, 0.1);
    --status-green-text: #bfff00;
    --status-green-border: rgba(191, 255, 0, 0.3);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-light);
    color: #1e293b; /* Texto de cuerpo oscuro sobre fondo blanco */
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: #1e293b !important; /* Gris Grafito Jarvis (v20.42) */
    color: #ffffff !important;           /* TEXTO BLANCO */
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    overflow-x: visible;
}

.brand {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 10px;
    text-align: center;
    color: #ffffff;
    /* Fixed white for logo visibility */
    letter-spacing: 1px;
}

.brand-sub {
    font-size: 16px;
    font-weight: 900;
    color: #bfff00;
    letter-spacing: 4px;
    text-transform: uppercase;
    display: block;
    margin-top: 2px;
    margin-bottom: 25px;
    text-shadow: 0 0 10px rgba(191, 255, 0, 0.4);
}

@keyframes core-glow {

    0%,
    100% {
        opacity: 0.6;
        text-shadow: 0 0 5px rgba(255, 68, 68, 0.2);
    }

    50% {
        opacity: 1;
        text-shadow: 0 0 15px rgba(255, 68, 68, 0.8), 0 0 25px rgba(255, 68, 68, 0.4);
    }
}

.brand span {
    color: var(--primary-green);
}

.nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-links li {
    margin-bottom: 15px;
}

.nav-links a {
    text-decoration: none;
    color: #ecf0f1;
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-radius: 8px;
    transition: background 0.1s;
    /* Reduced from 0.3s */
    font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
    background-color: var(--primary-green);
    color: var(--white);
    transition: none !important;
    /* Instant snap on click */
}

.nav-links a i {
    margin-right: 10px;
    font-size: 18px;
}

.user-profile {
    margin-top: auto;
    display: flex;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-green);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    margin-right: 10px;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--white);
}

.export-btn {
    background-color: var(--primary-green);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 6px rgba(39, 174, 96, 0.2);
    transition: transform 0.2s;
}

.export-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

/* Stats Cards */
/* Stats Cards - v71.1.5 STABILIZED GRID */
.stats-grid {
    display: grid;
    /* [v71.1.5] Diseño Estándar: 4 columnas para usuarios Pro/Enterprise */
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

/* [v71.1.5] REDISTRIBUCIÓN SOBERANA: 3 columnas para Plan Básico */
html.plan-basic .stats-grid, 
body.plan-basic .stats-grid {
    grid-template-columns: repeat(3, 1fr) !important;
}


/* [v71.1.5] ZERO-FLICKER GATING: Oculto por defecto en el core */
#cold-storage-card {
    display: none !important;
}

/* Mostrar solo en planes autorizados o modo lab */
html.plan-premium #cold-storage-card,
body.plan-premium #cold-storage-card,
html.plan-enterprise #cold-storage-card,
body.plan-enterprise #cold-storage-card,
html.lab-mode #cold-storage-card,
body.lab-mode #cold-storage-card {
    display: flex !important;
}


/* Mobile Responsiveness */
@media (max-width: 1024px) {
    .stats-grid, body.plan-basic .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .stats-grid, body.plan-basic .stats-grid {
        grid-template-columns: 1fr;
    }
}

.card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: background 0.3s, color 0.3s;
    min-height: 140px; /* Estabilizar altura */
}


.card-title {
    font-size: 14px;
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.card-value {
    font-size: 52px;
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -2px;
    line-height: 1;
    margin: 10px 0;
}

.card-trend {
    font-size: 13px;
    margin-top: 5px;
    color: var(--text-light);
    /* Improved contrast in dark mode */
}

.trend-up {
    color: var(--primary-green);
}

.trend-down {
    color: var(--danger);
}

/* Data Table */
.table-container {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    flex: 1;
    transition: background 0.3s, color 0.3s;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    font-size: 26px;
    font-weight: 900;
    color: var(--white);
    letter-spacing: -0.5px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: left;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

th {
    color: var(--text-light);
    font-weight: 600;
    font-size: 14px;
}

td {
    color: var(--text-dark);
    font-size: 14px;
}

.status-badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-valid {
    background-color: rgba(39, 174, 96, 0.1);
    color: var(--primary-green);
}

.status-pending {
    background-color: rgba(243, 156, 18, 0.1);
    color: var(--warning);
}

.status-alert {
    background-color: rgba(231, 76, 60, 0.1);
    color: var(--danger);
}

/* Estilos Globales para Inputs y Selects */
input,
select,
textarea {
    background-color: var(--input-bg) !important;
    color: var(--text-dark) !important;
    border: 1px solid var(--border-color) !important;
}

body.dark-mode select option {
    background-color: var(--card-bg);
}

/* Sidebar Integration: GeoVision Premium Button v56.9 */
.nav-geovision {
    margin: 15px 0 5px 0;
    background: rgba(39, 174, 96, 0.05);
    border: 1px solid rgba(72, 187, 120, 0.3);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nav-geovision:hover {
    background: rgba(39, 174, 96, 0.15);
    border-color: #39FF14;
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.4), inset 0 0 10px rgba(57, 255, 20, 0.2);
    transform: translateY(-2px);
}

.nav-geovision a {
    color: #48bb78 !important;
    font-weight: 800 !important;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    padding: 12px 15px;
    text-decoration: none;
}

.nav-geovision a:hover {
    background-color: transparent !important;
}

.geovision-pulse-dot {
    width: 8px;
    height: 8px;
    background: #39FF14;
    border-radius: 50%;
    box-shadow: 0 0 10px #39FF14;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    animation: beacon-pulse 2s infinite;
}

@keyframes beacon-pulse {
    0% {
        transform: translateY(-50%) scale(0.9);
        opacity: 0.5;
    }

    50% {
        transform: translateY(-50%) scale(1.3);
        opacity: 1;
    }

    100% {
        transform: translateY(-50%) scale(0.9);
        opacity: 0.5;
    }
}

.nav-geovision::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(57, 255, 20, 0.1), transparent);
    animation: scan-button 4s infinite linear;
    pointer-events: none;
}

@keyframes scan-button {
    0% {
        left: -100%;
    }

    100% {
        left: 200%;
    }
}

/* IA Sentinel Radar Animation v57.1 - Refined centering & visibility */
.sentinel-radar-container {
    position: relative;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 15px;
    /* Compensa el gap */
    overflow: visible !important;
    /* Asegurar que los anillos no se corten */
}

/* Botón Cerrar Modal Sentinel v57.2 */
.sentinel-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #a0aec0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 100;
}

.sentinel-close-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    transform: rotate(90deg);
}

.radar-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid rgba(66, 153, 225, 0.6);
    border-radius: 50%;
    animation: radar-pulse 4s infinite ease-out;
    pointer-events: none;
    z-index: 1;
}

.radar-ring:nth-child(2) {
    animation-delay: 1.3s;
}

.radar-ring:nth-child(3) {
    animation-delay: 2.6s;
}

.radar-scanner {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120px;
    /* Más grande que el icono */
    height: 120px;
    margin-top: -60px;
    margin-left: -60px;
    background: conic-gradient(from 0deg, rgba(66, 153, 225, 0.5) 0%, transparent 50%);
    border-radius: 50%;
    animation: radar-spin 3s infinite linear;
    pointer-events: none;
    z-index: 2;
}

.sentinel-robot-icon {
    position: relative;
    z-index: 3;
    background: #1a202c !important;
    /* Forzar fondo oscuro */
    padding: 12px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}

@keyframes radar-pulse {
    0% {
        width: 40px;
        height: 40px;
        opacity: 1;
    }

    100% {
        width: 140px;
        height: 140px;
        opacity: 0;
    }
}

@keyframes radar-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ENTERPRISE NEON OVERHAUL v58.0 */
/* ENTERPRISE NEON OVERHAUL v58.0 - v3.9.1 REFINEMENT (Contrast Fix) */
.cc-card {
    position: relative !important;
    /* isolation: isolate; <- COMENTADO PARA LIBERAR EL Z-INDEX DEL BEACON */
    background: none !important;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: var(--cc-card-shadow) !important;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1) !important;
    padding: 25px !important;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cc-card:hover {
    transform: translateY(-5px) scale(1.01) !important;
    border-color: var(--primary-green) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2) !important;
}

.cc-bg-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.95; /* Opacidad alta para realismo sólido */
    transition: all 0.5s ease;
    background-position: center;
    background-size: cover;
    pointer-events: none;
    filter: brightness(0.8) saturate(1.4);
}

.dark-mode .cc-bg-wrapper {
    opacity: 0.95;
    filter: brightness(0.9) saturate(1.5);
}


.cc-card:hover .cc-bg-wrapper {
    opacity: 1;
    filter: brightness(0.9) saturate(1.5) scale(1.1);
}

.cc-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--cc-card-bg);
    z-index: 0;
    pointer-events: none;
    opacity: 1; /* Removiendo transparencia por ahora */
}

.dark-mode .cc-card::after {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98) 0%, rgba(15, 23, 42, 0.85) 100%);
}

.cc-card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.6);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 800;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 5px;
    color: white;
}

.cc-btn-v3 {
    width: 100%;
    background: linear-gradient(90deg, var(--neon-blue) 0%, var(--neon-green) 100%);
    border: none;
    border-radius: 12px;
    color: black;
    font-weight: 900;
    font-size: 0.85rem;
    padding: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
}

.cc-btn-v3:hover {
    filter: brightness(1.2);
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(0, 255, 159, 0.4);
}

.enterprise-command-center {
    background: var(--bg-secondary);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.enterprise-command-center .section-title {
    color: var(--primary-green);
    text-shadow: 0 0 10px rgba(191, 255, 0, 0.2);
    margin: 10px 0 25px 0;
    font-size: 28px;
    font-weight: 900;
}

.cc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

/* Eliminamos la definición duplicada inferior para evitar conflictos */

.cc-card.active-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: var(--neon-green);
    box-shadow: 0 0 15px var(--neon-green);
    z-index: 10;
}

.cc-card.active-card.alert-yellow::before {
    background: var(--neon-yellow);
    box-shadow: 0 0 15px var(--neon-yellow);
}

.cc-card.active-card.alert-red::before {
    background: var(--neon-red);
    box-shadow: 0 0 15px var(--neon-red);
}

.cc-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--primary-green);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    background: var(--card-bg);
}

.cc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cc-header h3 {
    margin: 0;
    font-size: 22px;
    color: var(--text-dark);
    letter-spacing: -0.5px;
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Neon Fruit Icons (User Individual Neon Sync) */
.cc-fruit-icon {
    width: 60px;
    height: 60px;
    background-size: contain !important;
    background-repeat: no-repeat;
    background-position: center;
    display: block;
    aspect-ratio: 1/1;
    mix-blend-mode: normal;
    /* Default for Light Mode */
    filter: brightness(1.1) contrast(1.1);
    flex-shrink: 0;
}

.dark-mode .cc-fruit-icon {
    mix-blend-mode: screen;
}

.icon-strawberry {
    background-image: url('../icons/tomato_neon.png');
}

.icon-raspberry {
    background-image: url('../icons/frambuesa_neon.png');
}

.icon-blackberry {
    background-image: url('../icons/zarzamora_neon.png');
}

.icon-blueberry {
    background-image: url('../icons/arandano_neon.png');
}

.icon-tomato {
    background-image: url('../icons/tomato_neon.png');
}

.cc-fruit-wrapper {
    width: 65px;
    height: 65px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    position: relative;
    z-index: 2; /* Contenido sobre todo */
}

.cc-header,
.cc-body,
.cc-btn,
.cc-card-badge {
    position: relative;
    z-index: 2; /* Forzar que el contenido flote sobre el fondo */
}
.cc-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    width: 100%;
}

.cc-gauge-mini {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 900;
    font-size: 16px;
    position: relative;
    isolation: isolate; /* Crear contexto de capas propio */
    background: conic-gradient(var(--cc-color, var(--neon-green)) calc(var(--pct, 0) * 1%), rgba(255, 255, 255, 0.1) 0);
    filter: drop-shadow(0 0 15px var(--cc-color, var(--neon-green)));
    animation: neon-breathing 2s infinite ease-in-out;
    flex-shrink: 0;
    overflow: visible;
}

.cc-gauge-inner-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    pointer-events: none;
    font-family: 'Outfit', sans-serif; /* Usando Outfit para mejor métrica */
    line-height: 1; /* Reset a 1 para evitar desplazamientos */
    gap: 0; /* Sin espacio entre val y label para control total */
}

.cc-pct-val {
    font-size: 20px;
    font-weight: 900;
    margin: 0;
    padding: 0;
    display: block;
    /* No manual margins here */
}

.cc-pct-label {
    font-size: 8px !important;
    font-weight: 800;
    letter-spacing: 0.8px;
    opacity: 0.9;
    text-transform: uppercase;
    margin: 0;
    padding: 0;
    display: block;
    margin-top: -1px; /* Ajuste visual mínimo para Outfit */
}

.cc-gauge-mini::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 65px; /* Tamaño exacto para dejar el anillo neón de 7.5px */
    height: 65px;
    background: var(--cc-gauge-inner);
    border-radius: 50%;
    z-index: 1;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.9);
}

@keyframes neon-breathing {

    0%,
    100% {
        filter: drop-shadow(0 0 5px var(--cc-color, var(--neon-green)));
    }

    50% {
        filter: drop-shadow(0 0 15px var(--cc-color, var(--neon-green))) drop-shadow(0 0 25px var(--cc-color, var(--neon-green)));
    }
}

.cc-gauge-mini>span {
    display: none;
    /* Ocultar solo el span directo antiguo, si existe */
}

.cc-gauge-inner-text {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.cc-pct-val {
    font-size: 18px;
    font-weight: 900;
    color: white;
    text-shadow: 0 0 10px var(--cc-color, var(--neon-green));
}

.cc-pct-label {
    font-size: 8px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 2px;
    letter-spacing: 0.5px;
}

.cc-stats {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cc-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.1);
    display: inline-block;
    color: #fff;
}

/* CENTRO DE COMANDO (ENTERPRISE) v125 */
.cc-fruit-wrapper {
    width: 70px;
    height: 70px;
    background: var(--cc-icon-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
    flex-shrink: 0;
}

.cc-fruit-img {
    pointer-events: none;
    -webkit-user-select: none;
    user-select: none;
    filter: brightness(1.2) contrast(1.1);
}

.cc-btn {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 10px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    transition: all 0.3s;
}

.cc-btn:hover {
    background: var(--neon-green);
    color: #000;
    box-shadow: 0 0 20px var(--neon-green);
    border-color: transparent;
}

/* Overhaul existing gauge */
#compliance-gauge {
    background: conic-gradient(var(--gauge-color, var(--neon-green)) calc(var(--pct, 0) * 1%), rgba(255, 255, 255, 0.03) 0) !important;
    border: none !important;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 0 12px var(--gauge-color, var(--neon-green)));
    animation: main-gauge-glow 4s infinite ease-in-out;
}

#compliance-gauge::after {
    content: '';
    position: absolute;
    width: 82%;
    height: 82%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.08) 0%, #111 80%);
    border-radius: 50%;
    z-index: 1;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.9);
}

@keyframes main-gauge-glow {

    0%,
    100% {
        filter: drop-shadow(0 0 8px var(--gauge-color, var(--neon-green)));
    }

    50% {
        filter: drop-shadow(0 0 20px var(--gauge-color, var(--neon-green))) drop-shadow(0 0 35px var(--gauge-color, var(--neon-green)));
    }
}

#compliance-pct {
    position: relative;
    z-index: 2;
    color: white !important;
    font-size: 32px;
    text-shadow: 0 0 20px var(--gauge-color, var(--neon-green));
    font-family: 'Orbitron', 'Segoe UI', sans-serif !important;
    font-weight: 900;
}

.gauge-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5;
    position: relative;
}

.cc-toggle-btn {
    background: var(--cc-btn-bg);
    border: 1px solid var(--cc-btn-border);
    color: var(--cc-status-green);
    border-radius: 5px;
    padding: 2px 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
    margin-left: 15px;
}

.cc-toggle-btn:hover {
    background: rgba(57, 255, 20, 0.2);
    box-shadow: 0 0 10px var(--neon-green);
}

.cc-grid.collapsed {
    display: none;
}

.gauge-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: -5px;
}

/* Background Glowing Nodes effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at 10% 10%, rgba(57, 255, 20, 0.03) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(0, 255, 255, 0.03) 0%, transparent 20%);
    pointer-events: none;
    z-index: -1;
}

/* SIDEBAR REFACTOR (v62.4.3 Stabilization) */
.sidebar-logo-box {
    text-align: center;
    margin-bottom: 10px;
}

.sidebar-logo-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.2);
    object-fit: cover;
}

.multi-orchard-panel {
    display: none; /* Controlled by JS */
    padding: 10px 15px;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    margin-top: 15px;
    border: 1px solid rgba(72, 187, 120, 0.3);
    /* cursor: pointer; removed to avoid confusion */
    transition: background 0.3s ease;
}

/* .multi-orchard-panel:hover removed to avoid interaction confusion */

.sidebar-identity-card {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
}

.crop-badge-box {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--primary-green);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-status-sub {
    color: #bdc3c7;
    font-size: 11px;
    margin-top: 2px;
    margin-bottom: 5px;
}

.sidebar-status-location {
    color: #bdc3c7;
    font-size: 11px;
    margin-top: 2px;
    margin-bottom: 5px;
    text-transform: uppercase;
    font-weight: 600;
    opacity: 0.8;
}

.sidebar-crop-tag {
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    display: inline-block;
    font-weight: bold;
    text-transform: uppercase;
}

/* SENTINEL SIDEBAR WIDGET (v62.4.3) */
.sentinel-sidebar-card {
    margin: 0 15px 20px 15px;
    padding: 15px;
    background: linear-gradient(145deg, #1a202c, #2d3748);
    border-radius: 12px;
    border: 1px solid rgba(72, 187, 120, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    flex-shrink: 0;
}

.sentinel-sidebar-card:hover {
    border-color: rgba(72, 187, 120, 1);
    transform: translateY(-2px);
}

.sentinel-scanner-beam-v {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: linear-gradient(to bottom, transparent, rgba(72, 187, 120, 0.1) 50%, transparent);
    animation: scan-vertical 4s ease-in-out infinite;
}

.sentinel-scan-line-v {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(72, 187, 120, 0.5);
    box-shadow: 0 0 10px rgba(72, 187, 120, 0.8);
    animation: scan-line 4s ease-in-out infinite;
}

.sentinel-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    position: relative;
    z-index: 2;
}

.sentinel-card-title {
    color: #ff4444;
    font-weight: 800;
    font-size: 11px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.sentinel-card-status-box {
    margin-bottom: 10px;
    position: relative;
    z-index: 2;
}

.sentinel-card-status-text {
    color: #48bb78;
    font-size: 13px;
    font-weight: bold;
}

.sentinel-card-separator {
    height: 1px;
    background: rgba(72, 187, 120, 0.3);
    margin-bottom: 10px;
    width: 100%;
    position: relative;
    z-index: 2;
}

.sentinel-card-ticker-box {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    position: relative;
    z-index: 2;
}

.sentinel-card-ticker-text {
    font-size: 11px;
    color: #cbd5e0;
    font-style: italic;
    line-height: 1.4;
    height: 32px;
    overflow: hidden;
}

/* SIDEBAR FOOTER & LOGOUT (v62.4.3) */
.sidebar-footer-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    font-size: 9px;
    opacity: 0.6;
    padding-bottom: 5px;
}

.sidebar-footer-links a {
    color: white;
    text-decoration: none;
}

.sidebar-suite-tag {
    font-size: 10px;
    opacity: 0.4;
    text-align: center;
    padding-bottom: 5px;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.sidebar-debug-tag {
    margin: 0 15px 5px 15px;
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.3;
    text-align: center;
}

.logout-container {
    padding: 10px 15px 30px 15px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.logout-btn-premium {
    width: 100%;
    padding: 10px;
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
}

.logout-btn-premium:hover {
    background: rgba(231, 76, 60, 0.2);
    border-color: #e74c3c;
}

/* HEADER & THEME TOGGLE */
.header-title-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.page-title {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -1px;
    color: #0f172a; /* Color por defecto modo claro */
    transition: color 0.3s ease;
}

.dark-mode .page-title {
    color: #ffffff !important;
}

.theme-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-toggle-label {
    font-size: 11px;
    font-weight: bold;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.theme-toggle-pill {
    background: var(--white);
    border: 1px solid var(--border-color);
    color: var(--text-dark);
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* SUBSCRIPTION BANNERS & MONITORS */
.active-plan-banner-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 8px 25px; /* Altura 10% más reducida (v62.4.6) */
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 25px;
    min-height: 80px; /* Estabilización compacta (v62.4.6) */
    overflow: hidden;
    position: relative;
}

.banner-icon-v3 {
    width: 60px; /* Tamaño reducido para el nuevo banner */
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(0,0,0,0.4);
    flex-shrink: 0;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.2);
}

.banner-icon-v3 img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    transform: scale(0.9);
    transition: all 0.3s ease;
}

.banner-text-content {
    flex: 1;
    color: white;
}

.banner-title-v3 {
    font-weight: 800;
    font-size: 18px; /* Fuente ligeramente más pequeña */
    margin-bottom: 3px;
    letter-spacing: 0.5px;
}

.banner-msg-v3 {
    font-size: 15px;
    opacity: 0.95;
    font-weight: 500;
}

.banner-btn-v3 {
    background: white;
    color: #667eea;
    border: none;
    padding: 12px 28px;
    border-radius: 10px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
    font-size: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
    flex-shrink: 0; /* Evitar que se aplaste o se estire */
}

.banner-btn-v3:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(0,0,0,0.25);
}

.monitor-sync-placeholder {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
    background: rgba(0,0,0,0.1);
    border-radius: 16px;
    border: 1px dashed rgba(255,255,255,0.1);
}

.phi-monitor-card-wrapper {
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
}

/* ROADMAP STYLES (v62.4.3) */
#plan-roadmap-bar {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: rgba(0, 0, 0, 0.4);
    padding: 15px;
    border-radius: 15px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.plan-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 25%;
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0.4;
    filter: grayscale(0.8);
}

.plan-step.active {
    opacity: 1 !important;
    filter: grayscale(0) !important;
    transform: scale(1.15);
}

.plan-step img {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    object-fit: cover;
}

.plan-step span {
    color: white;
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 1px;
}

.plan-step.active .neon-pulse {
    position: absolute;
    top: 0;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    box-shadow: 0 0 15px #39FF14, inset 0 0 10px #39FF14;
    animation: neon-breathing 1.5s infinite ease-in-out;
    z-index: -1;
    display: none; /* Se activa por JS */
}

.plan-connector {
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    flex-grow: 1;
    margin: 0 -10px;
    z-index: 0;
}

@keyframes neon-breathing-roadmap {
    0% { transform: scale(0.95); opacity: 0.5; box-shadow: 0 0 10px #39FF14; }
    50% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 30px #39FF14, 0 0 50px rgba(57, 20, 20, 0.4); }
    100% { transform: scale(0.95); opacity: 0.5; box-shadow: 0 0 10px #39FF14; }
}

/* [v66.9.0] SOVEREIGN DROPDOWN SYSTEM */
.sovereign-dropdown { position: relative; width: 100%; z-index: 10001; }
.dropdown-trigger { background: #2c3e50; color: white; border: 1px solid rgba(255,255,255,0.2); padding: 10px 12px; border-radius: 10px; font-size: 13px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: all 0.3s; }
.dropdown-trigger:hover { border-color: #bfff00; box-shadow: 0 0 10px rgba(191,255,0,0.2); }
.dropdown-menu { position: absolute; top: calc(100% + 5px); left: 0; width: 100%; background: #1a202c; border: 1px solid rgba(191,255,0,0.3); border-radius: 12px; box-shadow: 0 10px 25px rgba(0,0,0,0.5); z-index: 10002; overflow: hidden; animation: dropdown-fade 0.3s ease-out; }
.dropdown-item { padding: 10px 15px; font-size: 13px; color: #cbd5e0; cursor: pointer; transition: all 0.2s; border-bottom: 1px solid rgba(255,255,255,0.05); display: flex; align-items: center; gap: 10px; }
.dropdown-item:last-child { border-bottom: none; }
.dropdown-item:hover { background: rgba(191,255,0,0.1); color: #bfff00; padding-left: 20px; }
.dropdown-item.active { background: rgba(191,255,0,0.2); color: #bfff00; font-weight: 800; border-left: 3px solid #bfff00; }
@keyframes dropdown-fade { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* [v66.9.17] SOVEREIGN MODAL STANDARDIZATION */
.modal-sovereign {
    z-index: 100005 !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}


