/**
 * alu.css - Estilos del modulo de ubicaciones
 * @version 1.0.0
 * @author Equipo ERP
 * @date 2026-06-17
 */

:root {
    --alu-primary: #0f6cbd;
    --alu-primary-dark: #0b4f8a;
    --alu-info: #1d8bb0;
    --alu-success: #1f9d55;
    --alu-warning: #d48b00;
    --alu-danger: #c23b3b;
    --alu-surface: #ffffff;
    --alu-panel: #f6f9fc;
    --alu-line: #d9e3ef;
    --alu-text: #243447;
    --alu-muted: #6b7b8c;
}

.alu-module .content-header {
    padding-bottom: 6px;
}

.alu-kpis .card {
    border: 1px solid var(--alu-line);
    border-left: 5px solid var(--alu-primary);
    border-radius: 10px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.alu-kpis .alu-kpi-card .card-body {
    padding: 14px 16px;
}

.alu-kpi-label {
    display: block;
    color: var(--alu-muted);
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.alu-kpi-value {
    color: var(--alu-text);
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.1;
    margin-top: 8px;
}

.alu-kpi-card.is-total {
    border-left-color: var(--alu-primary);
}

.alu-kpi-card.is-active {
    border-left-color: var(--alu-success);
}

.alu-kpi-card.is-warehouse {
    border-left-color: var(--alu-warning);
}

.alu-kpi-card.is-level {
    border-left-color: var(--alu-info);
}

.alu-kpi-card.is-stock {
    border-left-color: #6b63ff;
}

.alu-kpi-card.is-inactive {
    border-left-color: var(--alu-danger);
}

.alu-shell-card,
.alu-chart-card,
.alu-guidelines-card {
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.alu-shell-card .card-header,
.alu-chart-card .card-header,
.alu-guidelines-card .card-header {
    background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
    border-bottom: 1px solid var(--alu-line);
}

.alu-filter-row {
    margin-bottom: 10px;
}

.alu-filter-help {
    background: linear-gradient(135deg, #f7fbff 0%, #eef7ff 100%);
}

.alu-chart-surface {
    height: 300px;
    width: 100%;
}

.alu-tree-surface {
    min-height: 300px;
    max-height: 460px;
    overflow: auto;
    padding-right: 4px;
}

.alu-chart-empty {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--alu-muted);
    font-weight: 600;
    text-align: center;
}

.alu-tree-warehouse + .alu-tree-warehouse {
    margin-top: 16px;
}

.alu-tree-warehouse-head {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 14px;
    border: 1px solid var(--alu-line);
    border-left: 4px solid var(--alu-primary);
    border-radius: 12px;
    background: linear-gradient(135deg, #f7fbff 0%, #eef5fd 100%);
    margin-bottom: 12px;
}

.alu-tree-warehouse-head strong {
    color: var(--alu-primary-dark);
    font-size: 0.92rem;
    letter-spacing: 0.04em;
}

.alu-tree-warehouse-head span {
    color: var(--alu-muted);
    font-size: 0.88rem;
}

.alu-tree-root,
.alu-tree-children {
    list-style: none;
    margin: 0;
    padding-left: 0;
}

.alu-tree-children {
    margin-left: 18px;
    padding-left: 18px;
    border-left: 2px dashed #c8d8ea;
}

.alu-tree-node {
    position: relative;
}

.alu-tree-node + .alu-tree-node {
    margin-top: 12px;
}

.alu-tree-card {
    position: relative;
    padding: 12px 14px;
    border: 1px solid var(--alu-line);
    border-left: 4px solid var(--alu-info);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.alu-tree-node.is-active > .alu-tree-card {
    border-left-color: var(--alu-success);
}

.alu-tree-node.is-inactive > .alu-tree-card {
    border-left-color: var(--alu-danger);
    opacity: 0.82;
}

.alu-tree-code {
    color: var(--alu-primary-dark);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.alu-tree-name {
    color: var(--alu-text);
    font-size: 0.98rem;
    font-weight: 700;
    margin-top: 4px;
}

.alu-tree-meta,
.alu-tree-usage {
    color: var(--alu-muted);
    font-size: 0.82rem;
    margin-top: 4px;
    line-height: 1.45;
}

.alu-tree-empty-warehouse {
    border: 1px dashed var(--alu-line);
    border-radius: 12px;
    padding: 14px;
    color: var(--alu-muted);
    text-align: center;
    background: #fbfdff;
}

.alu-guideline {
    border: 1px solid var(--alu-line);
    border-left: 4px solid var(--alu-info);
    border-radius: 8px;
    padding: 12px 14px;
    background: var(--alu-panel);
    margin-bottom: 12px;
}

.alu-guideline:last-child {
    margin-bottom: 0;
}

.alu-guideline strong {
    display: block;
    color: var(--alu-text);
    margin-bottom: 4px;
}

.alu-guideline span {
    color: var(--alu-muted);
    font-size: 0.92rem;
}

#tblAlu thead th {
    border-top: 0;
    background: #f4f8fb;
    color: #223445;
    font-size: 0.77rem;
    font-weight: 800;
    text-transform: uppercase;
}

#tblAlu tbody td {
    vertical-align: middle;
}

.alu-modal-shell {
    border: 0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
}

.alu-modal-shell .modal-header {
    background: linear-gradient(135deg, var(--alu-primary), var(--alu-info));
    color: #fff;
    border-bottom: 0;
}

.alu-modal-shell .modal-footer {
    border-top: 1px solid var(--alu-line);
    background: #f8fafc;
}

.alu-scope-alert {
    background: linear-gradient(135deg, #f7fbff 0%, #eef7ff 100%);
}

@media (max-width: 767.98px) {
    .alu-kpi-value {
        font-size: 1.45rem;
    }

    .alu-chart-surface {
        height: 240px;
    }

    .alu-tree-surface {
        min-height: 240px;
        max-height: none;
    }
}
