/* --- BioScouter App 2.2 Global Styles --- */

:root {
    --bg-color: #000000;
    --card-bg: #121212;
    /* Deep Grey */
    --phase-1-color: #38bdf8;
    --phase-2-color: #fbbf24;
    --phase-3-color: #4ade80;
    --phase-approved-color: #f472b6;

    /* Modern Lighter Phase Backgrounds (approx 15% opacity of original for professional look) */
    --phase-1-bg: rgba(56, 189, 248, 0.15);
    --phase-2-bg: rgba(251, 191, 36, 0.15);
    --phase-3-bg: rgba(74, 222, 128, 0.15);
    --phase-approved-bg: rgba(244, 114, 182, 0.15);
    --surface-light: #1e1e1e;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-color: #3b82f6;
    /* Blue like Investing.com/Twitter */
    --accent-glow: rgba(59, 130, 246, 0.2);
    --border-color: #2d2d2d;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --nav-height: 60px;
    --header-height: 98px;

    /* Membership Tier Colors */
    --membership-basic: #94a3b8;
    --membership-plus: #3b82f6;
    --membership-premium: #f59e0b;
}

/* --- Menu Component Styles --- */
.menu-section {
    margin-bottom: 24px;
}

.menu-section-label {
    font-size: 0.7rem;
    font-weight: 800;
    color: #475569;
    margin-bottom: 8px;
    margin-left: 4px;
    letter-spacing: 0.05em;
}

.menu-profile-card {
    background: linear-gradient(135deg, #1e1e1e 0%, #0f172a 100%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.menu-profile-info {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.avatar-large {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: #1a1a1a;
}

.menu-manage-btn {
    width: 100%;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #60a5fa;
    padding: 10px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.menu-manage-btn:active {
    background: rgba(59, 130, 246, 0.2);
    transform: scale(0.98);
}

.menu-group {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 24px;
}

.menu-item {
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item:active {
    background: rgba(255, 255, 255, 0.05);
}

.menu-item-left {
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 600;
    font-size: 0.95rem;
    color: #e2e8f0;
}

.menu-icon {
    width: 20px;
    height: 20px;
    color: #94a3b8;
}

.menu-chevron {
    width: 16px;
    height: 16px;
    color: #475569;
}

.tier-badge {
    font-size: 0.6rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    color: white;
}

.tier-badge.basic {
    background: var(--membership-basic);
}

.tier-badge.pro {
    background: var(--membership-plus);
}

.tier-badge.elite {
    background: var(--membership-premium);
}

.logout-item:active {
    background: rgba(239, 68, 68, 0.05);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 16px;
    /* Base size for readability */
    overflow-x: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
}

/* --- App Container (Mobile Simulator on Desktop) --- */
.app-container {
    width: 100%;
    max-width: 480px;
    height: 100%;
    margin: 0 auto;
    background: #000;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    position: relative;
    overscroll-behavior-y: contain;
    /* Prevent scroll chaining */
    border-left: 1px solid #222;
    border-right: 1px solid #222;
}

/* --- App Header (Sticky) --- */
.app-header {
    height: var(--header-height);
    background: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 900;
    background: linear-gradient(135deg, #fff 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    cursor: pointer;
    letter-spacing: -0.5px;
    text-shadow: 0 10px 20px rgba(59, 130, 246, 0.2);
}

.btn-icon {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 4px;
}

.avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.2s;
    background: #1a1a1a;
}

.avatar-small:hover {
    transform: scale(1.05);
    border-color: var(--accent-color);
}

/* --- User Dropdown Menu --- */
.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 220px;
    background: rgba(18, 18, 18, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 10000;
    overflow: hidden;
    animation: fadeIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-header {
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
}

.dropdown-item {
    padding: 12px 16px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* --- View Tabs (SPA) --- */
.view-tab {
    flex: 1;
    overflow-y: visible;
    padding-bottom: calc(var(--nav-height) + 20px);
    /* Space for Bottom Nav */
    display: none;
    animation: fadeIn 0.2s ease-out;
}

.view-tab.active {
    display: block;
    height: auto;
    min-height: 100%;
}

/* Home News Section Limit */
#news-list {
    max-height: 250px;
    overflow-y: auto;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Bottom Navigation --- */
.bottom-nav {
    height: var(--nav-height);
    background: #0d0d0d;
    border-top: 1px solid var(--border-color);
    position: absolute;
    bottom: 0;
    width: 100%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 6000;
    /* Extremely high to stay above overlays */
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 10px;
    cursor: pointer;
    width: 100%;
    height: 100%;
    transition: color 0.1s;
}

.nav-item .icon {
    width: 18px;
    /* Reduced by ~30% */
    height: 18px;
    margin-bottom: 3px;
    opacity: 0.6;
}

.nav-item.active {
    color: var(--accent-color);
}

.nav-item.active .icon {
    opacity: 1;
    color: var(--accent-color);
    transform: translateY(-2px);
}

/* --- Components --- */

/* Horizontal Scroll Container */
.horizontal-scroll-container {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding: 0 16px 16px 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.horizontal-scroll-container::-webkit-scrollbar {
    display: none;
}

.section-compact {
    margin-bottom: 24px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.section-header-app {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px 12px 16px;
}

.section-header-app h3 {
    font-size: 1rem;
    font-weight: 700;
}

.view-all-link {
    font-size: 0.8rem;
    color: var(--accent-color);
    cursor: pointer;
}

/* Cards */
.insider-summary-card {
    min-width: 140px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
}

.insider-summary-card.buy {
    border-left: 3px solid var(--success);
}

.insider-summary-card.sell {
    border-left: 3px solid var(--danger);
}

/* Watchlist List Style */
.watchlist-list-app {
    display: flex;
    flex-direction: column;
}

.watchlist-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: var(--bg-color);
}

.watchlist-ticker {
    font-weight: 700;
    font-size: 1rem;
    display: block;
}

.watchlist-name {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.watchlist-price-block {
    text-align: right;
}

.watchlist-row-price {
    font-weight: 600;
    font-size: 1rem;
}

.watchlist-row-change {
    font-size: 0.8rem;
}

/* --- Search Page --- */
.search-page-header {
    padding: 12px 16px;
    background: var(--bg-color);
}

.app-search-input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    background: var(--surface-light);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
}

/* Search Enhancements */
.highlight {
    color: var(--accent-color);
    font-weight: 900;
}

.search-alpha-header {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 16px;
    margin-top: 8px;
    border-bottom: 1px solid var(--border-color);
}

.no-results {
    padding: 20px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.app-search-results {
    background: rgba(30, 30, 30, 0.98);
    backdrop-filter: blur(15px);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-top: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    z-index: 10000;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 400px;
    overflow-y: auto;
}

.search-item {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: background 0.2s;
}

.search-item:active {
    background: rgba(255, 255, 255, 0.1);
}

.item-ticker {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1rem;
}

.item-name {
    font-size: 0.8rem;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 250px;
}

.suggestion-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.suggestion-chips span {
    background: var(--surface-light);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
}

/* --- Alerts Page --- */
.alert-center-layout {
    padding: 16px;
}

.alert-tabs {
    display: flex;
    background: var(--surface-light);
    border-radius: 10px;
    padding: 2px;
    margin-bottom: 15px;
    align-items: center;
    justify-content: center;
    min-height: 48px;
}

.alert-tab-btn {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 10px;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 100%;
}

.alert-tab-btn.active {
    background: var(--card-bg);
    color: white;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.alert-tab-btn i,
.alert-tab-btn svg {
    width: 18px;
    height: 18px;
}

.alert-content-block {
    display: none;
}

.alert-content-block.active {
    display: block;
    animation: fadeIn 0.2s;
}

.create-alert-form label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    margin-top: 20px;
}

.option-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* --- Watchlist Grid (Search Page) --- */
.watchlist-grid-scroll {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding: 0 4px 12px 4px;
    scrollbar-width: none;
}

.watchlist-grid-scroll::-webkit-scrollbar {
    display: none;
}

.watchlist-grid-scroll .watchlist-item-app {
    min-width: calc(33.33% - 6px);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    aspect-ratio: 2.2/1;
    cursor: pointer;
    transition: transform 0.1s;
}

.watchlist-grid-scroll .watchlist-item-app:active {
    transform: scale(0.95);
}

.watchlist-grid-scroll .ticker-text {
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.watchlist-grid-scroll .price-text {
    font-size: 0.85rem;
    font-weight: 700;
}

/* --- Scope Card Improvements --- */
.scope-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-secondary);
}

.scope-card i {
    display: block;
    margin-bottom: 6px;
    width: 20px;
    height: 20px;
    margin-left: auto;
    margin-right: auto;
}

.scope-card.selected {
    background: rgba(59, 130, 246, 0.1) !important;
    border-color: var(--accent-color) !important;
    color: var(--accent-color) !important;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

.app-select,
.app-input-small {
    width: 100%;
    padding: 12px;
    background: var(--surface-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
}

/* --- Insider Sentiment & Pipeline Filters --- */
.insider-sentiment-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
    cursor: pointer;
    transition: background 0.2s;
}

.insider-sentiment-card:hover {
    background: rgba(255, 255, 255, 0.05);
}

.sentiment-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sentiment-bar-container {
    height: 6px;
    background: rgba(255, 0, 0, 0.4);
    /* Base Sell Color */
    border-radius: 3px;
    overflow: hidden;
    display: flex;
}

.sentiment-bar-fill {
    height: 100%;
    background: var(--success);
    /* Buy Color */
    transition: width 0.4s ease-out;
}

.pipeline-filter-container {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    padding: 0 4px;
}

.filter-text-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.filter-text-btn.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

/* Interest Bar Gauge */
.interest-gauge-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.interest-bar-bg {
    width: 60px;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    overflow: hidden;
}

.interest-bar-fill {
    height: 100%;
    transition: width 0.3s ease;
}

.btn-primary-app {
    width: 100%;
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    margin-top: 30px;
    font-size: 1rem;
}

/* --- Stock Detail Overlay --- */
.view-overlay {
    position: absolute;
    /* Changed from fixed for better container compatibility */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    background: var(--bg-color);
    z-index: 10100;
    /* Above header and search results */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-bottom: var(--nav-height);
    /* Ensure nav area is respected */
}

.detail-header-sticky {
    height: var(--header-height);
    background: rgba(18, 18, 18, 0.95);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 8px;
    flex-shrink: 0;
}

.detail-title-trunc {
    flex: 1;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 12px;
}

.btn-back-app {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: white;
    padding: 0 10px;
}

.detail-scroll-content {
    flex: 1;
    overflow-y: auto !important;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 16px;
    padding-bottom: 120px;
    /* Buffer for bottom nav */
    background: var(--bg-color);
    overscroll-behavior: contain;
    height: calc(100% - var(--header-height));
}

.detail-hero {
    margin-bottom: 20px;
}

.detail-hero h1 {
    font-size: 2.5rem;
    margin: 0;
}

.tabs-app-scroll {
    display: flex;
    gap: 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.tabs-app-scroll .tab-item {
    padding: 10px 0;
    white-space: nowrap;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.tabs-app-scroll .tab-item.active {
    color: var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
}

/* Utility Helpers */
.hidden {
    display: none !important;
}

.card-app {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 16px;
}

.text-success {
    color: var(--success);
}

.text-red {
    color: var(--danger);
}

/* --- Watchlist Edit Modal --- */
.edit-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 5000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    animation: fadeIn 0.2s;
}

.edit-modal-content {
    background: var(--surface-light);
    width: 100%;
    max-width: 440px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    max-height: 80vh;
}

.edit-modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.edit-list-container {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.edit-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    margin-bottom: 8px;
    border-radius: 12px;
    border: 1px solid transparent;
    cursor: grab;
}

.edit-list-item:active {
    cursor: grabbing;
}

.edit-list-item .drag-handle {
    color: var(--text-secondary);
    margin-right: 12px;
}

.btn-remove-item {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
}

.search-page-header h1 {
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.05em;
    transform: scale(1);
    transition: transform 0.3s ease;
}

.search-page-header h1:hover {
    transform: scale(1.05);
}

.modal-content-professional {
    background: linear-gradient(145deg, #111827, #0b0f19);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    width: 90%;
    max-width: 650px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

.alert-ui-layout {
    display: flex;
    gap: 25px;
    margin-top: 20px;
}

.alert-sidebar {
    flex: 0 0 160px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding-right: 15px;
}

.category-item {
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    color: #94a3b8;
    transition: all 0.2s;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.category-item.active {
    background: rgba(6, 182, 212, 0.1);
    color: #22d3ee;
    font-weight: 600;
}

.category-item:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.alert-main-content {
    flex: 1;
}

.rule-builder-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.ticker-pill-box {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    min-height: 40px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ticker-pill {
    background: #0ea5e9;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.ticker-pill .remove {
    cursor: pointer;
    font-weight: bold;
    opacity: 0.7;
}

.ticker-pill .remove:hover {
    opacity: 1;
}

.btn-premium-action {
    background: linear-gradient(90deg, #06b6d4, #3b82f6);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-top: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-premium-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(6, 182, 212, 0.4);
}

.rule-item-professional {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 10px;
}

.rule-badge {
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 700;
}

.badge-active {
    background: rgba(34, 211, 238, 0.1);
    color: #22d3ee;
}

.badge-inactive {
    background: rgba(148, 163, 184, 0.1);
    color: #94a3b8;
}

/* Catalyst Card Styling */
.catalyst-card-app {
    flex: 0 0 auto;
    width: 240px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px;
    margin-right: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: transform 0.2s, background 0.2s;
}

.catalyst-card-app:active {
    transform: scale(0.97);
    background: rgba(255, 255, 255, 0.08);
}

.catalyst-card-app.insider-buy-glow,
.insider-item.insider-buy-glow {
    border: 1px solid rgba(255, 215, 0, 0.6) !important;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.25) !important;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 215, 0, 0.05)) !important;
}

.catalyst-card-modal.insider-buy-glow {
    border: 1px solid rgba(255, 215, 0, 0.5) !important;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.15) !important;
}

.cat-date {
    font-size: 0.75rem;
    color: var(--accent-primary);
    font-weight: 600;
}

.cat-ticker {
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
}

.cat-stage {
    align-self: flex-start;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
}

.cat-title {
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cat-drug {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: auto;
}

/* Timeline & Calendar View Styles */
.timeline-item-app {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    position: relative;
}

.timeline-item-app::before {
    content: "";
    position: absolute;
    left: 20px;
    top: 40px;
    bottom: -20px;
    width: 2px;
    background: rgba(255, 255, 255, 0.05);
}

.timeline-item-app:last-child::before {
    display: none;
}

.timeline-date {
    flex: 0 0 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 4px;
}

.timeline-date .month {
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 800;
    color: var(--accent-color);
}

.timeline-date .year {
    font-size: 0.9rem;
    font-weight: 700;
    opacity: 0.7;
}

.timeline-content-card {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.2s;
    cursor: pointer;
}

.timeline-content-card:active {
    transform: scale(0.98);
    background: rgba(255, 255, 255, 0.06);
}

.card-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.ticker-badge {
    font-weight: 900;
    font-size: 1rem;
    color: #fff;
}

.type-badge {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
}

.type-badge.pdufa {
    background: rgba(22, 163, 74, 0.2);
    color: #4ade80;
}

.type-badge.phase-3 {
    background: rgba(37, 99, 235, 0.2);
    color: #60a5fa;
}

.type-badge.results {
    background: rgba(234, 179, 8, 0.2);
    color: #facc15;
}

.drug-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 4px;
}

.milestone-title {
    font-size: 0.8rem;
    line-height: 1.4;
    opacity: 0.9;
}

.source-tag {
    margin-top: 12px;
    font-size: 0.65rem;
    opacity: 0.5;
    display: flex;
    justify-content: space-between;
}

.source-tag span {
    color: #a78bfa;
    font-weight: 700;
}

.filter-chip {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.filter-chip.active {
    background: var(--accent-color);
    color: #000;
    border-color: var(--accent-color);
}

/* Agent Differentiation Styles */
.agent-badge {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.agent-new .agent-badge {
    background: rgba(167, 139, 250, 0.15);
    /* Purple tint for AI */
    color: #c4b5fd;
    border-color: rgba(167, 139, 250, 0.3);
}

.agent-new {
    border-left: 3px solid #a78bfa !important;
}

.agent-legacy {
    border-left: 3px solid rgba(255, 255, 255, 0.2) !important;
}

/* Tooltip Styles */
.tooltip {
    position: relative;
    display: inline-block;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-color);
    width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 50%;
    font-size: 0.7rem;
    margin-left: 4px;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 100;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.75rem;
    font-weight: 400;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

.refresh-time {
    font-size: 0.7rem;
    color: var(--text-secondary);
    opacity: 0.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

header {
    margin-bottom: 40px;
    text-align: center;
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.subtitle {
    color: var(--text-secondary);
}

#dashboard-view {
    min-height: 80vh;
    /* Ensure enough space for search dropdown */
    padding-bottom: 200px;
    /* Extra bottom padding */
}

/* Search Bar & Autocomplete */
.search-container {
    position: relative;
    /* For absolute positioning of results */
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

input[type="text"] {
    flex: 1;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 12px 16px;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
}

#search-results {
    position: absolute;
    top: 50px;
    left: 0;
    width: 100%;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 9999;
    display: none;
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.8);
}

.search-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
}

.search-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.search-item .item-ticker {
    font-weight: 700;
    color: var(--accent-color);
    margin-right: 10px;
}

.search-item .item-name {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

button {
    background: var(--accent-color);
    color: #000;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

button:hover {
    opacity: 0.9;
}

/* Watchlist */
.watchlist {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
    gap: 16px;
}

.stock-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 10px 14px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.stock-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-color);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.1);
}

.stock-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.ticker {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-color);
}

.price {
    font-size: 1.1rem;
    font-weight: 600;
}

.market-size-text {
    font-weight: bold;
    color: var(--accent-color);
}

.view-full-btn {
    display: inline-block;
    padding: 6px 12px;
    margin: 10px 0;
    font-size: 0.85rem;
    color: white;
    background: var(--accent-color);
    border-radius: 6px;
    text-decoration: none;
    transition: opacity 0.2s;
    font-weight: 500;
}

.view-full-btn:hover {
    opacity: 0.8;
}

/* Detail View */
#detail-view {
    display: none;
    /* Hidden by default */
}

.back-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    margin-bottom: 20px;
    padding: 8px 16px;
}

#detail-ticker {
    font-size: clamp(2rem, 8vw, 3.5rem);
    line-height: 1.1;
    margin-bottom: 8px;
}

#detail-company {
    font-size: clamp(1rem, 3vw, 1.25rem);
}

.section {
    margin-bottom: 32px;
}

.section-title {
    font-size: clamp(1rem, 4vw, 1.25rem);
    font-weight: 600;
    margin-bottom: 16px;
    border-left: 4px solid var(--accent-color);
    padding-left: 12px;
}

.pipeline-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 12px;
}

.pipeline-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.pipeline-content {
    font-size: 0.95rem;
}

.ownership-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}


/* Tabs */
.tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
}

.tabs::-webkit-scrollbar {
    display: none;
}

.dashboard-tabs {
    margin-bottom: 30px;
    justify-content: center;
    border-bottom: none;
    gap: 30px;
}

.dashboard-tabs .tab-item {
    font-size: 1.1rem;
    padding: 10px 0;
}

.tab-item {
    padding: 10px 20px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    flex-shrink: 0;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.tab-item:hover {
    color: var(--text-primary);
}

.tab-item.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Donut Chart */
.donut-chart {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: conic-gradient(var(--border-color) 0% 100%);
    position: relative;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
}

.donut-chart::before {
    content: "";
    position: absolute;
    inset: 40px;
    /* Thickness of donut */
    border-radius: 50%;
    background: var(--card-bg);
    z-index: 10;
}

/* Insider Trading Table */
.insider-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.insider-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-buy {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.badge-sell {
    background: rgba(239, 68, 68, 0.2);
    color: #fff;
}

.badge-neutral {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

.back-btn-small {
    padding: 6px 12px;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
}

.back-btn-small:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.btn-small {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 4px 10px;
    font-size: 0.7rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-small:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

/* Filter & Sort Controls */
.filter-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.03);
    padding: 10px;
    border-radius: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--accent-color);
    color: #000;
    border-color: var(--accent-color);
}

.toggle-label {
    display: flex;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.toggle-label input {
    margin-right: 6px;
}


/* Market Size & Interest Badge */
.pipeline-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.market-badge {
    padding: 4px 8px;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: var(--accent-color);
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.interest-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: #fb923c;
    /* Orange for Fire */
}

/* Tooltip for Interest */
.interest-bar {
    width: 50px;
    height: 4px;
    background: #334155;
    border-radius: 2px;
    overflow: hidden;
    margin-left: 6px;
}

.interest-fill {
    height: 100%;
    background: linear-gradient(90deg, #fbbf24, #ef4444);
    /* Fire gradient */
}

/* Insider Highlight Grid */
.insider-summary-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.insider-summary-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 4px solid #444;
}

.insider-summary-card:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.insider-summary-card.buy {
    border-left-color: var(--success);
}

.insider-summary-card.sell {
    border-left-color: #ef4444;
}

.insider-summary-card .ticker-tag {
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--accent-color);
    display: block;
    margin-bottom: 4px;
}

.insider-summary-card .value-tag {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-primary);
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--card-bg);
    width: 90%;
    max-width: 1000px;
    max-height: 80vh;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: fadeIn 0.3s;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.3rem;
}

.close-btn {
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.table-container {
    overflow-x: auto;
    padding: 0 20px 20px 20px;
}

.insider-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 0.9rem;
}

.insider-table th {
    text-align: left;
    padding: 12px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    background: rgba(255, 255, 255, 0.02);
}

.insider-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.insider-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

@media (max-width: 768px) {
    .insider-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .container {
        padding: 0;
    }

    .watchlist {
        grid-template-columns: 1fr;
    }

    .detail-info-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px !important;
    }

    .info-item {
        font-size: 0.9rem !important;
    }

    .insider-item {
        flex-direction: column;
        gap: 12px;
    }

    .insider-item>div:nth-child(2) {
        text-align: left !important;
        width: 100%;
    }
}

.detail-info-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.info-item {
    font-size: clamp(0.85rem, 2vw, 1rem);
    display: flex;
    align-items: center;
    gap: 5px;
}

html,
body {
    overflow-x: hidden;
    width: 100%;
}

/* ========== Clinical Pipeline Module ========== */
.pipeline-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.pipeline-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.pipeline-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.pipeline-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.pipeline-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
}

/* Timeline Progress Bar */
.timeline-container {
    margin-top: 12px;
}

.timeline-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
}

.timeline-progress {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #38bdf8);
    border-radius: 4px;
    transition: width 0.5s ease-out;
}

.timeline-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-secondary);
}

/* Pipeline Phase Blocks (Square Style) */
.phase-block {
    display: inline-block;
}

.phase-approved {
    color: #f472b6;
    border: 1px solid rgba(244, 114, 182, 0.3);
}

/* Simplified Grey Badges */
.grey-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #2d2d2d;
    color: #a0a0a0;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Catalyst Star Styling */
.catalyst-star {
    color: #38bdf8;
    margin-right: 4px;
    font-weight: bold;
}

.catalyst-highlight {
    color: #38bdf8;
    font-weight: 700;
}

/* --- Mobile-First Layout Lock --- */
/* --- Mobile-First Layout Lock (Unified above) --- */

/* Phase Block Redesigned */
.phase-block {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
    /* Reduced by ~20% */
    font-weight: 400;
    /* No bold */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

.phase-3 {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.phase-2 {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.phase-1 {
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
}

.phase-approved {
    background: rgba(244, 114, 182, 0.2);
    color: #f472b6;
}

/* --- Existing Media Queries --- */
@media (max-width: 600px) {
    .app-container {
        max-width: 100%;
        border: none;
        box-shadow: none;
    }

    .detail-hero h1 {
        font-size: 1.8rem;
    }

    .pipeline-item {
        padding: 12px;
    }

    .pipeline-title {
        font-size: 0.95rem;
    }

    .pipeline-desc {
        font-size: 0.8rem;
    }
}

.interest-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.interest-high {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.interest-medium {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.interest-low {
    background: rgba(107, 114, 128, 0.2);
    color: #9ca3af;
}

.asset-badge {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 800;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
    white-space: nowrap;
    text-transform: uppercase;
}

.interest-bar {
    display: inline-flex;
    width: 60px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-left: 8px;
    overflow: hidden;
    vertical-align: middle;
}

.interest-fill {
    height: 100%;
    background: var(--accent-color);
    border-radius: 2px;
}

.pipeline-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.market-badge {
    color: var(--accent-color);
    font-weight: 500;
}

/* ========== Alert UI Layout ========== */
#alert-view {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    animation: fadeIn 0.3s;
}

.alert-ui-layout {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

.alert-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    height: fit-content;
}

.alert-main-content {
    flex-grow: 1;
    min-width: 0;
}

.category-item {
    padding: 12px 16px;
    margin-bottom: 5px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #94a3b8;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-item:hover {
    background: rgba(255, 255, 255, 0.04);
    color: white;
}

.category-item.active {
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
    font-weight: 600;
}

.rule-builder-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 30px;
}

.rule-group-v2 {
    margin-bottom: 20px;
    animation: slideUp 0.3s;
}

.rule-item-professional {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 12px;
    transition: transform 0.2s;
}

.rule-item-professional:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.05);
}

.rule-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-active {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.ticker-pill-box {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.ticker-pill {
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.2);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.ticker-pill .remove {
    cursor: pointer;
    font-weight: bold;
    opacity: 0.7;
}

.ticker-pill .remove:hover {
    opacity: 1;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pulse animation for ongoing trials */
/* Watchlist Lean Style */
.watchlist-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.watchlist-row {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    cursor: default;
    transition: background 0.2s;
}

.watchlist-row:last-child {
    scrollbar-width: none;
}

.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

.search-results-dropdown .search-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    transition: background 0.2s;
}

.search-results-dropdown .search-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.search-results-dropdown .item-ticker {
    font-weight: 700;
    color: var(--accent-color);
}

.search-results-dropdown .item-name {
    font-size: 0.8rem;
    color: #94a3b8;
}

.watchlist-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.watchlist-row.dragging {
    opacity: 0.4;
    background: var(--accent-color);
    color: #000;
}

.drag-handle {
    cursor: grab;
    color: var(--text-secondary);
    padding: 8px;
    margin-right: 8px;
    display: flex;
    align-items: center;
    opacity: 0.5;
}

.drag-handle:active {
    cursor: grabbing;
}

.watchlist-info {
    flex: 1;
    display: flex;
    align-items: baseline;
    gap: 12px;
    cursor: pointer;
}

.watchlist-ticker {
    font-weight: 800;
    color: var(--accent-color);
    font-size: 1rem;
    min-width: 60px;
}

.watchlist-name {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0.7;
}

.watchlist-price-block {
    text-align: right;
    margin-right: 15px;
    min-width: 80px;
}

.watchlist-row-price {
    font-weight: 700;
    font-size: 0.95rem;
}

.watchlist-row-change {
    font-size: 0.75rem;
    font-weight: 600;
}

.watchlist-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-remove {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 1.1rem;
    border-radius: 4px;
    transition: all 0.2s;
    opacity: 0.6;
}

.btn-remove:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    opacity: 1;
}

.watchlist-search-inline {
    margin-bottom: 15px;
    position: relative;
    padding: 2px;
}

.watchlist-search-inline input {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 8px;
}

.watchlist-search-inline input:focus {
    border-style: solid;
    border-color: var(--accent-color);
    outline: none;
}

@keyframes pulse-opacity {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.5;
    }
}

/* Loading Spinner */
.spinner-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    gap: 15px;
}

.spinner {
    width: 48px;
    height: 48px;
    background-image: url('biocatcher_face_v2.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border: none;
    border-radius: 0;
    animation: spin 1.5s linear infinite;
    image-rendering: -webkit-optimize-contrast;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* --- Home Page UX Refinement --- */
.user-status-text {
    font-size: 0.65rem;
    color: var(--text-secondary);
    text-align: right;
    margin-right: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.2;
}

.user-tier-vip {
    color: #e2e8f0;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    letter-spacing: -0.02em;
}

.app-version-footer {
    padding: 40px 0 100px 0;
    text-align: center;
    font-size: 0.65rem;
    color: var(--text-secondary);
    opacity: 0.5;
}

/* Insider Highlight Cards (Compact) */
.insider-card-compact {
    flex: 0 0 170px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.insider-card-compact:active {
    transform: scale(0.96);
    background: rgba(255, 255, 255, 0.08);
}

.insider-card-compact .card-ticker {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--accent-color);
}

.insider-card-compact .card-desc {
    font-size: 0.7rem;
    color: var(--text-secondary);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.insider-card-compact .card-value {
    font-size: 0.9rem;
    font-weight: 800;
    margin-top: 2px;
}

.insider-card-compact .card-footer {
    font-size: 0.65rem;
    color: var(--text-secondary);
    opacity: 0.7;
    margin-top: auto;
}

/* --- Horizontal News Layout --- */
.news-row-item {
    display: flex;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background 0.2s;
}

.news-row-item:active {
    background: rgba(255, 255, 255, 0.03);
}

.news-thumb {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    object-fit: cover;
    background: #1a1a1a;
    flex-shrink: 0;
}

.news-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
    /* Important for ellipsis */
}

.news-meta {
    font-size: 0.7rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.news-source {
    color: var(--accent-color);
    font-weight: 700;
}

.news-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}

.news-date {
    font-size: 0.65rem;
    color: var(--text-secondary);
}

/* --- Insider Trend Chart --- */
.insider-chart-wrapper {
    width: 100%;
    height: 180px;
    margin: 15px 0;
    position: relative;
}

/* --- Round 23: Insider Individual History Modal --- */
.btn-micro {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-secondary);
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-micro:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2500;
    animation: fadeIn 0.2s ease-out;
}

.modal-card {
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
}

.modal-header {
    background: #252525;
    padding: 12px 16px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header .close-btn {
    font-size: 1rem;
    padding: 6px;
    opacity: 0.7;
}

.modal-body {
    overflow-y: auto;
    max-height: 75vh;
}

/* --- Round 24: Sentiment Ratio Bar --- */
.sentiment-ratio-block {
    margin: 16px 0;
}

.sentiment-bar-container-slim {
    height: 8px;
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    display: flex;
    overflow: hidden;
}

.sentiment-bar-segment {
    height: 100%;
    transition: width 0.5s ease-out;
}

.sentiment-bar-segment.buy {
    background: var(--success);
}

.sentiment-bar-segment.sell {
    background: var(--danger);
}

.sentiment-info-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    margin-bottom: 6px;
    font-weight: 600;
}

/* --- Round 31: Catalyst UI Optimization --- */
.catalyst-card-app,
.catalyst-card-modal {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.catalyst-card-app {
    min-width: 180px;
    min-height: 100px;
    /* Removed max-height to prevent truncation */
}

.catalyst-card-app:active {
    transform: scale(0.97);
}

.high-impact-card {
    border: 1px solid rgba(59, 130, 246, 0.8) !important;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
    animation: sparkleGlow 3s infinite alternate ease-in-out;
}

@keyframes sparkleGlow {
    0% {
        box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
        border-color: rgba(59, 130, 246, 0.5);
    }

    100% {
        box-shadow: 0 0 25px rgba(59, 130, 246, 0.7), 0 0 40px rgba(59, 130, 246, 0.2);
        border-color: rgba(59, 130, 246, 1);
    }
}

.cat-highlight-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.6rem;
    font-weight: 800;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.15);
    padding: 3px 8px;
    border-radius: 20px;
    border: 1px solid rgba(56, 189, 248, 0.3);
    display: flex;
    align-items: center;
    gap: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 5;
}

.cat-highlight-badge span {
    font-size: 0.7rem;
    animation: starTwinkle 1.5s infinite;
}

@keyframes starTwinkle {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.cat-date-modern {
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.cat-ticker-modern {
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--accent-color);
    cursor: pointer;
    line-height: 1;
}

.cat-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cat-phase-badge {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.cat-drug-label {
    font-size: 0.75rem;
    font-weight: 700;
    opacity: 0.9;
}

.cat-title-modern {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.catalyst-card-modal {
    background: rgba(255, 255, 255, 0.02);
    margin-bottom: 2px;
}

.catalyst-card-modal .cat-title-modern {
    -webkit-line-clamp: 5;
    line-clamp: 5;
}

.vertical-catalyst-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ============================================= */
/* BOTTOM NAVIGATION BAR                         */
/* ============================================= */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: var(--nav-height);
    background: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 10px;
    padding-bottom: env(safe-area-inset-bottom);
    border-top: 1px solid var(--border-color);
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.2s ease, transform 0.15s ease;
    padding: 8px 0;
}

.nav-item:active {
    transform: scale(0.92);
}

.nav-item.active {
    color: var(--accent-color);
}

.nav-item .icon {
    width: 22px;
    height: 22px;
    margin-bottom: 3px;
}

.nav-item .label {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Ensure content doesn't get hidden behind nav */
.view-tab {
    padding-bottom: calc(var(--nav-height) + 20px);
}

/* --- Watchlist Horizontal Cards --- */
.watchlist-card-mini {
    min-width: 120px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.watchlist-card-mini:hover {
    background: rgba(255, 255, 255, 0.05);
}

.watchlist-card-mini .ticker {
    font-weight: 700;
    font-size: 1rem;
    color: white;
}

.watchlist-card-mini .price-block {
    display: flex;
    flex-direction: column;
    margin-top: 4px;
}

.watchlist-card-mini .price {
    font-size: 0.9rem;
    color: #ccc;
}

.watchlist-card-mini .change {
    font-size: 0.8rem;
    font-weight: 600;
}

/* --- Alert Horizontal List with Toggle --- */
.alert-item-horiz {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.alert-info {
    flex: 1;
}

.alert-type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 4px;
}

.alert-condition {
    font-size: 0.95rem;
    color: white;
    font-weight: 600;
}

.alert-scope {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #333;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--success);
}

input:checked+.slider:before {
    transform: translateX(20px);
}

/* Scope Selection Cards */
.scope-card.selected {
    border-color: var(--accent-color) !important;
    background: rgba(59, 130, 246, 0.1) !important;
}

/* Ensure Global Header is Topmost */
.app-header {
    z-index: 2000 !important;
    /* Ensure it stays above overlay views */
}

#detail-view.view-overlay {
    z-index: 1500;
    /* Details below header if header is meant to persist, but usually detail covers all. 
                      User requested global header visible always. So header > detail view? 
                      If detail view is full screen, header might be weird. 
                      Let's assume user wants header visible on main tabs. */
    top: var(--header-height);
    /* Push detail view down */
    height: calc(100% - var(--header-height));
}

/* --- Analyst Ratings & Badge Styles --- */
.rating-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.01);
    transition: background 0.2s;
}

.rating-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.rating-badge,
.insider-badge,
.badge-buy,
.badge-hold,
.badge-sell,
.badge-neutral {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-block;
}

.badge-buy,
.rating-buy {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-hold,
.rating-hold {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-sell,
.rating-sell {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-neutral {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

/* Whale Signal Cards - Premium Design */
.whale-signal-section {
    margin-top: 24px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
}

.whale-signal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.whale-card {
    position: relative;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.whale-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.15);
}

/* S-Tier Premium Luminous */
.whale-card.s-tier {
    border: 1px solid rgba(255, 215, 0, 0.25);
    background: linear-gradient(145deg, #1a1a1a, #262000);
}

.whale-card.s-tier::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.5), transparent);
}

.signal-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.badge-s-tier {
    background: #ffd700;
    color: #000;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.badge-a-tier {
    background: #e2e8f0;
    color: #1e293b;
}

.badge-b-tier {
    background: rgba(205, 127, 50, 0.2);
    color: #cd7f32;
    border: 1px solid rgba(205, 127, 50, 0.3);
}

.action-tag {
    font-size: 20px;
    font-weight: 900;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.s-tier .action-tag {
    background: linear-gradient(90deg, #ffd700, #ffa500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.whale-name {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 20px;
}

.whale-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.metric-item .label {
    display: block;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.35);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-item .value {
    font-size: 16px;
    font-weight: 700;
    color: #f1f5f9;
}

.value.positive {
    color: #10b981;
}

.value.negative {
    color: #ef4444;
}

.confluence-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.confluence-chip {
    font-size: 10px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 6px;
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.confluence-chip.insider {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Fallback Badge for Delayed SEC Data */
.badge-fallback {
    background: rgba(245, 158, 11, 0.15) !important;
    color: #f59e0b !important;
    border: 1px solid rgba(245, 158, 11, 0.4) !important;
    font-size: 0.55rem !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    font-weight: 900 !important;
    display: flex;
    align-items: center;
    gap: 3px;
    letter-spacing: -0.02em;
    animation: fadeIn 0.3s ease-out;
}