@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/static/fonts/inter-400-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/static/fonts/inter-500-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/static/fonts/inter-600-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/static/fonts/inter-700-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --page-bg: #050814;
    --page-grad-green: rgba(34, 197, 94, 0.10);
    --page-grad-blue: rgba(59, 130, 246, 0.10);

    --text: rgba(255, 255, 255, 0.92);
    --muted: rgba(255, 255, 255, 0.62);
    --muted-2: rgba(255, 255, 255, 0.42);

    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.12);
    --hover: rgba(255, 255, 255, 0.03);

    --surface-bg-top: rgba(255, 255, 255, 0.035);
    --surface-bg-bottom: rgba(255, 255, 255, 0.015);
    --surface-border: rgba(148, 163, 184, 0.16);
    --surface-radius: 18px;
    --surface-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);

    --control-bg: rgba(255, 255, 255, 0.04);
    --control-border: rgba(255, 255, 255, 0.14);
}

body {
    background:
        radial-gradient(1100px 700px at 20% -10%, var(--page-grad-green), transparent 55%),
        radial-gradient(900px 600px at 85% 8%, var(--page-grad-blue), transparent 55%),
        var(--page-bg) !important;
    color: var(--text) !important;
}

/* Navbar: consistent translucent dark bar */
.navbar {
    background: rgba(5, 8, 20, 0.88) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    backdrop-filter: blur(10px);
}

/* Keep navbar and dropdown typography aligned with homepage styling. */
.navbar .navbar-brand,
.navbar .navbar-links a,
.navbar .user-button,
.navbar .dropdown-menu a,
.navbar .discord-button {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

.navbar-links a,
.user-button,
.discord-button {
    color: rgba(255, 255, 255, 0.92) !important;
}

.navbar-links a:hover,
.user-button:hover,
.discord-button:hover {
    color: rgba(255, 255, 255, 1) !important;
}

/* Dropdown menu links: white text (preserve logout red) */
.dropdown-menu a:not(.logout) {
    color: rgba(255, 255, 255, 0.92) !important;
}

.dropdown-menu a.logout {
    color: #EF4444 !important;
}

/* Guest login action in user dropdown */
.dropdown-menu a.login {
    color: #22C55E !important;
}

.dropdown-menu a.login:hover {
    color: #34D399 !important;
    background: rgba(16, 185, 129, 0.14) !important;
}

/* Premium marker in navbar dropdowns: crown on My Statistics across all pages. */
.navbar .dropdown-menu a[data-premium] {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.navbar .dropdown-menu a[data-premium]::after {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: auto;
    background: url("/static/Premiumcrown32.png") center/contain no-repeat;
    flex-shrink: 0;
}

.navbar .dropdown-menu a[href="/bookmarks"]::after {
    display: none;
}

/* Dashboard action button: match the new outlined/glass control style */
.show-graph-btn {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    color: rgba(255, 255, 255, 0.92) !important;
    border-radius: 10px !important;
    padding: 0.55rem 1rem !important;
    font-size: 0.85rem !important;
    font-weight: 650 !important;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.05s;
}

.show-graph-btn:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(91, 159, 237, 0.55) !important;
    transform: translateY(-1px);
}

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

.show-graph-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(91, 159, 237, 0.24);
}

@media (min-width: 769px) {
    table.dashboard-table .show-graph-btn {
        white-space: nowrap;
        min-width: 102px;
    }
}

/* Layout wrappers: keep pages "containerless" */
.container,
.page-container,
.about-container,
.legal-container,
.guide-container,
.landing-container,
.profile-container,
.support-container {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

/* Surface containers: match the inspiration "outlined glass" cards */
[class$="-card"],
[class*="-card "],
.activate-container,
.login-container,
.plan-card,
.payment-card,
.steps-card,
.success-container,
table,
.dropdown-menu,
.column-filter-dropdown,
.graph-row .graph-container {
    background: linear-gradient(180deg, var(--surface-bg-top) 0%, var(--surface-bg-bottom) 100%) !important;
    border: 1px solid var(--surface-border) !important;
    border-radius: var(--surface-radius) !important;
    box-shadow: var(--surface-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(10px);
}

/* Dropdown menus: use a more opaque fill for readability */
.dropdown-menu,
.column-filter-dropdown {
    background: linear-gradient(180deg, rgba(8, 12, 26, 0.96) 0%, rgba(5, 8, 20, 0.92) 100%) !important;
    border-color: rgba(148, 163, 184, 0.22) !important;
}

/* Exceptions: intentionally containerless on item pages */
.stat-card {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    backdrop-filter: none !important;
}

/* Dashboard dropdown graphs: match item page style (no inner card) */
.graph-row .graph-container {
    background: #050814 !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0.25rem 0 0 0 !important;
    backdrop-filter: none !important;
}

.graph-row .chart-wrapper {
    margin-top: 0.4rem !important;
}

.graph-row .price-chart-container {
    height: 300px !important;
}

.graph-row .volume-chart-container {
    height: 95px !important;
    margin-top: 6px !important;
}

/* Mobile graph interaction: prevent iOS long-press text selection while dragging the indicator line */
@media (max-width: 900px) {
    .graph-container,
    .graph-container .chart-wrapper,
    .graph-container .price-chart-container,
    .graph-container .volume-chart-container,
    .graph-container canvas {
        -webkit-user-select: none;
        user-select: none;
        -webkit-touch-callout: none;
        -webkit-tap-highlight-color: transparent;
    }

    .graph-container .price-chart-container,
    .graph-container .volume-chart-container,
    .graph-container canvas {
        touch-action: pan-y;
    }
}

/* Dashboard graph high/low summary (desktop table + mobile cubes) */
.graph-row .period-high-low,
.dashboard-cube .period-high-low {
    margin-top: 0.6rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}

.graph-row .period-high-low-card,
.dashboard-cube .period-high-low-card {
    appearance: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 0.6rem 0.82rem;
    min-width: 0;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.05s ease;
}

.graph-row .period-high-low-card.compact,
.dashboard-cube .period-high-low-card.compact {
    justify-content: center;
    text-align: center;
}

.graph-row .period-high-low-card.compact .period-high-low-label,
.dashboard-cube .period-high-low-card.compact .period-high-low-label {
    width: 100%;
    text-align: center;
    margin: 0;
}

.graph-row .period-high-low-card:hover,
.dashboard-cube .period-high-low-card:hover {
    border-color: rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.05);
}

.graph-row .period-high-low-card:active,
.dashboard-cube .period-high-low-card:active {
    transform: translateY(1px);
}

.graph-row .period-high-low-card:focus-visible,
.dashboard-cube .period-high-low-card:focus-visible {
    outline: 2px solid rgba(147, 197, 253, 0.85);
    outline-offset: 1px;
}

.graph-row .period-high-low-card.disabled,
.dashboard-cube .period-high-low-card.disabled,
.graph-row .period-high-low-card:disabled,
.dashboard-cube .period-high-low-card:disabled {
    cursor: default;
    opacity: 0.68;
}

.graph-row .period-high-low-label,
.dashboard-cube .period-high-low-label {
    font-size: 0.72rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.56);
    white-space: nowrap;
    flex-shrink: 0;
}

.graph-row .period-high-low-value,
.dashboard-cube .period-high-low-value {
    font-size: 1rem;
    font-weight: 750;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.01em;
    color: #DBEAFE;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-left: auto;
    text-align: right;
}

/* Graph controls (tabs mode) */
.graph-controls-tabs {
    justify-content: space-between !important;
    gap: 1rem;
}

.graph-line-legend {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.72);
    user-select: none;
}

.graph-line-legend .legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.graph-line-legend .legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
}

.graph-line-legend .legend-dot.sell {
    background: #22c55e;
}

.graph-line-legend .legend-dot.buy {
    background: #fb7185;
}

.graph-range-tabs {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.graph-range-btn {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.75);
    padding: 0.4rem 0.7rem;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.05s;
}

.graph-range-btn:hover {
    border-color: rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.06);
}

.graph-range-btn:active {
    transform: translateY(1px);
}

.graph-range-btn.active {
    background: rgba(255, 255, 255, 0.92);
    color: rgba(10, 12, 18, 0.95);
    border-color: rgba(255, 255, 255, 0.92);
}

@media (max-width: 768px) {
    .graph-controls-tabs {
        flex-direction: row;
        align-items: center;
        gap: 0.6rem;
    }

    .graph-range-tabs {
        margin-left: auto;
        flex-wrap: nowrap;
        justify-content: flex-end;
    }

    .graph-range-btn {
        padding: 0.35rem 0.6rem;
        font-size: 0.78rem;
    }

    .dashboard-cube .period-high-low {
        margin-top: 0.5rem;
        gap: 0.42rem;
    }

    .dashboard-cube .period-high-low-card {
        gap: 0.45rem;
        padding: 0.45rem 0.58rem;
    }

    .dashboard-cube .period-high-low-label {
        font-size: 0.64rem;
    }

    .dashboard-cube .period-high-low-value {
        font-size: 0.84rem;
    }
}

/* Tables: separators and subtle hover */
table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    overflow: hidden !important;
}

/* Responsive table wrapper: prevents page overflow on small screens */
.table-wrap {
    min-width: 0;
    width: 100%;
    margin-top: 10px;
    position: relative;
}

.table-wrap[data-loading="true"] {
    min-height: 780px;
}

.table-wrap[data-loading="true"] .dashboard-table {
    visibility: hidden;
}

.dashboard-table-skeleton {
    display: none;
    position: absolute;
    inset: 0;
    border-radius: 12px;
    overflow: hidden;
    pointer-events: none;
    background: rgba(33, 37, 46, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.25rem 0;
}

.table-wrap[data-loading="true"] .dashboard-table-skeleton {
    display: block;
}

.dashboard-table-skeleton-row {
    display: grid;
    grid-template-columns: 64px minmax(150px, 1.8fr) repeat(7, minmax(74px, 1fr)) 110px;
    gap: 0.75rem;
    align-items: center;
    padding: 0.8rem 1rem;
}

.dashboard-skeleton-cell {
    height: 13px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.16) 45%, rgba(255, 255, 255, 0.07) 100%);
    background-size: 220% 100%;
    animation: dashboardSkeletonPulse 1.35s ease-in-out infinite;
}

.dashboard-skeleton-cell.bookmark {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    justify-self: center;
}

.dashboard-skeleton-cell.item {
    width: min(250px, 92%);
}

.dashboard-skeleton-cell.action {
    width: 90px;
    justify-self: end;
}

@keyframes dashboardSkeletonPulse {
    0% { background-position: 100% 0; opacity: 0.72; }
    50% { opacity: 1; }
    100% { background-position: -120% 0; opacity: 0.72; }
}

.table-wrap > table {
    margin-top: 0 !important;
}

@media (max-width: 768px) {
    .table-wrap {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        border-radius: var(--surface-radius);
    }
}

/* Recent trades table (shared; item page also inlines these) */
.recent-trades-section {
    margin-top: 1rem;
}

.recent-trades-section h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 0.75rem 0;
}

.recent-trades-container {
    background: transparent;
    border: none;
    border-radius: 0;
    overflow: hidden;
}

.recent-trades-loading,
.recent-trades-empty,
.recent-trades-error {
    padding: 1.25rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.recent-trades-error {
    color: #EF4444;
    background: rgba(239, 68, 68, 0.1);
}

.recent-trades-table-wrap {
    width: 100%;
    overflow-x: auto;
}

table.recent-trades-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
    margin-top: 0;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    overflow: visible !important;
}

.recent-trades-table th,
.recent-trades-table td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    vertical-align: middle;
    background: transparent !important;
}

.recent-trades-table thead th {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.48);
    font-weight: 600;
    text-align: left;
    position: static !important;
    top: auto !important;
    z-index: auto !important;
    background: transparent !important;
}

.recent-trades-table tbody tr,
.recent-trades-table tr:nth-child(even),
.recent-trades-table tr:nth-child(odd) {
    background: transparent !important;
}

.recent-trades-table tbody tr:hover {
    background: transparent !important;
}

.recent-trades-table td.num,
.recent-trades-table th.num {
    text-align: right;
    white-space: nowrap;
}

.trade-time {
    font-weight: 650;
    color: rgba(255, 255, 255, 0.85);
}

.trade-age {
    margin-top: 0.15rem;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.40);
    white-space: nowrap;
}

.gp-value {
    font-weight: 750;
    letter-spacing: 0.2px;
}

.gp-suffix {
    margin-left: 0.25rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 600;
}

.cell-dash {
    color: rgba(255, 255, 255, 0.35);
}

.recent-trades-table tbody tr:last-child td {
    border-bottom: none;
}

@media (max-width: 768px) {
    table.recent-trades-table {
        min-width: 0;
        display: block;
    }

    .recent-trades-table thead {
        display: none;
    }

    .recent-trades-table tbody {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    .recent-trades-table tbody tr {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.4rem 0.9rem;
        padding: 0.9rem;
        border-radius: 12px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        background: rgba(255, 255, 255, 0.02) !important;
    }

    .recent-trades-table tbody td {
        padding: 0.25rem 0;
        border-bottom: none;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        gap: 0.25rem;
        min-width: 0;
    }

    .recent-trades-table tbody td::before {
        content: attr(data-label);
        color: rgba(255, 255, 255, 0.45);
        font-size: 0.68rem;
        font-weight: 650;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        white-space: nowrap;
        flex: 0 0 auto;
    }

    .recent-trades-table td.num,
    .recent-trades-table th.num {
        text-align: left;
    }

    .recent-trades-table tbody td:first-child {
        grid-column: 1 / -1;
        padding-bottom: 0.45rem;
        justify-content: flex-start;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }

    .recent-trades-table tbody td:first-child::before {
        content: '';
        display: none;
    }

    /* Optical alignment: timestamps can look indented vs uppercase labels on iOS */
    .recent-trades-table tbody td:first-child .trade-time,
    .recent-trades-table tbody td:first-child .trade-age {
        margin-left: -4px;
    }

    .gp-suffix {
        display: none;
    }
}

/* Dashboard mobile "cube" view */
#mobileDashboardBar,
#mobileDashboardGrid {
    display: none;
}

@media (max-width: 768px) {
    body.mobile-cube-open {
        overflow: hidden;
    }

    body.mobile-cube-open #mobileDashboardBar {
        display: none;
    }

    .mobile-cube-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.55);
        backdrop-filter: blur(6px);
        z-index: 1100;
    }

    #dashboardTableWrap {
        display: none;
    }

    .pagination .items-per-page {
        display: none;
    }

    #mobileDashboardBar {
        display: flex;
        align-items: center;
        flex-wrap: nowrap;
        gap: 0.6rem;
        margin: 0.75rem 0 0.85rem 0;
        --mobile-dashboard-control-height: 42px;
    }

    #mobileDashboardBar .mobile-dashboard-label {
        color: rgba(255, 255, 255, 0.72);
        font-size: 0.85rem;
        font-weight: 600;
        margin: 0;
        height: var(--mobile-dashboard-control-height);
        display: inline-flex;
        align-items: center;
        line-height: 1;
        white-space: nowrap;
    }

    #mobileDashboardBar .mobile-dashboard-select {
        flex: 1;
        min-width: 0;
        appearance: none;
        background: var(--control-bg);
        border: 1px solid var(--control-border);
        color: rgba(255, 255, 255, 0.9);
        height: var(--mobile-dashboard-control-height);
        padding: 0 0.8rem;
        margin: 0;
        border-radius: 12px;
        font-weight: 600;
        line-height: 1;
    }

    #mobileDashboardBar .mobile-sort-dir {
        flex: 0 0 auto;
        height: var(--mobile-dashboard-control-height);
        min-height: var(--mobile-dashboard-control-height);
        padding: 0 0.75rem;
        margin: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 12px;
        border: 1px solid rgba(255, 255, 255, 0.14);
        background: rgba(255, 255, 255, 0.04);
        color: rgba(255, 255, 255, 0.82);
        font-weight: 800;
        line-height: 1;
        cursor: pointer;
        user-select: none;
    }

    #mobileDashboardBar .dash-column-dropdown {
        position: relative;
        display: inline-flex;
        align-items: center;
        flex: 0 0 auto;
        margin-left: 0;
    }

    #mobileDashboardBar .dash-column-button {
        height: var(--mobile-dashboard-control-height);
        min-height: var(--mobile-dashboard-control-height);
        padding: 0 0.75rem;
        border-radius: 12px;
        font-size: 0.88rem;
    }

    #mobileDashboardBar .dash-column-menu {
        right: 0;
        left: auto;
        width: min(92vw, 360px);
    }

    #mobileDashboardGrid {
        --mobile-cube-collapsed-min-height: 112px;
        --mobile-cube-collapsed-padding: 0.85rem;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
        align-content: start;
    }

    #mobileDashboardGrid[data-loading="true"] {
        min-height: 680px;
    }

    #mobileDashboardGrid .mobile-grid-skeleton {
        display: none;
    }

    #mobileDashboardGrid[data-loading="true"] .mobile-grid-skeleton {
        display: grid;
        grid-column: 1 / -1;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
        width: 100%;
        align-content: start;
        align-items: start;
        grid-auto-rows: var(--mobile-cube-collapsed-min-height);
    }

    #mobileDashboardGrid[data-loading="true"] .mobile-skeleton-cube {
        align-self: start;
    }

    .mobile-skeleton-cube {
        position: relative;
        min-height: var(--mobile-cube-collapsed-min-height);
        height: var(--mobile-cube-collapsed-min-height);
        max-height: var(--mobile-cube-collapsed-min-height);
        border-radius: 18px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        background: linear-gradient(180deg, rgba(24, 33, 53, 0.88) 0%, rgba(12, 20, 36, 0.88) 100%);
        box-shadow: var(--surface-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
        padding: var(--mobile-cube-collapsed-padding);
        overflow: hidden;
    }

    .mobile-skeleton-bookmark {
        position: absolute;
        top: 8px;
        right: 8px;
        width: 26px;
        height: 26px;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.1);
    }

    .mobile-skeleton-cube::after {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, 0.08) 45%, transparent 72%);
        transform: translateX(-120%);
        animation: mobileSkeletonSweep 1.4s ease-in-out infinite;
    }

    .mobile-skeleton-chip {
        position: absolute;
        top: 10px;
        left: 8px;
        width: 82px;
        height: 16px;
        border-radius: 999px;
        border: 1px solid rgba(255, 255, 255, 0.14);
        background: rgba(255, 255, 255, 0.08);
    }

    .mobile-skeleton-icon {
        width: 44px;
        height: 44px;
        border-radius: 12px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        background: rgba(255, 255, 255, 0.08);
        margin: 0.25rem auto 0.45rem;
    }

    .mobile-skeleton-line {
        display: block;
        height: 12px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.08);
    }

    .mobile-skeleton-line.name {
        width: 70%;
        margin: 0 auto 0.5rem;
        height: 14px;
    }

    .mobile-skeleton-metrics {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 0.65rem;
    }

    .mobile-skeleton-line.metric {
        height: 13px;
    }

    .mobile-skeleton-metrics .mobile-skeleton-line.metric:first-child {
        width: 46%;
    }

    .mobile-skeleton-metrics .mobile-skeleton-line.metric:last-child {
        width: 36%;
    }

    @keyframes mobileSkeletonSweep {
        0% { transform: translateX(-120%); }
        100% { transform: translateX(120%); }
    }

    #mobileDashboardGrid.cube-open {
        grid-template-columns: 1fr;
    }

    #mobileDashboardGrid.cube-open .dashboard-cube:not(.expanded) {
        display: none;
    }

    .mobile-grid-placeholder {
        grid-column: 1 / -1;
        padding: 1rem;
        border-radius: 14px;
        border: 1px dashed rgba(255, 255, 255, 0.14);
        color: rgba(255, 255, 255, 0.6);
        text-align: center;
        font-size: 0.9rem;
    }

    .dashboard-cube {
        position: relative;
        padding: var(--mobile-cube-collapsed-padding);
        border-radius: 18px;
        background: linear-gradient(180deg, var(--surface-bg-top) 0%, var(--surface-bg-bottom) 100%);
        border: 1px solid var(--surface-border);
        box-shadow: var(--surface-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
        overflow: hidden;
        cursor: pointer;
        min-height: var(--mobile-cube-collapsed-min-height);
    }

    .dashboard-cube:active {
        transform: translateY(1px);
    }

    .dashboard-cube .cube-bookmark {
        position: absolute;
        top: 8px;
        right: 8px;
        background: transparent;
        border: none;
        padding: 0.25rem 0.35rem;
        line-height: 1;
        font-size: 1.25rem;
        cursor: pointer;
        color: rgba(255, 255, 255, 0.55);
    }

    .dashboard-cube .cube-bookmark.bookmarked {
        color: #FBBF24;
    }

    .dashboard-cube .cube-movement-badge {
        position: absolute;
        top: 10px;
        left: 8px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0.16rem 0.46rem;
        border-radius: 999px;
        border: 1px solid rgba(255, 255, 255, 0.14);
        background: rgba(255, 255, 255, 0.04);
        font-size: 0.68rem;
        font-weight: 750;
        letter-spacing: 0.01em;
        line-height: 1;
        white-space: nowrap;
        pointer-events: auto;
    }

    .dashboard-cube .cube-movement-badge.up {
        color: #34D399;
        border-color: rgba(52, 211, 153, 0.45);
        background: rgba(16, 185, 129, 0.12);
    }

    .dashboard-cube .cube-movement-badge.down {
        color: #FB7185;
        border-color: rgba(251, 113, 133, 0.45);
        background: rgba(190, 24, 93, 0.12);
    }

    .dashboard-cube .cube-movement-badge.neutral {
        color: rgba(255, 255, 255, 0.62);
    }

    .dashboard-cube .cube-icon-wrap {
        display: flex;
        justify-content: center;
        align-items: center;
        margin-top: 0.25rem;
        margin-bottom: 0.45rem;
    }

    .dashboard-cube .cube-icon {
        width: 44px;
        height: 44px;
        border-radius: 12px;
        background: rgba(0, 0, 0, 0.18);
        border: 1px solid rgba(255, 255, 255, 0.08);
        padding: 0.25rem;
        object-fit: contain;
    }

    .dashboard-cube .cube-name {
        text-align: center;
        font-weight: 700;
        font-size: 0.78rem;
        color: rgba(255, 255, 255, 0.86);
        margin: 0 0 0.5rem 0;
        position: relative;
    }

    .dashboard-cube .cube-name .cube-name-text {
        display: block;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .dashboard-cube .cube-metrics {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 0.65rem;
        font-size: 0.9rem;
        font-weight: 800;
    }

    .dashboard-cube .cube-roi {
        color: rgba(255, 255, 255, 0.62);
        font-weight: 700;
        font-size: 0.82rem;
        white-space: nowrap;
    }

    .dashboard-cube .cube-expand {
        display: none;
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    .dashboard-cube.expanded {
        grid-column: 1 / -1;
        cursor: default;
        min-height: 0;
    }

    body.mobile-cube-open .dashboard-cube.expanded {
        position: fixed;
        top: calc(env(safe-area-inset-top) + var(--mobile-cube-top, 72px));
        left: 0.75rem;
        right: 0.75rem;
        bottom: calc(env(safe-area-inset-bottom) + 0.75rem);
        z-index: 1200;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 1.05rem;
        border-radius: 22px;
    }

    body.mobile-cube-open .dashboard-cube.expanded .cube-icon {
        width: 58px;
        height: 58px;
        border-radius: 16px;
    }

    body.mobile-cube-open .dashboard-cube.expanded .cube-name {
        font-size: 1rem;
        margin-bottom: 0.85rem;
        white-space: normal;
    }

    body.mobile-cube-open .dashboard-cube.expanded .cube-name .cube-name-text {
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
    }

    body.mobile-cube-open .dashboard-cube.expanded .cube-metrics {
        font-size: 1.05rem;
    }

    body.mobile-cube-open .dashboard-cube.expanded .cube-movement-badge {
        left: 8px;
        right: auto;
        top: 8px;
        font-size: 0.74rem;
        padding: 0.2rem 0.5rem;
    }

    body.mobile-cube-open .dashboard-cube.expanded .cube-bookmark {
        right: 8px;
        left: auto;
    }

    body.mobile-cube-open .dashboard-cube.expanded .graph-container {
        background: #050814 !important;
        padding: 0.45rem 0.4rem !important;
    }

    body.mobile-cube-open .dashboard-cube.expanded .price-chart-container {
        height: 280px;
    }

    body.mobile-cube-open .dashboard-cube.expanded .price-chart-container canvas {
        display: block;
        width: 100% !important;
        height: 100% !important;
    }

    .dashboard-cube.expanded .cube-expand {
        display: block;
    }

    .dashboard-cube .cube-details {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.6rem;
        margin-bottom: 0.75rem;
    }

    .dashboard-cube .cube-detail {
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 14px;
        padding: 0.6rem 0.65rem;
        position: relative;
        min-width: 0;
    }

    .dashboard-cube .cube-detail.copyable {
        cursor: pointer;
        user-select: none;
    }

    .dashboard-cube .cube-detail.copyable:active {
        transform: translateY(1px);
    }

    .dashboard-cube .cube-detail.copied {
        border-color: rgba(34, 197, 94, 0.55);
        background: rgba(34, 197, 94, 0.06);
    }

    .dashboard-cube .cube-detail .copy-toast {
        position: absolute;
        top: 6px;
        right: 8px;
        font-size: 0.65rem;
        font-weight: 700;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.75);
        background: rgba(15, 23, 42, 0.7);
        border: 1px solid rgba(255, 255, 255, 0.12);
        padding: 0.12rem 0.35rem;
        border-radius: 8px;
        opacity: 0;
        transform: translateY(-4px);
        transition: opacity 0.15s ease, transform 0.15s ease;
        pointer-events: none;
    }

    .dashboard-cube .cube-detail.show-copy-toast .copy-toast {
        opacity: 1;
        transform: translateY(0);
    }

    .dashboard-cube .cube-detail .label {
        display: block;
        font-size: 0.72rem;
        color: rgba(255, 255, 255, 0.55);
        margin-bottom: 0.25rem;
        font-weight: 700;
    }

    .dashboard-cube .cube-detail .value {
        display: block;
        font-size: 0.88rem;
        color: rgba(255, 255, 255, 0.92);
        font-weight: 800;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .dashboard-cube .cube-actions {
        display: flex;
        gap: 0.6rem;
        margin-bottom: 0.75rem;
    }

    .dashboard-cube .cube-actions a {
        flex: 1;
        text-align: center;
        text-decoration: none;
        padding: 0.55rem 0.7rem;
        border-radius: 12px;
        border: 1px solid rgba(255, 255, 255, 0.14);
        background: rgba(255, 255, 255, 0.04);
        color: rgba(255, 255, 255, 0.88);
        font-weight: 800;
        font-size: 0.85rem;
    }

    .dashboard-cube .graph-container {
        padding: 0.85rem 0.9rem !important;
    }
}

/* My Statistics: keep tables containerless inside section cards */
.section-card table.dashboard-table {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    backdrop-filter: none !important;
}

/* Dashboard table: show the surface background, keep rows mostly transparent */
table.dashboard-table tbody tr {
    background: transparent !important;
}

table.dashboard-table tbody tr:hover {
    background: transparent !important;
}

/* Dashboard headers: lighter, more minimal */
table.dashboard-table thead {
    background: transparent !important;
}

table.dashboard-table th {
    background: transparent !important;
    color: rgba(255, 255, 255, 0.92) !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.78rem !important;
}

table.dashboard-table th:hover {
    background: rgba(255, 255, 255, 0.03) !important;
}

@media (min-width: 769px) {
    #dashboardTableWrap .dashboard-table {
        overflow: visible !important;
    }

    #dashboardTableWrap .dashboard-table thead th {
        position: sticky;
        top: var(--dashboard-sticky-header-top, 0px);
        z-index: 45;
        background: #111728 !important;
        background-clip: padding-box;
    }

    #dashboardTableWrap .dashboard-table thead th:hover {
        background: #111728 !important;
    }

    #dashboardTableWrap .dashboard-table thead th:first-child {
        border-top-left-radius: var(--surface-radius);
    }

    #dashboardTableWrap .dashboard-table thead th:last-child {
        border-top-right-radius: var(--surface-radius);
    }
}

table.dashboard-table .sort-icon {
    color: rgba(255, 255, 255, 0.35) !important;
}

table.dashboard-table .sort-icon.active {
    color: #FBBF24 !important;
}

table.dashboard-table .filter-icon {
    color: rgba(255, 255, 255, 0.35) !important;
    opacity: 0.85;
}

.dashboard-item-name-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.dashboard-movement-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.01em;
    line-height: 1;
    white-space: nowrap;
}

.dashboard-movement-badge.up {
    color: #34D399;
    border-color: rgba(52, 211, 153, 0.45);
    background: rgba(16, 185, 129, 0.12);
}

.dashboard-movement-badge.down {
    color: #FB7185;
    border-color: rgba(251, 113, 133, 0.45);
    background: rgba(190, 24, 93, 0.12);
}

.dashboard-movement-badge.neutral {
    color: rgba(255, 255, 255, 0.62);
}

thead {
    background: rgba(255, 255, 255, 0.02) !important;
}

th {
    background: rgba(255, 255, 255, 0.02) !important;
    color: rgba(255, 255, 255, 0.62) !important;
    border-bottom: 1px solid var(--line) !important;
}

td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    color: rgba(255, 255, 255, 0.86) !important;
}

/* Dashboard table: allow profit classes to override the base td color */
table.dashboard-table td.profit-light-green,
table.dashboard-table td.profit-green {
    color: #10B981 !important;
    font-weight: 600;
}

table.dashboard-table td.profit-yellow {
    color: #FBBF24 !important;
    font-weight: 600;
}

tbody tr {
    background: rgba(255, 255, 255, 0.02) !important;
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.02) !important;
}

/* Inputs and selects: match the darker theme */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
textarea,
select {
    background: var(--control-bg) !important;
    border: 1px solid var(--control-border) !important;
    color: rgba(255, 255, 255, 0.90) !important;
}

/* Native select dropdown lists can render with a light background on Windows. */
select {
    color-scheme: dark;
}

select option,
select optgroup {
    background-color: #050814;
    color: rgba(255, 255, 255, 0.92);
}

input::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.35) !important;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: rgba(91, 159, 237, 0.55) !important;
}

.site-footer {
    margin-top: 0.85rem;
    padding-top: 0.55rem;
    padding-bottom: max(0.55rem, env(safe-area-inset-bottom));
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    z-index: 1;
}

.site-footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem 0.8rem;
}

.site-footer-brand {
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.2;
}

.site-footer-brand:hover {
    color: #ffffff;
}

.site-footer-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    line-height: 1.2;
}

.site-footer-links a {
    color: rgba(255, 255, 255, 0.66);
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 600;
}

.site-footer-links a:hover {
    color: rgba(255, 255, 255, 0.95);
    text-decoration: underline;
    text-underline-offset: 0.12em;
}

@media (max-width: 700px) {
    .site-footer-inner {
        justify-content: center;
        text-align: center;
    }
}

/* Footer/Feedback styles moved from partials/site_footer.html to avoid late style injection CLS */
/* Footer hard override so per-page styles cannot bloat spacing. */
    body {
        padding-bottom: 0 !important;
    }

    #mainContent {
        margin-bottom: 0 !important;
    }

    .site-footer {
        margin-top: var(--site-footer-margin-top, 0.45rem) !important;
        padding-top: 0.5rem !important;
        padding-bottom: max(0.5rem, env(safe-area-inset-bottom)) !important;
    }

    .site-footer-inner {
        gap: 0.4rem 0.75rem !important;
        justify-content: center !important;
        text-align: center !important;
    }

    .site-footer-brand {
        font-size: 0.84rem !important;
        line-height: 1.2 !important;
        color: #ffffff !important;
        width: 100%;
        text-align: center;
    }

    .site-footer-links {
        gap: 0.5rem !important;
        line-height: 1.2 !important;
        width: 100%;
        justify-content: center !important;
    }

    .site-footer-links a {
        font-size: 0.78rem !important;
        color: #ffffff !important;
    }

    .site-footer-disclosure {
        width: 100%;
        margin: 0.2rem 0 0 !important;
        color: rgba(255, 255, 255, 0.62);
        font-size: 0.74rem;
        line-height: 1.4;
        text-align: center;
    }

    .site-footer-disclosure a {
        color: rgba(173, 216, 255, 0.95);
        text-decoration: underline;
        text-underline-offset: 0.12em;
    }

    .feedback-widget-toggle {
        position: fixed;
        right: 18px;
        bottom: calc(env(safe-area-inset-bottom) + 14px);
        z-index: 1100;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.4rem;
        min-height: 42px;
        border: 1px solid rgba(255, 255, 255, 0.18);
        border-radius: 999px;
        padding: 0.58rem 1.95rem 0.58rem 0.95rem;
        background: rgba(14, 21, 37, 0.96);
        color: #ffffff;
        font-size: 0.84rem;
        font-weight: 700;
        letter-spacing: 0.03em;
        cursor: pointer;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.34);
        backdrop-filter: blur(6px);
    }

    .feedback-widget-toggle[hidden] {
        display: none !important;
    }

    .feedback-widget-toggle:hover {
        border-color: rgba(91, 159, 237, 0.85);
        background: rgba(22, 30, 49, 0.98);
    }

    .feedback-widget-hide-mobile {
        position: fixed;
        right: 24px;
        bottom: calc(env(safe-area-inset-bottom) + 14px + ((42px - 24px) / 2));
        z-index: 1102;
        display: inline-flex;
        width: 24px;
        height: 24px;
        align-items: center;
        justify-content: center;
        border: 0;
        border-radius: 0;
        background: transparent;
        color: rgba(255, 255, 255, 0.92);
        font-size: 0.86rem;
        font-weight: 700;
        line-height: 1.15;
        cursor: pointer;
        padding: 0;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
    }

    .feedback-widget-hide-mobile[hidden] {
        display: none !important;
    }

    .feedback-widget-hide-mobile:hover {
        color: #ffffff;
    }

    .feedback-widget-panel {
        position: fixed;
        right: 18px;
        bottom: calc(env(safe-area-inset-bottom) + 62px);
        z-index: 1101;
        width: min(360px, calc(100vw - 28px));
        border: 1px solid rgba(255, 255, 255, 0.14);
        border-radius: 14px;
        background: rgba(18, 24, 38, 0.97);
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.42);
        padding: 0.95rem;
        color: #ffffff;
    }

    .feedback-widget-panel[hidden] {
        display: none !important;
    }

    .feedback-widget-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.6rem;
        margin-bottom: 0.45rem;
    }

    .feedback-widget-header h4 {
        margin: 0;
        font-size: 0.95rem;
        letter-spacing: 0.01em;
    }

    .feedback-widget-close {
        border: 0;
        background: transparent;
        color: rgba(255, 255, 255, 0.76);
        cursor: pointer;
        font-size: 1.05rem;
        line-height: 1;
        padding: 0.2rem;
    }

    .feedback-widget-copy {
        margin: 0 0 0.65rem;
        color: rgba(229, 231, 235, 0.86);
        font-size: 0.8rem;
        line-height: 1.45;
    }

    .feedback-widget-scale {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 0.35rem;
        margin-bottom: 0.65rem;
    }

    .feedback-scale-btn {
        border: 1px solid rgba(255, 255, 255, 0.18);
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.04);
        color: #ffffff;
        font-size: 0.78rem;
        font-weight: 700;
        padding: 0.4rem 0.22rem;
        cursor: pointer;
    }

    .feedback-scale-btn:hover {
        border-color: rgba(91, 159, 237, 0.72);
        background: rgba(91, 159, 237, 0.22);
    }

    .feedback-scale-btn.selected {
        border-color: #5b9fed;
        background: linear-gradient(135deg, rgba(91, 159, 237, 0.88), rgba(39, 201, 255, 0.74));
        color: #061126;
    }

    .feedback-widget-text {
        width: 100%;
        min-height: 80px;
        max-height: 140px;
        resize: vertical;
        border: 1px solid rgba(255, 255, 255, 0.18);
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.05);
        color: #ffffff;
        padding: 0.55rem 0.62rem;
        font-size: 0.82rem;
        line-height: 1.4;
    }

    .feedback-widget-text::placeholder {
        color: rgba(229, 231, 235, 0.52);
    }

    .feedback-widget-meta {
        margin-top: 0.44rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.55rem;
    }

    .feedback-widget-status {
        margin: 0;
        color: rgba(229, 231, 235, 0.86);
        font-size: 0.73rem;
        line-height: 1.35;
        min-height: 1.1rem;
    }

    .feedback-widget-count {
        color: rgba(156, 163, 175, 0.9);
        font-size: 0.71rem;
    }

    .feedback-widget-submit {
        margin-top: 0.58rem;
        width: 100%;
        border: 0;
        border-radius: 10px;
        min-height: 38px;
        font-size: 0.82rem;
        font-weight: 700;
        letter-spacing: 0.01em;
        color: #061126;
        background: linear-gradient(135deg, #5b9fed, #27c9ff);
        cursor: pointer;
    }

    .feedback-widget-submit:disabled {
        background: rgba(255, 255, 255, 0.18);
        color: rgba(255, 255, 255, 0.76);
        cursor: not-allowed;
    }

    @media (max-width: 900px) {
        .feedback-widget-text {
            /* Prevent iOS auto-zoom on focus for small form fields. */
            font-size: 16px;
        }

        .feedback-widget-toggle {
            right: 12px;
            left: auto;
            bottom: calc(env(safe-area-inset-bottom) + 10px);
            border-radius: 999px;
            height: 44px;
            min-height: 44px;
            font-size: 0.86rem;
            line-height: 1;
            padding: 0 1.9rem 0 0.85rem;
        }

        .feedback-widget-panel {
            right: 12px;
            left: 12px;
            width: auto;
            bottom: calc(env(safe-area-inset-bottom) + 62px);
            border-radius: 12px;
            padding: 0.86rem;
        }

        .feedback-widget-hide-mobile {
            right: 20px;
            bottom: calc(env(safe-area-inset-bottom) + 10px + ((44px - 24px) / 2));
            line-height: 24px;
        }
    }

