#file-upload-wrapper-payments.payment-file-upload-section { 
    margin-top: 14px; 
}

.payment-file-upload-section h3 {
    margin-bottom: 12px;
    font-size: 1.05em;
    color: #22333b;
}

.payment-file-dropzone {
    margin-top: 8px;
    border: 3px dashed rgba(30,111,179,0.20);
    border-radius: 12px;
    padding: 46px 32px;
    text-align: center;
    background: linear-gradient(180deg, #f7fbff 0%, #eef6ff 100%);
    box-shadow: 0 14px 30px rgba(20,60,90,0.06);
    transition: all 0.18s ease-in-out, box-shadow 0.18s ease-in-out;
    cursor: pointer;
    color: #0b3a57;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.payment-file-dropzone.dragover {
    border-color: #2d6fbf;
    background: linear-gradient(180deg, #eaf4ff 0%, #dbeefc 100%);
    box-shadow: 0 18px 36px rgba(45,72,84,0.12);
    transform: translateY(-2px);
}

/* Big icon at the top of the dropzone (emoji fallback) */
.payment-file-dropzone::before {
    content: "📁";
    position: absolute;
    left: 50%;
    top: 10px;
    transform: translateX(-50%);
    font-size: 38px;
    line-height: 1;
    opacity: 0.98;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.08));
}

.payment-dropzone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px; /* larger spacing between instruction lines and button */
}

.payment-dropzone-content p { 
    margin: 0; 
    color: #0b3a57; 
    font-weight: 600;
    font-size: 1.0em;
    line-height: 1.25;
}

.payment-btn-browse {
    display: inline-block;
    background: linear-gradient(180deg,#1e6fb3,#16619b);
    color: white;
    padding: 10px 22px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(30,111,179,0.18);
    margin: 4px 0; /* space above/below button */
    border: 1px solid rgba(255,255,255,0.06);
}
.payment-btn-browse::before {
    content: "📂";
    margin-right: 8px;
    font-size: 1.05em;
}

.payment-btn-browse:focus,
.payment-btn-browse:active {
    outline: none;
    box-shadow: 0 10px 22px rgba(30,111,179,0.26);
    transform: translateY(-1px);
}

.payment-btn-browse:hover { 
    background: linear-gradient(180deg,#2670b8,#1e5f96); 
}

.payment-selected-files {
    margin-top: 18px;
    color: #0b3a57;
    font-size: 0.95em;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 1.6em;
    padding: 10px 14px;
    background: #ffffff;
    border: 1px solid #e1efff;
    border-radius: 10px;
    box-shadow: 0 6px 12px rgba(14,52,80,0.04);
    flex-wrap: wrap;
    overflow: auto;
    max-height: 160px; /* limit when many files are added */
}

/* filename chips: allow wrapping and subtle chips look */
.payment-selected-files .payment-selected-count {
    background: #e9f4ff;
    border: 1px solid #cfe8ff;
    padding: 6px 10px;
    border-radius: 18px;
    margin-right: 8px;
    margin-bottom: 6px;
    font-weight: 700;
    color: #145a86;
}

.payment-selected-files span {
    background: #f3f9ff;
    border: 1px solid #d3eaff;
    padding: 6px 12px;
    border-radius: 18px;
    margin-right: 8px;
    margin-bottom: 6px;
    display: inline-block;
    max-width: 320px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: transform 220ms cubic-bezier(.2,.9,.2,1), opacity 220ms ease;
}

.payment-selected-files span.newly-added {
    transform: translateY(-6px) scale(1.02);
    opacity: 0.98;
    box-shadow: 0 8px 16px rgba(20,60,90,0.06);
}

.payment-selected-files::-webkit-scrollbar {
    height: 8px;
}
.payment-selected-files::-webkit-scrollbar-thumb {
    background: rgba(20,60,90,0.12);
    border-radius: 6px;
}

.payment-upload-instructions {
    margin: 0;
    color: #114a64;
    font-weight: 500;
    max-width: 920px;
    text-align: center;
    font-size: 0.95em;
}

.payment-attached-files-list li.newly-added {
    background: linear-gradient(180deg, #f0fbf7 0%, #ecf9f3 100%);
    border-color: #bfe7c9;
}

.payment-attached-files { 
    margin-top: 16px; 
    padding-top: 16px; 
    border-top: 1px solid #e0e0e0; 
}

.payment-attached-files h4 { 
    margin: 0 0 12px; 
    font-size: 1em; 
    font-weight: 600; 
    color: #333; 
}

.payment-attached-files-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.payment-attached-files-list li {
    padding: 12px 14px;
    margin-bottom: 8px;
    background: #ffffff;
    border: 1px solid #e6eef6;
    border-radius: 6px;
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 12px;
    align-items: center;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.payment-attached-files-list li:hover { 
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(14,52,80,0.04);
}

.payment-attached-files-list li.newly-added { 
    background: linear-gradient(180deg, #f0fbf7 0%, #ecf9f3 100%);
    border-color: #bfe7c9; 
}

.payment-attached-files-list a { 
    text-decoration: none; 
    color: #1e6fb3; 
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.payment-attached-files-list a:hover { 
    text-decoration: underline; 
}

.payment-file-meta { 
    color: #666; 
    font-size: 0.875em; 
    white-space: nowrap; 
    text-align: right;
}

.payment-file-new-badge { 
    color: #2e7d32; 
    font-size: 0.85em; 
    font-weight: 700; 
    background: rgba(46,125,50,0.08);
    padding: 6px 8px;
    border-radius: 12px;
    border: 1px solid rgba(46,125,50,0.12);
}

/* Make the attached files list responsive on small screens */
@media (max-width: 640px) {
    .payment-file-dropzone {
        padding: 30px 16px;
    }
    .payment-attached-files-list li {
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        gap: 8px 12px;
    }
    .payment-attached-files-list li .payment-file-meta {
        grid-column: 2 / 3;
        grid-row: 1 / 2;
    }
    .payment-attached-files-list a {
        grid-column: 1 / 2;
        grid-row: 1 / 2;
    }
}

/* Payment Summary Header Styles */
.payment-summary-header {
    background-color: #dfe8ec;
    padding: 15px;
    margin: 0 0 20px 0;
    border-radius: 4px;
    border: 1px solid #c5d4da;
}

.payment-summary-header h3 {
    color: #2d4854;
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
}

.payment-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
}

.payment-summary-item {
    background: white;
    border-radius: 4px;
    padding: 15px;
    border: 1px solid #c5d4da;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: relative;
    display: flex;
    flex-direction: column;
}

.payment-summary-item strong {
    display: block;
    font-size: 0.85em;
    color: #5a7582;
    font-weight: 500;
    margin-bottom: 8px;
}

.payment-summary-value {
    font-size: 1.6em;
    color: #2d4854;
    font-weight: 600;
    margin-bottom: 0;
}

.payment-summary-value.bold {
    font-weight: 700;
    color: #2e7d32;
}

.payment-summary-value.negative {
    color: #c62828;
    font-weight: 700;
}

.payment-summary-item .summary-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    opacity: 0.8;
}

.payment-summary-item:nth-child(1) .summary-icon {
    background-color: #4caf50; /* Green - Total HE Credits */
}

.payment-summary-item:nth-child(2) .summary-icon {
    background-color: #2196f3; /* Blue - Total Purchases */
}

.payment-summary-item:nth-child(3) .summary-icon {
    background-color: #ff9800; /* Orange - Total GST */
}

.payment-summary-item:nth-child(4) .summary-icon {
    background-color: #9c27b0; /* Purple - Total Reimbursement Owed */
}

.payment-summary-item:nth-child(5) .summary-icon {
    background-color: #00bcd4; /* Cyan - Total Amount Paid to Family */
}

.payment-summary-item:nth-child(6) .summary-icon {
    background-color: #607d8b; /* Blue Grey - Remaining HE Credits */
}

/* Payment Search Header Layout Fixes */
.Payment-search-model .search-header {
    padding-left: 0;
    margin-left: 0;
}

.Payment-search-model .search-header.inlineChildrenBlock > li {
    display: block;
    width: 100%;
    padding-left: 0 !important;
    margin-left: 0;
    margin-bottom: 10px;
    list-style: none;
}

.Payment-search-model .search-header.inlineChildrenBlock > li:last-child {
    margin-bottom: 0;
}

/* Bulk Action Buttons */
.Payment-search-model .payment-bulk-actions {
    margin-top: 10px;
}

.Payment-search-model .payment-bulk-actions-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.Payment-search-model .payment-bulk-actions-inner.hidden {
    display: none;
}

.Payment-search-model .payment-bulk-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 6px;
    font-weight: 600;
    color: #ffffff !important;
    text-decoration: none !important;
    border: 1px solid transparent;
    box-shadow: 0 4px 10px rgba(45, 72, 84, 0.12);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    min-width: 180px;
    text-align: center;
}

.Payment-search-model .payment-bulk-button:focus-visible {
    outline: 2px solid #2d4854;
    outline-offset: 2px;
}

.Payment-search-model .payment-bulk-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(45, 72, 84, 0.18);
}

.Payment-search-model .payment-bulk-button:active {
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(45, 72, 84, 0.18);
}

.Payment-search-model .payment-bulk-button.payment-bulk-button-approve {
    background: linear-gradient(135deg, #2e7d32, #43a047);
    border-color: #2e7d32;
}

.Payment-search-model .payment-bulk-button.payment-bulk-button-approve:hover {
    background: linear-gradient(135deg, #2b742f, #3d9644);
}

.Payment-search-model .payment-bulk-button.payment-bulk-button-reject {
    background: linear-gradient(135deg, #c62828, #e53935);
    border-color: #c62828;
}

.Payment-search-model .payment-bulk-button.payment-bulk-button-reject:hover {
    background: linear-gradient(135deg, #b92424, #d93432);
}

.Payment-search-model .payment-bulk-button.payment-bulk-button-paid {
    background: linear-gradient(135deg, #31b0d5, #5bc0de);
    border-color: #31b0d5;
}

.Payment-search-model .payment-bulk-button.payment-bulk-button-paid:hover {
    background: linear-gradient(135deg, #269abc, #46b8da);
}

/* Payment Action Buttons */
.payment-approve-button {
    background-color: #5cb85c !important;
    border-color: #4cae4c !important;
    color: white !important;
    margin: 3px;
}

.payment-approve-button:hover {
    background-color: #449d44 !important;
    border-color: #398439 !important;
    color: white !important;
}

.payment-reject-button {
    background-color: #d9534f !important;
    border-color: #d43f3a !important;
    color: white !important;
    margin: 3px;
}

.payment-reject-button:hover {
    background-color: #c9302c !important;
    border-color: #ac2925 !important;
    color: white !important;
}

.payment-paid-button {
    background-color: #5bc0de !important;
    border-color: #46b8da !important;
    color: white !important;
    margin: 3px;
}

.payment-paid-button:hover {
    background-color: #31b0d5 !important;
    border-color: #269abc !important;
    color: white !important;
}

/* Payment Status Badge Styles */
.payment-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9em;
    text-align: center;
    min-width: 80px;
}

.payment-status-approved {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.payment-status-rejected {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.payment-status-paid {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.payment-status-requested {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Parent Information Card Styles */
.payment-parent-info {
    background: #dfe8ec;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 10px;
    border: 1px solid #c5d4da;
}

.payment-parent-info h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2d4854;
    font-size: 16px;
    font-weight: 600;
}

.payment-parent-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    align-items: stretch;
}

.payment-parent-info-item {
    background: white;
    padding: 15px;
    padding-right: 50px;
    border-radius: 4px;
    border: 1px solid #c5d4da;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    color: #2d4854;
    position: relative;
    min-height: 100px;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 8px;
}

.payment-parent-info-item strong {
    font-size: 0.85em;
    font-weight: 500;
    color: #5a7582;
    line-height: 1.2;
}

.payment-parent-info-value {
    font-size: 1em;
    font-weight: 600;
    color: #2d4854;
    line-height: 1.4;
    word-break: break-word;
    align-self: start;
}

.parent-info-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    opacity: 0.15;
}

.parent-info-icon svg {
    width: 32px;
    height: 32px;
    fill: #5a7582;
}

/* Status pill buttons for Payment search header */
.payment-status-buttons { margin: 6px 0 0 0; }
.payment-status-buttons .status-pill {
    display: inline-block;
    margin-right: 8px;
    padding: 8px 14px;
    border-radius: 18px;
    border: 1px solid #c4c9cc;
    background: #f5f7f8;
    color: #2b2b2b;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.95rem;
}
.payment-status-buttons .status-pill {
    display: inline-block;
    margin-right: 8px;
    padding: 8px 14px;
    border-radius: 18px;
    border: 1px solid #c4c9cc;
    background: #f5f7f8;
    color: #2b2b2b;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 120ms ease-in-out;
}
.payment-status-buttons .status-pill.active {
    background: #f1c40f; /* highlight color similar to my-theme-2 */
    border-color: #b8930a;
    color: #111;
    box-shadow: 0 6px 18px rgba(0,0,0,0.15), 0 1px 0 rgba(255,255,255,0.15) inset;
    font-weight: 700;
    transform: translateY(-2px) scale(1.03);
    padding: 10px 16px;
}
.payment-empty-state { margin-top: 12px; }

/* Per-status colors */
.payment-status-buttons .status-pill.requested { background: #fff8e6; border-color:#f1d58b; color:#6b4f00; }
.payment-status-buttons .status-pill.requested:hover { background:#fff3cd; }

.payment-status-buttons .status-pill.approved { background: linear-gradient(135deg,#2e7d32,#43a047); color: #fff; border-color:#2e7d32; }
.payment-status-buttons .status-pill.approved:hover { filter:brightness(0.95); }

.payment-status-buttons .status-pill.rejected { background: linear-gradient(135deg,#c62828,#e53935); color:#fff; border-color:#c62828; }
.payment-status-buttons .status-pill.rejected:hover { filter:brightness(0.95); }

.payment-status-buttons .status-pill.paid { background: linear-gradient(135deg,#31b0d5,#5bc0de); color:#fff; border-color:#31b0d5; }
.payment-status-buttons .status-pill.paid:hover { filter:brightness(0.95); }

.payment-status-buttons .status-pill.all { background: #f5f7f8; }
.payment-status-buttons .status-pill.all:hover { background: #eef2f3; }

/* Per-status active overrides so the active state is visible while keeping the status color */
.payment-status-buttons .status-pill.approved.active {
    box-shadow: 0 12px 30px rgba(46,125,50,0.28), 0 2px 0 rgba(255,255,255,0.08) inset;
    transform: translateY(-3px) scale(1.06);
    padding: 10px 18px;
    font-weight: 800;
    border: 2px solid rgba(37,105,42,0.95);
    color: #fff;
}
.payment-status-buttons .status-pill.rejected.active {
    box-shadow: 0 12px 30px rgba(198,40,40,0.28), 0 2px 0 rgba(255,255,255,0.08) inset;
    transform: translateY(-3px) scale(1.06);
    padding: 10px 18px;
    font-weight: 800;
    border: 2px solid rgba(162,27,27,0.95);
    color: #fff;
}
.payment-status-buttons .status-pill.paid.active {
    box-shadow: 0 12px 30px rgba(49,176,213,0.28), 0 2px 0 rgba(255,255,255,0.08) inset;
    transform: translateY(-3px) scale(1.06);
    padding: 10px 18px;
    font-weight: 800;
    border: 2px solid rgba(31,165,201,0.95);
    color: #fff;
}
.payment-status-buttons .status-pill.requested.active {
    box-shadow: 0 12px 30px rgba(241,213,139,0.28), 0 2px 0 rgba(255,255,255,0.08) inset;
    transform: translateY(-3px) scale(1.05);
    padding: 10px 18px;
    font-weight: 800;
    border: 2px solid rgba(209,168,74,0.95);
    color: #222;
}
.payment-status-buttons .status-pill.all.active {
    box-shadow: 0 12px 30px rgba(0,0,0,0.18), 0 2px 0 rgba(255,255,255,0.08) inset;
    transform: translateY(-3px) scale(1.05);
    padding: 10px 18px;
    font-weight: 800;
    border: 2px solid rgba(159,166,169,0.95);
    color: #111;
}

.payment-parent-info-row {
    width: 100%;
    list-style: none;
    margin-bottom: 10px;
}

.payment-summary-row {
    width: 100%;
    list-style: none;
}

.payment-status-row {
    width: 100%;
    list-style: none;
    margin-bottom: 10px;
}

.payment-status-buttons-container {
    padding-left: 6px;
}
