* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f4f6f8;
    color: #1f2933;
    font-family: 'Inter', Arial, Helvetica, sans-serif;
}

.contenedor-app {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    min-height: 100vh;
}

.barra-lateral {
    background: #182333;
    color: #fff;
    padding: 18px;
}

.marca {
    display: flex;
    gap: 12px;
    align-items: center;
    min-height: 52px;
    margin-bottom: 18px;
}

.marca strong,
.marca small {
    display: block;
}

.marca small {
    color: #b8c2cc;
    font-size: 12px;
}

.marca-senal {
    width: 12px;
    height: 36px;
    border-radius: 6px;
    background: #22c55e;
}

.menu {
    display: grid;
    gap: 6px;
}

.menu a {
    color: #dbe4ee;
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 8px;
}

.menu a:hover,
.menu a.active {
    background: #26364a;
    color: #fff;
}

.contenido {
    padding: 22px;
    min-width: 0;
}

.encabezado {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.encabezado h1 {
    margin: 0;
    font-size: 28px;
}

.encabezado p {
    margin: 4px 0 0;
    color: #64748b;
}

.acciones-usuario {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.acciones-usuario span {
    color: #52606d;
    font-size: 14px;
    font-weight: 700;
}

.login-cuerpo {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 18px;
}

.login-panel {
    width: min(420px, 100%);
    background: #fff;
    border: 1px solid #e3e8ef;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
    padding: 22px;
}

.login-marca {
    color: #1f2933;
}

.login-marca small {
    color: #64748b;
}

.grid-metricas {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.tarjeta-metrica,
.panel,
.dato {
    background: #fff;
    border: 1px solid #e3e8ef;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.tarjeta-metrica {
    padding: 16px;
}

.tarjeta-metrica span,
.tarjeta-metrica small {
    display: block;
    color: #64748b;
}

.tarjeta-metrica strong {
    display: block;
    font-size: 30px;
    line-height: 1.2;
}

.panel {
    padding: 16px;
    margin-bottom: 16px;
}

.acciones-modulo {
    align-items: center;
    display: flex;
    justify-content: flex-end;
    margin-bottom: 14px;
}

.grid-acciones-agente {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.tarjeta-accion-agente {
    background: #fff;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    display: grid;
    gap: 8px;
    min-height: 190px;
    padding: 14px;
}

.tarjeta-accion-agente h3 {
    font-size: 16px;
    margin: 0;
}

.tarjeta-accion-agente p {
    color: #52606d;
    font-size: 13px;
    line-height: 1.35;
    margin: 0;
}

.icono-accion {
    align-items: center;
    border-radius: 8px;
    display: inline-flex;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.modal-content {
    border: 0;
    border-radius: 8px;
    box-shadow: 0 20px 55px rgba(15, 23, 42, .22);
}

.modal-header {
    background: #f8fafc;
    border-bottom-color: #e5e7eb;
}

.btn i {
    pointer-events: none;
}

.panel-ejecucion {
    border-color: #93c5fd;
    background: #eff6ff;
}

.progreso-comando {
    height: 18px;
    min-width: 180px;
}

.panel h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

.dato {
    padding: 14px;
    min-height: 82px;
    color: #64748b;
}

.dato strong {
    display: block;
    color: #1f2933;
    font-size: 20px;
    margin-top: 6px;
}

.dias {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    align-items: center;
}

.dias label {
    white-space: nowrap;
}

code {
    white-space: normal;
    word-break: break-word;
}

.subtitulo-detalle {
    color: #52606d;
    font-size: 14px;
    font-weight: 700;
    margin: 16px 0 8px;
}

.bloque-detalle {
    background: #111827;
    border-radius: 8px;
    color: #e5e7eb;
    font-size: 13px;
    margin: 0;
    max-height: 260px;
    overflow: auto;
    padding: 12px;
    white-space: pre-wrap;
    word-break: break-word;
}

.table th {
    color: #52606d;
    font-weight: 700;
}

.form-label {
    color: #52606d;
    font-size: 13px;
    font-weight: 700;
}

@media (max-width: 992px) {
    .contenedor-app {
        grid-template-columns: 1fr;
    }

    .barra-lateral {
        position: static;
    }

    .menu {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .grid-metricas {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .grid-acciones-agente {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .contenido {
        padding: 14px;
    }

    .encabezado {
        align-items: flex-start;
        flex-direction: column;
    }

    .menu,
    .grid-metricas,
    .grid-acciones-agente {
        grid-template-columns: 1fr;
    }

    .encabezado h1 {
        font-size: 24px;
    }
}
