/* Prime Task theme tokens. Light remains the default. */
:root {
    --ptm-bg: #f5f7fa;
    --ptm-surface: #ffffff;
    --ptm-surface-secondary: #eef2f6;
    --ptm-text: #1a2332;
    --ptm-text-secondary: #666f7d;
    --ptm-border: #dfe5ec;
    --ptm-primary: #ff6b35;
    --ptm-primary-hover: #d9572a;
    --ptm-success: #00a651;
    --ptm-warning: #f0a000;
    --ptm-danger: #d64545;
}

html.ptm-dark,
html[data-ptm-theme="dark"] {
    --ptm-bg: #101820;
    --ptm-surface: #172532;
    --ptm-surface-secondary: #203444;
    --ptm-text: #f4f7fa;
    --ptm-text-secondary: #b3c0cc;
    --ptm-border: #345064;
    --ptm-primary: #ff7b4a;
    --ptm-primary-hover: #ff986f;
    --ptm-success: #39c982;
    --ptm-warning: #ffc14d;
    --ptm-danger: #ff7777;
}

html[data-ptm-theme="dark"] body,
html.ptm-dark body {
    background: var(--ptm-bg);
    color: var(--ptm-text);
}

html[data-ptm-theme="dark"] .tm-portal,
html.ptm-dark .tm-portal,
html[data-ptm-theme="dark"] #vcp-app-container,
html.ptm-dark #vcp-app-container {
    background: var(--ptm-bg) !important;
    color: var(--ptm-text);
}

html[data-ptm-theme="dark"] .tm-main-container,
html.ptm-dark .tm-main-container,
html[data-ptm-theme="dark"] .tm-content,
html.ptm-dark .tm-content,
html[data-ptm-theme="dark"] .tm-card,
html.ptm-dark .tm-card,
html[data-ptm-theme="dark"] .tm-stat-card,
html.ptm-dark .tm-stat-card,
html[data-ptm-theme="dark"] .vcp-card,
html.ptm-dark .vcp-card,
html[data-ptm-theme="dark"] .vcp-modal-content,
html.ptm-dark .vcp-modal-content {
    background-color: var(--ptm-surface) !important;
    color: var(--ptm-text);
    border-color: var(--ptm-border) !important;
}

html[data-ptm-theme="dark"] .tm-text-muted,
html.ptm-dark .tm-text-muted,
html[data-ptm-theme="dark"] small,
html.ptm-dark small,
html[data-ptm-theme="dark"] .tm-label,
html.ptm-dark .tm-label {
    color: var(--ptm-text-secondary);
}

html[data-ptm-theme="dark"] input,
html.ptm-dark input,
html[data-ptm-theme="dark"] textarea,
html.ptm-dark textarea,
html[data-ptm-theme="dark"] select,
html.ptm-dark select,
html[data-ptm-theme="dark"] .tm-input,
html.ptm-dark .tm-input,
html[data-ptm-theme="dark"] .tm-select,
html.ptm-dark .tm-select {
    background-color: var(--ptm-surface-secondary) !important;
    color: var(--ptm-text) !important;
    border-color: var(--ptm-border) !important;
}

html[data-ptm-theme="dark"] input::placeholder,
html.ptm-dark input::placeholder,
html[data-ptm-theme="dark"] textarea::placeholder,
html.ptm-dark textarea::placeholder {
    color: #91a4b4;
}

html[data-ptm-theme="dark"] .tm-header,
html.ptm-dark .tm-header,
html[data-ptm-theme="dark"] .tm-sidebar,
html.ptm-dark .tm-sidebar,
html[data-ptm-theme="dark"] .vcp-sidebar,
html.ptm-dark .vcp-sidebar,
html[data-ptm-theme="dark"] .vcp-header,
html.ptm-dark .vcp-header {
    background-color: #0d1c29 !important;
    color: var(--ptm-text);
    border-color: var(--ptm-border) !important;
}

html[data-ptm-theme="dark"] .tm-header-title,
html.ptm-dark .tm-header-title,
html[data-ptm-theme="dark"] h1,
html.ptm-dark h1,
html[data-ptm-theme="dark"] h2,
html.ptm-dark h2,
html[data-ptm-theme="dark"] h3,
html.ptm-dark h3,
html[data-ptm-theme="dark"] h4,
html.ptm-dark h4,
html[data-ptm-theme="dark"] strong,
html.ptm-dark strong {
    color: var(--ptm-text);
}

html[data-ptm-theme="dark"] a,
html.ptm-dark a {
    color: #63c7f2;
}

.tm-deposit-address-label {
    margin-bottom: 8px;
    color: #526274;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.tm-deposit-wallet-card,
.tm-deposit-address-card,
.tm-deposit-qr-card {
    background: #fff;
    border: 1px solid #dbe5ee;
    box-shadow: 0 8px 24px rgba(15, 35, 55, .12);
}

.tm-deposit-wallet-title {
    color: #000;
}

.tm-deposit-network-card {
    min-height: 164px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(15, 35, 55, .14);
}

.tm-deposit-network-card:hover:not(:disabled) {
    box-shadow: 0 8px 18px rgba(15, 35, 55, .18);
}

.tm-deposit-address {
    color: #000;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.6;
    overflow-wrap: anywhere;
    user-select: all;
}

html[data-ptm-theme="dark"] .tm-deposit-address-label,
html.ptm-dark .tm-deposit-address-label {
    color: #b9c9d8;
}

html[data-ptm-theme="dark"] .tm-deposit-wallet-card,
html.ptm-dark .tm-deposit-wallet-card,
html[data-ptm-theme="dark"] .tm-deposit-address-card,
html.ptm-dark .tm-deposit-address-card,
html[data-ptm-theme="dark"] .tm-deposit-qr-card,
html.ptm-dark .tm-deposit-qr-card {
    background: #172532;
    border-color: #fff;
    box-shadow: none;
}

html[data-ptm-theme="dark"] .tm-deposit-wallet-title,
html.ptm-dark .tm-deposit-wallet-title {
    color: #fff;
}

html[data-ptm-theme="dark"] .tm-deposit-address,
html.ptm-dark .tm-deposit-address {
    color: #fff;
    background: #ffffff;
    padding: 6px 8px;
    border-radius: 6px;
}

html[data-ptm-theme="dark"] .tm-admin-developed-by a,
html.ptm-dark .tm-admin-developed-by a {
    color: #f36a32;
}

html[data-ptm-theme="dark"] .tm-language-menu,
html.ptm-dark .tm-language-menu,
html[data-ptm-theme="dark"] .tm-profile-menu,
html.ptm-dark .tm-profile-menu {
    background: #203444 !important;
    color: #ffffff !important;
    border: 1px solid #ffffff !important;
}

html[data-ptm-theme="dark"] .tm-language-menu::after,
html.ptm-dark .tm-language-menu::after,
html[data-ptm-theme="dark"] .tm-language-icon,
html.ptm-dark .tm-language-icon,
html[data-ptm-theme="dark"] .tm-language-select,
html.ptm-dark .tm-language-select,
html[data-ptm-theme="dark"] .pt-worker-language-select,
html.ptm-dark .pt-worker-language-select,
html[data-ptm-theme="dark"] #tm-user-name,
html.ptm-dark #tm-user-name,
html[data-ptm-theme="dark"] .tm-profile-menu-trigger .tm-caret,
html.ptm-dark .tm-profile-menu-trigger .tm-caret {
    color: #ffffff !important;
}

html[data-ptm-theme="dark"] .tm-language-select option,
html.ptm-dark .tm-language-select option,
html[data-ptm-theme="dark"] .pt-worker-language-select option,
html.ptm-dark .pt-worker-language-select option {
    background: var(--ptm-bg);
    color: #ffffff;
}

html[data-ptm-theme="dark"] .tm-profile-dropdown,
html.ptm-dark .tm-profile-dropdown {
    background: #203444 !important;
    border: 1px solid #ffffff !important;
}

html[data-ptm-theme="dark"] .tm-profile-dropdown button,
html.ptm-dark .tm-profile-dropdown button,
html[data-ptm-theme="dark"] .tm-profile-dropdown a,
html.ptm-dark .tm-profile-dropdown a {
    color: #ffffff !important;
}

html[data-ptm-theme="dark"] .tm-profile-dropdown button:hover,
html.ptm-dark .tm-profile-dropdown button:hover,
html[data-ptm-theme="dark"] .tm-profile-dropdown a:hover,
html.ptm-dark .tm-profile-dropdown a:hover {
    background: var(--ptm-surface-secondary) !important;
    color: #ffffff !important;
}

html[data-ptm-theme="dark"] .tm-profile-dropdown .tm-logout-link,
html.ptm-dark .tm-profile-dropdown .tm-logout-link {
    border-top-color: #ffffff !important;
    color: #ffffff !important;
}

html[data-ptm-theme="dark"] .tm-profile-menu:hover,
html.ptm-dark .tm-profile-menu:hover {
    background: var(--ptm-surface-secondary) !important;
}

html[data-ptm-theme="dark"] #tm-page-home > #tm-affiliate-program-card,
html.ptm-dark #tm-page-home > #tm-affiliate-program-card,
html[data-ptm-theme="dark"] #tm-page-home > #tm-company-rules-card,
html.ptm-dark #tm-page-home > #tm-company-rules-card,
html[data-ptm-theme="dark"] #tm-page-home > #tm-platform-profile-card,
html.ptm-dark #tm-page-home > #tm-platform-profile-card,
html[data-ptm-theme="dark"] #tm-page-home > #tm-instructions-card,
html.ptm-dark #tm-page-home > #tm-instructions-card {
    background: var(--ptm-surface) !important;
    border-color: var(--ptm-border) !important;
}

html[data-ptm-theme="dark"] #tm-page-home > #tm-affiliate-program-card > div:first-child,
html.ptm-dark #tm-page-home > #tm-affiliate-program-card > div:first-child,
html[data-ptm-theme="dark"] #tm-page-home > #tm-company-rules-card > div:first-child,
html.ptm-dark #tm-page-home > #tm-company-rules-card > div:first-child,
html[data-ptm-theme="dark"] #tm-page-home > #tm-platform-profile-card > div:first-child,
html.ptm-dark #tm-page-home > #tm-platform-profile-card > div:first-child,
html[data-ptm-theme="dark"] #tm-page-home > #tm-instructions-card > div:first-child,
html.ptm-dark #tm-page-home > #tm-instructions-card > div:first-child {
    background: var(--ptm-surface) !important;
}

html[data-ptm-theme="dark"] #tm-page-home > #tm-affiliate-program-card h3,
html.ptm-dark #tm-page-home > #tm-affiliate-program-card h3,
html[data-ptm-theme="dark"] #tm-page-home > #tm-company-rules-card h3,
html.ptm-dark #tm-page-home > #tm-company-rules-card h3,
html[data-ptm-theme="dark"] #tm-page-home > #tm-platform-profile-card h3,
html.ptm-dark #tm-page-home > #tm-platform-profile-card h3,
html[data-ptm-theme="dark"] #tm-page-home > #tm-instructions-card h3,
html.ptm-dark #tm-page-home > #tm-instructions-card h3 {
    color: var(--ptm-text) !important;
}

html[data-ptm-theme="dark"] #tm-page-home > #tm-affiliate-program-card p,
html.ptm-dark #tm-page-home > #tm-affiliate-program-card p,
html[data-ptm-theme="dark"] #tm-page-home > #tm-company-rules-card p,
html.ptm-dark #tm-page-home > #tm-company-rules-card p,
html[data-ptm-theme="dark"] #tm-page-home > #tm-platform-profile-card p,
html.ptm-dark #tm-page-home > #tm-platform-profile-card p,
html[data-ptm-theme="dark"] #tm-page-home > #tm-instructions-card p,
html.ptm-dark #tm-page-home > #tm-instructions-card p {
    color: var(--ptm-text-secondary) !important;
}

html[data-ptm-theme="dark"] #tm-page-affiliate-program .tm-card h2,
html.ptm-dark #tm-page-affiliate-program .tm-card h2,
html[data-ptm-theme="dark"] #tm-page-affiliate-program .tm-card h3,
html.ptm-dark #tm-page-affiliate-program .tm-card h3,
html[data-ptm-theme="dark"] #tm-page-company-rules .tm-card h2,
html.ptm-dark #tm-page-company-rules .tm-card h2,
html[data-ptm-theme="dark"] #tm-page-company-rules .tm-card h3,
html.ptm-dark #tm-page-company-rules .tm-card h3,
html[data-ptm-theme="dark"] #tm-page-platform-profile .tm-card h2,
html.ptm-dark #tm-page-platform-profile .tm-card h2,
html[data-ptm-theme="dark"] #tm-page-platform-profile .tm-card h3,
html.ptm-dark #tm-page-platform-profile .tm-card h3,
html[data-ptm-theme="dark"] #tm-page-instructions .tm-card h2,
html.ptm-dark #tm-page-instructions .tm-card h2,
html[data-ptm-theme="dark"] #tm-page-instructions .tm-card h3,
html.ptm-dark #tm-page-instructions .tm-card h3 {
    color: var(--ptm-text) !important;
}

html[data-ptm-theme="dark"] #tm-page-affiliate-program .tm-card p,
html.ptm-dark #tm-page-affiliate-program .tm-card p,
html[data-ptm-theme="dark"] #tm-page-affiliate-program .tm-card ul,
html.ptm-dark #tm-page-affiliate-program .tm-card ul,
html[data-ptm-theme="dark"] #tm-page-affiliate-program .tm-card ol,
html.ptm-dark #tm-page-affiliate-program .tm-card ol,
html[data-ptm-theme="dark"] #tm-page-company-rules .tm-card p,
html.ptm-dark #tm-page-company-rules .tm-card p,
html[data-ptm-theme="dark"] #tm-page-company-rules .tm-card ul,
html.ptm-dark #tm-page-company-rules .tm-card ul,
html[data-ptm-theme="dark"] #tm-page-platform-profile .tm-card p,
html.ptm-dark #tm-page-platform-profile .tm-card p,
html[data-ptm-theme="dark"] #tm-page-platform-profile .tm-card ul,
html.ptm-dark #tm-page-platform-profile .tm-card ul,
html[data-ptm-theme="dark"] #tm-page-instructions .tm-card p,
html.ptm-dark #tm-page-instructions .tm-card p,
html[data-ptm-theme="dark"] #tm-page-instructions .tm-card ul,
html.ptm-dark #tm-page-instructions .tm-card ul {
    color: var(--ptm-text-secondary) !important;
}

.tm-detail-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 18px;
    padding: 7px 10px 7px 0;
    border: 0;
    background: transparent;
    color: var(--ptm-text-secondary);
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
}

.tm-detail-back:hover,
.tm-detail-back:focus-visible {
    color: var(--ptm-primary);
}

html[data-ptm-theme="dark"] #tm-notifications-btn:hover,
html.ptm-dark #tm-notifications-btn:hover {
    background-color: color-mix(in srgb, var(--ptm-primary) 18%, transparent);
}

.ptm-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 42px;
    min-height: 38px;
    margin-inline: 2px;
    padding: 7px 10px;
    border: 1px solid var(--ptm-border);
    border-radius: 10px;
    background: var(--ptm-surface);
    color: var(--ptm-text);
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.ptm-theme-toggle:hover,
.ptm-theme-toggle:focus-visible {
    border-color: var(--ptm-primary);
    outline: 2px solid color-mix(in srgb, var(--ptm-primary) 35%, transparent);
    outline-offset: 2px;
}

#vcp-sidebar .ptm-theme-toggle {
    width: calc(100% - 24px);
    margin: 12px;
}

.ppc-login-page > .ptm-theme-toggle {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 20;
}

html[data-ptm-theme="dark"] .ppc-login-page,
html.ptm-dark .ppc-login-page {
    background: var(--ptm-bg);
    color: var(--ptm-text);
}

html[data-ptm-theme="dark"] .ppc-login-panel,
html.ptm-dark .ppc-login-panel {
    background: var(--ptm-surface) !important;
    color: var(--ptm-text);
}

html[data-ptm-theme="dark"] .ppc-login-content,
html.ptm-dark .ppc-login-content,
html[data-ptm-theme="dark"] .ppc-login-content h2,
html.ptm-dark .ppc-login-content h2,
html[data-ptm-theme="dark"] .ppc-login-content label,
html.ptm-dark .ppc-login-content label {
    color: var(--ptm-text);
}

html[data-ptm-theme="dark"] .ppc-login-intro,
html.ptm-dark .ppc-login-intro,
html[data-ptm-theme="dark"] .ppc-login-note,
html.ptm-dark .ppc-login-note,
html[data-ptm-theme="dark"] .ppc-register-cta,
html.ptm-dark .ppc-register-cta {
    color: var(--ptm-text-secondary);
}

@media (max-width: 620px) {
    .ptm-theme-toggle [data-theme-label] { display: none; }
    .ptm-theme-toggle { width: 40px; padding-inline: 8px; }
}
