.cliente-clean-row-clickable {
    cursor: pointer;
}

.cliente-clean-row-clickable:focus-visible {
    outline: 3px solid rgba(224, 64, 13, 0.28);
    outline-offset: 2px;
}

.cliente-clean-subtle.warn {
    background: rgba(220, 53, 69, 0.1);
    color: #b42318;
}

.cliente-clean-subtle.success {
    background: rgba(25, 135, 84, 0.12);
    color: #146c43;
}

.cliente-clean-row-compact {
    grid-template-columns: minmax(0, 1fr) minmax(220px, auto);
    align-items: center;
}

.cliente-clean-name-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    border: none;
    background: transparent;
    color: #0f172a;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    text-align: left;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
}

.cliente-clean-name-link:hover,
.cliente-clean-name-link:focus-visible {
    color: #b93815;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.cliente-clean-name-link:focus-visible {
    outline: 2px solid rgba(224, 64, 13, 0.22);
    outline-offset: 4px;
    border-radius: 6px;
}

.cliente-clean-summary-line {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.cliente-clean-summary-line span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 32px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(248, 250, 252, 0.95);
    border: 1px solid rgba(15, 23, 42, 0.07);
    color: #475569;
    font-size: 12px;
    line-height: 1.4;
}

.cliente-clean-summary-line i {
    color: #e0400d;
}

.cliente-clean-summary-line.secondary span {
    background: rgba(255, 247, 237, 0.96);
}

.cliente-finance-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.cliente-finance-panel {
    margin-top: 0;
}

.status-badge.status-Cancelado {
    background: rgba(220, 53, 69, 0.12);
    color: #b42318;
}

.document-upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.modal-document-upload-grid {
    margin-top: 12px;
}

.document-upload-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
}

.document-upload-card label {
    font-size: 13px;
    font-weight: 700;
    color: #1f2937;
}

.document-upload-card input[type="file"] {
    width: 100%;
    padding: 10px;
    border-radius: 12px;
    border: 1px dashed rgba(224, 64, 13, 0.25);
    background: rgba(255, 255, 255, 0.9);
}

.document-upload-card small,
.document-section-helper,
.document-existing-panel-header small {
    color: #64748b;
    font-size: 12px;
    line-height: 1.45;
}

.document-upload-card-wide {
    grid-column: span 2;
}

.document-upload-preview {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 58px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(248, 250, 252, 0.92);
    border: 1px solid rgba(15, 23, 42, 0.06);
}

.document-upload-preview.empty {
    justify-content: center;
    color: #94a3b8;
    border-style: dashed;
}

.document-upload-preview-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    font-size: 12px;
}

.document-upload-preview-item strong {
    color: #1f2937;
    font-weight: 600;
}

.document-upload-preview-item small {
    color: #64748b;
    white-space: nowrap;
}

.form-group-documents {
    margin-top: 18px;
}

.document-existing-panel {
    margin-top: 18px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(248, 250, 252, 0.85);
}

.document-existing-panel-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.document-existing-list,
.document-existing-list-inner,
.document-existing-list-rich {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.document-existing-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #ffffff;
    color: inherit;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.document-existing-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 24px rgba(15, 23, 42, 0.08);
    border-color: rgba(224, 64, 13, 0.25);
}

.document-existing-thumb {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    border-radius: 14px;
    overflow: hidden;
    display: grid;
    place-items: center;
    background: rgba(15, 23, 42, 0.05);
    color: #475569;
}

.document-existing-thumb.image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.document-existing-thumb.file i {
    font-size: 20px;
}

.document-existing-item-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1;
}

.document-existing-item-body strong,
.cliente-detail-field strong,
.cliente-debito-item strong,
.cliente-payment-item strong {
    color: #0f172a;
}

.document-existing-item-body span,
.cliente-detail-field small,
.cliente-debito-item small,
.cliente-payment-item small {
    color: #64748b;
    font-size: 12px;
    line-height: 1.4;
}

.document-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.document-summary-pill {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #ffffff;
}

.document-summary-pill.ok {
    border-color: rgba(25, 135, 84, 0.22);
    background: rgba(25, 135, 84, 0.07);
}

.document-summary-pill.missing {
    border-color: rgba(220, 53, 69, 0.2);
    background: rgba(220, 53, 69, 0.08);
}

.cliente-detalhes-modal-content {
    max-width: 1120px;
    width: min(96vw, 1120px);
}

.cliente-details-body {
    padding: 22px 24px 26px;
}

.cliente-details-layout {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.cliente-details-hero {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    padding: 20px 22px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(224, 64, 13, 0.12), rgba(255, 247, 237, 0.94));
    border: 1px solid rgba(224, 64, 13, 0.16);
}

.cliente-details-kicker {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.75);
    color: #b93815;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.cliente-details-hero-main h3 {
    margin: 0 0 8px;
    font-size: 28px;
    color: #0f172a;
}

.cliente-details-hero-main p {
    margin: 0;
    color: #475569;
}

.cliente-details-hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cliente-details-top-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 16px;
}

.cliente-detail-section {
    padding: 18px 20px;
    border-radius: 22px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

.cliente-detail-section-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.cliente-detail-section-header h4 {
    margin: 0 0 4px;
    font-size: 18px;
    color: #0f172a;
}

.cliente-detail-section-header p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
}

.cliente-detail-fields-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.cliente-detail-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    background: rgba(248, 250, 252, 0.9);
}

.cliente-debito-list,
.cliente-payment-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cliente-debito-item,
.cliente-payment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.07);
    background: rgba(248, 250, 252, 0.92);
}

.cliente-debito-meta,
.cliente-payment-item-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-align: right;
    align-items: flex-end;
}

@media (max-width: 960px) {
    .document-upload-card-wide {
        grid-column: span 1;
    }

    .cliente-clean-row-compact {
        grid-template-columns: 1fr;
    }

    .cliente-finance-grid {
        grid-template-columns: 1fr;
    }

    .cliente-details-top-grid {
        grid-template-columns: 1fr;
    }

    .cliente-details-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .cliente-details-hero-actions {
        width: 100%;
    }

    .cliente-details-hero-actions .btn-receber,
    .cliente-details-hero-actions .btn-edit {
        flex: 1;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .cliente-details-body {
        padding: 16px;
    }

    .document-upload-grid,
    .document-existing-list,
    .document-existing-list-inner,
    .document-existing-list-rich,
    .document-summary-grid,
    .cliente-detail-fields-grid {
        grid-template-columns: 1fr;
    }

    .cliente-debito-item,
    .cliente-payment-item,
    .document-existing-item,
    .document-existing-panel-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .cliente-debito-meta,
    .cliente-payment-item-meta {
        width: 100%;
        align-items: flex-start;
        text-align: left;
    }

    .cliente-clean-summary-line span {
        width: 100%;
        justify-content: flex-start;
    }
}
