.auth-box { max-width: 400px; }
.auth-logo { max-height: 90px; }
.text-money { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.oc-sugerencias { z-index: 1050; max-height: 280px; overflow-y: auto; }
.prod-lista { position: fixed; max-height: 320px; }
.oc-items textarea { min-height: 31px; resize: vertical; }

/* ---------- Menú lateral izquierdo ---------- */
:root {
    --sidebar-w: 260px;
    --sidebar-bg: #0f2744;
    --sidebar-bg-2: #13325a;
    --sidebar-link: rgba(255, 255, 255, .72);
    --sidebar-accent: #4da3ff;
}

.sidebar {
    --bs-offcanvas-width: var(--sidebar-w);
    --bs-offcanvas-bg: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-bg-2) 100%);
    color: #fff;
}
.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.sidebar-logo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    padding: 2px;
    object-fit: contain;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .15);
    flex-shrink: 0;
}
.sidebar-brand-name { font-weight: 700; letter-spacing: .06em; font-size: .95rem; }
.sidebar-brand-sub { color: rgba(255, 255, 255, .55); font-size: .75rem; }
.sidebar-nav {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: .75rem .75rem 1rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .2) transparent;
}
.sidebar-section {
    margin: 1rem .75rem .35rem;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .4);
}
.sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .55rem .75rem;
    margin-bottom: 2px;
    border-radius: 8px;
    color: var(--sidebar-link);
    font-size: .925rem;
    transition: background-color .15s, color .15s;
}
.sidebar .nav-link .bi { font-size: 1.05rem; width: 1.25rem; text-align: center; opacity: .85; }
.sidebar .nav-link:hover,
.sidebar .nav-link:focus-visible { background: rgba(255, 255, 255, .08); color: #fff; }
.sidebar .nav-link.active {
    position: relative;
    background: rgba(77, 163, 255, .18);
    color: #fff;
    font-weight: 500;
}
.sidebar .nav-link.active::before {
    content: "";
    position: absolute;
    left: -.75rem;
    top: 20%;
    bottom: 20%;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--sidebar-accent);
}
.sidebar .nav-link.active .bi { color: var(--sidebar-accent); opacity: 1; }

.sidebar-user {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .9rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, .08);
    background: rgba(0, 0, 0, .15);
}
.sidebar-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    font-size: .8rem;
    font-weight: 600;
    flex-shrink: 0;
}
.btn-sidebar-logout { color: rgba(255, 255, 255, .7); font-size: 1.1rem; border: 0; }
.btn-sidebar-logout:hover { color: #fff; background: rgba(255, 255, 255, .1); }

/* Barra superior del contenido */
.topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    align-items: center;
    gap: .75rem;
    height: 56px;
    padding: 0 1.5rem;
    background: #fff;
    border-bottom: 1px solid var(--bs-border-color);
}
.topbar-title { min-width: 0; }
.app-main { max-width: 1440px; margin: 0 auto; }

/* Escritorio: dos columnas, menú fijo a la izquierda y contenido a la derecha */
@media (min-width: 992px) {
    .app-shell { display: flex; min-height: 100vh; }
    .sidebar {
        position: sticky;
        top: 0;
        flex: 0 0 var(--sidebar-w);
        width: var(--sidebar-w);
        height: 100vh;
        z-index: 1030;
        box-shadow: 2px 0 12px rgba(15, 39, 68, .12);
    }
    .app-content { flex: 1 1 auto; min-width: 0; }
}

/* ---------- Almacén ---------- */
.andamio-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--sidebar-bg);
    color: #fff;
    font-weight: 700;
    font-size: .95rem;
}
.andamio-lg { width: 44px; height: 44px; font-size: 1.25rem; border-radius: 10px; }
.andamio-xl { width: 64px; height: 64px; font-size: 1.9rem; border-radius: 14px; flex-shrink: 0; }
.andamio-vacio { background: var(--bs-secondary-bg); color: var(--bs-secondary-color); }
.andamio-opcion { width: 52px; height: 52px; font-size: 1.3rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.andamio-ninguno { font-weight: 400; }

.kpi { border: 1px solid var(--bs-border-color); transition: border-color .15s, box-shadow .15s; color: inherit; }
.kpi:hover { border-color: var(--sidebar-accent); box-shadow: 0 2px 8px rgba(15, 39, 68, .08); }
.kpi-activo { border-color: var(--sidebar-accent); box-shadow: inset 0 0 0 1px var(--sidebar-accent); }
.kpi-label { font-size: .8rem; color: var(--bs-secondary-color); }
.kpi-valor { font-size: 1.6rem; font-weight: 700; line-height: 1.2; }
.kpi-alerta .kpi-valor, .kpi-alerta .kpi-label .bi { color: var(--bs-danger); }

.paso {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--sidebar-accent);
    color: #fff;
    font-size: .85rem;
    font-weight: 700;
}
.zona-archivo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .25rem;
    padding: 2rem 1rem;
    border: 2px dashed var(--bs-border-color);
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    transition: border-color .15s, background-color .15s;
}
.zona-archivo:hover { border-color: var(--sidebar-accent); background: rgba(77, 163, 255, .05); }

/* ---------- Administración ---------- */
.avatar-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--sidebar-bg);
    color: #fff;
    font-weight: 600;
    flex-shrink: 0;
}
.rol-opcion { padding: .5rem .75rem; line-height: 1.3; }
.rol-opcion .small { opacity: .8; }

@media print {
    body { background: #fff !important; }
    .app-shell { display: block !important; }
    .app-main { max-width: none; padding: 0 !important; }
    .card { border: 0 !important; }
    .card-body { padding: 0 !important; }
    .alert { display: none !important; }
}
