/* ============================================================
   BOND DETAIL PAGE — Full-Page Layout
   Scoped under body.cardboard .bdp-*
   ============================================================ */

/* ── Page Container ── */
.bdp-page {
    min-height: 100vh;
    padding-top: var(--cb-top-offset);
    background-color: var(--cb-bg-page);
    position: relative;
}

/* ── Ambient Background ── */
.bdp-page::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 600px 400px at 20% 30%, rgba(79, 195, 247, 0.04), transparent 70%),
        radial-gradient(ellipse 500px 350px at 80% 60%, rgba(255, 183, 77, 0.03), transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ── Skeleton Loading ── */
.bdp-skeleton {
    display: grid;
    grid-template-columns: 300px 1fr 300px;
    gap: 24px;
    max-width: var(--cb-max-width, 1400px);
    margin: 0 auto;
    padding: 20px 24px;
    position: relative;
    z-index: 1;
}

.bdp-shimmer {
    background: linear-gradient(90deg,
        var(--cb-bg-surface) 25%,
        var(--cb-bg-elevated) 50%,
        var(--cb-bg-surface) 75%);
    background-size: 200% 100%;
    animation: bdpShimmer 1.5s ease infinite;
    border-radius: var(--cb-radius-md);
}

@keyframes bdpShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.bdp-shimmer-title { height: 28px; width: 70%; margin-bottom: 16px; }
.bdp-shimmer-line { height: 16px; width: 90%; margin-bottom: 12px; }
.bdp-shimmer-line.short { width: 60%; }
.bdp-shimmer-hero { height: 180px; margin-bottom: 20px; }
.bdp-shimmer-chart { height: 120px; margin-bottom: 20px; }
.bdp-shimmer-tabs { height: 40px; width: 60%; margin-bottom: 20px; }
.bdp-shimmer-content { height: 300px; }
.bdp-shimmer-action { height: 140px; margin-bottom: 20px; }
.bdp-shimmer-stats { height: 240px; }

.bdp-skeleton-left,
.bdp-skeleton-right { padding-top: 8px; }

/* ── Error State ── */
.bdp-error {
    text-align: center;
    padding: 80px 24px;
    grid-column: 1 / -1;
}
.bdp-error h2 {
    font-size: 1.5rem;
    color: var(--cb-text-primary);
    margin-bottom: 8px;
}
.bdp-error p {
    color: var(--cb-text-secondary);
    margin-bottom: 24px;
}
.bdp-back-link {
    color: var(--cb-accent-yield);
    text-decoration: none;
    font-size: 0.85rem;
}
.bdp-back-link:hover { text-decoration: underline; }

/* Back + Watchlist Row */
.bdp-top-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bdp-watchlist-inline {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    font-size: 0.65rem;
    font-weight: 600;
    font-family: var(--cb-font);
    background: none;
    border: 1px solid var(--cb-border);
    border-radius: var(--cb-radius-full);
    color: var(--cb-text-muted);
    cursor: pointer;
    transition: all 0.2s;
    text-transform: lowercase;
}
.bdp-watchlist-inline:hover {
    border-color: var(--cb-border-hover);
    color: var(--cb-text-primary);
}
.bdp-watchlist-inline.active {
    color: var(--cb-accent-amber);
    border-color: var(--cb-accent-amber);
}
.bdp-watchlist-inline.active svg { fill: var(--cb-accent-amber); }

/* ── Identity Card (redesigned) ── */
.bdp-id-card {
    position: relative;
    overflow: hidden;
    padding: 18px 16px 14px !important;
}

.bdp-id-accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--cb-accent-yield, #4FC3F7) 0%, rgba(79, 195, 247, 0.1) 100%);
}

/* Category-colored accent on the identity card */
.bdp-id-card[data-category="Government"] .bdp-id-accent {
    background: linear-gradient(90deg, #4FC3F7 0%, rgba(79, 195, 247, 0.08) 100%);
}
.bdp-id-card[data-category="Corporate"] .bdp-id-accent {
    background: linear-gradient(90deg, #66BB6A 0%, rgba(102, 187, 106, 0.08) 100%);
}
.bdp-id-card[data-category="SGB"] .bdp-id-accent {
    background: linear-gradient(90deg, #FFB74D 0%, rgba(255, 183, 77, 0.08) 100%);
}
.bdp-id-card[data-category="Tax-free"] .bdp-id-accent {
    background: linear-gradient(90deg, #CE93D8 0%, rgba(206, 147, 216, 0.08) 100%);
}

.bdp-id-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.bdp-type-badge {
    font-size: 0.55rem;
    font-weight: 500;
    padding: 1px 6px;
    border-radius: 4px;
    background: transparent;
    color: var(--cb-text-dim);
    text-transform: lowercase;
    border: 1px solid rgba(150, 150, 150, 0.2);
    letter-spacing: 0.3px;
    line-height: 1.4;
}

.bdp-pledge-badge {
    font-size: 0.55rem;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 4px;
    background: color-mix(in srgb, var(--cb-success) 12%, transparent);
    color: var(--cb-success);
    text-transform: lowercase;
    border: 1px solid color-mix(in srgb, var(--cb-success) 25%, transparent);
    letter-spacing: 0.3px;
    line-height: 1.4;
}

/* ── Pledge (approved-collateral) card ── */
.bdp-pledge-card .bdp-pledge-status {
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.bdp-pledge-card .bdp-pledge-status.eligible { color: var(--cb-success); }
.bdp-pledge-card .bdp-pledge-status.not-eligible { color: var(--cb-text-secondary); }

.bdp-pledge-card .bdp-pledge-new {
    font-size: 0.55rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 4px;
    vertical-align: middle;
    background: color-mix(in srgb, var(--cb-accent-yield) 15%, transparent);
    color: var(--cb-accent-yield);
}

.bdp-pledge-card .bdp-pledge-warning {
    font-size: 0.68rem;
    line-height: 1.45;
    color: var(--cb-accent-amber, #FFB74D);
    background: color-mix(in srgb, var(--cb-accent-amber, #FFB74D) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--cb-accent-amber, #FFB74D) 22%, transparent);
    border-radius: 6px;
    padding: 7px 9px;
    margin-bottom: 8px;
}

.bdp-pledge-card .bdp-pledge-note {
    font-size: 0.68rem;
    line-height: 1.5;
    color: var(--cb-text-dim);
    margin-top: 8px;
}

/* The order-tied collateral is the card's headline figure — the collateral the
   quantity in the order form would release. Give its value a touch more weight
   and an accent so it reads as the takeaway, not just another detail row. */
.bdp-pledge-card .bdp-pledge-order-row {
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1px solid var(--cb-border, rgba(255, 255, 255, 0.08));
}

.bdp-pledge-card .bdp-pledge-order-row .bdp-side-row-value {
    font-weight: 700;
    color: var(--cb-accent-yield);
}

.bdp-pledge-card .bdp-pledge-calc-hint {
    font-size: 0.6rem;
    color: var(--cb-text-dim);
    margin-top: 4px;
}

.bdp-pledge-card .bdp-pledge-link {
    display: inline-block;
    margin-top: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--cb-accent-yield);
    text-decoration: none;
}

.bdp-pledge-card .bdp-pledge-link:hover { text-decoration: underline; }

.bdp-id-name {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--cb-text-primary);
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.bdp-id-tenure {
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--cb-text-dim);
    margin-top: 3px;
    letter-spacing: 0.02em;
}

.bdp-id-metrics {
    display: flex;
    align-items: center;
    gap: 0;
    margin-top: 14px;
    padding: 10px 0;
    border-top: 1px solid var(--cb-border);
}

.bdp-id-metric {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bdp-id-metric:last-child {
    text-align: right;
    align-items: flex-end;
}

.bdp-id-metric-value {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--cb-text-primary);
    font-variant-numeric: tabular-nums;
}

.bdp-id-metric-value.bdp-id-yield {
    color: var(--cb-accent-yield, #4FC3F7);
}

.bdp-id-metric-label {
    font-size: 0.55rem;
    font-weight: 600;
    color: var(--cb-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.bdp-id-metric-divider {
    width: 1px;
    height: 28px;
    background: var(--cb-border);
    margin: 0 12px;
    flex-shrink: 0;
}

.bdp-id-maturity {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--cb-text-muted);
    margin-top: 8px;
    padding: 4px 10px;
    background: var(--cb-bg-elevated);
    border-radius: var(--cb-radius-full);
    width: fit-content;
    letter-spacing: 0.02em;
}

/* Legacy identity badges (compat) */
.bdp-identity-badges {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    flex-wrap: wrap;
}

/* ── 3-Column Layout (matches livefeed: 300px 1fr 300px) ── */
.bdp-layout {
    display: grid;
    grid-template-columns: 300px 1fr 300px;
    gap: 24px;
    max-width: var(--cb-max-width, 1400px);
    margin: 0 auto;
    padding: 20px 24px 80px;
    position: relative;
    z-index: 1;
    align-items: start;
}

/* ── Left Sidebar ── */
/* Sticky, but NOT height-capped. The left column holds reference cards
   (identity, bond details, pledge) whose combined height can exceed the
   viewport on a laptop — capping it forced a hidden inner scroll that clipped
   the bottom card. Letting the column grow to its content means a tall stack is
   reached by normal page scroll (standard sticky-sidebar behaviour); a short
   stack still sticks in place. */
.bdp-sidebar-left {
    position: sticky;
    top: calc(var(--cb-top-offset) + 16px);
    align-self: start;
    display: flex;
    flex-direction: column;
}

.bdp-top-actions {
    flex-shrink: 0;
    margin-bottom: 12px;
}

.bdp-sidebar-left-scroll {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 0;
}

/* ── Side Card (livefeed-matched) ── */
.bdp-side-card {
    background: color-mix(in srgb, var(--cb-bg-surface) 80%, transparent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--cb-border);
    border-radius: var(--cb-radius-md);
    padding: 16px;
}

.bdp-side-card-title {
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--cb-text-muted);
    text-transform: lowercase;
    letter-spacing: 0.06em;
    margin: 0 0 10px 0;
}

.bdp-side-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    border-bottom: 1px solid var(--cb-border);
}
.bdp-side-row:last-child { border-bottom: none; }
.bdp-side-row-label {
    font-size: 0.68rem;
    color: var(--cb-text-muted);
    text-transform: lowercase;
}
.bdp-side-row-value {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--cb-text-primary);
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 55%;
    text-transform: lowercase;
}
.bdp-side-row-value .bdp-isin-copy {
    text-transform: uppercase;
}

/* Info card */
.bdp-info-card .bdp-info-desc {
    font-size: 0.7rem;
    color: var(--cb-text-secondary);
    line-height: 1.5;
    margin-bottom: 10px;
}

.bdp-info-link {
    color: var(--cb-accent-yield, #4FC3F7);
    text-decoration: none;
    word-break: break-all;
}
.bdp-info-link:hover {
    text-decoration: underline;
}

/* Legacy identity card (now uses .bdp-side-card) */
.bdp-identity-card {
    background: color-mix(in srgb, var(--cb-bg-surface) 80%, transparent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--cb-border);
    border-radius: var(--cb-radius-md);
    padding: 16px;
}

.bdp-bond-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--cb-text-primary);
    text-transform: lowercase;
    line-height: 1.3;
    margin-bottom: 4px;
}

.bdp-bond-series {
    font-size: 0.75rem;
    color: var(--cb-text-secondary);
    margin-bottom: 16px;
    text-transform: lowercase;
}

.bdp-identity-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-top: 1px solid var(--cb-border);
}

.bdp-identity-label {
    font-size: 0.7rem;
    color: var(--cb-text-muted);
    text-transform: lowercase;
}

.bdp-identity-value {
    font-size: 0.75rem;
    color: var(--cb-text-primary);
    font-weight: 600;
}

.bdp-isin-copy {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
}
.bdp-isin-copy:hover { color: var(--cb-accent-yield); }
.bdp-isin-copy svg { opacity: 0.5; }
.bdp-isin-copy:hover svg { opacity: 1; }

.bdp-rating-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: var(--cb-radius-full);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.bdp-rating-badge.sovereign { background: rgba(0, 153, 255, 0.15); color: #0099ff; }
.bdp-rating-badge.aaa { background: rgba(0, 204, 68, 0.15); color: #00cc44; }
.bdp-rating-badge.aa { background: rgba(136, 204, 0, 0.15); color: #88cc00; }
.bdp-rating-badge.a { background: rgba(179, 204, 0, 0.15); color: #b3cc00; }
.bdp-rating-badge.bbb { background: rgba(255, 204, 0, 0.15); color: #ffcc00; }
.bdp-rating-badge.bb { background: rgba(255, 153, 0, 0.15); color: #ff9900; }
.bdp-rating-badge.b { background: rgba(255, 102, 0, 0.15); color: #ff6600; }
.bdp-rating-badge.low { background: rgba(255, 51, 0, 0.15); color: #ff3300; }

/* Section Nav */
.bdp-section-nav {
    background: color-mix(in srgb, var(--cb-bg-surface) 75%, transparent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--cb-border);
    border-radius: var(--cb-radius-md);
    padding: 12px 0;
    overflow: hidden;
}

.bdp-nav-item {
    display: block;
    width: 100%;
    padding: 8px 16px;
    font-size: 0.75rem;
    color: var(--cb-text-secondary);
    text-transform: lowercase;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--cb-font);
    position: relative;
}
.bdp-nav-item:hover { color: var(--cb-text-primary); background: var(--cb-accent-glow); }
.bdp-nav-item.active {
    color: var(--cb-text-primary);
    font-weight: 600;
}
.bdp-nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 16px;
    background: var(--cb-accent-yield);
    border-radius: 1px;
}

/* ── Main Content ── */
.bdp-main {
    min-width: 0; /* prevent grid overflow */
}

/* Hero Zone */
.bdp-hero {
    background: color-mix(in srgb, var(--cb-bg-surface) 75%, transparent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--cb-border);
    border-radius: var(--cb-radius-lg);
    padding: 24px;
    margin-bottom: 16px;
    animation: bdpFadeIn 0.5s var(--cb-ease) both;
}

.bdp-hero-top {
    margin-bottom: 16px;
}

/* ── Glow effects ── */
.bdp-hero-glow-positive {
    border-color: rgba(34, 197, 94, 0.35);
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.08), inset 0 0 30px rgba(34, 197, 94, 0.03);
}
.bdp-hero-glow-negative {
    border-color: rgba(255, 68, 68, 0.35);
    box-shadow: 0 0 20px rgba(255, 68, 68, 0.08), inset 0 0 30px rgba(255, 68, 68, 0.03);
}

/* ── Rates layout: available + last traded side by side ── */
.bdp-hero-rates {
    display: flex;
    align-items: flex-start;
    gap: 24px;
}
.bdp-hero-primary {
    flex: 1;
}
.bdp-hero-divider {
    width: 1px;
    align-self: stretch;
    background: var(--cb-border);
    margin: 4px 0;
}
.bdp-hero-secondary {
    flex: 1;
}
.bdp-hero-rate-label {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--cb-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}

.bdp-hero-yield {
    font-size: 2rem;
    font-weight: 800;
    color: var(--cb-accent-yield);
    line-height: 1;
    letter-spacing: -0.02em;
}
.bdp-hero-no-sellers {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--cb-text-muted, #8899aa);
    letter-spacing: 0;
}
.bdp-hero-disclaimer {
    font-size: 0.6rem;
    color: var(--cb-text-dim, #667788);
    margin-top: 4px;
    letter-spacing: 0;
    font-weight: 400;
}
.bdp-hero-ltp-yield {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--cb-text-primary);
    line-height: 1;
}

.bdp-hero-price {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--cb-text-secondary);
    margin-top: 4px;
}
.bdp-hero-ltp-price {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--cb-text-muted);
    margin-top: 4px;
}

.bdp-hero-trade-time {
    font-size: 0.62rem;
    color: var(--cb-text-dim);
    margin-top: 6px;
}

.bdp-hero-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--cb-radius-full);
    margin-top: 6px;
}
.bdp-hero-change.up { background: rgba(34, 197, 94, 0.1); color: var(--cb-success); }
.bdp-hero-change.down { background: rgba(255, 68, 68, 0.1); color: var(--cb-danger); }

/* ── Warning banner ── */
.bdp-hero-warning {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: var(--cb-radius-sm);
    margin-top: 12px;
}
.bdp-hero-warning.positive {
    background: rgba(34, 197, 94, 0.08);
    color: var(--cb-success);
    border: 1px solid rgba(34, 197, 94, 0.2);
}
.bdp-hero-warning.negative {
    background: rgba(255, 68, 68, 0.08);
    color: var(--cb-danger);
    border: 1px solid rgba(255, 68, 68, 0.2);
}
.bdp-hero-warning.neutral {
    background: color-mix(in srgb, var(--cb-border) 20%, transparent);
    color: var(--cb-text-muted);
    border: 1px solid var(--cb-border);
}

/* ── Market closed badge ── */
.bdp-hero-closed-badge {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--cb-text-dim);
    background: color-mix(in srgb, var(--cb-border) 40%, transparent);
    padding: 3px 10px;
    border-radius: var(--cb-radius-full);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
}

/* ── Trade history (closed state) ── */
.bdp-hero-history {
    margin-top: 16px;
}
.bdp-hero-history-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.bdp-hero-history-title {
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--cb-text-dim);
    text-transform: lowercase;
}
.bdp-hero-history-chart {
    width: 100%;
    height: 60px;
    margin-bottom: 10px;
}

/* Volume bars */
.bdp-hist-bar-row {
    margin-top: 8px;
}
.bdp-hist-bars {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 50px;
}
.bdp-hist-bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    cursor: default;
}
.bdp-hist-bar {
    width: 100%;
    max-width: 28px;
    background: color-mix(in srgb, var(--cb-accent-yield) 30%, transparent);
    border-radius: 3px 3px 0 0;
    transition: background 0.2s;
    min-height: 4px;
}
.bdp-hist-bar-col:hover .bdp-hist-bar {
    background: var(--cb-accent-yield);
}
/* Gap day bars — no trade on that business day */
.bdp-hist-bar-col.gap .bdp-hist-bar {
    background: rgba(255,255,255,0.08);
    border: 1px dashed rgba(255,255,255,0.15);
    border-radius: 2px;
    min-height: 4px;
    height: 4px !important;
}
.bdp-hist-bar-col.gap:hover .bdp-hist-bar {
    background: rgba(255,255,255,0.15);
}
.bdp-hist-bar-col.gap .bdp-hist-bar-label {
    opacity: 0.4;
}
.bdp-hist-bar-label {
    font-size: 0.5rem;
    color: var(--cb-text-dim);
}
.bdp-hist-bar-legend {
    display: flex;
    justify-content: space-between;
    font-size: 0.55rem;
    color: var(--cb-text-dim);
    margin-top: 6px;
}

.bdp-hero-meta {
    display: flex;
    gap: 16px;
    font-size: 0.72rem;
    color: var(--cb-text-muted);
    margin-top: 4px;
}

.bdp-hero-sparkline {
    width: 100%;
    height: 100px;
    margin-top: 8px;
    border-radius: var(--cb-radius-sm);
    overflow: hidden;
}

.bdp-hero-depth {
    margin-top: 12px;
}
.bdp-depth-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.bdp-depth-hint {
    font-size: 0.62rem;
    color: var(--cb-text-dim);
    font-style: italic;
    opacity: 0.7;
}
.bdp-depth-exchange-toggle {
    display: flex;
    gap: 6px;
}
.bdp-depth-ex-btn {
    padding: 4px 14px;
    font-size: 0.68rem;
    font-weight: 600;
    border: 1px solid var(--cb-border);
    border-radius: var(--cb-radius-full);
    background: none;
    color: var(--cb-text-muted);
    cursor: pointer;
    font-family: var(--cb-font);
    transition: all 0.2s;
    text-transform: uppercase;
}
.bdp-depth-ex-btn.active {
    background: var(--cb-bg-elevated);
    color: var(--cb-text-primary);
    border-color: var(--cb-border-hover);
}
.bdp-hero-per-bond {
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--cb-text-dim);
    letter-spacing: 0;
}
.bdp-hero-orderbook {
    gap: 16px;
}
.bdp-hero-orderbook .bdp-orderbook-side {
    border: 2px solid color-mix(in srgb, var(--cb-border) 60%, transparent);
    border-radius: var(--cb-radius);
    background: color-mix(in srgb, var(--cb-bg-surface) 50%, transparent);
    backdrop-filter: blur(8px);
    transition: border-color 0.25s ease;
}
.bdp-hero-orderbook .bdp-orderbook-side.depth-focus {
    border-color: var(--cb-accent-yield, #4FC3F7);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--cb-accent-yield, #4FC3F7) 20%, transparent);
}
.bdp-hero-orderbook .bdp-ob-row {
    padding: 4px 10px;
    font-size: 0.72rem;
}
.bdp-hero-orderbook .bdp-ob-row.clickable {
    cursor: pointer;
    transition: background 0.15s;
}
.bdp-hero-orderbook .bdp-ob-row.clickable:hover {
    background: color-mix(in srgb, var(--cb-accent-yield) 8%, transparent);
}
.bdp-hero-orderbook .bdp-ob-row.depth-clicked {
    background: color-mix(in srgb, var(--cb-accent-yield) 18%, transparent);
}
.bdp-hero-orderbook .bdp-ob-header {
    font-size: 0.65rem;
}
.bdp-hero-orderbook .bdp-orderbook-title {
    font-size: 0.72rem;
    padding: 6px 10px;
}

.bdp-hero-timestamp {
    font-size: 0.68rem;
    color: var(--cb-text-dim);
    margin-top: 8px;
    text-align: right;
}

/* ── Tab Bar ── */
.bdp-tab-bar {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: color-mix(in srgb, var(--cb-bg-surface) 60%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--cb-border);
    border-radius: var(--cb-radius-md);
    margin-bottom: 16px;
    position: sticky;
    top: calc(var(--cb-top-offset) + 8px);
    z-index: 50;
}

.bdp-tab {
    flex: 1;
    padding: 10px 16px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--cb-text-secondary);
    background: none;
    border: none;
    border-radius: var(--cb-radius-sm);
    cursor: pointer;
    transition: all 0.25s var(--cb-ease);
    font-family: var(--cb-font);
    text-transform: lowercase;
}
.bdp-tab:hover { color: var(--cb-text-primary); }
.bdp-tab.active {
    background: color-mix(in srgb, var(--cb-bg-elevated) 90%, transparent);
    color: var(--cb-text-primary);
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* ── Tab Content ── */
.bdp-tab-content {
    animation: bdpFadeIn 0.3s var(--cb-ease) both;
}

.bdp-tab-panel {
    display: none;
}
.bdp-tab-panel.active {
    display: block;
    animation: bdpTabEnter 0.3s var(--cb-ease) both;
}

@keyframes bdpTabEnter {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Section Cards */
.bdp-card {
    background: color-mix(in srgb, var(--cb-bg-surface) 75%, transparent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--cb-border);
    border-radius: var(--cb-radius-md);
    padding: 20px;
    margin-bottom: 16px;
    transition: border-color 0.2s;
}
.bdp-card:hover { border-color: var(--cb-border-hover); }

.bdp-card-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--cb-text-primary);
    text-transform: lowercase;
    margin-bottom: 14px;
    letter-spacing: 0.01em;
}

/* Data Grid (2-col) */
.bdp-data-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.bdp-data-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.bdp-data-label {
    font-size: 0.68rem;
    color: var(--cb-text-muted);
    text-transform: lowercase;
}

.bdp-data-value {
    font-size: 0.82rem;
    color: var(--cb-text-primary);
    font-weight: 600;
}

/* Coupon narrative */
.bdp-coupon-text {
    font-size: 0.78rem;
    color: var(--cb-text-secondary);
    line-height: 1.7;
}
.bdp-coupon-text .hl {
    color: var(--cb-text-primary);
    font-weight: 600;
}

/* Notes */
.bdp-note-item {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--cb-border);
    font-size: 0.75rem;
    color: var(--cb-text-secondary);
    line-height: 1.5;
}
.bdp-note-item:last-child { border-bottom: none; }

.bdp-note-tag {
    display: inline-block;
    padding: 1px 6px;
    border-radius: var(--cb-radius-full);
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 2px;
}
.bdp-note-tag.important { background: rgba(255, 68, 68, 0.12); color: var(--cb-danger); }
.bdp-note-tag.info { background: rgba(79, 195, 247, 0.12); color: var(--cb-accent-yield); }
.bdp-note-tag.warning { background: rgba(255, 183, 77, 0.12); color: var(--cb-accent-amber); }
.bdp-note-tag.tip { background: rgba(34, 197, 94, 0.12); color: var(--cb-success); }

/* ── Performance / Market Data ── */
.bdp-exchange-toggle {
    display: flex;
    gap: 4px;
    margin-bottom: 14px;
    padding: 3px;
    background: var(--cb-bg-page);
    border-radius: var(--cb-radius-sm);
    width: fit-content;
}
.bdp-exchange-btn {
    padding: 5px 14px;
    font-size: 0.7rem;
    font-weight: 600;
    border: none;
    border-radius: calc(var(--cb-radius-sm) - 2px);
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--cb-font);
    background: none;
    color: var(--cb-text-muted);
}
.bdp-exchange-btn.active {
    background: var(--cb-bg-elevated);
    color: var(--cb-text-primary);
}

.bdp-market-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--cb-border);
    border-radius: var(--cb-radius-sm);
    overflow: hidden;
    margin-bottom: 16px;
}
.bdp-market-cell {
    padding: 10px 12px;
    background: var(--cb-bg-surface);
}
.bdp-market-cell .bdp-data-label { margin-bottom: 2px; }
.bdp-market-cell .bdp-data-value { font-size: 0.8rem; }

/* Order Book */
.bdp-orderbook {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.bdp-orderbook-side {
    border: 1px solid var(--cb-border);
    border-radius: var(--cb-radius-sm);
    overflow: hidden;
}

.bdp-orderbook-title {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 8px 10px;
    text-transform: lowercase;
}
.bdp-orderbook-title.bid { color: var(--cb-success); background: rgba(34, 197, 94, 0.06); }
.bdp-orderbook-title.ask { color: var(--cb-danger); background: rgba(255, 68, 68, 0.06); }

.bdp-ob-header,
.bdp-ob-row {
    display: grid;
    grid-template-columns: 1fr 1fr 0.7fr;
    gap: 4px;
    padding: 5px 10px;
    font-size: 0.68rem;
}
.bdp-ob-header {
    color: var(--cb-text-muted);
    border-bottom: 1px solid var(--cb-border);
    font-weight: 500;
}
.bdp-ob-row {
    color: var(--cb-text-secondary);
    position: relative;
}
.bdp-ob-row .bdp-ob-bar {
    position: absolute;
    inset: 0;
    opacity: 0.06;
    border-radius: 2px;
}
.bdp-ob-row.bid .bdp-ob-bar { background: var(--cb-success); }
.bdp-ob-row.ask .bdp-ob-bar { background: var(--cb-danger); }

.bdp-ob-total {
    padding: 6px 10px;
    font-size: 0.65rem;
    color: var(--cb-text-muted);
    border-top: 1px solid var(--cb-border);
}

/* Past Trades */
.bdp-trade-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 0.8fr;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--cb-border);
    font-size: 0.72rem;
    color: var(--cb-text-secondary);
}
.bdp-trade-row:last-child { border-bottom: none; }
.bdp-trade-header {
    color: var(--cb-text-muted);
    font-weight: 500;
    font-size: 0.65rem;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--cb-border);
}

/* Chart Containers */
.bdp-chart-container {
    width: 100%;
    border-radius: var(--cb-radius-sm);
    overflow: visible;
    position: relative;
}

.bdp-chart-container svg {
    display: block;
    width: 100%;
    height: auto;
}

/* Depth Chart */
.bdp-depth-chart {
    height: 160px;
    margin-bottom: 16px;
}

/* Volume Chart */
.bdp-volume-chart {
    height: 120px;
    margin-bottom: 16px;
}

/* ── Analysis Tab ── */

/* Rating Gauge */
.bdp-gauge-container {
    padding: 16px 0;
}

.bdp-gauge-segments {
    display: flex;
    gap: 3px;
    margin-bottom: 12px;
}

.bdp-gauge-seg {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: var(--cb-bg-elevated);
    position: relative;
    transition: all 0.3s var(--cb-ease);
    overflow: hidden;
}

.bdp-gauge-seg.filled {
    animation: bdpGaugeFill 0.4s var(--cb-ease) both;
}

.bdp-gauge-seg.active {
    height: 12px;
    margin-top: -2px;
    box-shadow: 0 0 12px var(--bdp-gauge-color, var(--cb-accent-yield));
    animation: bdpGaugePulse 2s ease infinite;
}

@keyframes bdpGaugeFill {
    from { transform: scaleX(0); transform-origin: left; }
    to   { transform: scaleX(1); transform-origin: left; }
}

@keyframes bdpGaugePulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.7; }
}

.bdp-gauge-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.6rem;
    color: var(--cb-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bdp-gauge-current {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
}
.bdp-gauge-rating {
    font-size: 1.2rem;
    font-weight: 800;
}
.bdp-gauge-agency {
    font-size: 0.7rem;
    color: var(--cb-text-muted);
}

/* Liquidity Score */
.bdp-liquidity-score {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 8px;
}
.bdp-liquidity-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--cb-text-primary);
    line-height: 1;
}
.bdp-liquidity-max {
    font-size: 0.85rem;
    color: var(--cb-text-muted);
}
.bdp-liquidity-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--cb-accent-yield);
    margin-bottom: 8px;
}
.bdp-liquidity-desc {
    font-size: 0.72rem;
    color: var(--cb-text-secondary);
    line-height: 1.5;
}
.bdp-liquidity-bar {
    width: 100%;
    height: 6px;
    background: var(--cb-bg-elevated);
    border-radius: 3px;
    margin: 12px 0;
    overflow: hidden;
}
.bdp-liquidity-fill {
    height: 100%;
    border-radius: 3px;
    background: var(--cb-accent-yield);
    transition: width 0.8s var(--cb-ease);
}

/* Duration Chart */
.bdp-duration-chart {
    height: 160px;
}

/* ── Info Tab ── */

/* Investor list */
.bdp-investor-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--cb-border);
}
.bdp-investor-row:last-child { border-bottom: none; }

.bdp-investor-rank {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--cb-bg-elevated);
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--cb-text-muted);
    flex-shrink: 0;
}

.bdp-investor-name {
    flex: 1;
    font-size: 0.75rem;
    color: var(--cb-text-secondary);
    text-transform: lowercase;
}

.bdp-investor-pct {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--cb-text-primary);
}

/* Donut Chart */
.bdp-donut-container {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 14px;
}
.bdp-donut-chart {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

/* Taxation */
.bdp-tax-grid {
    display: grid;
    gap: 12px;
}
.bdp-tax-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.bdp-tax-label {
    font-size: 0.68rem;
    color: var(--cb-text-muted);
    text-transform: lowercase;
}
.bdp-tax-value {
    font-size: 0.78rem;
    color: var(--cb-text-primary);
    font-weight: 500;
}

/* Company Info */
.bdp-company-desc {
    font-size: 0.78rem;
    color: var(--cb-text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.bdp-company-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* Similar Bonds */
.bdp-similar-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: var(--cb-bg-elevated);
    border-radius: var(--cb-radius-sm);
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}
.bdp-similar-item:hover {
    border-color: var(--cb-border-hover);
    transform: translateY(-1px);
}
.bdp-similar-name {
    font-size: 0.75rem;
    color: var(--cb-text-primary);
    font-weight: 500;
    text-transform: lowercase;
}
.bdp-similar-meta {
    text-align: right;
}
.bdp-similar-yield {
    font-size: 0.78rem;
    color: var(--cb-accent-yield);
    font-weight: 600;
}
.bdp-similar-price {
    font-size: 0.65rem;
    color: var(--cb-text-muted);
}

/* Gold Tracker — sidebar card */
.bdp-gold-header {
    margin-bottom: 10px;
}
.bdp-gold-price-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
}
.bdp-gold-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--cb-text);
}
.bdp-gold-unit {
    font-size: 0.6rem;
    color: var(--cb-text-dim);
    font-weight: 500;
}
.bdp-gold-meta {
    font-size: 0.58rem;
    color: var(--cb-text-muted);
    margin-top: 2px;
}
.bdp-gold-changes {
    display: flex;
    gap: 6px;
}
.bdp-gold-pill {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 4px;
    border-radius: var(--cb-radius-sm);
    background: var(--cb-bg-elevated);
}
.bdp-gold-pill-label {
    font-size: 0.52rem;
    color: var(--cb-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
}
.bdp-gold-pill-value {
    font-size: 0.7rem;
    font-weight: 700;
}
.bdp-gold-pill.positive .bdp-gold-pill-value { color: var(--cb-success); }
.bdp-gold-pill.negative .bdp-gold-pill-value { color: var(--cb-danger); }

/* ── Right Sidebar (Order Panel) ── */
.bdp-sidebar-right {
    position: sticky;
    top: calc(var(--cb-top-offset) + 16px);
    align-self: start;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - var(--cb-top-offset) - 32px);
    overflow: hidden;
}

/* Pinned buy/sell toggle — never scrolls away */
.bdp-order-toggle-pinned {
    flex-shrink: 0;
    margin-bottom: 8px;
}

/* Scrollable order form content */
.bdp-sidebar-right-scroll {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    overscroll-behavior: contain;
    flex: 1;
    min-height: 0;
}
.bdp-sidebar-right-scroll::-webkit-scrollbar { display: none; }

/* Depth card — compact padding */
.bdp-depth-card {
    padding: 12px 14px;
}

/* Order card — compact */
.bdp-order-card {
    padding: 12px 14px;
}
.bdp-order-card .bdp-order-toggle {
    margin-bottom: 10px;
}

/* Exchange + Broker on same row */
.bdp-order-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.bdp-order-meta-row .bdp-order-exchange-toggle {
    margin-bottom: 0;
}
.bdp-order-meta-row .bdp-order-broker-btns {
    display: flex;
    gap: 4px;
}

/* Legacy Action Card (kept for compat) */
.bdp-action-card {
    background: color-mix(in srgb, var(--cb-bg-surface) 80%, transparent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--cb-border);
    border-radius: var(--cb-radius-md);
    padding: 16px;
}

.bdp-yield-price-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--cb-border);
}
.bdp-yield-price-row:last-child { border-bottom: none; }
.bdp-yp-label {
    font-size: 0.68rem;
    color: var(--cb-text-muted);
}
.bdp-yp-value {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--cb-text-primary);
}
.bdp-yp-value.yield { color: var(--cb-accent-yield); }

.bdp-action-buttons {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

.bdp-action-btn {
    flex: 1;
    padding: 10px 0;
    font-size: 0.78rem;
    font-weight: 700;
    border: none;
    border-radius: var(--cb-radius-sm);
    cursor: pointer;
    font-family: var(--cb-font);
    transition: all 0.2s;
    text-transform: lowercase;
}
.bdp-buy-btn {
    background: var(--cb-success);
    color: #000;
}
.bdp-buy-btn:hover { filter: brightness(1.1); }
.bdp-sell-btn {
    background: var(--cb-danger);
    color: #fff;
}
.bdp-sell-btn:hover { filter: brightness(1.1); }
.bdp-watch-btn {
    flex: 0 0 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cb-bg-elevated);
    color: var(--cb-text-secondary);
    border: 1px solid var(--cb-border);
}
.bdp-watch-btn:hover { border-color: var(--cb-border-hover); color: var(--cb-text-primary); }
.bdp-watch-btn.active { color: var(--cb-accent-amber); }
.bdp-watch-btn.active svg { fill: var(--cb-accent-amber); }

/* Quick Stats */
.bdp-stats-card {
    background: color-mix(in srgb, var(--cb-bg-surface) 80%, transparent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--cb-border);
    border-radius: var(--cb-radius-md);
    padding: 16px;
}

.bdp-stats-title {
    font-size: 0.7rem;
    color: var(--cb-text-muted);
    text-transform: lowercase;
    margin-bottom: 12px;
    letter-spacing: 0.03em;
}

.bdp-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    border-bottom: 1px solid var(--cb-border);
}
.bdp-stat-row:last-child { border-bottom: none; }
.bdp-stat-label {
    font-size: 0.7rem;
    color: var(--cb-text-muted);
}
.bdp-stat-value {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--cb-text-primary);
}

/* Cash Flow Timeline */
.bdp-cashflow-timeline {
    height: 80px;
    margin-top: 8px;
}

/* ── Animations ── */
@keyframes bdpFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.bdp-stagger-1 { animation-delay: 0.05s; }
.bdp-stagger-2 { animation-delay: 0.1s; }
.bdp-stagger-3 { animation-delay: 0.15s; }
.bdp-stagger-4 { animation-delay: 0.2s; }

/* ── Mobile Bottom Actions ── */
.bdp-mobile-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    background: color-mix(in srgb, var(--cb-bg-surface) 90%, transparent);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--cb-border);
    z-index: 100;
}

/* ── Responsive ── */

/* <= 1080px: Hide left sidebar (matches livefeed breakpoint) */
@media (max-width: 1080px) {
    .bdp-layout {
        grid-template-columns: 1fr 300px;
        gap: 16px;
        padding: 12px 16px 80px;
    }
    .bdp-sidebar-left { display: none; }
    .bdp-skeleton {
        grid-template-columns: 1fr 300px;
    }
    .bdp-skeleton-left { display: none; }
}

/* <= 768px: Single column */
@media (max-width: 768px) {
    .bdp-layout {
        grid-template-columns: 1fr;
        padding: 12px 12px 80px;
        gap: 12px;
    }
    .bdp-sidebar-left { display: none; }
    .bdp-sidebar-right {
        position: static;
        height: auto;
        max-height: none;
        overflow: visible;
    }
    .bdp-mobile-actions { display: flex !important; }

    .bdp-skeleton {
        grid-template-columns: 1fr;
    }
    .bdp-skeleton-left,
    .bdp-skeleton-right { display: none; }

    .bdp-hero-yield { font-size: 1.8rem; }
    .bdp-hero-sparkline { height: 80px; }
    .bdp-tab-bar { overflow-x: auto; }
    .bdp-tab { white-space: nowrap; min-width: 0; }

    .bdp-orderbook { grid-template-columns: 1fr; }
    .bdp-company-meta { grid-template-columns: 1fr; }
    .bdp-donut-container { flex-direction: column; align-items: flex-start; }
}

/* ── Tooltip (for charts) ── */
.bdp-tooltip {
    position: fixed;
    pointer-events: none;
    background: var(--cb-bg-elevated);
    border: 1px solid var(--cb-border);
    border-radius: var(--cb-radius-sm);
    padding: 6px 10px;
    font-size: 0.68rem;
    color: var(--cb-text-primary);
    white-space: nowrap;
    z-index: 60;
    opacity: 0;
    transition: opacity 0.15s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.bdp-tooltip.visible { opacity: 1; }

/* Back link */
.bdp-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--cb-text-secondary);
    text-decoration: none;
    padding: 8px 0;
    margin-bottom: 8px;
    cursor: pointer;
    background: none;
    border: none;
    font-family: var(--cb-font);
    transition: color 0.2s;
}
.bdp-back-btn:hover { color: var(--cb-text-primary); }

/* Historical Trades */
.bdp-historical-toggle {
    display: flex;
    gap: 4px;
    margin-bottom: 10px;
}
.bdp-historical-btn {
    padding: 4px 10px;
    font-size: 0.65rem;
    font-weight: 600;
    border: 1px solid var(--cb-border);
    border-radius: var(--cb-radius-full);
    background: none;
    color: var(--cb-text-muted);
    cursor: pointer;
    font-family: var(--cb-font);
    transition: all 0.2s;
}
.bdp-historical-btn.active {
    background: var(--cb-bg-elevated);
    color: var(--cb-text-primary);
    border-color: var(--cb-border-hover);
}

/* ══════════════════════════════════════
   ORDER TAB — Inline Order Form
   ══════════════════════════════════════ */

.bdp-order-container {
    padding: 0;
}

/* Buy/Sell Toggle */
.bdp-order-toggle {
    display: flex;
    gap: 0;
    border-radius: var(--cb-radius-lg);
    overflow: hidden;
    border: 1px solid var(--cb-border);
    margin-bottom: 20px;
}

.bdp-order-toggle-btn {
    flex: 1;
    padding: 8px 0;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: lowercase;
    letter-spacing: 0.3px;
    background: var(--cb-bg-base);
    border: none;
    color: var(--cb-text-muted);
    cursor: pointer;
    font-family: var(--cb-font);
    transition: all 0.25s var(--cb-ease);
    position: relative;
}

.bdp-order-toggle-btn[data-order-type="buy"].active {
    background: #0a8f4c;
    color: #fff;
    box-shadow: inset 0 -2px 0 rgba(0,0,0,0.15);
}

.bdp-order-toggle-btn[data-order-type="sell"].active {
    background: #d32f2f;
    color: #fff;
    box-shadow: inset 0 -2px 0 rgba(0,0,0,0.15);
}

/* 2-Column Grid: Form + Depth */
.bdp-order-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 768px) {
    .bdp-order-grid {
        grid-template-columns: 1fr;
    }
}

/* Exchange Toggle (inside order form) */
.bdp-order-exchange-toggle {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
}

.bdp-order-exchange-btn {
    padding: 6px 16px;
    font-size: 0.7rem;
    font-weight: 600;
    border: 1px solid var(--cb-border);
    border-radius: var(--cb-radius-full);
    background: none;
    color: var(--cb-text-muted);
    cursor: pointer;
    font-family: var(--cb-font);
    transition: all 0.2s;
    text-transform: uppercase;
}

.bdp-order-exchange-btn.active {
    background: var(--cb-bg-elevated);
    color: var(--cb-text-primary);
    border-color: var(--cb-border-hover);
}
.bdp-order-exchange-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* Order Fields */
.bdp-order-field {
    margin-bottom: 8px;
}

.bdp-order-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--cb-text-muted);
    margin-bottom: 6px;
    text-transform: lowercase;
}

.bdp-order-input-row {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--cb-border);
    border-radius: var(--cb-radius);
    overflow: hidden;
    transition: border-color 0.2s;
}

.bdp-order-input-row:focus-within {
    border-color: var(--cb-accent-yield, #4FC3F7);
}

.bdp-order-input {
    flex: 1;
    padding: 7px 8px;
    font-size: 0.78rem;
    font-weight: 600;
    font-family: var(--cb-font);
    background: var(--cb-bg-base);
    border: none;
    color: var(--cb-text-primary);
    text-align: center;
    outline: none;
    min-width: 0;
}

.bdp-order-input::placeholder {
    color: var(--cb-text-dim);
    font-weight: 400;
}

.bdp-order-step-btn {
    width: 30px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cb-bg-elevated);
    border: none;
    color: var(--cb-text-muted);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}

.bdp-order-step-btn:hover {
    background: var(--cb-bg-hover);
    color: var(--cb-text-primary);
}

.bdp-order-step-btn:active {
    transform: scale(0.95);
}

/* Quantity Presets */
.bdp-order-presets {
    display: flex;
    gap: 4px;
    margin-top: 6px;
}

.bdp-order-preset {
    padding: 4px 12px;
    font-size: 0.65rem;
    font-weight: 600;
    border: 1px solid var(--cb-border);
    border-radius: var(--cb-radius-full);
    background: none;
    color: var(--cb-text-dim);
    cursor: pointer;
    font-family: var(--cb-font);
    transition: all 0.2s;
}

.bdp-order-preset:hover {
    border-color: var(--cb-border-hover);
    color: var(--cb-text-primary);
    background: var(--cb-bg-elevated);
}

/* Cost Summary */
.bdp-order-cost {
    padding: 6px 0;
    border-top: 1px solid var(--cb-border);
    margin-top: 0;
    margin-bottom: 6px;
}

.bdp-order-cost-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
}

.bdp-order-cost-row span:first-child {
    color: var(--cb-text-muted);
    font-weight: 500;
}

.bdp-order-cost-row span:last-child {
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--cb-text-primary);
}

/* Broker Selection */
.bdp-order-broker {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.bdp-order-broker-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--cb-text-muted);
}

.bdp-order-broker-btns {
    display: flex;
    gap: 6px;
}

.bdp-order-broker-btn {
    padding: 5px 14px;
    font-size: 0.68rem;
    font-weight: 600;
    border: 1px solid var(--cb-border);
    border-radius: var(--cb-radius-full);
    background: none;
    color: var(--cb-text-muted);
    cursor: pointer;
    font-family: var(--cb-font);
    transition: all 0.2s;
}

.bdp-order-broker-btn.active {
    background: var(--cb-bg-elevated);
    color: var(--cb-text-primary);
    border-color: var(--cb-border-hover);
}

.bdp-order-broker-btn.disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* Submit Button */
.bdp-order-submit-btn {
    width: 100%;
    padding: 10px 0;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: lowercase;
    letter-spacing: 0.3px;
    border: none;
    border-radius: var(--cb-radius-lg);
    color: #fff;
    cursor: pointer;
    font-family: var(--cb-font);
    transition: all 0.25s var(--cb-ease);
}

.bdp-order-submit-btn.bdp-order-buy {
    background: #0a8f4c;
}

.bdp-order-submit-btn.bdp-order-buy:hover {
    background: #0b9f55;
    box-shadow: 0 4px 16px rgba(10, 143, 76, 0.3);
}

.bdp-order-submit-btn.bdp-order-sell {
    background: #d32f2f;
}

.bdp-order-submit-btn.bdp-order-sell:hover {
    background: #e53935;
    box-shadow: 0 4px 16px rgba(211, 47, 47, 0.3);
}

.bdp-order-submit-btn:active {
    transform: scale(0.98);
}

/* Disclaimer */
.bdp-order-disclaimer {
    font-size: 0.62rem;
    color: var(--cb-text-dim);
    text-align: center;
    margin-top: 6px;
    line-height: 1.4;
}

/* Broker note */
.bdp-order-broker-note {
    font-size: 0.6rem;
    color: var(--cb-text-dim);
    text-align: center;
    margin-top: 10px;
    opacity: 0.7;
}

/* ── Cost Breakdown ── */
.bdp-order-cost-detail {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px 0;
    border-top: 1px solid var(--cb-border);
    margin-top: 8px;
}

.bdp-cost-line {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
}

.bdp-cost-line.sub {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.5);
    padding-left: 8px;
}

.bdp-cost-line.total {
    font-weight: 700;
    color: var(--cb-text-primary);
    border-top: 1px solid var(--cb-border);
    padding-top: 8px;
    margin-top: 4px;
    font-size: 0.78rem;
}

/* Charges toggle */
.bdp-cost-charges-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    padding: 4px 0;
    user-select: none;
    transition: color 0.15s;
}

.bdp-cost-charges-toggle:hover {
    color: rgba(255, 255, 255, 0.8);
}

.bdp-charges-total {
    margin-left: auto;
    font-variant-numeric: tabular-nums;
}

.bdp-charges-arrow {
    flex-shrink: 0;
    color: var(--cb-text-muted);
    transition: transform 0.3s ease, color 0.2s ease;
    display: flex;
    align-items: center;
}

.bdp-charges-arrow.open {
    transform: rotate(180deg);
    color: var(--cb-text-secondary, rgba(255, 255, 255, 0.7));
}

/* Collapsible charges detail */
.bdp-cost-charges-detail {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease, opacity 0.2s ease;
    opacity: 0;
}

.bdp-cost-charges-detail.open {
    max-height: 200px;
    opacity: 1;
}

/* ── Yield Guide ── */
.bdp-yield-guide {
    padding: 14px;
    border: 1px solid var(--cb-border);
    border-radius: 12px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.02);
}

.bdp-yield-guide-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: lowercase;
    color: var(--cb-text-primary);
    margin-bottom: 3px;
}

.bdp-yield-guide-desc {
    font-size: 0.62rem;
    color: var(--cb-text-dim);
    margin-bottom: 10px;
    line-height: 1.3;
}

.bdp-yield-guide-table {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.bdp-yg-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.58rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--cb-text-dim);
    padding: 0 8px 4px;
    border-bottom: 1px solid var(--cb-border);
    margin-bottom: 2px;
}

.bdp-yg-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.68rem;
    padding: 5px 8px;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.7);
    transition: background 0.15s;
}

.bdp-yg-row:hover {
    background: rgba(255, 255, 255, 0.04);
}

.bdp-yg-row.current {
    background: rgba(255, 255, 255, 0.06);
    font-weight: 700;
    color: var(--cb-text-primary);
}

.bdp-yg-price {
    font-variant-numeric: tabular-nums;
}

.bdp-yg-yield {
    font-variant-numeric: tabular-nums;
    color: var(--cb-accent, #6ec1e4);
}

.bdp-yg-row.current .bdp-yg-yield {
    color: var(--cb-accent, #6ec1e4);
    font-weight: 700;
}

.bdp-yg-loading {
    font-size: 0.62rem;
    color: var(--cb-text-dim);
    text-align: center;
    padding: 8px 0;
}

.bdp-yield-guide-note {
    font-size: 0.55rem;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 10px;
    font-style: italic;
    line-height: 1.3;
    text-align: center;
}

/* Bond Info Summary (below form) */
.bdp-order-bond-info {
    margin-top: 12px;
}

.bdp-order-info-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 0.72rem;
    border-bottom: 1px solid var(--cb-border);
}

.bdp-order-info-row:last-child {
    border-bottom: none;
}

.bdp-order-info-row span:first-child {
    color: var(--cb-text-muted);
}

.bdp-order-info-row span:last-child {
    font-weight: 600;
    color: var(--cb-text-primary);
}

/* ── Market Depth (Order Tab) ── */

.bdp-order-depth {
    font-size: 0.72rem;
}

.bdp-depth-header {
    display: grid;
    grid-template-columns: 1fr 1fr 0.7fr;
    padding: 4px 0;
    font-size: 0.58rem;
    font-weight: 600;
    color: var(--cb-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--cb-border);
}

.bdp-depth-row {
    display: grid;
    grid-template-columns: 1fr 1fr 0.7fr;
    padding: 4px 0;
    font-size: 0.68rem;
    transition: background 0.15s;
}

.bdp-depth-row.empty span {
    color: var(--cb-text-dim);
}

.bdp-depth-row.clickable {
    cursor: pointer;
    border-radius: var(--cb-radius-sm);
}

.bdp-depth-row.clickable:hover {
    background: var(--cb-bg-hover);
}

.bdp-depth-row.ask span:first-child {
    color: #ef5350;
    font-weight: 600;
}

.bdp-depth-row.bid span:first-child {
    color: #4caf50;
    font-weight: 600;
}

/* Last Traded Price divider */
.bdp-depth-ltp {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    margin: 1px 0;
    border-top: 1px dashed var(--cb-border);
    border-bottom: 1px dashed var(--cb-border);
    cursor: pointer;
    transition: background 0.15s;
    border-radius: var(--cb-radius-sm);
}

.bdp-depth-ltp:hover {
    background: var(--cb-bg-hover);
}

.bdp-depth-ltp-price {
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--cb-text-primary);
}

.bdp-depth-ltp-yield {
    font-size: 0.72rem;
    color: var(--cb-accent-yield, #4FC3F7);
    font-weight: 600;
}

.bdp-depth-ltp-tag {
    font-size: 0.55rem;
    font-weight: 700;
    color: var(--cb-text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-left: auto;
}

/* Order Narrative */
.bdp-order-narrative {
    font-size: 0.72rem;
    color: var(--cb-text-muted);
    line-height: 1.5;
}

/* ─── Payments Tab: Coupon Strip ─── */
.bdp-coupon-strip {
    display: flex;
    align-items: center;
    gap: 16px;
}

.bdp-coupon-rate-block {
    display: flex;
    align-items: baseline;
    gap: 3px;
    flex-shrink: 0;
}

.bdp-coupon-rate-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--cb-text-primary);
    line-height: 1;
}

.bdp-coupon-rate-label {
    font-size: 0.65rem;
    color: var(--cb-text-dim);
    font-weight: 500;
}

.bdp-coupon-detail-block {
    font-size: 0.72rem;
    color: var(--cb-text-secondary);
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bdp-coupon-detail-block .hl {
    color: var(--cb-text-primary);
    font-weight: 600;
}

.bdp-coupon-line {
    font-size: 0.7rem;
    color: var(--cb-text-secondary);
}

.bdp-coupon-exdate {
    color: var(--cb-text-dim);
    font-size: 0.65rem;
}

/* ─── Payments Tab: Cash Flow Schedule ─── */
.bdp-cf-card {
    padding-bottom: 8px;
}

.bdp-cf-invest-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-wrap: wrap;
}

.bdp-cf-invest-label {
    font-size: 0.72rem;
    color: var(--cb-text-muted);
    white-space: nowrap;
}

.bdp-cf-invest-at {
    font-size: 0.72rem;
    color: var(--cb-text-dim);
    font-weight: 500;
}

.bdp-cf-invest-input-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 5px 10px;
}

.bdp-cf-invest-prefix {
    font-size: 0.65rem;
    color: var(--cb-text-dim);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bdp-cf-invest-rupee {
    font-size: 0.8rem;
    color: var(--cb-text-dim);
    font-weight: 600;
}

.bdp-cf-invest-input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--cb-text-primary);
    font-size: 0.85rem;
    font-weight: 700;
    width: 80px;
    font-family: inherit;
}

.bdp-cf-qty-input {
    width: 40px;
    font-size: 0.82rem;
    -moz-appearance: textfield;
}

.bdp-cf-qty-input::-webkit-inner-spin-button,
.bdp-cf-qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.bdp-cf-invest-hint {
    font-size: 0.6rem;
    color: var(--cb-text-dim);
    white-space: nowrap;
}

.bdp-cf-summary {
    display: flex;
    gap: 0;
    margin-bottom: 12px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
}

.bdp-cf-summary-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 6px;
    border-right: 1px solid rgba(255,255,255,0.06);
}

.bdp-cf-summary-item:last-child {
    border-right: none;
}

.bdp-cf-summary-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--cb-text-primary);
    line-height: 1.2;
}

.bdp-cf-summary-value.positive {
    color: #4CAF50;
}

.bdp-cf-summary-value.negative {
    color: #ef5350;
}

.bdp-cf-summary-label {
    font-size: 0.6rem;
    color: var(--cb-text-dim);
    margin-top: 2px;
    text-transform: lowercase;
}

.bdp-cf-sgb-note {
    font-size: 0.62rem;
    color: var(--cb-text-dim);
    padding: 6px 10px;
    background: rgba(255, 193, 7, 0.06);
    border: 1px solid rgba(255, 193, 7, 0.12);
    border-radius: 6px;
    margin-bottom: 12px;
    line-height: 1.5;
}

.bdp-cf-next {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    background: rgba(76, 175, 80, 0.06);
    border: 1px solid rgba(76, 175, 80, 0.15);
    border-radius: 8px;
    margin-bottom: 14px;
}

.bdp-cf-next-label {
    font-size: 0.65rem;
    color: #4CAF50;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bdp-cf-next-detail {
    font-size: 0.75rem;
    color: var(--cb-text-primary);
    font-weight: 600;
}

.bdp-cf-next-type {
    font-size: 0.6rem;
    font-weight: 500;
    color: var(--cb-text-dim);
    margin: 0 4px;
}

.bdp-cf-tds-note {
    font-size: 0.62rem;
    color: var(--cb-text-dim);
    padding: 6px 10px;
    background: rgba(255, 152, 0, 0.06);
    border: 1px solid rgba(255, 152, 0, 0.12);
    border-radius: 6px;
    margin-bottom: 12px;
    line-height: 1.5;
}

/* Year rows */
.bdp-cf-years {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.bdp-cf-year {
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.bdp-cf-year:last-child {
    border-bottom: none;
}

.bdp-cf-year.maturity {
    background: rgba(76, 175, 80, 0.03);
    border-radius: 6px;
    margin: 2px 0;
}

.bdp-cf-year-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 4px;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}

.bdp-cf-year-row:hover {
    background: rgba(255,255,255,0.03);
}

.bdp-cf-year-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--cb-text-primary);
    min-width: 36px;
}

.bdp-cf-year-type {
    font-size: 0.65rem;
    color: var(--cb-text-dim);
    flex: 1;
}

.bdp-cf-year-amount {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--cb-text-primary);
    min-width: 60px;
    text-align: right;
}

.bdp-cf-year .maturity .bdp-cf-year-amount {
    color: #4CAF50;
}

.bdp-cf-year-chevron {
    color: var(--cb-text-dim);
    transition: transform 0.2s;
    flex-shrink: 0;
}

.bdp-cf-year.expanded .bdp-cf-year-chevron {
    transform: rotate(180deg);
}

/* Year detail (collapsed by default) */
.bdp-cf-year-detail {
    max-height: 0;
    overflow: hidden;
    padding: 0 4px;
    transition: max-height 0.25s ease-out, padding 0.25s ease-out;
}

.bdp-cf-year.expanded .bdp-cf-year-detail {
    max-height: 800px;
    padding: 0 4px 8px 4px;
    transition: max-height 0.35s ease-in, padding 0.25s ease-in;
}

.bdp-cf-detail-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0 5px 12px;
    border-left: 2px solid rgba(255,255,255,0.08);
    margin-left: 14px;
}

.bdp-cf-detail-date {
    font-size: 0.68rem;
    color: var(--cb-text-muted);
    min-width: 70px;
}

.bdp-cf-detail-badges {
    display: flex;
    gap: 4px;
    flex: 1;
}

.bdp-cf-badge {
    font-size: 0.55rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1px 6px;
    border-radius: 3px;
}

.bdp-cf-badge.coupon {
    background: rgba(79, 195, 247, 0.12);
    color: #4FC3F7;
}

.bdp-cf-badge.principal {
    background: rgba(76, 175, 80, 0.12);
    color: #4CAF50;
}

.bdp-cf-detail-amount {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--cb-text-primary);
    text-align: right;
    min-width: 55px;
}

/* ─── Payments Tab: Tax Rows ─── */
.bdp-tax-rows {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.bdp-tax-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

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

.bdp-tax-row-label {
    font-size: 0.72rem;
    color: var(--cb-text-muted);
}

.bdp-tax-row-value {
    font-size: 0.72rem;
    color: var(--cb-text-primary);
    font-weight: 500;
    text-align: right;
    max-width: 60%;
}

/* ─── Payments Tab: Note Chips ─── */
/* ─── Notes Tab: Bullet list ─── */
.bdp-notes-bullets {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 12px;
}
.bdp-notes-bullet {
    font-size: 0.72rem;
    color: var(--cb-text-secondary);
    line-height: 1.6;
    padding: 7px 0 7px 16px;
    position: relative;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}
.bdp-notes-bullet:last-child { border-bottom: none; }
.bdp-notes-bullet::before {
    content: '';
    position: absolute;
    left: 0;
    top: 13px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--cb-text-dim, #556677);
}

/* ─── Notes Tab: Highlight cards ─── */
.bdp-notes-highlights {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.bdp-notes-highlight {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.72rem;
    color: var(--cb-text-secondary);
    line-height: 1.5;
    padding: 10px 12px;
    border-radius: 8px;
    border-left: 3px solid transparent;
}
.bdp-notes-highlight.warn {
    background: rgba(239, 83, 80, 0.06);
    border-left-color: #ef5350;
}
.bdp-notes-highlight.info {
    background: rgba(79, 195, 247, 0.06);
    border-left-color: var(--cb-accent-yield, #4fc3f7);
}
.bdp-notes-highlight.sebi {
    background: rgba(76, 175, 80, 0.06);
    border-left-color: #4CAF50;
}
.bdp-notes-highlight-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.55rem;
    font-weight: 800;
    margin-top: 1px;
}
.bdp-notes-highlight-icon.warn {
    background: rgba(239, 83, 80, 0.18);
    color: #ef5350;
}
.bdp-notes-highlight-icon.info {
    background: rgba(79, 195, 247, 0.18);
    color: var(--cb-accent-yield, #4fc3f7);
}
.bdp-notes-highlight-icon.sebi {
    background: rgba(76, 175, 80, 0.18);
    color: #4CAF50;
}

/* ─── Notes Tab: Issuer Card ─── */
.bdp-issuer-card {
    overflow: hidden;
}
.bdp-issuer-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.bdp-issuer-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(79,195,247,0.2), rgba(79,195,247,0.08));
    border: 1px solid rgba(79,195,247,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    color: var(--cb-accent-yield, #4fc3f7);
    flex-shrink: 0;
}
.bdp-issuer-name-wrap {
    min-width: 0;
}
.bdp-issuer-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--cb-text-primary, #e8eaed);
    line-height: 1.2;
}
.bdp-issuer-sector {
    font-size: 0.65rem;
    color: var(--cb-text-dim, #667788);
    margin-top: 2px;
}
.bdp-issuer-desc {
    font-size: 0.72rem;
    color: var(--cb-text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.bdp-issuer-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.bdp-issuer-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
    color: var(--cb-text-secondary);
    text-decoration: none;
    padding: 6px 8px;
    border-radius: 6px;
    background: rgba(255,255,255,0.03);
    transition: background 0.15s;
}
.bdp-issuer-detail:hover {
    background: rgba(255,255,255,0.06);
}
.bdp-issuer-detail-icon {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--cb-text-dim, #667788);
    flex-shrink: 0;
}

/* ─── Market Tab: Session Strip ─── */
/* ─── Market Tab: Session Grid ─── */
.bdp-mkt-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: rgba(255,255,255,0.04);
    border-radius: 8px;
    overflow: hidden;
}
.bdp-mkt-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    background: var(--cb-bg-card, #1a1d24);
}
.bdp-mkt-val {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--cb-text-primary);
    line-height: 1.2;
}
.bdp-mkt-lbl {
    font-size: 0.6rem;
    color: var(--cb-text-dim);
    text-transform: lowercase;
}

/* ─── Market Tab: Controls ─── */
.bdp-mkt-controls {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.bdp-mkt-period-toggle, .bdp-mkt-ex-toggle {
    display: flex;
    gap: 2px;
    background: rgba(255,255,255,0.04);
    border-radius: 6px;
    padding: 2px;
}
.bdp-mkt-period-btn, .bdp-mkt-ex-btn {
    font-size: 0.6rem;
    font-weight: 600;
    padding: 3px 8px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--cb-text-dim);
    cursor: pointer;
    transition: all 0.15s;
    text-transform: lowercase;
}
.bdp-mkt-period-btn:hover, .bdp-mkt-ex-btn:hover {
    color: var(--cb-text-secondary);
}
.bdp-mkt-period-btn.active, .bdp-mkt-ex-btn.active {
    background: rgba(255,255,255,0.1);
    color: var(--cb-text-primary);
}

/* ─── Market Tab: Trade Table ─── */
.bdp-mkt-trades {
    margin-top: 12px;
}
.bdp-mkt-trade-hdr {
    display: grid;
    grid-template-columns: 2fr 1.2fr 1.2fr 0.8fr 1.2fr;
    gap: 4px;
    font-size: 0.6rem;
    color: var(--cb-text-dim);
    padding: 4px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    text-transform: lowercase;
}
.bdp-mkt-trade-row {
    display: grid;
    grid-template-columns: 2fr 1.2fr 1.2fr 0.8fr 1.2fr;
    gap: 4px;
    font-size: 0.7rem;
    padding: 6px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    color: var(--cb-text-secondary);
}
.bdp-mkt-trade-row:last-child { border-bottom: none; }
.bdp-mkt-more {
    font-size: 0.6rem;
    color: var(--cb-text-dim);
    text-align: center;
    padding: 8px 0 2px;
}
.bdp-mkt-empty {
    font-size: 0.72rem;
    color: var(--cb-text-dim);
    padding: 16px 0;
    text-align: center;
}

@media (min-width: 500px) {
    .bdp-mkt-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.bdp-card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.bdp-card-header-row .bdp-card-title {
    margin-bottom: 0;
}

/* ─── Ratings Tab: Credit Rating ─── */
/* ─── Ratings Tab: Rating Hero ─── */
.bdp-rt-hero {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}
.bdp-rt-badge {
    font-size: 1.4rem;
    font-weight: 800;
    padding: 10px 16px;
    border-radius: 12px;
    line-height: 1;
    background: rgba(255,255,255,0.04);
    border: 2px solid;
    letter-spacing: -0.02em;
    color: var(--cb-text-primary);
    flex-shrink: 0;
}
.bdp-rt-hero-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.bdp-rt-desc {
    font-size: 0.75rem;
    color: var(--cb-text-secondary);
    font-weight: 500;
}
.bdp-rt-agency {
    font-size: 0.65rem;
    color: var(--cb-text-dim);
}

/* ─── Ratings Tab: Tier Ladder ─── */
.bdp-rt-ladder {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    padding-left: 12px;
}
.bdp-rt-ladder::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background: rgba(255,255,255,0.06);
    border-radius: 1px;
}
.bdp-rt-tier {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    position: relative;
}
.bdp-rt-tier.active {
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    padding: 8px 10px;
    margin: 2px -10px;
}
.bdp-rt-tier-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    z-index: 1;
    transition: all 0.2s;
}
.bdp-rt-tier.active .bdp-rt-tier-dot {
    width: 12px;
    height: 12px;
}
.bdp-rt-tier-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--cb-text-dim);
    min-width: 52px;
    letter-spacing: 0.02em;
}
.bdp-rt-tier-label.active {
    font-size: 0.78rem;
    font-weight: 800;
}
.bdp-rt-tier-desc {
    font-size: 0.65rem;
    color: var(--cb-text-dim);
    opacity: 0.6;
}
.bdp-rt-tier.active .bdp-rt-tier-desc {
    opacity: 1;
    color: var(--cb-text-secondary);
}

/* ─── Ratings Tab: Metrics Cards ─── */
.bdp-rt-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}
.bdp-rt-metric {
    padding: 12px;
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.05);
}
.bdp-rt-metric-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--cb-text-primary);
    line-height: 1;
    margin-bottom: 4px;
}
.bdp-rt-metric-unit {
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--cb-text-muted);
}
.bdp-rt-metric-label {
    font-size: 0.68rem;
    color: var(--cb-text-muted);
    margin-bottom: 2px;
}
.bdp-rt-metric-hint {
    font-size: 0.58rem;
    color: var(--cb-text-dim);
    line-height: 1.3;
}

/* ─── Ratings Tab: Liquidity ─── */
.bdp-rt-liquidity {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 8px;
}
.bdp-rt-liq-score {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1;
}
.bdp-rt-liq-max {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--cb-text-dim);
}
.bdp-rt-liq-tag {
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: lowercase;
    padding: 2px 8px;
    border-radius: 4px;
}
.bdp-rt-liq-bar {
    height: 4px;
    border-radius: 2px;
    background: rgba(255,255,255,0.08);
    overflow: hidden;
    margin-bottom: 6px;
}
.bdp-rt-liq-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.6s ease;
}
.bdp-rt-liq-meta {
    font-size: 0.65rem;
    color: var(--cb-text-dim);
}

/* ─── Keep old metric-row for notes tab issuer ─── */
.bdp-metrics-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.bdp-metric-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.bdp-metric-row:last-child { border-bottom: none; }
.bdp-metric-label {
    font-size: 0.72rem;
    color: var(--cb-text-muted);
}
.bdp-metric-value {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--cb-text-primary);
}

/* Kite notes in the narrow desktop order sidebar: icon beside the text
   instead of wrapping onto its own row, so the buy button stays above the
   fold on 720px tall laptops. */
.bdp-order-card .kite-note {
    display: grid;
    grid-template-columns: 15px 1fr;
    column-gap: 9px;
    row-gap: 4px;
    align-items: start;
    padding: 10px 12px;
    margin-bottom: 12px;
}
.bdp-order-card .kite-note.is-hidden { display: none; }
.bdp-order-card .kite-note > svg { margin-top: 2px; }
.bdp-order-card .kite-note > a { grid-column: 2; }
