/* Advanced Tile Dashboard Styles */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Roboto+Mono:wght@300;400;500;700&display=swap');

.tile-dashboard {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(15, 23, 42, 0.95) 0%, 
        rgba(30, 41, 59, 0.95) 50%, 
        rgba(51, 65, 85, 0.95) 100%);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    overflow: hidden;
    font-family: 'Roboto Mono', monospace;
}

/* Dashboard Header */
.dashboard-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 15px 30px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    backdrop-filter: blur(10px);
}

.dashboard-status {
    display: flex;
    align-items: center;
    gap: 20px;
    font-family: 'Roboto Mono', monospace;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 12px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #666;
    animation: pulse 2s infinite;
}

.status-dot.online {
    background: var(--accent-green);
    box-shadow: 0 0 10px var(--accent-green);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Tab Navigation Controls */
.tab-navigation-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.tab-nav-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.tab-nav-btn:hover {
    background: rgba(51, 65, 85, 0.9);
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-1px);
}

.tab-nav-btn.active {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
    border-color: var(--accent-blue);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.tab-nav-btn i {
    font-size: 11px;
    opacity: 0.8;
}

.tab-nav-btn span {
    font-family: 'Roboto Mono', monospace;
    letter-spacing: 0.3px;
}

/* Responsive tab navigation */
@media (max-width: 768px) {
    .tab-navigation-controls {
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .tab-nav-btn {
        padding: 6px 8px;
        font-size: 10px;
    }
    
    .tab-nav-btn span {
        display: none;
    }
    
    .tab-nav-btn i {
        font-size: 12px;
    }
}

.last-update {
    color: var(--text-secondary);
    font-size: 11px;
}

/* Tile Grid */
.tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    padding: 30px;
    height: calc(100vh - 140px);
    overflow-y: auto;
    scroll-behavior: smooth;
}

.tile-grid::-webkit-scrollbar {
    width: 8px;
}

.tile-grid::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.tile-grid::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
    border-radius: 4px;
}

.tile-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.5);
}

/* Dashboard Tiles */
.dashboard-tile {
    background: linear-gradient(135deg, 
        rgba(15, 23, 42, 0.9) 0%, 
        rgba(30, 41, 59, 0.9) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    min-height: 500px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.dashboard-tile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dashboard-tile:hover::before {
    opacity: 1;
}

.dashboard-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 212, 255, 0.2);
    border-color: rgba(0, 212, 255, 0.4);
}

.dashboard-tile.large {
    grid-column: span 2;
    min-height: 400px;
}

.dashboard-tile.medium {
    min-height: 350px;
}

.dashboard-tile.expanded {
    position: fixed;
    top: 50px;
    left: 50px;
    right: 50px;
    bottom: 50px;
    z-index: 1000;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

/* Tile Header */
.tile-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 20px 0;
    margin-bottom: 15px;
}

.tile-title h3 {
    font-family: 'Orbitron', monospace;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px 0;
    letter-spacing: 0.5px;
}

.tile-subtitle {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    opacity: 0.8;
}

.tile-controls {
    display: flex;
    gap: 8px;
}

.tile-refresh,
.tile-expand {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px 8px;
    font-size: 12px;
    transition: all 0.3s ease;
}

.tile-refresh:hover,
.tile-expand:hover {
    background: rgba(0, 212, 255, 0.2);
    color: var(--accent-cyan);
    border-color: rgba(0, 212, 255, 0.4);
}

/* Tile Content */
.tile-content {
    padding: 0 20px;
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
}

.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: var(--text-secondary);
}

.pulse-loader {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 212, 255, 0.3);
    border-top: 3px solid var(--accent-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Tile Footer */
.tile-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.update-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.update-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #666;
    transition: background-color 0.3s ease;
}

/* Heatmap Styles */
.heatmap-container {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.venue-blueprint {
    flex: 1;
    background: radial-gradient(circle at center, rgba(0, 50, 100, 0.1), rgba(0, 20, 40, 0.3));
    border-radius: 8px;
    padding: 10px;
}

.heatmap-legend {
    display: flex;
    justify-content: space-around;
    padding: 15px 0 0;
    margin-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    color: var(--text-secondary);
}

.legend-color {
    width: 12px;
    height: 8px;
    border-radius: 2px;
}

.legend-color.low { background: #51cf66; }
.legend-color.medium { background: #ffd93d; }
.legend-color.high { background: #ff6b6b; }

/* XS Nightclub specific styles */
.xs-zone {
    transition: all 0.3s ease;
}

.xs-zone:hover {
    stroke-width: 2;
    filter: brightness(1.3);
}

.crowd-indicator {
    transition: all 0.2s ease;
}

.venue-outline {
    animation: subtle-glow 4s ease-in-out infinite alternate;
}

/* Heat overlay styles */
.heat-circle {
    transition: opacity 0.5s ease;
}

.flow-dot {
    filter: drop-shadow(0 0 2px rgba(251, 191, 36, 0.8));
}

.heatmap-container {
    position: relative;
    overflow: hidden;
    height: 100%;
}

.venue-blueprint {
    position: relative;
    height: 300px;
    background: radial-gradient(circle at center, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.95) 100%);
    border-radius: 8px;
    overflow: hidden;
}

.floor-plan-background {
    position: absolute;
    top: 0;
    left: 0;
    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9ImJvbGQiIHRleHQtYW5jaG9yPSJtaWRkbGUiPlJFU1RST09NUzwvdGV4dD4KICAKICA8IS0tIFhTIExvZ28gLS0+CiAgPHRleHQgeD0iNTAiIHk9IjgwIiBmaWxsPSIjOGI1Y2Y2IiBmb250LXNpemU9IjM2IiBmb250LXdlaWdodD0iYm9sZCIgZm9udC1mYW1pbHk9IkFyaWFsIj5YUzwvdGV4dD4KICA8dGV4dCB4PSI1MCIgeT0iMTAwIiBmaWxsPSIjNjQ3NDhiIiBmb250LXNpemU9IjEyIiBmb250LWZhbWlseT0iQXJpYWwiPlRIRSBOSUdIVENMVUIgQVQgRU5DT1JFPC90ZXh0Pgo8L3N2Zz4K');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.7;
    z-index: 1;
}

@keyframes subtle-glow {
    0% { filter: drop-shadow(0 0 3px rgba(147, 51, 234, 0.3)); }
    100% { filter: drop-shadow(0 0 8px rgba(147, 51, 234, 0.6)); }
}

@keyframes heat-pulse {
    0% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 0.9; transform: scale(1.05); }
    100% { opacity: 0.7; transform: scale(1); }
}

/* Network Styles */
.network-container {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.network-stats {
    display: flex;
    justify-content: space-around;
    padding: 15px 0 0;
    margin-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-label {
    font-size: 9px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-cyan);
    font-family: 'Orbitron', monospace;
}

/* Device Grid Styles */
.device-grid-container {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.grid-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.grid-summary {
    display: flex;
    gap: 20px;
    font-size: 12px;
}

.online-count {
    color: var(--accent-green);
    font-weight: 600;
}

.offline-count {
    color: var(--accent-red);
    font-weight: 600;
}

.device-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 8px;
    flex: 1;
}

.device-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
}

.device-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.device-item.online {
    border-color: rgba(81, 207, 102, 0.5);
}

.device-item.warning {
    border-color: rgba(255, 217, 61, 0.5);
}

.device-item.offline {
    border-color: rgba(255, 107, 107, 0.5);
}

.device-icon {
    font-size: 16px;
    color: var(--text-secondary);
}

.device-status-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #666;
}

.device-item.online .device-status-dot {
    background: var(--accent-green);
    box-shadow: 0 0 6px var(--accent-green);
}

.device-item.warning .device-status-dot {
    background: var(--accent-yellow);
    box-shadow: 0 0 6px var(--accent-yellow);
}

.device-item.offline .device-status-dot {
    background: var(--accent-red);
    box-shadow: 0 0 6px var(--accent-red);
}

.device-label {
    font-size: 8px;
    color: var(--text-secondary);
    text-align: center;
}

/* Occupancy Matrix Styles */
.occupancy-matrix {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.matrix-grid {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.zone-occupancy {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 12px;
    border-left: 4px solid #666;
    transition: all 0.3s ease;
}

.zone-occupancy.normal {
    border-left-color: var(--accent-green);
}

.zone-occupancy.warning {
    border-left-color: var(--accent-yellow);
}

.zone-occupancy.critical {
    border-left-color: var(--accent-red);
}

.zone-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.zone-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.zone-percentage {
    font-size: 14px;
    font-weight: 700;
    font-family: 'Orbitron', monospace;
}

.zone-occupancy.normal .zone-percentage {
    color: var(--accent-green);
}

.zone-occupancy.warning .zone-percentage {
    color: var(--accent-yellow);
}

.zone-occupancy.critical .zone-percentage {
    color: var(--accent-red);
}

.occupancy-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
}

.occupancy-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-green), var(--accent-yellow), var(--accent-red));
    border-radius: 4px;
    transition: width 0.5s ease;
}

.zone-stats {
    font-size: 10px;
    color: var(--text-secondary);
    text-align: right;
}

.capacity-legend {
    display: flex;
    justify-content: space-around;
    padding: 15px 0 0;
    margin-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.capacity-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 9px;
    color: var(--text-secondary);
}

.capacity-bar {
    width: 20px;
    height: 4px;
    border-radius: 2px;
}

.capacity-bar.normal { background: var(--accent-green); }
.capacity-bar.warning { background: var(--accent-yellow); }
.capacity-bar.critical { background: var(--accent-red); }

/* Pressure Gauge Styles */
.pressure-gauge-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: center;
}

.gauge-readout {
    text-align: center;
    margin-top: 10px;
}

.pressure-value {
    font-size: 32px;
    font-weight: 900;
    font-family: 'Orbitron', monospace;
    color: var(--accent-cyan);
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.pressure-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 5px;
}

/* Incident Radar Styles */
.incident-radar-container {
    display: flex;
    gap: 20px;
    height: 100%;
}

.incident-feed {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.incident-item {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    padding: 8px 10px;
    border-left: 3px solid #666;
    font-size: 11px;
}

.incident-item.high {
    border-left-color: var(--accent-red);
}

.incident-item.medium {
    border-left-color: var(--accent-yellow);
}

.incident-item.low {
    border-left-color: var(--accent-green);
}

.incident-time {
    color: var(--text-secondary);
    font-size: 9px;
    margin-bottom: 2px;
}

.incident-type {
    color: var(--text-primary);
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .tile-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 15px;
        padding: 20px;
    }
    
    .dashboard-tile.large {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        gap: 15px;
        padding: 15px 20px;
    }
    
    .tab-navigation {
        width: 100%;
        justify-content: space-around;
    }
    
    .tab-btn {
        min-width: 60px;
        padding: 8px 12px;
    }
    
    .tab-btn i {
        font-size: 14px;
    }
    
    .tab-btn span {
        font-size: 8px;
    }
    
    .tile-grid {
        grid-template-columns: 1fr;
        padding: 15px;
        height: calc(100vh - 180px);
    }
    
    .dashboard-tile {
        min-height: 300px;
    }
}

/* Glassmorphism Effects */
.dashboard-tile {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.125);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Glow Effects */
.tile-title h3 {
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.stat-value {
    text-shadow: 0 0 15px currentColor;
}

/* Additional Animation */
@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.dashboard-tile::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 0.8s ease;
}

.dashboard-tile:hover::after {
    left: 100%;
}

/* Floor Selector Styles */
.floor-selector {
    display: flex;
    gap: 8px;
    align-items: center;
}

.floor-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 16px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.floor-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.floor-btn.active {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

/* Sunburst wrapper with corner tiles */
.sunburst-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sunburst-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 85%;
    height: 85%;
    max-width: 700px;
    max-height: 700px;
    z-index: 1;
}

.sunburst-svg {
    width: 100%;
    height: 100%;
}

/* Corner tiles positioning */
.corner-tile {
    position: absolute;
    width: 140px;
    height: 100px;
    z-index: 2;
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.corner-tile.top-left {
    top: 15px;
    left: 15px;
}

.corner-tile.top-right {
    top: 15px;
    right: 15px;
}

.corner-tile.bottom-left {
    bottom: 40px;
    left: 15px;
}

.corner-tile.bottom-right {
    bottom: 40px;
    right: 15px;
}

.sunburst-tooltip {
    position: absolute !important;
    background: rgba(0,0,0,0.9) !important;
    color: white !important;
    padding: 8px 12px !important;
    border-radius: 6px !important;
    font-size: 12px !important;
    pointer-events: none !important;
    z-index: 1000 !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3) !important;
}

/* Flow Grid Tile Styles */
.flow-controls {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.flow-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #666;
    background: rgba(255,255,255,0.1);
    padding: 4px 8px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.flow-grid-container {
    height: 300px;
    padding: 10px;
    overflow: hidden;
}

.flow-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(8, 1fr);
    gap: 2px;
    height: 100%;
    width: 100%;
}

.flow-cell {
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.flow-cell:hover {
    transform: scale(1.1);
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.flow-arrow {
    font-size: 8px;
    color: rgba(255,255,255,0.8);
    transition: transform 0.5s ease;
}

.flow-cell.high .flow-arrow {
    animation: pulse 2s infinite;
}

.flow-cell.medium .flow-arrow {
    animation: pulse 3s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; transform: scale(1) rotate(var(--rotation, 0deg)); }
    50% { opacity: 1; transform: scale(1.2) rotate(var(--rotation, 0deg)); }
}

/* Enhanced tile header styles */
.tile-header {
    padding: 10px 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 15px;
}

/* Sensor Stats Grid Styles */
.sensor-stats-container {
    padding: 15px;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.sensor-tiles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 12px;
    flex: 1;
    min-height: 500px;
}

.sensor-tile {
    background: linear-gradient(135deg, 
        rgba(30, 41, 59, 0.9) 0%, 
        rgba(51, 65, 85, 0.9) 100%);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.sensor-tile:hover {
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.sensor-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.sensor-header h4 {
    margin: 0;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.2;
}

.sensor-header h4 i {
    font-size: 12px;
    opacity: 0.8;
}

.sensor-value {
    font-size: 14px;
    font-weight: 700;
    font-family: 'Orbitron', monospace;
    color: #60a5fa;
    text-shadow: 0 0 4px rgba(96, 165, 250, 0.5);
}

.sensor-chart {
    flex: 1;
    min-height: 60px;
    max-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 8px 0;
}

.sensor-chart canvas {
    max-width: 100%;
    max-height: 100%;
}

.sensor-status {
    font-size: 9px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 6px;
    border-radius: 4px;
    text-align: center;
    margin-top: 4px;
}

/* Sensor-specific status colors */
#noise-levels .sensor-status {
    background: rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
    border: 1px solid rgba(255, 107, 107, 0.3);
}

#bac-monitoring .sensor-status {
    background: rgba(255, 212, 59, 0.2);
    color: #ffd43b;
    border: 1px solid rgba(255, 212, 59, 0.3);
}

#crowd-density .sensor-status {
    background: rgba(81, 207, 102, 0.2);
    color: #51cf66;
    border: 1px solid rgba(81, 207, 102, 0.3);
}

#satisfaction-rating .sensor-status {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

#gender-distribution .sensor-status {
    background: rgba(236, 72, 153, 0.2);
    color: #ec4899;
    border: 1px solid rgba(236, 72, 153, 0.3);
}

#spending-patterns .sensor-status {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

#temperature-humidity .sensor-status {
    background: rgba(168, 85, 247, 0.2);
    color: #a855f7;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

#queue-wait-times .sensor-status {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

#energy-consumption .sensor-status {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

#security-alerts .sensor-status {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

#staff-efficiency .sensor-status {
    background: rgba(99, 102, 241, 0.2);
    color: #6366f1;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

#air-quality .sensor-status {
    background: rgba(20, 184, 166, 0.2);
    color: #14b8a6;
    border: 1px solid rgba(20, 184, 166, 0.3);
}

/* Responsive sensor grid */
@media (max-width: 1200px) {
    .sensor-tiles-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(4, 1fr);
    }
}

@media (max-width: 900px) {
    .sensor-tiles-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(6, 1fr);
    }
}

@media (max-width: 768px) {
    .sensor-tiles-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(12, 1fr);
        gap: 10px;
    }
    
    .sensor-tile {
        min-height: 100px;
        padding: 10px;
    }
    
    .sensor-header h4 {
        font-size: 10px;
    }
}

/* Capacity tiles styling */
.capacity-tile {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 12px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.capacity-tile:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.capacity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.capacity-header h4 {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: #e5e7eb;
}

.capacity-status {
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 8px;
    font-weight: 500;
    text-transform: uppercase;
}

.capacity-status.normal { background: #22c55e; color: white; }
.capacity-status.good { background: #10b981; color: white; }
.capacity-status.active { background: #f59e0b; color: white; }
.capacity-status.steady { background: #06b6d4; color: white; }

.capacity-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 6px;
    font-family: 'Orbitron', monospace;
}

.capacity-chart {
    height: 45px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

@media (max-width: 768px) {
    .corner-tile {
        width: 120px;
        height: 100px;
    }
    
    .capacity-header h4 {
        font-size: 0.7rem;
    }
    
    .capacity-value {
        font-size: 1rem;
    }
    
    .sensor-value {
        font-size: 12px;
    }
}
