/* CSS for Premium Matrix Dashboard */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body, html {
    background: #05070a;
    color: #e2e8f0;
    height: 100vh;
    overflow: hidden;
}

#waveCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.dash-container {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 10px 30px 30px 30px;
    background: radial-gradient(circle at 50% 0%, rgba(21, 28, 48, 0.4) 0%, rgba(9, 10, 15, 0) 70%);
    z-index: 1;
}

/* Header Sections */
.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.dash-title h1 {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(90deg, #fff, #a5b4fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.dash-title p {
    font-size: 14px;
    color: #64748b;
    font-weight: 400;
}

#liveClock {
    color: #94a3b8;
    font-weight: 500;
}

/* KPIs */
.dash-kpi-container {
    display: flex;
    gap: 30px;
}

.kpi-box {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    padding: 15px 25px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    backdrop-filter: blur(10px);
}

.kpi-icon {
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

.kpi-icon.running {
    background-color: #10b981;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.6);
}

.kpi-icon.offline {
    background-color: #475569;
    box-shadow: 0 0 15px rgba(71, 85, 105, 0.4);
}

.kpi-chart {
    width: 70px;
    height: 70px;
}

.kpi-data {
    display: flex;
    flex-direction: column;
}

.kpi-val {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.kpi-label {
    font-size: 12px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Grid System */
.grid-content {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    overflow-y: auto;
    padding-right: 15px;
    padding-bottom: 20px;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.02);
}
::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
}

/* High-end Equipment Cards */
.eq-card {
    position: relative;
    background: rgba(20, 25, 40, 0.4);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 20px;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.eq-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y), rgba(255,255,255,0.06), transparent 40%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 0;
}

.eq-card:hover {
    transform: translateY(-5px) scale(1.02);
    background: rgba(25, 30, 50, 0.6);
    border-color: rgba(255,255,255,0.1);
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
}

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

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 1;
}

.eq-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.eq-badge.running {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.eq-badge.offline {
    background: rgba(148, 163, 184, 0.1);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.room-badge {
    font-size: 10px;
    font-weight: 500;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 3px 10px;
    border-radius: 12px;
    letter-spacing: 0.3px;
}

.card-body {
    z-index: 1;
    margin-top: 10px;
}

.eq-header-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
    gap: 8px;
}

.eq-name {
    font-size: 18px;
    font-weight: 700;
    color: #ccfbf1; /* Very light mint */
    line-height: 1.2;
    margin-bottom: 0;
}

.eq-id-tag {
    font-size: 11px;
    font-weight: 600;
    color: #475569;
    font-family: 'JetBrains Mono', 'Monaco', monospace;
    background: rgba(0,0,0,0.2);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.05);
}

.eq-details {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    padding-bottom: 4px;
}

.detail-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.lbl {
    color: #64748b;
}

.val {
    color: #cbd5e1;
    font-weight: 500;
    text-align: right;
    max-width: 65%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Card Glow FX - Intensified */
@keyframes pulse-glow {
    0% { 
        box-shadow: 0 0 15px rgba(16, 185, 129, 0.2), inset 0 0 10px rgba(16, 185, 129, 0.1); 
        border-color: rgba(16, 185, 129, 0.3); 
    }
    50% { 
        box-shadow: 0 0 45px rgba(16, 185, 129, 0.6), inset 0 0 25px rgba(16, 185, 129, 0.2); 
        border-color: rgba(16, 185, 129, 0.7); 
    }
    100% { 
        box-shadow: 0 0 15px rgba(16, 185, 129, 0.2), inset 0 0 10px rgba(16, 185, 129, 0.1); 
        border-color: rgba(16, 185, 129, 0.3); 
    }
}

.eq-card.running {
    animation: pulse-glow 4s infinite ease-in-out;
}

.eq-card.running:hover {
    animation-play-state: paused;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5), inset 0 0 30px rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.8);
}

/* Image Display Box - Optimized for size */
.card-image-box {
    margin-top: 12px;
    flex: 1; /* Allow it to grow and fill available space */
    width: 100%;
    min-height: 140px; /* Ensure a decent minimum size */
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: center;
    align-items: center;
}

.card-image-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.4s;
}

.eq-card:hover .card-image-box img {
    transform: scale(1.05);
}