/**
 * CodeIQ Review Panels - Panel-specific styles
 *
 * Design system: Each view uses a dark header bar (#3e2a4c) for visual hierarchy,
 * matching the Account Summary view's established pattern. Panels are transparent
 * containers that fill .review-content-area — no card-in-card nesting.
 *
 * Layout/toggle/pagination handled by review-apple.css + review-table-redesign.css
 * Colors: Editorial rose palette (#c4576a accent), deep plum headers (#3e2a4c)
 */

/* ============================================
   SHARED PANEL RESET — panels fill parent card
   ============================================ */
.vat-audit-panel,
.transfers-panel,
.invoices-panel {
    display: none;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
    box-shadow: none;
}

/* ============================================
   VAT AUDIT PANEL — Enterprise-grade revamp
   ============================================ */

/* --- Panel wrapper: strip review-apple.css card treatment --- */
.review-interface .vat-audit-panel {
    display: none;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.review-interface .vat-audit-body {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 0;
    align-items: start;
}

/* --- Sidebar (left column) --- */
.review-interface .vat-audit-sidebar {
    border-right: 1px solid var(--ciq-gray-200, #d4d0c8);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: #f7f5f2;
    min-height: 300px;
}

.review-interface .vat-sidebar-header h4 {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 700;
    color: #3e2a4c;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.review-interface .vat-sidebar-header p {
    margin: 0;
    font-size: 12px;
    color: var(--ciq-gray-500, #6b6b6b);
}

.review-interface .vat-chip-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.review-interface .vat-chip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid var(--ciq-gray-200, #d4d0c8);
    cursor: pointer;
    transition: all 0.15s ease;
    margin-bottom: 0;
    font-size: inherit;
}

.review-interface .vat-chip:hover {
    border-color: #c8bccb;
    background: #fdf5f7;
}

.review-interface .vat-chip-main {
    min-width: 0;
    flex: 1;
}

.review-interface .vat-chip-code {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ciq-gray-500, #6b6b6b);
    margin-bottom: 1px;
    font-weight: 600;
}

.review-interface .vat-chip-name {
    color: var(--ciq-gray-900, #1a1a1a);
    font-size: 14px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.review-interface .vat-chip-stats {
    text-align: right;
    flex-shrink: 0;
    margin-left: 12px;
}

.review-interface .vat-chip-count {
    font-size: 13px;
    font-weight: 700;
    color: #3e2a4c;
}

.review-interface .vat-chip-amount {
    font-size: 11px;
    color: var(--ciq-gray-500, #6b6b6b);
    font-variant-numeric: tabular-nums;
}

.review-interface .vat-chip.active {
    border-color: var(--app-accent, #c4576a);
    box-shadow: 0 0 0 2px rgba(196, 87, 106, 0.12), 0 0 0 4px rgba(196, 87, 106, 0.06);
    background: #fdf5f7;
}

/* --- Main area (group cards grid) --- */
.review-interface .vat-audit-main {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
    padding: 24px;
}

.review-interface .vat-group-card {
    border: 1px solid var(--ciq-gray-200, #d4d0c8);
    border-radius: 12px;
    padding: 20px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(26, 26, 26, 0.04);
    transition: all 0.15s ease;
}

.review-interface .vat-group-card:hover {
    border-color: #c8bccb;
    box-shadow: 0 4px 12px rgba(26, 26, 26, 0.08);
}

.review-interface .vat-group-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
}

.review-interface .vat-group-title {
    font-weight: 700;
    color: var(--ciq-gray-900, #1a1a1a);
    font-size: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.review-interface .vat-group-account {
    font-size: 13px;
    color: var(--ciq-gray-500, #6b6b6b);
    margin-top: 2px;
}

.review-interface .vat-group-pill {
    background: #f0e6f0;
    color: #5f2d58;
    padding: 5px 10px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

.review-interface .vat-group-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 13px;
    color: var(--ciq-gray-500, #6b6b6b);
    margin-bottom: 12px;
}

.review-interface .vat-group-meta span + span::before {
    content: "\00B7";
    margin-right: 4px;
    color: var(--ciq-gray-400, #94a3b8);
}

.review-interface .vat-group-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.review-interface .vat-group-actions select {
    min-width: 128px;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid var(--ciq-gray-300, #c4c0b8);
    background: #ffffff;
    color: #2a2133;
    font-size: 13px;
}

.review-interface .vat-group-actions button {
    border-radius: 6px;
    border: 1px solid var(--ciq-gray-300, #c4c0b8);
    padding: 8px 14px;
    background: #3e2a4c;
    color: white;
    cursor: pointer;
    transition: all 0.15s ease;
    font-weight: 600;
    font-size: 13px;
}

.review-interface .vat-group-actions button:hover {
    background: #332040;
    filter: none;
}

.review-interface .vat-group-actions button.secondary {
    background: white;
    color: #c4576a;
    border-color: var(--ciq-gray-300, #c4c0b8);
}

.review-interface .vat-group-actions button.secondary:hover {
    background: #fdf5f7;
    border-color: #c4576a;
    color: #9a4054;
}

.review-interface .vat-group-details {
    margin-top: 12px;
    border-top: 1px dashed var(--ciq-gray-200, #d4d0c8);
    padding-top: 12px;
    display: none;
}

.review-interface .vat-group-sample-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 5px 0;
    font-size: 13px;
}

.review-interface .vat-group-sample-desc {
    color: var(--ciq-gray-500, #6b6b6b);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.review-interface .vat-group-sample-amount {
    color: #3d3145;
    font-weight: 600;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.review-interface .vat-group-sample-more {
    margin-top: 4px;
    font-size: 13px;
    color: var(--ciq-gray-500, #6b6b6b);
}

/* --- Anomaly section --- */
.review-interface .vat-anomaly-section {
    border-top: 1px solid var(--ciq-gray-200, #d4d0c8);
    padding-top: 14px;
    margin-top: 8px;
}

.review-interface .vat-anomaly-heading {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ciq-gray-500, #6b6b6b);
    margin-bottom: 8px;
    font-weight: 600;
}

.review-interface .anomaly-card {
    border: 1px solid #f3d7a7;
    background: #fffbf0;
    padding: 12px 14px;
    border-radius: 8px;
    margin-top: 6px;
}

.review-interface .anomaly-title {
    font-size: 13px;
    font-weight: 700;
    color: #8c4c00;
    margin-bottom: 4px;
}

.review-interface .anomaly-meta {
    font-size: 12px;
    color: #9d5e14;
    margin-bottom: 8px;
}

.review-interface .vat-group-actions-btn {
    padding: 7px 12px;
    border-radius: 6px;
    border: 1px solid #e5b267;
    background: #f6c780;
    color: #6f3f00;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
}

.review-interface .vat-group-actions-btn:hover {
    background: #f3bb64;
}

/* --- Empty state --- */
.review-interface .vat-empty {
    padding: 24px;
    border: 1px dashed var(--ciq-gray-300, #c4c0b8);
    border-radius: 10px;
    background: var(--ciq-gray-50, #faf8f5);
    color: var(--ciq-gray-500, #6b6b6b);
    font-size: 13px;
}

/* --- Search / Controls --- */
.review-interface .vat-audit-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.review-interface .vat-audit-search-wrap {
    flex: 1;
}

.review-interface .vat-audit-search {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--ciq-gray-300, #c4c0b8);
    font-size: 14px;
    transition: all 0.15s ease;
}

.review-interface .vat-audit-search:focus-visible {
    outline: none;
    border-color: var(--app-accent, #c4576a);
    box-shadow: 0 0 0 3px rgba(196, 87, 106, 0.1);
}

.review-interface .vat-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 999px;
    background: #fdf5f7;
    color: #9a4054;
    border: 1px solid #fae8ec;
    font-weight: 600;
    font-size: 13px;
}

.review-interface .vat-filter-pill button {
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    font-weight: 700;
    padding: 0;
}

.review-interface .vat-audit-results-meta {
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--ciq-gray-500, #6b6b6b);
}

/* --- Responsive: 1024px --- */
@media (max-width: 1024px) {
    .review-interface .vat-audit-body {
        grid-template-columns: 1fr;
    }
    .review-interface .vat-audit-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--ciq-gray-200, #d4d0c8);
        min-height: auto;
        padding-bottom: 18px;
    }
}

/* --- Responsive: 768px --- */
@media (max-width: 768px) {
    .review-interface .vat-audit-main {
        padding: 16px;
        grid-template-columns: 1fr;
    }
    .review-interface .vat-audit-sidebar {
        padding: 16px;
    }
}

/* ============================================
   VAT RETURN PREVIEW — dark plum header bar
   ============================================ */

.review-interface .vat-return-preview {
    background: #3e2a4c;
    border: none;
    border-radius: 0;
    padding: 22px 28px;
    margin-bottom: 0;
}

.review-interface .vat-return-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    cursor: pointer;
}

.review-interface .vat-return-header h4 {
    margin: 0;
    color: #fffdf9;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.review-interface .vat-return-header h4 svg {
    color: rgba(255, 255, 255, 0.7);
}

.review-interface .vat-return-toggle {
    color: rgba(255, 255, 255, 0.6);
    transition: transform 0.2s;
}

.review-interface .vat-return-toggle.collapsed {
    transform: rotate(-90deg);
}

.review-interface .vat-return-body {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.review-interface .vat-return-body.collapsed {
    display: none;
}

.review-interface .vat-box {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.review-interface .vat-box-label {
    font-size: 11px;
    color: rgba(255, 245, 238, 0.6);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.review-interface .vat-box-value {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    font-variant-numeric: tabular-nums;
}

.review-interface .vat-box-value.positive { color: #4ade80; }
.review-interface .vat-box-value.negative { color: #f87171; }

.review-interface .vat-box.highlight {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 1px 6px rgba(255, 255, 255, 0.06);
}

.review-interface .vat-box.highlight .vat-box-value {
    font-size: 22px;
}

.review-interface .vat-return-disclaimer {
    font-size: 11px;
    color: rgba(255, 245, 238, 0.45);
    margin-top: 12px;
    font-style: italic;
}

/* --- VAT Return Responsive: 1024px --- */
@media (max-width: 1024px) {
    .review-interface .vat-return-body {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* --- VAT Return Responsive: 768px --- */
@media (max-width: 768px) {
    .review-interface .vat-return-preview {
        padding: 16px;
    }
    .review-interface .vat-return-body {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   ACCOUNT SUMMARY PANEL
   ============================================ */

.account-summary-panel {
    display: none;
    background: #ffffff;
    border-radius: 0;
    padding: 0;
    border: none;
    margin: 0;
    overflow: hidden;
}

/* Summary Header Bar */
.acct-summary-header {
    background: #3e2a4c;
    padding: 20px 24px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: center;
}

.acct-summary-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.acct-summary-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.acct-summary-title h3 {
    color: #fffdf9;
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.01em;
}

.acct-summary-title .acct-count {
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.9);
    font-size: 11px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 10px;
}

.acct-summary-subtitle {
    margin: 0;
    font-size: 13px;
    color: rgba(255, 245, 238, 0.65);
}

.acct-summary-totals {
    display: flex;
    gap: 28px;
}

.acct-total-item {
    text-align: right;
}

.acct-total-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 3px;
}

.acct-total-value {
    font-size: 18px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.acct-total-value.income { color: #4ade80; }
.acct-total-value.expense { color: #f87171; }
.acct-total-value.net { color: #ffffff; }
.acct-total-value.net.positive { color: #4ade80; }
.acct-total-value.net.negative { color: #f87171; }

.acct-summary-insights {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 14px 24px;
    background: #f7f3f8;
    border-bottom: 1px solid #e5dde7;
}

.acct-insight-chip {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #e3d8e6;
    background: #ffffff;
}

.acct-insight-chip.warning {
    background: #fff4f1;
    border-color: #f2cec8;
}

.acct-insight-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ciq-gray-500, #6b6b6b);
}

.acct-insight-chip strong {
    font-size: 15px;
    color: #3e2a4c;
}

/* Controls Bar */
.acct-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background: var(--ciq-gray-50, #faf8f5);
    border-bottom: 1px solid var(--ciq-gray-200, #d4d0c8);
    gap: 16px;
}

.acct-search {
    position: relative;
    flex: 1;
    max-width: 300px;
}

.acct-search input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    border: 1px solid var(--ciq-gray-200, #d4d0c8);
    border-radius: 6px;
    font-size: 13px;
    background: #ffffff;
    transition: all 0.15s ease;
}

.acct-search input:focus {
    outline: none;
    border-color: var(--app-accent, #c4576a);
    box-shadow: 0 0 0 3px rgba(196, 87, 106, 0.1);
}

.acct-search input::placeholder {
    color: var(--ciq-gray-400, #94a3b8);
}

.acct-search svg {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ciq-gray-400, #94a3b8);
    pointer-events: none;
}

.acct-sort {
    display: flex;
    align-items: center;
    gap: 8px;
}

.acct-sort label {
    font-size: 12px;
    color: var(--ciq-gray-500, #6b6b6b);
}

.acct-sort select {
    padding: 6px 28px 6px 10px;
    border: 1px solid var(--ciq-gray-200, #d4d0c8);
    border-radius: 6px;
    font-size: 12px;
    background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center;
    appearance: none;
    cursor: pointer;
}

.acct-sort select:focus {
    outline: none;
    border-color: var(--app-accent, #c4576a);
}

/* Account Groups Container */
.acct-groups-container {
    padding: 20px 24px;
}

/* Account Type Group */
.acct-type-group {
    margin-bottom: 16px;
}

.acct-type-group:last-child {
    margin-bottom: 0;
}

.acct-type-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--ciq-gray-50, #faf8f5);
    border: 1px solid var(--ciq-gray-200, #d4d0c8);
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    transition: background 0.15s ease;
    user-select: none;
}

.acct-type-header:hover {
    background: var(--ciq-gray-100, #f5f2ed);
}

.acct-type-header.collapsed {
    border-radius: 8px;
}

.acct-type-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.acct-type-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.acct-type-icon.income { background: rgba(5, 150, 105, 0.1); color: #059669; }
.acct-type-icon.expense { background: rgba(220, 38, 38, 0.1); color: #dc2626; }
.acct-type-icon.asset { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.acct-type-icon.liability { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.acct-type-icon.equity { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }
.acct-type-icon.bank { background: rgba(6, 182, 212, 0.1); color: #06b6d4; }
.acct-type-icon.other { background: rgba(107, 114, 128, 0.1); color: #6b6b6b; }
.acct-type-icon.uncoded { background: rgba(196, 87, 106, 0.1); color: #c4576a; }

.acct-type-name {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
}

.acct-type-count {
    font-size: 11px;
    color: var(--ciq-gray-500, #6b6b6b);
    background: var(--ciq-gray-200, #d4d0c8);
    padding: 2px 7px;
    border-radius: 6px;
    font-weight: 500;
}

.acct-type-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.acct-type-total {
    font-size: 14px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.acct-type-total.positive { color: #059669; }
.acct-type-total.negative { color: #dc2626; }

.acct-type-chevron {
    color: var(--ciq-gray-400, #94a3b8);
    transition: transform 0.2s ease;
}

.acct-type-header.collapsed .acct-type-chevron {
    transform: rotate(-90deg);
}

/* Account Cards Grid */
.acct-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0;
    border: 1px solid var(--ciq-gray-200, #d4d0c8);
    border-top: none;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
    background: #ffffff;
}

.acct-cards-grid.hidden {
    display: none;
}

/* Individual Account Card */
.acct-card {
    background: #ffffff;
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
    border-left: 3px solid transparent;
    border-bottom: 1px solid var(--ciq-gray-200, #d4d0c8);
    border-right: 1px solid var(--ciq-gray-200, #d4d0c8);
}

.acct-card:last-child {
    border-bottom: none;
}

.acct-card:hover {
    background: var(--ciq-gray-50, #faf8f5);
    border-left-color: var(--app-accent, #c4576a);
}

.acct-card.filtered {
    background: #fdf5f7;
    border-left-color: var(--app-accent, #c4576a);
}

.acct-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.acct-card-name {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.3;
    flex: 1;
    margin-right: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.acct-card-code {
    font-size: 10px;
    font-weight: 600;
    color: var(--ciq-gray-500, #6b6b6b);
    background: var(--ciq-gray-100, #f5f2ed);
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

.acct-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.acct-card-txns {
    font-size: 11px;
    color: var(--ciq-gray-500, #6b6b6b);
}

.acct-card-txns strong {
    color: #3d3d3d;
}

.acct-card-confidence {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
}

.acct-card-confidence.high { color: #059669; }
.acct-card-confidence.medium { color: #f59e0b; }
.acct-card-confidence.low { color: #dc2626; }

.acct-card-amounts {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.acct-card-total {
    font-size: 15px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.acct-card-total.positive { color: #059669; }
.acct-card-total.negative { color: #dc2626; }

.acct-card-bar {
    flex: 1;
    max-width: 100px;
    height: 4px;
    background: var(--ciq-gray-200, #d4d0c8);
    border-radius: 2px;
    margin-left: 16px;
    overflow: hidden;
}

.acct-card-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.acct-card-bar-fill.income { background: #1f9d74; }
.acct-card-bar-fill.expense { background: #d35661; }

/* Uncoded Warning Section */
.acct-uncoded-warning {
    background: #fff4f1;
    border: 1px solid #f2cec8;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.acct-uncoded-icon {
    width: 36px;
    height: 36px;
    background: #fee2e2;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #dc2626;
    flex-shrink: 0;
}

.acct-uncoded-text h4 {
    font-size: 13px;
    font-weight: 600;
    color: #991b1b;
    margin: 0 0 2px 0;
}

.acct-uncoded-text p {
    font-size: 12px;
    color: #b91c1c;
    margin: 0;
}

.acct-uncoded-btn {
    margin-left: auto;
    padding: 6px 12px;
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.acct-uncoded-btn:hover {
    background: #b91c1c;
}

/* Empty State */
.acct-empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--ciq-gray-500, #6b6b6b);
}

.acct-empty svg {
    margin-bottom: 12px;
    opacity: 0.4;
}

.acct-empty p {
    margin: 0;
    font-size: 13px;
}

/* Click hint */
.acct-click-hint {
    font-size: 11px;
    color: var(--ciq-gray-400, #94a3b8);
    text-align: center;
    padding: 12px;
    border-top: 1px solid var(--ciq-gray-200, #d4d0c8);
    background: var(--ciq-gray-50, #faf8f5);
}

/* ============================================
   TRANSFERS PANEL — dark header pattern
   ============================================ */

.transfers-panel {
    display: none;
}

.transfers-overview {
    background: #3e2a4c;
    padding: 20px 24px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin: 0;
    border: none;
    border-radius: 0;
}

.transfers-overview-heading h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #fffdf9;
}

.transfers-overview-heading p {
    margin: 4px 0 0;
    font-size: 13px;
    color: rgba(255, 245, 238, 0.65);
}

.transfers-overview-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    flex: 1;
    min-width: 0;
    max-width: 520px;
}

.transfers-overview-stat {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.08);
}

.transfers-overview-label {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(255, 245, 238, 0.55);
    margin-bottom: 3px;
}

.transfers-overview-stat strong {
    font-size: 16px;
    color: #ffffff;
    font-variant-numeric: tabular-nums;
}

.transfers-overview-stat strong.matched {
    color: #4ade80;
}

.transfers-overview-stat strong.unmatched {
    color: #fbbf24;
}

.transfer-pairs-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 20px 24px;
}

.transfers-empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--ciq-gray-500, #6b6b6b);
}

.transfers-empty svg {
    opacity: 0.4;
    margin-bottom: 12px;
}

.transfers-empty h4 {
    margin: 0 0 6px;
    color: #3d3145;
    font-size: 15px;
}

.transfers-empty p {
    margin: 0;
    font-size: 13px;
}

.transfers-empty-footnote {
    margin-top: 8px !important;
    font-size: 12px !important;
    color: #8b7f93 !important;
}

.transfer-pair-card {
    border: 1px solid var(--ciq-gray-200, #d4d0c8);
    border-radius: 10px;
    padding: 18px;
    background: #ffffff;
    transition: all 0.15s ease;
}

.transfer-pair-card:hover {
    box-shadow: 0 2px 8px rgba(26, 26, 26, 0.06);
}

.transfer-pair-card.matched {
    border-color: #bfe5d4;
    border-left: 3px solid #059669;
}

.transfer-pair-card.unmatched {
    border-color: #f1d5ad;
    border-left: 3px solid #f59e0b;
}

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

.transfer-pair-primary {
    min-width: 0;
}

.transfer-pair-amount {
    font-size: 20px;
    font-weight: 700;
    color: #3e2a4c;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.transfer-pair-context {
    margin-top: 4px;
    font-size: 12px;
    color: var(--ciq-gray-500, #6b6b6b);
}

.transfer-pair-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.transfer-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.transfer-pair-status.matched {
    background: #ecfdf5;
    color: #059669;
}

.transfer-pair-status.unmatched {
    background: #fffbeb;
    color: #b45309;
}

.transfer-pair-sides {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 12px;
    align-items: center;
}

.transfer-side {
    background: var(--ciq-gray-50, #faf8f5);
    border-radius: 8px;
    padding: 14px;
    border: 1px solid var(--ciq-gray-200, #d4d0c8);
}

.transfer-side-label {
    font-size: 10px;
    color: var(--ciq-gray-500, #6b6b6b);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.transfer-side-bank {
    font-weight: 700;
    color: #3e2a4c;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.transfer-side-desc {
    font-size: 12px;
    color: var(--ciq-gray-500, #6b6b6b);
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.transfer-arrow {
    color: var(--ciq-gray-400, #94a3b8);
    display: flex;
    align-items: center;
    justify-content: center;
}

.transfer-pair-meta {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--ciq-gray-200, #d4d0c8);
    font-size: 12px;
    color: var(--ciq-gray-500, #6b6b6b);
}

.transfer-pair-meta strong {
    color: #3d3145;
}

/* ============================================
   INVOICES PANEL — enterprise-grade revamp
   Uses .review-interface prefix to beat review-apple.css
   ============================================ */

/* --- Panel container: strip apple card-in-card nesting --- */
.review-interface .invoices-panel {
    display: none;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

/* --- Overview header: dark plum (consistent with Transfers/VAT Return) --- */
.review-interface .invoices-overview {
    background: linear-gradient(135deg, #3e2a4c 0%, #2d1f38 100%);
    padding: 22px 28px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin: 0;
    border: none;
    border-radius: 0;
}

.review-interface .invoices-overview-heading h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #fffdf9;
}

.review-interface .invoices-overview-heading p {
    margin: 4px 0 0;
    font-size: 13px;
    color: rgba(255, 245, 238, 0.6);
}

.review-interface .invoices-overview-kpis {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.review-interface .invoices-overview-kpi {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    font-size: 12px;
    color: rgba(255, 245, 238, 0.7);
}

.review-interface .invoices-overview-kpi strong {
    color: #ffffff;
}

/* --- Empty state --- */
.review-interface .invoices-empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--ciq-gray-500, #6b6b6b);
}

.review-interface .invoices-empty svg {
    opacity: 0.4;
    margin-bottom: 12px;
}

.review-interface .invoices-empty h4 {
    margin: 0 0 6px;
    color: #1a1a1a;
    font-size: 15px;
}

.review-interface .invoices-empty p {
    margin: 0;
    font-size: 13px;
}

/* --- Stats row: fixed 5-column grid, rose-tinted --- */
.review-interface .invoices-panel .invoice-summary-stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    padding: 18px 24px;
    background: #fdf5f7;
    border-bottom: 1px solid rgba(196, 87, 106, 0.12);
    margin: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
}

.review-interface .invoices-panel .invoice-stat-card {
    background: white;
    padding: 16px;
    border-radius: 10px;
    border: 1px solid rgba(196, 87, 106, 0.12);
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.review-interface .invoices-panel .invoice-stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--ciq-gray-900, #1a1a1a);
    font-variant-numeric: tabular-nums;
}

.review-interface .invoices-panel .invoice-stat-value.success {
    color: #059669;
}

.review-interface .invoices-panel .invoice-stat-value.danger {
    color: #dc2626;
}

.review-interface .invoices-panel .invoice-stat-value.accent {
    color: #9a4054;
}

.review-interface .invoices-panel .invoice-stat-label {
    font-size: 12px;
    color: var(--ciq-gray-500, #6b6b6b);
    margin-top: 4px;
    letter-spacing: 0.05em;
}

/* --- Section containers --- */
.review-interface .invoices-section {
    margin-bottom: 0;
    padding: 20px 24px;
    border-bottom: 1px solid var(--ciq-gray-200, #d4d0c8);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.review-interface .invoices-section:last-of-type {
    border-bottom: none;
}

/* --- Section headers --- */
.review-interface .invoices-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--ciq-gray-200, #d4d0c8);
}

.review-interface .invoices-section-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.review-interface .invoices-section-icon.sales {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #bbf7d0;
}

.review-interface .invoices-section-icon.purchase {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.review-interface .invoices-section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--ciq-gray-900, #1a1a1a);
}

.review-interface .invoices-section-count {
    font-size: 13px;
    color: var(--ciq-gray-500, #6b6b6b);
}

/* --- Invoice cards --- */
.review-interface .invoices-panel .invoice-card {
    display: block;
    border: 1px solid var(--ciq-gray-200, #d4d0c8);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 10px;
    background: #ffffff;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
    position: relative;
    overflow: visible;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.review-interface .invoices-panel .invoice-card::before {
    display: none;
}

.review-interface .invoices-panel .invoice-card:hover {
    border-color: rgba(196, 87, 106, 0.3);
    box-shadow: 0 4px 12px rgba(196, 87, 106, 0.1);
    transform: none;
}

.review-interface .invoices-panel .invoice-card.matched {
    background: #f8fdfb;
    border-color: #bfe5d4;
    border-left: 3px solid #059669;
}

.review-interface .invoices-panel .invoice-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.review-interface .invoices-panel .invoice-card-main {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.review-interface .invoices-panel .invoice-number {
    font-size: 15px;
    font-weight: 700;
    color: var(--ciq-gray-900, #1a1a1a);
    margin-bottom: 0;
}

.review-interface .invoices-panel .invoice-batch-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    padding: 2px 7px;
    border-radius: 999px;
    border: 1px solid rgba(196, 87, 106, 0.25);
    background: #fdf5f7;
    color: #9a4054;
    font-size: 10px;
    font-weight: 700;
    vertical-align: middle;
}

.review-interface .invoices-panel .invoice-contact {
    font-size: 13px;
    color: var(--ciq-gray-500, #6b6b6b);
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

.review-interface .invoices-panel .invoice-amount {
    font-family: inherit;
    font-size: 20px;
    font-weight: 700;
    text-align: right;
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    background-clip: unset;
    margin-left: 0;
    font-variant-numeric: tabular-nums;
}

.review-interface .invoices-panel .invoice-amount.sales { color: #059669; }
.review-interface .invoices-panel .invoice-amount.purchase { color: #dc2626; }

/* --- Dates row --- */
.review-interface .invoices-panel .invoice-dates {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 10px;
    font-size: 12px;
    color: var(--ciq-gray-500, #6b6b6b);
}

.review-interface .invoices-panel .invoice-date-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.review-interface .invoices-panel .invoice-date-label {
    font-weight: 600;
}

/* --- Status badges --- */
.review-interface .invoices-panel .invoice-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.review-interface .invoices-panel .invoice-status-badge.outstanding {
    background: #fef3c7;
    color: #92400e;
}

.review-interface .invoices-panel .invoice-status-badge.matched {
    background: #dcfce7;
    color: #166534;
}

.review-interface .invoices-panel .invoice-status-badge.overdue {
    background: #fee2e2;
    color: #991b1b;
}

/* --- Match section --- */
.review-interface .invoices-panel .invoice-match-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--ciq-gray-200, #d4d0c8);
}

.review-interface .invoices-panel .invoice-match-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #f0fdf4;
    padding: 14px 16px;
    border-radius: 8px;
    border: 1px solid #bbf7d0;
}

.review-interface .invoices-panel .invoice-match-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.review-interface .invoices-panel .invoice-match-label {
    font-size: 11px;
    color: #059669;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.review-interface .invoices-panel .invoice-match-date {
    font-size: 12px;
    color: var(--ciq-gray-500, #6b6b6b);
}

.review-interface .invoices-panel .invoice-match-txn {
    font-size: 13px;
    color: var(--ciq-gray-900, #1a1a1a);
    font-weight: 500;
}

.review-interface .invoices-panel .invoice-match-breakdown {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.review-interface .invoices-panel .invoice-match-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 10px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 6px;
    font-size: 13px;
}

.review-interface .invoices-panel .invoice-match-line .invoice-match-txn {
    font-size: 13px;
    max-width: 70%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.review-interface .invoices-panel .invoice-match-line .invoice-match-amount {
    font-weight: 600;
    color: #059669;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.review-interface .invoices-panel .invoice-match-line.adjustment {
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.25);
}

.review-interface .invoices-panel .invoice-match-line.adjustment .invoice-match-txn {
    color: #92400e;
}

.review-interface .invoices-panel .invoice-match-line.adjustment .invoice-match-amount {
    color: #b45309;
}

.review-interface .invoices-panel .invoice-match-line.total {
    background: rgba(5, 150, 105, 0.1);
    border: 1px solid rgba(5, 150, 105, 0.2);
    font-weight: 600;
}

.review-interface .invoices-panel .invoice-match-line.total .invoice-match-txn {
    color: #166534;
}

.review-interface .invoices-panel .invoice-match-line.total .invoice-match-amount {
    color: #166534;
    font-size: 14px;
}

/* --- Payment status pills --- */
.review-interface .invoices-panel .invoice-payment-status {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    margin-left: 6px;
    vertical-align: middle;
}

.review-interface .invoices-panel .invoice-payment-status.fully-paid {
    background: rgba(5, 150, 105, 0.12);
    color: #166534;
    border: 1px solid rgba(5, 150, 105, 0.25);
}

.review-interface .invoices-panel .invoice-payment-status.shortfall {
    background: rgba(251, 191, 36, 0.12);
    color: #92400e;
    border: 1px solid rgba(251, 191, 36, 0.25);
}

.review-interface .invoices-panel .invoice-payment-status.overpaid {
    background: rgba(239, 68, 68, 0.1);
    color: #991b1b;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.review-interface .invoices-panel .invoice-lump-note {
    font-size: 10px;
    color: var(--ciq-gray-400, #999);
    font-weight: 400;
    margin-left: 4px;
}

/* --- Action buttons --- */
.review-interface .invoices-panel .invoice-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.review-interface .invoices-panel .invoice-action-btn {
    width: auto;
    height: auto;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.review-interface .invoices-panel .invoice-action-btn.primary {
    background: #3e2a4c;
    color: white;
}

.review-interface .invoices-panel .invoice-action-btn.primary:hover {
    background: #2d1f38;
    box-shadow: 0 2px 8px rgba(62, 42, 76, 0.3);
}

.review-interface .invoices-panel .invoice-action-btn.secondary {
    background: white;
    border-color: var(--ciq-gray-200, #d4d0c8);
    color: #3d3d3d;
}

.review-interface .invoices-panel .invoice-action-btn.secondary:hover {
    background: var(--ciq-gray-50, #faf8f5);
    border-color: rgba(196, 87, 106, 0.4);
    color: #9a4054;
}

.review-interface .invoices-panel .invoice-action-btn.danger {
    background: white;
    border-color: #fecaca;
    color: #dc2626;
    padding: 8px 16px;
}

.review-interface .invoices-panel .invoice-action-btn.danger:hover {
    background: #fef2f2;
}

/* --- Invoices list container --- */
.review-interface .invoices-panel .invoices-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ============================================
   TRANSACTION PICKER MODAL
   ============================================ */

.invoice-txn-picker-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.invoice-txn-picker-modal.active {
    display: flex;
}

.invoice-txn-picker-content {
    background: white;
    border-radius: 14px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.invoice-txn-picker-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--ciq-gray-200, #d4d0c8);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.invoice-txn-picker-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--ciq-gray-900, #1a1a1a);
}

.invoice-txn-picker-subtitle {
    font-size: 13px;
    color: var(--ciq-gray-500, #6b6b6b);
    margin-top: 4px;
}

.invoice-txn-picker-close {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--ciq-gray-500, #6b6b6b);
    border-radius: 6px;
}

.invoice-txn-picker-close:hover {
    background: var(--ciq-gray-100, #f5f2ed);
    color: var(--ciq-gray-900, #1a1a1a);
}

.invoice-txn-picker-body {
    padding: 16px 24px;
    overflow-y: auto;
    flex: 1;
}

.invoice-txn-picker-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--ciq-gray-200, #d4d0c8);
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.invoice-txn-picker-item:hover {
    border-color: #fae8ec;
    background: #fdf5f7;
}

.invoice-txn-picker-item.selected {
    border-color: var(--app-accent, #c4576a);
    background: #fdf5f7;
}

.invoice-txn-radio,
.invoice-txn-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--ciq-gray-300, #c4c0b8);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.invoice-txn-radio {
    border-radius: 50%;
}

.invoice-txn-checkbox {
    border-radius: 4px;
}

.invoice-txn-picker-item.selected .invoice-txn-radio,
.invoice-txn-picker-item.selected .invoice-txn-checkbox {
    border-color: var(--app-accent, #c4576a);
    background: var(--app-accent, #c4576a);
}

.invoice-txn-picker-item.selected .invoice-txn-radio::after {
    content: '';
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.invoice-txn-picker-item.selected .invoice-txn-checkbox::after {
    content: '✓';
    color: white;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}

/* Running total bar */
.invoice-txn-picker-running-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #faf8f5;
    border-top: 1px solid #e8e4dc;
    font-size: 13px;
    color: #1a1a1a;
}

.running-total-text strong {
    font-weight: 600;
}

.running-total-remaining {
    font-weight: 600;
    font-size: 12px;
}

.invoice-txn-info {
    flex: 1;
    min-width: 0;
}

.invoice-txn-desc {
    font-size: 14px;
    font-weight: 500;
    color: var(--ciq-gray-900, #1a1a1a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.invoice-txn-meta {
    font-size: 12px;
    color: var(--ciq-gray-500, #6b6b6b);
    display: flex;
    gap: 12px;
    margin-top: 4px;
}

.invoice-txn-match-pill {
    color: #059669;
    font-weight: 600;
}

.invoice-txn-amount {
    font-size: 16px;
    font-weight: 700;
    color: #059669;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

.invoice-txn-amount.negative {
    color: #dc2626;
}

.invoice-txn-picker-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--ciq-gray-200, #d4d0c8);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.invoice-txn-picker-empty {
    text-align: center;
    padding: 40px;
    color: var(--ciq-gray-500, #6b6b6b);
}

.invoice-picker-note {
    margin: 6px 0 0;
    font-size: 13px;
}

/* ============================================
   ADJUSTMENT CONFIRMATION MODAL
   ============================================ */

.invoice-adjustment-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10001;
    align-items: center;
    justify-content: center;
}

.invoice-adjustment-modal.active {
    display: flex;
}

.invoice-adjustment-content {
    background: white;
    border-radius: 14px;
    width: 90%;
    max-width: 480px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.invoice-adjustment-header {
    padding: 20px 24px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-bottom: 1px solid #fcd34d;
}

.invoice-adjustment-title {
    font-size: 18px;
    font-weight: 700;
    color: #92400e;
    display: flex;
    align-items: center;
    gap: 10px;
}

.invoice-adjustment-body {
    padding: 24px;
}

.invoice-adjustment-summary {
    background: var(--ciq-gray-50, #faf8f5);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.invoice-adjustment-copy {
    font-size: 14px;
    color: #3d3d3d;
    margin: 0 0 16px;
}

.invoice-adjustment-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
}

.invoice-adjustment-row.total {
    border-top: 2px solid var(--ciq-gray-200, #d4d0c8);
    margin-top: 8px;
    padding-top: 12px;
    font-weight: 700;
}

.invoice-adjustment-row .label {
    color: var(--ciq-gray-500, #6b6b6b);
}

.invoice-adjustment-row .label.positive {
    color: #059669;
    font-weight: 600;
}

.invoice-adjustment-row .label.negative {
    color: #dc2626;
    font-weight: 600;
}

.invoice-adjustment-row .value {
    color: var(--ciq-gray-900, #1a1a1a);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.invoice-adjustment-row .value.positive {
    color: #059669;
}

.invoice-adjustment-row .value.negative {
    color: #dc2626;
}

.invoice-adjustment-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.invoice-adjustment-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border: 2px solid var(--ciq-gray-200, #d4d0c8);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.invoice-adjustment-option:hover {
    border-color: #fae8ec;
    background: #fdf5f7;
}

.invoice-adjustment-option.selected {
    border-color: var(--app-accent, #c4576a);
    background: #fdf5f7;
}

.invoice-adjustment-radio {
    width: 20px;
    height: 20px;
    border: 2px solid var(--ciq-gray-300, #c4c0b8);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.invoice-adjustment-option.selected .invoice-adjustment-radio {
    border-color: var(--app-accent, #c4576a);
    background: var(--app-accent, #c4576a);
}

.invoice-adjustment-option.selected .invoice-adjustment-radio::after {
    content: '';
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.invoice-adjustment-option-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--ciq-gray-100, #f5f2ed);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--ciq-gray-500, #6b6b6b);
    transition: all 0.15s ease;
}

.invoice-adjustment-option.selected .invoice-adjustment-option-icon {
    background: #fdf5f7;
    color: var(--app-accent, #c4576a);
}

.invoice-adjustment-option-content {
    flex: 1;
}

.invoice-adjustment-option-title {
    font-weight: 600;
    color: var(--ciq-gray-900, #1a1a1a);
    margin-bottom: 4px;
}

.invoice-adjustment-option-desc {
    font-size: 13px;
    color: var(--ciq-gray-500, #6b6b6b);
}

.invoice-adjustment-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--ciq-gray-200, #d4d0c8);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

@media (max-width: 1024px) {
    .acct-summary-header {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .acct-summary-totals {
        gap: 18px;
        justify-content: flex-start;
    }

    .acct-summary-insights {
        grid-template-columns: repeat(2, 1fr);
    }

    .transfers-overview {
        flex-direction: column;
        align-items: stretch;
    }

    .transfers-overview-stats {
        grid-template-columns: repeat(4, 1fr);
        max-width: none;
    }

    .review-interface .invoices-overview {
        flex-direction: column;
        align-items: stretch;
    }

    .review-interface .invoices-overview-kpis {
        width: 100%;
    }

    .review-interface .invoices-panel .invoice-summary-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .acct-summary-header {
        padding: 16px;
    }

    .acct-summary-insights {
        grid-template-columns: 1fr 1fr;
        padding: 10px 16px;
    }

    .acct-controls {
        flex-direction: column;
        align-items: stretch;
        padding: 12px 16px;
    }

    .acct-search {
        max-width: none;
    }

    .acct-sort {
        justify-content: space-between;
    }

    .acct-cards-grid {
        grid-template-columns: 1fr;
    }

    .acct-groups-container {
        padding: 16px;
    }

    .transfer-pairs-grid {
        padding: 16px;
    }

    .transfer-pair-sides {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .transfer-arrow {
        transform: rotate(90deg);
        padding: 2px 0;
    }

    .transfer-pair-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .transfers-overview-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .review-interface .invoices-panel .invoice-card-header {
        flex-direction: column;
        gap: 8px;
    }

    .review-interface .invoices-panel .invoice-amount {
        text-align: left;
        font-size: 18px;
    }

    .review-interface .invoices-panel .invoice-match-info {
        flex-direction: column;
        align-items: flex-start;
    }

    .review-interface .invoices-panel .invoice-summary-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .review-interface .invoices-section {
        padding: 16px;
    }
}
