:root {
    --primary-bg: #e0e5ec;
    --sidebar-bg: rgba(255, 255, 255, 0.7);
    --card-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(255, 255, 255, 0.8);
    --text-main: #2d3748;
    --text-muted: #718096;
    --accent-blue: #3182ce;
    --accent-green: #38a169;
    --accent-red: #e53e3e;
    --shadow-soft: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--primary-bg);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Animated Gradient Background */
.background-anim {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        #e0e5ec 0%,
        #f0f4f8 25%,
        #dbe4f0 50%,
        #e2e8f0 75%,
        #edf2f7 100%
    );
    z-index: -1;
    animation: gradientFlow 15s ease infinite;
}

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

.dashboard-container {
    display: flex;
    min-height: 100vh;
    padding: 20px;
    gap: 20px;
}

/* Glassmorphism utility */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    padding: 24px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.15);
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: var(--sidebar-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-blue);
    margin-bottom: 50px;
}

.logo i {
    font-size: 2rem;
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.nav-links li a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    border-radius: 12px;
    transition: all 0.3s;
}

.nav-links li.active a, .nav-links li a:hover {
    background: white;
    color: var(--accent-blue);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--sidebar-bg);
    backdrop-filter: blur(15px);
    padding: 20px 30px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
}

.header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.btn {
    padding: 10px 20px;
    border-radius: 10px;
    border: none;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #3182ce, #2b6cb0);
    color: white;
    box-shadow: 0 4px 15px rgba(49, 130, 206, 0.3);
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(49, 130, 206, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #38a169, #2f855a);
    color: white;
    box-shadow: 0 4px 15px rgba(56, 161, 105, 0.3);
    width: 100%;
    justify-content: center;
}

.btn-success:hover {
    transform: scale(1.02);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--accent-green);
    background: rgba(56, 161, 105, 0.1);
    padding: 8px 15px;
    border-radius: 20px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-green);
}

.pulse {
    animation: pulseAnim 2s infinite;
}

@keyframes pulseAnim {
    0% { box-shadow: 0 0 0 0 rgba(56, 161, 105, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(56, 161, 105, 0); }
    100% { box-shadow: 0 0 0 0 rgba(56, 161, 105, 0); }
}

/* KPI Cards */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.kpi-card {
    display: flex;
    align-items: center;
    gap: 20px;
}

.kpi-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
}

.temp-icon { background: linear-gradient(135deg, #ed8936, #dd6b20); }
.hum-icon { background: linear-gradient(135deg, #4299e1, #3182ce); }
.wifi-icon { background: linear-gradient(135deg, #9f7aea, #805ad5); }

.kpi-title {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 5px;
}

.kpi-value {
    font-size: 1.8rem;
    font-weight: 700;
}

/* Main Grid */
.main-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.card-header h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-container {
    height: 350px;
    position: relative;
    width: 100%;
}

/* OTA Area */
.ota-body p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.file-upload-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.file-input {
    display: none;
}

.file-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    color: var(--text-muted);
}

.file-label:hover {
    border-color: var(--accent-blue);
    background: white;
    color: var(--accent-blue);
}

.ota-btn {
    margin-top: 10px;
}

.progress-container {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    margin-top: 15px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: var(--accent-blue);
    transition: width 0.3s;
}

.status-msg {
    margin-top: 15px;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
}

/* Responsive */
@media (max-width: 992px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dashboard-container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px;
    }
    .logo { margin-bottom: 0; }
    .nav-links {
        flex-direction: row;
    }
    .nav-links li a span { display: none; }
}
\n.kpi-value { overflow-wrap: anywhere; }\n@media (max-width: 900px) { .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }\n