@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/**
 * DailyDrop Affiliate Dashboard Theme
 * Premium, Modern, Professional Design System
 * 
 * Color Scheme:
 * - Primary: DailyDrop Orange (#FF6B35)
 * - Dark: Deep Charcoal (#1A1A1A)
 * - Light: Off-white (#F5F7FA)
 * - Text: Dark charcoal (#1A2332)
 * - Accent: Professional green (#00A651), orange (#FFA500)
 */

:root {
    /* ============= DailyDrop Brand Colors ============= */
    --dd-primary: #FF6B35;           /* DailyDrop Orange */
    --dd-primary-dark: #CC5529;      /* Darker Orange */
    --dd-primary-light: #FFE6D5;     /* Light Orange */
    --dd-primary-lighter: #FFF3ED;   /* Lighter Orange */
    
    /* ============= Neutral & Background Colors ============= */
    --dd-dark: #1A1A1A;              /* Deep charcoal sidebar */
    --dd-dark-light: #2D2D2D;        /* Slightly lighter dark */
    --dd-light-bg: #F5F7FA;          /* Main content background */
    --dd-card-bg: #FFFFFF;           /* Card background */
    --dd-card-border: #E5E7EB;       /* Card border color */
    
    /* ============= Text Colors ============= */
    --dd-text-primary: #1A2332;      /* Main text */
    --dd-text-secondary: #666666;    /* Secondary text */
    --dd-text-muted: #999999;        /* Muted text */
    --dd-text-light: #B3B3B3;        /* Light text */
    
    /* ============= Status Colors ============= */
    --dd-success: #00A651;           /* Success/Active green */
    --dd-success-light: #E6F8F0;     /* Success background */
    --dd-warning: #FFA500;           /* Warning orange */
    --dd-warning-light: #FFF3ED;     /* Warning background */
    --dd-danger: #E74C3C;            /* Danger red */
    --dd-danger-light: #FADBD8;      /* Danger background */
    --dd-info: #0066CC;              /* Info blue */
    
    /* ============= Spacing ============= */
    --dd-space-xs: 4px;
    --dd-space-sm: 8px;
    --dd-space-md: 16px;
    --dd-space-lg: 24px;
    --dd-space-xl: 32px;
    --dd-space-xxl: 48px;
    
    /* ============= Border Radius ============= */
    --dd-radius-sm: 4px;
    --dd-radius-md: 8px;
    --dd-radius-lg: 12px;
    --dd-radius-xl: 16px;
    --dd-radius-full: 9999px;
    
    /* ============= Shadows ============= */
    --dd-shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --dd-shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --dd-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --dd-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    
    /* ============= Transitions ============= */
    --dd-transition-fast: 150ms ease;
    --dd-transition-normal: 250ms ease;
    --dd-transition-slow: 350ms ease;
}

/* ============= RESET & GLOBAL ============= */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
}

#tm-admin-portal,
#tm-worker-portal {
    background: var(--dd-light-bg);
    color: var(--dd-text-primary);
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

#tm-admin-portal #tm-app,
#tm-worker-portal #tm-app {
    margin-top: 0;
    padding-top: 0;
    position: relative;
    top: 0;
}

.tm-home-command-center {
    margin-bottom: 28px;
    padding: 26px 28px 20px;
    border: 1px solid var(--dd-card-border);
    border-radius: 18px;
    background: #fff;
    color: var(--dd-text-primary);
    box-shadow: var(--dd-shadow-lg);
}

.tm-home-welcome-row,
.tm-home-balance-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.tm-home-eyebrow,
.tm-home-label {
    display: block;
    color: #5f6875;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.tm-home-eyebrow { margin: 0 0 4px; color: var(--dd-primary); }
.tm-home-welcome-row h2 { margin: 0; color: #111827; font-size: clamp(26px, 3vw, 38px); line-height: 1.15; }
.tm-home-status-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid rgba(0, 166, 81, .35); border-radius: 999px; color: #08783f; font-size: 12px; font-weight: 700; }
.tm-home-status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dd-success); box-shadow: 0 0 0 4px rgba(0, 166, 81, .15); }
.tm-home-balance-panel { margin-top: 24px; padding: 18px 0 0; border-top: 1px solid #dce2e8; align-items: stretch; }
.tm-home-balance-copy { flex: 1; min-width: 0; }
.tm-home-balance-copy strong { display: block; margin-top: 5px; color: #111827; font-size: clamp(38px, 5vw, 58px); line-height: 1; letter-spacing: 0; }
.tm-home-add-funds { display: inline-flex; align-items: center; gap: 10px; margin-top: 18px; padding: 10px 16px; border: 0; border-radius: 8px; background: var(--dd-primary); color: #fff; cursor: pointer; font: inherit; font-weight: 800; }
.tm-home-add-funds span:last-child { font-size: 20px; line-height: 1; }
.tm-home-vip-panel { display: flex; flex: 0 0 180px; flex-direction: column; align-items: center; justify-content: center; padding-left: 24px; border-left: 1px solid #dce2e8; text-align: center; }
.tm-home-vip-panel img { width: 48px; height: 48px; margin: 8px 0 5px; border-radius: 50%; background: #fff1bf; object-fit: contain; }
.tm-home-vip-panel strong { color: #111827; font-size: 20px; }
.tm-home-vip-panel > span:last-child { margin-top: 2px; color: #5f6875; font-size: 13px; }
.tm-home-transaction-strip { display: flex; align-items: center; gap: 8px; margin-top: 18px; padding: 10px 14px; border: 1px solid rgba(0, 166, 81, .35); border-radius: 999px; background: #f7f9fb; color: #111827; font-size: 13px; }
.tm-home-transaction-strip strong { color: #087ca7; }
.tm-home-stat-grid { display: none !important; }
#tm-page-home > #tm-platform-profile-card,
#tm-page-home > #tm-instructions-card {
    display: block;
    box-sizing: border-box;
    width: calc(50% - 9px);
    max-width: none;
    min-height: 154px;
    margin: 0 0 18px;
    overflow: hidden;
    background: var(--tm-surface);
    border: 1px solid var(--tm-border);
}

#tm-page-home > #tm-platform-profile-card { float: left; }
#tm-page-home > #tm-instructions-card { float: right; }
#tm-page-home > #tm-platform-profile-card > div,
#tm-page-home > #tm-instructions-card > div {
    min-height: 154px;
    align-items: flex-end;
    padding: 20px 24px;
    background: var(--tm-surface) !important;
}
#tm-page-home > #tm-platform-profile-card h3,
#tm-page-home > #tm-instructions-card h3 { color: var(--tm-text) !important; }
#tm-page-home > #tm-platform-profile-card p,
#tm-page-home > #tm-instructions-card p { color: var(--tm-text-secondary) !important; }
#tm-page-home > #tm-instructions-card + * { clear: both; }

#tm-page-home > #tm-affiliate-program-card,
#tm-page-home > #tm-company-rules-card {
    display: block;
    box-sizing: border-box;
    width: calc(50% - 9px);
    max-width: none;
    min-height: 154px;
    margin: 0 0 18px;
    overflow: hidden;
    background: var(--tm-surface);
    border: 1px solid var(--tm-border);
}

#tm-page-home > #tm-affiliate-program-card { float: left; }
#tm-page-home > #tm-company-rules-card { float: right; }
#tm-page-home > #tm-affiliate-program-card > div,
#tm-page-home > #tm-company-rules-card > div {
    min-height: 154px;
    align-items: flex-end;
    padding: 20px 24px;
    background: var(--tm-surface) !important;
}
#tm-page-home > #tm-affiliate-program-card h3,
#tm-page-home > #tm-company-rules-card h3 { color: var(--tm-text) !important; }
#tm-page-home > #tm-affiliate-program-card p,
#tm-page-home > #tm-company-rules-card p { color: var(--tm-text-secondary) !important; }
#tm-page-home > #tm-company-rules-card + #tm-platform-profile-card { clear: both; }

.tm-support-content {
    padding: 20px;
}

.tm-support-panel {
    max-width: 680px;
    margin: 0 auto;
    padding: 12px;
    color: var(--tm-text);
    text-align: center;
}

.tm-support-panel h3 {
    margin: 0 0 10px;
    color: var(--tm-text);
}

.tm-support-panel p {
    margin: 0 0 20px;
    color: var(--tm-text-secondary);
}

.tm-support-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

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 { background: var(--ptm-surface); border-color: var(--ptm-border); }

@media (max-width: 760px) {
    #tm-page-home > #tm-affiliate-program-card,
    #tm-page-home > #tm-company-rules-card,
    #tm-page-home > #tm-platform-profile-card,
    #tm-page-home > #tm-instructions-card { float: none; width: 100%; }
}

html[data-ptm-theme="dark"] .tm-home-command-center,
html.ptm-dark .tm-home-command-center {
    border-color: rgba(0, 166, 81, .22);
    background: linear-gradient(145deg, #122d47, #0d2136 62%, #173b4f);
    color: #fff;
    box-shadow: 0 16px 34px rgba(13, 33, 54, .18);
}

html[data-ptm-theme="dark"] .tm-home-welcome-row h2,
html.ptm-dark .tm-home-welcome-row h2,
html[data-ptm-theme="dark"] .tm-home-balance-copy strong,
html.ptm-dark .tm-home-balance-copy strong,
html[data-ptm-theme="dark"] .tm-home-vip-panel strong,
html.ptm-dark .tm-home-vip-panel strong { color: #fff; }

html[data-ptm-theme="dark"] .tm-home-eyebrow,
html.ptm-dark .tm-home-eyebrow,
html[data-ptm-theme="dark"] .tm-home-label,
html.ptm-dark .tm-home-label,
html[data-ptm-theme="dark"] .tm-home-vip-panel > span:last-child,
html.ptm-dark .tm-home-vip-panel > span:last-child { color: #a8bfd0; }

html[data-ptm-theme="dark"] .tm-home-balance-panel,
html.ptm-dark .tm-home-balance-panel,
html[data-ptm-theme="dark"] .tm-home-vip-panel,
html.ptm-dark .tm-home-vip-panel { border-color: rgba(168, 191, 208, .2); }

html[data-ptm-theme="dark"] .tm-home-transaction-strip,
html.ptm-dark .tm-home-transaction-strip { background: rgba(8, 24, 40, .55); color: #fff; }

@media (max-width: 620px) {
    .tm-home-command-center { padding: 22px 18px 16px; }
    .tm-home-balance-panel { flex-direction: column; }
    #tm-page-task-detail {
        margin: 0 -12px -12px;
        padding: 8px;
    }

    #tm-page-task-detail .tm-task-screen-header {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
        margin: 0 0 10px;
        padding: 14px;
    }

    #tm-page-task-detail .tm-task-screen-grid {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, .7fr);
        gap: 8px;
        padding: 0;
    }

    #tm-page-task-detail .tm-task-screen-product,
    #tm-page-task-detail .tm-task-screen-info {
        padding: 12px;
        border-radius: 12px;
    }

    #tm-page-task-detail .tm-task-screen-image {
        height: min(32vw, 180px);
        margin: 12px 0;
        border-radius: 10px;
    }

    #tm-page-task-detail .tm-task-screen-product h1 {
        font-size: clamp(20px, 4.5vw, 28px);
    }

    #tm-page-task-detail .tm-task-screen-row {
        min-height: 38px;
        gap: 6px;
    }

    #tm-page-task-detail .tm-task-screen-row span,
    #tm-page-task-detail .tm-task-screen-row strong {
        font-size: 11px;
    }

    #tm-page-task-detail .tm-task-screen-status,
    #tm-page-task-detail .tm-task-screen-badge {
        padding: 5px 8px;
        font-size: 10px;
    }

    #tm-page-task-detail .tm-task-screen-description,
    #tm-page-task-detail .tm-task-screen-requirements p {
        font-size: 12px;
        line-height: 1.45;
    }

    #tm-page-task-detail .tm-task-screen-actions {
        padding: 8px 0 0;
    }
    .tm-home-vip-panel { flex-basis: auto; align-items: flex-start; padding: 18px 0 0; border-top: 1px solid rgba(168, 191, 208, .2); border-left: 0; text-align: left; }
    .tm-home-vip-panel img { margin-left: 0; }
    .tm-home-transaction-strip { border-radius: 12px; }
}

/* ============= APP CONTAINER ============= */
.tm-app {
    display: flex;
    height: 100vh;
    width: 100%;
    background: var(--dd-light-bg);
    gap: 0;
}

/* ============= SIDEBAR NAVIGATION ============= */
.tm-sidebar {
    width: 330px;
    min-width: 330px;
    max-width: 330px;
    height: 100vh;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    color: #FFFFFF;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: none;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    border-top: 0;
    z-index: 1000;
    padding: 0;
    position: relative;
}

/* Sidebar scrollbar styling */
.tm-sidebar::-webkit-scrollbar {
    width: 6px;
}

.tm-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.tm-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.tm-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Logo Section */
.tm-logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    padding: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 0;
    flex-shrink: 0;
    min-height: 0;
}

.tm-logo-icon {
    width: 250px;
    height: auto;
    min-width: 250px;
    min-height: 0;
    background: transparent;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    color: #FFFFFF;
    box-shadow: none;
    letter-spacing: -1px;
    overflow: hidden;
    padding: 0;
    margin-left: 18px;
}

.tm-logo-icon img {
    width: 250px;
    height: auto;
    object-fit: contain;
    display: block;
    border-radius: 0;
    background: transparent;
}

.tm-brand-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.1;
}

.tm-brand-name {
    font-size: 20px;
    font-weight: 800;
    color: #FFFFFF;
    letter-spacing: -0.6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tm-brand-subtitle {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.8px;
    color: rgba(255, 255, 255, 0.74);
    margin-top: 2px;
}

/* Navigation Menu */
.tm-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    list-style: none;
    margin: 0;
}

.tm-nav::-webkit-scrollbar {
    width: 6px;
}

.tm-nav::-webkit-scrollbar-track {
    background: transparent;
}

.tm-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.tm-nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 16px;
    margin: 4px 12px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    cursor: pointer;
    transition: all var(--dd-transition-normal);
    border-radius: 8px;
    border-left: 3px solid transparent;
    font-size: 14px;
    font-weight: 500;
    position: relative;
    min-height: 42px;
}

.tm-nav-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #FFFFFF;
    border-left-color: var(--dd-primary);
}

.tm-nav-item.active {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.16) 0%, rgba(255, 107, 53, 0.08) 100%);
    color: #FFFFFF;
    border-left-color: transparent;
    border: 1px solid rgba(255, 107, 53, 0.42);
    font-weight: 600;
    box-shadow: inset 0 0 10px rgba(255, 107, 53, 0.18), 0 0 12px rgba(255, 107, 53, 0.12);
    border-radius: 8px;
    margin-left: 8px;
    margin-right: 8px;
    padding-left: 15px;
}

.tm-nav-item.active::before {
    display: none;
}

.tm-nav-item.active .tm-nav-icon {
    color: var(--dd-primary);
}

.tm-nav-icon {
    font-size: 18px;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
    opacity: 0.9;
}

.tm-nav-icon svg {
    display: block;
    width: 20px;
    height: 20px;
}

/* User Profile Card - Sidebar Bottom */
.tm-sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    margin: auto 12px 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    cursor: pointer;
    transition: all var(--dd-transition-normal);
    flex-shrink: 0;
}

.tm-sidebar-user:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.15);
}

.tm-user-avatar {
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    background: linear-gradient(135deg, var(--dd-primary) 0%, var(--dd-primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.25);
}

.tm-user-avatar img,
.tm-avatar img {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
}

.tm-user-meta {
    flex: 1;
    min-width: 0;
}

.tm-user-name {
    font-size: 12px;
    font-weight: 600;
    color: #FFFFFF;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tm-user-role {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 2px;
}

.tm-user-caret,
.tm-caret {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    margin-left: auto;
}

/* ============= MAIN CONTAINER ============= */
.tm-main-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--dd-light-bg);
    overflow: hidden;
    margin-left: 0;
    border-left: 1px solid rgba(15, 23, 42, 0.06);
}

/* ============= HEADER ============= */
.tm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px 0 20px;
    background: var(--dd-card-bg);
    border-bottom: 1px solid var(--dd-card-border);
    box-shadow: none;
    z-index: 100;
    flex-shrink: 0;
    min-height: 64px;
    height: auto;
}

.tm-portal-worker .tm-header,
.tm-portal-admin .tm-header {
    min-height: 64px;
}

.tm-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.tm-header-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--dd-text-primary);
    margin: 0;
    padding: 0;
    letter-spacing: -0.7px;
}

.tm-header-right {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-shrink: 0;
}

.tm-language-menu {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 52px;
    padding: 0 38px 0 14px;
    border: 1px solid var(--tm-border);
    border-radius: 12px;
    background: var(--tm-card);
    color: var(--tm-text-secondary);
    box-shadow: var(--tm-shadow-sm);
}

.tm-language-menu::after {
    position: absolute;
    right: 14px;
    top: 50%;
    color: var(--tm-text-secondary);
    content: '\2304';
    font-size: 18px;
    line-height: 1;
    pointer-events: none;
    transform: translateY(-58%);
}

.tm-language-icon {
    font-size: 17px;
    line-height: 1;
}

.tm-language-select,
.pt-worker-language-select {
    min-width: 86px;
    border: 0;
    outline: 0;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    color: var(--tm-text);
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
}

.tm-language-select option,
.pt-worker-language-select option {
    color: #172033;
}

@media (max-width: 620px) {
    .tm-profile-actions {
        grid-template-columns: 1fr !important;
    }
}

.tm-trusted-platforms {
    margin-top: 24px;
    padding: 18px 16px 16px;
    border: 1px solid rgba(91, 186, 228, .42);
    border-radius: 14px;
    background: #fff;
    color: var(--tm-text);
    box-shadow: 0 14px 30px rgba(8, 31, 54, .16);
}

.tm-trusted-platforms-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.tm-trusted-platforms-mark {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(83, 199, 235, .18);
    color: #6cdbf1;
    font-size: 22px;
    line-height: 1;
}

.tm-trusted-platforms-eyebrow {
    display: block;
    color: #6cdbf1;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}

.tm-trusted-platforms h3 {
    margin: 2px 0 0;
    color: var(--tm-text);
    font-size: 15px;
}

.tm-trusted-platform-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.tm-trusted-platform-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    min-height: 52px;
    padding: 8px 12px;
    border: 1px solid rgba(39, 136, 255, .2);
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(8, 31, 54, .08);
}

.tm-trusted-platform-icon {
    display: grid;
    flex: 0 0 28px;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-size: 16px;
    line-height: 1;
}

.tm-trusted-platform-icon img {
    display: block;
    width: 28px;
    height: 28px;
}

.tm-trusted-platform-icon-cyan { color: #25d3eb; }
.tm-trusted-platform-icon-gold { color: #e7c52d; }
.tm-trusted-platform-icon-green { color: #2dd59a; }
.tm-trusted-platform-icon-blue { color: #6488ff; }
.tm-trusted-platform-icon-purple { color: #aa78f5; }
.tm-trusted-platform-icon-white { color: #d9e9f3; }

.tm-trusted-platform-copy {
    display: block;
    min-width: 0;
}

.tm-trusted-platform-copy strong,
.tm-trusted-platform-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tm-trusted-platform-copy strong {
    color: var(--tm-text);
    font-size: 13px;
}

.tm-trusted-platform-copy small {
    margin-top: 3px;
    color: #61d7ef;
    font-size: 9px;
    font-weight: 600;
}

@media (max-width: 700px) {
    .tm-trusted-platform-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 460px) {
    .tm-trusted-platform-grid {
        grid-template-columns: 1fr;
    }
}
}

/* Notifications */
.tm-notifications-badge {
    position: relative;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #f2f4f7;
    border-radius: 10px;
    transition: all var(--dd-transition-normal);
    color: #1a2332;
    font-size: 20px;
}

.tm-notifications-badge:hover {
    background: #e8ebf0;
}

.tm-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--dd-primary);
    color: #FFFFFF;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    line-height: 14px;
    font-weight: 700;
    white-space: nowrap;
    border: 2px solid #FFFFFF;
    box-shadow: 0 2px 6px rgba(255, 107, 53, 0.25);
}

/* Profile Menu */
.tm-profile-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 14px 8px 8px;
    background: #f2f4f7;
    border-radius: 12px;
    transition: all var(--dd-transition-normal);
    min-height: 42px;
}

.tm-header-avatar {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border: 2px solid #fff;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 1px 4px rgba(15, 23, 42, .16);
}

.tm-profile-menu:hover {
    background: #e8ebf0;
}

.tm-profile-menu-trigger {
    position: relative;
}

.tm-profile-menu-trigger .tm-caret {
    color: #000;
}

.tm-profile-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: var(--tm-z-dropdown);
    display: none;
    min-width: 150px;
    padding: 6px;
    background: var(--tm-card);
    border: 1px solid var(--tm-border);
    border-radius: var(--tm-radius-md);
    box-shadow: var(--tm-shadow-lg);
}

.tm-profile-dropdown.open {
    display: grid;
}

.tm-profile-dropdown button,
.tm-profile-dropdown a {
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: var(--tm-radius-sm);
    background: transparent;
    color: var(--tm-text);
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.tm-profile-dropdown button:hover,
.tm-profile-dropdown a:hover {
    background: var(--tm-primary-lighter);
    color: var(--tm-primary-dark);
}

.tm-profile-dropdown .tm-logout-link {
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid var(--tm-border);
    color: var(--tm-danger);
    font-weight: 600;
}

.tm-profile-dropdown .tm-logout-link:hover {
    background: rgba(220, 53, 69, 0.08);
    color: var(--tm-danger-dark);
}

.tm-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--dd-primary) 0%, #ef7b3d 100%);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.25);
}

#tm-user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--dd-text-primary);
}

/* ============= CONTENT AREA ============= */
.tm-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 20px 20px 20px;
    margin-top: 0;
    background: var(--dd-light-bg);
    border-top: 0;
}

.tm-page {
    margin-top: 0;
    padding-top: 0;
}

.tm-content::-webkit-scrollbar {
    width: 8px;
}

.tm-content::-webkit-scrollbar-track {
    background: transparent;
}

.tm-content::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.tm-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* ============= PAGE TITLE ============= */
.tm-page > h2:first-of-type {
    font-size: 24px;
    font-weight: 700;
    color: var(--dd-text-primary);
    margin: 0 0 24px 0;
    padding: 0;
}

/* ============= STAT CARDS ============= */
.tm-stat-card {
    background: #FFFFFF !important;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 18px 16px 16px 18px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    min-height: 112px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all var(--dd-transition-normal);
    position: relative;
    overflow: visible;
}

.tm-stat-card:nth-child(1) {
    background: #FEF3E8 !important;
    border-color: #FFE8D1;
}

.tm-stat-card:nth-child(2) {
    background: #E8F8F0 !important;
    border-color: #D0F0E8;
}

.tm-stat-card:nth-child(3) {
    background: #FEF3E8 !important;
    border-color: #FFE8D1;
}

.tm-stat-card:nth-child(4) {
    background: #F3E8FF !important;
    border-color: #E8D5F2;
}

.tm-stat-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.tm-stat-card::before {
    display: none;
}

.tm-stat-icon {
    font-size: 26px;
    width: 54px;
    height: 54px;
    background: rgba(255, 107, 53, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 0;
}

.tm-stat-card:nth-child(2) .tm-stat-icon {
    background: rgba(34, 197, 94, 0.15);
}

.tm-stat-card:nth-child(4) .tm-stat-icon {
    background: rgba(139, 92, 246, 0.15);
}

.tm-stat-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tm-stat-label {
    font-size: 13px;
    font-weight: 600;
    color: #666666;
    text-transform: capitalize;
    letter-spacing: 0px;
    margin: 0;
    line-height: 1.2;
}

.tm-stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #111827;
    margin: 0;
    line-height: 1;
    letter-spacing: -0.7px;
}

.tm-stat-trend {
    font-size: 13px;
    color: #22C55E;
    font-weight: 600;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.tm-stat-trend::before {
    content: '↑';
    font-size: 16px;
}

.tm-stat-trend.down {
    color: #EF4444;
}

.tm-stat-trend.down::before {
    content: '↓';
}

/* ============= CARDS ============= */
.tm-card {
    background: var(--dd-card-bg);
    border: 1px solid var(--dd-card-border);
    border-radius: var(--dd-radius-lg);
    box-shadow: var(--dd-shadow-sm);
    overflow: hidden;
}

.tm-card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--dd-card-border);
    background: linear-gradient(135deg, #FAFBFC 0%, #F5F7FA 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tm-card-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--dd-text-primary);
    margin: 0;
    padding: 0;
}

.tm-card-body {
    padding: 24px;
}

.tm-card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--dd-card-border);
    background: linear-gradient(135deg, #FAFBFC 0%, #F5F7FA 100%);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Card Headers with Menu */
.tm-card-header-with-menu {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--dd-card-border);
}

.tm-card-header-with-menu h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--dd-text-primary);
    margin: 0;
}

.tm-card-menu-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: var(--dd-text-secondary);
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all var(--dd-transition-normal);
}

.tm-card-menu-btn:hover {
    background: var(--dd-light-bg);
    color: var(--dd-text-primary);
}

/* Recent Activity Header */
.tm-recent-activity-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--dd-card-border);
}

.tm-recent-activity-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--dd-text-primary);
    margin: 0;
}

.tm-view-all-link {
    color: var(--dd-primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all var(--dd-transition-normal);
}

.tm-view-all-link:hover {
    color: var(--dd-primary-dark);
}

/* ============= BUTTONS ============= */
.tm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--dd-radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--dd-transition-normal);
    font-family: inherit;
    text-decoration: none;
    white-space: nowrap;
}

/* Primary Button */
.tm-btn-primary {
    background: linear-gradient(135deg, var(--dd-primary) 0%, var(--dd-primary-dark) 100%);
    color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.25);
}

.tm-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 107, 53, 0.35);
}

.tm-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(255, 107, 53, 0.25);
}

/* Secondary Button */
.tm-btn-secondary {
    background: var(--dd-light-bg);
    color: var(--dd-text-primary);
    border: 1px solid var(--dd-card-border);
}

.tm-btn-secondary:hover {
    background: #F0F0F0;
    border-color: var(--dd-text-secondary);
}

#tm-job-status-tabs .tm-btn-secondary.active {
    background: var(--dd-primary);
    border-color: var(--dd-primary);
    color: #FFFFFF;
    box-shadow: 0 3px 10px rgba(255, 107, 53, 0.25);
}

/* Danger Button */
.tm-btn-danger {
    background: var(--dd-danger);
    color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.2);
}

.tm-btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

/* Small Button */
.tm-btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* ============= STATUS BADGES ============= */
.tm-badge-success {
    display: inline-block;
    background: var(--dd-success-light);
    color: var(--dd-success);
    padding: 6px 12px;
    border-radius: var(--dd-radius-full);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.tm-badge-warning {
    display: inline-block;
    background: var(--dd-warning-light);
    color: var(--dd-warning);
    padding: 6px 12px;
    border-radius: var(--dd-radius-full);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.tm-badge-danger {
    display: inline-block;
    background: var(--dd-danger-light);
    color: var(--dd-danger);
    padding: 6px 12px;
    border-radius: var(--dd-radius-full);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.tm-badge-info {
    display: inline-block;
    background: #E6F0FF;
    color: var(--dd-info);
    padding: 6px 12px;
    border-radius: var(--dd-radius-full);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

/* ============= TABLES ============= */
.tm-table-container {
    overflow-x: auto;
    border-radius: var(--dd-radius-lg);
}

.tm-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.tm-table thead {
    background: linear-gradient(135deg, #FAFBFC 0%, #F5F7FA 100%);
    border-bottom: 2px solid var(--dd-card-border);
}

.tm-table th {
    padding: 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: var(--dd-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
}

.tm-table tbody tr {
    border-bottom: 1px solid var(--dd-card-border);
    transition: background-color var(--dd-transition-fast);
}

.tm-table tbody tr:hover {
    background: var(--dd-light-bg);
}

.tm-table td {
    padding: 16px;
    font-size: 14px;
    color: var(--dd-text-primary);
    vertical-align: middle;
}

.tm-referral-table {
    table-layout: fixed;
}

.tm-referral-table .tm-referral-col-code {
    width: 24%;
}

.tm-referral-table .tm-referral-col-status {
    width: 16%;
}

.tm-referral-table .tm-referral-col-created {
    width: 30%;
}

.tm-referral-table .tm-referral-col-used-by {
    width: 30%;
}

.tm-referral-table th:nth-child(2),
.tm-referral-table td:nth-child(2),
.tm-referral-table th:nth-child(3),
.tm-referral-table td:nth-child(3) {
    text-align: center;
}

.tm-referral-table th:last-child,
.tm-referral-table td:last-child {
    text-align: right;
}

.tm-referral-table td:last-child {
    overflow-wrap: anywhere;
}

.tm-table td .tm-badge-success,
.tm-table td .tm-badge-warning,
.tm-table td .tm-badge-danger,
.tm-table td .tm-badge-info {
    margin: 0;
}

/* ============= FILTERS & TABS ============= */
.tm-filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--dd-card-border);
}

.tm-filter-tab {
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--dd-text-secondary);
    transition: all var(--dd-transition-normal);
    white-space: nowrap;
}

.tm-filter-tab:hover {
    color: var(--dd-text-primary);
    background: var(--dd-light-bg);
}

.tm-filter-tab.active {
    color: var(--dd-primary);
    border-bottom-color: var(--dd-primary);
}

/* Segmented Button Style */
.tm-filter-buttons {
    display: inline-flex;
    gap: 8px;
    padding: 4px;
    background: var(--dd-light-bg);
    border-radius: var(--dd-radius-lg);
    border: 1px solid var(--dd-card-border);
}

.tm-filter-button {
    padding: 9px 16px;
    background: #FFFFFF;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #666666;
    transition: all var(--dd-transition-normal);
    min-height: 38px;
    line-height: 1.1;
}

.tm-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.tm-filter-button:hover {
    background: #F9FAFB;
    border-color: #999999;
    color: #333333;
}

.tm-filter-button.active {
    background: #FF6B35;
    border-color: #FF6B35;
    color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

/* ============= FORMS ============= */
.tm-form-group {
    display: grid;
    gap: 8px;
    margin-bottom: 20px;
}

.tm-form-group label {
    font-size: 12px;
    font-weight: 700;
    color: var(--dd-text-primary);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.tm-form-group input,
.tm-form-group select,
.tm-form-group textarea {
    padding: 10px 14px;
    border: 1px solid var(--dd-card-border);
    border-radius: var(--dd-radius-md);
    font-size: 14px;
    font-family: inherit;
    background: var(--dd-card-bg);
    color: var(--dd-text-primary);
    transition: all var(--dd-transition-normal);
}

.tm-form-group input::placeholder,
.tm-form-group textarea::placeholder {
    color: var(--dd-text-light);
}

.tm-form-group input:hover,
.tm-form-group select:hover,
.tm-form-group textarea:hover {
    border-color: var(--dd-text-secondary);
    background: #FAFBFC;
}

.tm-form-group input:focus,
.tm-form-group select:focus,
.tm-form-group textarea:focus {
    outline: none;
    border-color: var(--dd-primary);
    background: var(--dd-card-bg);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1),
                inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* ============= EMPTY STATE ============= */
.tm-empty-state {
    text-align: center;
    padding: 60px 40px;
    color: var(--dd-text-muted);
}

.tm-empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.tm-empty-state-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--dd-text-secondary);
    margin-bottom: 8px;
}

.tm-empty-state-description {
    font-size: 14px;
    color: var(--dd-text-muted);
}

/* ============= LOADING STATE ============= */
.tm-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--dd-card-border);
    border-top-color: var(--dd-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============= RESPONSIVE DESIGN ============= */
@media (max-width: 1024px) {
    .tm-sidebar {
        width: 300px;
        min-width: 300px;
        max-width: 300px;
    }
    
    .tm-content {
        padding: 24px;
    }
    
    .tm-header {
        padding: 16px 24px;
    }
    
    .tm-header-title {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    .tm-app {
        flex-direction: column;
    }
    
    .tm-sidebar {
        display: none;
    }
    
    .tm-logo {
        flex-shrink: 0;
    }
    
    .tm-nav {
        display: flex;
        flex-direction: row;
        flex: 1;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0 8px;
    }
    
    .tm-nav-item {
        margin: 8px 4px;
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .tm-main-container {
        margin-left: 0;
        order: 2;
    }
    
    .tm-header {
        padding: 16px;
    }
    
    .tm-header-title {
        font-size: 20px;
    }
    
    .tm-header-right {
        gap: 16px;
    }
    
    .tm-content {
        padding: 16px;
    }
    
    .tm-card {
        border-radius: var(--dd-radius-md);
    }
    
    .tm-stat-card {
        border-radius: var(--dd-radius-md);
        padding: 16px;
    }
    
    .tm-stat-value {
        font-size: 24px;
    }
    
    .tm-table {
        font-size: 12px;
    }
    
    .tm-table th,
    .tm-table td {
        padding: 12px;
    }
    
    .tm-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .tm-filter-tabs {
        gap: 4px;
        overflow-x: auto;
    }
    
    .tm-filter-tab {
        padding: 10px 16px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .tm-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .tm-header-right {
        width: 100%;
        justify-content: flex-start;
    }
    
    .tm-content {
        padding: 12px;
    }
    
    .tm-stat-value {
        font-size: 20px;
    }
    
    .tm-table th,
    .tm-table td {
        padding: 10px;
        font-size: 11px;
    }
    
    .tm-card-header h3 {
        font-size: 14px;
    }
    
    .tm-filter-buttons {
        flex-wrap: wrap;
    }
    
    .tm-filter-button {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* ============= PRINT STYLES ============= */
@media print {
    .tm-sidebar,
    .tm-header {
        display: none;
    }
    
    .tm-main-container {
        width: 100%;
        height: 100%;
    }
    
    .tm-content {
        padding: 0;
        background: #FFFFFF;
    }
    
    .tm-card {
        box-shadow: none;
        border: 1px solid #CCCCCC;
        page-break-inside: avoid;
    }
}

/* ============= UTILITY CLASSES ============= */
.tm-text-center {
    text-align: center;
}

.tm-text-right {
    text-align: right;
}

.tm-text-left {
    text-align: left;
}

.tm-text-muted {
    color: var(--dd-text-muted);
}

.tm-text-secondary {
    color: var(--dd-text-secondary);
}

.tm-mt-0 { margin-top: 0; }
.tm-mt-1 { margin-top: 4px; }
.tm-mt-2 { margin-top: 8px; }
.tm-mt-3 { margin-top: 16px; }
.tm-mt-4 { margin-top: 24px; }
.tm-mt-5 { margin-top: 32px; }

.tm-mb-0 { margin-bottom: 0; }
.tm-mb-1 { margin-bottom: 4px; }
.tm-mb-2 { margin-bottom: 8px; }
.tm-mb-3 { margin-bottom: 16px; }
.tm-mb-4 { margin-bottom: 24px; }
.tm-mb-5 { margin-bottom: 32px; }

.tm-flex {
    display: flex;
}

.tm-gap-2 {
    gap: 8px;
}

.tm-gap-3 {
    gap: 16px;
}

.tm-gap-4 {
    gap: 24px;
}

.tm-detail-back {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 18px;
    padding: 7px 10px 7px 0;
    border: 0 !important;
    border-radius: 0;
    background: transparent !important;
    color: var(--dd-text-secondary) !important;
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
}

.tm-detail-back:hover,
.tm-detail-back:focus-visible {
    background: transparent !important;
    color: var(--dd-primary) !important;
    outline: 2px solid color-mix(in srgb, var(--dd-primary) 35%, transparent);
    outline-offset: 2px;
}

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: #f4f7fa !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: #b3c0cc !important;
}

/* Header controls use a high-contrast dark-theme treatment. */
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;
    border: 1px solid #ffffff !important;
    color: #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: #101820;
    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,
html[data-ptm-theme="dark"] .tm-profile-dropdown .tm-logout-link,
html.ptm-dark .tm-profile-dropdown .tm-logout-link {
    color: #ffffff !important;
}

html[data-ptm-theme="dark"] .tm-profile-menu:hover,
html.ptm-dark .tm-profile-menu:hover,
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: #203444 !important;
    color: #ffffff !important;
}

html[data-ptm-theme="dark"] .tm-trusted-platforms,
html.ptm-dark .tm-trusted-platforms,
html[data-ptm-theme="dark"] .tm-trusted-platform-card,
html.ptm-dark .tm-trusted-platform-card {
    background: #101820 !important;
    border-color: #345064 !important;
    color: #f4f7fa !important;
}

html[data-ptm-theme="dark"] .tm-trusted-platforms h3,
html.ptm-dark .tm-trusted-platforms h3,
html[data-ptm-theme="dark"] .tm-trusted-platform-copy strong,
html.ptm-dark .tm-trusted-platform-copy strong {
    color: #f4f7fa !important;
}

html[data-ptm-theme="dark"] .tm-trusted-platform-copy small,
html.ptm-dark .tm-trusted-platform-copy small {
    color: #b3c0cc !important;
}

html[data-ptm-theme="dark"] .tm-withdraw-page,
html.ptm-dark .tm-withdraw-page {
    background: #101820 !important;
    color: #f4f7fa !important;
}

html[data-ptm-theme="dark"] .tm-withdraw-form-panel,
html.ptm-dark .tm-withdraw-form-panel,
html[data-ptm-theme="dark"] .tm-withdraw-summary-panel,
html.ptm-dark .tm-withdraw-summary-panel,
html[data-ptm-theme="dark"] .tm-withdraw-history-card,
html.ptm-dark .tm-withdraw-history-card {
    background: #172532 !important;
    border-color: #345064 !important;
    color: #f4f7fa !important;
}

html[data-ptm-theme="dark"] .tm-withdraw-heading h2,
html.ptm-dark .tm-withdraw-heading h2,
html[data-ptm-theme="dark"] .tm-withdraw-panel-header h3,
html.ptm-dark .tm-withdraw-panel-header h3,
html[data-ptm-theme="dark"] .tm-withdraw-section-heading h3,
html.ptm-dark .tm-withdraw-section-heading h3,
html[data-ptm-theme="dark"] .tm-withdraw-field label,
html.ptm-dark .tm-withdraw-field label,
html[data-ptm-theme="dark"] .tm-withdraw-page .tm-label,
html.ptm-dark .tm-withdraw-page .tm-label {
    color: #f4f7fa !important;
}

html[data-ptm-theme="dark"] .tm-withdraw-heading p,
html.ptm-dark .tm-withdraw-heading p,
html[data-ptm-theme="dark"] .tm-withdraw-panel-header p,
html.ptm-dark .tm-withdraw-panel-header p,
html[data-ptm-theme="dark"] .tm-withdraw-section-heading span,
html.ptm-dark .tm-withdraw-section-heading span,
html[data-ptm-theme="dark"] .tm-withdraw-history-link,
html.ptm-dark .tm-withdraw-history-link {
    color: #b3c0cc !important;
}

html[data-ptm-theme="dark"] .tm-withdraw-control,
html.ptm-dark .tm-withdraw-control,
html[data-ptm-theme="dark"] .tm-withdraw-page .tm-input,
html.ptm-dark .tm-withdraw-page .tm-input {
    background: #203444 !important;
    border-color: #ffffff !important;
    color: #ffffff !important;
}

html[data-ptm-theme="dark"] .tm-withdraw-control::placeholder,
html.ptm-dark .tm-withdraw-control::placeholder {
    color: #b3c0cc !important;
}

html[data-ptm-theme="dark"] .tm-withdraw-summary-list,
html.ptm-dark .tm-withdraw-summary-list,
html[data-ptm-theme="dark"] .tm-withdraw-status,
html.ptm-dark .tm-withdraw-status {
    background: #172532 !important;
    color: #f4f7fa !important;
}

html[data-ptm-theme="dark"] .tm-withdraw-summary-list > div,
html.ptm-dark .tm-withdraw-summary-list > div {
    border-color: #345064 !important;
    color: #b3c0cc !important;
}

html[data-ptm-theme="dark"] .tm-withdraw-summary-list strong,
html.ptm-dark .tm-withdraw-summary-list strong {
    color: #f4f7fa !important;
}

html[data-ptm-theme="dark"] #tm-page-marketplace,
html.ptm-dark #tm-page-marketplace {
    background: #101820 !important;
    border-color: #345064 !important;
    color: #f4f7fa !important;
}

html[data-ptm-theme="dark"] #tm-page-marketplace .tm-marketplace-heading,
html.ptm-dark #tm-page-marketplace .tm-marketplace-heading,
html[data-ptm-theme="dark"] #tm-page-marketplace .tm-marketplace-heading h2,
html.ptm-dark #tm-page-marketplace .tm-marketplace-heading h2 {
    color: #f4f7fa !important;
}

html[data-ptm-theme="dark"] #tm-page-referrals .tm-table thead,
html.ptm-dark #tm-page-referrals .tm-table thead,
html[data-ptm-theme="dark"] #tm-page-referrals .tm-table tbody tr,
html.ptm-dark #tm-page-referrals .tm-table tbody tr {
    background: #172532 !important;
    border-color: #345064 !important;
}

html[data-ptm-theme="dark"] #tm-page-referrals .tm-table th,
html.ptm-dark #tm-page-referrals .tm-table th,
html[data-ptm-theme="dark"] #tm-page-referrals .tm-table td,
html.ptm-dark #tm-page-referrals .tm-table td,
html[data-ptm-theme="dark"] #tm-page-referrals .tm-table code,
html.ptm-dark #tm-page-referrals .tm-table code {
    color: #fff !important;
}

html[data-ptm-theme="dark"] #tm-page-referrals .tm-table tbody tr:hover,
html.ptm-dark #tm-page-referrals .tm-table tbody tr:hover {
    background: #203646 !important;
}

html[data-ptm-theme="dark"] #tm-page-deposits .tm-deposit-history-table th,
html.ptm-dark #tm-page-deposits .tm-deposit-history-table th,
html[data-ptm-theme="dark"] #tm-page-deposits .tm-deposit-history-table td,
html.ptm-dark #tm-page-deposits .tm-deposit-history-table td,
html[data-ptm-theme="dark"] #tm-page-deposits .tm-deposit-history-table small,
html.ptm-dark #tm-page-deposits .tm-deposit-history-table small {
    color: #fff !important;
}

html[data-ptm-theme="dark"] #tm-page-deposits .tm-deposit-history-table tr,
html.ptm-dark #tm-page-deposits .tm-deposit-history-table tr {
    border-color: #345064 !important;
}

html[data-ptm-theme="dark"] #tm-page-workers .tm-workers-table th,
html.ptm-dark #tm-page-workers .tm-workers-table th,
html[data-ptm-theme="dark"] #tm-page-workers .tm-workers-table td,
html.ptm-dark #tm-page-workers .tm-workers-table td,
html[data-ptm-theme="dark"] #tm-page-workers .tm-workers-table strong,
html.ptm-dark #tm-page-workers .tm-workers-table strong,
html[data-ptm-theme="dark"] #tm-page-workers .tm-workers-table small,
html.ptm-dark #tm-page-workers .tm-workers-table small,
html[data-ptm-theme="dark"] #tm-page-workers .tm-workers-table span,
html.ptm-dark #tm-page-workers .tm-workers-table span {
    color: #fff !important;
}

html[data-ptm-theme="dark"] #tm-page-workers .tm-workers-table tr,
html.ptm-dark #tm-page-workers .tm-workers-table tr {
    border-color: #345064 !important;
}

html[data-ptm-theme="dark"] #tm-page-marketplace .tm-marketplace-account-card,
html.ptm-dark #tm-page-marketplace .tm-marketplace-account-card,
html[data-ptm-theme="dark"] #tm-page-marketplace .tm-marketplace-metrics > div,
html.ptm-dark #tm-page-marketplace .tm-marketplace-metrics > div {
    background: #172532 !important;
    border-color: #345064 !important;
    color: #f4f7fa !important;
}

html[data-ptm-theme="dark"] #tm-page-marketplace .tm-marketplace-account-card span:not(.tm-marketplace-metric-icon),
html.ptm-dark #tm-page-marketplace .tm-marketplace-account-card span:not(.tm-marketplace-metric-icon),
html[data-ptm-theme="dark"] #tm-page-marketplace .tm-marketplace-metrics > div > span:not(.tm-marketplace-metric-icon) > span,
html.ptm-dark #tm-page-marketplace .tm-marketplace-metrics > div > span:not(.tm-marketplace-metric-icon) > span {
    color: #b3c0cc !important;
}

html[data-ptm-theme="dark"] #tm-page-marketplace .tm-marketplace-account-card strong,
html.ptm-dark #tm-page-marketplace .tm-marketplace-account-card strong,
html[data-ptm-theme="dark"] #tm-page-marketplace .tm-marketplace-metrics strong,
html.ptm-dark #tm-page-marketplace .tm-marketplace-metrics strong {
    color: #f4f7fa !important;
}

html[data-ptm-theme="dark"] #tm-page-marketplace .tm-marketplace-restricted,
html.ptm-dark #tm-page-marketplace .tm-marketplace-restricted {
    background: #172532 !important;
    border-color: #345064 !important;
    color: #f4f7fa !important;
    padding: 10px !important;
}

html[data-ptm-theme="dark"] #tm-page-marketplace .tm-marketplace-restricted h3,
html.ptm-dark #tm-page-marketplace .tm-marketplace-restricted h3,
html[data-ptm-theme="dark"] #tm-page-marketplace .tm-marketplace-restricted p strong,
html.ptm-dark #tm-page-marketplace .tm-marketplace-restricted p strong {
    color: #f4f7fa !important;
}

html[data-ptm-theme="dark"] #tm-page-marketplace .tm-marketplace-restricted p,
html.ptm-dark #tm-page-marketplace .tm-marketplace-restricted p {
    color: #b3c0cc !important;
}

html[data-ptm-theme="dark"] .tm-task-category-columns .tm-task-category-button,
html.ptm-dark .tm-task-category-columns .tm-task-category-button,
html[data-ptm-theme="dark"] .tm-task-category-columns .tm-task-category-button:hover,
html.ptm-dark .tm-task-category-columns .tm-task-category-button:hover,
html[data-ptm-theme="dark"] .tm-task-category-columns .tm-task-category-button:focus-visible,
html.ptm-dark .tm-task-category-columns .tm-task-category-button:focus-visible,
html[data-ptm-theme="dark"] .tm-task-category-columns .tm-task-category-button.active,
html.ptm-dark .tm-task-category-columns .tm-task-category-button.active {
    background: #203444 !important;
    border: 1px solid #ffffff !important;
    color: #ffffff !important;
}

html[data-ptm-theme="dark"] .tm-task-category-columns .tm-task-category-name,
html.ptm-dark .tm-task-category-columns .tm-task-category-name,
html[data-ptm-theme="dark"] .tm-task-category-columns .tm-task-category-balance,
html.ptm-dark .tm-task-category-columns .tm-task-category-balance,
html[data-ptm-theme="dark"] .tm-task-category-columns .tm-task-category-rate,
html.ptm-dark .tm-task-category-columns .tm-task-category-rate,
html[data-ptm-theme="dark"] .tm-task-category-columns .tm-task-category-balance b,
html.ptm-dark .tm-task-category-columns .tm-task-category-balance b,
html[data-ptm-theme="dark"] .tm-task-category-columns .tm-task-category-rate b,
html.ptm-dark .tm-task-category-columns .tm-task-category-rate b,
html[data-ptm-theme="dark"] .tm-task-category-columns .tm-task-category-arrow,
html.ptm-dark .tm-task-category-columns .tm-task-category-arrow {
    color: #ffffff !important;
}

/* Related marketplace tasks use the dark marketplace presentation. */
html[data-ptm-theme="dark"] #tm-page-related-tasks,
html.ptm-dark #tm-page-related-tasks {
    min-height: 100%;
    padding: clamp(24px, 4vw, 48px);
    border: 1px solid #345064;
    border-radius: 24px;
    background: #101820 !important;
    color: #f4f7fa !important;
}

html[data-ptm-theme="dark"] #tm-page-related-tasks .tm-marketplace-heading,
html.ptm-dark #tm-page-related-tasks .tm-marketplace-heading {
    max-width: 1100px;
    margin-bottom: 28px;
    color: #ffffff !important;
}

html[data-ptm-theme="dark"] #tm-page-related-tasks .tm-marketplace-heading h2,
html.ptm-dark #tm-page-related-tasks .tm-marketplace-heading h2 {
    color: #ffffff !important;
}

html[data-ptm-theme="dark"] #tm-page-related-tasks .tm-marketplace-back,
html.ptm-dark #tm-page-related-tasks .tm-marketplace-back {
    background: #ff6b35 !important;
    color: #ffffff !important;
}

html[data-ptm-theme="dark"] #tm-page-related-tasks .tm-related-task-card,
html.ptm-dark #tm-page-related-tasks .tm-related-task-card {
    padding: 24px;
    border: 1px solid #345064 !important;
    border-radius: 22px;
    background: #203444 !important;
    color: #f4f7fa !important;
    box-shadow: 0 14px 30px rgba(0, 0, 0, .2);
}

html[data-ptm-theme="dark"] #tm-page-related-tasks .tm-related-task-header h3,
html.ptm-dark #tm-page-related-tasks .tm-related-task-header h3,
html[data-ptm-theme="dark"] #tm-page-related-tasks .tm-related-task-description,
html.ptm-dark #tm-page-related-tasks .tm-related-task-description {
    color: #ffffff !important;
}

html[data-ptm-theme="dark"] #tm-page-related-tasks .tm-related-task-header p,
html.ptm-dark #tm-page-related-tasks .tm-related-task-header p,
html[data-ptm-theme="dark"] #tm-page-related-tasks .tm-related-task-details,
html.ptm-dark #tm-page-related-tasks .tm-related-task-details {
    color: #b3c0cc !important;
}

html[data-ptm-theme="dark"] #tm-page-related-tasks .tm-related-task-status,
html.ptm-dark #tm-page-related-tasks .tm-related-task-status {
    background: #123f4a !important;
    color: #55e1d4 !important;
}

/* Assignment cards and task detail screen */
#tm-page-task-detail {
    min-height: 100%;
    margin: 0 -24px -24px;
    padding: 16px;
    background: #07111f;
}

#tm-page-task-detail .tm-task-screen {
    min-height: calc(100vh - 150px);
}

#tm-page-task-detail .tm-task-screen-close {
    position: static;
    width: auto;
    height: auto;
    padding: 8px 12px;
    border: 1px solid #345064;
    border-radius: 8px;
    background: #0f2d48;
    color: #c7f8f3;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

#tm-page-task-detail .tm-task-screen-close:hover {
    background: #173f5c;
}

#tm-page-task-detail .tm-task-screen-header {
    position: static;
    margin: 0 0 16px;
}

#tm-page-task-detail .tm-task-screen-actions {
    position: static;
    padding: 16px 0 0;
    background: transparent;
}

.tm-assignment-card {
    position: relative;
    min-height: 264px;
    margin-bottom: 16px;
    padding: 34px 30px 28px;
    border: 1px solid #345064;
    border-radius: 20px;
    background: #172b3b;
    color: #f5f9ff;
    box-shadow: 0 14px 30px rgba(3, 8, 23, .16);
}

.tm-assignment-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.tm-assignment-card-copy {
    min-width: 0;
}

.tm-assignment-card-copy h3 {
    margin: 0;
    color: #f5f9ff;
    font-size: 18px;
    line-height: 1.25;
}

.tm-assignment-card-copy p,
.tm-assignment-deadline {
    margin: 6px 0 0;
    color: #91a8bf;
    font-size: 14px;
    line-height: 1.45;
}

.tm-assignment-card-copy strong,
.tm-assignment-deadline strong {
    color: #f5f9ff;
}

.tm-assignment-reward {
    flex: 0 0 auto;
    padding: 8px 14px;
    border-radius: 7px;
    background: #0878dc;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.tm-assignment-deadline {
    margin-top: 28px;
    text-align: center;
}

.tm-assignment-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.tm-assignment-actions .tm-btn {
    min-width: 150px;
    min-height: 46px;
    font-size: 16px;
    font-weight: 700;
}

.tm-assignment-actions .tm-btn-primary,
.tm-assignment-actions .tm-btn-success {
    background: #ff6534;
    color: #fff;
}

.tm-assignment-actions .tm-btn-secondary {
    background: #f4f7fa;
    color: #102131;
}

.tm-btn-proof-review {
    background: #203444 !important;
    color: #fff !important;
    border-color: #203444 !important;
}

.tm-btn-proof-review:hover:not(:disabled) {
    background: #2b465b !important;
}

.tm-proof-review-details {
    background: #f8f9fa;
    color: #333;
}

.tm-proof-review-card .tm-btn-info {
    background: #203444 !important;
    color: #fff !important;
    border-color: #203444 !important;
}

.tm-proof-review-card .tm-btn-info:hover {
    background: #2b465b !important;
}

html[data-ptm-theme="dark"] .tm-proof-review-details,
html.ptm-dark .tm-proof-review-details {
    background: #203444;
    color: #fff;
}

.tm-task-screen-modal .tm-modal-content {
    display: flex;
    flex-direction: column;
    width: min(1320px, calc(100vw - 40px)) !important;
    max-width: 1320px !important;
    max-height: 94vh;
    background: var(--dd-light-bg);
    border: 1px solid var(--dd-card-border);
    border-radius: 22px;
    overflow: auto;
}

.tm-task-screen-modal .tm-modal-content > div:first-child {
    display: none;
}

.tm-task-screen-modal .tm-modal-body {
    display: block !important;
    min-height: 0;
    overflow-y: auto;
    padding: 0;
    background: #07111f;
}

.tm-task-screen {
    --task-bg: var(--dd-light-bg);
    --task-card: var(--dd-card-bg);
    --task-panel: var(--dd-card-bg);
    --task-border: var(--dd-card-border);
    --task-muted: var(--dd-text-secondary);
    --task-accent: #13d3c2;
    color: var(--dd-text-primary);
    background: var(--task-bg);
    font-family: inherit;
}

.tm-task-screen-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 24px 28px;
    background: var(--dd-card-bg);
    border: 1px solid var(--dd-card-border);
    border-radius: 18px;
    margin: 16px;
    box-shadow: 0 10px 24px rgba(3, 8, 23, .16);
}

.tm-task-screen-close {
    position: absolute;
    top: 12px;
    right: 16px;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--task-muted);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.tm-task-screen-close:hover {
    background: #17344e;
    color: #ffffff;
}

.tm-task-screen-kicker {
    margin-bottom: 8px;
    color: var(--task-accent);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.tm-task-screen-header strong {
    font-size: 18px;
}

.tm-task-screen-progress {
    width: min(260px, 38%);
}

.tm-task-screen-progress > div:first-child {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    color: var(--task-muted);
    font-size: 14px;
    font-weight: 700;
}

.tm-task-screen-progress strong {
    color: var(--dd-text-primary);
    font-size: 15px;
}

.tm-task-screen-progress-track {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #dfe7ed;
}

.tm-task-screen-progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #00cdbd, #45d9ef);
}

.tm-task-screen-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, .9fr);
    gap: 24px;
    padding: 8px 16px 0;
}

.tm-task-screen-product,
.tm-task-screen-info {
    min-width: 0;
    padding: 34px;
    border: 1px solid var(--task-border);
    border-radius: 22px;
    background: var(--task-card);
}

.tm-task-screen-badge,
.tm-task-screen-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid var(--task-accent);
    border-radius: 999px;
    color: var(--task-accent);
    font-size: 14px;
    font-weight: 800;
}

.tm-task-screen-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: clamp(260px, 34vw, 430px);
    margin: 28px 0 30px;
    overflow: hidden;
    border-radius: 20px;
    background: #eef2f5;
}

.tm-task-screen-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.tm-task-screen-image-empty {
    color: var(--task-muted);
    font-size: 15px;
}

.tm-task-screen-product h1 {
    margin: 0 0 18px;
    color: var(--dd-text-primary);
    font-size: clamp(28px, 3vw, 44px);
    line-height: 1.12;
    overflow-wrap: anywhere;
}

.tm-task-screen-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.tm-task-screen-title-row h1 {
    min-width: 0;
}

.tm-task-screen-combined-badge {
    flex: 0 0 auto;
    margin-top: 5px;
    padding: 6px 9px;
    border: 1px solid var(--task-accent);
    border-radius: 999px;
    color: var(--task-accent);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
}

.tm-task-screen-description,
.tm-task-screen-requirements p {
    margin: 0;
    color: var(--task-muted);
    font-size: 16px;
    line-height: 1.7;
    white-space: pre-wrap;
}

.tm-task-screen-requirements {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(145, 168, 191, .2);
}

.tm-task-screen-requirements strong {
    display: block;
    margin-bottom: 8px;
    color: var(--dd-text-primary);
}

.tm-task-screen-sequence {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid rgba(145, 168, 191, .2);
}

.tm-task-screen-section-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    color: var(--dd-text-primary);
    font-size: 15px;
    font-weight: 800;
}

.tm-task-screen-section-heading strong {
    color: var(--task-accent);
    font-size: 12px;
}

.tm-task-screen-sequence-list {
    display: grid;
    gap: 7px;
}

.tm-task-screen-sequence-item,
.tm-task-screen-sequence-current {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid rgba(145, 168, 191, .18);
    border-radius: 10px;
    background: rgba(7, 17, 31, .18);
}

.tm-task-screen-sequence-item.is-current {
    border-color: var(--task-accent);
    background: rgba(19, 211, 194, .1);
}

.tm-task-screen-sequence-item.is-completed {
    opacity: .62;
}

.tm-task-screen-sequence-number {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(145, 168, 191, .2);
    color: var(--dd-text-primary);
    font-size: 11px;
    font-weight: 800;
}

.is-current .tm-task-screen-sequence-number {
    background: var(--task-accent);
    color: #07111f;
}

.tm-task-screen-sequence-copy {
    display: grid;
    flex: 1;
    min-width: 0;
    gap: 2px;
}

.tm-task-screen-sequence-copy strong,
.tm-task-screen-sequence-item > b {
    color: var(--dd-text-primary);
    font-size: 12px;
    overflow-wrap: anywhere;
}

.tm-task-screen-sequence-copy small {
    color: var(--task-muted);
    font-size: 10px;
    text-transform: capitalize;
}

.tm-task-screen-sequence-current {
    display: grid;
    gap: 3px;
    color: var(--task-muted);
    font-size: 12px;
}

.tm-task-screen-sequence-current strong {
    color: var(--dd-text-primary);
}

.tm-task-screen-status {
    margin-bottom: 22px;
}

.tm-task-screen-status i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.tm-task-screen-rows {
    border-top: 1px solid rgba(145, 168, 191, .15);
}

.tm-task-screen-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 68px;
    border-bottom: 1px solid rgba(145, 168, 191, .15);
}

.tm-task-screen-row span {
    color: var(--task-muted);
    font-size: 15px;
}

.tm-task-screen-row strong {
    color: var(--dd-text-primary);
    font-size: 16px;
    text-align: right;
    overflow-wrap: anywhere;
}

.tm-task-screen-actions {
    position: sticky;
    z-index: 3;
    bottom: 0;
    padding: 16px;
    background: linear-gradient(180deg, transparent 0, var(--task-bg) 18px);
}

.tm-task-screen-complete {
    width: 100%;
    padding: 17px 24px;
    border: 0;
    border-radius: 999px;
    background: var(--task-accent);
    color: #ffffff;
    font: inherit;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
}

.tm-task-screen-complete:hover:not(:disabled) {
    background: #39e3d3;
}

.tm-task-screen-complete:disabled {
    cursor: not-allowed;
    opacity: .55;
}

html[data-ptm-theme="dark"] .tm-task-screen-modal .tm-modal-content,
html.ptm-dark .tm-task-screen-modal .tm-modal-content {
    background: #07111f;
    border-color: #203a52;
}

html[data-ptm-theme="dark"] .tm-task-screen,
html.ptm-dark .tm-task-screen {
    --task-bg: #07111f;
    --task-card: #123552;
    --task-panel: #0f2d48;
    --task-border: #24516e;
    --task-muted: #91a8bf;
    color: #f5f9ff;
}

html[data-ptm-theme="dark"] .tm-task-screen-header,
html.ptm-dark .tm-task-screen-header {
    background: #030817;
    border-color: #182d43;
}

html[data-ptm-theme="dark"] .tm-task-screen-progress strong,
html.ptm-dark .tm-task-screen-progress strong {
    color: #c7f8f3;
}

html[data-ptm-theme="dark"] .tm-task-screen-progress-track,
html.ptm-dark .tm-task-screen-progress-track {
    background: #1a3047;
}

html[data-ptm-theme="dark"] .tm-task-screen-image,
html.ptm-dark .tm-task-screen-image {
    background: #172c42;
}

html[data-ptm-theme="dark"] .tm-task-screen-product h1,
html.ptm-dark .tm-task-screen-product h1 {
    color: #ffffff;
}

html[data-ptm-theme="dark"] .tm-task-screen-requirements strong,
html.ptm-dark .tm-task-screen-requirements strong,
html[data-ptm-theme="dark"] .tm-task-screen-row strong,
html.ptm-dark .tm-task-screen-row strong {
    color: #eaf3fc;
}

.tm-apply-job-modal .tm-modal-content {
    background: #0d1c29;
    color: #f5f9ff;
    border-color: #345064;
}

.tm-apply-job-modal .tm-modal-content > div:first-child {
    margin: 0 !important;
    padding: 20px !important;
    color: #f5f9ff;
    border-bottom-color: #345064 !important;
}

.tm-apply-job-modal .tm-modal-content > div:first-child h2,
.tm-apply-job-modal .tm-modal-content > div:first-child button {
    color: #f5f9ff;
}

.tm-apply-job-modal .tm-modal-body {
    padding: 20px;
    color: #f5f9ff;
}

.tm-apply-job-summary {
    margin-bottom: 20px;
    padding: 20px;
    border: 1px solid #345064;
    border-radius: 12px;
    background: #203444;
    color: #f5f9ff;
    font-size: 13px;
}

.tm-apply-job-summary p {
    margin: 0;
    color: #b8c8d6;
    line-height: 1.7;
}

.tm-apply-job-summary p + p {
    margin-top: 5px;
}

.tm-apply-job-summary strong {
    color: #ffffff;
}

.tm-apply-job-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding: 0;
}

.tm-apply-job-modal .tm-label {
    color: #f5f9ff !important;
}

.tm-apply-job-modal .tm-textarea {
    box-sizing: border-box;
    width: 100%;
    min-height: 120px !important;
    padding: 20px;
    background: #203444;
    border-color: #527087;
    color: #f5f9ff;
}

.tm-apply-job-modal .tm-textarea::placeholder {
    color: #9bb0c0;
}

html[data-ptm-theme="dark"] .tm-apply-job-modal .tm-modal-content,
html.ptm-dark .tm-apply-job-modal .tm-modal-content {
    background: #0d1c29;
    color: #f5f9ff;
    border-color: #345064;
}

html[data-ptm-theme="dark"] .tm-apply-job-modal .tm-modal-content > div:first-child,
html.ptm-dark .tm-apply-job-modal .tm-modal-content > div:first-child {
    color: #f5f9ff;
    border-bottom-color: #345064 !important;
}

html[data-ptm-theme="dark"] .tm-apply-job-modal .tm-modal-content > div:first-child h2,
html.ptm-dark .tm-apply-job-modal .tm-modal-content > div:first-child h2,
html[data-ptm-theme="dark"] .tm-apply-job-modal .tm-modal-content > div:first-child button,
html.ptm-dark .tm-apply-job-modal .tm-modal-content > div:first-child button,
html[data-ptm-theme="dark"] .tm-apply-job-modal .tm-label,
html.ptm-dark .tm-apply-job-modal .tm-label {
    color: #f5f9ff !important;
}

html[data-ptm-theme="dark"] .tm-apply-job-summary,
html.ptm-dark .tm-apply-job-summary {
    background: #203444;
    border-color: #345064;
    color: #f5f9ff;
}

html[data-ptm-theme="dark"] .tm-apply-job-summary p,
html.ptm-dark .tm-apply-job-summary p {
    color: #b8c8d6;
}

html[data-ptm-theme="dark"] .tm-apply-job-summary strong,
html.ptm-dark .tm-apply-job-summary strong {
    color: #ffffff;
}

html[data-ptm-theme="dark"] .tm-apply-job-modal .tm-textarea,
html.ptm-dark .tm-apply-job-modal .tm-textarea {
    background: #203444;
    border-color: #527087;
    color: #f5f9ff;
}

.tm-available-task-card {
    overflow: hidden;
    background: #123552;
    border: 1px solid #24516e;
    border-radius: 18px;
    color: #f5f9ff;
}

.tm-available-task-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 190px;
    overflow: hidden;
    background: #172c42;
}

.tm-available-task-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.tm-available-task-card > :not(.tm-available-task-image) {
    margin-right: 18px;
    margin-left: 18px;
}

.tm-available-task-card > div:not(.tm-available-task-image) {
    padding-top: 15px;
}

.tm-available-task-card h3 {
    color: #ffffff !important;
}

.tm-available-task-card p,
.tm-available-task-card .tm-available-task-details {
    color: #a9bdd0 !important;
}

.tm-available-task-card > .tm-btn {
    margin-bottom: 18px;
}

@media (max-width: 760px) {
    .tm-task-screen-modal {
        align-items: center;
        padding: 8px;
    }

    .tm-assignment-card {
        min-height: 0;
        padding: 24px 18px 20px;
        border-radius: 16px;
    }

    .tm-assignment-card-header {
        align-items: center;
        gap: 12px;
    }

    .tm-assignment-card-copy h3 {
        font-size: 18px;
    }

    .tm-assignment-card-copy p,
    .tm-assignment-deadline {
        font-size: 14px;
    }

    .tm-assignment-reward {
        padding: 7px 10px;
        font-size: 13px;
    }

    .tm-assignment-deadline {
        margin-top: 22px;
    }

    .tm-assignment-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .tm-assignment-actions .tm-btn {
        width: 100%;
        min-width: 0;
        min-height: 44px;
        font-size: 14px;
    }

    .tm-task-screen-modal .tm-modal-content {
        width: calc(100vw - 20px) !important;
        max-height: 96vh;
        border-radius: 16px;
    }

    .tm-task-screen-header {
        align-items: stretch;
        flex-direction: column;
        gap: 20px;
        margin: 10px;
        padding: 20px;
    }

    .tm-task-screen-progress {
        width: 100%;
    }

    .tm-task-screen-grid {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, .7fr);
        gap: 14px;
        padding: 4px 8px 0;
    }

    .tm-task-screen-product,
    .tm-task-screen-info {
        padding: 16px;
        border-radius: 14px;
    }

    .tm-task-screen-image {
        height: min(32vw, 180px);
        margin: 16px 0;
        border-radius: 12px;
    }

    .tm-task-screen-product h1 {
        font-size: clamp(20px, 4.5vw, 28px);
    }

    .tm-task-screen-title-row {
        display: block;
    }

    .tm-task-screen-combined-badge {
        display: inline-flex;
        margin-top: 0;
    }

    .tm-task-screen-section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .tm-task-screen-row {
        min-height: 42px;
        gap: 8px;
    }

    .tm-task-screen-row span,
    .tm-task-screen-row strong {
        font-size: 11px;
    }

    .tm-task-screen-status,
    .tm-task-screen-badge {
        padding: 6px 9px;
        font-size: 11px;
    }

    .tm-task-screen-description,
    .tm-task-screen-requirements p {
        font-size: 12px;
        line-height: 1.5;
    }

    .tm-task-screen-actions {
        padding: 12px;
    }

    .tm-task-screen-complete {
        padding: 15px 18px;
        font-size: 16px;
    }

    .tm-available-task-image {
        height: 160px;
    }
}

html[data-ptm-theme="dark"] #tm-page-related-tasks .tm-related-tasks-empty,
html.ptm-dark #tm-page-related-tasks .tm-related-tasks-empty {
    border-color: #345064 !important;
    background: #203444 !important;
    color: #f4f7fa !important;
}

html:not([data-ptm-theme="dark"]):not(.ptm-dark) #tm-page-related-tasks {
    background: var(--ptm-bg) !important;
    border-color: var(--ptm-border) !important;
    color: var(--ptm-text) !important;
}

html:not([data-ptm-theme="dark"]):not(.ptm-dark) #tm-page-related-tasks .tm-marketplace-heading,
html:not([data-ptm-theme="dark"]):not(.ptm-dark) #tm-page-related-tasks .tm-marketplace-heading h2 {
    color: var(--ptm-text) !important;
}

html:not([data-ptm-theme="dark"]):not(.ptm-dark) #tm-page-related-tasks .tm-marketplace-back {
    background: var(--ptm-primary) !important;
    color: #ffffff !important;
}

html:not([data-ptm-theme="dark"]):not(.ptm-dark) #tm-page-related-tasks .tm-related-task-card {
    border-color: var(--ptm-border) !important;
    background: var(--ptm-surface) !important;
    color: var(--ptm-text) !important;
    box-shadow: 0 8px 20px rgba(26, 35, 50, .08);
}

html:not([data-ptm-theme="dark"]):not(.ptm-dark) #tm-page-related-tasks .tm-related-task-header h3,
html:not([data-ptm-theme="dark"]):not(.ptm-dark) #tm-page-related-tasks .tm-related-task-description {
    color: var(--ptm-text) !important;
}

html:not([data-ptm-theme="dark"]):not(.ptm-dark) #tm-page-related-tasks .tm-related-task-header p,
html:not([data-ptm-theme="dark"]):not(.ptm-dark) #tm-page-related-tasks .tm-related-task-details {
    color: var(--ptm-text-secondary) !important;
}

html:not([data-ptm-theme="dark"]):not(.ptm-dark) #tm-page-related-tasks .tm-related-task-status {
    background: #e6f8f0 !important;
    color: #08783f !important;
}

html:not([data-ptm-theme="dark"]):not(.ptm-dark) #tm-page-related-tasks .tm-related-tasks-empty {
    border-color: var(--ptm-border) !important;
    background: var(--ptm-surface) !important;
    color: var(--ptm-text) !important;
}

html[data-ptm-theme="light"] #tm-page-related-tasks,
html[data-ptm-theme="light"] #tm-page-related-tasks .tm-related-task-card,
html[data-ptm-theme="light"] #tm-page-related-tasks .tm-related-tasks-empty {
    background: #ffffff !important;
    border-color: #dfe5ec !important;
    color: #1a2332 !important;
}

html[data-ptm-theme="light"] #tm-page-related-tasks .tm-marketplace-heading,
html[data-ptm-theme="light"] #tm-page-related-tasks .tm-marketplace-heading h2,
html[data-ptm-theme="light"] #tm-page-related-tasks .tm-related-task-header h3,
html[data-ptm-theme="light"] #tm-page-related-tasks .tm-related-task-description {
    color: #1a2332 !important;
}

html[data-ptm-theme="light"] #tm-page-related-tasks .tm-related-task-header p,
html[data-ptm-theme="light"] #tm-page-related-tasks .tm-related-task-details {
    color: #666f7d !important;
}

html[data-ptm-theme="light"] #tm-page-related-tasks .tm-related-task-status {
    background: #e6f8f0 !important;
    color: #08783f !important;
}

html[data-ptm-theme="dark"] #tm-page-related-tasks .tm-related-task-header p,
html.ptm-dark #tm-page-related-tasks .tm-related-task-header p,
html[data-ptm-theme="dark"] #tm-page-related-tasks .tm-related-task-details {
    color: #b3c0cc !important;
}

.tm-related-task-image {
    display: block;
    width: 100%;
    max-height: 240px;
    margin: -4px 0 20px;
    border-radius: 14px;
    object-fit: cover;
}

html[data-ptm-theme="dark"] #tm-page-related-tasks .tm-related-task-card,
html.ptm-dark #tm-page-related-tasks .tm-related-task-card {
    background: #203444 !important;
    border-color: #345064 !important;
    color: #f4f7fa !important;
}

html[data-ptm-theme="dark"] .tm-level-system-panel,
html.ptm-dark .tm-level-system-panel {
    background: #101820 !important;
    border-color: #345064 !important;
    color: #f4f7fa !important;
}

html[data-ptm-theme="dark"] .tm-level-system-panel .tm-level-banner,
html.ptm-dark .tm-level-system-panel .tm-level-banner {
    background: #203444 !important;
    border-color: #ffffff !important;
}

html[data-ptm-theme="dark"] .tm-level-system-panel .tm-level-copy h3,
html.ptm-dark .tm-level-system-panel .tm-level-copy h3,
html[data-ptm-theme="dark"] .tm-level-system-panel .tm-level-emblem strong,
html.ptm-dark .tm-level-system-panel .tm-level-emblem strong,
html[data-ptm-theme="dark"] .tm-level-system-panel .tm-level-copy > div,
html.ptm-dark .tm-level-system-panel .tm-level-copy > div {
    color: #ffffff !important;
}

html[data-ptm-theme="dark"] .tm-level-system-panel .tm-level-divider,
html.ptm-dark .tm-level-system-panel .tm-level-divider {
    background: #ffffff !important;
}

html[data-ptm-theme="dark"] .tm-level-system-panel .tm-level-metrics,
html.ptm-dark .tm-level-system-panel .tm-level-metrics {
    background: #203444 !important;
    border: 1px solid #ffffff;
    color: #ffffff !important;
}

html[data-ptm-theme="dark"] .tm-level-system-panel .tm-level-metrics small,
html.ptm-dark .tm-level-system-panel .tm-level-metrics small,
html[data-ptm-theme="dark"] .tm-level-system-panel > p,
html.ptm-dark .tm-level-system-panel > p {
    color: #b3c0cc !important;
}

html[data-ptm-theme="dark"] .tm-level-system-panel .tm-level-metrics strong,
html.ptm-dark .tm-level-system-panel .tm-level-metrics strong {
    color: #ffffff !important;
}

.tm-level-logo-frame {
    border-radius: 50% !important;
    overflow: hidden !important;
}

.tm-level-logo {
    border-radius: 0 !important;
}
