/* =========================================
   Arquivo: filex/css/pagamentos-recebidos.css
   XONA — PAGAMENTOS RECEBIDOS
   Requer main.css carregado antes.
   ========================================= */

/* =========================================
   BODY — sem sidebar direita
   ========================================= */
body.received-body .main-content {
    margin-right: 0 !important;
    max-width: none !important;
}

.received-page {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-bottom: 24px;
    margin-top: 2%;
}

/* =========================================
   TÍTULO + PESQUISA
   ========================================= */
.received-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.received-title-block h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}
.received-title-block p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}
.received-search { min-width: 280px; }

/* =========================================
   SUMÁRIO
   ========================================= */
.received-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.received-summary-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    transition: border-color 0.2s;
}
.received-summary-card:hover { border-color: var(--accent-pink); }
.received-summary-card.highlight {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.12), rgba(34, 197, 94, 0.02));
    border-color: rgba(34, 197, 94, 0.28);
}
.received-summary-card.highlight > i {
    background-color: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}
.received-summary-card.highlight .received-summary-value {
    color: #22c55e;
}
.received-summary-card > i {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background-color: rgba(240, 36, 110, 0.1);
    color: var(--accent-pink);
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.received-summary-card > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.received-summary-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}
.received-summary-label {
    font-size: 12px;
    color: var(--text-secondary);
}

/* =========================================
   TABS
   ========================================= */
.received-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
    scrollbar-color: #30363d transparent;
}
.received-tabs::-webkit-scrollbar { height: 4px; }
.received-tabs::-webkit-scrollbar-thumb {
    background: #30363d;
    border-radius: 999px;
}

.received-tab {
    flex-shrink: 0;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    padding: 9px 18px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.received-tab:hover {
    border-color: var(--accent-pink);
    color: var(--accent-pink);
}
.received-tab.active {
    background-color: var(--accent-pink);
    border-color: var(--accent-pink);
    color: #fff;
}

/* =========================================
   TABELA (DESKTOP)
   ========================================= */
.received-table-wrapper {
    width: 100%;
    max-width: 100%;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-sizing: border-box;
}
.received-table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 13.5px;
}

.received-table col.col-tipo    { width: 16%; }
.received-table col.col-pagador { width: 36%; }
.received-table col.col-data    { width: 16%; }
.received-table col.col-valor   { width: 16%; }
.received-table col.col-estado  { width: 16%; }

.received-table thead { background-color: var(--bg-dark); }
.received-table th {
    text-align: left;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}
.received-table td {
    padding: 14px 18px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
}
.received-table tbody tr:last-child td { border-bottom: none; }

.received-row {
    cursor: pointer;
    transition: background-color 0.15s;
}
.received-row:hover { background-color: var(--bg-dark); }

.received-table th.right,
.received-table td.right {
    text-align: right;
    overflow: visible;
}

/* =========================================
   BADGE DE TIPO
   ========================================= */
.payment-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 11px;
    border-radius: 999px;
    white-space: nowrap;
    border: 1px solid transparent;
}
.payment-type-badge i { font-size: 10px; }

.payment-type-badge.type-subscription {
    background-color: rgba(240, 36, 110, 0.1);
    color: var(--accent-pink);
    border-color: rgba(240, 36, 110, 0.25);
}
.payment-type-badge.type-content {
    background-color: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
    border-color: rgba(139, 92, 246, 0.25);
}
.payment-type-badge.type-tip {
    background-color: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.25);
}

/* =========================================
   CÉLULA — PAGADOR
   ========================================= */
.received-payer-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.received-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    flex-shrink: 0;
    background-color: var(--bg-dark);
}
.received-payer-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.received-payer-name {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.received-payer-desc {
    font-size: 11.5px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =========================================
   VALOR
   ========================================= */
.received-amount {
    font-size: 14px;
    font-weight: 700;
    color: #22c55e;
    white-space: nowrap;
}

/* =========================================
   ESTADO
   ========================================= */
.payment-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 999px;
    white-space: nowrap;
}
.payment-status i { font-size: 6px; }
.payment-status.paid {
    background-color: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}
.payment-status.pending {
    background-color: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* =========================================
   BREAKPOINT INTERMÉDIO (1201–1400px)
   ========================================= */
@media (min-width: 1201px) and (max-width: 1400px) {
    .received-table th,
    .received-table td { padding: 11px 12px; }
    .received-table th { font-size: 10.5px; }
    .received-table { font-size: 12.5px; }
    .received-avatar { width: 36px; height: 36px; }
    .received-payer-name { font-size: 13px; }
    .payment-type-badge { font-size: 11px; padding: 4px 9px; }
    .received-amount { font-size: 13px; }
    .payment-status { font-size: 11px; padding: 3px 10px; }
}

/* =========================================
   MOBILE
   ========================================= */
@media (max-width: 768px) {

    body.received-body .main-content {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 0 !important;
    }

    .received-page {
        padding: 0 10px 130px;
        gap: 14px;
    }

    .received-top { flex-direction: column; gap: 12px; }
    .received-title-block h1 { font-size: 22px; }
    .received-title-block p { font-size: 12px; }
    .received-search { min-width: 0; width: 100%; padding: 11px 16px; }

    /* Sumário — 1 coluna */
    .received-summary {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .received-summary-card { padding: 12px 14px; }
    .received-summary-card > i { width: 38px; height: 38px; font-size: 16px; }
    .received-summary-value { font-size: 16px; }
    .received-summary-label { font-size: 11px; }

    .received-tabs { padding-bottom: 6px; gap: 6px; }
    .received-tab { font-size: 12.5px; padding: 8px 14px; }

    /* Tabela → cards */
    .received-table-wrapper {
        background: transparent;
        border: none;
        border-radius: 0;
        overflow: visible;
    }
    .received-table { table-layout: auto; }
    .received-table thead { display: none; }
    .received-table,
    .received-table tbody,
    .received-table tr,
    .received-table td {
        display: block;
        width: 100%;
    }
    .received-table tbody {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .received-row {
        background-color: var(--bg-card);
        border: 1px solid var(--border-color);
        border-radius: 16px;
        padding: 14px;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    .received-row:hover { background-color: var(--bg-card); }

    .received-table td {
        padding: 0;
        border-bottom: none;
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
    }

    /* Tipo no topo */
    .received-cell-tipo {
        display: flex;
        align-items: center;
        width: 100%;
    }

    /* Pagador */
    .received-payer-cell { gap: 10px; width: 100%; }
    .received-avatar { width: 44px; height: 44px; }
    .received-payer-name { font-size: 14.5px; font-weight: 700; }
    .received-payer-desc { font-size: 12px; }

    /* Células com label */
    .received-cell {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 8px 0;
        border-top: 1px dashed var(--border-color);
        font-size: 12.5px;
        color: var(--text-secondary);
    }
    .received-cell::before {
        content: attr(data-label);
        font-size: 11px;
        font-weight: 700;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.4px;
    }
    .received-cell.right {
        text-align: left;
        justify-content: space-between;
    }

    .received-amount { font-size: 14px; }
    .payment-status { font-size: 12px; padding: 5px 12px; }
}