:root {
    color-scheme: dark;
    --page: #0b0f14;
    --sidebar: #0e1319;
    --panel: #11171e;
    --panel-raised: #151c24;
    --panel-hover: #19212a;
    --line: rgba(221, 232, 245, .075);
    --line-strong: rgba(221, 232, 245, .12);
    --text: #f0f3f6;
    --muted: #8b96a4;
    --subtle: #626d7b;
    --gold: #e6bd69;
    --gold-bright: #f3ce82;
    --gold-soft: rgba(230, 189, 105, .12);
    --green: #69d6a0;
    --red: #f18181;
    --blue: #83b5f4;
    --shadow: 0 16px 40px rgba(0, 0, 0, .14);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 0;
    scroll-behavior: smooth;
}

body {
    min-width: 0;
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(ellipse at 84% 0%, rgba(230, 189, 105, .045), transparent 33rem),
        var(--page);
    color: var(--text);
    font-family: "DM Sans", sans-serif;
    -webkit-font-smoothing: antialiased;
}

body,
button,
a {
    font-family: "DM Sans", sans-serif;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
}

button:focus-visible,
a:focus-visible,
[tabindex="0"]:focus-visible {
    outline: 2px solid var(--gold-bright);
    outline-offset: 3px;
}

::selection {
    background: rgba(230, 189, 105, .28);
    color: var(--text);
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 99px;
    background: #343e49;
    background-clip: padding-box;
}

.dashboard {
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    display: flex;
    height: 100vh;
    min-height: 0;
    flex-direction: column;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 27px 17px 18px;
    border-right: 1px solid var(--line);
    background: var(--sidebar);
}

.logo {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 10px;
    margin: 1px 0 42px 5px;
    color: var(--text);
    text-decoration: none;
}

.logo img {
    width: 31px;
    height: 31px;
}

.fundpilot-wordmark {
    display: inline-flex;
    align-items: baseline;
    font-family: Manrope, sans-serif;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -.7px;
}

.fundpilot-wordmark strong {
    color: var(--text);
}

.fundpilot-wordmark span {
    color: var(--gold);
    font-weight: 500;
}

.nav-caption,
.panel-eyebrow,
.eyebrow {
    color: var(--subtle);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
}

.nav-caption {
    margin: 0 0 12px 12px;
}

.sidebar nav ul,
.sidebar-secondary {
    display: grid;
    gap: 5px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sidebar-nav li {
    min-width: 0;
}

.sidebar-nav a {
    display: flex;
    min-height: 44px;
    align-items: center;
    gap: 12px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 9px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease;
}

.sidebar-nav a:hover {
    transform: translateX(2px);
    background: var(--panel-raised);
    color: var(--text);
}

.sidebar-nav a > i:first-child {
    width: 17px;
    color: var(--subtle);
    font-size: 14px;
    text-align: center;
    transition: color .2s ease;
}

.sidebar-nav .active a {
    border-color: rgba(230, 189, 105, .13);
    background: var(--gold-soft);
    color: var(--gold-bright);
    font-weight: 600;
}

.sidebar-nav .active a > i:first-child,
.sidebar-nav a:hover > i:first-child {
    color: var(--gold);
}

.nav-arrow {
    margin-left: auto;
    color: var(--subtle);
    font-size: 10px;
    opacity: 0;
    transition: opacity .2s ease;
}

.sidebar-nav a:hover .nav-arrow {
    opacity: 1;
}

.sidebar-menu-toggle {
    display: none;
}

.sidebar-spacer {
    flex: 1 0 18px;
    min-height: 18px;
}

.sidebar .logo,
.sidebar nav,
.nav-caption,
.sidebar-help,
.sidebar-secondary,
.sidebar-footer {
    flex-shrink: 0;
}

.sidebar-help {
    position: relative;
    overflow: hidden;
    margin: 12px 2px 20px;
    padding: 15px 14px 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background:
        radial-gradient(ellipse at 100% 0, rgba(230, 189, 105, .11), transparent 65%),
        var(--panel);
}

.help-icon,
.metric-icon,
.connection-icon,
.summary-icon,
.activity-icon {
    display: grid;
    flex: none;
    place-items: center;
}

.help-icon {
    width: 30px;
    height: 30px;
    border: 1px solid rgba(230, 189, 105, .16);
    border-radius: 9px;
    background: var(--gold-soft);
    color: var(--gold);
    font-size: 13px;
}

.help-title {
    margin: 13px 0 5px;
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
}

.help-copy {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.55;
}

.sidebar-help a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    color: var(--gold-bright);
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
}

.sidebar-secondary {
    padding-top: 13px;
    border-top: 1px solid var(--line);
}

.sidebar-secondary .sidebar-nav a,
.sidebar-secondary a {
    min-height: 38px;
    font-size: 12px;
}

.sidebar-footer {
    margin: 17px 4px 0;
    color: var(--subtle);
    font-size: 10px;
}

.sidebar-footer span {
    padding: 0 3px;
    color: var(--gold);
}

.main-content {
    width: 100%;
    max-width: 1600px;
    min-width: 0;
    margin: 0 auto;
    padding: 25px clamp(22px, 4vw, 58px) 30px;
}

.user-menu-bar {
    min-height: 48px;
    margin: 0 0 26px;
}

.dashboard .dashboard-menu-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 12px;
}

.dashboard .dashboard-menu-bar > .page-heading {
    display: contents;
    animation: none;
}

.dashboard .dashboard-menu-bar > .page-heading > div:first-child {
    min-width: 0;
}

.dashboard-menu-bar .heading-actions {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 23px;
    animation: rise-in .55s both;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--gold);
}

.page-heading h1,
.welcome h2,
.panel h2 {
    margin: 0;
    font-family: Manrope, sans-serif;
}

.page-heading h1 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-size: clamp(25px, 3vw, 33px);
    font-weight: 700;
    letter-spacing: -1.35px;
    line-height: 1.2;
}

.heading-sparkle {
    color: var(--gold);
    font-size: 19px;
}

.page-heading > div:first-child > p:last-child {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.telegram-connect-banner {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: -5px 0 21px;
    padding: 16px 18px;
    border: 1px solid rgba(40, 166, 222, .25);
    border-radius: 15px;
    background: linear-gradient(110deg, rgba(20, 102, 142, .17), rgba(230, 189, 105, .07));
}

.telegram-connect-banner[hidden],
.telegram-banner-open[hidden] {
    display: none;
}

.telegram-banner-icon {
    display: grid;
    width: 42px;
    height: 42px;
    flex: none;
    place-items: center;
    border: 1px solid rgba(40, 166, 222, .3);
    border-radius: 12px;
    background: rgba(40, 166, 222, .12);
    color: #38aee3;
    font-size: 22px;
}

.telegram-banner-copy {
    min-width: 0;
    flex: 1;
}

.telegram-banner-copy h2 {
    margin: 0;
    color: var(--text);
    font-family: Manrope, sans-serif;
    font-size: 14px;
}

.telegram-banner-copy p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}

.telegram-banner-open {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    color: #38aee3;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
}

.telegram-banner-actions {
    display: flex;
    flex: none;
    align-items: center;
    gap: 8px;
}

.telegram-banner-actions button {
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--line-strong);
    border-radius: 9px;
    background: var(--panel-raised);
    color: var(--text);
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
}

.telegram-banner-actions .telegram-banner-connect {
    border-color: rgba(40, 166, 222, .38);
    background: #198fc1;
    color: #fff;
}

.telegram-banner-actions button:disabled {
    cursor: wait;
    opacity: .65;
}

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

.date-chip,
.button-primary {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.date-chip {
    padding: 0 12px;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--muted);
}

.button-primary {
    padding: 0 15px;
    border: 1px solid rgba(255, 255, 255, .13);
    background: var(--gold);
    box-shadow: 0 5px 14px rgba(230, 189, 105, .12);
    color: #17140f;
    transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

.button-primary:hover {
    transform: translateY(-2px);
    background: var(--gold-bright);
    box-shadow: 0 8px 20px rgba(230, 189, 105, .22);
}

.welcome {
    position: relative;
    display: flex;
    min-height: 218px;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    overflow: hidden;
    margin-bottom: 19px;
    padding: 27px 31px;
    border: 1px solid rgba(230, 189, 105, .16);
    border-radius: 15px;
    background:
        radial-gradient(ellipse at 74% 52%, rgba(172, 132, 66, .14), transparent 31%),
        linear-gradient(112deg, #171a1c 0%, #191a19 49%, #1b1c19 100%);
    animation: rise-in .6s .04s both;
}

.welcome-copy {
    position: relative;
    z-index: 1;
    max-width: 510px;
}

.welcome-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--gold);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.35px;
}

.welcome-kicker-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 11px rgba(230, 189, 105, .8);
}

.welcome h2 {
    margin-top: 11px;
    color: #f5f3ee;
    font-size: clamp(23px, 3vw, 31px);
    font-weight: 600;
    letter-spacing: -1.15px;
    line-height: 1.22;
}

.welcome h2 span {
    color: var(--gold-bright);
}

.welcome-copy > p {
    max-width: 425px;
    margin: 9px 0 13px;
    color: #a8a59d;
    font-size: 12px;
    line-height: 1.6;
}

.welcome-link,
.account-link,
.section-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--gold-bright);
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    transition: gap .2s ease, color .2s ease;
}

.welcome-link:hover,
.account-link:hover,
.section-link:hover {
    gap: 12px;
    color: #ffe0a0;
}

.welcome-status {
    position: relative;
    z-index: 1;
    display: flex;
    min-width: 174px;
    align-items: center;
    gap: 11px;
    padding: 13px 15px;
    border: 1px solid rgba(235, 226, 203, .12);
    border-radius: 12px;
    background: rgba(12, 15, 16, .45);
    backdrop-filter: blur(10px);
}

.welcome-status-icon {
    display: grid;
    width: 36px;
    height: 36px;
    flex: none;
    place-items: center;
    border: 1px solid rgba(230, 189, 105, .18);
    border-radius: 10px;
    background: rgba(230, 189, 105, .1);
    color: var(--gold);
    font-size: 14px;
}

.welcome-status > div:nth-child(2) {
    display: grid;
    gap: 4px;
}

.welcome-status > div:nth-child(2) > span {
    color: #969187;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 1px;
}

.welcome-status strong {
    color: #e7e4dd;
    font-size: 12px;
    font-weight: 600;
}

.status-indicator,
.account-state-dot {
    width: 7px;
    height: 7px;
    flex: none;
    border-radius: 50%;
    background: #7e8790;
}

.welcome-status .status-indicator {
    margin-left: auto;
}

.welcome-status.is-live .status-indicator,
.account-state.is-live .account-state-dot {
    background: var(--green);
    box-shadow: 0 0 0 4px rgba(105, 214, 160, .11), 0 0 12px rgba(105, 214, 160, .4);
    animation: breathe 2.5s ease-in-out infinite;
}

.welcome-decoration {
    position: absolute;
    right: 19%;
    bottom: 0;
    display: flex;
    height: 150px;
    align-items: flex-end;
    gap: 10px;
    opacity: .38;
    transform: skewY(-24deg);
    transform-origin: bottom;
}

.welcome-decoration span {
    width: 2px;
    height: calc(28px + (var(--bar-index, 1) * 5px));
    background: linear-gradient(to top, transparent, rgba(230, 189, 105, .9));
    animation: market-drift 3s ease-in-out infinite alternate;
}

.welcome-decoration span:nth-child(3n) { height: 66px; animation-delay: -.7s; }
.welcome-decoration span:nth-child(3n + 1) { height: 104px; animation-delay: -1.5s; }
.welcome-decoration span:nth-child(4n) { height: 47px; animation-delay: -2.1s; }

.cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 13px;
    margin-bottom: 19px;
}

.metric-card,
.panel {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.metric-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    padding: 17px 18px 16px;
    animation: rise-in .55s both;
    transition: transform .22s ease, border-color .22s ease, background .22s ease;
}

.metric-card:nth-child(2) { animation-delay: .05s; }
.metric-card:nth-child(3) { animation-delay: .1s; }
.metric-card:nth-child(4) { animation-delay: .15s; }

.metric-card:hover {
    transform: translateY(-3px);
    border-color: var(--line-strong);
    background: var(--panel-raised);
}

.metric-top {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.metric-icon {
    width: 31px;
    height: 31px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--panel-raised);
    color: var(--gold);
    font-size: 12px;
}

.metric-profit .metric-icon { color: var(--green); }
.metric-loss .metric-icon { color: var(--red); }
.metric-trades .metric-icon { color: var(--blue); }
.metric-target .metric-icon { color: var(--gold); }
.metric-take-profit .metric-icon { color: var(--green); }

.metric-label {
    overflow: hidden;
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.metric-accent {
    width: 5px;
    height: 5px;
    flex: none;
    margin-left: auto;
    border-radius: 50%;
    background: var(--green);
    opacity: .8;
}

.metric-loss .metric-accent { background: var(--red); }
.metric-trades .metric-accent { background: var(--blue); }
.metric-target .metric-accent { background: var(--gold); }
.metric-take-profit .metric-accent { background: var(--green); }

.metric-card h2 {
    overflow: hidden;
    margin: 17px 0 5px;
    color: var(--text);
    font-family: Manrope, sans-serif;
    font-size: clamp(20px, 2.1vw, 26px);
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    letter-spacing: -.8px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.metric-currency-values {
    display: flex;
    min-height: 48px;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    margin: 17px 0 5px;
    color: var(--text);
    font-family: Manrope, sans-serif;
    font-size: clamp(13px, 1.3vw, 17px);
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    letter-spacing: -.35px;
    line-height: 1.35;
}

.metric-profit .metric-currency-values { color: var(--green); }
.metric-loss .metric-currency-values { color: var(--red); }

.metric-currency-values span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.metric-card > p {
    margin: 0;
    color: var(--subtle);
    font-size: 10px;
}

.progress {
    height: 4px;
    overflow: hidden;
    margin: 9px 0 7px;
    border-radius: 6px;
    background: var(--panel-hover);
}

.progress > div {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #c49a4c, var(--gold-bright));
    box-shadow: 0 0 10px rgba(230, 189, 105, .3);
    transition: width .8s cubic-bezier(.2, .8, .2, 1);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.85fr) minmax(280px, .9fr);
    gap: 14px;
    margin-bottom: 14px;
}

.panel {
    min-width: 0;
    padding: 19px;
    animation: rise-in .6s .12s both;
}

.section-header {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.panel-eyebrow {
    margin: 0 0 5px;
    font-size: 8px;
    letter-spacing: 1.25px;
}

.panel h2 {
    color: var(--text);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -.3px;
}

.panel-subtitle {
    margin: 5px 0 0;
    color: var(--subtle);
    font-size: 10px;
}

.filter {
    display: flex;
    flex: none;
    gap: 3px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--page);
}

.chart-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.chart-currency-picker {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--muted);
    font-size: 9px;
}

.chart-currency-picker[hidden] {
    display: none;
}

.chart-currency-picker select {
    max-width: 95px;
    min-height: 29px;
    padding: 0 6px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--page);
    color: var(--text);
    font: inherit;
}

.filter button {
    min-width: 37px;
    height: 27px;
    padding: 0 8px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 9px;
    font-weight: 700;
    transition: background .2s ease, color .2s ease, transform .2s ease;
}

.filter button:hover {
    color: var(--text);
}

.filter button:active {
    transform: scale(.95);
}

.filter button.active {
    background: var(--gold);
    color: #17140f;
}

.chart-wrap {
    position: relative;
    width: 100%;
    height: 228px;
    margin-top: 12px;
}

#profitChart {
    display: block;
    width: 100%;
    height: 100%;
}

.chart-status {
    min-height: 14px;
    margin: -1px 0 0;
    color: var(--subtle);
    font-size: 10px;
}

.status-card {
    padding: 19px;
}

.status-heading {
    margin-bottom: 17px;
}

.connection-icon,
.summary-icon {
    width: 31px;
    height: 31px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--panel-raised);
    color: var(--gold);
    font-size: 12px;
}

.account-state {
    display: flex;
    min-height: 41px;
    align-items: center;
    gap: 9px;
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-raised);
}

.account-state strong {
    color: var(--text);
    font-size: 11px;
    font-weight: 600;
}

.account-state-label {
    margin-left: auto;
    color: var(--subtle);
    font-size: 9px;
}

.status-list {
    display: grid;
    margin: 9px 0 13px;
}

.status-list > div {
    display: flex;
    min-width: 0;
    min-height: 37px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--line);
}

.status-list > div > span {
    color: var(--muted);
    font-size: 10px;
}

.status-list strong {
    overflow: hidden;
    color: var(--text);
    font-size: 10px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-link {
    width: 100%;
    justify-content: space-between;
    padding-top: 2px;
}

.bottom-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(265px, .95fr);
    gap: 14px;
    margin-bottom: 14px;
}

.recent-trades .section-header,
.summary-card .section-header,
.activity-card .section-header {
    margin-bottom: 14px;
}

.section-link {
    flex: none;
    font-size: 10px;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text);
    text-align: left;
}

th {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    color: var(--subtle);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .9px;
    text-transform: uppercase;
    white-space: nowrap;
}

th:first-child,
td:first-child {
    padding-left: 0;
}

th:last-child,
td:last-child {
    padding-right: 0;
    text-align: right;
}

td {
    padding: 12px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 10px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

tbody tr:last-child td {
    border-bottom: 0;
}

tbody tr:not(.empty-row) {
    animation: row-in .35s both;
}

td:first-child {
    color: var(--text);
    font-weight: 600;
}

td.buy,
td.sell {
    font-weight: 600;
}

td.buy { color: var(--green); }
td.sell { color: var(--red); }
td.profit { color: var(--green); font-weight: 600; }
td.loss { color: var(--red); font-weight: 600; }

.empty-row td {
    padding: 20px 0;
    color: var(--subtle);
    font-size: 11px;
    text-align: center;
}

.summary-icon {
    color: var(--blue);
}

.summary-profit {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding: 15px 0;
    border-bottom: 1px solid var(--line);
}

.summary-profit span,
.summary-item span {
    color: var(--muted);
    font-size: 10px;
}

.summary-profit strong {
    overflow: hidden;
    color: var(--green);
    font-family: Manrope, sans-serif;
    font-size: 19px;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    letter-spacing: -.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.summary-currency-values {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    color: var(--green);
    font-family: Manrope, sans-serif;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    line-height: 1.45;
    text-align: right;
}

.summary-currency-values span {
    color: inherit;
    font-size: inherit;
    white-space: nowrap;
}

.summary-profit .summary-currency-values span {
    color: inherit;
    font-size: inherit;
}

.summary-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 15px;
}

.summary-item {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.summary-item:nth-last-child(-n + 2) {
    border-bottom: 0;
}

.summary-item strong {
    color: var(--text);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.activity-card {
    margin-bottom: 13px;
}

#activityFeed {
    display: grid;
}

.activity {
    display: flex;
    min-height: 47px;
    align-items: center;
    gap: 10px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 10px;
}

.activity-icon {
    width: 27px;
    height: 27px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-raised);
    color: var(--gold);
    font-size: 10px;
}

.activity strong {
    color: var(--text);
    font-size: 10px;
}

.activity-symbol {
    color: var(--text);
    font-weight: 600;
}

.activity-result {
    margin-left: auto;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.activity-result.profit { color: var(--green); }
.activity-result.loss { color: var(--red); }

.dashboard-footer {
    padding: 7px 0 0;
    color: var(--subtle);
    font-size: 10px;
    text-align: center;
}

@keyframes rise-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes row-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes breathe {
    50% { box-shadow: 0 0 0 6px rgba(105, 214, 160, .04), 0 0 6px rgba(105, 214, 160, .2); }
}

@keyframes market-drift {
    to { transform: translateY(-13px); opacity: .5; }
}

@media (min-width: 1600px) {
    .main-content { padding-right: 62px; padding-left: 62px; }
}

@media (max-width: 1180px) {
    .dashboard { grid-template-columns: 220px minmax(0, 1fr); }
    .sidebar { padding-right: 13px; padding-left: 13px; }
    .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .metric-card h2 { font-size: 25px; }
}

@media (max-width: 930px) {
    .dashboard { display: block; }
    .sidebar {
        position: static;
        z-index: auto;
        display: flex;
        width: 100%;
        height: auto;
        min-height: 0;
        flex-direction: row;
        align-items: center;
        gap: 18px;
        padding: 10px 20px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
        background: color-mix(in srgb, var(--sidebar) 94%, transparent);
        backdrop-filter: blur(16px);
    }
    .logo { flex: none; margin: 0; }
    .nav-caption,
    .sidebar-spacer,
    .sidebar-help,
    .sidebar-footer { display: none; }
    .sidebar { flex-wrap: wrap; }
    .sidebar .logo { width: 100%; }
    .sidebar nav,
    .sidebar-secondary { width: 100%; flex: 1 1 100%; }
    .sidebar nav ul,
    .sidebar-secondary { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 4px; }
    .sidebar nav ul { overflow: visible; }
    .sidebar-secondary { padding-top: 8px; }
    .sidebar-nav a { min-height: 38px; gap: 8px; padding: 0 10px; white-space: nowrap; }
    .sidebar-nav a > i:first-child { font-size: 12px; }
    .nav-arrow { display: none; }
    .main-content { padding: 19px 24px 27px; }
    .dashboard-grid { grid-template-columns: minmax(0, 1.5fr) minmax(245px, .9fr); }
}

@media (max-width: 700px) {
    .sidebar { gap: 13px; padding: 9px 13px; }
    .logo img { width: 27px; height: 27px; }
    .fundpilot-wordmark { font-size: 17px; }
    .sidebar nav ul { gap: 2px; }
    .sidebar-nav a { min-height: 36px; gap: 7px; padding: 0 9px; font-size: 11px; }
    .main-content { padding: 17px 16px 23px; }
    .user-menu-bar { min-height: 39px; margin-bottom: 18px; }
    .page-heading { align-items: flex-start; }
    .page-heading .heading-actions { align-self: flex-end; }
    .page-heading h1 { font-size: 27px; }
    .dashboard .dashboard-menu-bar {
        grid-template-columns: minmax(0, 1fr) auto;
    }
    .dashboard .dashboard-menu-bar > .page-heading > .heading-actions {
        align-self: center;
    }
    .dashboard .dashboard-menu-bar > .user-menu-actions {
        grid-column: 1 / -1;
        justify-self: end;
        justify-content: flex-end;
    }
    .heading-actions { gap: 7px; }
    .dashboard-menu-bar .date-chip { display: none; }
    .button-primary { min-height: 37px; padding: 0 11px; font-size: 10px; }
    .welcome { min-height: 0; gap: 15px; padding: 21px; }
    .welcome-status { min-width: 147px; padding: 10px; }
    .welcome-decoration { right: 18%; opacity: .23; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .bottom-grid { grid-template-columns: 1fr; }
    .chart-wrap { height: 215px; }
    .status-card { min-height: 0; }
}

@media (max-width: 520px) {
    .sidebar { flex-wrap: wrap; gap: 7px 12px; }
    .logo { width: 100%; }
    .sidebar nav { width: 100%; flex: none; }
    .sidebar nav ul,
    .sidebar-secondary {
        display: flex;
        flex-wrap: nowrap;
        gap: 4px;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scrollbar-width: thin;
        scrollbar-color: var(--subtle) transparent;
    }
    .sidebar nav ul > li,
    .sidebar-secondary > li { flex: 0 0 auto; }
    .sidebar-secondary { width: 100%; flex: 1 1 100%; }
    .sidebar-nav a { min-height: 34px; padding: 0 8px; font-size: 10px; }
    .main-content { padding: 15px 13px 20px; }
    .user-menu-bar { min-height: 35px; margin-bottom: 16px; }
    .page-heading { flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 17px; }
    .page-heading h1 { display: block; font-size: 25px; overflow-wrap: anywhere; }
    .heading-sparkle { margin-left: 5px; }
    .page-heading > div:first-child > p:last-child { max-width: 340px; font-size: 12px; }
    .dashboard-menu-bar .heading-actions { width: auto; }
    .dashboard-menu-bar .user-menu-actions { gap: 5px; }
    .dashboard-menu-bar .user-menu-icon,
    .dashboard-menu-bar .user-profile-trigger { width: 32px; height: 32px; }
    .dashboard-menu-bar .button-primary { min-width: 0; min-height: 34px; padding: 0 8px; white-space: nowrap; }
    .welcome { align-items: flex-start; flex-direction: column; padding: 19px; }
    .welcome h2 { font-size: 25px; }
    .welcome-copy > p { max-width: 300px; font-size: 11px; }
    .welcome-status { width: 100%; }
    .welcome-decoration { right: 8%; bottom: 15%; }
    .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-bottom: 12px; }
    .metric-card { padding: 13px 12px; }
    .metric-top { gap: 7px; }
    .metric-icon { width: 27px; height: 27px; font-size: 10px; }
    .metric-label { font-size: 8px; letter-spacing: .55px; }
    .metric-card h2 { margin-top: 14px; font-size: clamp(17px, 6vw, 23px); }
    .metric-card > p { font-size: 9px; }
    .panel { padding: 15px; }
    .section-header { align-items: flex-start; }
    .panel h2 { font-size: 14px; }
    .panel-subtitle { font-size: 9px; }
    .filter { gap: 1px; padding: 2px; }
    .filter button { min-width: 31px; height: 25px; padding: 0 6px; font-size: 8px; }
    .chart-wrap { height: 195px; margin-top: 9px; }
    th { padding: 9px 8px; font-size: 7px; }
    td { padding: 11px 8px; font-size: 9px; }
    .section-link { gap: 5px; font-size: 9px; }
    .summary-profit strong { font-size: 17px; }
    .chart-controls { flex-wrap: wrap; }
    .chart-currency-picker { font-size: 8px; }
    .chart-currency-picker select { max-width: 78px; min-height: 25px; }
    .metric-currency-values { min-height: 43px; font-size: 12px; }
    .summary-currency-values { font-size: 12px; }
}

@media (max-width: 360px) {
    .dashboard .dashboard-menu-bar .page-heading h1 {
        gap: 4px;
        font-size: 22px;
    }
    .dashboard .dashboard-menu-bar .page-heading .eyebrow {
        margin-bottom: 5px;
        font-size: 8px;
        letter-spacing: .9px;
    }
    .dashboard .dashboard-menu-bar .page-heading > div:first-child > p:last-child {
        font-size: 11px;
        line-height: 1.4;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

html[data-theme="light"] {
    color-scheme: light;
    --page: #f4f6f8;
    --sidebar: #fff;
    --panel: #fff;
    --panel-raised: #f7f8fa;
    --panel-hover: #edf0f3;
    --line: rgba(34, 46, 61, .09);
    --line-strong: rgba(34, 46, 61, .16);
    --text: #1e2935;
    --muted: #657180;
    --subtle: #8993a0;
    --gold: #aa7d34;
    --gold-bright: #8b6425;
    --gold-soft: rgba(179, 133, 56, .1);
    --green: #258454;
    --red: #cf5353;
    --blue: #4c7db8;
    --shadow: 0 10px 30px rgba(31, 45, 68, .055);
}

html[data-theme="light"] body {
    background:
        radial-gradient(ellipse at 84% 0%, rgba(179, 133, 56, .055), transparent 33rem),
        var(--page) !important;
    color: var(--text) !important;
}

html[data-theme="light"] .welcome {
    border-color: rgba(179, 133, 56, .2);
    background:
        radial-gradient(ellipse at 74% 52%, rgba(179, 133, 56, .12), transparent 31%),
        linear-gradient(112deg, #fff 0%, #f9f8f4 100%);
}

html[data-theme="light"] .telegram-connect-banner {
    border-color: rgba(25, 143, 193, .2);
    background: linear-gradient(110deg, rgba(25, 143, 193, .08), rgba(179, 133, 56, .06));
}

html[data-theme="light"] .telegram-banner-copy h2 {
    color: var(--text);
}

html[data-theme="light"] .welcome h2,
html[data-theme="light"] .panel h2,
html[data-theme="light"] .page-heading h1,
html[data-theme="light"] .metric-card h2,
html[data-theme="light"] .status-list strong,
html[data-theme="light"] .summary-item strong,
html[data-theme="light"] td:first-child,
html[data-theme="light"] .activity strong,
html[data-theme="light"] .activity-symbol {
    color: var(--text);
}

html[data-theme="light"] .welcome-copy > p {
    color: #66717d;
}

html[data-theme="light"] .welcome-status {
    border-color: var(--line);
    background: rgba(255, 255, 255, .8);
}

html[data-theme="light"] .welcome-status > div:nth-child(2) > span {
    color: var(--muted);
}

html[data-theme="light"] .welcome-status strong {
    color: var(--text);
}

html[data-theme="light"] .chartFilter.active {
    color: #111827;
}

html[data-theme="light"] .sidebar-nav .active a {
    color: #805b0c;
}

@media (max-width: 700px) {
    .telegram-connect-banner {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 11px;
        padding: 14px;
    }

    .telegram-banner-copy {
        width: calc(100% - 58px);
        flex: initial;
    }

    .telegram-banner-actions {
        width: 100%;
        padding-left: 53px;
    }
}
