/* SGTC v28.1 - Cards amplos e paginação */

.page-v281 {
    max-width: 1640px;
}

.v281-page-head {
    margin-bottom: 15px;
}

.v281-filter-card {
    padding: 14px 16px;
}

.v281-filter {
    display: grid !important;
    grid-template-columns: minmax(210px,1.3fr) minmax(150px,.7fr) minmax(260px,1.1fr) minmax(190px,.9fr) 135px auto auto;
    gap: 9px;
    align-items: end;
}

.v281-filter input,
.v281-filter select {
    max-width: none !important;
    min-width: 0;
}

.v281-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2px 0 10px;
    color: #214c47;
}

.v281-result-header div {
    display: flex;
    align-items: center;
    gap: 9px;
}

.v281-result-header strong {
    font-size: 14px;
    font-weight: 950;
}

.v281-result-header span {
    color: #6c8580;
    font-size: 12px;
    font-weight: 800;
}

.v281-record-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    width: 100%;
    margin-bottom: 16px;
}

.v281-record-grid.preview {
    margin-bottom: 0;
}

.v281-record-card {
    position: relative;
    min-width: 0;
    border: 1px solid #d7e7e2;
    border-radius: 20px;
    background: linear-gradient(180deg,#fff,#fbfefd);
    box-shadow: 0 13px 28px rgba(4,45,39,.08);
    padding: 15px;
    overflow: hidden;
}

.v281-record-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: #0f766e;
}

.v281-record-card.status-vencida::before { background: #d84a3d; }
.v281-record-card.status-a_vencer::before { background: #e5b600; }
.v281-record-card.status-sem_referencia::before { background: #677aa5; }
.v281-record-card.status-em_dia::before { background: #0a8a62; }
.v281-record-card.status-suspensa::before { background: #858585; }

.v281-record-card-head {
    display: grid;
    grid-template-columns: 145px 1fr;
    gap: 14px;
    align-items: start;
    border-bottom: 1px solid #e6eeeb;
    padding: 0 4px 12px 8px;
    margin-bottom: 12px;
}

.v281-status-block,
.v281-vehicle-title,
.v281-record-fields > div {
    min-width: 0;
}

.v281-status-block small,
.v281-vehicle-title small,
.v281-record-fields small {
    display: block;
    color: #52716b;
    font-size: 10px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 4px;
}

.v281-vehicle-title strong {
    display: block;
    color: #053047;
    font-size: 18px;
    line-height: 1;
    font-weight: 950;
}

.v281-vehicle-title span,
.v281-vehicle-title em {
    display: block;
    color: #58756f;
    font-size: 12px;
    line-height: 1.35;
    font-style: normal;
    font-weight: 750;
    margin-top: 4px;
    overflow-wrap: anywhere;
}

.v281-vehicle-title em {
    color: #76918b;
    font-size: 11px;
}

.v281-record-fields {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 0;
    margin: 0 4px 12px 8px;
    border: 1px solid #e5eeeb;
    border-radius: 15px;
    overflow: hidden;
}

.v281-record-fields.compact {
    grid-template-columns: 1.5fr repeat(3,minmax(0,1fr));
}

.v281-record-fields > div {
    padding: 10px 11px;
    border-right: 1px solid #e8efed;
    border-bottom: 1px solid #e8efed;
    background: rgba(248,252,250,.75);
}

.v281-record-fields > div:nth-child(4n) { border-right: 0; }
.v281-record-fields > div:nth-last-child(-n+4) { border-bottom: 0; }

.v281-record-fields strong,
.v281-record-fields span {
    display: block;
    overflow-wrap: anywhere;
}

.v281-record-fields strong {
    color: #06372f;
    font-size: 13px;
    font-weight: 950;
    line-height: 1.3;
}

.v281-record-fields span {
    color: #66817b;
    font-size: 11px;
    line-height: 1.35;
    margin-top: 3px;
    font-weight: 750;
}

.v281-record-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 4px 0 8px;
}

.v281-record-card-footer > span {
    color: #66817b;
    font-size: 11px;
    font-weight: 800;
}

.v281-empty-card {
    grid-column: 1 / -1;
    padding: 30px;
    border: 1px dashed #bad7cf;
    border-radius: 18px;
    background: #f7fcfa;
    color: #6a8580;
    text-align: center;
    font-weight: 900;
}

.v281-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin: 8px 0 18px;
    padding: 12px 14px;
    border: 1px solid #d9e8e3;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 9px 22px rgba(4,45,39,.06);
}

.v281-pagination-summary {
    color: #617d77;
    font-size: 12px;
    font-weight: 800;
}

.v281-pagination-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
}

.v281-pagination-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid #cfe3dd;
    border-radius: 9px;
    background: #f4fbf8;
    color: #075a52;
    text-decoration: none;
    font-size: 11px;
    font-weight: 950;
}

.v281-pagination-links a.number {
    min-width: 34px;
    padding-left: 8px;
    padding-right: 8px;
}

.v281-pagination-links a.active {
    color: #fff;
    background: #0f766e;
    border-color: #0f766e;
}

.v281-pagination-links a.disabled {
    pointer-events: none;
    opacity: .45;
}

/* As tabelas densas antigas também ficam em dois quadros por linha no desktop. */
@media (min-width: 1001px) {
    table.sgtc-table-dense tbody {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 1380px) {
    .v281-filter {
        grid-template-columns: repeat(4,minmax(0,1fr));
    }

    .v281-filter .btn {
        width: 100%;
    }

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

    .v281-record-fields > div:nth-child(4n) { border-right: 1px solid #e8efed; }
    .v281-record-fields > div:nth-child(2n) { border-right: 0; }
    .v281-record-fields > div:nth-last-child(-n+4) { border-bottom: 1px solid #e8efed; }
    .v281-record-fields > div:nth-last-child(-n+2) { border-bottom: 0; }
}

@media (max-width: 1000px) {
    .v281-record-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 640px) {
    .v281-filter {
        grid-template-columns: 1fr;
    }

    .v281-record-card-head,
    .v281-record-fields,
    .v281-record-fields.compact {
        grid-template-columns: 1fr;
    }

    .v281-record-fields > div {
        border-right: 0 !important;
        border-bottom: 1px solid #e8efed !important;
    }

    .v281-record-fields > div:last-child {
        border-bottom: 0 !important;
    }

    .v281-record-card-footer,
    .v281-pagination {
        align-items: stretch;
        flex-direction: column;
    }

    .v281-pagination-links {
        justify-content: center;
    }
}

.v281-row-hidden {
    display: none !important;
}

.v281-auto-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid #d9e8e3;
    border-radius: 14px;
    background: #f9fdfb;
}

.v281-auto-pagination-summary {
    color: #617d77;
    font-size: 11px;
    font-weight: 850;
}

.v281-auto-pagination-links {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.v281-auto-pagination-links button {
    min-height: 32px;
    min-width: 32px;
    padding: 6px 9px;
    border: 1px solid #cfe3dd;
    border-radius: 8px;
    background: #fff;
    color: #075a52;
    cursor: pointer;
    font-size: 10px;
    font-weight: 950;
}

.v281-auto-pagination-links button.active {
    color: #fff;
    background: #0f766e;
    border-color: #0f766e;
}

.v281-auto-pagination-links button:disabled {
    cursor: default;
    opacity: .45;
}

.v281-row-hidden {
    display: none !important;
}

.v281-auto-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid #d9e8e3;
    border-radius: 14px;
    background: #f9fdfb;
}

.v281-auto-pagination-summary {
    color: #617d77;
    font-size: 11px;
    font-weight: 850;
}

.v281-auto-pagination-links {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.v281-auto-pagination-links button {
    min-height: 32px;
    min-width: 32px;
    padding: 6px 9px;
    border: 1px solid #cfe3dd;
    border-radius: 8px;
    background: #fff;
    color: #075a52;
    cursor: pointer;
    font-size: 10px;
    font-weight: 950;
}

.v281-auto-pagination-links button.active {
    color: #fff;
    background: #0f766e;
    border-color: #0f766e;
}

.v281-auto-pagination-links button:disabled {
    cursor: default;
    opacity: .45;
}
