/* Ajustes propios del Inventario sobre el tema ICFD */

/* Encabezado de página: título serif + acciones a la derecha */
.page-head {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--icfd-line);
}
.page-head h1 { margin: 0; font-size: 1.9rem; }
.page-head .eyebrow {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--icfd-gold-dark);
}

/* Cifras del inicio */
.stat-tile {
    height: 100%;
    padding: 1rem 1.1rem;
    background: var(--icfd-paper);
    border: 1px solid var(--icfd-line);
    border-top: 3px solid var(--icfd-navy-800);
    border-radius: var(--icfd-radius);
}
.stat-tile .stat-value {
    font-family: var(--icfd-serif);
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1;
    color: var(--icfd-navy-800);
    font-variant-numeric: lining-nums tabular-nums;
}
.stat-tile .stat-label {
    margin-top: 0.35rem;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--icfd-muted);
}

/* Tarjeta de acceso rápido deshabilitada (módulo de una fase futura) */
.home-tile.tile-pronto { opacity: 0.6; pointer-events: none; border-left-color: var(--icfd-line); }
.tile-badge {
    display: inline-block;
    margin-left: 0.4rem;
    padding: 0.1rem 0.45rem;
    font-family: var(--icfd-sans);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    vertical-align: middle;
    color: var(--icfd-gold-dark);
    background: var(--icfd-gold-50);
    border: 1px solid var(--icfd-gold-light);
    border-radius: var(--icfd-radius-sm);
}

/* Iconos de botones pequeños en tablas */
.table .btn-sm i { color: inherit; }

/* Página de error */
.error-code { font-family: var(--icfd-serif); font-size: 4.5rem; font-weight: 700; color: var(--icfd-gold); line-height: 1; }

/* ---------- Bienes ---------- */
.codigo, .codigo a {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--icfd-navy-700);
    text-decoration: none;
}
.codigo-grande {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    color: var(--icfd-navy-800);
    background: var(--icfd-gold-50);
    border: 1px solid var(--icfd-gold-light);
    border-radius: var(--icfd-radius-sm);
}
.bien-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: var(--icfd-radius-sm);
    border: 1px solid var(--icfd-line);
    display: inline-block;
}
.bien-thumb-vacio {
    display: inline-grid;
    place-items: center;
    background: var(--icfd-ivory);
    color: var(--icfd-gold-light);
}
.bien-foto {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--icfd-radius);
    border: 1px solid var(--icfd-line);
    background: var(--icfd-ivory);
    overflow: hidden;
    display: block;
}
.bien-foto img { width: 100%; height: 100%; object-fit: cover; }
.bien-foto-vacia {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    color: var(--icfd-muted);
}
.bien-foto-vacia i { font-size: 2.5rem; color: var(--icfd-gold-light); }

/* Ficha de datos en dos columnas */
.ficha { display: grid; grid-template-columns: minmax(130px, 34%) 1fr; }
.ficha dt, .ficha dd { padding: 0.65rem 1.25rem; margin: 0; border-bottom: 1px solid var(--icfd-line-soft); }
.ficha dt { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--icfd-muted); background: #FCFBF8; }
.ficha dt:nth-last-of-type(1), .ficha dd:last-of-type { border-bottom: none; }

/* Pasos de la importación */
.pasos { list-style: none; counter-reset: paso; padding: 0; margin: 0; }
.pasos li { counter-increment: paso; position: relative; padding: 0 0 1.75rem 3.25rem; }
.pasos li::before {
    content: counter(paso);
    position: absolute;
    left: 0;
    top: -0.15rem;
    width: 2.2rem;
    height: 2.2rem;
    display: grid;
    place-items: center;
    font-family: var(--icfd-serif);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--icfd-navy-800);
    background: var(--icfd-gold-50);
    border: 1px solid var(--icfd-gold);
    border-radius: 50%;
}
.pasos li:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 1.1rem;
    top: 2.3rem;
    bottom: 0.4rem;
    width: 1px;
    background: var(--icfd-gold-light);
}
.paso-titulo { font-family: var(--icfd-serif); font-size: 1.3rem; font-weight: 700; color: var(--icfd-navy-800); }

@media (max-width: 576px) {
    .ficha { grid-template-columns: 1fr; }
    .ficha dt { border-bottom: none; padding-bottom: 0.1rem; background: transparent; }
}

/* ---------- Movimientos ---------- */
.badge-alerta { background: var(--icfd-red); color: #fff; font-size: 0.65rem; vertical-align: top; }
.stat-tile.stat-alerta { border-top-color: var(--icfd-red); }
.stat-tile.stat-alerta .stat-value { color: var(--icfd-red); }
.fila-vencida > td { background-color: #FBF1EF !important; }
.fila-sel > td { background-color: var(--icfd-gold-50) !important; }

/* Barra flotante para acciones en lote */
.barra-lote {
    position: fixed;
    left: 50%;
    bottom: 1.25rem;
    transform: translateX(-50%);
    z-index: 1030;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.9rem;
    max-width: calc(100% - 2rem);
    color: #fff;
    background: var(--icfd-navy-800);
    border-top: 3px solid var(--icfd-gold);
    border-radius: var(--icfd-radius);
    box-shadow: 0 14px 30px rgba(11, 20, 38, 0.35);
}
.barra-lote[hidden] { display: none; }
.barra-lote > span { margin-right: 0.4rem; color: var(--icfd-gold-light); }
.barra-lote > span strong { color: #fff; }

/* Tipos de movimiento */
.tipo-mov { font-weight: 600; font-size: 0.9rem; }
.tm-traslado { color: var(--icfd-blue); }
.tm-prestamo { color: var(--icfd-amber); }
.tm-devolucion { color: var(--icfd-green); }
.tm-asignacion { color: var(--icfd-navy-700); }
.tm-baja { color: var(--icfd-red); }
.tm-reactivacion, .tm-ingreso { color: var(--icfd-green); }

/* Línea de tiempo en la ficha del bien */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; display: flex; gap: 0.85rem; padding-bottom: 1.1rem; }
.timeline li:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 34px;
    bottom: 0;
    width: 1px;
    background: var(--icfd-line);
}
.timeline .tl-icono {
    flex: 0 0 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 0.9rem;
    background: var(--icfd-navy-100);
    color: var(--icfd-navy-800);
}
.timeline .tl-traslado .tl-icono { background: var(--bs-info-bg-subtle); color: var(--icfd-blue); }
.timeline .tl-prestamo .tl-icono { background: var(--bs-warning-bg-subtle); color: var(--icfd-amber); }
.timeline .tl-devolucion .tl-icono,
.timeline .tl-ingreso .tl-icono,
.timeline .tl-reactivacion .tl-icono { background: var(--bs-success-bg-subtle); color: var(--icfd-green); }
.timeline .tl-baja .tl-icono { background: var(--bs-danger-bg-subtle); color: var(--icfd-red); }
.timeline .tl-cuerpo { flex: 1; min-width: 0; padding-top: 0.25rem; }
.timeline .tl-cabecera { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 1rem; }
.lista-bienes-mov { max-height: 420px; overflow-y: auto; }

/* ---------- Donaciones ---------- */
.donante-nuevo { padding: 1rem 1rem 0.25rem; margin-bottom: 1rem; background: var(--icfd-gold-50); border-left: 3px solid var(--icfd-gold); border-radius: var(--icfd-radius-sm); }
.tabla-items td { padding: 0.45rem 0.35rem; }
.tabla-items td:first-child { padding-left: 1rem; min-width: 180px; }
.tabla-items td:nth-child(2) { min-width: 150px; }

/* ---------- Reportes ---------- */
.stat-tile .stat-value.stat-chico { font-size: 1.65rem; padding-top: 0.3rem; }
a.stat-tile:hover { border-color: var(--icfd-gold); }
.barras { list-style: none; margin: 0; padding: 0; }
.barras li { margin-bottom: 0.7rem; }
.barras-fila { display: flex; justify-content: space-between; gap: 0.75rem; font-size: 0.9rem; }
.barras-nombre { font-weight: 600; color: var(--icfd-navy-800); }
.barras-cifra { white-space: nowrap; font-variant-numeric: tabular-nums; }
.barras-pista { height: 6px; margin-top: 0.25rem; background: var(--icfd-line-soft); border-radius: 3px; overflow: hidden; }
.barras-barra { height: 100%; background: var(--icfd-navy-700); border-radius: 3px; }
.barras li:first-child .barras-barra { background: var(--icfd-gold); }
.mini-cifra { display: block; height: 100%; padding: 0.75rem 0.9rem; color: var(--icfd-muted); font-size: 0.85rem; text-decoration: none;
    background: #FCFBF8; border: 1px solid var(--icfd-line); border-radius: var(--icfd-radius); }
a.mini-cifra:hover { border-color: var(--icfd-gold); color: var(--icfd-muted); }
.mini-cifra > span { display: block; font-family: var(--icfd-serif); font-size: 1.7rem; font-weight: 700; color: var(--icfd-navy-800); line-height: 1.1; }

/* ---------- Toma de inventario ---------- */
.toma-banner form { margin: 0; }
.progress-bar { font-size: 0.7rem; font-weight: 600; }
.mini-cifra > span, .stat-value { font-variant-numeric: lining-nums tabular-nums; font-feature-settings: "lnum" 1; }
