/* ═══ 7. HOLDINGS & TABLES ═══ */

/* ─── Holdings Table ────────────────────── */
.table-container { overflow-x: auto; }

.table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
}

.col-right { text-align: right; }
.col-asset { text-align: left; }

.col-sortable {
    cursor: pointer;
    user-select: none;
    transition: color 0.15s;
}

.col-sortable:hover { color: var(--text); }

.col-sortable.sort-asc,
.col-sortable.sort-desc { color: var(--accent); }

.holding-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.15s;
}

.holding-row:last-child { border-bottom: none; }
.holding-row:hover { background: var(--surface-hover); }
.holding-row--no-price { opacity: 0.6; }

.no-price-badge {
    display: inline-block;
    padding: 2px 6px;
    background: var(--yellow-bg);
    border: 1px solid var(--yellow);
    border-radius: 4px;
    color: var(--yellow);
    font-size: 0.7rem;
    font-family: inherit;
    white-space: nowrap;
}

.asset-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.asset-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font-mono);
    flex-shrink: 0;
}

.asset-logo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: contain;
    flex-shrink: 0;
    background: #fff;
}

.asset-name { font-weight: 600; font-size: 14px; }
.asset-amount { color: var(--text-secondary); font-size: 12px; }

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.text-right { text-align: right; display: block; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-secondary { color: var(--text-secondary); }
.fw-500 { font-weight: 500; }

/* ═══ 8. TRANSACTIONS ═══ */

/* ─── Recent Transactions ───────────────── */
.recent-tx-list { display: flex; flex-direction: column; gap: 2px; }

.tx-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.tx-row:last-child { border-bottom: none; }

.tx-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tx-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
}

.tx-icon.buy { background: var(--green-bg); color: var(--green); }
.tx-icon.sell { background: var(--red-bg); color: var(--red); }
.tx-icon.dividend { background: var(--teal-bg); color: var(--teal); }
.tx-icon.staking { background: var(--violet-bg); color: var(--violet); }

.tx-label { font-weight: 600; font-size: 14px; }
.tx-date { color: var(--text-secondary); font-size: 12px; }
.tx-time { color: var(--text-muted); font-size: 11px; }

.tx-right { text-align: right; }
.tx-amount { font-weight: 500; font-family: var(--font-mono); font-size: 13px; }
.tx-price { color: var(--text-secondary); font-size: 12px; font-family: var(--font-mono); }
.tx-total { font-weight: 600; font-family: var(--font-mono); font-size: 14px; }
.tx-detail { color: var(--text-secondary); font-size: 11px; font-family: var(--font-mono); }

.tx-icon-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: contain;
    flex-shrink: 0;
    background: #fff;
}

/* ─── Transactions Full List ────────────── */
.tx-list { display: flex; flex-direction: column; }

.tx-list-row {
    display: grid;
    /* grid-template-columns wird dynamisch per style gesetzt */
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    gap: 8px;
}

.tx-list-row:last-child { border-bottom: none; }

.tx-clickable { cursor: pointer; }
.tx-clickable:hover { background: var(--surface-hover, rgba(255,255,255,0.03)); }
.tx-highlight { animation: txFlash 1.4s ease-out forwards; }
@keyframes txFlash {
    0%   { background: rgba(255,255,255,0.12); }
    100% { background: transparent; }
}

.tx-list-header .tx-list-row {
    padding: 10px 0;
    border-bottom: 2px solid var(--border);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tx-col-sortable {
    cursor: pointer;
    user-select: none;
}
.tx-col-sortable:hover { color: var(--text); }
.tx-sort-active { color: var(--accent) !important; }

.tx-actions {
    display: flex;
    flex-direction: row;
    gap: 2px;
    align-items: center;
    justify-content: flex-end;
}

.tx-edit,
.tx-delete {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 3px 4px;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
    line-height: 1;
}

.tx-edit:hover {
    color: var(--accent);
    background: var(--accent-bg);
}

.tx-delete:hover {
    color: var(--red);
    background: var(--red-bg);
}

/* Transaction Icons */
.tx-asset-cell {
    display: flex;
    align-items: center;
}
.tx-asset-select {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 4px;
    padding: 2px 6px;
    margin: -2px -6px;
    transition: background 0.15s;
    cursor: pointer;
}
.tx-asset-select:hover {
    background: var(--surface-hover);
}

.tx-asset-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: contain;
    flex-shrink: 0;
    background: #fff;
}

.tx-asset-icon-fallback {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: 700;
    font-family: var(--font-mono);
    flex-shrink: 0;
}

/* Pagination */
.tx-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0 0;
    margin-top: 12px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 12px;
}

.tx-pagination-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tx-pagination-info {
    font-size: 13px;
    color: var(--text-secondary);
}

.tx-pagination-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.tx-per-page-select {
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0 8px;
    height: 34px;
    font-size: 12px;
    color: var(--text);
    cursor: pointer;
}

.tx-pagination-btns {
    display: flex;
    gap: 8px;
}

.tx-pagination-btns .btn-sm {
    height: 34px;
    padding: 0 14px;
}

.tx-pagination-btns .btn-sm:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

