.dashboard {
    --workspace-bg: #0a0e13;
    --workspace-panel: #111820;
    --workspace-raised: #151e27;
    --workspace-border: rgba(221, 231, 240, .09);
    --workspace-text: #f2f4f6;
    --workspace-muted: #9ba6b1;
    --workspace-gold: #dfb66b;
    --workspace-green: #72d5a3;
    background:
        radial-gradient(ellipse at 84% 3%, rgba(223, 182, 107, .055), transparent 32rem),
        var(--workspace-bg);
}

.dashboard .sidebar {
    z-index: 5;
    border-color: var(--workspace-border);
    background: rgba(13, 19, 25, .97);
}

.dashboard .sidebar .logo {
    margin-bottom: 35px;
}

.dashboard .sidebar nav ul,
.dashboard .sidebar > ul:not(.sidebar-secondary),
.dashboard .sidebar-secondary {
    gap: 5px;
}

.dashboard .sidebar-nav a {
    border-radius: 10px;
    transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease;
}

.dashboard .sidebar-nav a:hover {
    transform: translateX(2px);
    border-color: rgba(223, 182, 107, .11);
    background: rgba(255, 255, 255, .035);
    color: var(--workspace-text);
}

.dashboard .sidebar-nav .active a {
    border-color: rgba(223, 182, 107, .2);
    background: linear-gradient(100deg, rgba(223, 182, 107, .14), rgba(223, 182, 107, .055));
    color: var(--workspace-gold);
}

.dashboard .main-content {
    min-width: 0;
    width: 100%;
    max-width: 1640px;
    margin: 0 auto;
    padding: 32px clamp(20px, 3.2vw, 48px) 52px;
    overflow-x: clip;
    background: transparent;
}

.dashboard .topbar,
.dashboard .page-header {
    gap: 24px;
    margin-bottom: 27px;
}

.dashboard .topbar h1,
.dashboard .page-header h1 {
    color: var(--workspace-text);
    font-family: Manrope, "DM Sans", sans-serif;
    font-size: clamp(27px, 3vw, 35px);
    font-weight: 700;
    letter-spacing: -.055em;
    line-height: 1.15;
}

.dashboard .topbar p,
.dashboard .page-header p {
    max-width: 740px;
    color: var(--workspace-muted);
    font-size: 13px;
    line-height: 1.7;
}

.dashboard .top-actions {
    flex-wrap: wrap;
    gap: 9px;
}

.dashboard .summary-grid {
    gap: 14px;
    margin-bottom: 22px;
}

.dashboard .summary-card,
.dashboard .history-filter,
.dashboard .history-table-card,
.dashboard .calendar-card,
.dashboard .earning-card,
.dashboard .table-card,
.dashboard .license-status-card,
.dashboard .license-card,
.dashboard .history-card {
    border: 1px solid var(--workspace-border);
    border-radius: 15px;
    background: linear-gradient(145deg, rgba(20, 28, 36, .96), rgba(15, 21, 27, .98));
    box-shadow: 0 16px 38px rgba(0, 0, 0, .12);
}

.dashboard .summary-card {
    min-width: 0;
    padding: 19px;
    transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.dashboard .summary-card:hover,
.dashboard .process-card:hover {
    transform: translateY(-3px);
    border-color: rgba(223, 182, 107, .25);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .2);
}

.dashboard .summary-card h2,
.dashboard .summary-card h3,
.dashboard .summary-card span {
    line-height: 1.35;
}

.dashboard .summary-card h2,
.dashboard .summary-card span {
    color: var(--workspace-text);
    font-family: Manrope, "DM Sans", sans-serif;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.035em;
}

.dashboard .summary-card h3,
.dashboard .summary-card > div > span,
.dashboard .summary-card > span:first-of-type {
    color: var(--workspace-muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .035em;
}

.dashboard .summary-card i,
.dashboard .summary-card .icon {
    color: var(--workspace-gold);
}

.dashboard .history-filter,
.dashboard .calendar-card,
.dashboard .earning-card,
.dashboard .table-card,
.dashboard .license-status-card,
.dashboard .license-card,
.dashboard .history-card {
    padding: 23px;
}

.dashboard .table-header,
.dashboard .filter-top,
.dashboard .calendar-header,
.dashboard .status-header {
    gap: 14px;
}

.dashboard .table-header h2,
.dashboard .calendar-header h2,
.dashboard .status-header h2,
.dashboard .earning-card h2,
.dashboard .license-card h2 {
    color: var(--workspace-text);
    font-family: Manrope, "DM Sans", sans-serif;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -.035em;
}

.dashboard .table-header h2 i,
.dashboard .earning-card h2 i,
.dashboard .license-card h2 i,
.dashboard .status-header h2 i {
    color: var(--workspace-gold);
}

.dashboard .filter-group label,
.dashboard .account-box label,
.dashboard .earning-card label,
.dashboard .license-card label,
.dashboard .withdrawal-verification-content label {
    color: #bdc6ce;
    font-size: 11px;
    font-weight: 600;
}

.dashboard input:not([type="checkbox"]),
.dashboard select,
.dashboard textarea,
.dashboard .earning-card input,
.dashboard .earning-card select,
.dashboard .license-card input,
.dashboard .license-card select {
    min-height: 42px;
    border: 1px solid rgba(221, 231, 240, .12);
    border-radius: 9px;
    background: #0d1319;
    color: var(--workspace-text);
    font: inherit;
    font-size: 12px;
}

.dashboard input:focus-visible,
.dashboard select:focus-visible,
.dashboard textarea:focus-visible,
.dashboard button:focus-visible,
.dashboard a:focus-visible {
    outline: 2px solid rgba(223, 182, 107, .8);
    outline-offset: 3px;
}

.dashboard .filter-btn,
.dashboard .refresh-btn,
.dashboard .download-btn,
.dashboard .yellow-btn,
.dashboard .primary-btn,
.dashboard .secondary-btn {
    min-height: 41px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 700;
    transition: transform .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.dashboard .filter-btn:hover,
.dashboard .refresh-btn:hover,
.dashboard .download-btn:hover,
.dashboard .yellow-btn:hover,
.dashboard .primary-btn:hover,
.dashboard .secondary-btn:hover {
    transform: translateY(-1px);
}

.dashboard .download-btn,
.dashboard .yellow-btn,
.dashboard .primary-btn {
    background: linear-gradient(120deg, #f0d49b, var(--workspace-gold));
    color: #17140f;
}

.dashboard .history-table-card,
.dashboard .table-card {
    overflow: hidden;
}

.dashboard .history-table-card .table-header,
.dashboard .table-card .table-header {
    padding: 19px 21px;
    border-bottom: 1px solid var(--workspace-border);
}

.dashboard .table-wrapper,
.dashboard .table-wrap {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
}

.dashboard table {
    width: 100%;
    border-collapse: collapse;
}

.dashboard th {
    color: #a6b1bc;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.dashboard td {
    color: #dfe4e8;
    font-size: 12px;
}

.dashboard th,
.dashboard td {
    padding: 13px 15px;
    border-color: rgba(221, 231, 240, .075);
    white-space: nowrap;
}

.dashboard tbody tr {
    transition: background .18s ease;
}

.dashboard tbody tr:hover {
    background: rgba(255, 255, 255, .025);
}

.dashboard .calendar,
.dashboard .license-info {
    gap: 10px;
}

.dashboard .day,
.dashboard .license-info > div {
    border: 1px solid rgba(221, 231, 240, .075);
    border-radius: 11px;
}

.dashboard .day {
    min-width: 0;
}

.dashboard .earning-grid,
.dashboard .license-grid {
    gap: 16px;
}

.dashboard .copy-box,
.dashboard .withdraw-amount-row {
    gap: 9px;
}

.dashboard .table-card,
.dashboard .history-table-card,
.dashboard .history-filter,
.dashboard .earning-card,
.dashboard .license-status-card,
.dashboard .license-card,
.dashboard .history-card,
.dashboard .calendar-card,
.dashboard .summary-card {
    animation: workspace-enter .45s ease both;
}

.dashboard .summary-card:nth-child(2) { animation-delay: .04s; }
.dashboard .summary-card:nth-child(3) { animation-delay: .08s; }
.dashboard .summary-card:nth-child(4) { animation-delay: .12s; }
.dashboard .summary-card:nth-child(5) { animation-delay: .16s; }

.support-shell > .user-section-nav {
    width: 100%;
    flex-wrap: nowrap;
    margin: -8px 0 0;
    padding: 8px;
    overflow-x: auto;
    border: 1px solid rgba(221, 231, 240, .09);
    border-radius: 11px;
    background: rgba(17, 24, 32, .8);
    scrollbar-width: thin;
    scrollbar-color: rgba(223, 182, 107, .65) rgba(17, 24, 32, .3);
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scroll-padding-inline: 8px;
}

.support-shell > .user-section-nav a {
    border-radius: 7px;
    color: #aeb9c4;
    font-size: 11px;
    scroll-snap-align: center;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.support-shell > .user-section-nav::-webkit-scrollbar {
    height: 5px;
}

.support-shell > .user-section-nav::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(223, 182, 107, .65);
}

.support-shell > .user-section-nav::-webkit-scrollbar-track {
    border-radius: 999px;
    background: rgba(17, 24, 32, .3);
}

.support-shell > .user-section-nav a:hover,
.support-shell > .user-section-nav a[aria-current="page"] {
    border-color: rgba(223, 182, 107, .2);
    background: rgba(223, 182, 107, .1);
    color: #e6c77f;
}

@keyframes workspace-enter {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1180px) {
    .dashboard .summary-grid {
        grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
    }
}

@media (max-width: 930px) {
    .dashboard .sidebar {
        flex-wrap: wrap;
        gap: 10px 16px;
        padding: 11px 18px;
    }

    .dashboard .sidebar .logo {
        margin: 0;
    }

    .dashboard .sidebar nav,
    .dashboard .sidebar > ul:not(.sidebar-secondary) {
        min-width: 0;
        flex: 1 1 400px;
    }

    .dashboard .sidebar nav ul,
    .dashboard .sidebar > ul:not(.sidebar-secondary) {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        overflow: visible;
    }

    .dashboard .sidebar-nav a {
        min-height: 36px;
        padding: 0 10px;
    }

    .dashboard .main-content {
        padding: 25px 22px 40px;
    }

    .dashboard .license-grid {
        grid-template-columns: minmax(250px, .8fr) minmax(0, 1.2fr);
    }
}

@media (max-width: 700px) {
    .dashboard .main-content {
        padding: 21px 16px 32px;
    }

    .dashboard .topbar,
    .dashboard .page-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 15px;
        margin-bottom: 20px;
    }

    .dashboard .top-actions {
        width: 100%;
    }

    .dashboard .summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .dashboard .summary-card {
        padding: 15px;
    }

    .dashboard .history-filter,
    .dashboard .calendar-card,
    .dashboard .earning-card,
    .dashboard .table-card,
    .dashboard .license-status-card,
    .dashboard .license-card,
    .dashboard .history-card {
        padding: 17px;
    }

    .dashboard .filter-top,
    .dashboard .filter-row {
        flex-wrap: wrap;
        gap: 12px;
    }

    .dashboard .filter-group,
    .dashboard .account-box {
        min-width: min(100%, 145px);
        flex: 1 1 145px;
    }

    .dashboard .tab-buttons,
    .dashboard .history-tabs {
        max-width: 100%;
        overflow-x: auto;
    }

    .dashboard .calendar {
        gap: 5px;
    }

    .dashboard .day {
        min-height: 70px;
        padding: 7px;
    }

    .dashboard .license-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .dashboard .license-info {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    body:not(.trading-bot-page) .dashboard .main-content {
        padding-top: 12px;
    }

    .dashboard .user-menu-bar:not(.dashboard-menu-bar):not(.trading-user-menu-bar) {
        display: none;
    }

    .dashboard .user-menu-bar:not(.trading-user-menu-bar) {
        min-height: 36px;
        margin-bottom: 8px;
    }

    .dashboard .sidebar {
        gap: 9px;
        padding: 10px 12px;
    }

    .dashboard .sidebar {
        position: relative;
        z-index: 100;
        overflow: visible;
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 12px;
        padding: 9px 13px;
    }

    .dashboard .sidebar .logo {
        width: auto;
        margin: 0 auto 0 0;
    }

    .dashboard .sidebar nav {
        position: static;
        width: auto;
        flex: none;
        order: 3;
    }

    .dashboard .sidebar nav ul {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        display: none;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
        padding: 10px 13px 13px;
        border-bottom: 1px solid var(--workspace-border);
        background: var(--workspace-bg);
        box-shadow: 0 14px 22px rgba(0,0,0,.24);
    }

    .dashboard .sidebar nav.is-open ul {
        display: grid;
    }

    .dashboard .sidebar-menu-toggle {
        display: inline-grid;
        width: 34px;
        height: 36px;
        flex: none;
        place-items: center;
        border: 1px solid var(--workspace-border);
        border-radius: 9px;
        background: var(--workspace-raised);
        color: var(--workspace-text);
        font-size: 15px;
        cursor: pointer;
    }

    .dashboard .sidebar-nav a {
        width: auto;
        min-height: 40px;
        justify-content: flex-start;
        gap: 8px;
        padding: 0 10px;
        font-size: 12px;
    }

    .dashboard .sidebar-secondary {
        display: none;
    }

    .dashboard .sidebar-nav a {
        min-height: 34px;
        gap: 6px;
        padding: 0 8px;
        font-size: 10px;
    }

    .dashboard .sidebar-nav a > i:first-child {
        width: 14px;
        font-size: 11px;
    }

    .dashboard .sidebar > .user-menu-actions {
        order: 2;
        flex: none;
        gap: 5px;
        align-items: center;
    }

    .dashboard .sidebar > .user-menu-actions .user-menu-icon,
    .dashboard .sidebar > .user-menu-actions .user-profile-trigger {
        width: 32px;
        height: 32px;
    }

    .dashboard .sidebar-menu-toggle {
        margin: 0;
    }

    .dashboard .main-content {
        padding: 18px 12px 26px;
    }

    .dashboard .topbar h1,
    .dashboard .page-header h1 {
        font-size: 27px;
    }

    .dashboard .top-actions > * {
        flex: 1 1 auto;
    }

    .dashboard .summary-grid {
        gap: 8px;
    }

    .dashboard .summary-card {
        padding: 13px 11px;
    }

    .dashboard .summary-card h2 {
        font-size: clamp(16px, 5vw, 21px);
    }

    .dashboard .filter-row > button {
        flex: 1 1 125px;
    }

    .dashboard .license-info {
        gap: 8px;
    }

    .dashboard .license-info > div {
        min-width: 0;
        padding: 12px;
    }

    .dashboard .table-wrapper,
    .dashboard .table-wrap {
        margin-right: -8px;
        scrollbar-color: rgba(223, 182, 107, .5) transparent;
    }
}

@media (max-width: 360px) {
    .dashboard .sidebar .fundpilot-wordmark {
        display: none;
    }
}

html[data-theme="light"] .dashboard {
    --workspace-bg: #f3f5f7;
    --workspace-panel: #fff;
    --workspace-raised: #f5f7f9;
    --workspace-border: #e0e5ea;
    --workspace-text: #1e2935;
    --workspace-muted: #667381;
    background:
        radial-gradient(ellipse at 84% 3%, rgba(185, 146, 73, .08), transparent 32rem),
        var(--workspace-bg);
}

html[data-theme="light"] .support-shell > .user-section-nav {
    border-color: #e0e5ea;
    background: rgba(255, 255, 255, .86);
    scrollbar-color: rgba(154, 107, 10, .55) #eef1f5;
}

html[data-theme="light"] .support-shell > .user-section-nav::-webkit-scrollbar-thumb {
    background: rgba(154, 107, 10, .55);
}

html[data-theme="light"] .support-shell > .user-section-nav::-webkit-scrollbar-track {
    background: #eef1f5;
}

html[data-theme="light"] .support-shell > .user-section-nav a {
    color: #667381;
}

html[data-theme="light"] .support-shell > .user-section-nav a:hover,
html[data-theme="light"] .support-shell > .user-section-nav a[aria-current="page"] {
    color: #765b24;
}

@media (max-width: 640px) {
    html {
        scrollbar-width: none;
    }

    html::-webkit-scrollbar {
        display: none;
    }

    .support-shell {
        position: relative;
    }

    .support-shell > .user-section-nav {
        position: static;
        display: flex;
        width: 100%;
        margin: -8px 0 0;
        padding: 8px;
        overflow-x: auto;
        scroll-snap-type: x proximity;
    }

    .support-shell > .user-section-nav a,
    .support-shell > .user-section-nav a {
        display: flex;
        align-items: center;
        padding: 9px 10px;
    }

    .support-shell .support-item {
        padding: 14px;
    }

    .support-shell .support-item h3 {
        margin-bottom: 6px;
        font-size: 15px;
    }

    .support-shell .support-item p {
        margin: 6px 0 8px;
        font-size: 12px;
        line-height: 1.55;
    }

    .support-shell .notification-type {
        margin-bottom: 8px;
        padding: 4px 8px;
    }

    .support-shell .support-item button {
        min-height: 32px;
        margin-top: 7px;
    }

    .support-header .user-menu-actions {
        flex: none;
        gap: 5px;
    }

    .support-header .user-menu-actions .user-menu-icon,
    .support-header .user-menu-actions .user-profile-trigger {
        width: 32px;
        height: 32px;
    }

}

@media (max-width: 360px) {
    .support-header {
        gap: 8px;
    }

    .support-header .user-menu-actions {
        gap: 3px;
    }

    .support-header .user-menu-actions .user-menu-icon,
    .support-header .user-menu-actions .user-profile-trigger {
        width: 27px;
        height: 28px;
    }
}

html[data-theme="light"] .dashboard .sidebar {
    background: rgba(255, 255, 255, .97);
}

html[data-theme="light"] body .dashboard .sidebar .fundpilot-wordmark strong {
    color: #172033;
}

html[data-theme="light"] .dashboard .sidebar-nav a {
    color: #465466;
}

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

html[data-theme="light"] .dashboard .sidebar-nav a > i:first-child {
    color: #64748b;
}

html[data-theme="light"] .dashboard .summary-card,
html[data-theme="light"] .dashboard .history-filter,
html[data-theme="light"] .dashboard .history-table-card,
html[data-theme="light"] .dashboard .calendar-card,
html[data-theme="light"] .dashboard .earning-card,
html[data-theme="light"] .dashboard .table-card,
html[data-theme="light"] .dashboard .license-status-card,
html[data-theme="light"] .dashboard .license-card,
html[data-theme="light"] .dashboard .history-card {
    background: linear-gradient(145deg, #fff, #f8fafb);
}

html[data-theme="light"] .dashboard .summary-card h2,
html[data-theme="light"] .dashboard .summary-card h3,
html[data-theme="light"] .dashboard .summary-card span,
html[data-theme="light"] .dashboard .table-header h2,
html[data-theme="light"] .dashboard .calendar-header h2,
html[data-theme="light"] .dashboard .status-header h2,
html[data-theme="light"] .dashboard .earning-card h2,
html[data-theme="light"] .dashboard .license-card h2 {
    color: var(--workspace-text);
}

html[data-theme="light"] .dashboard .filter-group label,
html[data-theme="light"] .dashboard .account-box label,
html[data-theme="light"] .dashboard .earning-card label,
html[data-theme="light"] .dashboard .license-card label,
html[data-theme="light"] .dashboard .withdrawal-verification-content label {
    color: #465466;
}

html[data-theme="light"] .dashboard .license-info h4 {
    color: #cbd5e1;
}

html[data-theme="light"] .dashboard .license-info p {
    color: #fff;
}

html[data-theme="light"] .dashboard input:not([type="checkbox"]),
html[data-theme="light"] .dashboard select,
html[data-theme="light"] .dashboard textarea,
html[data-theme="light"] .dashboard .earning-card input,
html[data-theme="light"] .dashboard .earning-card select,
html[data-theme="light"] .dashboard .license-card input,
html[data-theme="light"] .dashboard .license-card select {
    border-color: #d6dde4;
    background: #fff;
    color: #1e2935;
}

html[data-theme="light"] .dashboard th {
    background: #f2f5f7;
    color: #65717d;
}

html[data-theme="light"] .dashboard td {
    color: #273442;
}

@media (prefers-reduced-motion: reduce) {
    .dashboard .summary-card,
    .dashboard .table-card,
    .dashboard .history-table-card,
    .dashboard .history-filter,
    .dashboard .earning-card,
    .dashboard .license-status-card,
    .dashboard .license-card,
    .dashboard .history-card,
    .dashboard .calendar-card {
        animation: none !important;
    }

    .dashboard .summary-card:hover,
    .dashboard .process-card:hover,
    .dashboard .sidebar-nav a:hover,
    .dashboard .filter-btn:hover,
    .dashboard .refresh-btn:hover,
    .dashboard .download-btn:hover,
    .dashboard .yellow-btn:hover,
    .dashboard .primary-btn:hover,
    .dashboard .secondary-btn:hover {
        transform: none;
    }
}
