.gc-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 14px;
    margin-bottom: 16px;
}
.gc-section-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.gc-section-title i {
    font-size: 0.9rem;
    color: #1A4480;
}

.modal-body:has(.gc-modal-form) {
    padding: 12px 22px 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.gc-modal-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
.gc-modal-form > .gc-section {
    margin-bottom: 0;
}

.gc-grid-4 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 6px 12px;
}
.gc-grid-4 .prov-field {
    margin: 0;
}
.gc-field-full {
    grid-column: 1 / -1;
}
.gc-field-span-3 {
    grid-column: span 3;
}

.gc-section-detalle {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}
.gc-section-detalle > * {
    flex-shrink: 0;
}
.gc-section-detalle > .gc-detalle-table-wrap {
    flex-shrink: 1;
}
.gc-detalle-toolbar {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 6px 10px;
    background: #f8fafc;
    border-radius: 6px;
    border: 1px dashed #d1d5db;
    margin-top: 6px;
    margin-bottom: 0;
    flex-wrap: wrap;
}
.gc-detalle-toolbar .prov-field {
    margin: 0;
}
.gc-detalle-toolbar .prov-field label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 4px;
    text-align: center;
    width: 100%;
}
.gc-field-art {
    flex: 1;
    min-width: 200px;
}
.gc-field-qty {
    width: 100px;
}
.gc-field-costo {
    width: 120px;
}
.gc-field-peso {
    width: 90px;
}
.gc-field-unid {
    width: 70px;
}
.gc-btn-add-item {
    padding: 7px 18px !important;
    font-size: 0.82rem !important;
    height: 36px;
}

.gc-detalle-table-wrap {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}
.gc-detalle-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.84rem;
}
.gc-detalle-table thead th {
    padding: 6px 8px;
    background: #1A4480;
    color: #fff;
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    position: sticky !important;
    top: 0;
    z-index: 1;
}
.gc-detalle-table thead th { text-align: center; }
.gc-detalle-table tbody td {
    padding: 6px 10px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    font-size: 0.7rem;
    color: #334155;
}
.gc-detalle-table tbody td:nth-child(4),
.gc-detalle-table tbody td:nth-child(5),
.gc-detalle-table tbody td:nth-child(6),
.gc-detalle-table tbody td:nth-child(8) { text-align: right; }
.gc-detalle-table tbody td:last-child { text-align: center; }
.gc-detalle-table tbody tr:hover {
    background: #f8fafc;
}
.gc-count {
    font-weight: 400;
    font-size: 0.8rem;
    color: #94a3b8;
    margin-left: auto;
}

.gc-totales {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-top: 6px;
    gap: 3px;
    padding-right: 2px;
}
.gc-total-row {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
}
.gc-total-row span {
    min-width: 80px;
    text-align: right;
}
.gc-total-row-final {
    font-size: 0.95rem;
    font-weight: 800;
    color: #1A4480;
    padding-top: 4px;
    border-top: 2px solid #1A4480;
}
.gc-total-input {
    width: 140px;
    padding: 6px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: right;
    background: #f8fafc;
    color: #1e293b;
}

#pageGuiasRemision .prov-badge-activo,
#pageGuiasRemision .prov-badge-pendiente,
#pageGuiasRemision .prov-badge-anulado {
    min-width: 90px;
    text-align: center;
}

#pageGuiasRemisionTablaWrap .prov-tabla {
    table-layout: fixed;
}
#pageGuiasRemisionTablaWrap .prov-tabla th { text-align: center; }
#pageGuiasRemisionTablaWrap .prov-tabla th .prov-th-content { display: flex; align-items: center; justify-content: normal; }
#pageGuiasRemisionTablaWrap .prov-tabla th .prov-th-content > span:first-child { flex: 1; text-align: center; }
#pageGuiasRemisionTablaWrap .prov-tabla th .prov-th-content > .prov-th-controls { margin-left: auto; }
#pageGuiasRemisionTablaWrap .prov-tabla th:last-child {
    width: 8px !important;
}
#pageGuiasRemision *:focus:not(input):not(select):not(textarea):not(button),
#pageGuiasRemision *:focus-visible:not(input):not(select):not(textarea):not(button) {
    outline: none !important;
}

.gc-det-cant:focus,
.gc-det-costo:focus,
.gc-det-peso:focus,
.gc-det-unid:focus {
    border-color: var(--azul-400) !important;
    box-shadow: 0 0 0 3px rgba(37,99,160,0.12) !important;
}

.gc-det-total {
    font-weight: 600;
    text-align: right;
    color: #334155;
    padding: 8px 10px;
    background: #f8fafc;
    border-radius: 4px;
    font-size: 0.7rem;
}

.gc-detalle-view {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.gc-detalle-view .gc-section {
    margin: 0;
}
.gc-detalle-row {
    display: flex;
    padding: 4px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.7rem;
}
.gc-detalle-label {
    font-weight: 600;
    color: #475569;
    min-width: 120px;
}
.gc-detalle-valor {
    color: #1e293b;
}
.gc-detalle-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
}
