/* QUICK-START PRESETS (analogous to .fo-presets on /fund-overlap) */
.pb-presets {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.85rem 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.pb-presets-lbl {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    font-weight: 700;
}
.pb-presets-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.5rem;
}
.pb-preset-btn {
    text-align: left;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.55rem 0.75rem;
    cursor: pointer;
    transition: border-color .15s, transform .12s, box-shadow .15s, background .15s;
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-height: 50px;
}
.pb-preset-btn:hover {
    border-color: #d4af37;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(212, 175, 55, 0.18);
}
.pb-preset-btn.active {
    border-color: #d4af37;
    background: linear-gradient(180deg, #fffbf0 0%, #fff5dc 100%);
    box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.4);
}
.pb-preset-name { font-size: 0.84rem; font-weight: 700; color: #1e293b; line-height: 1.2; }
.pb-preset-tag  { font-size: 0.68rem; color: #64748b; line-height: 1.3; }
.pb-preset-clear { background: #f8fafc; }
.pb-preset-clear .pb-preset-name { color: #64748b; }

/* HERO SECTION */
.pb-hero {
    padding: 4rem 0;
    background: radial-gradient(circle at 70% 20%, #2d5a8a 0%, #0f1419 70%);
    overflow: hidden;
    margin-bottom: 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}
.pb-hero-pattern {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    opacity: 0.05;
    background-image: radial-gradient(#d4af37 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
}
.pb-hero-badge {
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.2);
}
.pb-hero-badge-dot {
    width: 8px; height: 8px;
    background: #d4af37; border-radius: 50%;
    box-shadow: 0 0 10px #d4af37;
}
.pb-hero-badge-text {
    color: #d4af37;
    font-size: 0.75rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1px;
}
.pb-hero-title {
    color: #ffffff;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800; line-height: 1.1;
    margin-bottom: 1.5rem; letter-spacing: -1px;
}
.pb-hero-title-accent {
    background: linear-gradient(90deg, #d4af37, #f6e05e);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.pb-hero-subtitle {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.2rem; max-width: 650px;
    line-height: 1.6; margin-bottom: 2rem;
}
.pb-hero-icon-circle {
    width: 48px; height: 48px;
}
.pb-hero-logo-box {
    width: 220px; height: 220px;
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 40px;
    box-shadow: 0 0 60px rgba(212, 175, 55, 0.1);
    position: relative;
}
.pb-hero-logo-bg {
    font-size: 8rem;
    color: rgba(255, 255, 255, 0.15);
}
.pb-hero-logo-fg {
    font-size: 4rem; color: #d4af37;
    filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.5));
}

/* VARIABLES (Matched to Rankings) */
:root {
    --color-primary: #1e3a5f;
    --color-accent: #d4af37;
    --color-success: #22c55e;
    --color-danger: #ef4444;
    --bg-body: #f5f7fa;
    --bg-card: #ffffff;
    --bg-dark: #0f1419;
    --text-primary: #1a1a2e;
    --text-secondary: #64748b;
    --text-light: #ffffff;
    --border-color: #e2e8f0;
    --radius-lg: 12px;
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --navbar-height: 76px;
    accent-color: var(--color-accent);
}

/* COMPACT FILTER BAR (PORTED FROM RANKINGS) */
.filter-bar {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 0.75rem 1.25rem;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.4);
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: flex-end;
}

.filter-section {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.filter-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0;
    white-space: nowrap;
}

.form-select-custom,
.form-control-custom {
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.9rem;
    background-color: #f1f5f9;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
    color: var(--text-primary);
}

.form-select-custom:hover,
.form-control-custom:hover {
    background-color: #e2e8f0;
}

.form-select-custom:focus,
.form-control-custom:focus {
    outline: 2px solid var(--color-primary);
    border-color: transparent;
    background-color: #fff;
}

/* SELECTION CHIPS BAR */
.selection-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    min-height: 45px;
    padding: 0.5rem;
    background: rgba(30, 58, 95, 0.03);
    border-radius: 12px;
    align-items: center;
}

.fund-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-card);
    padding: 0.4rem 0.8rem;
    border-radius: 10px;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
    transition: all 0.2s;
    max-width: 250px;
}

.fund-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border-color: var(--color-accent);
}

.remove-btn {
    color: var(--color-danger);
    cursor: pointer;
    font-size: 0.8rem;
    opacity: 0.6;
}

.remove-btn:hover {
    opacity: 1;
}

/* SEARCH DROPDOWN */
.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 320px;
    max-height: 300px;
    overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    z-index: 1100;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    margin-top: 8px;
    display: none;
}

.search-result-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s;
}

.search-result-item:hover {
    background: #f8fafc;
}

/* METRICS */
.metric-card-modern {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.25rem 0.75rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
    transition: transform 0.2s;
    text-align: center;
}

.metric-card-modern:hover {
    transform: translateY(-2px);
}

.metric-val-modern {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: -0.5px;
    white-space: nowrap;
    display: inline-block;
    transition: font-size 0.1s ease;
}

/* Heatmap Icon Grid */
.heatmap-icon-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    width: 18px;
    height: 18px;
}

.heatmap-icon-grid .square {
    width: 8px;
    height: 8px;
    border-radius: 2px;
}

.bench-chip {
    padding: 4px 10px;
    font-weight: 600;
    font-size: 0.75rem;
    border-radius: 6px;
}

.metric-label-modern {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.25rem;
}

/* CARD CUSTOM */
.card-custom {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.card-header-custom {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: #f8fafc;
    font-weight: 700;
    color: var(--color-primary);
    font-size: 0.9rem;
}

/* UTILS */
.stale-badge {
    font-size: 0.6rem;
    background: var(--color-danger);
    color: white;
    padding: 1px 4px;
    border-radius: 4px;
    font-weight: bold;
}

.fund-chip.stale-fund {
    background: #fffafa;
    border-color: #fecaca;
}

body {
    background-image: radial-gradient(#cbd5e1 1px, transparent 1px);
    background-size: 24px 24px;
    background-color: #f8fafc;
}

.btn-build {
    background: var(--color-accent);
    border: none;
    color: white;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.6rem 2rem;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
    transition: all 0.3s;
}

.btn-build:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(212, 175, 55, 0.4);
    background: #c5a02d;
    color: white;
}

.btn-build:active {
    transform: translateY(0);
}

.btn-build:disabled {
    background: #cbd5e1;
    box-shadow: none;
    cursor: not-allowed;
}
