/* style.css */
:root {
    --sidebar-bg: #1e293b;
    --main-bg: #f1f5f9;
    --primary: #0056b3;
    --accent: #ff9900;
    --danger: #ef4444;
    --success: #10b981;
}

body { margin: 0; font-family: 'Inter', sans-serif; background: var(--main-bg); height: 100vh; overflow: hidden; }

/* UTILIDADES */
.oculto { display: none !important; }

/* 1. LOGIN */
.login-container {
    height: 100vh; display: flex; justify-content: center; align-items: center;
    background: linear-gradient(135deg, #0056b3 0%, #002a4d 100%);
}
.login-card {
    background: white; padding: 40px; border-radius: 20px; width: 350px; text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}
.login-card input {
    width: 100%; padding: 12px; margin: 10px 0; border: 1px solid #ddd; border-radius: 8px; box-sizing: border-box;
}
.login-card button {
    width: 100%; padding: 12px; background: var(--primary); color: white; border: none; border-radius: 8px;
    font-weight: bold; cursor: pointer; margin-top: 10px;
}

/* 2. LAYOUT DASHBOARD */
.dashboard-layout { display: flex; height: 100vh; }

/* SIDEBAR */
.sidebar { width: 250px; background: var(--sidebar-bg); color: white; display: flex; flex-direction: column; }
.brand { padding: 20px; font-size: 1.5rem; font-weight: 800; border-bottom: 1px solid rgba(255,255,255,0.1); }
.sidebar nav { flex-grow: 1; padding-top: 20px; }

.nav-btn {
    width: 100%; background: none; border: none; color: #94a3b8; padding: 15px 20px;
    text-align: left; font-size: 1rem; cursor: pointer; display: flex; gap: 10px; align-items: center;
    transition: 0.2s;
}
.nav-btn:hover, .nav-btn.active { color: white; background: rgba(255,255,255,0.05); border-right: 3px solid var(--accent); }
.logout-area { padding: 20px; border-top: 1px solid rgba(255,255,255,0.1); }
.logout-btn { background: rgba(255,0,0,0.1); color: #ff9999; border: none; width: 100%; padding: 10px; border-radius: 8px; cursor: pointer; }

/* CONTENIDO PRINCIPAL */
.main-content { flex-grow: 1; padding: 30px; overflow-y: auto; }
header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }

/* TARJETAS DE ESTADÍSTICAS */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 30px; }
.stat-card { background: white; padding: 20px; border-radius: 15px; display: flex; align-items: center; gap: 20px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.icon-box { width: 60px; height: 60px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; color: white; }
.blue { background: var(--primary); }
.orange { background: var(--accent); }
.purple { background: #8e44ad; }
.stat-number { font-size: 2rem; font-weight: 800; color: #333; }
.stat-card h3 { margin: 0; color: #888; font-size: 0.9rem; }

/* PANEL DE CONTROL (SWITCH) */
.control-panel { background: white; padding: 30px; border-radius: 15px; border-left: 5px solid var(--danger); box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.switch-container { margin-top: 20px; display: flex; align-items: center; }

/* EL INTERRUPTOR CSS */
.switch { position: relative; display: inline-block; width: 60px; height: 34px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; }
.slider:before { position: absolute; content: ""; height: 26px; width: 26px; left: 4px; bottom: 4px; background-color: white; transition: .4s; }
input:checked + .slider { background-color: var(--danger); } /* Rojo cuando está activo el mantenimiento */
input:checked + .slider:before { transform: translateX(26px); }
.slider.round { border-radius: 34px; }
.slider.round:before { border-radius: 50%; }

/* BADGES */
.badge-success { background: #d1fae5; color: #065f46; padding: 5px 10px; border-radius: 20px; font-weight: bold; font-size: 0.8rem; }
.badge-danger { background: #fee2e2; color: #991b1b; padding: 5px 10px; border-radius: 20px; font-weight: bold; font-size: 0.8rem; }