/* Shared Header Styles - Used across all pages */

/* Prevent layout shift when scrollbar appears/disappears */
html {
    scrollbar-gutter: stable;
}

/* Custom Scrollbar Styling */
::-webkit-scrollbar {
    width: 20px;
    height: 20px;
}

::-webkit-scrollbar-track {
    background: rgba(10, 10, 15, 0.5);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #2a2a3a 0%, #3a3a4a 100%);
    border-radius: 5px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #3a3a4a 0%, #4a4a5a 100%);
    border: 2px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:active {
    background: linear-gradient(180deg, #00ff88 0%, #00cc66 100%);
    border: 2px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-corner {
    background: rgba(10, 10, 15, 0.5);
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: #2a2a3a rgba(10, 10, 15, 0.5);
}

/* Back Button */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: #1a1a24;
    border: 1px solid #2a2a3a;
    border-radius: 10px;
    color: #a0a0b0;
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.back-btn:hover {
    background: #22222e;
    border-color: #606070;
    color: #ffffff;
}

.back-btn:active {
    transform: scale(0.98);
}

/* ==================== Stock Header (Analysis Detail Pages) ==================== */
.stock-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    gap: 2rem;
}

.stock-info { flex: 1; }

.stock-symbol {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stock-name {
    color: var(--text-secondary, #a0a0b0);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.stock-price {
    display: flex;
    align-items: baseline;
    gap: 1rem;
}

.stock-price .current-price {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2rem;
    font-weight: 600;
}

.stock-price .price-change {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

.stock-price .price-change.positive { color: var(--accent-green, #00ff88); background: var(--accent-green-dim, rgba(0, 255, 136, 0.15)); }
.stock-price .price-change.negative { color: var(--accent-red, #ff4466); background: var(--accent-red-dim, rgba(255, 68, 102, 0.15)); }

.stock-price .last-analyzed {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: var(--text-muted, #6b7280);
    margin-left: 0.25rem;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    background: var(--bg-hover, rgba(255, 255, 255, 0.04));
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.06));
}

.stock-actions {
    display: flex;
    gap: 1rem;
}

.stock-actions .action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: 1px solid var(--border-color, #2a2a3a);
    border-radius: 10px;
    background: var(--bg-card, #1a1a24);
    color: var(--text-primary, #ffffff);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.stock-actions .action-btn:hover {
    border-color: var(--accent-purple, #aa66ff);
    background: var(--accent-purple-dim, rgba(170, 102, 255, 0.15));
}

.stock-actions .action-btn.primary {
    background: var(--gradient-purple, linear-gradient(135deg, #aa66ff, #7733cc));
    border: none;
    color: #fff;
}

.stock-actions .action-btn.primary:hover {
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(170, 102, 255, 0.3);
}

.stock-actions .action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 768px) {
    .stock-header { flex-direction: column; }
    .stock-actions { width: 100%; flex-wrap: wrap; }
}

/* Header Base */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color, #2a2a3a);
    padding: 1rem 2rem;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Logo */
header .logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary, #ffffff);
    text-decoration: none;
}

header .logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Sector Dropdown */
.sector-dropdown {
    position: relative;
}

.sector-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    background: var(--bg-card, #1a1a24);
    border: 1px solid #00ff88;
    border-radius: 8px;
    color: #00ff88;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sector-btn:hover {
    background: rgba(0, 255, 136, 0.15);
}

/* Crypto sector button style */
.sector-btn.crypto-btn {
    border-color: #ff9500;
    color: #ff9500;
}

.sector-btn.crypto-btn:hover {
    background: rgba(255, 149, 0, 0.15);
}

.sector-item.crypto.active {
    background: rgba(255, 149, 0, 0.15);
    color: #ff9500;
}

.sector-item.crypto.active .sector-item-status {
    color: #ff9500;
}

.sector-btn .chevron {
    transition: transform 0.2s ease;
}

.sector-dropdown.open .sector-btn .chevron {
    transform: rotate(180deg);
}

.sector-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 220px;
    max-width: 280px;
    background: var(--bg-card, #1a1a24);
    border: 1px solid var(--border-color, #2a2a3a);
    border-radius: 12px;
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.sector-dropdown.open .sector-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sector-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    color: var(--text-secondary, #a0a0b0);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.85rem;
}

.sector-item:hover:not(.locked) {
    background: var(--bg-hover, #22222e);
    color: var(--text-primary, #ffffff);
}

.sector-item.active {
    background: rgba(0, 255, 136, 0.15);
    color: #00ff88;
}

.sector-item.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.sector-item-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sector-item.stocks .sector-item-icon { background: rgba(0, 255, 136, 0.15); color: #00ff88; }
.sector-item.forex .sector-item-icon { background: rgba(0, 204, 255, 0.15); color: #00ccff; }
.sector-item.crypto .sector-item-icon { background: rgba(255, 149, 0, 0.15); color: #ff9500; }
.sector-item.commodities .sector-item-icon { background: rgba(255, 204, 0, 0.15); color: #ffcc00; }

.sector-item-text {
    flex: 1;
}

.sector-item-name {
    font-weight: 600;
    font-size: 0.85rem;
}

.sector-item-status {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sector-item.active .sector-item-status { color: #00ff88; }
.sector-item.locked .sector-item-status { color: var(--text-muted, #606070); }

.sector-item-lock {
    color: var(--text-muted, #606070);
}

/* Navigation Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    color: var(--text-secondary, #a0a0b0);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    border: none;
    background: none;
    font-family: inherit;
    cursor: pointer;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary, #ffffff);
    background: var(--bg-hover, #22222e);
}

/* Nav Dropdown (Analysis) */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-trigger {
    position: relative;
}

.nav-chevron {
    transition: transform 0.2s ease;
    opacity: 0.5;
}

.nav-dropdown.open .nav-chevron {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    min-width: 260px;
    background: var(--bg-card, #1a1a24);
    border: 1px solid var(--border-color, #2a2a3a);
    border-radius: 14px;
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    z-index: 1000;
}

.nav-dropdown.open .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    color: var(--text-secondary, #a0a0b0);
    text-decoration: none;
    transition: all 0.15s ease;
}

.nav-dropdown-item:hover {
    background: var(--bg-hover, #22222e);
    color: var(--text-primary, #ffffff);
}

.nav-dropdown-item.active {
    background: rgba(170, 102, 255, 0.1);
    color: var(--text-primary, #ffffff);
}

.nav-dropdown-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.nav-dropdown-text { flex: 1; }

.nav-dropdown-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: inherit;
}

.nav-dropdown-desc {
    font-size: 0.7rem;
    color: var(--text-muted, #606070);
    margin-top: 1px;
}

.nav-dropdown-divider {
    height: 1px;
    background: var(--border-color, #2a2a3a);
    margin: 0.35rem 0.5rem;
}

.nav-dropdown-highlight .nav-dropdown-name {
    color: #aa66ff;
}

/* User Menu */
.user-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.user-badge {
    background: rgba(0, 255, 136, 0.15);
    color: #00ff88;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* User Avatar Dropdown */
.user-dropdown {
    position: relative;
}

.user-avatar-btn {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary, #a0a0b0);
    transition: all 0.2s ease;
}

.user-avatar-btn:hover { color: var(--text-primary, #ffffff); }

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--bg-hover, #22222e);
    border: 1px solid var(--border-color, #2a2a3a);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary, #a0a0b0);
    transition: all 0.2s ease;
}

.user-avatar-btn:hover .user-avatar {
    border-color: var(--text-muted, #606070);
    color: var(--text-primary, #ffffff);
}

.user-chevron {
    transition: transform 0.2s ease;
    opacity: 0.5;
}

.user-dropdown.open .user-chevron {
    transform: rotate(180deg);
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 200px;
    background: var(--bg-card, #1a1a24);
    border: 1px solid var(--border-color, #2a2a3a);
    border-radius: 12px;
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    z-index: 1000;
}

.user-dropdown.open .user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
}

.user-dropdown-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary, #ffffff);
}

.user-dropdown-divider {
    height: 1px;
    background: var(--border-color, #2a2a3a);
    margin: 0.35rem 0;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    color: var(--text-secondary, #a0a0b0);
    text-decoration: none;
    transition: all 0.15s ease;
    font-family: inherit;
    font-size: 0.85rem;
    border: none;
    background: none;
    width: 100%;
    cursor: pointer;
    text-align: left;
}

.user-dropdown-item:hover {
    background: var(--bg-hover, #22222e);
    color: var(--text-primary, #ffffff);
}

.user-dropdown-item.admin-item {
    color: #ffcc00;
}

.user-dropdown-item.admin-item:hover {
    background: rgba(255, 204, 0, 0.1);
}

.user-dropdown-item.logout-item {
    color: var(--accent-red, #ff4466);
}

.user-dropdown-item.logout-item:hover {
    background: rgba(255, 68, 102, 0.1);
}

/* Responsive */
@media (max-width: 1200px) {
    .nav-links {
        gap: 0.125rem;
    }

    .nav-link {
        padding: 0.5rem 0.625rem;
        font-size: 0.8rem;
    }

    .nav-link span { display: none; }
    .nav-chevron { display: none; }
}

/* ==================== Mobile Navigation ==================== */

/* Hamburger Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: var(--bg-card, #1a1a24);
    border: 1px solid var(--border-color, #2a2a3a);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.mobile-menu-btn:hover {
    border-color: var(--accent-purple, #aa66ff);
    background: var(--bg-hover, #22222e);
}

.mobile-menu-btn .hamburger-line {
    width: 20px;
    height: 2px;
    background: var(--text-secondary, #a0a0b0);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-btn .hamburger-line:nth-child(2) {
    margin: 4px 0;
}

/* Hamburger animation when open */
.mobile-menu-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.mobile-menu-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-nav-overlay.active {
    opacity: 1;
}

/* Mobile Navigation Panel */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100%;
    background: var(--bg-card, #1a1a24);
    border-left: 1px solid var(--border-color, #2a2a3a);
    z-index: 1000;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color, #2a2a3a);
}

.mobile-nav-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary, #ffffff);
}

.mobile-nav-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-secondary, #a0a0b0);
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-nav-close:hover {
    background: var(--bg-hover, #22222e);
    color: var(--text-primary, #ffffff);
}

.mobile-nav-links {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    color: var(--text-secondary, #a0a0b0);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.mobile-nav-link:hover {
    background: var(--bg-hover, #22222e);
    color: var(--text-primary, #ffffff);
}

.mobile-nav-link.active {
    background: rgba(170, 102, 255, 0.15);
    color: #aa66ff;
}

.mobile-nav-link i {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.mobile-nav-divider {
    height: 1px;
    background: var(--border-color, #2a2a3a);
    margin: 0.75rem 1rem;
}

.mobile-nav-section-title {
    padding: 0.5rem 1rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted, #606070);
}

/* ==================== Responsive Breakpoints ==================== */

@media (max-width: 992px) {
    header {
        padding: 0.875rem 1.5rem;
    }

    .header-left {
        gap: 1rem;
    }

    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .mobile-nav-overlay,
    .mobile-nav {
        display: block;
    }

    .user-menu {
        gap: 0.5rem;
    }
}

@media (max-width: 768px) {
    header {
        padding: 0.75rem 1rem;
    }

    header .logo span {
        display: none;
    }

    .profile-dropdown .profile-name {
        display: none;
    }

    .sector-dropdown {
        display: none;
    }

    .user-chevron {
        display: none;
    }
}

@media (max-width: 480px) {
    header {
        padding: 0.625rem 0.75rem;
    }

    .header-content {
        gap: 0.5rem;
    }

    header .logo-icon {
        width: 36px;
        height: 36px;
    }

    .mobile-menu-btn {
        width: 36px;
        height: 36px;
    }

    .profile-btn {
        padding: 0.35rem 0.5rem;
    }
}

/* ==================== Profile Dropdown ==================== */

.profile-dropdown {
    position: relative;
}

.profile-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    background: var(--bg-card, #1a1a24);
    border: 1px solid #aa66ff;
    border-radius: 8px;
    color: #aa66ff;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.profile-btn:hover {
    background: rgba(170, 102, 255, 0.15);
}

.profile-btn .chevron {
    transition: transform 0.2s ease;
    width: 14px;
    height: 14px;
}

.profile-dropdown.open .profile-btn .chevron {
    transform: rotate(180deg);
}

.profile-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 220px;
    max-width: 280px;
    background: var(--bg-card, #1a1a24);
    border: 1px solid var(--border-color, #2a2a3a);
    border-radius: 12px;
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.profile-dropdown.open .profile-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-menu-header {
    padding: 0.5rem 0.75rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted, #606070);
    border-bottom: 1px solid var(--border-color, #2a2a3a);
    margin-bottom: 0.5rem;
}

.profile-menu-list {
    max-height: 280px;
    overflow-y: auto;
}

.profile-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    color: var(--text-secondary, #a0a0b0);
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    font-family: inherit;
    font-size: 0.85rem;
    text-align: left;
}

.profile-item:hover {
    background: var(--bg-hover, #22222e);
    color: var(--text-primary, #ffffff);
}

.profile-item.active {
    background: rgba(170, 102, 255, 0.15);
    color: #aa66ff;
}

.profile-item-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(170, 102, 255, 0.15);
    color: #aa66ff;
}

.profile-item.active .profile-item-icon {
    background: rgba(170, 102, 255, 0.3);
}

.profile-item-text {
    flex: 1;
    min-width: 0;
}

.profile-item-name {
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-item-meta {
    font-size: 0.7rem;
    color: var(--text-muted, #606070);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-item-badge {
    font-size: 0.65rem;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
}

.profile-item-badge.default {
    background: rgba(0, 204, 255, 0.15);
    color: #00ccff;
}

.profile-item-badge.active-badge {
    background: rgba(0, 255, 136, 0.15);
    color: #00ff88;
}

.profile-item-check {
    color: #00ff88;
    flex-shrink: 0;
}

.profile-menu-divider {
    height: 1px;
    background: var(--border-color, #2a2a3a);
    margin: 0.5rem 0;
}

.profile-item.manage {
    color: #aa66ff;
}

.profile-item.manage:hover {
    background: rgba(170, 102, 255, 0.15);
}

/* ==================== Floating Process FAB & Panel ==================== */

#processContainer {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    z-index: 1100;
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* FAB button */
.process-fab {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--bg-card, #1a1a24);
    border: 1px solid var(--border-color, #2a2a3a);
    color: var(--text-secondary, #a0a0b0);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.process-fab:hover {
    border-color: var(--text-muted, #606070);
    color: var(--text-primary, #ffffff);
    transform: scale(1.05);
}

.process-fab.active {
    border-color: var(--accent-blue, #00ccff);
    color: var(--accent-blue, #00ccff);
    background: rgba(0, 204, 255, 0.1);
}

.process-fab.has-processes {
    border-color: var(--accent-blue, #00ccff);
    color: var(--accent-blue, #00ccff);
}

.process-fab-icon {
    width: 22px;
    height: 22px;
    transition: transform 0.3s ease;
}

.process-fab.has-processes .process-fab-icon {
    animation: process-spin 2s linear infinite;
}

@keyframes process-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Badge */
.process-fab-badge {
    display: none;
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--accent-blue, #00ccff);
    color: #000;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 9px;
    line-height: 18px;
    text-align: center;
}

.process-fab.has-processes .process-fab-badge {
    display: block;
}

/* Expandable panel (opens upward from FAB) */
.process-float-panel {
    position: absolute;
    bottom: calc(100% + 0.75rem);
    left: 0;
    width: 340px;
    max-height: 420px;
    background: var(--bg-secondary, #12121a);
    border: 1px solid var(--border-color, #2a2a3a);
    border-radius: 14px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.95);
    transform-origin: bottom left;
    transition: all 0.25s ease;
}

.process-float-panel.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.process-float-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border-color, #2a2a3a);
    flex-shrink: 0;
}

.process-float-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary, #ffffff);
}

.process-float-close {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-secondary, #a0a0b0);
    cursor: pointer;
    transition: all 0.2s ease;
}

.process-float-close:hover {
    background: var(--bg-hover, #22222e);
    color: var(--text-primary, #ffffff);
}

.process-float-body {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
}

/* Empty state */
.process-panel-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem 1rem;
    color: var(--text-muted, #606070);
    font-size: 0.85rem;
}

.process-panel-empty p {
    margin: 0;
}

/* Process list */
.process-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Process item */
.process-item {
    background: var(--bg-card, #1a1a24);
    border: 1px solid var(--border-color, #2a2a3a);
    border-radius: 10px;
    padding: 0.75rem 0.875rem;
    transition: border-color 0.2s ease;
}

.process-item:hover {
    border-color: var(--text-muted, #606070);
}

.process-item-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.process-item-icon {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.process-item-info {
    flex: 1;
    min-width: 0;
}

.process-item-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary, #ffffff);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.process-item-status {
    font-size: 0.65rem;
    color: var(--text-muted, #606070);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.process-item-cancel {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: var(--text-muted, #606070);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.process-item-cancel:hover {
    background: rgba(255, 68, 68, 0.15);
    color: #ff4444;
}

/* Progress bar */
.process-progress {
    margin-bottom: 0.25rem;
}

.process-progress-bar {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
}

.process-progress-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.5s ease;
}

/* Progress message */
.process-message {
    font-size: 0.7rem;
    color: var(--text-secondary, #a0a0b0);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Responsive */
@media (max-width: 480px) {
    #processContainer {
        bottom: 1rem;
        left: 1rem;
    }

    .process-fab {
        width: 44px;
        height: 44px;
    }

    .process-float-panel {
        width: calc(100vw - 2rem);
    }
}

/* Loading state */
.profile-menu-loading {
    padding: 1rem;
    text-align: center;
    color: var(--text-muted, #606070);
    font-size: 0.85rem;
}

/* Empty state */
.profile-menu-empty {
    padding: 1rem;
    text-align: center;
    color: var(--text-muted, #606070);
    font-size: 0.85rem;
}

/* ==================== Help Icon Tooltip ==================== */

.help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(170, 102, 255, 0.15);
    border: 1px solid rgba(170, 102, 255, 0.4);
    color: #aa66ff;
    font-size: 12px;
    font-weight: 700;
    cursor: help;
    margin-left: 8px;
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.help-icon:hover {
    background: #aa66ff;
    border-color: #aa66ff;
    color: white;
    transform: scale(1.1);
}

.help-icon[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: calc(100% + 8px);
    padding: 0.75rem 1rem;
    background: var(--bg-card, #1a1a24);
    border: 1px solid var(--border-color, #2a2a3a);
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-primary, #ffffff);
    white-space: pre-line;
    width: max-content;
    max-width: 300px;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    line-height: 1.5;
    text-align: left;
}

.help-icon[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: calc(100% + 2px);
    border: 6px solid transparent;
    border-bottom-color: var(--border-color, #2a2a3a);
    z-index: 1001;
}

/* ==================== Uniform Analysis Score Header ==================== */

.analysis-score-header {
    text-align: center;
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.analysis-score-header .score-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    font-size: 1.25rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.analysis-score-header .score-badge.strong-buy { background: var(--accent-green-dim, rgba(0, 255, 136, 0.15)); color: var(--accent-green, #00ff88); }
.analysis-score-header .score-badge.buy { background: var(--accent-blue-dim, rgba(0, 204, 255, 0.15)); color: var(--accent-blue, #00ccff); }
.analysis-score-header .score-badge.hold { background: var(--accent-yellow-dim, rgba(255, 204, 0, 0.15)); color: var(--accent-yellow, #ffcc00); }
.analysis-score-header .score-badge.sell { background: var(--accent-orange-dim, rgba(255, 136, 0, 0.15)); color: var(--accent-orange, #ff8800); }
.analysis-score-header .score-badge.strong-sell { background: var(--accent-red-dim, rgba(255, 68, 102, 0.15)); color: var(--accent-red, #ff4466); }
.analysis-score-header .score-badge.long { background: var(--accent-green-dim, rgba(0, 255, 136, 0.15)); color: var(--accent-green, #00ff88); }
.analysis-score-header .score-badge.short { background: var(--accent-red-dim, rgba(255, 68, 102, 0.15)); color: var(--accent-red, #ff4466); }
.analysis-score-header .score-badge.neutral { background: var(--accent-yellow-dim, rgba(255, 204, 0, 0.15)); color: var(--accent-yellow, #ffcc00); }

.analysis-score-header .score-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.analysis-score-header .score-value.positive { color: var(--accent-green, #00ff88); }
.analysis-score-header .score-value.negative { color: var(--accent-red, #ff4466); }

.analysis-score-header .score-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted, #606070);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.analysis-score-header .score-details {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.analysis-score-header .score-detail-item {
    text-align: center;
}

.analysis-score-header .score-detail-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.25rem;
    font-weight: 600;
}

.analysis-score-header .score-detail-label {
    font-size: 0.8rem;
    color: var(--text-muted, #606070);
    margin-top: 0.25rem;
}

@media (max-width: 480px) {
    .analysis-score-header .score-value {
        font-size: 2.5rem;
    }

    .analysis-score-header .score-details {
        gap: 1.25rem;
    }

    .help-icon[data-tooltip]:hover::after {
        max-width: 220px;
        left: auto;
        right: -10px;
        transform: none;
    }

    .help-icon[data-tooltip]:hover::before {
        left: auto;
        right: 2px;
        transform: none;
    }
}
