@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&family=DM+Mono:wght@400;500&display=swap');

/* ── Container ─────────────────────────────────────────── */
.ndb-fp-wrap {
    font-family: 'Poppins', sans-serif;
    width: 100%;
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
}

/* ── History Tabs ───────────────────────────────────────── */
.ndb-fp-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.ndb-fp-tab {
    background: #1a1a1e;
    border: 0.5px solid #2e2e35;
    color: #888;
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    font-weight: 500;
    padding: 7px 14px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.ndb-fp-tab:hover {
    background: #222228;
    color: #ccc;
}

.ndb-fp-tab.active {
    background: rgba(179, 37, 44, 0.12);
    border-color: rgba(179, 37, 44, 0.45);
    color: #e07070;
}

.ndb-fp-tab-latest {
    background: #B3252C;
    color: #fff;
    font-size: 9px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 20px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ── Widget Card ────────────────────────────────────────── */
.ndb-fp-widget {
    background: #0d0d0f;
    border: 0.5px solid #2a2a2e;
    border-radius: 16px;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

/* ── Header ─────────────────────────────────────────────── */
.ndb-fp-header {
    background: #110609;
    border-bottom: 0.5px solid #2a2a2e;
    padding: 20px 24px 18px;
    position: relative;
    overflow: hidden;
}

.ndb-fp-header::after {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(179,37,44,0.16) 0%, transparent 70%);
    pointer-events: none;
}

.ndb-fp-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 10px;
}

.ndb-fp-badge {
    background: #B3252C;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    padding: 3px 9px;
    border-radius: 5px;
    text-transform: uppercase;
}

.ndb-fp-brand-name {
    color: #888;
    font-size: 12px;
    font-weight: 300;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.ndb-fp-title {
    font-size: 21px;
    font-weight: 600;
    color: #f0f0f0;
    margin: 0 0 3px;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.ndb-fp-title span {
    color: #B3252C;
}

.ndb-fp-subtitle {
    font-size: 12px;
    font-weight: 300;
    color: #555;
    margin: 0;
    letter-spacing: 0.04em;
}

.ndb-fp-date-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(179, 37, 44, 0.10);
    border: 0.5px solid rgba(179, 37, 44, 0.32);
    color: #e07070;
    font-size: 12px;
    font-weight: 400;
    padding: 4px 10px;
    border-radius: 20px;
    margin-top: 10px;
}

.ndb-fp-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #B3252C;
    display: inline-block;
    flex-shrink: 0;
}

/* ── Table Wrapper ──────────────────────────────────────── */
.ndb-fp-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ── Table ──────────────────────────────────────────────── */
.ndb-fp-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.ndb-fp-table thead tr {
    border-bottom: 0.5px solid #1e1e22;
}

.ndb-fp-table thead th {
    padding: 10px 16px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #555;
    background: #0d0d0f;
    white-space: nowrap;
}

.ndb-fp-table thead th.col-fund  { width: auto; text-align: left; }
.ndb-fp-table thead th.col-ytd   { width: 90px; text-align: left; color: #666; }
.ndb-fp-table thead th.col-buy   { width: 115px; text-align: right; color: #B3252C; }
.ndb-fp-table thead th.col-sell  { width: 115px; text-align: right; color: #aaa; }

.ndb-fp-table tbody tr {
    border-bottom: 0.5px solid #181820;
    transition: background 0.15s;
}

.ndb-fp-table tbody tr:last-child {
    border-bottom: none;
}

.ndb-fp-table tbody tr:hover {
    background: rgba(179, 37, 44, 0.045);
}

.ndb-fp-table tbody td {
    padding: 14px 16px;
    vertical-align: middle;
}

.ndb-fp-table tbody td.col-fund {
    font-size: 14px;
    color: #d8d8dc;
    font-weight: 400;
}

.ndb-fp-table tbody td.col-ytd {
    text-align: left;
}

.ndb-fp-table tbody td.col-buy,
.ndb-fp-table tbody td.col-sell {
    text-align: right;
    font-family: 'DM Mono', 'Courier New', monospace;
    font-size: 14px;
    font-weight: 500;
}

.ndb-fp-table tbody td.col-buy  { color: #f0f0f0; }
.ndb-fp-table tbody td.col-sell { color: #f0f0f0; }

/* ── YTD Cell ───────────────────────────────────────────── */
.col-ytd {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* reset flex from td – target the cell contents via wrapper */
.ndb-fp-table td.col-ytd {
    white-space: nowrap;
}

.ndb-fp-arrow {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 6px solid #3ecf7a;
    flex-shrink: 0;
    vertical-align: middle;
    margin-right: 4px;
}

.ndb-fp-ytd-val {
    font-family: 'DM Mono', 'Courier New', monospace;
    font-size: 13px;
    color: #3ecf7a;
    font-weight: 500;
    vertical-align: middle;
}

/* ── Footer ─────────────────────────────────────────────── */
.ndb-fp-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 24px;
    border-top: 0.5px solid #1e1e22;
    background: #0a0a0c;
}

.ndb-fp-disclaimer {
    font-size: 11px;
    font-weight: 300;
    color: #444;
    font-style: italic;
}

.ndb-fp-ytd-badge {
    font-size: 11px;
    font-weight: 500;
    color: #3ecf7a;
    background: rgba(62, 207, 122, 0.08);
    border: 0.5px solid rgba(62, 207, 122, 0.2);
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

/* ── Loading State ──────────────────────────────────────── */
.ndb-fp-loading {
    padding: 32px;
    text-align: center;
    color: #555;
    font-size: 14px;
    font-weight: 300;
}

/* ── No Data ────────────────────────────────────────────── */
.ndb-no-data {
    color: #888;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    padding: 20px;
}

/* ── Mobile Responsive ──────────────────────────────────── */
@media (max-width: 600px) {

    .ndb-fp-header {
        padding: 16px 16px 14px;
    }

    .ndb-fp-title {
        font-size: 18px;
    }

    .ndb-fp-table thead th.col-fund { font-size: 10px; }
    .ndb-fp-table thead th.col-buy  { width: 85px; }
    .ndb-fp-table thead th.col-sell { width: 85px; }
    .ndb-fp-table thead th.col-ytd  { width: 62px; }

    .ndb-fp-table tbody td {
        padding: 11px 6px;
    }

    .ndb-fp-table thead th {
        padding: 10px 6px;
    }

    .ndb-fp-table tbody td.col-fund {
        font-size: 12.5px;
    }

    .ndb-fp-table tbody td.col-buy,
    .ndb-fp-table tbody td.col-sell {
        font-size: 13px;
    }

    .ndb-fp-footer {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 16px;
        gap: 6px;
    }

    .ndb-fp-disclaimer {
        font-size: 10px;
    }
}

@media (max-width: 420px) {
    .ndb-fp-brand-name { display: none; }
    .ndb-fp-table tbody td.col-fund { font-size: 12px; }
}
