/* ============================================================
   Módulo de Obra (inventario)
   Stepper de estados, lista de contratistas y fotos de entrega
   ============================================================ */

/* ---------- Stepper de estados de la obra ---------- */
.obra-stepper {
    display: flex;
    justify-content: space-between;
    list-style: none;
    margin: 0 0 1.5rem;
    padding: 0;
    counter-reset: paso;
}

.obra-stepper li {
    position: relative;
    flex: 1;
    text-align: center;
    font-size: 0.8rem;
    color: #6c757d;
    counter-increment: paso;
}

.obra-stepper li::before {
    content: counter(paso);
    display: block;
    width: 32px;
    height: 32px;
    line-height: 30px;
    margin: 0 auto 0.4rem;
    border-radius: 50%;
    border: 2px solid #dee2e6;
    background: #fff;
    color: #6c757d;
    font-weight: 700;
}

/* Línea conectora entre pasos */
.obra-stepper li::after {
    content: "";
    position: absolute;
    top: 16px;
    left: calc(50% + 22px);
    width: calc(100% - 44px);
    height: 2px;
    background: #dee2e6;
}

.obra-stepper li:last-child::after {
    display: none;
}

.obra-stepper li.done {
    color: #212529;
}

.obra-stepper li.done::before {
    content: "\2713";
    background: #ff6a1a;
    border-color: #ff6a1a;
    color: #fff;
}

.obra-stepper li.done::after {
    background: #ff6a1a;
}

.obra-stepper li.current {
    color: #ff6a1a;
    font-weight: 700;
}

.obra-stepper li.current::before {
    border-color: #ff6a1a;
    color: #ff6a1a;
}

@media (max-width: 576px) {
    .obra-stepper li {
        font-size: 0.65rem;
    }

    .obra-stepper li::before {
        width: 26px;
        height: 26px;
        line-height: 24px;
    }

    .obra-stepper li::after {
        top: 13px;
        left: calc(50% + 18px);
        width: calc(100% - 36px);
    }
}

.obra-stepper {
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

/* ---------- Tarjetas de acción del flujo ---------- */
.obra-acciones .card.button.disabled {
    opacity: .5;
    cursor: not-allowed;
    pointer-events: none;
}

.card.button[role="button"]:focus {
    outline: 2px solid #002251;
    outline-offset: 2px;
}

/* ---------- Card "Estado del proceso" ---------- */
.obra-card-accent {
    border-top: 3px solid #ff6a1a;
}

/* ---------- Detalles de la obra (grid de mini-stats) ---------- */
.obra-stat {
    display: flex;
    align-items: center;
    gap: .75rem;
    height: 100%;
    padding: .75rem;
    border: 1px solid #e9ecef;
    border-radius: 10px;
}

.obra-stat[data-toggle="tooltip"] {
    cursor: help;
}

.obra-stat-icon {
    flex: none;
}

.obra-stat-label {
    margin: 0 0 .15rem;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #6c757d;
}

.obra-stat-value {
    margin: 0;
    font-weight: 600;
    color: #212529;
}

/* ---------- Acordeón de avances ---------- */
.avance-item .btn-link {
    color: #212529;
    text-decoration: none;
}

.avance-item .btn-link:hover,
.avance-item .btn-link:focus {
    color: #212529;
    text-decoration: none;
}

.avance-chevron {
    transition: transform .2s ease;
}

.avance-item .btn-link.collapsed .avance-chevron {
    transform: rotate(-90deg);
}

/* ---------- Lista de contratistas ---------- */
.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.status-dot.disponible {
    background-color: #28a745;
}

.status-dot.ocupado {
    background-color: #ffc107;
}

#search-contratista {
    padding-left: 30px;
}

.search-contratista-icon {
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
}
