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

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: #f1f5f9;
    color: #0f172a;
}

body.oscuro {
    background: #0b1120;
    color: #e2e8f0;
}

.pantalla-login {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.tarjeta-login {
    background: #ffffff;
    width: 340px;
    padding: 32px;
    border-radius: 14px;
    box-shadow: 0 20px 45px rgba(2, 6, 23, .18);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.oscuro .tarjeta-login {
    background: #111c33;
    box-shadow: 0 20px 45px rgba(0, 0, 0, .5);
}

.tarjeta-login h1 { font-size: 22px; }
.tarjeta-login .sub { font-size: 13px; opacity: .7; margin-bottom: 8px; }
.tarjeta-login label { font-size: 13px; font-weight: 600; margin-top: 6px; }

.tarjeta-login input {
    padding: 11px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    font-size: 14px;
}

.tarjeta-login button, .boton {
    margin-top: 14px;
    padding: 12px;
    border: 0;
    border-radius: 8px;
    background: #2563eb;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    display: inline-block;
}

.aviso {
    margin-top: 12px;
    padding: 10px;
    background: rgba(239, 68, 68, .14);
    border: 1px solid rgba(239, 68, 68, .4);
    border-radius: 8px;
    font-size: 13px;
    text-align: center;
}

.barra {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 28px;
    background: #111c33;
    border-bottom: 1px solid #1e293b;
}

.marca { font-weight: 700; letter-spacing: .4px; }
.barra nav a {
    color: #94a3b8;
    text-decoration: none;
    margin-left: 20px;
    font-size: 14px;
}
.barra nav a.activo, .barra nav a:hover { color: #e2e8f0; }

.tarjetas {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 22px 28px;
}

.tarjeta {
    background: #111c33;
    border: 1px solid #1e293b;
    border-radius: 12px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tarjeta .etiqueta { font-size: 13px; color: #94a3b8; }
.tarjeta strong { font-size: 26px; }

.semaforo {
    border: 2px solid #22c55e;
    transition: all .4s ease;
}
.semaforo strong { font-size: 24px; }

.rejilla {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 0 28px 22px;
}

.panel {
    background: #111c33;
    border: 1px solid #1e293b;
    border-radius: 12px;
    padding: 18px 20px;
    margin: 0 28px 22px;
}
.rejilla .panel { margin: 0; }
.panel h2 { font-size: 15px; margin-bottom: 14px; color: #cbd5e1; }

.lista { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.lista li {
    display: flex;
    justify-content: space-between;
    padding: 8px 10px;
    background: #0b1120;
    border-radius: 8px;
    font-size: 14px;
}

.tabla { width: 100%; border-collapse: collapse; font-size: 13px; }
.tabla th, .tabla td {
    text-align: left;
    padding: 9px 10px;
    border-bottom: 1px solid #1e293b;
}
.tabla th { color: #94a3b8; font-weight: 600; }

.pildora {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

.sev-CRITICA td { background: rgba(239, 68, 68, .08); }
.sev-ALTA td { background: rgba(249, 115, 22, .07); }

.contenedor { padding: 24px 28px; display: flex; flex-direction: column; gap: 16px; }
.vacio { opacity: .6; }

.incidente {
    background: #111c33;
    border: 1px solid #1e293b;
    border-radius: 12px;
    padding: 18px 20px;
}
.cabecera-incidente {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.cabecera-incidente strong { margin: 0 8px; }
.cabecera-incidente small { color: #94a3b8; }
.desc { margin: 12px 0; font-size: 14px; opacity: .85; }

.linea-tiempo { list-style: none; border-left: 2px solid #1e293b; margin: 10px 0; padding-left: 16px; }
.linea-tiempo li { margin-bottom: 12px; font-size: 14px; }
.linea-tiempo .fase {
    display: inline-block;
    background: #1e293b;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    margin-right: 8px;
}
.linea-tiempo small { display: block; color: #64748b; font-size: 12px; margin-top: 3px; }

.form-accion {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}
.form-accion select, .form-accion input {
    padding: 9px 11px;
    background: #0b1120;
    border: 1px solid #1e293b;
    border-radius: 8px;
    color: inherit;
    font-size: 13px;
}
.form-accion input { flex: 1; min-width: 180px; }
.form-accion button {
    padding: 9px 18px;
    border: 0;
    border-radius: 8px;
    background: #2563eb;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.estado-abierto { color: #ef4444; font-weight: 600; font-size: 13px; }
.estado-en_proceso { color: #f59e0b; font-weight: 600; font-size: 13px; }
.estado-cerrado { color: #22c55e; font-weight: 600; font-size: 13px; }

@media (max-width: 760px) {
    .tarjetas, .rejilla { grid-template-columns: 1fr; }
}
