:root {
    color-scheme: dark;
    --system-bg: #101722;
    --system-surface: #182332;
    --system-surface-raised: #202d3f;
    --system-text: #e4ecf5;
    --system-muted: #a4b1c2;
    --system-border: rgba(179, 198, 220, .16);
    --system-input: #121d2b;
}

html.theme-light {
    color-scheme: light;
    --system-bg: #f3f6fa;
    --system-surface: #fff;
    --system-surface-raised: #f7f9fc;
    --system-text: #273650;
    --system-muted: #687891;
    --system-border: rgba(76, 101, 143, .16);
    --system-input: #fff;
}

html.theme-dark body {
    color: var(--system-text);
    background-color: var(--system-bg);
    background-image:
        radial-gradient(circle at 8% 0%, rgba(86, 112, 224, .12), transparent 30%),
        radial-gradient(circle at 92% 18%, rgba(25, 190, 155, .08), transparent 28%),
        linear-gradient(180deg, #101722, #111b29);
}

html.theme-dark .s7__main,
html.theme-dark .s7__main .qa-page,
html.theme-dark .s7__main .admin-dashboard,
html.theme-dark .s7__main .admin-user-details {
    color: var(--system-text);
}

html.theme-dark .s7__main .qa-page {
    --qa-ink: #e4ecf5;
    --qa-muted: #a4b1c2;
    --qa-line: rgba(179, 198, 220, .16);
    --qa-panel: #182332;
}

html.theme-dark .s7__main .qa-panel,
html.theme-dark .s7__main .qa-stat,
html.theme-dark .s7__main .dash-metric,
html.theme-dark .s7__main .dash-shortcut,
html.theme-dark .s7__main .dash-section,
html.theme-dark .s7__main .dash-panel,
html.theme-dark .s7__main .card,
html.theme-dark .s7__main .s7__widget,
html.theme-dark .s7__main .s7__widget-two,
html.theme-dark .s7__main .s7__widget-three,
html.theme-dark .s7__main .s7__widget-four,
html.theme-dark .s7__main .s7__widget-five {
    color: var(--system-text);
    border-color: var(--system-border);
    background: linear-gradient(145deg, var(--system-surface), var(--system-surface-raised));
}

html.theme-dark .s7__main .qa-title,
html.theme-dark .s7__main .qa-panel-heading,
html.theme-dark .s7__main .qa-stat-value,
html.theme-dark .s7__main .dash-metric-value,
html.theme-dark .s7__main .dash-shortcut-copy strong,
html.theme-dark .s7__main .card h1,
html.theme-dark .s7__main .card h2,
html.theme-dark .s7__main .card h3,
html.theme-dark .s7__main .card h4,
html.theme-dark .s7__main .card h5,
html.theme-dark .s7__main .s7__page-nav .title {
    color: #edf4fb;
}

html.theme-dark .s7__main .qa-subtitle,
html.theme-dark .s7__main .qa-help,
html.theme-dark .s7__main .qa-stat-label,
html.theme-dark .s7__main .dash-metric-label,
html.theme-dark .s7__main .dash-shortcut-copy small,
html.theme-dark .s7__main .text-muted,
html.theme-dark .s7__main .text-dark {
    color: var(--system-muted) !important;
}

html.theme-dark .s7__main .qa-table,
html.theme-dark .s7__main .table,
html.theme-dark .s7__main table.table {
    color: var(--system-text);
    border-color: var(--system-border);
}

html.theme-dark .s7__main .qa-table thead th,
html.theme-dark .s7__main table.table thead th,
html.theme-dark .s7__main table.s7__table thead th {
    color: #d9e5f2 !important;
    border-color: var(--system-border);
    background: #253348;
}

html.theme-dark .s7__main .qa-table tbody td,
html.theme-dark .s7__main table.table tbody td,
html.theme-dark .s7__main table.table tbody th,
html.theme-dark .s7__main table.s7__table tbody td,
html.theme-dark .s7__main table.s7__table tbody th {
    color: #d4dfeb !important;
    border-color: var(--system-border);
}

html.theme-dark .s7__main .qa-form label,
html.theme-dark .s7__main .qa-page .qa-form label {
    color: #c5d2e1;
}

html.theme-dark .s7__main h1,
html.theme-dark .s7__main h2,
html.theme-dark .s7__main h3,
html.theme-dark .s7__main h4,
html.theme-dark .s7__main h5,
html.theme-dark .s7__main h6 {
    color: #edf4fb !important;
}

html.theme-dark .s7__main p:not(:where(.dashboard-eyebrow, .dash-label, .dash-hero-caption, .qa-eyebrow, .txn-eyebrow, .referral-description, .referral-status, .instruction, .text-success, .text-danger, .text-warning, .text-info)) {
    color: #b7c5d6 !important;
}

html.theme-dark .s7__main .card p,
html.theme-dark .s7__main .card .card-text {
    color: #b7c5d6;
}

html.theme-dark .s7__main .dash-hero .dash-label {
    color: rgba(255, 255, 255, .82) !important;
}

html.theme-dark .s7__main .dash-hero .dash-hero-caption {
    color: rgba(255, 255, 255, .85) !important;
}

html.theme-dark .s7__main .dash-token-price-value {
    color: #edf4fb !important;
}

html.theme-dark .s7__main .qa-stat-value small,
html.theme-dark .s7__main .qa-table tbody td::before {
    color: #a4b1c2;
}

html.theme-dark .s7__main .qa-badge {
    color: #d4dfeb;
    border-color: var(--system-border);
    background: #253348;
}

html.theme-dark .s7__main .qa-badge-active {
    color: #8ce8c3;
    border-color: rgba(77, 224, 176, .24);
    background: rgba(10, 155, 113, .16);
}

html.theme-dark .s7__main .mining-package-card,
html.theme-dark .s7__main .stake-package-card {
    border-color: var(--system-border);
    background: linear-gradient(145deg, var(--system-surface), var(--system-surface-raised));
}

html.theme-dark .s7__main .mining-package-option input:checked + .mining-package-card,
html.theme-dark .s7__main .stake-package-option input:checked + .stake-package-card {
    border-color: #4de0b0;
    box-shadow: 0 0 0 3px rgba(77, 224, 176, .15);
}

html.theme-dark .s7__main .mining-package-option input:focus-visible + .mining-package-card,
html.theme-dark .s7__main .stake-package-option input:focus-visible + .stake-package-card {
    outline-color: #70c8ff;
}

html.theme-dark .s7__main .mining-package-duration,
html.theme-dark .s7__main .stake-package-duration {
    color: #edf4fb;
}

html.theme-dark .s7__main .mining-package-details,
html.theme-dark .s7__main .stake-package-details {
    color: #a4b1c2;
}

html.theme-dark .s7__main .mining-package-rate,
html.theme-dark .s7__main .stake-package-rate {
    color: #8ce8c3;
}

html.theme-dark .s7__main .form-control,
html.theme-dark .s7__main select,
html.theme-dark .s7__main textarea,
html.theme-dark .s7__main .input-group-text {
    color: var(--system-text);
    border-color: var(--system-border);
    background-color: var(--system-input);
}

html.theme-dark .s7__main .form-control::placeholder,
html.theme-dark .s7__main textarea::placeholder {
    color: #91a1b5;
}

html.theme-dark .s7__main .modal-content,
html.theme-dark .dropdown-menu,
html.theme-dark .s7__main .dropdown-menu {
    color: var(--system-text);
    border-color: var(--system-border);
    background: var(--system-surface-raised);
}

html.theme-dark .s7__main .dropdown-item {
    color: var(--system-text);
}

html.theme-dark .s7__main .dropdown-item:hover,
html.theme-dark .s7__main .dropdown-item:focus {
    color: #fff;
    background: #304158;
}

html.theme-dark .s7__main .sheet {
    border: 1px solid var(--system-border);
    background: linear-gradient(145deg, #182332, #202d3f);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .22);
}

html.theme-dark .s7__main .option {
    border-color: var(--system-border);
    color: #e4ecf5;
    background: #202d3f;
}

html.theme-dark .s7__main .option:hover {
    background: #29394c;
}

html.theme-dark .s7__main .option .title,
html.theme-dark .s7__main .option .chev {
    color: #e4ecf5 !important;
}

html.theme-dark .s7__main .nav-tabs {
    border-bottom-color: var(--system-border);
}

html.theme-dark .s7__main .nav-tabs .nav-link {
    border-color: transparent;
    color: #c5d2e1;
    background: transparent;
}

html.theme-dark .s7__main .nav-tabs .nav-link:hover,
html.theme-dark .s7__main .nav-tabs .nav-link:focus {
    border-color: var(--system-border);
    color: #edf4fb;
}

html.theme-dark .s7__main .nav-tabs .nav-link.active {
    border-color: var(--system-border) var(--system-border) #182332;
    color: #edf4fb;
    background: #182332;
}

html.theme-dark .s7__main .network-tree-legend-item,
html.theme-dark .s7__main .network-tree-active-label,
html.theme-dark .s7__main .network-tree-inactive-label {
    color: #c5d2e1;
}

html.theme-dark .s7__main .photo-header .instruction {
    color: #fff !important;
}

html.theme-dark .modern-sidebar {
    border-color: var(--system-border);
    background: linear-gradient(180deg, #1d2939, #162131);
}

html.theme-dark .modern-sidebar .nav-item-box.active,
html.theme-dark .modern-sidebar .nav-item-box .nav-link-box.active {
    border-color: rgba(77, 224, 176, .22);
    background: rgba(10, 155, 113, .16);
    box-shadow: inset 3px 0 0 #53d5b0;
}

html.theme-dark .modern-sidebar .nav-item-box.active .nav-link-box,
html.theme-dark .modern-sidebar .nav-item-box .nav-link-box.active {
    color: #8ce8c3;
}

html.theme-dark .s7__nav {
    border-bottom-color: rgba(179, 198, 220, .14);
    background: linear-gradient(110deg, rgba(14, 22, 34, .98), rgba(22, 33, 48, .96));
    box-shadow: 0 10px 32px rgba(0, 0, 0, .3);
}

html.theme-dark .s7__nav .nvbtn,
html.theme-dark .s7__nav .sidebar-open-btn,
html.theme-dark .s7__nav .sidebar-collapse-btn {
    border-color: rgba(179, 198, 220, .17);
    color: #d7e3ef !important;
    background: #202d3f;
}

html.theme-dark .s7__nav .nvbtn:hover,
html.theme-dark .s7__nav .nvbtn:focus-visible,
html.theme-dark .s7__nav .sidebar-open-btn:hover,
html.theme-dark .s7__nav .sidebar-open-btn:focus-visible {
    border-color: rgba(77, 224, 176, .45);
    color: #8ce8c3 !important;
    background: #27394b;
}

html.theme-dark .s7__nav .nvbtn i,
html.theme-dark .s7__nav .nvbtn svg {
    color: #d7e3ef !important;
}

html.theme-dark .s7__main .dashboard-container {
    --dash-ink: #e4ecf5;
    --dash-muted: #a4b1c2;
    --dash-line: rgba(179, 198, 220, .17);
    --dash-panel: #182332;
    --dash-green: #55d6ad;
    color: #e4ecf5;
}

html.theme-dark .s7__main .dashboard-head h1,
html.theme-dark .s7__main .dash-section-heading h2,
html.theme-dark .s7__main #shortcuts-heading,
html.theme-dark .s7__main .dash-shortcuts .dash-shortcut-copy strong {
    color: #edf4fb;
}

html.theme-dark .s7__main .dashboard-head h1 span {
    color: #69e0bb;
}

html.theme-dark .s7__main .dashboard-date {
    border-color: var(--system-border);
    color: #d4dfeb;
    background: #202d3f;
}

html.theme-dark .s7__main .dash-metric,
html.theme-dark .s7__main .dash-shortcut,
html.theme-dark .s7__main .dash-panel {
    border-color: var(--dash-line);
    background: linear-gradient(145deg, #182332, #202d3f);
    box-shadow: 0 10px 26px rgba(0, 0, 0, .18);
}

html.theme-dark .s7__main .dash-shortcut {
    color: #dce7f3;
}

html.theme-dark .s7__main .dash-shortcut:hover {
    border-color: rgba(77, 224, 176, .4);
    color: #f2f7fc;
    background: linear-gradient(145deg, #223247, #26394d);
}

html.theme-dark .s7__main .dash-shortcut:nth-child(4n + 1) .dash-shortcut-icon {
    color: #70dfb5;
    background: rgba(16, 185, 129, .16);
}

html.theme-dark .s7__main .dash-shortcut:nth-child(4n + 2) .dash-shortcut-icon {
    color: #75c9f5;
    background: rgba(32, 164, 220, .16);
}

html.theme-dark .s7__main .dash-shortcut:nth-child(4n + 3) .dash-shortcut-icon {
    color: #c0a5ff;
    background: rgba(132, 94, 220, .17);
}

html.theme-dark .s7__main .dash-shortcut:nth-child(4n) .dash-shortcut-icon {
    color: #f39ac0;
    background: rgba(195, 63, 121, .16);
}

html.theme-dark .s7__main .dash-shortcut-arrow {
    color: #a4b1c2;
}

html.theme-dark .s7__main .dash-announcement-message {
    color: #bdcad8;
}

html.theme-dark .s7__main .dash-metric-icon.wallet {
    color: #75c9f5;
    background: rgba(32, 164, 220, .16);
}

html.theme-dark .s7__main .dash-metric-icon.usdt {
    color: #70dfb5;
    background: rgba(16, 185, 129, .16);
}

html.theme-dark .s7__main .dash-metric-icon.token {
    color: #c0a5ff;
    background: rgba(132, 94, 220, .17);
}

html.theme-dark .body-area > footer,
html.theme-dark .footer-navigation {
    border-color: var(--system-border);
    background: linear-gradient(145deg, #1b2838, #182333);
}

html.theme-dark .body-area > footer button.iconbx {
    color: #91a3b8;
}

html.theme-dark .body-area > footer button.iconbx.active {
    color: #4de0b0;
}

html.theme-dark .body-area > footer button.iconbx:hover,
html.theme-dark .body-area > footer button.iconbx:focus-visible {
    color: #effff9;
}

html.theme-dark .auth-page,
html.theme-dark body:has(.admin-login-page) {
    color: var(--system-text);
    background:
        radial-gradient(circle at 8% 8%, rgba(83, 97, 219, .15), transparent 28%),
        radial-gradient(circle at 92% 92%, rgba(10, 155, 113, .12), transparent 30%),
        linear-gradient(145deg, #101722, #151d2b 55%, #10211f);
}

html.theme-dark .auth-layout,
html.theme-dark .admin-login-card {
    color: var(--system-text);
    border-color: var(--system-border);
    background: linear-gradient(145deg, #1b2737, #202b3c 65%, #192b2d);
}

html.theme-dark .auth-heading,
html.theme-dark .auth-intro,
html.theme-dark .auth-form label,
html.theme-dark .admin-login-card h1,
html.theme-dark .admin-login-card label {
    color: var(--system-text);
}

html.theme-dark .auth-form .form-control,
html.theme-dark .admin-login-card .form-control {
    color: var(--system-text);
    border-color: var(--system-border);
    background: var(--system-input);
}

html.theme-dark .auth-form .form-control::placeholder {
    color: var(--system-muted);
}

html.theme-light body.index_ico {
    color: #273650;
    background-color: #f3f6fa;
    background-image:
        radial-gradient(ellipse at 9% 12%, rgba(63, 180, 255, .08), transparent 30%),
        radial-gradient(ellipse at 91% 58%, rgba(139, 92, 246, .06), transparent 34%);
}

html.theme-light .index_ico .card,
html.theme-light .index_ico .ico_heading_block,
html.theme-light .index_ico .ico_feature_item,
html.theme-light .index_ico .ico_roadmap_item,
html.theme-light .index_ico .ico_faq_item {
    color: #273650;
    border-color: rgba(76, 101, 143, .16);
    background: linear-gradient(145deg, #fff, #f3f6fa);
}

html.theme-light .index_ico .text-white,
html.theme-light .index_ico .text-light {
    color: #273650 !important;
}

html.theme-dark .theme-toggle-nav-item {
    display: flex;
    align-items: center;
}

.global-theme-toggle {
    display: inline-grid;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(148, 181, 207, .25);
    border-radius: 12px;
    color: #f6cc67;
    background: rgba(24, 35, 50, .94);
    box-shadow: 0 5px 16px rgba(0, 0, 0, .2);
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.global-theme-toggle:hover,
.global-theme-toggle:focus-visible {
    border-color: rgba(77, 224, 176, .55);
    transform: translateY(-1px);
    outline: none;
}

.global-theme-toggle svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

html.theme-light .global-theme-toggle {
    color: #5361cb;
    background: #fff;
}

body > .global-theme-toggle {
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 1200;
}

@media (max-width: 767px) {
    body > .global-theme-toggle {
        top: 10px;
        right: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .global-theme-toggle {
        transition: none;
    }
}
