/* style.css */
:root {
    --primary-color: #28a745;
    --secondary-color: #6c757d;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --sidebar-width: 250px;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, var(--primary-color) 0%, #1e7e34 100%);
    color: white;
    padding: 20px 0;
    z-index: 1000;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

.sidebar-header {
    padding: 0 20px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h3 {
    font-weight: 600;
    margin: 0;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 0;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(255,255,255,0.1);
    color: white;
    border-left: 4px solid white;
}

.sidebar-menu i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 20px;
    min-height: 100vh;
}

.header {
    background: white;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Cards */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-2px);
}

.card-header {
    background: white;
    border-bottom: 1px solid #eee;
    padding: 15px 20px;
    font-weight: 600;
}

/* Temperature/Humidity Cards */
.temp-card {
    border-left: 4px solid var(--danger-color);
}

.humidity-card {
    border-left: 4px solid var(--info-color);
}

/* Charts */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Tables */
.table-container {
    overflow-x: auto;
}

.table th {
    font-weight: 600;
    background-color: #f8f9fa;
    border-top: none;
}

/* Status Indicators */
.status-active {
    color: var(--primary-color);
    font-weight: 600;
}

.status-inactive {
    color: var(--secondary-color);
}

.status-alarm {
    color: var(--danger-color);
    animation: blink 1s infinite;
}

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

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    color: var(--secondary-color);
    font-size: 0.9em;
    border-top: 1px solid #dee2e6;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 70px;
    }
    
    .sidebar-header h3,
    .sidebar-menu span {
        display: none;
    }
    
    .sidebar-menu a {
        justify-content: center;
        padding: 15px;
    }
    
    .sidebar-menu i {
        margin-right: 0;
        font-size: 1.2em;
    }
    
    .main-content {
        margin-left: 70px;
    }
}

@media (max-width: 576px) {
    .main-content {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 1.5em;
    }
}