* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0c1015;
    --bg-secondary: #0a0a0a;
    --bg-card: #19212a;
    --blue-primary: #fec81d;
    --blue-secondary: #f6b30f;
    --blue-gradient-start: #f8b30d;
    --blue-gradient-end: #f2a605;
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    --text-muted: #718096;
    --success: #34d399;
    --danger: #f87171;
    --border-color: #232d42;
    --shadow: rgba(0, 0, 0, 0.5);
}

body {
    font-family:
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

.mobile-container {
    max-width: 428px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg-primary);
    position: relative;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

/* Status Bar */
.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    background: var(--bg-primary);
}

.status-bar .time {
    font-size: 0.9375rem;
}

.status-bar .icons {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

/* Header */
.header {
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.account-selector {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.4rem 0.75rem;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.account-selector:hover {
    background: rgba(255, 255, 255, 0.15);
}

.account-icons {
    display: flex;
    align-items: center;
}

.account-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-left: -6px;
}

.account-icon:first-child {
    margin-left: 0;
}

.account-text {
    font-size: 0.8125rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* ── Icon Button (bell, etc.) ── */
.ha-icon-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    color: #94a3b8;
    font-size: 0.95rem;
    overflow: hidden;
}
.ha-icon-btn .ha-icon-glow {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.ha-icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.1);
    color: #f9fafb;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
.ha-icon-btn:hover .ha-icon-glow {
    opacity: 1;
}
.ha-icon-btn:active {
    transform: translateY(0) scale(0.95);
}
.ha-icon-btn i {
    position: relative;
    z-index: 1;
    font-size: 22px;
}

/* Bell wiggle on hover */
.ha-bell:hover i {
    animation: ha-bell-ring 0.6s ease;
}
@keyframes ha-bell-ring {
    0% {
        transform: rotate(0);
    }
    15% {
        transform: rotate(14deg);
    }
    30% {
        transform: rotate(-12deg);
    }
    45% {
        transform: rotate(8deg);
    }
    60% {
        transform: rotate(-5deg);
    }
    75% {
        transform: rotate(2deg);
    }
    100% {
        transform: rotate(0);
    }
}

/* ── Badge ── */
.ha-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    border-radius: 10px;
    background: linear-gradient(135deg, #f43f5e, #ef4444);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 2px solid var(--bg-primary, #0a0e14);
    line-height: 1;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.35);
}
.ha-badge-pulse::after {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: inherit;
    background: rgba(239, 68, 68, 0.25);
    animation: ha-pulse 2s ease-in-out infinite;
}
@keyframes ha-pulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* ── Avatar ── */
.ha-avatar-wrap {
    position: relative;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    cursor: pointer;
    display: block;
    text-decoration: none;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.ha-avatar-wrap:hover {
    transform: translateY(-1px);
}
.ha-avatar-wrap:active {
    transform: translateY(0) scale(0.95);
}
.ha-avatar-ring {
    position: absolute;
    inset: -2px;
    border-radius: 7px;
    border: 2px solid rgba(254, 200, 29, 0.15);
    transition: all 0.35s ease;
    pointer-events: none;
}
.ha-avatar-wrap:hover .ha-avatar-ring {
    border-color: rgba(254, 200, 29, 0.5);
    box-shadow:
        0 0 20px rgba(254, 200, 29, 0.15),
        inset 0 0 10px rgba(254, 200, 29, 0.05);
}
.ha-avatar {
    width: 34px!important;
    max-width: 34px!important;
    height: 34px!important;
    max-height: 34px!important;
    border-radius: 7px;
    object-fit: cover;
    display: block;
    position: relative;
    z-index: 1;
}
.ha-status-dot {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #22c55e;
    border: 2.5px solid var(--bg-primary, #0a0e14);
    z-index: 2;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
}

/* Legacy overrides — keep old selectors working */
.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    color: var(--text-primary);
    position: relative;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.icon-btn-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 16px;
    height: 16px;
    border-radius: 10px;
    background: #ef4444;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--bg-primary, #0a0e14);
    line-height: 1;
}

.profile-pic {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.profile-pic:hover {
    transform: scale(1.08);
    border-color: rgba(254, 200, 29, 0.5);
    box-shadow: 0 0 16px rgba(254, 200, 29, 0.25);
}

/* ═══════════════════════════════════════════
   Profile Menu — Redesigned
   ═══════════════════════════════════════════ */
.profile-menu-wrapper {
    position: relative;
}

.profile-menu {
    position: absolute;
    top: 50px;
    right: 0;
    background: #141a22;
    border-radius: 16px;
    min-width: 280px;
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.06);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.97);
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
    overflow: hidden;
}

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

/* ── User Card ── */
.pm-user-card {
    padding: 20px 18px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(
        135deg,
        rgba(254, 200, 29, 0.04) 0%,
        transparent 60%
    );
}
.pm-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}
.pm-avatar {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    object-fit: cover;
    border: 2px solid rgba(254, 200, 29, 0.2);
}
.pm-online-dot {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #22c55e;
    border: 2.5px solid #141a22;
}
.pm-user-info {
    flex: 1;
    min-width: 0;
}
.pm-user-name {
    font-size: 14px;
    font-weight: 700;
    color: #f9fafb;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pm-user-email {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pm-member-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #fec81d;
    background: rgba(254, 200, 29, 0.1);
    padding: 3px 8px;
    border-radius: 6px;
}
.pm-member-badge i {
    font-size: 8px;
}

/* ── Divider ── */
.pm-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
    margin: 0;
}

/* ── Stats Row ── */
.pm-stats-row {
    display: flex;
    align-items: center;
    padding: 12px 18px;
}
.pm-stat {
    flex: 1;
    text-align: center;
}
.pm-stat-val {
    font-size: 13px;
    font-weight: 700;
    color: #f9fafb;
}
.pm-stat-lbl {
    font-size: 9.5px;
    color: rgba(255, 255, 255, 0.25);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}
.pm-stat-sep {
    width: 1px;
    height: 28px;
    background: rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

/* ── Nav Items ── */
.pm-nav {
    padding: 6px 0;
}
.pm-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.75);
    font-size: 13px;
    font-weight: 500;
    transition:
        background 0.15s,
        color 0.15s;
    cursor: pointer;
}
.pm-nav-item:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #f9fafb;
}
.pm-nav-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
    transition: transform 0.15s;
}
.pm-nav-item:hover .pm-nav-icon {
    transform: scale(1.08);
}
.pm-nav-arrow {
    margin-left: auto;
    font-size: 9px;
    color: rgba(255, 255, 255, 0.12);
    transition:
        color 0.15s,
        transform 0.15s;
}
.pm-nav-item:hover .pm-nav-arrow {
    color: rgba(255, 255, 255, 0.3);
    transform: translateX(2px);
}
.pm-nav-badge {
    margin-left: auto;
    margin-right: 4px;
    min-width: 18px;
    height: 18px;
    border-radius: 10px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}
.pm-nav-badge + .pm-nav-arrow {
    margin-left: 0;
}

/* ── Logout ── */
.pm-logout-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px 14px;
    width: 100%;
    background: none;
    border: none;
    color: #ef4444;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s;
}
.pm-logout-btn:hover {
    background: rgba(239, 68, 68, 0.06);
}

/* Wallet Section */
.wallet-section {
    padding: 0 1rem 1rem;
}

.wallet-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.375rem;
}

.wallet-address {
    font-size: 0.6875rem;
    color: var(--text-muted);
    font-family: "Courier New", monospace;
    margin-bottom: 1rem;
}

/* Invitation Card */
.invitation-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 0.875rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid rgba(254, 200, 29, 0.2);
    transition: all 0.3s ease;
}

.invitation-card:hover {
    border-color: rgba(254, 200, 29, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(254, 200, 29, 0.15);
}

.invitation-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.invitation-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(
        135deg,
        var(--blue-gradient-start) 0%,
        var(--blue-gradient-end) 100%
    );
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #000;
}

.invitation-info {
    flex: 1;
}

.invitation-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.invitation-code-display {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--blue-primary);
    font-family: "Courier New", monospace;
    letter-spacing: 2px;
}

.invitation-copy-btn {
    background: rgba(254, 200, 29, 0.1);
    border: 1px solid rgba(254, 200, 29, 0.3);
    color: var(--blue-primary);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    white-space: nowrap;
}

.invitation-copy-btn:hover {
    background: rgba(254, 200, 29, 0.2);
    border-color: rgba(254, 200, 29, 0.5);
    transform: scale(1.05);
}

.invitation-copy-btn:active {
    transform: scale(0.95);
}

/* Portfolio Card */
.portfolio-card {
    background: linear-gradient(
        135deg,
        var(--blue-gradient-start) 0%,
        var(--blue-gradient-end) 100%
    );
    border-radius: 16px;
    padding: 1.125rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(248, 179, 13, 0.3);
}

.portfolio-card::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.1) 0%,
        transparent 70%
    );
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0%,
    100% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(-10%, -10%);
    }
}

.portfolio-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
}

.portfolio-value {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    letter-spacing: -0.5px;
}

.portfolio-change {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
}

.change-positive {
    color: var(--success);
    font-weight: 600;
}

.portfolio-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.action-btn {
    flex: 1;
    padding: 0.625rem 0.75rem;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

/* Latest Crypto News */
.section-title {
    font-size: 1rem;
    font-weight: 700;
    padding: 1rem 1rem 0.75rem;
}

.news-grid {
    display: flex;
    gap: 0.5rem;
    padding: 0 1rem 1rem;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-behavior: smooth;
}

.news-grid::-webkit-scrollbar {
    display: none;
}

.news-item {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
    flex-shrink: 0;
    width: calc(100vw / 4);
    height: 120px;
    justify-content: center;
}

.news-item:hover {
    background: var(--bg-secondary);
    transform: translateY(-4px);
    border-color: var(--blue-primary);
}

.news-icon {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.news-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.3;
}

/* Cryptocurrency Section */
.crypto-tabs {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.crypto-tabs::-webkit-scrollbar {
    display: none;
}

.home-tabs {
    padding: 0 15px 15px 15px;
}

.home-tabs .tab-btn {
    padding: 0.5rem 0.75rem 0.5rem 0.5rem !important;
}

.tab-btn {
    padding: 0.2rem 0.6rem 0.2rem 0.2rem;
    border-radius: 16px;
    background: var(--bg-card);
    border: none;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}
.all-tab-btn {
    padding: 0.2rem 0.45rem;
}

.tab-btn.active {
    background: var(--blue-primary);
    border-color: var(--blue-primary);
    color: #000;
}

.tab-btn:hover:not(.active) {
    background: var(--bg-secondary);
    border-color: var(--blue-primary);
}

.tab-icon-img {
    width: 18px;
    height: 18px;
    border-radius: 50%;
}

.tab-stock-logo {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    padding: 2px;
    object-fit: contain;
    background: #fff;
    flex-shrink: 0;
}

.tab-ticker {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.crypto-list {
    padding: 0 1rem 2rem;
}

.crypto-item {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.crypto-item:hover {
    background: var(--bg-secondary);
    transform: translateX(4px);
    border-color: var(--blue-primary);
}

.crypto-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.crypto-info {
    flex: 1;
}

.crypto-name {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 0.125rem;
}

.crypto-price {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.crypto-change {
    text-align: right;
}

.change-value {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 0.125rem;
}
.change-percent {
    font-size: 12px;
}
.change-percent.positive {
    color: var(--success);
}

.change-percent.negative {
    color: var(--danger);
}

/* Bottom Navigation */
.bottom-nav-wrapper {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 428px;
    padding: 0 1rem 10px;
    z-index: 100;
    pointer-events: none;
}

.bottom-nav {
    background: rgba(25, 33, 42, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 10px;
    padding: 0.5rem;
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 0.25rem;
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(254, 200, 29, 0.1) inset;
    pointer-events: all;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.125rem;
    padding: 0.5rem 0.625rem;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-muted);
    text-decoration: none;
    position: relative;
    flex: 1;
    width: calc(100% / 5);
}

.nav-item i {
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

.nav-item span {
    font-size: 0.625rem;
    font-weight: 600;
    margin-top: 0.125rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-item:not(.nav-scan).active {
    color: var(--blue-primary);
}

.nav-item:not(.nav-scan).active i,
.nav-item:not(.nav-scan).active span {
    color: var(--blue-primary);
}

.nav-item:not(.nav-scan):hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

/* Center Scan Button */
.nav-scan {
    padding: 0;
    margin: 0 -0.25rem;
    transform: translateY(-1.25rem);
    flex: 0 0 auto;
}

.nav-scan-btn {
    width: 50px;
    height: 50px;
    background: linear-gradient(
        135deg,
        var(--blue-gradient-start) 0%,
        var(--blue-gradient-end) 100%
    );
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 8px 24px rgba(254, 200, 29, 0.4),
        0 0 0 4px rgba(12, 16, 21, 1),
        0 0 0 5px rgba(254, 200, 29, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}

.nav-scan-btn:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow:
        0 12px 32px rgba(254, 200, 29, 0.5),
        0 0 0 4px rgba(12, 16, 21, 1),
        0 0 0 5px rgba(254, 200, 29, 0.3);
}

.nav-scan-btn:active {
    transform: scale(0.95) translateY(0);
}

.nav-scan-btn i {
    font-size: 1.5rem;
    color: #000;
    font-weight: 700;
} /* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeInUp 0.6s ease-out;
}

/* Responsive */
@media (max-width: 428px) {
    .mobile-container {
        max-width: 100%;
    }
}

/* ====================================
           LOGIN PAGE STYLES
           ==================================== */

.login-container {
    padding: 2rem 1.5rem;
    min-height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.brand-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(
        135deg,
        var(--blue-gradient-start),
        var(--blue-gradient-end)
    );
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    box-shadow: 0 10px 30px rgba(91, 153, 245, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 10px 30px rgba(254, 200, 29, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 15px 40px rgba(254, 200, 29, 0.6);
    }
}

.login-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(
        135deg,
        var(--blue-gradient-start),
        var(--blue-gradient-end)
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 400;
}

.login-form {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-label i {
    display: none;
}

.form-input {
    width: 100%;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: none;
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: "Inter", sans-serif;
    transition: all 0.3s ease;
    outline: none;
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:focus {
    background: var(--bg-secondary);
}

.form-input.is-invalid {
    background: rgba(248, 113, 113, 0.1);
}

.form-input.is-invalid:focus {
    background: rgba(248, 113, 113, 0.1);
}

.password-input-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: var(--blue-primary);
}

.error-message {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--danger);
    font-size: 0.8125rem;
    margin-top: 0.5rem;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.remember-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    position: relative;
    user-select: none;
}

.remember-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    width: 20px;
    height: 20px;
    background: var(--bg-card);
    border: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remember-checkbox input[type="checkbox"]:checked ~ .checkmark {
    background: var(--blue-primary);
}

.remember-checkbox input[type="checkbox"]:checked ~ .checkmark::after {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: white;
    font-size: 0.75rem;
}

.remember-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.forgot-link {
    color: var(--blue-primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: var(--blue-gradient-start);
}

.btn-login {
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(
        135deg,
        var(--blue-gradient-start),
        var(--blue-gradient-end)
    );
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow: 0 10px 30px rgba(254, 200, 29, 0.3);
    margin-bottom: 1.5rem;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(254, 200, 29, 0.5);
}

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

.divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.divider span {
    padding: 0 1rem;
}

.social-login {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.btn-social {
    width: 100%;
    padding: 0.875rem 1.25rem;
    background: var(--bg-card);
    border: none;
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.btn-social:hover {
    background: var(--bg-secondary);
    transform: translateY(-2px);
}

.btn-social i {
    font-size: 1.25rem;
}

.btn-google:hover i {
    color: #db4437;
}

.btn-apple:hover i {
    color: #555555;
}

.register-link {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-top: 1.5rem;
}

.register-link a {
    color: var(--blue-primary);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s ease;
}

.register-link a:hover {
    color: var(--blue-gradient-start);
    text-decoration: underline;
}

.login-features {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
    flex: 1;
}

.feature-item i {
    width: 48px;
    height: 48px;
    background: var(--bg-card);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--blue-primary);
}

.feature-item span {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Captcha Styles */
.captcha-box {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 0.75rem 1.25rem;
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.captcha-box:hover {
    background: var(--bg-secondary);
}

/* Login Responsive */
@media (max-width: 428px) {
    .login-container {
        padding: 1.5rem 1rem;
    }

    .login-title {
        font-size: 1.75rem;
    }

    .brand-logo {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }
}

/* ====================================
   ACCOUNT/PROFILE PAGE STYLES
   ==================================== */

.profile-header {
    padding: 0.75rem 1rem;
    margin-bottom: 0.875rem;
}

.profile-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.profile-header-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.profile-back-btn {
    width: 36px;
    height: 36px;
    background: var(--bg-card);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.profile-back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-2px);
}

.profile-logout-btn {
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.profile-logout-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: scale(1.05);
}

.profile-avatar-center {
    text-align: center;
    padding: 0.75rem 0 0.875rem;
}

.profile-avatar-wrapper {
    display: inline-block;
    position: relative;
    margin-bottom: 0.625rem;
}

.profile-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 2px solid rgba(254, 200, 29, 0.3);
}

.profile-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.1875rem;
}

.profile-email {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 400;
}

.profile-quick-stats {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.quick-stat-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.quick-stat-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.quick-stat-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(
        135deg,
        rgba(254, 200, 29, 0.15) 0%,
        rgba(242, 166, 5, 0.15) 100%
    );
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue-primary);
    font-size: 1.125rem;
    flex-shrink: 0;
}

.quick-stat-info {
    flex: 1;
}

.quick-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quick-stat-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.profit-positive {
    color: var(--success);
}

.account-section {
    padding: 0 1rem;
    margin-bottom: 1rem;
}

.section-header {
    margin-bottom: 0.625rem;
}

.section-header h2 {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.account-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.invitation-highlight {
    padding: 1rem;
    border: 1px solid rgba(254, 200, 29, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

/* Account Menu Styles */
.account-menu {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.menu-item-icon {
    width: 36px;
    height: 36px;
    background: rgba(254, 200, 29, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue-primary);
    font-size: 0.9375rem;
    flex-shrink: 0;
}

.menu-item-title {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.menu-item-arrow {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

/* Logout Menu Item */
.menu-item-logout {
    background: linear-gradient(
        135deg,
        rgba(248, 113, 113, 0.1) 0%,
        rgba(239, 68, 68, 0.1) 100%
    );
    width: 100%;
    cursor: pointer;
    font-family: inherit;
    border: 1px solid rgba(248, 113, 113, 0.2);
    margin-top: 0.5rem;
}

.menu-item-logout:hover {
    background: linear-gradient(
        135deg,
        rgba(248, 113, 113, 0.15) 0%,
        rgba(239, 68, 68, 0.15) 100%
    );
    border-color: rgba(248, 113, 113, 0.3);
}

.menu-item-logout .menu-item-title {
    color: var(--danger);
    font-weight: 700;
}

.menu-item-logout .menu-item-arrow {
    color: var(--danger);
}

.logout-icon {
    background: linear-gradient(
        135deg,
        rgba(248, 113, 113, 0.2) 0%,
        rgba(239, 68, 68, 0.2) 100%
    );
    color: var(--danger);
    border: 1px solid rgba(248, 113, 113, 0.2);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background: linear-gradient(
        135deg,
        var(--blue-primary) 0%,
        var(--blue-secondary) 100%
    );
}

input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* Enjoy Text */
.enjoy-text {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 1rem 0;
}

.account-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.account-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.account-item-icon {
    width: 44px;
    height: 44px;
    background: rgba(254, 200, 29, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue-primary);
    font-size: 1.125rem;
    flex-shrink: 0;
}

.account-item-content {
    flex: 1;
}

.account-item-title {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 0.125rem;
}

.account-item-subtitle {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.account-item-arrow {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.account-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
    margin: 0.25rem 0.875rem;
}

.btn-logout {
    width: 100%;
    padding: 1rem;
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.3);
    border-radius: 12px;
    color: var(--danger);
    font-size: 0.9375rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-logout:hover {
    background: rgba(248, 113, 113, 0.15);
    border-color: rgba(248, 113, 113, 0.5);
    transform: translateY(-2px);
}

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

/* ============================================
   Portfolio Page Styles
   ============================================ */

.portfolio-header {
    padding: 0.75rem 1rem;
    background: var(--bg-primary);
}

.portfolio-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.portfolio-title {
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}

.portfolio-actions {
    display: flex;
    gap: 0.5rem;
}

.portfolio-filter-btn,
.portfolio-search-btn {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.portfolio-filter-btn:hover,
.portfolio-search-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(254, 200, 29, 0.3);
}

.portfolio-value-card {
    background: linear-gradient(
        135deg,
        rgba(254, 200, 29, 0.1) 0%,
        rgba(242, 166, 5, 0.1) 100%
    );
    border: 1px solid rgba(254, 200, 29, 0.2);
    border-radius: 16px;
    padding: 1rem;
    margin-bottom: 0.875rem;
    text-align: center;
}

.portfolio-value-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.portfolio-value-amount {
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.625rem;
    background: linear-gradient(
        135deg,
        var(--blue-primary) 0%,
        var(--blue-secondary) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.portfolio-value-change {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.875rem;
    border-radius: 16px;
    font-size: 0.8125rem;
    font-weight: 700;
}

.portfolio-value-change.positive {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.portfolio-value-change.negative {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.portfolio-quick-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.625rem;
}

.portfolio-stat {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 0.75rem 0.625rem;
    text-align: center;
}

.portfolio-stat-label {
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.portfolio-stat-value {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text-primary);
}

.portfolio-stat-value.positive {
    color: var(--success);
}

.portfolio-stat-value.profit {
    color: var(--blue-primary);
}

.portfolio-section {
    padding: 0 1rem;
    margin-bottom: 1.25rem;
}

.portfolio-section .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.portfolio-section .section-header h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.section-link {
    font-size: 0.75rem;
    color: var(--blue-primary);
    text-decoration: none;
    font-weight: 600;
}

.section-link:hover {
    text-decoration: underline;
}

.sort-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    padding: 0.375rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
}

.distribution-chart {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 0.875rem;
}

.distribution-item {
    margin-bottom: 0.875rem;
}

.distribution-item:last-child {
    margin-bottom: 0;
}

.distribution-bar {
    height: 6px;
    border-radius: 3px;
    margin-bottom: 0.375rem;
    transition: all 0.3s ease;
}

.distribution-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.distribution-name {
    font-size: 0.8125rem;
    color: var(--text-primary);
    font-weight: 600;
}

.distribution-percent {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 700;
}

.holdings-list {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.holding-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
}

.holding-card:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(254, 200, 29, 0.2);
    transform: translateY(-2px);
}

.holding-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
    flex-shrink: 0;
    background: #000;
    overflow: hidden;
    padding: 4px;
}
.holding-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
}

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

.holding-name {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.1875rem;
}

.holding-amount {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.holding-value {
    text-align: right;
}

.holding-price {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.1875rem;
}

.holding-change {
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 0.1875rem 0.4375rem;
    border-radius: 5px;
    display: inline-block;
}

.holding-change.positive {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.holding-change.negative {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

/* ============================================
   Explore Page Styles
   ============================================ */

.explore-header {
    padding: 0.75rem 1rem;
    background: var(--bg-primary);
}

.explore-title {
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 0.875rem 0;
}

.explore-search-box {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.75rem;
    gap: 0.625rem;
    margin-bottom: 0.875rem;
}

.search-icon {
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-filter-btn {
    width: 32px;
    height: 32px;
    background: rgba(254, 200, 29, 0.1);
    border: 1px solid rgba(254, 200, 29, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-filter-btn:hover {
    background: rgba(254, 200, 29, 0.15);
    border-color: rgba(254, 200, 29, 0.3);
}

.explore-section {
    padding: 0 1rem;
    margin-bottom: 1rem;
}

.explore-section .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.625rem;
}

.explore-section .section-header h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.time-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    padding: 0.375rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
}

.category-chips {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
}

.category-chips::-webkit-scrollbar {
    display: none;
}

.category-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: var(--text-primary);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.category-chip:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(254, 200, 29, 0.3);
}

.category-chip.active {
    background: linear-gradient(
        135deg,
        var(--blue-primary) 0%,
        var(--blue-secondary) 100%
    );
    border-color: transparent;
    color: #000;
}

.market-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.625rem;
}

.market-stat-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.market-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    color: white;
    flex-shrink: 0;
}

.market-stat-info {
    flex: 1;
}

.market-stat-label {
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.market-stat-value {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.1875rem;
}

.market-stat-change {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-muted);
}

.market-stat-change.positive {
    color: var(--success);
}

.market-stat-change.negative {
    color: var(--danger);
}

.trending-list {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.trending-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    transition: all 0.3s ease;
}

.trending-card:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(254, 200, 29, 0.2);
    transform: translateY(-2px);
}

.trending-rank {
    width: 24px;
    height: 24px;
    background: linear-gradient(
        135deg,
        rgba(254, 200, 29, 0.2) 0%,
        rgba(242, 166, 5, 0.2) 100%
    );
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--blue-primary);
    flex-shrink: 0;
}

.trending-icon {
    width: 40px;
    height: 40px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: white;
    flex-shrink: 0;
    background-color: #000;
}

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

.trending-name {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.125rem;
}

.trending-symbol {
    font-size: 0.6875rem;
    color: var(--text-muted);
    font-weight: 500;
}

.trending-chart {
    flex-shrink: 0;
}

.trending-value {
    text-align: right;
    flex-shrink: 0;
}

.trending-price {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.125rem;
}

.trending-change {
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 0.1875rem 0.4375rem;
    border-radius: 5px;
    display: inline-block;
}

.trending-change.positive {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.trending-change.negative {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.news-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
}

.news-card:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(254, 200, 29, 0.2);
    transform: translateY(-2px);
}

.news-image {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--blue-primary);
    flex-shrink: 0;
}

.news-content {
    flex: 1;
    min-width: 0;
}

.news-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.6875rem;
    color: var(--text-muted);
}

.news-source {
    font-weight: 600;
}

.news-time {
    font-weight: 400;
}

/* ============================================
   TRADE PAGE STYLES (Crypto Detail)
   ============================================ */

.trade-page-body {
    background: #000;
    margin: 0;
    padding: 0;
}

.trade-page-body .mobile-container {
    background: #000;
    padding-bottom: 0;
}

.trade-container {
    width: 100%;
    max-width: 428px;
    margin: 0 auto;
    background: #000;
    min-height: 100vh;
    position: relative;
    padding-bottom: 2rem;
}

/* Header */
.trade-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1rem;
    background: transparent;
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.mobile-container:has(> .trade-header) {
    /* padding-top: 58px; */
}

.trade-back-btn,
.trade-notification-btn {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
}

.trade-back-btn:hover,
.trade-notification-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
}

.notification-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid #000;
}

.trade-title {
    font-size: 1.0625rem;
    font-weight: 600;
    color: #fff;
}

/* Crypto Info Bar */
.trade-crypto-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem 1rem;
    background: #000;
    margin-top: 50px;
}

.trade-crypto-logo {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    padding: 2px;
    background: #fff;
}

.trade-crypto-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.trade-crypto-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.trade-crypto-symbol {
    font-size: 0.8125rem;
    color: #6b7280;
    font-weight: 500;
}

.trade-crypto-price {
    font-size: 1.625rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 0.125rem;
}

.trade-crypto-change {
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.trade-crypto-change.positive {
    color: #22c55e;
}

.trade-crypto-change.negative {
    color: #ef4444;
}

.trade-crypto-change i {
    font-size: 0.625rem;
}

.trade-pair-info {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding-top: 0.25rem;
}

.trade-pair {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.2;
}

.trade-volume {
    font-size: 0.6875rem;
    color: #6b7280;
    font-weight: 500;
}

.trade-volume span {
    color: #22c55e;
    font-weight: 600;
}

/* Action Buttons */
.trade-action-buttons {
    display: flex;
    gap: 0.625rem;
    /* padding: 0 1rem 1rem; */
}

.trade-sell-btn,
.trade-buy-btn {
    flex: 1;
    padding: 8px 20px;
    border-radius: 6px;
    white-space: nowrap;
    font-size: 0.8125rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    transition: all 0.3s ease;
    height: 30px;
}

.trade-sell-btn {
    background: #dc2626;
    color: #fff;
}

.trade-sell-btn:hover {
    background: #b91c1c;
}

.trade-buy-btn {
    background: #22c55e;
    color: #fff;
}

.trade-buy-btn:hover {
    background: #16a34a;
}

/* Favourite / Watchlist button */
.trade-favorite-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.trade-favorite-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #9ca3af;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.trade-favorite-btn:hover {
    border-color: #fec81d;
    color: #fec81d;
    background: rgba(254, 200, 29, 0.1);
    transform: scale(1.05);
}

.trade-favorite-btn.active {
    border-color: #fec81d;
    background: rgba(254, 200, 29, 0.15);
    color: #fec81d;
    box-shadow: 0 0 12px rgba(254, 200, 29, 0.35);
}

.trade-favorite-btn.active i {
    font-weight: 900; /* switches far → fas visually */
}

.trade-favorite-label {
    font-size: 0.6rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: color 0.25s ease;
}

.trade-favorite-btn.active + .trade-favorite-label {
    color: #fec81d;
}

/* Price and Stats Section */
.trade-price-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    padding: 10px;
    background: #000;
}

.main-price-and-actions {
    display: flex;
    flex-direction: row;
    padding: 10px;
    width: 100%;
    justify-content: space-between;
    border-bottom: 1px solid #80808047;
}

.trade-price-main {
    flex: 1;
}

.trade-price-display {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.trade-price-change-info {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.trade-price-change-info.positive {
    color: #22c55e;
}

.trade-price-change-info.negative {
    color: #ef4444;
}

.trade-price-change-info i {
    font-size: 0.625rem;
}

.today-label {
    color: #6b7280;
    margin-left: 0.125rem;
}

.trade-pair-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.trade-pair-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
}

.trade-volume-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
}

.volume-value {
    color: #22c55e;
    font-weight: 600;
}

/* Market Section */
.trade-market-section {
    padding: 0.875rem 1rem;
    background: #000;
}

.trade-market-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.trade-market-title {
    font-size: 0.9375rem;
    font-weight: 500;
    color: #fff;
}

.trade-market-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.trade-search-btn,
.trade-add-btn {
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 0.9375rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.trade-add-btn {
    background: #fec81d;
    color: #000;
    border-radius: 6px;
    font-size: 1rem;
}

.trade-add-btn:hover {
    background: #f8b30d;
}

/* Crypto Tabs */
.trade-crypto-tabs {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 0.25rem;
}

.trade-crypto-tabs::-webkit-scrollbar {
    display: none;
}

.trade-crypto-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    color: #9ca3af;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.trade-crypto-tab:hover {
    background: #242424;
}

.trade-crypto-tab.active {
    background: #5b8def;
    border-color: #5b8def;
    color: #fff;
}

.trade-tab-icon {
    font-size: 0.875rem;
    font-weight: 900;
    color: #6b7280;
}

.trade-tab-logo {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.trade-tab-name {
    font-size: 0.8125rem;
}

/* Period Selector */
.trade-period-selector {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.75rem 1rem 0.5rem;
    background: #000;
    overflow-x: auto;
    scrollbar-width: none;
}

.trade-period-selector::-webkit-scrollbar {
    display: none;
}

.trade-period-btn {
    padding: 0.375rem 0.625rem;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.trade-period-btn:hover {
    background: rgba(254, 200, 29, 0.1);
}

.trade-period-btn.active {
    background: #fec81d;
    color: #000;
}

.trade-chart-type-btn {
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    color: #fec81d;
    font-size: 0.875rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    flex-shrink: 0;
    border-radius: 6px;
    transition: background 0.2s;
}

.trade-chart-type-btn:hover {
    background: rgba(254, 200, 29, 0.12);
}

/* Chart Container */
.trade-chart-container {
    padding: 0.5rem 0 1.5rem;
    background: #000;
    position: relative;
    height: 400px;
}

.trade-chart-price-indicator {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: #fec81d;
    color: #000;
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 10;
}

/* ── Stock Detail: Position & News ───────────────────────────────────────── */

.stkd-section {
    padding: 0 1rem 0.25rem;
    margin-top: 1.25rem;
}

.stkd-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.stkd-section-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #f9fafb;
}

/* Position card */
.stkd-position-card {
    background: #19212a;
    border-radius: 14px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.stkd-pos-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.stkd-pos-stat {
    text-align: center;
}

.stkd-pos-label {
    font-size: 0.65rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.stkd-pos-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: #f9fafb;
}

.stkd-pos-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 0.85rem 0;
}

.stkd-pos-sell-btn {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    padding: 0.3rem 0.9rem;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.stkd-pos-sell-btn:hover {
    background: rgba(239, 68, 68, 0.28);
}

/* Empty position state */
.stkd-empty-position {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem 1rem;
    background: #19212a;
    border-radius: 14px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    gap: 0.5rem;
}

.stkd-empty-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(254, 200, 29, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #fec81d;
    margin-bottom: 0.25rem;
}

.stkd-empty-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #f9fafb;
}

.stkd-empty-sub {
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.4;
    max-width: 260px;
}

.stkd-empty-buy-btn {
    margin-top: 0.5rem;
    background: #fec81d;
    color: #000;
    border: none;
    border-radius: 10px;
    padding: 0.6rem 1.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
}

.stkd-empty-buy-btn:hover {
    opacity: 0.88;
}

/* Transaction history */
.stkd-txn-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stkd-txn-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #19212a;
    border-radius: 10px;
    padding: 0.65rem 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stkd-txn-badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.stkd-txn-info {
    flex: 1;
    min-width: 0;
}

.stkd-txn-shares {
    font-size: 0.8rem;
    font-weight: 600;
    color: #f9fafb;
}

.stkd-txn-date {
    font-size: 0.68rem;
    color: #6b7280;
    margin-top: 2px;
}

.stkd-txn-total {
    font-size: 0.82rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* News list */
.stkd-news-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-bottom: 1.5rem;
}

.stkd-news-card {
    display: flex;
    gap: 0.75rem;
    background: #19212a;
    border-radius: 12px;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    text-decoration: none;
    transition: background 0.2s;
    align-items: flex-start;
}

.stkd-news-card:hover {
    background: #1f2c3a;
}

.stkd-news-img {
    width: 72px;
    height: 72px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: #111;
}

.stkd-news-body {
    flex: 1;
    min-width: 0;
}

.stkd-news-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
}

.stkd-news-source {
    font-size: 0.68rem;
    font-weight: 700;
    color: #fec81d;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stkd-news-time {
    font-size: 0.68rem;
    color: #6b7280;
}

.stkd-news-headline {
    font-size: 0.82rem;
    font-weight: 600;
    color: #f9fafb;
    line-height: 1.35;
    margin-bottom: 0.3rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.stkd-news-summary {
    font-size: 0.73rem;
    color: #9ca3af;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/*  Trade Modal (compact drawer)  */
.stkd-modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 200;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.stkd-modal {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    width: 100%;
    max-width: 420px;
    background: #111820;
    border-radius: 10px 10px 0 0;
    z-index: 201;
    transition: transform 0.3s cubic-bezier(0.32, 1, 0.4, 1);
    padding-bottom: env(safe-area-inset-bottom, 12px);
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}
.stkd-modal.open {
    transform: translateX(-50%) translateY(0);
}

.tm-handle {
    width: 36px;
    height: 3.5px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.12);
    margin: 8px auto 0;
}

.tm-inner {
    padding: 0 20px 14px;
}

/* header with logo */
.tm-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.tm-hdr-logo {
    width: 45px;
    height: 45px;
    border-radius: 6px;
    object-fit: cover;
    background: #fff;
    flex-shrink: 0;
}
.tm-hdr-logo-fb {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #374151, #1f2937);
}
.tm-subtitle {
    display: block;
    font-size: 0.68rem;
    color: #6b7280;
    font-weight: 500;
    margin-top: 1px;
}

.tm-action-badge {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    vertical-align: 1px;
    margin-right: 4px;
}
.tm-action-badge.buy {
    background: rgba(34, 197, 94, 0.14);
    color: #22c55e;
}
.tm-action-badge.sell {
    background: rgba(239, 68, 68, 0.14);
    color: #ef4444;
}

/* header row */
.tm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0 10px;
}
.tm-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #f9fafb;
    letter-spacing: -0.2px;
}
.tm-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: none;
    color: #6b7280;
    font-size: 11px;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition:
        background 0.15s,
        color 0.15s;
}
.tm-close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #f9fafb;
}

/* price row */
.tm-price-row {
    display: flex;
    align-items: center;
    gap: 7px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.tm-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
    animation: tm-pulse 1.6s ease-in-out infinite;
}
.tm-live-dot.buy {
    background: #22c55e;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.45);
}
.tm-live-dot.sell {
    background: #ef4444;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.45);
}
@keyframes tm-pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.35;
    }
}
.tm-price-val {
    font-size: 16px;
    font-weight: 500;
    color: #fff;
    letter-spacing: -0.5px;
    font-variant-numeric: tabular-nums;
    margin-left: auto;
}
.tm-price-lbl {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}
.tm-owns {
    margin-left: auto;
    font-size: 0.68rem;
    color: #6b7280;
    font-weight: 500;
}
.tm-owns strong {
    color: #f9fafb;
    font-weight: 700;
}

/* input fields */
.tm-input-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin: 14px 0 10px;
}
.tm-field {
    flex: 1;
    min-width: 0;
    width: 100%;
}
.tm-field-label {
    display: block;
    font-size: 0.62rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 5px;
}
.tm-field-input {
    width: 100%;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #f9fafb;
    font-size: 0.92rem;
    font-weight: 700;
    font-family: inherit;
    font-variant-numeric: tabular-nums;
    outline: none;
    transition:
        border-color 0.15s,
        box-shadow 0.15s;
    -moz-appearance: textfield;
    box-sizing: border-box;
}
.tm-field-input::-webkit-outer-spin-button,
.tm-field-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}
.tm-field-input::placeholder {
    color: #4b5563;
    font-weight: 500;
}
.tm-field-input:focus {
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.04);
}
.tm-field-money {
    position: relative;
}
.tm-field-currency {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-size: 0.88rem;
    font-weight: 700;
    pointer-events: none;
}
.tm-field-money .tm-field-input {
    padding-left: 26px;
    padding-right: 52px;
}
.tm-field-all-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fec81d;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 4px 10px;
    border-radius: 5px;
    cursor: pointer;
    transition:
        background 0.15s,
        border-color 0.15s;
}
.tm-field-all-btn:hover {
    background: rgba(254, 200, 29, 0.12);
    border-color: rgba(254, 200, 29, 0.25);
}
.tm-field-all-btn:active {
    transform: translateY(-50%) scale(0.96);
}
/* balance / shares-owned row */
.tm-balance-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    column-gap: 6px;
    padding: 0 2px;
    margin: -2px 0 12px;
}
.tm-balance-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}
.tm-balance-value {
    font-size: 0.68rem;
    color: #f9fafb;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.tm-field-divider {
    color: #4b5563;
    font-size: 0.68rem;
    font-weight: 600;
    padding-top: 22px;
    flex-shrink: 0;
}

/* sell presets */
.tm-presets {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}
.tm-preset {
    flex: 1;
    padding: 5px 2px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: #6b7280;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s;
    font-family: inherit;
}
.tm-preset:hover {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.2);
    color: #f87171;
}
.tm-preset.on {
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
}

/* shares input wrapper (positions presets inside input) */
.tm-field-shares {
    position: relative;
}
.tm-field-shares .tm-field-input {
    padding-right: 170px;
}
/* share quantity quick-select presets (10, 20, 50, 100) */
.tm-share-presets {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 4px;
}
.tm-share-preset {
    padding: 3px 8px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #6b7280;
    font-size: 0.62rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s;
    font-family: inherit;
    line-height: 1.2;
}
.tm-share-presets.buy .tm-share-preset:hover {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
    color: #4ade80;
}
.tm-share-presets.buy .tm-share-preset.on {
    background: rgba(34, 197, 94, 0.16);
    border-color: rgba(34, 197, 94, 0.4);
    color: #4ade80;
}
.tm-share-presets.sell .tm-share-preset:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.25);
    color: #f87171;
}
.tm-share-presets.sell .tm-share-preset.on {
    background: rgba(239, 68, 68, 0.16);
    border-color: rgba(239, 68, 68, 0.35);
    color: #f87171;
}
.tm-share-preset.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}
.tm-share-preset-all {
    color: #fec81d !important;
    border-color: rgba(254, 200, 29, 0.15) !important;
    background: rgba(254, 200, 29, 0.06) !important;
}
.tm-share-preset-all:hover {
    background: rgba(254, 200, 29, 0.14) !important;
    border-color: rgba(254, 200, 29, 0.3) !important;
}

/* advanced options dropdown */
.tm-advanced {
    margin: 6px 0 8px;
}
.tm-advanced-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    color: #9ca3af;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition:
        background 0.15s,
        border-color 0.15s;
    font-family: inherit;
}
.tm-advanced-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #d1d5db;
}
.tm-advanced-icon {
    font-size: 0.7rem;
    color: #fec81d;
}
.tm-advanced-arrow {
    margin-left: auto;
    font-size: 0.6rem;
    transition: transform 0.2s ease;
}
.tm-advanced-toggle.open .tm-advanced-arrow {
    transform: rotate(180deg);
}
.tm-advanced-body {
    display: none;
    padding: 10px 0 2px;
}
.tm-advanced-body.open {
    display: block;
}
.tm-advanced-option {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 10px 12px;
}
.tm-advanced-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.tm-advanced-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}
.tm-advanced-label {
    font-size: 0.74rem;
    font-weight: 600;
    color: #e5e7eb;
}
.tm-advanced-hint {
    font-size: 0.64rem;
    color: #6b7280;
    line-height: 1.35;
}
/* toggle switch */
.tm-advanced-switch {
    position: relative;
    width: 36px;
    min-width: 36px;
    height: 20px;
    margin-top: 1px;
}
.tm-advanced-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.tm-switch-slider {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.2s;
}
.tm-switch-slider::before {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    left: 2px;
    bottom: 2px;
    background: #6b7280;
    border-radius: 50%;
    transition:
        transform 0.2s,
        background 0.2s;
}
.tm-advanced-switch input:checked + .tm-switch-slider {
    background: rgba(34, 197, 94, 0.25);
}
.tm-advanced-switch input:checked + .tm-switch-slider::before {
    transform: translateX(16px);
    background: #22c55e;
}
/* auto-sell input area */
.tm-autosell-input-wrap {
    margin-top: 10px;
}
.tm-autosell-input-wrap .tm-field-money {
    position: relative;
}
.tm-autosell-input-wrap .tm-field-input {
    padding-left: 30px;
    font-size: 0.82rem;
}
.tm-autosell-preview {
    font-size: 0.64rem;
    color: #6b7280;
    margin-top: 4px;
    padding: 0 2px;
    min-height: 1em;
}
.tm-autosell-preview .profit-green {
    color: #22c55e;
    font-weight: 700;
}

/* summary lines (no card wrapper) */
.tm-summary {
    padding: 8px 0 4px;
    /* border-top: 1px solid rgba(255,255,255,.06); */
}
.tm-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    font-size: 0.78rem;
    color: #6b7280;
}
.tm-line span:last-child {
    color: #d1d5db;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.tm-line-fee {
    font-size: 0.72rem;
}
.tm-line-fee span:last-child {
    color: #9ca3af;
    font-weight: 500;
}
.tm-fee-badge {
    display: inline-block;
    font-size: 0.55rem;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 3px;
    background: rgba(254, 200, 29, 0.1);
    color: #fec81d;
    margin-left: 3px;
    vertical-align: 1px;
}
.tm-line-total {
    margin-top: 2px;
    padding-top: 6px;
    border-top: 1px dashed rgba(255, 255, 255, 0.06);
    font-size: 0.82rem;
}
.tm-line-total span:first-child {
    color: #e5e7eb;
    font-weight: 600;
}
.tm-line-total span:last-child {
    color: #fff;
    font-weight: 800;
    font-size: 0.95rem;
}

/* error */
.tm-error {
    font-size: 0.72rem;
    font-weight: 600;
    color: #f87171;
    min-height: 14px;
    text-align: center;
    padding: 2px 0 0;
}

/* CTA */
.tm-cta {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 14px;
    border-radius: 12px;
    border: none;
    font-weight: 800;
    font-size: 0.88rem;
    cursor: pointer;
    font-family: inherit;
    transition:
        opacity 0.18s,
        transform 0.15s;
    text-align: center;
}
.tm-cta:hover {
    opacity: 0.88;
}
.tm-cta:active {
    transform: scale(0.98);
}
.tm-cta:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none;
}
.tm-cta.buy {
    background: #22c55e;
    color: #fff;
}
.tm-cta.sell {
    background: #ef4444;
    color: #fff;
}

/* hide old classes that are no longer used but may still linger */
.stkd-modal-handle,
.stkd-modal-price-block,
.stkd-modal-price-label,
.stkd-modal-price-value,
.stkd-modal-price-sub,
.stkd-modal-divider,
.stkd-modal-body,
.stkd-modal-label,
.stkd-modal-input,
.stkd-modal-pills,
.stkd-modal-pill,
.stkd-modal-total,
.stkd-modal-total-val,
.stkd-modal-footer,
.stkd-modal-cancel-btn,
.stkd-modal-buy-btn {
    display: none !important;
}

#tradingChart {
    width: 100%;
    height: 300px;
    background: #000;
}

#cryptoChart {
    width: 100% !important;
    height: 100% !important;
}

#cryptoChart > div {
    width: 100% !important;
    height: 100% !important;
}

#tradingview_chart {
    width: 100%;
    height: 400px;
    background: #000;
    border: none !important;
    outline: none !important;
}

#tradingview_chart iframe {
    border: none !important;
    outline: none !important;
}

.trade-chart-timeline {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0.25rem 0;
    font-size: 0.6875rem;
    color: #6b7280;
    font-weight: 500;
}

/* Bottom Actions */
.trade-bottom-actions {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    z-index: 100;
}

.trade-action-icon-btn {
    width: 44px;
    height: 44px;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    color: #6b7280;
    font-size: 0.9375rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.trade-action-icon-btn.active {
    background: #fec81d;
    border-color: #fec81d;
    color: #000;
}

.trade-action-icon-btn:hover {
    background: #2a2a2a;
    border-color: #3a3a3a;
}

.trade-action-icon-btn.active:hover {
    background: #f8b30d;
}

/* ============================================
   Crypto Detail Page Styles (Old - Keep for compatibility)
   ============================================ */

.crypto-header {
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-primary);
}

.crypto-header-info {
    flex: 1;
    text-align: center;
}

.crypto-header-symbol {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.back-btn {
    width: 36px;
    height: 36px;
    background: var(--bg-card);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-2px);
}

.crypto-price-section {
    padding: 0.75rem 1rem 1rem;
    text-align: center;
    background: var(--bg-primary);
}

.crypto-logo-name {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.875rem;
}

.crypto-detail-logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.crypto-detail-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: left;
}

.crypto-detail-symbol {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 500;
    text-align: left;
}

.crypto-current-price {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
    background: linear-gradient(
        135deg,
        var(--blue-primary) 0%,
        var(--blue-secondary) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.crypto-price-change {
    font-size: 0.9375rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.875rem;
    border-radius: 16px;
}

.crypto-price-change.positive {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.crypto-price-change.negative {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.time-period-selector {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.875rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.time-period-selector::-webkit-scrollbar {
    display: none;
}

.period-btn {
    padding: 0.5rem 0.875rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.period-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(254, 200, 29, 0.3);
}

.period-btn.active {
    background: linear-gradient(
        135deg,
        var(--blue-primary) 0%,
        var(--blue-secondary) 100%
    );
    border-color: transparent;
    color: #000;
}

.price-chart {
    margin-bottom: 1rem;
}

.chart-svg {
    width: 100%;
    height: 200px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 1rem;
}

.market-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.625rem;
}

.stat-item {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 0.875rem;
}

.stat-label {
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin-bottom: 0.375rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text-primary);
}

.about-crypto {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 0.875rem;
}

.about-text {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0.625rem;
    max-height: 3.9em;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.about-text.expanded {
    max-height: 500px;
}

.read-more-btn {
    background: transparent;
    border: none;
    color: var(--blue-primary);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    transition: all 0.3s ease;
}

.read-more-btn:hover {
    color: var(--blue-secondary);
}

.read-more-btn i {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.price-chart-container {
    padding: 0 1rem;
    margin-bottom: 1.25rem;
}

/* ─── Markets / Stocks List Page ─────────────────────────────────────── */
@keyframes skeletonPulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.4;
    }
}

.skeleton-card {
    animation: skeletonPulse 1.4s ease-in-out infinite;
    pointer-events: none;
}

#sectorChips::-webkit-scrollbar {
    display: none;
}
#sectorChips {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.stock-tab-panel {
    padding-bottom: 60px;
}
