.gp-shell {
    display: grid;
    gap: 1rem;
}

.gp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.gp-header__actions {
    margin-left: auto;
    display: inline-flex;
}

.gp-tabs {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    overflow-x: auto;
    padding-bottom: 0.1rem;
}

.gp-tab {
    border: 1px solid var(--border-color, #d8e0ec);
    background: var(--surface-elevated, #ffffff);
    border-radius: 10px;
    color: var(--text-muted);
    padding: 0.55rem 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
}

.gp-tab:hover {
    border-color: var(--accent, #3c82f6);
    color: var(--accent, #3c82f6);
}

.gp-tab.is-active {
    color: #fff;
    border-color: var(--accent, #3c82f6);
    background: var(--accent, #3c82f6);
}

.gp-alert {
    border-radius: 10px;
    padding: 0.7rem 0.9rem;
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.gp-alert--success {
    background: #ebf9ef;
    color: #0a6a33;
    border-color: #bfe9ca;
}

.gp-alert--error {
    background: #fff2f2;
    color: #9f1d1d;
    border-color: #f0c3c3;
}

.gp-alert--warn {
    background: #fff8e7;
    color: #7b5d0a;
    border-color: #ecd393;
}

.gp-section {
    display: grid;
    gap: 0.9rem;
}

.gp-card {
    border-radius: 14px;
}

.gp-card__head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.gp-card__head h3,
.gp-card h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-main);
}

.gp-card__head--space {
    margin-bottom: 0.95rem;
}

.gp-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.65rem;
}

.gp-kpi-grid--dashboard {
    gap: 0.72rem;
}

.gp-kpi-card {
    background: linear-gradient(170deg, rgba(255, 255, 255, 0.98), rgba(245, 250, 255, 0.98));
    border: 1px solid rgba(17, 59, 126, 0.16);
    border-radius: 12px;
    padding: 0.74rem 0.76rem;
    display: grid;
    gap: 0.24rem;
    position: relative;
    overflow: hidden;
}

.gp-kpi-card::after {
    content: '';
    position: absolute;
    top: -22px;
    right: -24px;
    width: 86px;
    height: 86px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.08);
    pointer-events: none;
}

.gp-kpi-card__head {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
}

.gp-kpi-card__icon {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    border: 1px solid rgba(17, 59, 126, 0.18);
    background: rgba(255, 255, 255, 0.94);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #1f4f96;
    flex: 0 0 auto;
}

.gp-kpi-card__icon i {
    font-size: 0.95rem;
}

.gp-kpi-card__label {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.2;
    min-width: 0;
}

.gp-kpi-card__value {
    font-size: 1.2rem;
    color: var(--text-main);
    line-height: 1.15;
}

.gp-kpi-card__meta {
    color: #556880;
    font-size: 0.72rem;
    line-height: 1.25;
}

.gp-kpi-card--total {
    border-color: rgba(59, 130, 246, 0.26);
}

.gp-kpi-card--pending {
    border-color: rgba(217, 119, 6, 0.23);
}

.gp-kpi-card--pending::after {
    background: rgba(245, 158, 11, 0.1);
}

.gp-kpi-card--quality {
    border-color: rgba(220, 38, 38, 0.24);
}

.gp-kpi-card--quality::after {
    background: rgba(220, 38, 38, 0.09);
}

.gp-kpi-card--overdue {
    border-color: rgba(148, 91, 20, 0.25);
}

.gp-kpi-card--overdue::after {
    background: rgba(180, 83, 9, 0.09);
}

.gp-kpi-card--approval {
    border-color: rgba(14, 116, 144, 0.24);
}

.gp-kpi-card--approval::after {
    background: rgba(14, 116, 144, 0.09);
}

.gp-grid {
    display: grid;
    gap: 0.8rem;
}

.gp-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gp-dashboard {
    gap: 0.84rem;
}

.gp-dashboard-hero {
    border: 1px solid rgba(21, 70, 139, 0.18);
    background:
        radial-gradient(circle at 0% 0%, rgba(59, 130, 246, 0.13), transparent 48%),
        radial-gradient(circle at 96% 95%, rgba(14, 116, 144, 0.12), transparent 48%),
        linear-gradient(165deg, rgba(255, 255, 255, 0.98), rgba(247, 251, 255, 0.97));
    padding: 0.82rem;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.95fr);
    gap: 0.72rem;
    align-items: stretch;
}

.gp-dashboard-hero__main {
    display: grid;
    gap: 0.3rem;
}

.gp-dashboard-hero__eyebrow {
    margin: 0;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-weight: 700;
    color: #2563eb;
}

.gp-dashboard-hero__main h2 {
    margin: 0;
    font-size: clamp(1.05rem, 2vw, 1.36rem);
    color: #1e3659;
}

.gp-dashboard-hero__main p {
    margin: 0;
    color: #4f6282;
    font-size: 0.84rem;
    max-width: 620px;
    line-height: 1.32;
}

.gp-dashboard-hero__stats {
    display: grid;
    gap: 0.5rem;
    align-content: center;
}

.gp-dashboard-hero__stats > div {
    border: 1px solid rgba(17, 59, 126, 0.16);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.92);
    padding: 0.48rem 0.56rem;
    display: grid;
    gap: 0.12rem;
}

.gp-dashboard-hero__stats > div span {
    color: #5a6f90;
    font-size: 0.72rem;
    line-height: 1.2;
}

.gp-dashboard-hero__stats > div strong {
    color: #1f3557;
    font-size: 0.98rem;
    line-height: 1.2;
}

.gp-dashboard-grid {
    display: grid;
    gap: 0.72rem;
}

.gp-dashboard-grid--main,
.gp-dashboard-grid--secondary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gp-dashboard-card {
    border: 1px solid rgba(17, 59, 126, 0.14);
    background: linear-gradient(180deg, rgba(251, 254, 255, 0.98), rgba(255, 255, 255, 0.99));
}

.gp-dashboard-card .gp-card__head {
    margin-bottom: 0.62rem;
}

.gp-dashboard-card .gp-card__head small {
    color: #62758f;
    font-size: 0.74rem;
    font-weight: 600;
}

.gp-dashboard-chart-wrap {
    border: 1px solid rgba(17, 59, 126, 0.14);
    border-radius: 11px;
    background: linear-gradient(180deg, rgba(247, 251, 255, 0.96), rgba(255, 255, 255, 0.98));
    padding: 0.42rem 0.5rem;
    min-height: 248px;
    max-height: 248px;
    overflow: hidden;
}

.gp-dashboard-chart-wrap--wide {
    min-height: 272px;
    max-height: 272px;
}

.gp-dashboard-chart-wrap canvas {
    width: 100% !important;
    height: 100% !important;
    max-height: 100%;
}

.gp-dashboard-status-chips {
    margin-top: 0.52rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem;
}

.gp-dashboard-status-chip {
    border: 1px solid rgba(17, 59, 126, 0.14);
    border-radius: 9px;
    background: rgba(248, 251, 255, 0.9);
    padding: 0.38rem 0.48rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.48rem;
}

.gp-list--compact {
    margin-top: 0.5rem;
    gap: 0.38rem;
}

.gp-list--compact .gp-list-row {
    padding: 0.4rem 0.48rem;
}

.gp-dashboard-monthly {
    margin-top: 0.48rem;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.3rem;
}

.gp-dashboard-monthly__item {
    border: 1px solid rgba(17, 59, 126, 0.12);
    border-radius: 8px;
    background: rgba(248, 251, 255, 0.92);
    padding: 0.34rem 0.42rem;
    display: grid;
    gap: 0.1rem;
}

.gp-dashboard-monthly__item span {
    font-size: 0.7rem;
    color: #607189;
    text-transform: capitalize;
}

.gp-dashboard-monthly__item strong {
    font-size: 0.8rem;
    color: #1f3557;
}

.gp-dashboard-type-list {
    display: grid;
    gap: 0.46rem;
}

.gp-dashboard-type-item {
    display: grid;
    gap: 0.2rem;
}

.gp-dashboard-type-item__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.42rem;
    font-size: 0.79rem;
    color: #334155;
}

.gp-dashboard-type-item__head strong {
    color: #1f3557;
}

.gp-dashboard-type-item__bar {
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.28);
    height: 8px;
    overflow: hidden;
}

.gp-dashboard-type-item__bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb, #0e7490);
}

.gp-status-list,
.gp-list,
.gp-timeline {
    display: grid;
    gap: 0.45rem;
}

.gp-status-row,
.gp-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.45rem 0.55rem;
    border-radius: 8px;
    background: rgba(31, 83, 156, 0.04);
}

.gp-table-wrap {
    overflow: auto;
    border-radius: 10px;
    border: 1px solid rgba(18, 52, 103, 0.12);
}

.gp-table {
    width: 100%;
    min-width: 880px;
    border-collapse: collapse;
    border-spacing: 0;
}

.gp-table th,
.gp-table td {
    display: table-cell;
    padding: 0.7rem 0.8rem;
    vertical-align: middle;
}

.gp-table thead th {
    font-size: 0.76rem;
    font-weight: 700;
    color: #526684;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(16, 65, 132, 0.06);
    border-bottom: 1px solid rgba(18, 52, 103, 0.15);
    white-space: nowrap;
}

.gp-table tbody td {
    border-bottom: 1px solid rgba(18, 52, 103, 0.12);
}

.gp-table tbody tr:last-child td {
    border-bottom: 0;
}

.gp-table-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    width: 100%;
    min-width: 76px;
}

.gp-table-actions__empty {
    color: var(--text-muted);
}

.btn-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid #cfd8e6;
    background: #fff;
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.btn-icon i {
    font-size: 0.95rem;
    line-height: 1;
    pointer-events: none;
}

.btn-icon:hover {
    border-color: #93b3e2;
    color: #1f4f96;
    background: #f3f8ff;
    transform: translateY(-1px);
}

.btn-icon:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.gp-table--documents th:nth-child(1),
.gp-table--documents td:nth-child(1) {
    width: 30%;
}

.gp-table--documents th:nth-child(2),
.gp-table--documents td:nth-child(2) {
    width: 13%;
    white-space: nowrap;
}

.gp-table--documents th:nth-child(3),
.gp-table--documents td:nth-child(3) {
    width: 20%;
}

.gp-table--documents th:nth-child(4),
.gp-table--documents td:nth-child(4),
.gp-table--documents th:nth-child(5),
.gp-table--documents td:nth-child(5) {
    width: 9%;
    white-space: nowrap;
}

.gp-table--documents th:nth-child(6),
.gp-table--documents td:nth-child(6) {
    width: 10%;
    white-space: nowrap;
}

.gp-table--documents th:nth-child(7),
.gp-table--documents td:nth-child(7) {
    width: 9%;
    white-space: nowrap;
}

.gp-table--documents th:nth-child(8),
.gp-table--documents td:nth-child(8) {
    width: 108px;
    white-space: nowrap;
}

.gp-actions-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.gp-pagination {
    margin-top: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    flex-wrap: wrap;
    border-top: 1px solid var(--border-color, #d8e0ec);
    padding-top: 0.65rem;
}

.gp-pagination__size,
.gp-pagination__controls {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.gp-pagination__size select {
    width: 86px;
    min-width: 86px;
}

.gp-pagination__meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.gp-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.gp-badge--doc-type {
    background: rgba(24, 56, 107, 0.08);
    color: #173a71;
}

.gp-badge--status {
    background: var(--gp-status-bg, rgba(36, 53, 86, 0.08));
    color: var(--gp-status-color, #253355);
    border: 1px solid var(--gp-status-border, rgba(37, 51, 85, 0.2));
}

.gp-badge--status.is-inactive {
    opacity: 0.68;
}

.gp-badge--borrador {
    background: #eef2ff;
    color: #374189;
}

.gp-badge--recibido,
.gp-badge--programado_pago {
    background: #eaf6ff;
    color: #0b4d84;
}

.gp-badge--en_validacion,
.gp-badge--en_aprobacion,
.gp-badge--conciliado {
    background: #fff6de;
    color: #7f5e0d;
}

.gp-badge--observado,
.gp-badge--rechazado {
    background: #ffecec;
    color: #9f1c1c;
}

.gp-badge--subsanado,
.gp-badge--aprobado,
.gp-badge--pagado,
.gp-badge--cerrado {
    background: #eaf9ef;
    color: #0a6a33;
}

.gp-badge--payment {
    background: rgba(14, 77, 135, 0.1);
    color: #0f4d88;
}

.gp-badge--alert {
    border: 1px solid transparent;
}

.gp-badge--alert-baja {
    background: rgba(20, 184, 166, 0.14);
    color: #0f766e;
    border-color: rgba(15, 118, 110, 0.28);
}

.gp-badge--alert-media {
    background: rgba(245, 158, 11, 0.14);
    color: #92400e;
    border-color: rgba(146, 64, 14, 0.28);
}

.gp-badge--alert-alta {
    background: rgba(239, 68, 68, 0.14);
    color: #b91c1c;
    border-color: rgba(185, 28, 28, 0.32);
}

.gp-alert-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    border: 1px solid transparent;
    white-space: nowrap;
}

.gp-alert-chip--none {
    background: rgba(100, 116, 139, 0.12);
    color: #475569;
    border-color: rgba(100, 116, 139, 0.22);
}

.gp-alert-chip--ok {
    background: rgba(34, 197, 94, 0.12);
    color: #15803d;
    border-color: rgba(21, 128, 61, 0.26);
}

.gp-alert-chip--baja {
    background: rgba(20, 184, 166, 0.12);
    color: #0f766e;
    border-color: rgba(15, 118, 110, 0.25);
}

.gp-alert-chip--media {
    background: rgba(245, 158, 11, 0.14);
    color: #92400e;
    border-color: rgba(146, 64, 14, 0.28);
}

.gp-alert-chip--alta {
    background: rgba(239, 68, 68, 0.14);
    color: #b91c1c;
    border-color: rgba(185, 28, 28, 0.3);
}

.gp-config {
    gap: 0.9rem;
}

.gp-config-tabs {
    margin-bottom: 0.95rem;
}

.gp-config-panel {
    display: block;
}

.gp-config-panel .gp-table-wrap {
    max-height: calc(44px + (10 * 52px));
    overflow-y: auto;
}

.gp-config-panel .gp-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    /* Keep sticky headers opaque so row content does not bleed through while scrolling */
    background: #eef3fb;
    border-bottom: 1px solid rgba(18, 52, 103, 0.2);
    box-shadow: inset 0 -1px 0 rgba(18, 52, 103, 0.08);
}

.gp-workflow-panel {
    display: grid;
    gap: 0.85rem;
}

.gp-workflow-diagram {
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.95) 0%, #ffffff 100%);
    padding: 0.85rem;
    display: grid;
    gap: 0.7rem;
}

.gp-workflow-diagram__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.gp-workflow-diagram__head h4 {
    margin: 0;
    font-size: 0.9rem;
    color: #1f3557;
}

.gp-workflow-diagram__body {
    display: grid;
    gap: 0.5rem;
}

.gp-workflow-diagram-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.35fr);
    gap: 0.6rem;
    align-items: center;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 10px;
    background: #fff;
    padding: 0.55rem 0.6rem;
}

.gp-workflow-diagram-row__origin,
.gp-workflow-diagram-row__targets {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.gp-workflow-diagram-row__arrow {
    color: #4f6282;
    font-size: 0.95rem;
}

.gp-workflow-form {
    display: grid;
    gap: 0.8rem;
}

.gp-workflow-form__head {
    display: grid;
    gap: 0.45rem;
}

.gp-workflow-form__head label {
    display: grid;
    gap: 0.28rem;
    max-width: 360px;
    font-size: 0.8rem;
    color: #4f6282;
}

.gp-workflow-help {
    margin: 0;
    color: #5c6f8f;
    font-size: 0.78rem;
}

.gp-workflow-editor {
    display: grid;
    gap: 0.6rem;
}

.gp-workflow-editor-card {
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 12px;
    background: #fff;
    padding: 0.65rem;
    display: grid;
    gap: 0.55rem;
}

.gp-workflow-editor-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.gp-workflow-editor-card__head small {
    color: #5c6f8f;
    font-size: 0.74rem;
}

.gp-workflow-editor-card__title {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.gp-workflow-editor-card__options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0.4rem;
}

.gp-workflow-option {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 9px;
    padding: 0.34rem 0.45rem;
    background: rgba(248, 250, 252, 0.78);
    font-size: 0.78rem;
    color: #334155;
}

.gp-workflow-option input {
    width: 15px;
    height: 15px;
}

.gp-config-checkbox {
    display: inline-flex !important;
    align-items: center;
    gap: 0.45rem !important;
    font-size: 0.82rem !important;
    font-weight: 600;
    color: #4f6282;
}

.gp-config-checkbox input {
    width: 16px;
    height: 16px;
}

.gp-alert-list {
    display: grid;
    gap: 0.45rem;
}

.gp-alert-item {
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 10px;
    background: #fff;
    padding: 0.55rem 0.62rem;
    display: grid;
    gap: 0.3rem;
}

.gp-alert-item__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.gp-alert-item__head strong {
    color: #1f3557;
    font-size: 0.84rem;
}

.gp-alert-item p {
    margin: 0;
    color: #4f6282;
    font-size: 0.8rem;
}

.gp-form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.6rem;
    margin-bottom: 0.8rem;
}

.gp-form-grid > * {
    min-width: 0;
}

.gp-form-grid label {
    display: grid;
    gap: 0.28rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    min-width: 0;
}

.gp-form-grid__full {
    grid-column: 1 / -1;
}

.gp-form-grid .input-text,
.gp-form-grid .input-select,
.gp-form-grid textarea.input-text {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.gp-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.55rem;
}

.gp-filters {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.65rem;
    margin-bottom: 0.9rem;
    align-items: end;
}

.gp-filters--suppliers {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gp-filters--suppliers .gp-filter--search {
    grid-column: span 2;
    max-width: 560px;
}

.gp-filter--search {
    grid-column: span 2;
}

.gp-filters label {
    display: grid;
    gap: 0.32rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    min-width: 0;
}

.gp-filters .input-text,
.gp-filters .input-select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.gp-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
    margin-bottom: 0.7rem;
}

.gp-detail-grid > div {
    background: rgba(16, 65, 132, 0.06);
    border: 1px solid rgba(16, 65, 132, 0.12);
    border-radius: 10px;
    padding: 0.5rem;
    display: grid;
    gap: 0.2rem;
}

.gp-detail-grid > div span {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.gp-detail-grid > div strong {
    font-size: 0.9rem;
    color: var(--text-main);
}

.gp-doc-detail-header {
    margin: 0 0 1rem;
}

.gp-doc-detail-header h2 {
    margin: 0 0 0.55rem;
    font-size: 1.2rem;
    color: var(--text-main);
}

.gp-doc-detail-meta {
    margin-left: 0;
    gap: 0.75rem 1.2rem;
}

.gp-doc-detail-meta .detail-meta-group {
    min-width: 220px;
}

.gp-doc-detail-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.gp-doc-detail-tabs {
    margin-bottom: 1rem;
}

.gp-doc-header-actions {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.45rem;
}

.gp-doc-save-top-btn {
    min-width: 168px;
    justify-content: center;
}

.gp-doc-detail-layout {
    margin-bottom: 0;
}

.gp-doc-detail-main {
    min-height: 320px;
    min-width: 0;
}

.gp-doc-detail-main h4 {
    margin: 0 0 0.5rem;
}

.gp-doc-detail-side {
    min-width: 0;
}

.gp-doc-edit-form {
    display: grid;
    gap: 0.9rem;
}

.gp-doc-edit-section {
    border: 1px solid rgba(16, 65, 132, 0.12);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(16, 65, 132, 0.045), rgba(255, 255, 255, 0.96));
    padding: 0.72rem;
}

.gp-doc-edit-section__head {
    margin: 0 0 0.6rem;
    padding-bottom: 0.42rem;
    border-bottom: 1px solid rgba(16, 65, 132, 0.12);
}

.gp-doc-edit-section__head h4 {
    margin: 0;
    font-size: 0.88rem;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    color: #1d3f71;
}

.gp-doc-edit-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.56rem;
}

.gp-doc-edit-grid > label {
    display: grid;
    gap: 0.28rem;
    min-width: 0;
    margin: 0;
}

.gp-doc-edit-grid > label > span {
    font-size: 0.76rem;
    color: #526684;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.gp-doc-edit-grid .input-text,
.gp-doc-edit-grid .input-select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: 38px;
    border-color: rgba(18, 52, 103, 0.18);
    background: #fff;
}

.gp-doc-edit-grid textarea.input-text {
    height: auto;
    min-height: 82px;
    resize: vertical;
}

.gp-doc-edit-grid input[readonly] {
    background: rgba(226, 232, 240, 0.55);
    color: #334155;
    border-color: rgba(18, 52, 103, 0.12);
}

.gp-doc-edit-grid .input-text:focus,
.gp-doc-edit-grid .input-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.14);
}

.gp-doc-edit-field--span2 {
    grid-column: span 2;
}

.gp-doc-edit-grid .gp-form-grid__full {
    grid-column: 1 / -1;
}

.gp-doc-edit-form .gp-form-actions {
    margin-top: 0.05rem;
}

.gp-doc-summary-card {
    margin-top: 0.6rem;
    border: 1px solid rgba(16, 65, 132, 0.12);
    border-radius: 10px;
    padding: 0.6rem;
    background: rgba(16, 65, 132, 0.03);
}

.gp-doc-side-card {
    margin-bottom: 0.6rem;
}

.gp-doc-side-card:last-child {
    margin-bottom: 0;
}

.gp-doc-viewer {
    margin-top: 0.55rem;
    display: grid;
    gap: 0.5rem;
    position: relative;
}

.gp-doc-viewer__viewport-shell {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.gp-doc-viewer__viewport {
    position: relative;
    z-index: 1;
    border: 1px solid rgba(16, 65, 132, 0.14);
    border-radius: 12px;
    background: rgba(246, 249, 255, 0.95);
    min-height: 306px;
    height: clamp(320px, 61vh, 760px);
    max-height: 61vh;
    overflow-x: auto;
    overflow-y: auto;
    padding: 0.55rem;
    cursor: grab;
    touch-action: none;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.gp-doc-viewer__content {
    position: relative;
    min-width: 100%;
    min-height: 100%;
    width: max-content;
}

.gp-doc-viewer__viewport.is-panning {
    cursor: grabbing;
}

.gp-doc-viewer__stage {
    --gp-doc-viewer-zoom: 1;
    transform-origin: top left;
    transform: none;
    transition: transform 0s linear;
    min-height: 320px;
    width: max-content;
    height: max-content;
}

.gp-doc-viewer__frame {
    width: 100%;
    min-height: 560px;
    border: 0;
    border-radius: 8px;
    background: #fff;
    display: block;
}

.gp-doc-viewer__image {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border: 1px solid rgba(16, 65, 132, 0.1);
    border-radius: 8px;
    background: #fff;
}

.gp-doc-viewer__pdf {
    display: grid;
    gap: 0.6rem;
    width: max-content;
    min-width: 100%;
}

.gp-doc-viewer__pdf-page {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 10px;
    padding: 0.4rem;
    width: max-content;
    max-width: none;
    margin: 0;
    box-shadow: 0 5px 12px rgba(15, 23, 42, 0.08);
}

.gp-doc-viewer__pdf-canvas {
    display: block;
    max-width: none;
    height: auto;
}

.gp-doc-viewer__pdf-note {
    margin: 0.1rem 0 0;
    font-size: 0.74rem;
    color: var(--text-muted);
}

.gp-doc-viewer__controls {
    position: absolute;
    left: 50%;
    bottom: 0.65rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    z-index: 120;
    transform: translateX(-50%) translateZ(0);
    pointer-events: auto;
}

.gp-doc-viewer__controls .btn-icon,
.gp-doc-viewer__controls .btn-secondary {
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.16);
}

.gp-doc-viewer__zoom-value {
    height: 28px;
    min-width: 66px;
    padding: 0 0.45rem;
    font-size: 0.76rem;
    line-height: 1;
}

.gp-doc-viewer__meta {
    display: grid;
    gap: 0.15rem;
}

.gp-doc-viewer__meta strong {
    font-size: 0.9rem;
    color: var(--text-main);
}

.gp-doc-viewer__meta small {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.gp-doc-viewer__meta a {
    width: fit-content;
}

.gp-attachment-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

body.gp-doc-viewer-dragging {
    user-select: none;
}

@media (min-width: 1024px) {
    .gp-doc-detail-layout {
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    }
}

.gp-doc-quality {
    margin-top: 0.55rem;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.45rem;
}

.gp-doc-quality > div {
    background: rgba(16, 65, 132, 0.06);
    border: 1px solid rgba(16, 65, 132, 0.12);
    border-radius: 10px;
    padding: 0.5rem;
    display: grid;
    gap: 0.2rem;
}

.gp-doc-quality > div span {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.gp-doc-quality > div strong {
    font-size: 0.86rem;
    color: var(--text-main);
}

.gp-traceability {
    display: grid;
    gap: 0.82rem;
}

.gp-traceability-panel {
    border: 1px solid rgba(20, 55, 108, 0.15);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(17, 59, 126, 0.05), rgba(255, 255, 255, 0.98));
    padding: 0.65rem;
}

.gp-traceability-panel__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin: 0 0 0.6rem;
}

.gp-traceability-panel__title {
    display: grid;
    gap: 0.16rem;
}

.gp-traceability-panel__title h4 {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.33rem;
    font-size: 0.96rem;
    color: #1f3557;
}

.gp-traceability-panel__title p {
    margin: 0;
    font-size: 0.76rem;
    color: #5f7190;
}

.gp-traceability-count {
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 0 0.58rem;
    border-radius: 999px;
    border: 1px solid rgba(18, 52, 103, 0.15);
    background: rgba(255, 255, 255, 0.94);
    color: #415676;
    font-size: 0.75rem;
    font-weight: 700;
}

.gp-inline-form {
    margin: 0.6rem 0;
    display: flex;
    align-items: flex-end;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.gp-inline-form label {
    display: grid;
    gap: 0.25rem;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.gp-inline-form__grow {
    flex: 1;
    min-width: 240px;
}

.gp-inline-form--trace {
    margin: 0;
    padding: 0.56rem;
    border-radius: 10px;
    border: 1px solid rgba(18, 52, 103, 0.14);
    background: #fff;
    display: grid;
    grid-template-columns: minmax(164px, 0.35fr) minmax(0, 1fr) auto;
    align-items: end;
    gap: 0.52rem;
}

.gp-inline-form--trace + .gp-inline-form--trace {
    margin-top: 0.52rem;
}

.gp-inline-form--trace label {
    gap: 0.26rem;
    font-size: 0.76rem;
    color: #4f6282;
    font-weight: 600;
}

.gp-inline-form--trace .gp-inline-form__grow {
    min-width: 0;
}

.gp-inline-form--trace .input-text,
.gp-inline-form--trace .input-select {
    height: 38px;
    border-color: rgba(18, 52, 103, 0.18);
    background: #fff;
}

.gp-inline-form--trace .btn-secondary {
    height: 38px;
    white-space: nowrap;
    padding: 0 0.86rem;
}

.gp-doc-selector {
    border: 1px solid var(--border-color, #d8e0ec);
    border-radius: 10px;
    padding: 0.55rem;
}

.gp-doc-selector legend {
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 0 0.2rem;
}

.gp-doc-selector__list {
    display: grid;
    gap: 0.4rem;
    max-height: 220px;
    overflow: auto;
}

.gp-doc-selector__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    background: rgba(15, 50, 102, 0.04);
    border: 1px solid rgba(15, 50, 102, 0.1);
    border-radius: 8px;
    padding: 0.5rem;
}

.gp-timeline-item {
    border: 1px solid rgba(20, 55, 108, 0.14);
    border-radius: 9px;
    padding: 0.5rem;
    background: rgba(20, 55, 108, 0.03);
    display: grid;
    gap: 0.2rem;
}

.gp-timeline-item p {
    margin: 0;
    color: var(--text-main);
    font-size: 0.86rem;
}

.gp-timeline-item small {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.gp-timeline-item a {
    font-size: 0.8rem;
    text-decoration: underline;
}

.gp-timeline--trace {
    gap: 0.56rem;
}

.gp-timeline-item--trace {
    position: relative;
    border-radius: 12px;
    border: 1px solid rgba(20, 55, 108, 0.17);
    background: linear-gradient(160deg, rgba(244, 248, 255, 0.95), rgba(255, 255, 255, 0.98));
    padding: 0.62rem 0.7rem 0.62rem 0.94rem;
    gap: 0.24rem;
}

.gp-timeline-item--trace::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 12px 0 0 12px;
    background: linear-gradient(180deg, #3b82f6, #1d4ed8);
}

.gp-timeline-item--trace > strong {
    font-size: 0.98rem;
    color: #1e3150;
    text-transform: capitalize;
}

.gp-timeline-item--trace > p {
    font-size: 0.9rem;
    color: #253654;
    line-height: 1.34;
}

.gp-timeline-item__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.gp-timeline-item__actor {
    display: inline-flex;
    align-items: center;
    gap: 0.26rem;
    color: #5a6f90;
    font-size: 0.76rem;
}

.gp-timeline-item__time {
    color: #6b7c96;
    font-size: 0.74rem;
}

.gp-empty--trace {
    border: 1px dashed rgba(18, 52, 103, 0.24);
    border-radius: 10px;
    padding: 0.7rem;
    text-align: center;
    background: rgba(17, 59, 126, 0.03);
}

.gp-doc-detail-side--summary {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.gp-doc-detail-side--summary .gp-doc-viewer-card {
    flex: 0 0 auto;
}

.gp-doc-side-card--fill {
    flex: 1 1 auto;
    min-height: 320px;
    display: flex;
    flex-direction: column;
}

.gp-doc-timeline-card__head {
    margin-bottom: 0.48rem;
}

.gp-doc-timeline-card__title {
    display: grid;
    gap: 0.08rem;
}

.gp-doc-timeline-card__title h4 {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.34rem;
    color: #1f3557;
}

.gp-doc-timeline-card__title small {
    color: #62758f;
    font-size: 0.76rem;
}

.gp-doc-timeline-card__template-btn {
    border-radius: 999px;
    gap: 0.28rem;
}

.gp-doc-timeline-filters {
    display: flex;
    align-items: center;
    gap: 0.38rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.gp-doc-timeline-filter {
    border: 1px solid #d6deea;
    background: #f8fafc;
    color: #334155;
    border-radius: 999px;
    padding: 0.24rem 0.62rem;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.16s ease;
}

.gp-doc-timeline-filter.is-active {
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.gp-doc-timeline-filter--operativa {
    border-color: #3b82f6;
    color: #1d4ed8;
}

.gp-doc-timeline-filter--operativa.is-active {
    background: #eff6ff;
}

.gp-doc-timeline-filter--documental {
    border-color: #d97706;
    color: #9a3412;
}

.gp-doc-timeline-filter--documental.is-active {
    background: #fffbeb;
}

.gp-doc-timeline-filter--tributaria {
    border-color: #dc2626;
    color: #991b1b;
}

.gp-doc-timeline-filter--tributaria.is-active {
    background: #fef2f2;
}

.gp-doc-timeline-filter--system {
    border-color: #64748b;
    color: #334155;
}

.gp-doc-timeline-filter--system.is-active {
    background: #f1f5f9;
}

.gp-doc-comment-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(140px, 0.46fr);
    gap: 0.48rem;
    padding: 0.56rem;
    border: 1px solid rgba(18, 52, 103, 0.13);
    border-radius: 10px;
    background: #fff;
    margin-bottom: 0.56rem;
}

.gp-doc-comment-form label {
    display: grid;
    gap: 0.24rem;
    font-size: 0.76rem;
    color: #4f6282;
    font-weight: 600;
}

.gp-doc-comment-form .input-text,
.gp-doc-comment-form .input-select {
    width: 100%;
    min-width: 0;
    border-color: rgba(18, 52, 103, 0.18);
}

.gp-doc-comment-form .input-select {
    height: 36px;
}

.gp-doc-comment-form__message {
    grid-column: 1 / -1;
}

.gp-doc-comment-form__message textarea.input-text {
    min-height: 72px;
    resize: vertical;
}

.gp-doc-comment-form__actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
}

.gp-doc-timeline-list {
    overflow: auto;
    overflow-x: hidden;
    padding-right: 0.2rem;
    display: grid;
    gap: 0.46rem;
    min-height: 0;
    flex: 1 1 auto;
    max-height: clamp(120px, 21vh, 260px);
}

.gp-doc-event {
    border: 1px solid rgba(20, 55, 108, 0.15);
    border-radius: 10px;
    background: #fff;
    padding: 0.55rem 0.62rem;
    display: grid;
    gap: 0.28rem;
}

.gp-doc-event--operativa {
    border-left: 3px solid #3b82f6;
    background: linear-gradient(90deg, rgba(239, 246, 255, 0.7), rgba(255, 255, 255, 0.95));
}

.gp-doc-event--documental {
    border-left: 3px solid #d97706;
    background: linear-gradient(90deg, rgba(255, 251, 235, 0.76), rgba(255, 255, 255, 0.95));
}

.gp-doc-event--tributaria {
    border-left: 3px solid #dc2626;
    background: linear-gradient(90deg, rgba(254, 242, 242, 0.76), rgba(255, 255, 255, 0.95));
}

.gp-doc-event--system {
    border-left: 3px solid #64748b;
    background: linear-gradient(90deg, rgba(241, 245, 249, 0.76), rgba(255, 255, 255, 0.95));
}

.gp-doc-event__meta {
    display: grid;
    grid-template-columns: auto auto 1fr;
    gap: 0.32rem;
    align-items: center;
}

.gp-doc-event__type {
    font-size: 0.72rem;
    font-weight: 800;
    color: #1e3a67;
}

.gp-doc-event__category {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 0.66rem;
    padding: 0.11rem 0.45rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.gp-doc-event__category--operativa {
    background: rgba(59, 130, 246, 0.14);
    color: #1d4ed8;
}

.gp-doc-event__category--documental {
    background: rgba(217, 119, 6, 0.14);
    color: #9a3412;
}

.gp-doc-event__category--tributaria {
    background: rgba(220, 38, 38, 0.14);
    color: #991b1b;
}

.gp-doc-event__time {
    justify-self: end;
    font-size: 0.7rem;
    color: #64748b;
}

.gp-doc-event__message {
    margin: 0;
    color: #1f334f;
    font-size: 0.84rem;
    line-height: 1.35;
}

.gp-doc-event__footer {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: #607189;
    font-size: 0.73rem;
}

.gp-doc-template-modal {
    width: min(940px, calc(100vw - 2rem));
}

.gp-doc-template-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: 0.9rem;
}

.gp-doc-template-list,
.gp-doc-template-form-wrap {
    border: 1px solid rgba(18, 52, 103, 0.14);
    border-radius: 12px;
    background: #fff;
    padding: 0.66rem;
}

.gp-doc-template-list {
    display: grid;
    gap: 0.58rem;
    min-height: 420px;
}

.gp-doc-template-list__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
}

.gp-doc-template-list__head span {
    border: 1px solid rgba(18, 52, 103, 0.15);
    border-radius: 999px;
    height: 24px;
    min-width: 24px;
    padding: 0 0.48rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    color: #4f6282;
    font-weight: 700;
}

.gp-doc-template-list__body {
    display: grid;
    gap: 0.5rem;
    overflow: auto;
    min-height: 0;
    max-height: 57vh;
    padding-right: 0.2rem;
}

.gp-doc-template-item {
    border: 1px solid rgba(18, 52, 103, 0.13);
    border-radius: 10px;
    padding: 0.55rem;
    background: linear-gradient(180deg, rgba(248, 251, 255, 0.9), rgba(255, 255, 255, 1));
    display: grid;
    gap: 0.35rem;
}

.gp-doc-template-item header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.4rem;
}

.gp-doc-template-item header strong {
    color: #1f3557;
    font-size: 0.86rem;
}

.gp-doc-template-item__category {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.1rem 0.42rem;
    font-size: 0.64rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.gp-doc-template-item__category--operativa {
    background: rgba(59, 130, 246, 0.14);
    color: #1d4ed8;
}

.gp-doc-template-item__category--documental {
    background: rgba(217, 119, 6, 0.14);
    color: #9a3412;
}

.gp-doc-template-item__category--tributaria {
    background: rgba(220, 38, 38, 0.14);
    color: #991b1b;
}

.gp-doc-template-item p {
    margin: 0;
    color: #4e6280;
    font-size: 0.79rem;
    line-height: 1.32;
}

.gp-doc-template-item__actions {
    display: flex;
    align-items: center;
    gap: 0.42rem;
    justify-content: flex-end;
}

.gp-doc-template-form {
    display: grid;
    gap: 0.5rem;
}

.gp-doc-template-form h4 {
    margin: 0;
    color: #1f3557;
}

.gp-doc-template-form label {
    display: grid;
    gap: 0.25rem;
    font-size: 0.78rem;
    color: #4f6282;
    font-weight: 600;
}

.gp-doc-template-form textarea.input-text {
    min-height: 128px;
    resize: vertical;
}

.gp-doc-template-form__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.gp-empty {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.gp-loading {
    border: 1px solid var(--border-color, #d8e0ec);
    border-radius: 12px;
    background: #fff;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--text-muted);
}

.gp-loading__spinner {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 2px solid rgba(28, 98, 194, 0.25);
    border-top-color: rgba(28, 98, 194, 0.95);
    animation: gp-spin 0.75s linear infinite;
}

.gp-modal {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.gp-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6, 13, 25, 0.56);
}

.gp-modal__panel {
    position: relative;
    width: min(760px, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
    overflow: auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 24px 60px rgba(4, 10, 24, 0.35);
    border: 1px solid rgba(18, 52, 103, 0.22);
}

.gp-modal__head,
.gp-modal__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--border-color, #d8e0ec);
}

.gp-modal__foot {
    border-bottom: 0;
    border-top: 1px solid var(--border-color, #d8e0ec);
    justify-content: flex-end;
}

.gp-modal__body {
    padding: 0.8rem 1rem 1rem;
    display: grid;
    gap: 0.65rem;
}

.gp-document-modal {
    width: min(1120px, calc(100vw - 2rem));
    overflow: hidden;
}

.gp-supplier-modal {
    width: min(1040px, calc(100vw - 2rem));
    overflow: hidden;
}

.gp-agreement-modal,
.gp-payment-modal {
    width: min(1040px, calc(100vw - 2rem));
    overflow: hidden;
}

.gp-document-modal .gp-modal__body {
    max-height: calc(100vh - 8rem);
    overflow: auto;
}

.gp-supplier-modal .gp-modal__body {
    max-height: calc(100vh - 8rem);
    overflow: auto;
}

.gp-agreement-modal .gp-modal__body,
.gp-payment-modal .gp-modal__body {
    max-height: calc(100vh - 8rem);
    overflow: auto;
}

.gp-document-modal .gp-form-grid {
    margin-bottom: 0;
}

.gp-supplier-modal .gp-form-grid {
    margin-bottom: 0;
}

.gp-agreement-modal .gp-form-grid,
.gp-payment-modal .gp-form-grid {
    margin-bottom: 0;
}

.gp-scanner-import {
    display: grid;
    gap: 0.55rem;
}

.gp-scanner-import > label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.gp-scanner-import .new-claim-dropzone {
    margin-top: 0;
}

.gp-scanner-file {
    margin: 0;
    font-size: 0.84rem;
    color: var(--text-muted);
}

.gp-scanner-progress {
    border: 1px solid rgba(56, 189, 248, 0.45);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(235, 248, 255, 0.88), rgba(255, 255, 255, 0.95));
    box-shadow: 0 10px 20px rgba(14, 116, 144, 0.12);
    padding: 0.7rem 0.8rem;
    display: grid;
    gap: 0.4rem;
}

.gp-scanner-progress__header {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.gp-scanner-progress__title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #0f172a;
}

.gp-scanner-progress__badge {
    font-size: 0.72rem;
    font-weight: 600;
    color: #334155;
    padding: 0.16rem 0.5rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.gp-scanner-progress__status {
    font-size: 0.8rem;
    color: #0f172a;
}

.gp-scanner-progress__bars {
    display: grid;
    gap: 0.32rem;
}

.gp-scanner-progress__bar {
    height: 6px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.22);
    overflow: hidden;
}

.gp-scanner-progress__bar > span {
    display: block;
    height: 100%;
    min-width: 6%;
    border-radius: inherit;
    background: linear-gradient(90deg, #14b8a6, #22c55e);
    transition: width 0.35s ease-out;
    position: relative;
}

.gp-scanner-progress__bar > span::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.5) 45%, rgba(255, 255, 255, 0) 100%);
    animation: gp-scanner-progress-shimmer 1.1s linear infinite;
}

.gp-scanner-progress__hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.gp-scanner-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.gp-scanner-summary > div {
    border: 1px solid rgba(22, 73, 142, 0.17);
    border-radius: 9px;
    padding: 0.45rem;
    background: rgba(20, 66, 132, 0.05);
    display: grid;
    gap: 0.15rem;
}

.gp-scanner-summary span {
    font-size: 0.74rem;
    color: var(--text-muted);
}

.gp-scanner-summary--meta > div strong {
    font-size: 0.88rem;
}

.gp-scanner-errors {
    border: 1px solid rgba(185, 28, 28, 0.25);
    border-radius: 9px;
    background: rgba(254, 242, 242, 0.82);
    padding: 0.45rem 0.55rem;
}

.gp-scanner-errors summary {
    cursor: pointer;
    color: #7f1d1d;
    font-weight: 700;
    font-size: 0.8rem;
}

.gp-scanner-errors ul {
    margin: 0.45rem 0 0;
    padding-left: 1rem;
    display: grid;
    gap: 0.3rem;
}

.gp-scanner-errors li {
    font-size: 0.78rem;
    color: #7f1d1d;
}

.gp-scanner-fields summary {
    cursor: pointer;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.82rem;
}

.gp-scanner-fields__list {
    margin-top: 0.45rem;
    display: grid;
    gap: 0.36rem;
}

.gp-scanner-field {
    display: grid;
    grid-template-columns: 140px 1fr auto;
    gap: 0.45rem;
    align-items: center;
    border: 1px solid rgba(17, 59, 126, 0.13);
    border-radius: 8px;
    background: rgba(17, 59, 126, 0.04);
    padding: 0.42rem 0.5rem;
}

.gp-scanner-field span {
    font-size: 0.73rem;
    color: var(--text-muted);
}

.gp-scanner-field strong {
    font-size: 0.8rem;
    color: var(--text-main);
}

.gp-scanner-field small {
    font-size: 0.72rem;
    color: #0f766e;
    font-weight: 600;
}

.gp-scanner-field.is-low {
    border-color: rgba(185, 28, 28, 0.32);
    background: rgba(254, 242, 242, 0.92);
}

.gp-scanner-field.is-low small {
    color: #b91c1c;
}

.gp-scanner-preview summary {
    cursor: pointer;
    color: var(--text-main);
    font-weight: 600;
}

.gp-scanner-preview pre {
    margin: 0.35rem 0 0;
    white-space: pre-wrap;
    font-size: 0.78rem;
    color: var(--text-muted);
    background: rgba(17, 59, 126, 0.04);
    border: 1px solid rgba(17, 59, 126, 0.1);
    border-radius: 8px;
    padding: 0.55rem;
}

.gp-table tr.is-selected {
    background: rgba(55, 123, 231, 0.1);
}

.gp-tags-inline {
    display: inline-flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

@keyframes gp-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes gp-scanner-progress-shimmer {
    0% {
        transform: translateX(-120%);
    }
    100% {
        transform: translateX(120%);
    }
}

@media (max-width: 1120px) {
    .gp-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gp-kpi-grid--dashboard {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gp-grid--2 {
        grid-template-columns: 1fr;
    }

    .gp-dashboard-hero {
        grid-template-columns: 1fr;
    }

    .gp-dashboard-grid--main,
    .gp-dashboard-grid--secondary {
        grid-template-columns: 1fr;
    }

    .gp-dashboard-monthly {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .gp-filters {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .gp-filters--suppliers {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gp-filters--suppliers .gp-filter--search {
        grid-column: span 2;
        max-width: none;
    }

    .gp-filter--search {
        grid-column: span 3;
    }

    .gp-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gp-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gp-doc-quality {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gp-doc-detail-meta .detail-meta-group {
        min-width: 160px;
    }

    .gp-doc-edit-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gp-doc-viewer__viewport {
        min-height: 255px;
        height: min(56vh, 560px);
    }

    .gp-doc-comment-form {
        grid-template-columns: 1fr;
    }

    .gp-doc-template-grid {
        grid-template-columns: 1fr;
    }

    .gp-doc-template-list {
        min-height: 280px;
    }

    .gp-inline-form--trace {
        grid-template-columns: minmax(154px, 0.4fr) minmax(0, 1fr);
    }

    .gp-inline-form--trace .btn-secondary {
        grid-column: 1 / -1;
        justify-self: flex-end;
    }

    .gp-pagination {
        align-items: flex-start;
    }

    .gp-pagination__meta {
        order: 3;
        width: 100%;
    }
}

@media (max-width: 760px) {
    .gp-kpi-grid,
    .gp-filters,
    .gp-form-grid,
    .gp-detail-grid,
    .gp-doc-quality,
    .gp-scanner-summary {
        grid-template-columns: 1fr;
    }

    .gp-filter--search {
        grid-column: span 1;
    }

    .gp-dashboard-hero {
        padding: 0.68rem;
    }

    .gp-dashboard-hero__stats {
        gap: 0.4rem;
    }

    .gp-dashboard-status-chips {
        grid-template-columns: 1fr;
    }

    .gp-dashboard-monthly {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gp-dashboard-chart-wrap {
        min-height: 220px;
        max-height: 220px;
    }

    .gp-dashboard-chart-wrap--wide {
        min-height: 238px;
        max-height: 238px;
    }

    .gp-filters--suppliers .gp-filter--search {
        max-width: none;
    }

    .gp-inline-form {
        flex-direction: column;
        align-items: stretch;
    }

    .gp-inline-form__grow {
        min-width: auto;
        width: 100%;
    }

    .gp-inline-form--trace {
        grid-template-columns: 1fr;
    }

    .gp-inline-form--trace .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .gp-doc-detail-meta {
        display: flex;
        flex-direction: column;
        gap: 0.45rem;
    }

    .gp-doc-header-actions {
        align-items: stretch;
        width: 100%;
    }

    .gp-doc-save-top-btn {
        width: 100%;
    }

    .gp-doc-viewer__viewport {
        min-height: 205px;
        height: min(60vh, 460px);
        max-height: 60vh;
    }

    .gp-doc-viewer__frame {
        min-height: 420px;
    }

    .gp-doc-side-card--fill {
        min-height: 240px;
    }

    .gp-doc-timeline-filters {
        width: 100%;
    }

    .gp-doc-comment-form {
        grid-template-columns: 1fr;
    }

    .gp-doc-comment-form__actions .btn-primary {
        width: 100%;
    }

    .gp-doc-event__meta {
        grid-template-columns: 1fr;
    }

    .gp-doc-event__time {
        justify-self: start;
    }

    .gp-doc-template-modal {
        width: min(100%, calc(100vw - 1rem));
    }

    .gp-document-modal {
        width: min(100%, calc(100vw - 1rem));
    }

    .gp-supplier-modal {
        width: min(100%, calc(100vw - 1rem));
    }

    .gp-agreement-modal,
    .gp-payment-modal {
        width: min(100%, calc(100vw - 1rem));
    }

    .gp-doc-template-form__actions {
        flex-direction: column;
    }

    .gp-doc-template-form__actions .btn-secondary,
    .gp-doc-template-form__actions .btn-primary {
        width: 100%;
        justify-content: center;
    }

    .gp-doc-edit-grid {
        grid-template-columns: 1fr;
    }

    .gp-doc-edit-field--span2 {
        grid-column: span 1;
    }

    .gp-scanner-field {
        grid-template-columns: 1fr;
    }

    .gp-table {
        min-width: 700px;
    }
}
