/* =====================================================
   TELEGESTIÓN ALUMBRADO - DEMO EJECUTIVA v2.0
   Estilos Premium con Animaciones Avanzadas
   ===================================================== */

:root {
    --primary: #00d4ff;
    --primary-dark: #0099cc;
    --secondary: #7c3aed;
    --accent: #f59e0b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    --bg-dark: #0a0e17;
    --bg-darker: #050810;
    --bg-card: rgba(15, 23, 42, 0.9);
    --bg-glass: rgba(255, 255, 255, 0.03);

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --border-color: rgba(255, 255, 255, 0.08);
    --glow-primary: 0 0 30px rgba(0, 212, 255, 0.4);
    --glow-secondary: 0 0 30px rgba(124, 58, 237, 0.4);

    --gradient-primary: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    --gradient-accent: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);

    --font-main: 'Inter', sans-serif;
    --font-display: 'Orbitron', sans-serif;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --transition-fast: 0.2s ease;
    --transition-medium: 0.4s ease;
    --transition-slow: 0.8s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background: var(--bg-darker);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== EFECTOS DE FONDO ===== */
.bg-effects {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
}

.stars,
.twinkling {
    position: absolute;
    inset: 0;
    background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="1" fill="white" opacity="0.5"/></svg>') repeat;
    background-size: 200px 200px;
}

.twinkling {
    animation: twinkle 200s linear infinite;
    opacity: 0.3;
}

.particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0;
    animation: floatParticle 15s linear infinite;
}

.rain-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    transition: opacity 1s ease;
}

.rain-container.active {
    opacity: 1;
}

.rain-drop {
    position: absolute;
    width: 2px;
    height: 20px;
    background: linear-gradient(transparent, rgba(174, 194, 224, 0.5));
    animation: rain 0.5s linear infinite;
}

/* ===== INTRO OVERLAY ===== */
.intro-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-darker);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all 1s ease;
}

.intro-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.intro-background {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.intro-grid {
    position: absolute;
    inset: -50%;
    background:
        linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px),
        linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridMove 20s linear infinite;
    transform: perspective(500px) rotateX(60deg);
}

.intro-content {
    text-align: center;
    z-index: 10;
    animation: fadeInUp 1s ease;
}

.company-logo {
    font-size: 5rem;
    color: var(--primary);
    margin-bottom: 2rem;
    animation: pulse-glow 2s ease infinite;
}

.intro-title {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    letter-spacing: 8px;
}

.intro-subtitle {
    font-size: 1.8rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.intro-features {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.feature-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.feature-pill i {
    color: var(--primary);
}

.intro-description {
    max-width: 500px;
    margin: 0 auto 2rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.intro-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-start,
.btn-presentation {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all var(--transition-medium);
}

.btn-start {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--glow-primary);
}

.btn-start:hover {
    transform: scale(1.05);
    box-shadow: 0 0 50px rgba(0, 212, 255, 0.6);
}

.btn-presentation {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--primary);
}

.btn-presentation:hover {
    background: var(--primary);
    color: var(--bg-dark);
}

.intro-footer {
    margin-top: 3rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ===== NARRADOR ===== */
.narrator-bar {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    z-index: 100;
    transition: bottom var(--transition-medium);
    backdrop-filter: blur(20px);
    max-width: 800px;
}

.narrator-bar.active {
    bottom: 20px;
}

.narrator-avatar {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.narrator-text {
    flex: 1;
    font-size: 1rem;
    color: var(--text-primary);
    line-height: 1.5;
}

.narrator-controls {
    display: flex;
    gap: 0.5rem;
}

.narrator-btn {
    width: 36px;
    height: 36px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.narrator-btn:hover {
    background: var(--primary);
    color: white;
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 100vh;
}

/* ===== HEADER ===== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-container {
    position: relative;
    font-size: 2rem;
    color: var(--primary);
}

.logo-pulse {
    position: absolute;
    inset: -5px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    animation: pulse 2s ease infinite;
    opacity: 0.5;
}

.header-titles h1 {
    font-size: 1.25rem;
    font-weight: 600;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.header-center {
    display: flex;
    gap: 0.5rem;
}

.quick-stats {
    display: flex;
    gap: 0.5rem;
}

.quick-stat {
    padding: 0.4rem 0.8rem;
    background: var(--bg-glass);
    border-radius: var(--radius-sm);
    text-align: center;
    border: 1px solid var(--border-color);
}

.quick-stat.success {
    border-color: rgba(16, 185, 129, 0.3);
}

.quick-stat.warning {
    border-color: rgba(245, 158, 11, 0.3);
}

.quick-stat.danger {
    border-color: rgba(239, 68, 68, 0.3);
}

.qs-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.quick-stat.success .qs-value {
    color: var(--success);
}

.quick-stat.warning .qs-value {
    color: var(--warning);
}

.quick-stat.danger .qs-value {
    color: var(--danger);
}

.qs-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.weather-widget {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: var(--bg-glass);
    border-radius: var(--radius-sm);
}

.weather-icon {
    color: var(--accent);
}

.weather-temp {
    font-weight: 500;
}

.weather-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
}

.weather-toggle:hover {
    color: var(--primary);
}

.day-night-toggle {
    display: flex;
    background: var(--bg-glass);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.dn-btn {
    padding: 0.5rem 0.75rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.dn-btn.active {
    background: var(--primary);
    color: white;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 50px;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.pulse {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s ease infinite;
}

.status-text {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--success);
}

.time-display {
    text-align: right;
}

.time-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 600;
    font-family: var(--font-display);
    color: var(--primary);
}

.time-date {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ===== CONTROL PANEL ===== */
.control-panel {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.control-group {
    display: flex;
    gap: 0.5rem;
}

.control-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    color: var(--text-primary);
}

.control-btn.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
}

.step-num {
    width: 22px;
    height: 22px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.control-btn.active .step-num {
    background: rgba(0, 0, 0, 0.2);
}

.control-btn.special {
    border-color: var(--secondary);
    color: var(--secondary);
}

.control-btn.special:hover {
    background: var(--secondary);
    color: white;
}

.control-btn.play-all {
    background: var(--gradient-accent);
    color: white;
    border: none;
}

.control-btn.play-all.playing {
    background: var(--danger);
}

/* ===== MAIN LAYOUT ===== */
.main-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 0.75rem;
    flex: 1;
}

/* ===== VISUALIZATION AREA ===== */
.visualization-area {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    min-height: 500px;
}

.sky-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, #0a0e17 0%, #1a1f3c 50%, #2d1f4a 100%);
    transition: background 2s ease;
}

.sky-gradient.day {
    background: linear-gradient(180deg, #87ceeb 0%, #e0f4ff 100%);
}

.celestial-body {
    position: absolute;
    top: 10%;
    right: 15%;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    transition: all 2s ease;
}

.celestial-body.moon {
    background: linear-gradient(135deg, #f5f5f5 0%, #d1d1d1 100%);
    box-shadow: 0 0 50px rgba(255, 255, 255, 0.3);
}

.celestial-body.sun {
    background: linear-gradient(135deg, #ffd93d 0%, #ff9500 100%);
    box-shadow: 0 0 80px rgba(255, 213, 0, 0.5);
}

.moon-glow {
    position: absolute;
    inset: -20px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
}

/* City & Luminaires - continuación en parte 2 */
/* ===== PARTE 2 - CITY & LUMINAIRES ===== */

.city-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 180px;
}

.building {
    position: absolute;
    bottom: 40px;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border-radius: 4px 4px 0 0;
}

.building .windows {
    position: absolute;
    inset: 8px;
    background:
        repeating-linear-gradient(0deg, transparent 0px, transparent 12px, rgba(255, 200, 100, 0.15) 12px, rgba(255, 200, 100, 0.15) 14px),
        repeating-linear-gradient(90deg, transparent 0px, transparent 15px, rgba(255, 200, 100, 0.15) 15px, rgba(255, 200, 100, 0.15) 17px);
}

.b1 {
    left: 2%;
    width: 50px;
    height: 100px;
}

.b2 {
    left: 10%;
    width: 70px;
    height: 160px;
}

.b3 {
    left: 22%;
    width: 45px;
    height: 90px;
}

.b4 {
    right: 25%;
    width: 65px;
    height: 140px;
}

.b5 {
    right: 12%;
    width: 80px;
    height: 180px;
}

.b6 {
    right: 2%;
    width: 55px;
    height: 110px;
}

.street {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: #1a1f2e;
}

.street-markings {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 3px;
    background: repeating-linear-gradient(90deg, #f59e0b 0px, #f59e0b 25px, transparent 25px, transparent 50px);
    opacity: 0.4;
}

.vehicle {
    position: absolute;
    bottom: 8px;
    left: -60px;
    font-size: 2rem;
    color: #64748b;
    animation: driveBy 15s linear infinite;
}

.pedestrian {
    position: absolute;
    bottom: 45px;
    left: 30%;
    font-size: 1.5rem;
    color: #94a3b8;
    opacity: 0;
    transition: all 0.5s ease;
}

.pedestrian.walking {
    opacity: 1;
    animation: walk 8s linear forwards;
}

/* ===== LUMINAIRES ===== */
.luminaires-layer {
    position: absolute;
    bottom: 40px;
    left: 5%;
    right: 5%;
    display: flex;
    justify-content: space-between;
}

.luminaire {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.luminaire:hover {
    transform: scale(1.05);
}

.pole {
    width: 5px;
    height: 90px;
    background: linear-gradient(180deg, #64748b 0%, #475569 100%);
    border-radius: 2px;
}

.lamp-head {
    position: absolute;
    top: -8px;
    width: 45px;
    height: 18px;
    background: linear-gradient(180deg, #94a3b8 0%, #64748b 100%);
    border-radius: 20px 20px 8px 8px;
}

.lamp-light {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    background: radial-gradient(circle, #fef08a 0%, #fbbf24 50%, transparent 70%);
    border-radius: 50%;
    opacity: 0.9;
    transition: all var(--transition-medium);
}

.light-cone {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 60px;
    background: linear-gradient(180deg, rgba(254, 240, 138, 0.3) 0%, transparent 100%);
    clip-path: polygon(30% 0%, 70% 0%, 100% 100%, 0% 100%);
    opacity: 0.5;
    transition: opacity var(--transition-medium);
}

.luminaire.off .lamp-light,
.luminaire.off .light-cone {
    opacity: 0;
}

.luminaire.dimmed .lamp-light {
    opacity: 0.4;
    transform: translateX(-50%) scale(0.7);
}

.luminaire.dimmed .light-cone {
    opacity: 0.2;
}

.controller-chip {
    position: absolute;
    top: 25px;
    right: -22px;
    width: 22px;
    height: 22px;
    background: var(--gradient-primary);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    color: white;
    opacity: 0;
    transform: scale(0);
    transition: all var(--transition-medium);
    box-shadow: var(--glow-primary);
}

.luminaire.show-controller .controller-chip {
    opacity: 1;
    transform: scale(1);
}

.chip-signal {
    position: absolute;
    inset: -4px;
    border: 2px solid var(--primary);
    border-radius: 6px;
    opacity: 0;
    animation: chipPulse 1.5s ease infinite;
}

.luminaire.transmitting .chip-signal {
    opacity: 1;
}

.luminaire-info {
    position: absolute;
    bottom: -50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    opacity: 0;
    transition: all var(--transition-fast);
}

.luminaire:hover .luminaire-info,
.luminaire.highlight .luminaire-info {
    opacity: 1;
}

.lum-id {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary);
    background: rgba(0, 212, 255, 0.15);
    padding: 2px 8px;
    border-radius: 4px;
}

.lum-status {
    font-size: 0.65rem;
    color: var(--success);
}

.lum-power {
    font-size: 0.6rem;
    color: var(--text-muted);
}

.motion-sensor {
    position: absolute;
    top: 40px;
    left: -20px;
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: 0;
    transition: all var(--transition-medium);
}

.luminaire.motion-detected .motion-sensor {
    opacity: 1;
    color: var(--success);
    animation: sensorPulse 0.5s ease infinite;
}

.luminaire.alert {
    animation: alertPulse 0.5s ease infinite;
}

.luminaire.alert .pole {
    background: linear-gradient(180deg, var(--danger) 0%, #7f1d1d 100%);
}

/* ===== GATEWAY ===== */
.gateway-layer {
    position: absolute;
    top: 45%;
    left: 35%;
}

.gateway {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0.3;
    transform: scale(0.8);
    transition: all var(--transition-slow);
}

.gateway.active {
    opacity: 1;
    transform: scale(1);
}

.gateway-tower {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

.antenna {
    width: 4px;
    height: 35px;
    background: linear-gradient(180deg, var(--primary) 0%, #475569 100%);
    border-radius: 2px;
    position: relative;
}

.antenna::after {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary);
}

.gateway-box {
    width: 90px;
    height: 55px;
    background: linear-gradient(180deg, #334155 0%, #1e293b 100%);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 2px solid var(--primary);
    box-shadow: var(--glow-primary);
}

.gateway-leds {
    display: flex;
    gap: 5px;
}

.led {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #475569;
}

.led-power {
    background: var(--success);
    box-shadow: 0 0 5px var(--success);
}

.led-rx {
    animation: ledBlink 0.4s ease infinite;
}

.led-tx {
    animation: ledBlink 0.3s ease 0.15s infinite;
}

.led-status {
    background: var(--success);
}

.gateway-box i {
    font-size: 1.3rem;
    color: var(--primary);
}

.gateway-label {
    margin-top: 8px;
    text-align: center;
}

.gw-name {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
}

.gw-model {
    display: block;
    font-size: 0.65rem;
    color: var(--text-muted);
}

.gw-stats {
    display: block;
    font-size: 0.6rem;
    color: var(--success);
    margin-top: 4px;
}

.signal-waves {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.wave {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid var(--primary);
    border-radius: 50%;
    opacity: 0;
}

.gateway.active .wave {
    animation: waveExpand 2s ease-out infinite;
}

.wave:nth-child(2) {
    animation-delay: 0.6s;
}

.wave:nth-child(3) {
    animation-delay: 1.2s;
}

/* ===== SERVER ===== */
.server-layer {
    position: absolute;
    top: 12%;
    left: 45%;
}

.cloud-server {
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0.3;
    transform: scale(0.8);
    transition: all var(--transition-slow);
}

.cloud-server.active {
    opacity: 1;
    transform: scale(1);
}

.cloud-container {
    position: relative;
}

.cloud-shape {
    font-size: 3.5rem;
    color: var(--secondary);
    text-shadow: 0 0 30px var(--secondary);
}

.server-rack {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.rack-unit {
    width: 22px;
    height: 5px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 2px;
    display: flex;
    align-items: center;
    padding-left: 2px;
}

.rack-led {
    width: 3px;
    height: 3px;
    background: var(--success);
    border-radius: 50%;
    animation: ledBlink 0.8s ease infinite;
}

.server-label {
    margin-top: 10px;
    text-align: center;
}

.srv-name {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
}

.srv-model {
    display: block;
    font-size: 0.65rem;
    color: var(--text-muted);
}

.srv-stats {
    display: block;
    font-size: 0.6rem;
    color: var(--secondary);
    margin-top: 4px;
}

.data-processing {
    display: flex;
    gap: 4px;
    margin-top: 6px;
}

.process-dot {
    width: 6px;
    height: 6px;
    background: var(--secondary);
    border-radius: 50%;
    animation: processPulse 1.2s ease infinite;
}

.process-dot:nth-child(2) {
    animation-delay: 0.3s;
}

.process-dot:nth-child(3) {
    animation-delay: 0.6s;
}

/* ===== CONTROL CENTER ===== */
.control-center-layer {
    position: absolute;
    top: 10%;
    right: 8%;
}

.control-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0.3;
    transform: scale(0.8);
    transition: all var(--transition-slow);
}

.control-center.active {
    opacity: 1;
    transform: scale(1);
}

.monitor-setup {
    display: flex;
    gap: 8px;
}

.monitor {
    background: #1e293b;
    border-radius: 6px;
    padding: 4px;
    border: 2px solid #334155;
}

.main-monitor {
    width: 70px;
    height: 50px;
}

.side-monitor {
    width: 45px;
    height: 50px;
}

.monitor-screen {
    width: 100%;
    height: 85%;
    background: #0f172a;
    border-radius: 3px;
    overflow: hidden;
}

.monitor-base {
    width: 60%;
    height: 4px;
    background: #334155;
    margin: 2px auto 0;
    border-radius: 0 0 2px 2px;
}

.mini-map {
    width: 100%;
    height: 100%;
    position: relative;
    background: linear-gradient(90deg, rgba(0, 212, 255, 0.05) 1px, transparent 1px),
        linear-gradient(rgba(0, 212, 255, 0.05) 1px, transparent 1px);
    background-size: 8px 8px;
}

.map-dot {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--success);
    border-radius: 50%;
    animation: mapBlink 1.5s ease infinite;
}

.chart-display {
    height: 100%;
    padding: 4px;
}

.chart-line {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent 0%, var(--primary) 20%, var(--secondary) 50%, var(--accent) 80%, transparent 100%);
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 30'%3E%3Cpath d='M0,25 Q10,20 20,22 T40,15 T60,18 T80,10 T100,15' stroke='white' fill='none' stroke-width='2'/%3E%3C/svg%3E");
    mask-size: 100% 100%;
    animation: chartFlow 3s linear infinite;
}

.desk {
    width: 100px;
    height: 8px;
    background: #475569;
    border-radius: 2px;
    margin-top: -2px;
}

.operator {
    position: relative;
    margin-top: 8px;
}

.operator-body {
    font-size: 1.8rem;
    color: var(--text-secondary);
}

.operator-action {
    position: absolute;
    top: 0;
    right: -15px;
    font-size: 0.8rem;
    color: var(--primary);
    opacity: 0;
    animation: clickAction 2s ease infinite;
}

.control-center.active .operator-action {
    opacity: 1;
}

.cc-label {
    margin-top: 8px;
    text-align: center;
}

.cc-name {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
}

.cc-model {
    display: block;
    font-size: 0.65rem;
    color: var(--text-muted);
}

/* ===== CONNECTION LINES ===== */
.connection-lines {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.data-line {
    fill: none;
    stroke: var(--primary);
    stroke-width: 2;
    stroke-dasharray: 8 4;
    opacity: 0;
    transition: opacity var(--transition-medium);
    filter: url(#glow);
}

.data-line.active {
    opacity: 0.7;
    animation: dashFlow 1s linear infinite;
}

.line-gw-server {
    stroke: var(--secondary);
}

.line-server-cc {
    stroke: var(--accent);
}

/* ===== INFO LABELS ===== */
.info-labels {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.info-label {
    position: absolute;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border-radius: 20px;
    font-size: 0.7rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    border: 1px solid var(--border-color);
    opacity: 0;
    transform: translateY(10px);
    transition: all var(--transition-medium);
}

.info-label.visible {
    opacity: 1;
    transform: translateY(0);
}

.info-label i {
    margin-bottom: 2px;
}

.protocol-detail {
    font-size: 0.55rem;
    color: var(--text-muted);
}

#label-lorawan {
    top: 65%;
    left: 18%;
    color: var(--primary);
    border-color: rgba(0, 212, 255, 0.3);
}

#label-4g {
    top: 30%;
    left: 35%;
    color: var(--secondary);
    border-color: rgba(124, 58, 237, 0.3);
}

#label-https {
    top: 8%;
    right: 20%;
    color: var(--accent);
    border-color: rgba(245, 158, 11, 0.3);
}

/* ===== ENERGY SAVINGS FLOAT ===== */
.energy-savings-float {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-md);
    opacity: 0;
    transform: translateX(-20px);
    transition: all var(--transition-medium);
}

.energy-savings-float.visible {
    opacity: 1;
    transform: translateX(0);
}

.esf-icon {
    font-size: 1.5rem;
    color: var(--success);
}

.esf-content {
    display: flex;
    flex-direction: column;
}

.esf-label {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.esf-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--success);
}

.esf-kwh {
    font-size: 0.7rem;
    color: var(--success);
}
/* ===== PARTE 3 - SIDE PANEL, TIMELINE, FOOTER & ANIMATIONS ===== */

/* ===== SIDE PANEL ===== */
.side-panel {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border-color);
}

.panel-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 0.75rem 0.5rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.7rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.panel-tab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.panel-tab.active {
    color: var(--primary);
    background: rgba(0, 212, 255, 0.1);
}

.panel-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
}

.panel-tab i {
    font-size: 1rem;
}

.tab-badge {
    position: absolute;
    top: 5px;
    right: 15%;
    min-width: 16px;
    height: 16px;
    background: var(--danger);
    border-radius: 8px;
    font-size: 0.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.tab-badge:empty,
.tab-badge[data-count="0"] {
    display: none;
}

.panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.panel-content.hidden {
    display: none;
}

/* Info Sections */
.info-section {
    display: none;
    animation: fadeIn 0.4s ease;
}

.info-section.active {
    display: block;
}

.info-section h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
}

.info-section p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.stat-item {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    text-align: center;
}

.stat-item.success {
    border-color: rgba(16, 185, 129, 0.3);
}

.stat-item.accent {
    border-color: rgba(245, 158, 11, 0.3);
}

.stat-icon {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 0.25rem;
    display: block;
}

.stat-item.success .stat-icon {
    color: var(--success);
}

.stat-item.accent .stat-icon {
    color: var(--accent);
}

.stat-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-item.success .stat-value {
    background: var(--gradient-success);
    -webkit-background-clip: text;
}

.stat-item.accent .stat-value {
    color: var(--accent);
    -webkit-text-fill-color: var(--accent);
}

.stat-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.benefits-list h5,
.features-grid h5,
.cap-grid h5 {
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.benefits-list ul {
    list-style: none;
}

.benefits-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.benefits-list i {
    color: var(--success);
    font-size: 0.75rem;
}

/* Equipment Cards */
.equipment-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.equipment-card.highlight {
    border-color: var(--primary);
}

.eq-image {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.eq-details {
    flex: 1;
}

.eq-brand {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
}

.eq-model {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.specs-table {
    margin-bottom: 1rem;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.8rem;
}

.spec-label {
    color: var(--text-muted);
}

.spec-value {
    color: var(--text-primary);
    font-weight: 500;
}

.note {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
}

.note.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.alt-option {
    padding: 0.5rem;
    background: rgba(124, 58, 237, 0.1);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
}

.alt-label {
    color: var(--text-muted);
}

.alt-name {
    color: var(--secondary);
    font-weight: 500;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.6rem;
    background: var(--bg-glass);
    border-radius: var(--radius-sm);
    text-align: center;
}

.feature-item i {
    font-size: 1rem;
    color: var(--primary);
}

.feature-item span {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.cap-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.cap-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.6rem;
    background: var(--bg-glass);
    border-radius: var(--radius-sm);
    text-align: center;
}

.cap-icon {
    width: 32px;
    height: 32px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: white;
}

.cap-item span {
    font-size: 0.65rem;
    color: var(--text-muted);
}

/* ===== ALERTS PANEL ===== */
.alerts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.alerts-header h4 {
    margin-bottom: 0;
}

.btn-clear-alerts {
    padding: 0.4rem 0.8rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.75rem;
    cursor: pointer;
}

.btn-clear-alerts:hover {
    color: var(--danger);
    border-color: var(--danger);
}

.alerts-list {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.no-alerts {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.no-alerts i {
    font-size: 2rem;
    color: var(--success);
}

.alert-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-glass);
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    border-left: 3px solid var(--danger);
    animation: slideInRight 0.3s ease;
}

.alert-item.warning {
    border-left-color: var(--warning);
}

.alert-item.info {
    border-left-color: var(--info);
}

.alert-icon {
    width: 28px;
    height: 28px;
    background: rgba(239, 68, 68, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--danger);
    font-size: 0.8rem;
}

.alert-item.warning .alert-icon {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.alert-item.info .alert-icon {
    background: rgba(59, 130, 246, 0.2);
    color: var(--info);
}

.alert-content {
    flex: 1;
}

.alert-title {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.alert-desc {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.alert-time {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.alert-types {
    margin-top: 1rem;
}

.alert-types h5 {
    font-size: 0.8rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.alert-type-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.alert-type-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
}

.alert-type-icon.critical {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.alert-type-icon.warning {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.alert-type-icon.info {
    background: rgba(59, 130, 246, 0.2);
    color: var(--info);
}

.alert-type-icon.danger {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

/* ===== ENERGY PANEL ===== */
.energy-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.energy-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-glass);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.ec-icon {
    font-size: 1.5rem;
}

.energy-card.consumption .ec-icon {
    color: var(--accent);
}

.energy-card.savings .ec-icon {
    color: var(--success);
}

.ec-data {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px;
}

.ec-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.ec-unit {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.ec-label {
    width: 100%;
    font-size: 0.65rem;
    color: var(--text-muted);
}

.energy-chart {
    margin-bottom: 1rem;
}

.energy-chart h5 {
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.chart-container {
    padding: 0.5rem;
    background: var(--bg-glass);
    border-radius: var(--radius-sm);
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 80px;
}

.chart-bar {
    flex: 1;
    background: var(--gradient-primary);
    border-radius: 3px 3px 0 0;
    height: calc(var(--height) * 0.8);
    min-height: 4px;
    position: relative;
    transition: height 0.5s ease;
}

.chart-bar.active {
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

.chart-bar span {
    position: absolute;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.55rem;
    color: var(--text-muted);
}

.energy-comparison {
    margin-top: 1rem;
}

.energy-comparison h5 {
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.comparison-bars {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.comp-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comp-label {
    width: 100px;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.comp-track {
    flex: 1;
    height: 12px;
    background: var(--bg-glass);
    border-radius: 6px;
    overflow: hidden;
}

.comp-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 1s ease;
}

.comp-fill.old {
    background: #475569;
}

.comp-fill.new {
    background: var(--gradient-success);
}

.comp-value {
    width: 80px;
    font-size: 0.7rem;
    color: var(--text-primary);
    text-align: right;
}

.savings-highlight {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(16, 185, 129, 0.1);
    border-radius: var(--radius-sm);
    margin-top: 0.75rem;
    color: var(--success);
    font-size: 0.85rem;
    font-weight: 600;
}

/* ===== MAINTENANCE PANEL ===== */
.maintenance-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.maint-stat {
    padding: 0.75rem;
    background: var(--bg-glass);
    border-radius: var(--radius-sm);
    text-align: center;
}

.ms-value {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--success);
}

.ms-label {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.work-orders {
    margin-bottom: 1rem;
}

.work-orders h5 {
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.work-order {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem;
    background: var(--bg-glass);
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
}

.work-order.completed {
    opacity: 0.6;
}

.wo-status {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.wo-status.pending {
    background: var(--warning);
}

.wo-status.in-progress {
    background: var(--info);
    animation: pulse 1s ease infinite;
}

.wo-status.completed {
    background: var(--success);
}

.wo-content {
    flex: 1;
}

.wo-id {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.wo-desc {
    display: block;
    font-size: 0.8rem;
    color: var(--text-primary);
}

.wo-date {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.wo-priority {
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
}

.wo-priority.high {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.wo-priority.medium {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.wo-priority.low {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.predictive-maintenance h5 {
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.prediction-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem;
    background: var(--bg-glass);
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
}

.pred-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.pred-icon.warning {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.pred-icon.info {
    background: rgba(59, 130, 246, 0.2);
    color: var(--info);
}

.pred-content {
    flex: 1;
}

.pred-title {
    display: block;
    font-size: 0.8rem;
    color: var(--text-primary);
}

.pred-detail {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.btn-schedule {
    width: 28px;
    height: 28px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-muted);
    cursor: pointer;
}

.btn-schedule:hover {
    color: var(--primary);
    border-color: var(--primary);
}

/* ===== TIMELINE ===== */
.animation-timeline {
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.timeline-labels {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-align: center;
}

.timeline-track {
    position: relative;
    height: 50px;
    background: var(--bg-glass);
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 5%;
}

.timeline-progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 25px;
    width: 0%;
    transition: width 0.5s ease;
    opacity: 0.3;
}

.timeline-marker {
    position: relative;
    z-index: 1;
    cursor: pointer;
}

.marker-icon {
    width: 36px;
    height: 36px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.timeline-marker:hover .marker-icon {
    border-color: var(--primary);
    color: var(--primary);
}

.timeline-marker.active .marker-icon {
    background: var(--gradient-primary);
    border-color: var(--primary);
    color: white;
    box-shadow: var(--glow-primary);
}

.marker-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.4rem 0.6rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-fast);
    margin-bottom: 5px;
}

.timeline-marker:hover .marker-tooltip {
    opacity: 1;
}

.marker-tooltip strong {
    display: block;
    font-size: 0.65rem;
    color: var(--primary);
}

.marker-tooltip span {
    font-size: 0.6rem;
    color: var(--text-muted);
}

/* ===== FOOTER ===== */
.demo-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.legend {
    display: flex;
    gap: 1.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.legend-color {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

.legend-color.lorawan {
    background: var(--primary);
}

.legend-color.cellular {
    background: var(--secondary);
}

.legend-color.internet {
    background: var(--accent);
}

.tech-badges {
    display: flex;
    gap: 0.5rem;
}

.tech-badge {
    padding: 0.3rem 0.6rem;
    background: var(--bg-glass);
    border-radius: 4px;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.credits {
    text-align: right;
}

.credit-main {
    display: block;
    font-size: 0.8rem;
    color: var(--text-primary);
    font-weight: 500;
}

.credit-sub {
    font-size: 0.65rem;
    color: var(--text-muted);
}

/* ===== MODAL ===== */
.alert-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-medium);
}

.alert-modal.active {
    opacity: 1;
    visibility: visible;
}

.alert-modal-content {
    background: var(--bg-card);
    border: 1px solid var(--danger);
    border-radius: var(--radius-lg);
    max-width: 400px;
    width: 90%;
    animation: modalBounce 0.5s ease;
}

.alert-modal-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(239, 68, 68, 0.1);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.alert-modal-header i {
    font-size: 2rem;
    color: var(--danger);
    animation: shake 0.5s ease;
}

.alert-modal-header h3 {
    color: var(--danger);
}

.alert-modal-body {
    padding: 1.5rem;
}

.alert-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

.btn-acknowledge {
    width: 100%;
    padding: 0.75rem;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-acknowledge:hover {
    opacity: 0.9;
}

/* ===== TOAST ===== */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 999;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    min-width: 280px;
    animation: slideInRight 0.3s ease, fadeOut 0.3s ease 4.7s forwards;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.toast.success {
    border-left: 3px solid var(--success);
}

.toast.warning {
    border-left: 3px solid var(--warning);
}

.toast.error {
    border-left: 3px solid var(--danger);
}

.toast.info {
    border-left: 3px solid var(--info);
}

.toast-icon {
    font-size: 1.2rem;
}

.toast.success .toast-icon {
    color: var(--success);
}

.toast.warning .toast-icon {
    color: var(--warning);
}

.toast.error .toast-icon {
    color: var(--danger);
}

.toast.info .toast-icon {
    color: var(--info);
}

.toast-content {
    flex: 1;
}

.toast-title {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.toast-message {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ===== KEYFRAMES ===== */
@keyframes twinkle {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-200px);
    }
}

@keyframes floatParticle {
    0% {
        opacity: 0;
        transform: translateY(100vh);
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 0;
        transform: translateY(-100vh);
    }
}

@keyframes rain {
    to {
        transform: translateY(100vh);
    }
}

@keyframes gridMove {
    from {
        transform: perspective(500px) rotateX(60deg) translateY(0);
    }

    to {
        transform: perspective(500px) rotateX(60deg) translateY(60px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.5);
        opacity: 0;
    }
}

@keyframes pulse-glow {

    0%,
    100% {
        filter: drop-shadow(0 0 10px var(--primary));
    }

    50% {
        filter: drop-shadow(0 0 30px var(--primary));
    }
}

@keyframes chipPulse {

    0%,
    100% {
        opacity: 0;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.3);
    }
}

@keyframes sensorPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

@keyframes alertPulse {

    0%,
    100% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(1.5);
    }
}

@keyframes driveBy {
    from {
        left: -60px;
    }

    to {
        left: 110%;
    }
}

@keyframes walk {
    from {
        left: 30%;
    }

    to {
        left: 70%;
    }
}

@keyframes ledBlink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.2;
    }
}

@keyframes waveExpand {
    0% {
        width: 20px;
        height: 20px;
        opacity: 0.8;
    }

    100% {
        width: 180px;
        height: 180px;
        opacity: 0;
    }
}

@keyframes processPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.4);
        opacity: 0.6;
    }
}

@keyframes mapBlink {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 5px var(--success);
    }

    50% {
        opacity: 0.4;
        box-shadow: none;
    }
}

@keyframes chartFlow {
    from {
        mask-position: -100% 0;
    }

    to {
        mask-position: 100% 0;
    }
}

@keyframes clickAction {

    0%,
    100% {
        transform: translate(0, 0);
        opacity: 0;
    }

    50% {
        transform: translate(-3px, 3px);
        opacity: 1;
    }
}

@keyframes dashFlow {
    to {
        stroke-dashoffset: -24;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes modalBounce {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    70% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .main-layout {
        grid-template-columns: 1fr;
    }

    .side-panel {
        order: 10;
        max-height: 400px;
    }

    .header-center {
        display: none;
    }
}

@media (max-width: 768px) {
    .header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .control-panel {
        flex-wrap: wrap;
    }

    .control-group {
        flex-wrap: wrap;
        justify-content: center;
    }

    .demo-footer {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .legend {
        flex-wrap: wrap;
        justify-content: center;
    }

    .intro-title {
        font-size: 2.5rem;
        letter-spacing: 4px;
    }

    .intro-features {
        gap: 0.5rem;
    }

    .feature-pill {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
}
