/* Commissions Ledger Responsive Styles */

/* Import Poppins font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* Apply Poppins font to entire commissions ledger */
.posh-comm-history,
.posh-comm-history * {
    font-family: 'Poppins', sans-serif !important;
}

/* Ensure all elements inherit Poppins */
.posh-comm-history h1,
.posh-comm-history h2,
.posh-comm-history h3,
.posh-comm-history h4,
.posh-comm-history h5,
.posh-comm-history h6,
.posh-comm-history p,
.posh-comm-history div,
.posh-comm-history span,
.posh-comm-history a,
.posh-comm-history button,
.posh-comm-history input,
.posh-comm-history label,
.posh-comm-history table,
.posh-comm-history th,
.posh-comm-history td {
    font-family: 'Poppins', sans-serif !important;
}

/* Filter Section */
.posh-comm-filters {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin: 20px 0;
}

.posh-comm-filters h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

.posh-comm-filters form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: end;
}

.posh-comm-filters > div {
    display: flex;
    flex-direction: column;
}

.posh-comm-filters label {
    font-weight: 600;
    margin-bottom: 5px;
    color: #555;
}

.posh-comm-filters input[type="date"] {
    width: 150px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

.posh-comm-filters input[type="checkbox"] {
    margin-right: 8px;
}

.posh-comm-filters button {
    padding: 10px 20px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-weight: 600;
}

.posh-comm-filters button:hover {
    background: #005a87;
}

/* Transaction Types Checkboxes */
.posh-comm-filters .transaction-types {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Quick Filter Buttons */
.posh-comm-filters .quick-filters {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.posh-comm-filters .quick-filters button {
    padding: 5px 10px;
    font-size: 12px;
    background: #666;
}

.posh-comm-filters .quick-filters button:hover {
    background: #555;
}

/* Table Container */
.posh-comm-table-container {
    overflow-x: auto;
    margin: 20px 0;
}

/* Table Styles */
.posh-comm-history table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.posh-comm-history table th,
.posh-comm-history table td {
    padding: 12px 8px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.posh-comm-history table th {
    background: #f1f1f1;
    font-weight: 600;
    color: #333;
}

.posh-comm-history table tr:hover {
    background: #f9f9f9;
}

/* Sticky Header */
.posh-comm-sticky-header {
    position: sticky;
    top: 0;
    z-index: 10;
}

.posh-comm-sticky-header th {
    background: #f1f1f1;
    border-bottom: 2px solid #ddd;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Pagination Styles */
.posh-comm-pagination {
    margin: 20px 0;
    text-align: center;
}

.posh-comm-pagination a {
    padding: 8px 12px;
    margin: 0 2px;
    background: #f1f1f1;
    color: #333;
    text-decoration: none;
    border-radius: 3px;
    display: inline-block;
    transition: background-color 0.2s;
}

.posh-comm-pagination a:hover {
    background: #0073aa;
    color: white;
}

.posh-comm-pagination a[data-page] {
    cursor: pointer;
}

.posh-comm-pagination span {
    padding: 8px 12px;
    margin: 0 2px;
    color: #666;
}

/* Order Links */
.posh-order-link {
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
}

.posh-order-link:hover {
    color: #005a87;
    text-decoration: underline;
}

/* Modal Styles */
#posh-commissions-order-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: none;
}

#posh-commissions-order-modal > div {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 5px;
    max-width: 80%;
    max-height: 80%;
    overflow-y: auto;
    border: 2px solid #ddd;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

#posh-commissions-modal-close {
    background: #dc3232;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 3px;
    font-size: 16px;
    font-weight: bold;
}

#posh-commissions-modal-close:hover {
    background: #a00;
}

.posh-order-details h4 {
    margin-top: 0;
    color: #333;
}

.posh-order-details h5 {
    margin-bottom: 10px;
    color: #555;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.posh-order-details p {
    margin: 5px 0;
}

.posh-order-details table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.posh-order-details table th,
.posh-order-details table td {
    padding: 8px;
    border: 1px solid #ddd;
    text-align: left;
}

.posh-order-details table th {
    background: #f1f1f1;
    font-weight: 600;
}

.posh-order-details table tr:nth-child(even) {
    background: #f9f9f9;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .posh-comm-filters form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .posh-comm-filters > div {
        margin-bottom: 15px;
    }
    
    .posh-comm-filters input[type="date"] {
        width: 100%;
    }
    
    .posh-comm-filters .transaction-types {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .posh-comm-filters .quick-filters {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 5px;
    }
    
    /* Hide less important columns on mobile (ledger table only; do NOT target .posh-earnings-table) */
    .posh-comm-history table:not(.posh-earnings-table) th:nth-child(5), /* QV */
    .posh-comm-history table:not(.posh-earnings-table) td:nth-child(5),
    .posh-comm-history table:not(.posh-earnings-table) th:nth-child(6), /* CV */
    .posh-comm-history table:not(.posh-earnings-table) td:nth-child(6),
    .posh-comm-history table:not(.posh-earnings-table) th:nth-child(7), /* Rank */
    .posh-comm-history table:not(.posh-earnings-table) td:nth-child(7),
    .posh-comm-history table:not(.posh-earnings-table) th:nth-child(8), /* Rate */
    .posh-comm-history table:not(.posh-earnings-table) td:nth-child(8) {
        display: none;
    }
    
    /* Make remaining columns more prominent (ledger table only) */
    .posh-comm-history table:not(.posh-earnings-table) th,
    .posh-comm-history table:not(.posh-earnings-table) td {
        padding: 8px 4px;
        font-size: 14px;
    }
    
    .posh-comm-history table:not(.posh-earnings-table) th:nth-child(1), /* Date */
    .posh-comm-history table:not(.posh-earnings-table) td:nth-child(1) {
        min-width: 80px;
    }
    
    .posh-comm-history table:not(.posh-earnings-table) th:nth-child(2), /* Type */
    .posh-comm-history table:not(.posh-earnings-table) td:nth-child(2) {
        min-width: 100px;
    }
    
    .posh-comm-history table:not(.posh-earnings-table) th:nth-child(3), /* Description */
    .posh-comm-history table:not(.posh-earnings-table) td:nth-child(3) {
        min-width: 120px;
    }
    
    /* Pagination adjustments for mobile */
    .posh-comm-pagination a {
        padding: 6px 8px;
        font-size: 14px;
    }
    
    /* Modal adjustments for mobile */
    #posh-commissions-order-modal > div {
        max-width: 95%;
        max-height: 90%;
        padding: 15px;
    }
    
    .posh-order-details {
        font-size: 14px;
    }
    
    .posh-order-details table th,
    .posh-order-details table td {
        padding: 6px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    /* Ledger table only; do NOT hide columns on .posh-earnings-table */
    .posh-comm-history table:not(.posh-earnings-table) th:nth-child(4), /* Order # */
    .posh-comm-history table:not(.posh-earnings-table) td:nth-child(4) {
        display: none;
    }
    
    .posh-comm-history table:not(.posh-earnings-table) th,
    .posh-comm-history table:not(.posh-earnings-table) td {
        padding: 6px 2px;
        font-size: 12px;
    }
    
    .posh-comm-filters {
        padding: 10px;
    }
    
    .posh-comm-filters h4 {
        font-size: 16px;
    }
    
    /* Pagination for very small screens */
    .posh-comm-pagination a {
        padding: 4px 6px;
        font-size: 12px;
    }
    
    /* Modal for very small screens */
    #posh-commissions-order-modal > div {
        padding: 10px;
    }
    
    .posh-order-details table th,
    .posh-order-details table td {
        padding: 4px;
        font-size: 11px;
    }
}

.sort-link {
    cursor: pointer;
    transition: color 0.2s;
}

.sort-link:hover {
    color: #0073aa !important;
}

/* ========== Advocate Commission Pay Stub (Earnings & Payout Record) ========== */
/* Official Posh Color Palette (Pantone) */
.posh-paystub {
    --posh-pink: #E0457B;      /* Posh Pink 205C */
    --posh-orange: #EAA26D;    /* Posh Orange 472 */
    --posh-yellow: #D2C4A1;    /* Posh Yellow 4248 */
    --posh-green: #0ABAB5;     /* Posh Green 2398 */
    --posh-blue: #375275;      /* Posh Blue 7699 */
    --posh-pink-tint: #fef5f8;
    --posh-pink-border: #fce4ec;
    --posh-border: #e8dce1;
    --posh-text: #375275;      /* Posh Blue for text */
    --posh-text-muted: #5c6b82;
    max-width: 960px;
    margin: 0 auto;
}

.posh-paystub-header {
    margin-bottom: 1.25rem;
}

.posh-paystub-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.35rem 0;
    color: var(--posh-blue);
}

.posh-paystub-subtitle {
    font-size: 0.9375rem;
    color: var(--posh-text-muted);
    margin: 0 0 1rem 0;
    line-height: 1.45;
}

.posh-paystub-cta-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.posh-paystub-cta {
    display: inline-block;
    padding: 0.6rem 1.1rem;
    background: var(--posh-pink);
    color: #fff !important;
    text-decoration: none;
    border-radius: 999px;
    font-size: 0.9375rem;
    font-weight: 600;
}

.posh-paystub-cta:hover {
    background: #c93d6b;
    color: #fff !important;
}

.posh-paystub-cta-secondary {
    display: inline-block;
    padding: 0.6rem 1rem;
    background: var(--posh-yellow);
    color: var(--posh-blue) !important;
    text-decoration: none;
    border-radius: 999px;
    font-size: 0.875rem;
}

.posh-paystub-tax {
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    background: var(--posh-pink-tint);
    border: 1px solid var(--posh-border);
    border-radius: 6px;
    font-size: 0.875rem;
}

.posh-paystub-tax summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--posh-blue);
}

.posh-paystub-tax p {
    margin: 0.5rem 0 0 0;
    color: var(--posh-text-muted);
    line-height: 1.45;
}

.posh-paystub-why {
    margin: 1.25rem 0;
}

.posh-paystub-why-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    color: var(--posh-blue);
}

.posh-paystub-why-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.posh-paystub-why-card {
    padding: 0.9rem 1rem;
    background: var(--posh-pink-tint);
    border: 1px solid var(--posh-border);
    border-radius: 8px;
    font-size: 0.875rem;
}

.posh-paystub-why-card strong {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--posh-blue);
}

.posh-paystub-why-card p {
    margin: 0;
    color: var(--posh-text-muted);
    line-height: 1.45;
}

.posh-paystub-weeks-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 1.5rem 0 0.35rem 0;
    color: var(--posh-blue);
}

.posh-paystub-weeks-intro {
    font-size: 0.8125rem;
    color: var(--posh-text-muted);
    margin: 0 0 1rem 0;
    line-height: 1.4;
}

/* ========== Earnings table (single header row, Posh-colored columns) ========== */
/* Scoped under .posh-paystub so these override .posh-comm-history table th/td (gray) */
/* Stacked cards below 749px so "Paid to Posh Wallet" stays visible; table at 749px+ */
.posh-paystub .posh-earnings-table-wrap {
    margin: 0 0 1.5rem 0;
    border-radius: 10px;
    border: 1px solid var(--posh-border);
    box-shadow: 0 2px 8px rgba(55, 82, 117, 0.08);
}

/* Narrow screen: stacked cards, no horizontal scroll, fits narrowest width */
@media (max-width: 748px) {
    .posh-paystub .posh-earnings-table-wrap {
        overflow: visible;
        max-height: none;
    }
    .posh-paystub .posh-earnings-table,
    .posh-paystub .posh-earnings-table thead,
    .posh-paystub .posh-earnings-table tbody,
    .posh-paystub .posh-earnings-table tr,
    .posh-paystub .posh-earnings-table th,
    .posh-paystub .posh-earnings-table td {
        display: block;
        width: 100%;
        min-width: 0;
    }
    .posh-paystub .posh-earnings-table thead {
        display: none;
    }
    .posh-paystub .posh-earnings-table tbody tr {
        border-bottom: 1px solid var(--posh-border);
        padding: 0.5rem 0.6rem;
        margin: 0;
    }
    .posh-paystub .posh-earnings-table tbody tr:last-child {
        border-bottom: none;
    }
    .posh-paystub .posh-earnings-table td {
        padding: 0.25rem 0;
        border: none;
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 0.5rem;
    }
    .posh-paystub .posh-earnings-table td::before {
        content: attr(data-label);
        font-size: 0.7rem;
        font-weight: 600;
        color: var(--posh-text-muted);
        flex-shrink: 0;
    }
    .posh-paystub .posh-earnings-cell-week {
        flex-wrap: wrap;
        border-bottom: 1px solid var(--posh-border);
        padding-bottom: 0.35rem;
        margin-bottom: 0.2rem;
    }
    .posh-paystub .posh-earnings-cell-week::before {
        content: none;
    }
    .posh-paystub .posh-earnings-week-date {
        font-weight: 600;
        color: var(--posh-blue);
    }
    .posh-paystub .posh-earnings-cell--personal,
    .posh-paystub .posh-earnings-cell--mentor,
    .posh-paystub .posh-earnings-cell--pool,
    .posh-paystub .posh-earnings-cell--wallet {
        background: transparent;
        color: inherit;
    }
    .posh-paystub .posh-earnings-cell--personal::before { color: var(--posh-green); }
    .posh-paystub .posh-earnings-cell--mentor::before { color: var(--posh-blue); }
    .posh-paystub .posh-earnings-cell--pool::before { color: var(--posh-orange); }
    .posh-paystub .posh-earnings-cell--wallet::before { color: var(--posh-green); font-weight: 700; }
    .posh-paystub .posh-earnings-cell--wallet {
        font-weight: 700;
        border-top: 1px solid var(--posh-border);
        padding-top: 0.35rem;
        margin-top: 0.2rem;
    }
    .posh-paystub .posh-earnings-row--current {
        background: var(--posh-pink-tint);
        border-left: 4px solid var(--posh-pink);
        margin-left: -1px;
        padding-left: 0.6rem;
    }
}

@media (min-width: 749px) {
    .posh-paystub .posh-earnings-table-wrap {
        overflow-x: auto;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        max-height: min(70vh, 600px);
    }
    .posh-paystub .posh-earnings-table { display: table; }
    .posh-paystub .posh-earnings-table thead { display: table-header-group; }
    .posh-paystub .posh-earnings-table tbody { display: table-row-group; }
    .posh-paystub .posh-earnings-table tr { display: table-row; }
    .posh-paystub .posh-earnings-table th,
    .posh-paystub .posh-earnings-table td { display: table-cell; width: auto; }
    .posh-paystub .posh-earnings-table td::before { content: none; }
    .posh-paystub .posh-earnings-table td {
        padding: 0.4rem 0.55rem;
        display: table-cell;
        flex: none;
        justify-content: unset;
    }
    .posh-paystub .posh-earnings-cell-week { border: none; padding: 0.4rem 0.55rem; margin: 0; }
    .posh-paystub .posh-earnings-cell--personal { background: var(--posh-green); color: #fff; }
    .posh-paystub .posh-earnings-cell--mentor { background: var(--posh-blue); color: #fff; }
    .posh-paystub .posh-earnings-cell--pool { background: var(--posh-orange); color: #fff; }
    .posh-paystub .posh-earnings-cell--wallet {
        background: rgba(10, 186, 181, 0.15);
        color: var(--posh-green);
        border-top: none;
        padding-top: 0.4rem;
        margin-top: 0;
    }
    .posh-paystub .posh-earnings-row--current { margin-left: 0; padding-left: 0; }
}

.posh-paystub .posh-earnings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
    background: #fff;
}

.posh-paystub .posh-earnings-table thead {
    background: linear-gradient(180deg, var(--posh-blue) 0%, #2d4160 100%);
    color: #fff;
}

.posh-paystub .posh-earnings-table th {
    font-weight: 600;
    text-align: left;
    padding: 0.4rem 0.5rem;
    white-space: nowrap;
    background: transparent;
    color: inherit;
    border-bottom: none;
    position: sticky;
    top: 0;
    z-index: 2;
    box-shadow: 0 1px 0 var(--posh-border);
}

.posh-paystub .posh-earnings-table th.posh-earnings-th-week {
    border-radius: 9px 0 0 0;
    min-width: 5.5rem;
    color: #fff;
    background: linear-gradient(180deg, var(--posh-blue) 0%, #2d4160 100%);
}

.posh-paystub .posh-earnings-table th.posh-earnings-th-personal {
    background: var(--posh-green);
    color: #fff;
    text-align: right;
    min-width: 4rem;
}

.posh-paystub .posh-earnings-table th.posh-earnings-th-mentor {
    background: var(--posh-blue);
    color: #fff;
    text-align: right;
    min-width: 4rem;
}

.posh-paystub .posh-earnings-table th.posh-earnings-th-pool {
    background: var(--posh-orange);
    color: #fff;
    text-align: right;
    min-width: 4rem;
}

.posh-paystub .posh-earnings-table th.posh-earnings-th-wallet {
    color: #fff;
    text-align: right;
    min-width: 5.5rem;
    border-radius: 0 9px 0 0;
    background: linear-gradient(180deg, var(--posh-blue) 0%, #2d4160 100%);
}

.posh-paystub .posh-earnings-table tbody tr {
    border-bottom: 1px solid var(--posh-border);
    transition: background-color 0.15s ease;
}

.posh-paystub .posh-earnings-table tbody tr:last-child {
    border-bottom: none;
}

.posh-paystub .posh-earnings-table tbody tr:hover {
    background: var(--posh-pink-tint);
}

.posh-paystub .posh-earnings-table tbody tr.posh-earnings-row--current {
    background: var(--posh-pink-tint);
    border-left: 4px solid var(--posh-pink);
}

.posh-paystub .posh-earnings-table td {
    padding: 0.35rem 0.5rem;
    vertical-align: top;
    border-bottom: none;
}

.posh-paystub .posh-earnings-cell-week {
    min-width: 5.5rem;
}

.posh-paystub .posh-earnings-week-date {
    font-weight: 600;
    color: var(--posh-blue);
    display: block;
}

.posh-paystub .posh-earnings-badge {
    display: inline-block;
    margin-top: 0.15rem;
    padding: 0.12rem 0.3rem;
    background: var(--posh-pink);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    border-radius: 3px;
}

.posh-paystub .posh-earnings-meta {
    display: block;
    font-size: 0.65rem;
    color: var(--posh-text-muted);
    margin-top: 0.15rem;
}

.posh-paystub .posh-earnings-meta--wallet {
    margin-top: 0.2rem;
    color: inherit;
    opacity: 0.9;
    font-size: 0.6rem;
}

.posh-paystub .posh-earnings-cell {
    font-variant-numeric: tabular-nums;
    text-align: right;
    font-weight: 600;
}

.posh-paystub .posh-earnings-cell--personal {
    background: var(--posh-green);
    color: #fff;
}

.posh-paystub .posh-earnings-cell--mentor {
    background: var(--posh-blue);
    color: #fff;
}

.posh-paystub .posh-earnings-cell--pool {
    background: var(--posh-orange);
    color: #fff;
}

.posh-paystub .posh-earnings-cell--wallet {
    background: rgba(10, 186, 181, 0.15);
    color: var(--posh-green);
    font-weight: 700;
}

/* Table layout (749px+): padding and min-widths */
@media (min-width: 749px) {
    .posh-paystub .posh-earnings-table {
        font-size: 0.8125rem;
    }
    .posh-paystub .posh-earnings-table th,
    .posh-paystub .posh-earnings-table td {
        padding: 0.4rem 0.55rem;
    }
    .posh-paystub .posh-earnings-cell-week,
    .posh-paystub .posh-earnings-table th.posh-earnings-th-week {
        min-width: 6rem;
    }
    .posh-paystub .posh-earnings-table th.posh-earnings-th-wallet {
        min-width: 6rem;
    }
}

@media (min-width: 900px) {
    .posh-paystub .posh-earnings-table {
        font-size: 0.875rem;
    }
    .posh-paystub .posh-earnings-table th,
    .posh-paystub .posh-earnings-table td {
        padding: 0.5rem 0.75rem;
    }
    .posh-paystub .posh-earnings-cell-week,
    .posh-paystub .posh-earnings-table th.posh-earnings-th-week {
        min-width: 8rem;
    }
    .posh-paystub .posh-earnings-table th.posh-earnings-th-personal,
    .posh-paystub .posh-earnings-table th.posh-earnings-th-mentor,
    .posh-paystub .posh-earnings-table th.posh-earnings-th-pool {
        min-width: 5rem;
    }
    .posh-paystub .posh-earnings-table th.posh-earnings-th-wallet {
        min-width: 6.5rem;
    }
}

.posh-paystub-weeks {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Compact list: no card look — thin divider between weeks, minimal padding */
.posh-week-card {
    background: #fff;
    border: none;
    border-bottom: 1px solid var(--posh-border);
    border-radius: 0;
    box-shadow: none;
    padding: 0;
}

.posh-week-card:first-child {
    border-top: 1px solid var(--posh-border);
}

.posh-week-card--current {
    border-left: 3px solid var(--posh-pink);
    background: var(--posh-pink-tint);
    box-shadow: none;
}

.posh-week-card-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.5rem;
    background: transparent;
    border: none;
    font-size: 0.8125rem;
}

.posh-week-card--current .posh-week-card-header {
    background: transparent;
    border: none;
}

.posh-week-card-date {
    font-weight: 600;
    color: var(--posh-blue);
}

.posh-week-card-badge {
    display: inline-block;
    padding: 0.15rem 0.35rem;
    background: var(--posh-pink);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    border-radius: 3px;
}

.posh-week-card-live,
.posh-week-card-payout {
    font-size: 0.7rem;
    color: var(--posh-text-muted);
    margin-left: auto;
}

.posh-week-card-body {
    padding: 0.25rem 0.5rem 0.4rem;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Split: left column = money in, right column = Paid to Posh Wallet */
.posh-week-card-body--split {
    display: grid;
    grid-template-columns: 1fr minmax(8rem, 10rem);
    gap: 0 0.75rem;
    padding: 0.25rem 0.5rem 0.35rem;
    align-items: start;
}

.posh-week-card-col {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
}

/* Left column: money in — one line per row: label left, amount right */
.posh-week-card-col--in {
    max-width: 100%;
}

.posh-week-card-col--in .posh-week-card-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.35rem 0.5rem;
    padding: 0.15rem 0.35rem;
    min-height: 0;
}

.posh-week-card-col--in .posh-week-card-label {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.75rem;
    font-weight: 600;
}

.posh-week-card-col--in .posh-week-card-amount {
    flex: 0 0 auto;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

/* Posh Green background, white font — Personal commissions */
.posh-week-card-row--personal {
    background: var(--posh-green);
    color: #fff;
}

.posh-week-card-row--personal .posh-week-card-label,
.posh-week-card-row--personal .posh-week-card-amount {
    color: #fff;
}

/* Posh Blue background, white font — Mentor bonus */
.posh-week-card-row--mentor {
    background: var(--posh-blue);
    color: #fff;
}

.posh-week-card-row--mentor .posh-week-card-label,
.posh-week-card-row--mentor .posh-week-card-amount {
    color: #fff;
}

/* Right column: Paid to Posh Wallet — one line */
.posh-week-card-col--wallet {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0.15rem 0.35rem;
    min-height: 0;
}

.posh-week-card-col--wallet .posh-week-card-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.35rem 0.5rem;
    padding: 0.15rem 0;
    min-height: 0;
}

.posh-week-card-row--wallet .posh-week-card-label {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--posh-blue);
}

.posh-week-card-row--wallet .posh-week-card-amount {
    flex: 0 0 auto;
    font-weight: 700;
    font-size: 0.9375rem;
    font-variant-numeric: tabular-nums;
    color: var(--posh-green);
    text-align: right;
}

/* Keep two columns on all but the smallest screens; only stack when necessary */
@media (max-width: 380px) {
    .posh-week-card-body--split {
        grid-template-columns: 1fr;
    }
}

.posh-week-card-body--two-col .posh-week-card-row {
    display: grid !important;
    grid-template-columns: 1fr minmax(5.5rem, 6.5rem);
    align-items: baseline;
    gap: 0.75rem 1rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--posh-border);
}

.posh-week-card-body--two-col .posh-week-card-row:last-child {
    border-bottom: none;
}

.posh-week-card-body--two-col .posh-week-card-label {
    grid-column: 1;
}

.posh-week-card-body--two-col .posh-week-card-amount {
    grid-column: 2;
    justify-self: end;
    min-width: 0;
}

.posh-week-card-row--stagger .posh-week-card-label {
    font-size: 0.875rem;
    color: var(--posh-blue);
}

.posh-week-card-row--stagger .posh-week-card-amount {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--posh-green);
    text-align: right;
}

.posh-week-card-row--total {
    margin-top: 0.25rem;
    padding-top: 0.5rem !important;
    border-top: 2px solid var(--posh-border) !important;
}

.posh-week-card-row--total .posh-week-card-label {
    font-weight: 600;
    color: var(--posh-blue);
}

.posh-week-card-amount--total {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--posh-green) !important;
}

.posh-week-card-body:not(.posh-week-card-body--two-col) .posh-week-card-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem;
}

.posh-week-card-label {
    font-size: 0.8125rem;
    color: var(--posh-blue);
    min-width: 8rem;
}

.posh-week-card-amount {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--posh-green);
}

.posh-week-card-value {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.posh-week-card-value--earned {
    color: var(--posh-green);
}

.posh-week-card-value--paid {
    color: var(--posh-green);
}

.posh-week-card-value--pending {
    color: var(--posh-text-muted);
    font-weight: 600;
}

.posh-week-card-breakdown {
    font-size: 0.75rem;
    color: var(--posh-text-muted);
    width: 100%;
    margin-left: 8rem;
}

@media (min-width: 480px) {
    .posh-week-card-breakdown {
        margin-left: 0;
        width: auto;
    }
}

.posh-paystub-no-weeks {
    font-size: 0.9375rem;
    color: var(--posh-text-muted);
    padding: 1rem;
    text-align: center;
    background: var(--posh-pink-tint);
    border-radius: 8px;
    border: 1px solid var(--posh-border);
}

/* FAQ at bottom — accordions */
.posh-paystub-faq {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--posh-border);
}

.posh-paystub-faq-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--posh-blue);
    margin: 0 0 1rem 0;
}

.posh-paystub-faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.posh-paystub-faq-item {
    background: var(--posh-pink-tint);
    border: 1px solid var(--posh-border);
    border-radius: 8px;
    overflow: hidden;
}

.posh-paystub-faq-question {
    padding: 0.65rem 1rem;
    font-weight: 600;
    color: var(--posh-blue);
    cursor: pointer;
    list-style: none;
}

.posh-paystub-faq-question::-webkit-details-marker {
    display: none;
}

.posh-paystub-faq-question::before {
    content: '+ ';
    font-weight: 700;
    margin-right: 0.25rem;
}

.posh-paystub-faq-item[open] .posh-paystub-faq-question::before {
    content: '− ';
}

.posh-paystub-faq-answer {
    padding: 0 1rem 0.75rem 1rem;
}

.posh-paystub-faq-answer p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--posh-text-muted);
    line-height: 1.5;
}