/* ================================================================
   procuos.css
   Shared UI primitives used across modules
   ================================================================ */

.cfg-layout {
    display: flex;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,.07), 0 4px 20px rgba(0,0,0,.05);
    overflow: hidden;
    min-height: 280px;
}

.cfg-sidebar {
    width: 210px;
    flex-shrink: 0;
    background: #f5f5f5;
    border-right: 1px solid #e8eaed;
    list-style: none;
    margin: 0;
    padding: 0;
}

.cfg-sidebar__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 18px;
    font-size: 13.5px;
    color: #6b7280;
    cursor: pointer;
    border-bottom: 1px solid #eef0f5;
    transition: background .12s, color .12s;
    user-select: none;
}

.cfg-sidebar__item:last-child {
    border-bottom: none;
}

.cfg-sidebar__item:hover {
    background: #eef0f4;
    color: #333;
}

.cfg-sidebar__item--active {
    background: #fff;
    color: #5b9bd1;
    font-weight: 700;
    border-left: 3px solid #5b9bd1;
    padding-left: 15px;
}

.cfg-sidebar__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #5b9bd1;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    padding: 0 6px;
    line-height: 1;
    flex-shrink: 0;
}

.cfg-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.cfg-content__body {
    flex: 1;
}

.cfg-content__footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 13px 20px;
    background: #fafbfc;
    border-top: 1px solid #e5e9f2;
}

.cfg-hint {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 13px 22px;
    background: #f9f9f9;
    border-bottom: 1px solid #e8eaed;
    font-size: 12.5px;
    color: #777;
    line-height: 1.5;
}

.cfg-hint .fa {
    margin-top: 2px;
    flex-shrink: 0;
    color: #5b9bd1;
}

.cfg-empty {
    padding: 52px 24px;
    text-align: center;
    color: #b8c2d0;
}

.cfg-empty .fa {
    font-size: 38px;
    display: block;
    margin-bottom: 12px;
}

.cfg-empty p {
    margin: 0;
    font-size: 13.5px;
}

.cfg-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.cfg-table thead th {
    padding: 10px 20px;
    background: aliceblue;
    border-bottom: 1px solid #d0e4f7;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .7px;
    color: #7a9ab8;
    white-space: nowrap;
}

.cfg-table tbody td {
    padding: 14px 20px;
    border-bottom: 1px solid #f0f3f9;
    vertical-align: middle;
}

.cfg-table tbody tr:last-child td {
    border-bottom: none;
}

.cfg-table tbody tr:hover td {
    background: #f6f9ff;
}

.cfg-name {
    font-weight: 600;
    color: #1e2d3d;
}

.cfg-email {
    font-size: 12px;
    color: #9aaab8;
    margin-left: 7px;
}

.cfg-muted {
    color: #9aaab8;
}

.cfg-order {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.cfg-order__num {
    font-size: 15px;
    font-weight: 800;
    color: #5b9bd1;
    line-height: 1;
}

.cfg-order__btns {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cfg-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,.07), 0 4px 20px rgba(0,0,0,.05);
    overflow: hidden;
    margin-bottom: 0;
}

#solicitudes-form .cfg-card,
#ordenes-form .cfg-card {
    overflow: visible;
}

.cfg-card__head {
    padding: 18px 22px 14px;
    border-bottom: 1px solid #e8eaed;
}

.cfg-card__head h4 {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 700;
    color: #2c3e50;
}

.cfg-card__head h4 .fa {
    color: #5b9bd1;
    margin-right: 7px;
}

.cfg-card__head p {
    margin: 0;
    font-size: 13px;
    color: #9aaab8;
}

.cfg-card__body {
    padding: 20px 22px;
}

.cfg-card__head--collapsible {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.proc-history-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid #d8e0ea;
    background: #f7f9fc;
    color: #5f6f82;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background .14s, border-color .14s, color .14s;
}

.proc-history-toggle .fa {
    color: #5b9bd1;
}

.proc-history-toggle:hover {
    background: #eef4fb;
    border-color: #c9d9eb;
    color: #465a71;
}

.proc-history-scroll {
    max-height: 360px;
    overflow-y: auto;
    padding-right: 6px;
}

.proc-history-scroll::-webkit-scrollbar {
    width: 8px;
}

.proc-history-scroll::-webkit-scrollbar-thumb {
    background: #ccd7e4;
    border-radius: 8px;
}

.cfg-pill {
    display: inline-block;
    padding: 3px 11px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .2px;
}

.cfg-pill--active { background: #d1f5e3; color: #157a43; }
.cfg-pill--inactive { background: #ebebeb; color: #888; }
.cfg-pill--neutral { background: #eef1f4; color: #5f6c77; }
.cfg-pill--explicit-inherited { background: #eef1f4; color: #5f6c77; }
.cfg-pill--explicit-allowed { background: #d1f5e3; color: #157a43; }
.cfg-pill--explicit-blocked { background: #fde3e5; color: #b4232c; }

.proc-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 4px;
}

.proc-col-2 { flex: 2 1 100px; min-width: 100px; }
.proc-col-3 { flex: 3 1 140px; min-width: 140px; }
.proc-col-4 { flex: 4 1 160px; min-width: 160px; }
.proc-col-5 { flex: 5 1 190px; min-width: 190px; }
.proc-col-6 { flex: 6 1 220px; min-width: 220px; }
.proc-col-8 { flex: 8 1 260px; min-width: 260px; }
.proc-col-12 { flex: 0 0 100%; }

@media (max-width: 991px) {
    .cfg-sidebar {
        width: 170px;
    }
}

@media (max-width: 767px) {
    .cfg-layout {
        flex-direction: column;
    }

    .cfg-sidebar {
        width: 100%;
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        border-right: none;
        border-bottom: 1px solid #e8eaed;
        -webkit-overflow-scrolling: touch;
    }

    .cfg-sidebar__item {
        flex-direction: row;
        flex-shrink: 0;
        border-bottom: none;
        border-right: 1px solid #eef0f5;
        padding: 11px 16px;
        gap: 7px;
    }

    .cfg-sidebar__item:last-child {
        border-right: none;
    }

    .cfg-sidebar__item--active {
        border-left: none;
        border-bottom: 3px solid #5b9bd1;
        padding-left: 16px;
        padding-bottom: 8px;
    }

    .cfg-content__footer {
        padding: 12px 16px;
    }

    .cfg-card__head {
        flex-direction: column;
        gap: 10px;
    }

    .cfg-card__head--collapsible {
        flex-direction: row;
        align-items: center;
    }
}
