* { box-sizing: border-box; }
body { margin:0; font-family:Arial,Helvetica,sans-serif; background:#f2f5f8; color:#263238; }
.encabezado { background:linear-gradient(135deg,#263238,#455a64); color:white; padding:32px 6%; box-shadow:0 3px 12px rgba(0,0,0,.12); }
.marca { display:inline-block; background:white; color:#37474f; font-weight:bold; padding:7px 13px; border-radius:7px; margin-bottom:12px; }
.encabezado h1 { margin:0 0 8px; font-size:30px; }
.encabezado p { margin:0; opacity:.85; }
.contenedor { width:92%; max-width:1200px; margin:30px auto 50px; }
.tarjeta { background:white; border-radius:14px; box-shadow:0 5px 20px rgba(38,50,56,.08); padding:24px; margin-bottom:25px; }
.titulo-seccion { display:flex; justify-content:space-between; align-items:center; gap:20px; margin-bottom:20px; }
.titulo-seccion h2 { margin:0 0 6px; font-size:21px; }
.titulo-seccion p { margin:0; color:#718096; }
.contador { background:#eceff1; padding:8px 12px; border-radius:20px; white-space:nowrap; font-size:14px; }
.tabla-contenedor { overflow-x:auto; }
table { width:100%; border-collapse:collapse; }
th { background:#37474f; color:white; text-align:left; padding:13px; font-size:14px; }
td { padding:13px; border-bottom:1px solid #e6eaed; font-size:14px; }
tr:hover td { background:#f8fafb; }
.acciones-tabla { display:flex; flex-wrap:wrap; gap:7px; }
.sin-registros,.sin-dispositivos { text-align:center; color:#78909c; padding:30px; }
.boton { display:inline-block; border:0; border-radius:7px; padding:10px 16px; font-weight:bold; text-decoration:none; cursor:pointer; font-size:14px; transition:.2s; }
.editar { background:#e0f2f1; color:#00695c; }
.editar:hover { background:#b2dfdb; }
.luces { background:#fff3cd; color:#7a5a00; }
.luces:hover { background:#ffe69c; }
.agregar { background:#ffffff; color:#37474f; border:1px solid #cfd8dc; }
.agregar:hover { background:#eceff1; }
.guardar { background:#37474f; color:white; }
.guardar:hover { background:#263238; }
.cancelar { background:#eceff1; color:#37474f; }
.formulario { display:grid; grid-template-columns:repeat(2,1fr); gap:20px; }
.campo { display:flex; flex-direction:column; gap:7px; }
.campo label { font-weight:bold; font-size:14px; }
.campo input,.selector-dispositivo select { width:100%; border:1px solid #cfd8dc; border-radius:7px; padding:12px; font-size:15px; outline:none; background:white; }
.campo input:focus,.selector-dispositivo select:focus { border-color:#607d8b; box-shadow:0 0 0 3px rgba(96,125,139,.12); }
.acciones { grid-column:1/-1; display:flex; gap:10px; margin-top:5px; }
.alerta { padding:13px 16px; border-radius:8px; margin-bottom:20px; font-weight:bold; }
.exito { background:#e8f5e9; color:#2e7d32; }
.error { background:#ffebee; color:#c62828; }
.selector-dispositivo { max-width:600px; display:grid; grid-template-columns:170px 1fr; gap:10px; align-items:center; margin-bottom:15px; }
.selector-dispositivo label { font-weight:bold; }
.dispositivo-activo { background:#eef7f0; border:1px solid #c8e6c9; border-radius:8px; padding:12px 15px; margin-bottom:20px; color:#2e5d34; }
.punto-activo { display:inline-block; width:10px; height:10px; border-radius:50%; background:#43a047; margin-right:7px; }
.luces-tarjeta { overflow:hidden; }
.estado-luces { display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin-bottom:20px; padding:12px 15px; border-radius:9px; background:#f4f7f8; }
.estado-luces span:last-of-type { color:#78909c; font-size:14px; }
.indicador { width:12px; height:12px; border-radius:50%; background:#90a4ae; }
.indicador.activo { background:#fbc02d; box-shadow:0 0 9px rgba(251,192,45,.8); }
.interruptor-general { margin-left:auto; background:#455a64; color:white; }
.interruptor-general:hover { background:#263238; }
.aula { position:relative; max-width:850px; margin:auto; padding:28px 30px 34px; border:5px solid #546e7a; border-radius:12px; background:linear-gradient(rgba(255,255,255,.28) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.28) 1px,transparent 1px),#cfd8dc; background-size:32px 32px; }
.pizarron { width:42%; margin:0 auto 25px; padding:10px; text-align:center; border-radius:5px; background:#37474f; color:white; font-weight:bold; letter-spacing:1px; }
.fila-luces { display:grid; grid-template-columns:repeat(2,1fr); gap:30px; margin:22px 0; }
.luz { min-height:105px; border:2px solid #90a4ae; border-radius:12px; background:#90a4ae; color:#263238; cursor:pointer; display:flex; flex-direction:column; justify-content:center; align-items:center; gap:4px; transition:.25s; }
.luz:hover { transform:translateY(-2px); }
.luz .bombilla { font-size:29px; filter:grayscale(1); opacity:.45; }
.luz.encendida { background:#fff8c5; border-color:#fbc02d; box-shadow:0 0 24px rgba(251,192,45,.55); }
.luz.encendida .bombilla { filter:none; opacity:1; text-shadow:0 0 12px #fbc02d; }
.luz small { opacity:.75; }
.puerta { width:120px; margin:25px 0 0 auto; padding:13px 5px; text-align:center; background:#795548; color:white; border-radius:4px; font-weight:bold; }
footer { text-align:center; color:#78909c; padding:25px; font-size:13px; }
@media(max-width:700px){ .formulario{grid-template-columns:1fr;} .titulo-seccion{align-items:flex-start;flex-direction:column;} .encabezado h1{font-size:24px;} .fila-luces{grid-template-columns:1fr;gap:15px;margin:15px 0;} .aula{padding:20px 15px;} .pizarron{width:70%;} .selector-dispositivo{grid-template-columns:1fr;} .interruptor-general{margin-left:0;width:100%;} }
