/* Transactions page upgrades (transactions-plus.js) */
.txp-kind {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid transparent;
}
.txp-sub {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted, #6b7280);
    line-height: 1.25;
    margin-top: 2px;
}
.txp-sub.txp-fx {
    color: var(--primary, #4f46e5);
}
.txp-note {
    cursor: text;
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.txp-note.empty {
    opacity: 0;
}
tr:hover .txp-note.empty {
    opacity: 0.7;
}
.txp-edit-cell {
    cursor: pointer;
}
.txp-status {
    display: inline-block;
    padding: 0.1rem 0.45rem;
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 600;
    margin-top: 3px;
}
.txp-status.sent {
    background: #fef3c7;
    color: #92400e;
}
.txp-status.received {
    background: #dbeafe;
    color: #1e40af;
}
.txp-status.confirmed {
    background: #dcfce7;
    color: #166534;
}
[data-theme='dark'] .txp-status.sent {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}
[data-theme='dark'] .txp-status.received {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}
[data-theme='dark'] .txp-status.confirmed {
    background: rgba(34, 197, 94, 0.2);
    color: #86efac;
}
.txp-clip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--primary, #4f46e5);
    padding: 2px 4px;
    border-radius: 6px;
}
.txp-clip.none {
    color: #d97706;
}
.txp-clip:hover {
    background: rgba(99, 102, 241, 0.1);
}
.txp-lock {
    color: var(--text-muted, #6b7280);
    font-size: 0.7rem;
    margin-left: 4px;
}
.txp-split-tag {
    display: inline-block;
    font-size: 0.65rem;
    padding: 0 0.35rem;
    border-radius: 4px;
    background: rgba(139, 92, 246, 0.15);
    color: #7c3aed;
    margin-left: 4px;
    font-weight: 600;
}
tr.txp-group td {
    background: var(--bg-tertiary, #f3f4f6);
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    user-select: none;
    position: sticky;
    top: 0;
}
tr.txp-group .txp-gsum {
    float: right;
    font-weight: 700;
}
tr.txp-group .txp-gcount {
    font-weight: 400;
    color: var(--text-muted, #6b7280);
    margin-left: 0.5rem;
}
.txp-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    padding: 0.5rem 0.75rem;
}
.txp-chip {
    border: 1px solid var(--border, #e5e7eb);
    background: var(--surface, #fff);
    color: var(--text, #111827);
    border-radius: 999px;
    padding: 0.25rem 0.7rem;
    font-size: 0.75rem;
    cursor: pointer;
}
.txp-chip.active {
    background: var(--primary, #4f46e5);
    border-color: var(--primary, #4f46e5);
    color: #fff;
}
.txp-chip-note {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--text-muted, #6b7280);
}
.txp-box {
    border: 1px dashed var(--border, #d1d5db);
    border-radius: 10px;
    padding: 0.7rem 0.8rem;
    margin-bottom: 1rem;
    background: var(--bg-tertiary, #f9fafb);
}
.txp-box-title {
    font-weight: 600;
    font-size: 0.82rem;
    margin-bottom: 0.4rem;
}
.txp-details {
    margin-bottom: 1rem;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 10px;
    padding: 0.5rem 0.8rem;
}
.txp-details > summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
}
.txp-details[open] > summary {
    margin-bottom: 0.7rem;
}
.txp-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.4rem;
}
.txp-row select,
.txp-row input {
    flex: 1;
    min-width: 0;
}
.txp-row .txp-pct {
    flex: 0 0 90px;
}
.txp-link-btn {
    background: none;
    border: 0;
    color: var(--primary, #4f46e5);
    cursor: pointer;
    font-size: 0.78rem;
    padding: 0;
}
.txp-help-toggle {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--text-muted, #6b7280);
}
.help-panel.txp-collapsed .help-panel-content {
    display: none;
}
.help-panel.txp-has-toggle .help-panel-header {
    cursor: pointer;
}
.txp-card {
    background: var(--surface, #fff);
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    margin-bottom: 1rem;
}
.txp-card-head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
}
.txp-card-head .txp-sub {
    margin: 0 0 0 auto;
}
.txp-chart {
    position: relative;
    height: 230px;
    margin-top: 0.6rem;
}
.txp-wide {
    max-width: 980px !important;
    width: 96vw;
}
.txp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
}
.txp-table th,
.txp-table td {
    padding: 0.4rem 0.5rem;
    border-bottom: 1px solid var(--border, #e5e7eb);
    text-align: left;
    vertical-align: top;
}
.txp-table th {
    position: sticky;
    top: 0;
    background: var(--surface, #fff);
    z-index: 1;
}
.txp-scroll {
    max-height: 52vh;
    overflow: auto;
}
.txp-kpis {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 0.8rem;
}
.txp-kpi {
    flex: 1 1 150px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 10px;
    padding: 0.5rem 0.7rem;
}
.txp-kpi b {
    display: block;
    font-size: 1rem;
}
.txp-kpi span {
    font-size: 0.7rem;
    color: var(--text-muted, #6b7280);
}
.txp-pill {
    display: inline-block;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 600;
    background: rgba(107, 114, 128, 0.15);
}
.txp-pill.ok {
    background: #dcfce7;
    color: #166534;
}
.txp-pill.warn {
    background: #fef3c7;
    color: #92400e;
}
.txp-pill.bad {
    background: #fee2e2;
    color: #991b1b;
}
.txp-tabs {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.6rem;
}
.txp-fab {
    display: none;
}
@media (max-width: 1024px) {
    .txp-fab {
        display: flex;
        position: fixed;
        right: 16px;
        bottom: 84px;
        width: 54px;
        height: 54px;
        border-radius: 50%;
        border: 0;
        background: var(--primary, #4f46e5);
        color: #fff;
        font-size: 1.3rem;
        align-items: center;
        justify-content: center;
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
        z-index: 900;
    }
    .txp-chip-note {
        margin-left: 0;
        width: 100%;
    }
}

.txp-row input[type='checkbox'] {
    flex: 0 0 auto;
    width: auto;
}
.txp-row label {
    justify-content: flex-start;
    margin: 0;
    text-align: left;
}
.txp-row > span {
    flex: 0 0 auto;
}

.txp-actions {
    display: inline-flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}
@media (max-width: 700px) {
    #page-transactions .page-header-actions {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.4rem;
        align-items: center;
    }
    #page-transactions .currency-toggle {
        flex-direction: row;
        height: auto;
    }
    #page-transactions .currency-btn {
        height: auto;
        padding: 0.3rem 0.6rem;
    }
    .txp-actions .btn,
    #page-transactions .page-header-actions > .btn-primary {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }
}
