* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: #0a0a0a;
    color: #e0e0e0;
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 240px;
    height: 100vh;
    background: linear-gradient(180deg, #1a1a1a 0%, #0f0f0f 100%);
    padding: 30px 20px;
    box-shadow: 4px 0 20px rgba(0,255,0,0.1);
}

.brand {
    margin-bottom: 40px;
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0,255,0,0.2);
}

.brand h1 {
    font-size: 1.8em;
    font-weight: 700;
    background: linear-gradient(45deg, #00ff88, #00cc6a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 5px;
}

.brand p {
    font-size: 0.9em;
    color: #888;
}

.sidebar ul li a {
    color: #ccc;
    text-decoration: none;
    display: block;
    padding: 15px 20px;
    border-radius: 12px;
    transition: all 0.3s;
    margin: 5px 0;
}

.sidebar ul li.active a, .sidebar ul li a:hover {
    background: rgba(0,255,0,0.1);
    color: #00ff88;
}

.main {
    margin-left: 260px;
    padding: 30px;
    height: 100vh;
    overflow-y: auto;
    background: #0a0a0a;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.top-bar h2 {
    font-size: 2em;
    color: #fff;
}

.status-indicator {
    color: #00ff88;
    font-weight: 500;
}

.status-dot {
    width: 12px;
    height: 12px;
    background: #00ff88;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
    animation: pulse 2s infinite;
}

.status-dot.offline {
    background: #ff4444;
    animation: none;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.metrics-line {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    overflow-x: auto;
    padding-bottom: 20px;
}

.metric-card {
    background: rgba(30,30,30,0.8);
    padding: 25px;
    border-radius: 15px;
    min-width: 150px;
    text-align: center;
    flex-shrink: 0;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(0,255,0,0.3);
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,255,0,0.2);
}

.metric-icon {
    font-size: 1em;
    margin-bottom: 10px;
}

.metric-value {
    font-size: 2em;
    font-weight: 700;
    color: #00ff88;
    margin-bottom: 5px;
}

.metric-label {
    font-size: 0.85em;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.metric-status {
    height: 6px;
    border-radius: 3px;
    margin-top: 10px;
}

.metric-status.normal { background: rgba(0,255,0,0.5); }
.metric-status.danger { background: rgba(255,0,0,0.6); animation: pulse 1s infinite; }

.alert-container {
    background: rgba(255,100,100,0.2);
    border: 1px solid rgba(255,0,0,0.4);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.alert-icon {
    font-size: 1.5em;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

.charts-section {
    display: flex;
    gap: 30px;
}

.chart-card {
    background: rgba(30,30,30,0.8);
    padding: 30px;
    border-radius: 20px;
    flex: 1;
    border: 1px solid rgba(0,255,0,0.3);
}

.chart-card h3 {
    margin-bottom: 20px;
    color: #fff;
}

.chart-wrapper {
    height: 400px;
}

.logs-card {
    background: rgba(30,30,30,0.8);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid rgba(0,255,0,0.3);
}

.logs-card h3 {
    margin-bottom: 20px;
    color: #fff;
}

.table-container {
    max-height: 500px;
    overflow-y: auto;
}

#logsTable, #scheduleHistoryTable {
    width: 100%;
    border-collapse: collapse;
}

#logsTable th, #scheduleHistoryTable th {
    background: rgba(0,255,0,0.2);
    color: #00ff88;
    padding: 15px;
    text-align: left;
}

#logsTable td, #scheduleHistoryTable td {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

#logsTable tr:hover, #scheduleHistoryTable tr:hover {
    background: rgba(0,255,0,0.05);
}

.schedule-section {
    margin-bottom: 30px;
}

.schedule-card {
    background: rgba(30,30,30,0.8);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid rgba(0,255,0,0.3);
}

.schedule-card h3 {
    margin-bottom: 20px;
    color: #fff;
}

.schedule-form {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 0.9em;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.input-group input[type="time"],
.input-group input[type="text"] {
    background: rgba(10,10,10,0.8);
    border: 1px solid rgba(0,255,0,0.3);
    color: #00ff88;
    padding: 10px 15px;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 1.1em;
    outline: none;
    transition: box-shadow 0.3s;
}

.input-group input[type="time"]:focus,
.input-group input[type="text"]:focus {
    box-shadow: 0 0 10px rgba(0,255,136,0.5);
    border-color: #00ff88;
}

.input-group input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(1) hue-rotate(120deg);
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(45deg, #00ff88, #00cc6a);
    color: #000;
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1em;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    height: 47px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,255,136,0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

@media (max-width: 1400px) {
    .charts-section {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .sidebar { width: 200px; }
    .main { margin-left: 200px; }
    .metrics-line { flex-direction: column; }
}
