:root {
    --siged-primario: #5b2be0;
    --siged-primario-oscuro: #3b1a9e;
    --siged-fondo: #f4f2fb;
}

body { background: var(--siged-fondo); }

.siged-login {
    background: radial-gradient(circle at 15% 10%, #e7defd 0, transparent 45%),
                radial-gradient(circle at 85% 90%, #dcd3fb 0, transparent 40%),
                var(--siged-fondo);
}

.siged-nav { background: linear-gradient(90deg, var(--siged-primario-oscuro), var(--siged-primario)); }
.siged-nav .navbar-brand { font-size: 1.05rem; }

.siged-logo {
    width: 56px; height: 56px; border-radius: 50%;
    display: grid; place-items: center;
    background: linear-gradient(135deg, var(--siged-primario), #8f6bff);
    color: #fff; font-weight: 800; font-size: 1.5rem;
    box-shadow: 0 0 0 4px rgba(91, 43, 224, .15);
}
.siged-logo-sm { width: 32px; height: 32px; font-size: 1rem; box-shadow: none; border: 2px solid rgba(255, 255, 255, .6); }

.text-siged { color: var(--siged-primario) !important; }
.btn-siged { background: var(--siged-primario); border-color: var(--siged-primario); color: #fff; }
.btn-siged:hover, .btn-siged:focus, .btn-siged:disabled { background: var(--siged-primario-oscuro); border-color: var(--siged-primario-oscuro); color: #fff; }

/* Menú lateral */
.siged-sidebar { width: 260px; background: #fff; border-right: 1px solid #e4def5; min-height: calc(100vh - 56px); }
.siged-sidebar .nav-pills .nav-link { color: #3d3756; }
.siged-sidebar .nav-pills .nav-link.active { background: var(--siged-primario); color: #fff; }
.siged-sidebar .nav-link { color: #3d3756; }
.siged-main { min-width: 0; }
@media (max-width: 991.98px) { .siged-sidebar { min-height: 0; } }

.siged-pill-activa { background: rgba(255, 255, 255, .2) !important; }
.siged-tarjeta-enlace { transition: transform .15s ease; }
.siged-tarjeta-enlace:hover { transform: translateY(-2px); }
.siged-tarjeta-enlace h3 { color: var(--siged-primario); }
.siged-indicador:hover { box-shadow: 0 .5rem 1rem rgba(91, 43, 224, .12) !important; }

.siged-mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .85em; }
.siged-truncar { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.siged-datos dt { font-weight: 600; color: #4a4560; }
.siged-datos dd { margin-bottom: .35rem; }
.siged-comentario { white-space: normal; background: #f8f7fc; border-left: 3px solid #d6ccf5; padding: .5rem .75rem; border-radius: 4px; }
.siged-firma { background: #f3effe; border: 1px solid #d6ccf5; }

/* Línea de tiempo */
.siged-timeline { position: relative; padding-left: 1.5rem; }
.siged-timeline::before { content: ""; position: absolute; left: .45rem; top: .3rem; bottom: .3rem; width: 2px; background: #d6ccf5; }
.siged-timeline-item { position: relative; padding-bottom: 1.1rem; }
.siged-timeline-item::before {
    content: ""; position: absolute; left: -1.3rem; top: .35rem; width: .8rem; height: .8rem;
    border-radius: 50%; background: var(--siged-primario); border: 2px solid #fff; box-shadow: 0 0 0 2px #d6ccf5;
}
.siged-timeline-item:last-child { padding-bottom: 0; }

/* Campo trampa anti-bots (fuera de la vista) */
.siged-trampa { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Impresión del cargo */
@media print {
    .no-imprimir { display: none !important; }
    body { background: #fff; }
    .siged-cargo { box-shadow: none !important; border: 1px solid #999 !important; }
}

/* Inventario: QR y código de barras en la ficha */
.siged-qr { max-width: 100%; height: auto; border: 1px solid #e4def5; border-radius: 6px; }
.siged-barras { max-width: 100%; height: 56px; }

/* Dashboard (Chart.js) */
.siged-grafico { position: relative; height: 260px; }

/* Etiqueta imprimible del equipo (8 × 5 cm) */
.siged-pagina-etiqueta { background: #fff; }
.siged-etiqueta {
    width: 8cm; height: 5cm; margin: 0 auto; padding: .25cm .3cm; box-sizing: border-box;
    border: 1px dashed #8c84a8; border-radius: 6px; display: flex; flex-direction: column; overflow: hidden;
    font-size: 9px; color: #111;
}
.siged-etiqueta-cabecera { display: flex; align-items: center; gap: .2cm; border-bottom: 1px solid #ccc; padding-bottom: .1cm; line-height: 1.15; }
.siged-logo-etiqueta { width: 22px; height: 22px; font-size: .75rem; box-shadow: none; flex: 0 0 auto; }
.siged-etiqueta-sub { color: #555; font-size: 8px; }
.siged-etiqueta-cuerpo { display: flex; align-items: center; gap: .2cm; flex: 1 1 auto; min-height: 0; }
.siged-etiqueta-qr { width: 2.3cm; height: 2.3cm; flex: 0 0 auto; }
.siged-etiqueta-datos { min-width: 0; line-height: 1.2; }
.siged-etiqueta-codigo { font-size: 12px; }
.siged-etiqueta-nombre { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.siged-etiqueta-barras { width: 100%; height: .9cm; }
@media print {
    @page { size: 8cm 5cm; margin: 0; }
    .siged-pagina-etiqueta .siged-etiqueta { border: 0; margin: 0; border-radius: 0; }
}
