@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/**
 * Task Marketplace - Design System
 * Professional Marketplace Platform
 * Color Scheme: Original branding (not Amazon)
 */

:root {
    /* Primary Colors - Professional Blue */
    --tm-primary: #0066cc;
    --tm-primary-dark: #0052a3;
    --tm-primary-light: #e6f0ff;
    --tm-primary-lighter: #f0f7ff;

    /* Secondary Colors - Action Green */
    --tm-secondary: #00a651;
    --tm-secondary-dark: #008040;
    --tm-secondary-light: #e6f8f0;

    /* Accent Colors - Energy Orange */
    --tm-accent: #ff6b35;
    --tm-accent-light: #ffe6d5;
    --tm-accent-dark: #cc5529;

    /* Status Colors */
    --tm-success: #00a651;
    --tm-warning: #ffa500;
    --tm-danger: #e74c3c;
    --tm-info: #0066cc;
    --tm-pending: #f39c12;

    /* Neutral Colors */
    --tm-background: #ffffff;
    --tm-surface: #f8f9fa;
    --tm-card: #ffffff;
    --tm-border: #e0e0e0;
    --tm-divider: #e8e8e8;
    
    /* Text Colors */
    --tm-text: #1a1a1a;
    --tm-text-secondary: #4d4d4d;
    --tm-text-muted: #666666;
    --tm-text-light: #999999;
    --tm-text-placeholder: #b3b3b3;

    /* Spacing Scale */
    --tm-space-xs: 4px;
    --tm-space-sm: 8px;
    --tm-space-md: 16px;
    --tm-space-lg: 24px;
    --tm-space-xl: 32px;
    --tm-space-xxl: 48px;

    /* Border Radius */
    --tm-radius-sm: 4px;
    --tm-radius-md: 8px;
    --tm-radius-lg: 12px;
    --tm-radius-xl: 16px;
    --tm-radius-full: 9999px;

    /* Typography */
    --tm-font-family: 'Poppins', sans-serif;
    --tm-font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;

    --tm-font-size-xs: 12px;
    --tm-font-size-sm: 14px;
    --tm-font-size-base: 16px;
    --tm-font-size-lg: 18px;
    --tm-font-size-xl: 20px;
    --tm-font-size-2xl: 24px;
    --tm-font-size-3xl: 32px;

    --tm-font-weight-normal: 400;
    --tm-font-weight-medium: 500;
    --tm-font-weight-semibold: 600;
    --tm-font-weight-bold: 700;

    --tm-line-height-tight: 1.2;
    --tm-line-height-normal: 1.5;
    --tm-line-height-relaxed: 1.75;

    /* Shadows */
    --tm-shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --tm-shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --tm-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --tm-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --tm-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Transitions */
    --tm-transition-fast: 150ms ease;
    --tm-transition-normal: 250ms ease;
    --tm-transition-slow: 350ms ease;

    /* Z-Index Scale */
    --tm-z-dropdown: 100;
    --tm-z-sticky: 200;
    --tm-z-fixed: 300;
    --tm-z-modal-backdrop: 400;
    --tm-z-modal: 500;
    --tm-z-tooltip: 600;
}

/* ============================================================================
   GLOBAL STYLES
   ============================================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
}

body {
    font-family: var(--tm-font-family);
    font-size: var(--tm-font-size-base);
    line-height: var(--tm-line-height-normal);
    color: var(--tm-text);
    background-color: var(--tm-background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================================================
   TYPOGRAPHY
   ============================================================================ */

h1, h2, h3, h4, h5, h6 {
    font-weight: var(--tm-font-weight-bold);
    line-height: var(--tm-line-height-tight);
    margin-bottom: var(--tm-space-md);
}

h1 { font-size: var(--tm-font-size-3xl); }
h2 { font-size: var(--tm-font-size-2xl); }
h3 { font-size: var(--tm-font-size-xl); }
h4 { font-size: var(--tm-font-size-lg); }
h5 { font-size: var(--tm-font-size-base); }
h6 { font-size: var(--tm-font-size-sm); }

p {
    margin-bottom: var(--tm-space-md);
}

a {
    color: var(--tm-primary);
    text-decoration: none;
    transition: color var(--tm-transition-fast);
}

a:hover {
    color: var(--tm-primary-dark);
    text-decoration: underline;
}

/* ============================================================================
   LAYOUT STRUCTURE - DESKTOP
   ============================================================================ */

.tm-app {
    display: flex;
    width: 100%;
    height: 100vh;
    background-color: var(--tm-background);
}

.tm-sidebar {
    width: 280px;
    background-color: var(--tm-card);
    border-right: 1px solid var(--tm-border);
    overflow-y: auto;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    z-index: var(--tm-z-fixed);
    box-shadow: var(--tm-shadow-sm);
}

.tm-main-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-left: 280px;
}

.tm-header {
    background-color: var(--tm-card);
    border-bottom: 1px solid var(--tm-border);
    padding: 0 var(--tm-space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    box-shadow: var(--tm-shadow-xs);
    position: sticky;
    top: 0;
    z-index: var(--tm-z-sticky);
}

.tm-content {
    flex: 1;
    overflow-y: auto;
    padding: 0 var(--tm-space-lg) var(--tm-space-lg);
    background-color: var(--tm-surface);
    margin-top: 0;
}

.tm-page {
    margin-top: 0;
    padding-top: 0;
}

/* ============================================================================
   SIDEBAR NAVIGATION
   ============================================================================ */

.tm-logo {
    display: flex;
    align-items: center;
    gap: var(--tm-space-md);
    padding: var(--tm-space-lg);
    border-bottom: 1px solid var(--tm-border);
}

.tm-logo-img {
    width: 40px;
    height: 40px;
    border-radius: var(--tm-radius-md);
    object-fit: cover;
}

.tm-logo-icon {
    width: 40px;
    height: 40px;
    color: var(--tm-primary);
    flex-shrink: 0;
}

.tm-brand-name {
    font-weight: var(--tm-font-weight-bold);
    font-size: var(--tm-font-size-lg);
    color: var(--tm-text);
}

.tm-nav {
    padding: var(--tm-space-md) 0;
}

.tm-nav-item {
    display: flex;
    align-items: center;
    gap: var(--tm-space-md);
    padding: var(--tm-space-md) var(--tm-space-lg);
    color: var(--tm-text-muted);
    cursor: pointer;
    transition: all var(--tm-transition-fast);
    font-size: var(--tm-font-size-sm);
    text-decoration: none;
}

.tm-nav-item:hover {
    background-color: var(--tm-surface);
    color: var(--tm-primary);
}

.tm-nav-item.active {
    background-color: var(--tm-primary-lighter);
    color: var(--tm-primary);
    font-weight: var(--tm-font-weight-semibold);
    border-right: 3px solid var(--tm-primary);
}

.tm-nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* ============================================================================
   HEADER COMPONENTS
   ============================================================================ */

.tm-header-left {
    display: flex;
    align-items: center;
    gap: var(--tm-space-lg);
    flex: 1;
}

.tm-header-title {
    font-size: var(--tm-font-size-lg);
    font-weight: var(--tm-font-weight-semibold);
    color: var(--tm-text);
}

.tm-header-right {
    display: flex;
    align-items: center;
    gap: var(--tm-space-lg);
}

.tm-notifications-badge {
    position: relative;
    cursor: pointer;
}

.tm-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background-color: var(--tm-danger);
    color: white;
    border-radius: var(--tm-radius-full);
    font-size: 11px;
    font-weight: var(--tm-font-weight-bold);
    position: absolute;
    top: -8px;
    right: -8px;
}

.tm-profile-menu {
    display: flex;
    align-items: center;
    gap: var(--tm-space-sm);
    cursor: pointer;
}

.tm-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--tm-radius-full);
    background-color: var(--tm-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--tm-font-weight-bold);
    object-fit: cover;
}

/* ============================================================================
   CARDS & PANELS
   ============================================================================ */

.tm-card {
    background-color: var(--tm-card);
    border: 1px solid var(--tm-border);
    border-radius: var(--tm-radius-lg);
    padding: var(--tm-space-lg);
    box-shadow: var(--tm-shadow-sm);
    transition: all var(--tm-transition-fast);
}

.tm-card:hover {
    box-shadow: var(--tm-shadow-md);
}

.tm-admin-developed-by {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 24px 22px;
    color: var(--tm-text-muted);
    font-size: 14px;
    text-align: center;
}

.tm-admin-developed-by-brand {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    justify-content: center;
}

.tm-admin-developed-by-copy {
    display: block;
    white-space: nowrap;
    line-height: 1;
}

.tm-admin-developed-by-copy > span {
    display: inline;
    color: #7488a3;
    font-size: 14px;
    line-height: 1;
}

.tm-admin-developed-by a {
    margin-left: 4px;
    color: #f36a32;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
}

.tm-admin-developed-by a:hover {
    text-decoration: underline;
}

@media (max-width: 480px) {
    .tm-admin-developed-by {
        padding-right: 12px;
        padding-left: 12px;
    }

    .tm-admin-developed-by-copy > span,
    .tm-admin-developed-by a {
        font-size: 13px;
    }

    .tm-admin-developed-by a {
        margin-left: 3px;
    }
}

/* Withdrawal workspace */
.tm-withdraw-page {
    --tm-withdraw-bg: var(--tm-primary-dark);
    --tm-withdraw-panel: var(--tm-primary);
    --tm-withdraw-border: var(--tm-primary-light);
    --tm-withdraw-muted: var(--tm-primary-light);
    color: #fff;
    background: radial-gradient(circle at 88% 8%, var(--tm-primary), transparent 30%), var(--tm-withdraw-bg);
    margin: 0 calc(var(--tm-space-lg) * -1) calc(var(--tm-space-lg) * -1);
    padding: 34px clamp(20px, 4vw, 48px) 48px;
    min-height: 100%;
}
.tm-task-category-columns { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; align-items: start; }
@media (max-width: 900px) { .tm-task-category-columns { grid-template-columns: 1fr !important; } }
.tm-task-category-button {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) auto 18px;
    align-items: center;
    gap: 20px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    margin: 0 0 14px;
    padding: 24px;
    border: 1px solid var(--tm-primary);
    border-radius: var(--tm-radius-xl);
    background: var(--tm-primary-dark);
    color: #fff;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: all var(--dd-transition-normal);
}
.tm-task-category-button:hover,
.tm-task-category-button:focus-visible,
.tm-task-category-button.active {
    border-color: var(--tm-accent);
    background: var(--tm-primary);
    outline: 2px solid var(--tm-accent);
    outline-offset: 2px;
}
.tm-task-category-mark {
    display: grid;
    place-items: center;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: var(--tm-primary);
    color: var(--tm-accent);
    font-size: 18px;
    font-weight: var(--tm-font-weight-bold);
    letter-spacing: 0.04em;
}
.tm-task-category-info {
    display: grid;
    min-width: 0;
    gap: 4px;
}
.tm-task-category-name {
    margin-bottom: 4px;
    color: #fff;
    font-size: var(--tm-font-size-xl);
}
.tm-task-category-balance,
.tm-task-category-rate {
    min-width: 0;
    overflow-wrap: anywhere;
    line-height: 1.35;
    color: var(--tm-primary-light);
    font-size: var(--tm-font-size-sm);
}
.tm-task-category-balance b {
    color: #fff;
}
.tm-task-category-rate b {
    color: var(--tm-secondary);
}
.tm-task-category-vip {
    align-self: start;
    padding: 8px 14px;
    border-radius: var(--tm-radius-full);
    background: var(--tm-secondary);
    color: var(--tm-primary-dark);
    font-size: var(--tm-font-size-sm);
    font-weight: var(--tm-font-weight-bold);
    white-space: nowrap;
}
.tm-task-category-arrow {
    color: var(--tm-primary-light);
    font-size: 30px;
    line-height: 1;
}
@media (max-width: 600px) {
    .tm-task-category-button {
        grid-template-columns: 52px minmax(0, 1fr) 18px;
        gap: 10px;
        padding: 14px;
    }
    .tm-task-category-mark {
        width: 52px;
        height: 52px;
        font-size: 14px;
    }
    .tm-task-category-columns .tm-task-category-mark img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain;
    }
    .tm-task-category-name {
        font-size: var(--tm-font-size-lg);
    }
    .tm-task-category-vip {
        grid-column: 2;
        grid-row: 2;
        justify-self: start;
        padding: 5px 10px;
        font-size: var(--tm-font-size-xs);
    }
    .tm-task-category-arrow {
        grid-column: 3;
        grid-row: 1;
        align-self: center;
    }

    .tm-marketplace-heading {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 28px;
        color: var(--tm-text);
    }
    .tm-marketplace-heading h2 {
        margin: 0;
        font-size: clamp(26px, 4vw, 34px);
    }
    .tm-marketplace-back {
        padding: 0;
        border: 0;
        background: transparent;
        color: var(--tm-primary);
        font-size: 38px;
        line-height: 1;
        cursor: pointer;
    }
    .tm-marketplace-account-card {
        display: grid;
        gap: 12px;
        margin-bottom: 22px;
        padding: 34px 38px;
        border: 1px solid var(--tm-primary);
        border-radius: var(--tm-radius-xl);
        background: linear-gradient(135deg, var(--tm-primary-dark), var(--tm-primary));
        color: #fff;
        box-shadow: var(--tm-shadow-lg);
    }
    .tm-marketplace-account-card span {
        color: var(--tm-primary-light);
        font-size: var(--tm-font-size-lg);
        font-weight: var(--tm-font-weight-semibold);
    }
    .tm-marketplace-account-card strong {
        font-size: clamp(38px, 7vw, 64px);
        line-height: 1;
    }
    .tm-marketplace-metrics {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
        margin-bottom: 22px;
    }
    .tm-marketplace-metrics > div {
        display: grid;
        gap: 8px;
        min-height: 92px;
        padding: 22px 24px;
        border: 1px solid var(--tm-primary);
        border-radius: var(--tm-radius-xl);
        background: var(--tm-primary-dark);
        color: #fff;
    }
    .tm-marketplace-metrics span {
        color: var(--tm-primary-light);
        font-size: var(--tm-font-size-base);
    }
    .tm-marketplace-metrics strong {
        font-size: var(--tm-font-size-lg);
    }
    .tm-marketplace-action {
        width: 100%;
        min-height: 68px;
        margin-bottom: 24px;
        padding: 16px 24px;
        border: 0;
        border-radius: var(--tm-radius-full);
        background: var(--tm-secondary);
        color: #fff;
        font: inherit;
        font-size: var(--tm-font-size-lg);
        font-weight: var(--tm-font-weight-bold);
        cursor: pointer;
        transition: transform var(--tm-transition-normal), filter var(--tm-transition-normal);
    }
    .tm-marketplace-action:hover:not(:disabled),
    .tm-marketplace-action:focus-visible:not(:disabled) {
        filter: brightness(1.08);
        transform: translateY(-2px);
    }
    .tm-marketplace-action:disabled {
        background: var(--tm-border);
        color: var(--tm-text-muted);
        cursor: not-allowed;
    }
    .tm-marketplace-restricted {
        display: grid;
        justify-items: center;
        gap: 14px;
        margin-bottom: 24px;
        padding: 38px 28px 42px;
        border: 1px solid var(--tm-primary);
        border-radius: var(--tm-radius-xl);
        background: var(--tm-primary-dark);
        color: #fff;
        text-align: center;
    }
    .tm-marketplace-restricted-icon {
        display: grid;
        place-items: center;
        width: 84px;
        height: 84px;
        border-radius: 50%;
        background: var(--tm-primary);
        color: var(--tm-secondary);
        font-size: 54px;
        line-height: 1;
    }
    .tm-marketplace-restricted h3 {
        margin: 12px 0 0;
        font-size: clamp(24px, 4vw, 34px);
    }
    .tm-marketplace-restricted p {
        margin: 0;
        color: var(--tm-primary-light);
        font-size: var(--tm-font-size-lg);
    }
    .tm-marketplace-restricted p strong {
        color: #fff;
    }
    .tm-marketplace-restricted-action {
        margin-top: 28px;
        padding: 14px 26px;
        border: 0;
        border-radius: var(--tm-radius-md);
        background: var(--tm-secondary);
        color: #fff;
        font: inherit;
        font-weight: var(--tm-font-weight-bold);
        cursor: pointer;
    }
    .tm-marketplace-restricted-action:hover,
    .tm-marketplace-restricted-action:focus-visible {
        filter: brightness(1.08);
        outline: 2px solid var(--tm-secondary);
        outline-offset: 3px;
    }
    .tm-related-tasks-list {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 18px;
    }
    .tm-page[data-page="related-tasks"] {
        min-height: 100%;
        padding: clamp(24px, 4vw, 48px);
        border-radius: var(--tm-radius-xl);
        background: radial-gradient(circle at 88% 8%, rgba(0, 102, 204, .22), transparent 28%), var(--tm-primary-dark);
    }
    .tm-page[data-page="related-tasks"] .tm-marketplace-heading {
        max-width: 1100px;
        margin: 0 auto 28px;
        color: #fff;
    }
    .tm-page[data-page="related-tasks"] .tm-marketplace-back {
        color: var(--tm-secondary);
    }
    .tm-page[data-page="related-tasks"] .tm-marketplace-heading h2 {
        color: #fff;
    }
    .tm-related-tasks-list {
        max-width: 1100px;
        margin: 0 auto;
    }
    .tm-related-tasks-loading,
    .tm-related-tasks-empty {
        grid-column: 1 / -1;
        display: grid;
        justify-items: center;
        gap: 12px;
        min-height: 300px;
        margin: 0;
        padding: 48px 24px;
        border: 1px solid var(--tm-primary);
        border-radius: var(--tm-radius-xl);
        background: var(--tm-primary);
        color: var(--tm-primary-light);
        text-align: center;
    }
    .tm-related-tasks-empty-icon {
        display: grid;
        place-items: center;
        width: 72px;
        height: 72px;
        border-radius: 50%;
        background: var(--tm-primary-dark);
        color: var(--tm-secondary);
        font-size: 36px;
        font-weight: var(--tm-font-weight-bold);
    }
    .tm-related-tasks-empty h3 {
        margin: 8px 0 0;
        color: #fff;
        font-size: clamp(24px, 4vw, 34px);
    }
    .tm-related-tasks-empty p {
        margin: 0 0 12px;
        color: var(--tm-primary-light);
        font-size: var(--tm-font-size-lg);
    }
    .tm-related-task-card {
        padding: 20px;
    }
    .tm-related-task-header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
    }
    .tm-related-task-header h3 {
        margin: 0;
        color: var(--tm-primary-dark);
        font-size: var(--tm-font-size-lg);
    }
    .tm-related-task-header p,
    .tm-related-task-description {
        color: var(--tm-text-muted);
        font-size: var(--tm-font-size-sm);
    }
    .tm-related-task-header p {
        margin: 5px 0 0;
    }
    .tm-related-task-status {
        padding: 5px 9px;
        border-radius: var(--tm-radius-full);
        background: var(--tm-secondary-light);
        color: var(--tm-secondary-dark);
        font-size: var(--tm-font-size-xs);
        font-weight: var(--tm-font-weight-bold);
        white-space: nowrap;
    }
    .tm-related-task-description {
        margin: 14px 0;
        line-height: 1.5;
    }
    .tm-related-task-details {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin-bottom: 16px;
        color: var(--tm-text-secondary);
        font-size: var(--tm-font-size-xs);
    }
    .tm-marketplace-access-list {
        display: grid;
        gap: 10px;
    }
    .tm-marketplace-access-item {
        display: grid;
        grid-template-columns: 48px minmax(0, 1fr) auto;
        align-items: center;
        gap: 14px;
        width: 100%;
        border: 1px solid var(--tm-border);
        background: var(--tm-surface);
        color: var(--tm-primary-dark);
        border: 1px solid var(--tm-primary);
        border-radius: var(--tm-radius-lg);
        background: var(--tm-primary-dark);
        color: #fff;
        color: var(--tm-primary-dark);
        cursor: pointer;
    }
        color: var(--tm-primary-dark);
        width: 48px;
        height: 48px;
        color: var(--tm-primary-dark);
    }
    .tm-marketplace-access-item strong,
    .tm-marketplace-access-item small {
        display: block;
    }
    .tm-marketplace-access-item small {
        margin-top: 3px;
        min-height: 280px;
    }
    .tm-marketplace-access-item.active {
        border-color: var(--tm-secondary);
        box-shadow: 0 0 0 2px var(--tm-secondary);
    }
    .tm-marketplace-access-item.locked {
        opacity: .58;
        border: 1px solid var(--tm-border);
    }
        background: #fff;
        color: var(--tm-primary-dark);
        box-shadow: var(--tm-shadow-sm);
            padding: 26px 24px;
        }
        background: var(--tm-accent-light);
        color: var(--tm-accent-dark);
        }
        .tm-marketplace-metrics > div {
        color: var(--tm-primary-dark);
        }
    }
        color: var(--tm-text-muted);
.tm-withdraw-heading, .tm-withdraw-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
    .tm-page[data-page="related-tasks"] .tm-related-tasks-empty .tm-btn {
        min-width: 220px;
        background: var(--tm-accent);
        color: #fff;
        box-shadow: 0 8px 18px rgba(253, 96, 1, .2);
    }
.tm-withdraw-heading { margin-bottom: 32px; }
.tm-withdraw-heading h2, .tm-withdraw-panel-header h3, .tm-withdraw-section-heading h3 { margin: 0; color: #fff; }
.tm-withdraw-heading h2 { font-size: clamp(28px, 3vw, 40px); }
.tm-withdraw-heading p, .tm-withdraw-panel-header p, .tm-withdraw-section-heading span { margin: 10px 0 0; color: var(--tm-withdraw-muted); }
.tm-withdraw-history-link { color: var(--tm-primary-light); background: transparent; border: 0; cursor: pointer; font: inherit; }
.tm-withdraw-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .95fr); gap: 28px; max-width: 1100px; }
.tm-withdraw-form-panel, .tm-withdraw-summary-panel { border: 1px solid var(--tm-withdraw-border); border-radius: 20px; background: var(--tm-withdraw-panel); box-shadow: var(--tm-shadow-lg); }
.tm-withdraw-form-panel { padding: clamp(24px, 4vw, 36px); }
.tm-withdraw-panel-header { margin-bottom: 34px; }
.tm-withdraw-panel-header h3 { font-size: 25px; }
.tm-withdraw-field { margin-bottom: 26px; }
.tm-withdraw-field label { display: block; margin-bottom: 10px; color: var(--tm-primary-light); font-weight: 600; }
.tm-withdraw-control { width: 100%; min-height: 64px; padding: 0 22px; border: 1px solid var(--tm-primary-light); border-radius: 34px; color: #fff; background: var(--tm-primary-dark); font: inherit; outline: none; }
.tm-withdraw-control:focus { border-color: var(--tm-secondary); box-shadow: 0 0 0 3px rgba(0, 166, 81, .2); }
.tm-withdraw-control::placeholder { color: var(--tm-text-light); }
.tm-withdraw-submit { width: 100%; min-height: 64px; border: 0; border-radius: 34px; color: var(--tm-primary-dark); background: var(--tm-secondary); font: inherit; font-size: 18px; font-weight: 700; cursor: pointer; transition: filter var(--tm-transition-fast), transform var(--tm-transition-fast); }
.tm-withdraw-submit:hover { filter: brightness(1.08); transform: translateY(-1px); }
.tm-withdraw-summary-panel { overflow: hidden; }
.tm-withdraw-balance-block { display: flex; justify-content: space-between; gap: 20px; padding: 38px 32px; background: linear-gradient(135deg, var(--tm-primary), var(--tm-primary-dark)); }
.tm-withdraw-eyebrow { display: block; margin-bottom: 18px; color: var(--tm-withdraw-muted); font-weight: 600; }
.tm-withdraw-balance-block strong { display: block; max-width: 290px; color: #fff; font-size: clamp(34px, 4vw, 50px); line-height: 1.05; overflow-wrap: anywhere; }
.tm-withdraw-balance-block small { display: block; margin-top: 16px; color: var(--tm-primary-light); font-size: 14px; }
.tm-withdraw-network-badge { align-self: flex-start; padding: 8px 14px; border-radius: 22px; color: var(--tm-primary-light); background: var(--tm-primary-dark); font-weight: 700; }
.tm-withdraw-summary-list { padding: 0 32px; background: var(--tm-primary); }
.tm-withdraw-summary-list > div { display: flex; justify-content: space-between; gap: 18px; padding: 24px 0; border-bottom: 1px solid rgba(142, 177, 204, .12); color: #6f8da9; }
.tm-withdraw-summary-list strong { color: #fff; white-space: nowrap; }
.tm-withdraw-summary-list .tm-withdraw-total { color: var(--tm-secondary); }
.tm-withdraw-status { margin: 0; padding: 26px 6px; color: var(--tm-primary-light); background: var(--tm-primary-dark); text-align: center; }
.tm-withdraw-secondary-content { max-width: 1100px; margin-top: 44px; }
.tm-withdraw-section-heading { margin-bottom: 16px; }
.tm-withdraw-section-heading h3 { font-size: 24px; }
.tm-withdraw-section-heading span { margin: 0; }
.tm-withdraw-history-card { color: var(--tm-primary-light); background: var(--tm-primary); border-color: var(--tm-withdraw-border); }
.tm-withdraw-payout-heading { margin-top: 38px; }
.tm-withdraw-filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.tm-withdraw-page .tm-label { color: var(--tm-primary-light); }
.tm-withdraw-page .tm-input { color: #fff; background: var(--tm-primary); border-color: var(--tm-withdraw-border); }
.tm-withdraw-page table { color: var(--tm-primary-light); }
@media (max-width: 780px) {
    .tm-withdraw-page { padding: 26px 16px 36px; }
    .tm-withdraw-grid { grid-template-columns: 1fr; }
    .tm-withdraw-heading { align-items: flex-start; }
    .tm-withdraw-history-link { display: none; }
}

/* Orange card theme */
.tm-task-category-button,
.tm-task-category-button:hover,
.tm-task-category-button:focus-visible,
.tm-task-category-button.active,
.tm-related-tasks-empty,
.tm-related-task-card,
.tm-withdraw-form-panel,
.tm-withdraw-summary-panel,
.tm-withdraw-history-card {
    background: #FD6001;
    color: #000;
    font-family: 'Poppins', sans-serif;
}
.tm-task-category-button,
.tm-task-category-button:hover,
.tm-task-category-button:focus-visible,
.tm-task-category-button.active {
    border-color: #FD6001;
}
.tm-task-category-button .tm-task-category-name,
.tm-task-category-button .tm-task-category-balance b,
.tm-related-tasks-empty,
.tm-related-tasks-empty h3,
.tm-related-tasks-empty p,
.tm-related-task-card,
.tm-related-task-card h3,
.tm-withdraw-form-panel,
.tm-withdraw-summary-panel,
.tm-withdraw-history-card {
    color: #000;
}
.tm-task-category-button .tm-task-category-rate b,
.tm-related-tasks-empty-icon,
.tm-related-task-card .tm-related-task-status {
    color: #000;
}
.tm-task-category-button .tm-task-category-vip,
.tm-withdraw-submit {
    background: #000;
    color: #FD6001;
}
.tm-task-category-button .tm-task-category-balance,
.tm-task-category-button .tm-task-category-rate,
.tm-related-tasks-empty p,
.tm-related-task-card .tm-related-task-header p,
.tm-related-task-card .tm-related-task-description,
.tm-related-task-card .tm-related-task-details,
.tm-withdraw-panel-header p,
.tm-withdraw-field label,
.tm-withdraw-summary-list > div,
.tm-withdraw-summary-list strong,
.tm-withdraw-status {
    color: #000;
}
.tm-withdraw-submit:hover {
    background: #000;
    color: #FD6001;
}
.tm-withdraw-control,
.tm-withdraw-network-badge,
.tm-withdraw-summary-list,
.tm-withdraw-status {
    background: #FD6001;
    color: #000;
}
.tm-withdraw-control {
    border-color: #000;
}
.tm-withdraw-control::placeholder {
    color: rgba(0, 0, 0, .62);
}
.tm-marketplace-heading,
.tm-page[data-page="related-tasks"] .tm-marketplace-heading,
.tm-withdraw-heading,
.tm-withdraw-section-heading {
    font-family: 'Poppins', sans-serif;
}

/* Withdrawal page follows the deposit page's light card treatment. */
.tm-withdraw-page {
    --tm-withdraw-bg: var(--tm-surface);
    --tm-withdraw-panel: #fff;
    --tm-withdraw-border: var(--tm-accent);
    --tm-withdraw-muted: var(--tm-text-muted);
    color: #000;
    background: var(--tm-surface);
}
.tm-withdraw-heading h2,
.tm-withdraw-panel-header h3,
.tm-withdraw-section-heading h3 {
    color: var(--tm-primary-dark);
}
.tm-withdraw-heading p,
.tm-withdraw-panel-header p,
.tm-withdraw-section-heading span,
.tm-withdraw-history-link {
    color: var(--tm-text-muted);
}
.tm-withdraw-form-panel,
.tm-withdraw-summary-panel,
.tm-withdraw-history-card {
    border-color: var(--tm-border);
    background: #fff;
    color: #000;
    box-shadow: var(--tm-shadow-md);
}
.tm-withdraw-field label,
.tm-withdraw-page .tm-label {
    color: var(--tm-primary-dark);
}
.tm-withdraw-control,
.tm-withdraw-page .tm-input {
    border-color: var(--tm-border);
    background: #fff;
    color: #000;
}
.tm-withdraw-control:focus {
    border-color: var(--tm-accent);
    box-shadow: 0 0 0 3px var(--tm-accent-light);
}
.tm-withdraw-control::placeholder {
    color: var(--tm-text-light);
}
.tm-withdraw-submit {
    background: var(--tm-accent);
    color: #000;
}
.tm-withdraw-submit:hover {
    background: var(--tm-accent-dark);
    color: #fff;
}
.tm-withdraw-balance-block {
    background: var(--tm-accent);
    color: #000;
}
.tm-withdraw-eyebrow,
.tm-withdraw-balance-block strong,
.tm-withdraw-balance-block small {
    color: #000;
}
.tm-withdraw-network-badge {
    background: #000;
    color: var(--tm-accent);
}
.tm-withdraw-summary-list,
.tm-withdraw-status {
    background: #fff;
    color: #000;
}
.tm-withdraw-summary-list > div {
    border-color: var(--tm-divider);
    color: var(--tm-text-muted);
}
.tm-withdraw-summary-list strong {
    color: #000;
}
.tm-withdraw-summary-list .tm-withdraw-total {
    color: var(--tm-accent-dark);
}
.tm-withdraw-status {
    border-top: 1px solid var(--tm-divider);
}
.tm-withdraw-page table {
    color: var(--tm-text);
}

/* Marketplace task cards use the deposit card layout and stack vertically. */
.tm-task-category-columns {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
}
.tm-task-category-columns > section {
    width: 100%;
}
.tm-task-category-columns .tm-task-category-button {
    grid-template-columns: 96px minmax(0, 1fr) auto 18px;
    min-height: 132px;
    margin-bottom: 12px;
    border: 1px solid var(--tm-border);
    border-radius: var(--tm-radius-lg);
    background: #fff;
    color: #000;
    box-shadow: var(--tm-shadow-sm);
}
.tm-task-category-columns .tm-task-category-button:hover,
.tm-task-category-columns .tm-task-category-button:focus-visible,
.tm-task-category-columns .tm-task-category-button.active {
    border-color: var(--tm-accent);
    background: #fff;
    color: #000;
    outline: 2px solid var(--tm-accent-light);
    outline-offset: 2px;
}
.tm-task-category-columns .tm-task-category-name,
.tm-task-category-columns .tm-task-category-balance,
.tm-task-category-columns .tm-task-category-rate,
.tm-task-category-columns .tm-task-category-balance b,
.tm-task-category-columns .tm-task-category-rate b {
    color: #000;
}
.tm-task-category-columns .tm-task-category-vip {
    background: var(--tm-accent);
    color: #000;
}
.tm-task-category-columns .tm-task-category-arrow {
    color: var(--tm-accent-dark);
}
.tm-task-category-columns .tm-task-category-mark {
    background: transparent;
    color: inherit;
}
.tm-task-category-columns .tm-task-category-mark img {
    display: block;
    width: 96px;
    height: 96px;
    border-radius: 0;
    object-fit: contain;
    object-position: center;
    background: transparent;
}
@media (max-width: 1100px) {
    .tm-home-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}
@media (max-width: 600px) {
    .tm-home-stat-grid {
        grid-template-columns: 1fr !important;
    }
}
.tm-task-category-columns .tm-task-category-mark.tm-task-category-logo-amazon {
    color: #111;
    font-size: 20px;
    letter-spacing: -0.04em;
    text-transform: lowercase;
}
.tm-task-category-columns .tm-task-category-mark.tm-task-category-logo-alibaba {
    color: #ff6a00;
    font-size: 22px;
    letter-spacing: -0.05em;
}
.tm-task-category-columns .tm-task-category-mark.tm-task-category-logo-aliexpress {
    color: #ff4f1f;
    font-size: 18px;
    letter-spacing: -0.06em;
}

/* Marketplace dashboard mockup layout. */
#tm-page-marketplace {
    min-height: 100%;
    padding: clamp(24px, 4vw, 40px);
    border: 1px solid var(--tm-border);
    border-radius: var(--tm-radius-xl);
    background: #fff;
    color: var(--tm-primary-dark);
    font-family: 'Poppins', sans-serif;
}
#tm-page-marketplace .tm-marketplace-heading {
    max-width: 1100px;
    display: block;
    margin: 0 auto 18px;
    color: var(--tm-primary-dark);
}
#tm-page-marketplace .tm-marketplace-back {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin-bottom: 4px;
    border-radius: var(--tm-radius-md);
    background: var(--tm-accent);
    color: #fff;
    font-size: 28px;
}
#tm-page-marketplace .tm-marketplace-back:hover,
#tm-page-marketplace .tm-marketplace-back:focus-visible {
    background: var(--tm-accent-dark);
    color: #fff;
}
.tm-marketplace-brand-mark {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: var(--tm-radius-md);
    background: var(--tm-accent);
    color: #fff;
    font-size: var(--tm-font-size-lg);
    font-weight: var(--tm-font-weight-bold);
}
#tm-page-marketplace .tm-marketplace-heading h2 {
    margin: 4px 0 0;
    color: var(--tm-primary-dark);
    font-size: clamp(30px, 5vw, 44px);
    font-weight: var(--tm-font-weight-normal);
}
#tm-page-marketplace .tm-marketplace-brand-mark,
#tm-page-related-tasks .tm-marketplace-brand-mark {
    display: grid;
    place-items: center;
    overflow: hidden;
    background: transparent;
}
#tm-page-marketplace .tm-marketplace-brand-mark img,
#tm-page-related-tasks .tm-marketplace-brand-mark img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background: transparent;
}
#tm-page-marketplace .tm-marketplace-account-card {
    display: flex;
    align-items: center;
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto 12px;
    padding: 18px 20px;
    border: 1px solid var(--tm-border);
    border-left: 4px solid var(--tm-accent);
    border-radius: var(--tm-radius-lg);
    background: linear-gradient(120deg, #fff, var(--tm-accent-light));
    color: var(--tm-primary-dark);
    box-shadow: none;
}
#tm-page-marketplace .tm-marketplace-account-card .tm-marketplace-metric-icon {
    flex: 0 0 auto;
}
#tm-page-marketplace .tm-marketplace-account-card span:not(.tm-marketplace-metric-icon),
#tm-page-marketplace .tm-marketplace-metrics > div > span:not(.tm-marketplace-metric-icon) > span {
    display: block;
    color: var(--tm-text-muted);
    font-size: var(--tm-font-size-sm);
}
#tm-page-marketplace .tm-marketplace-account-card strong {
    display: block;
    margin-top: 3px;
    color: var(--tm-primary-dark);
    font-size: clamp(28px, 5vw, 38px);
}
.tm-marketplace-metric-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--tm-accent-light);
    color: var(--tm-accent-dark);
    font-size: 24px;
    font-weight: var(--tm-font-weight-bold);
}
#tm-page-marketplace .tm-marketplace-metrics {
    max-width: 1100px;
    margin: 0 auto 22px;
    gap: 0;
}
#tm-page-marketplace .tm-marketplace-metrics > div {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 74px;
    padding: 14px 16px;
    border: 1px solid var(--tm-border);
    border-radius: var(--tm-radius-lg);
    background: #fff;
    color: var(--tm-primary-dark);
    box-shadow: none;
}
#tm-page-marketplace .tm-marketplace-metrics > div > span:last-child {
    min-width: 0;
}
#tm-page-marketplace .tm-marketplace-metrics strong {
    display: block;
    margin-top: 3px;
    color: var(--tm-primary-dark);
    font-size: var(--tm-font-size-base);
}
#tm-page-marketplace .tm-marketplace-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(590px, 100%);
    min-height: 52px;
    margin: 8px auto 0 max(0px, calc((100% - 1100px) / 2));
    padding: 10px 18px;
    border-radius: var(--tm-radius-full);
    background: linear-gradient(90deg, var(--tm-accent), #ff873d);
    color: #fff;
    font-size: var(--tm-font-size-base);
    box-shadow: 0 8px 18px rgba(253, 96, 1, .22);
}
#tm-page-marketplace .tm-marketplace-action span {
    font-size: 26px;
}
#tm-page-marketplace .tm-marketplace-restricted-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    margin-top: 18px;
    padding: 12px 22px;
    border: 0;
    border-radius: var(--tm-radius-full);
    background: linear-gradient(90deg, var(--tm-accent), #ff873d);
    color: #fff;
    font: inherit;
    font-size: var(--tm-font-size-base);
    font-weight: var(--tm-font-weight-bold);
    line-height: 1.2;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(253, 96, 1, .22);
    transition: transform var(--tm-transition-fast), filter var(--tm-transition-fast), box-shadow var(--tm-transition-fast);
}
#tm-page-marketplace .tm-marketplace-restricted-action:hover,
#tm-page-marketplace .tm-marketplace-restricted-action:focus-visible {
    color: #fff;
    filter: brightness(1.06);
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(253, 96, 1, .3);
}
#tm-page-marketplace .tm-marketplace-restricted-action:focus-visible {
    outline: 3px solid var(--tm-accent-light);
    outline-offset: 3px;
}
@media (max-width: 640px) {
    #tm-page-marketplace {
        padding: 20px 16px 28px;
        border: 0;
        border-radius: 0;
    }
    #tm-page-marketplace .tm-marketplace-heading {
        margin-bottom: 16px;
    }
    #tm-page-marketplace .tm-marketplace-account-card {
        align-items: center;
        min-height: 98px;
    }
    #tm-page-marketplace .tm-marketplace-metrics {
        grid-template-columns: 1fr;
    }
    #tm-page-marketplace .tm-marketplace-action {
        margin-left: 0;
    }
}

/* Pixel-matched related-task empty state. */
#tm-page-related-tasks {
    min-height: 100%;
    padding: clamp(24px, 4vw, 64px) clamp(16px, 4vw, 80px);
    border: 0;
    border-radius: 0;
    background: #fff;
    color: var(--tm-primary-dark);
}
#tm-page-related-tasks .tm-marketplace-heading {
    display: flex;
    align-items: center;
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto 48px;
}
#tm-page-related-tasks .tm-marketplace-back {
    display: grid;
    place-items: center;
    align-self: center;
    width: 40px;
    height: 40px;
    margin: 0;
    border-radius: var(--tm-radius-md);
    background: var(--tm-accent);
    color: #fff;
    font-size: 30px;
}
#tm-page-related-tasks .tm-marketplace-back:hover,
#tm-page-related-tasks .tm-marketplace-back:focus-visible {
    background: var(--tm-accent-dark);
    color: #fff;
}
#tm-page-related-tasks .tm-marketplace-brand-mark {
    width: 78px;
    height: 78px;
    border-radius: 18px;
    background: transparent;
    font-size: 20px;
}
#tm-page-related-tasks .tm-marketplace-heading h2 {
    margin: 0;
    color: var(--tm-primary-dark);
    font-size: clamp(34px, 5vw, 62px);
    font-weight: var(--tm-font-weight-bold);
}
#tm-page-related-tasks .tm-related-tasks-list {
    max-width: 1100px;
    margin: 0 auto;
}
#tm-page-related-tasks .tm-related-tasks-empty {
    display: flex;
    align-items: center;
    gap: 32px;
    min-height: 380px;
    padding: 48px;
    border: 1px solid var(--tm-border);
    border-left: 5px solid var(--tm-accent);
    border-radius: 24px;
    background: linear-gradient(120deg, #fff 0%, #fff 62%, var(--tm-accent-light) 100%);
    color: var(--tm-primary-dark);
    box-shadow: var(--tm-shadow-sm);
    text-align: left;
    overflow: hidden;
}
#tm-page-related-tasks .tm-related-tasks-empty-icon {
    flex: 0 0 auto;
    width: 104px;
    height: 104px;
    border-radius: 22px;
    background: var(--tm-accent-light);
    color: var(--tm-accent-dark);
    font-size: 48px;
}
#tm-page-related-tasks .tm-related-tasks-empty-copy {
    display: grid;
    justify-items: start;
    gap: 10px;
}
#tm-page-related-tasks .tm-related-tasks-empty-label {
    color: var(--tm-text-muted);
    font-size: 20px;
}
#tm-page-related-tasks .tm-related-tasks-empty h3 {
    margin: 0;
    color: var(--tm-primary-dark);
    font-size: clamp(25px, 3vw, 38px);
}
#tm-page-related-tasks .tm-related-tasks-empty p {
    margin: 0 0 26px;
    color: var(--tm-text-muted);
    font-size: 20px;
}
#tm-page-related-tasks .tm-related-tasks-empty .tm-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    min-height: 62px;
    border-radius: 32px;
    background: linear-gradient(90deg, var(--tm-accent), #ff873d);
    color: #fff;
    font-size: 18px;
    box-shadow: 0 8px 18px rgba(253, 96, 1, .22);
}
#tm-page-related-tasks .tm-related-tasks-empty .tm-btn span {
    font-size: 32px;
    line-height: 1;
}
@media (max-width: 700px) {
    #tm-page-related-tasks {
        padding: 24px 16px 36px;
    }
    #tm-page-related-tasks .tm-marketplace-heading {
        gap: 10px;
        margin-bottom: 28px;
    }
    #tm-page-related-tasks .tm-marketplace-brand-mark {
        width: 48px;
        height: 48px;
        border-radius: 10px;
        font-size: 14px;
    }
    #tm-page-related-tasks .tm-marketplace-heading h2 {
        font-size: 30px;
    }
    #tm-page-related-tasks .tm-related-tasks-empty {
        align-items: flex-start;
        flex-direction: column;
        min-height: 0;
        padding: 28px 20px;
    }
    #tm-page-related-tasks .tm-related-tasks-empty h3 {
        font-size: 26px;
    }
    #tm-page-related-tasks .tm-related-tasks-empty p {
        font-size: 16px;
    }
}

.tm-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--tm-space-lg);
    padding-bottom: var(--tm-space-md);
    border-bottom: 1px solid var(--tm-border);
}

.tm-card-title {
    font-size: var(--tm-font-size-lg);
    font-weight: var(--tm-font-weight-semibold);
}

/* Stats Card */
.tm-stat-card {
    background: linear-gradient(135deg, var(--tm-primary) 0%, var(--tm-primary-dark) 100%);
    color: white;
    padding: var(--tm-space-lg);
    border-radius: var(--tm-radius-lg);
    box-shadow: var(--tm-shadow-md);
}

.tm-stat-label {
    font-size: var(--tm-font-size-sm);
    opacity: 0.9;
    margin-bottom: var(--tm-space-sm);
}

.tm-stat-value {
    font-size: var(--tm-font-size-2xl);
    font-weight: var(--tm-font-weight-bold);
}

.tm-stat-change {
    font-size: var(--tm-font-size-xs);
    margin-top: var(--tm-space-sm);
    opacity: 0.8;
}

/* ============================================================================
   BUTTONS
   ============================================================================ */

.tm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--tm-space-sm);
    padding: var(--tm-space-sm) var(--tm-space-lg);
    font-size: var(--tm-font-size-sm);
    font-weight: var(--tm-font-weight-medium);
    border: none;
    border-radius: var(--tm-radius-md);
    cursor: pointer;
    transition: all var(--tm-transition-fast);
    text-decoration: none;
    white-space: nowrap;
}

.tm-btn-primary {
    background-color: var(--tm-primary);
    color: white;
}

.tm-btn-primary:hover {
    background-color: var(--tm-primary-dark);
}

.tm-btn-secondary {
    background-color: var(--tm-surface);
    color: var(--tm-text);
    border: 1px solid var(--tm-border);
}

.tm-btn-secondary:hover {
    background-color: var(--tm-border);
}

.tm-btn-success {
    background-color: var(--tm-success);
    color: white;
}

.tm-btn-success:hover {
    background-color: var(--tm-secondary-dark);
}

.tm-btn-danger {
    background-color: var(--tm-danger);
    color: white;
}

.tm-btn-danger:hover {
    opacity: 0.8;
}

.tm-btn-lg {
    padding: var(--tm-space-md) var(--tm-space-xl);
    font-size: var(--tm-font-size-base);
}

.tm-btn-sm {
    padding: var(--tm-space-xs) var(--tm-space-sm);
    font-size: var(--tm-font-size-xs);
}

.tm-btn-block {
    display: flex;
    width: 100%;
}

/* ============================================================================
   FORMS
   ============================================================================ */

.tm-form-group {
    margin-bottom: var(--tm-space-lg);
}

.tm-label {
    display: block;
    font-weight: var(--tm-font-weight-medium);
    margin-bottom: var(--tm-space-sm);
    color: var(--tm-text);
}

.tm-input, .tm-textarea, .tm-select {
    width: 100%;
    padding: var(--tm-space-sm) var(--tm-space-md);
    font-size: var(--tm-font-size-base);
    border: 1px solid var(--tm-border);
    border-radius: var(--tm-radius-md);
    font-family: var(--tm-font-family);
    transition: all var(--tm-transition-fast);
}

.tm-input:focus, .tm-textarea:focus, .tm-select:focus {
    outline: none;
    border-color: var(--tm-primary);
    box-shadow: 0 0 0 3px var(--tm-primary-light);
}

.tm-textarea {
    resize: vertical;
    min-height: 100px;
}

.tm-helper-text {
    font-size: var(--tm-font-size-xs);
    color: var(--tm-text-light);
    margin-top: var(--tm-space-xs);
}

.tm-error {
    color: var(--tm-danger);
}

.tm-input.error {
    border-color: var(--tm-danger);
}

/* ============================================================================
   TABLES
   ============================================================================ */

.tm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--tm-font-size-sm);
}

.tm-table thead {
    background-color: var(--tm-surface);
    border-bottom: 2px solid var(--tm-border);
}

.tm-table th {
    padding: var(--tm-space-md);
    text-align: left;
    font-weight: var(--tm-font-weight-semibold);
    color: var(--tm-text);
}

.tm-table td {
    padding: var(--tm-space-md);
    border-bottom: 1px solid var(--tm-border);
}

.tm-table tbody tr:hover {
    background-color: var(--tm-surface);
}

/* ============================================================================
   STATUS BADGES
   ============================================================================ */

.tm-badge-status {
    display: inline-flex;
    align-items: center;
    gap: var(--tm-space-xs);
    padding: var(--tm-space-xs) var(--tm-space-md);
    border-radius: var(--tm-radius-full);
    font-size: var(--tm-font-size-xs);
    font-weight: var(--tm-font-weight-medium);
}

.tm-badge-pending {
    background-color: var(--tm-pending);
    color: white;
}

.tm-badge-approved {
    background-color: var(--tm-success);
    color: white;
}

.tm-badge-rejected {
    background-color: var(--tm-danger);
    color: white;
}

.tm-badge-completed {
    background-color: var(--tm-success);
    color: white;
}

.tm-badge-published {
    background-color: var(--tm-primary);
    color: white;
}

/* ============================================================================
   MODAL & DIALOGS
   ============================================================================ */

.tm-modal-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: var(--tm-z-modal-backdrop);
}

.tm-modal-backdrop.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.tm-modal {
    position: fixed;
    top: 0;
    left: 280px;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 20px;
    z-index: var(--tm-z-modal);
}

.tm-modal-content {
    background-color: var(--tm-card);
    border-radius: 18px;
    box-shadow: var(--tm-shadow-xl);
    width: min(760px, calc(100vw - 280px - 48px));
    max-height: 90vh;
    overflow: auto;
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.tm-modal-header {
    padding: 16px 20px 12px;
    border-bottom: 1px solid var(--tm-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(248, 250, 252, 0.8);
}

.tm-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.tm-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
}

.tm-modal-body {
    padding: 18px 20px 20px;
    overflow-y: auto;
    background: #fff;
}

.tm-modal-footer {
    padding: var(--tm-space-lg);
    border-top: 1px solid var(--tm-border);
    display: flex;
    gap: var(--tm-space-md);
    justify-content: flex-end;
}

.tm-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
}

.tm-form-grid .tm-form-group.full-width,
.tm-form-grid .tm-form-group.full {
    grid-column: 1 / -1;
}

.tm-form-grid .tm-form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
    min-width: 0;
}

.tm-form-grid .tm-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.tm-form-grid .tm-input,
.tm-form-grid .tm-textarea,
.tm-form-grid .tm-select {
    width: 100%;
    min-height: 42px;
    box-sizing: border-box;
    background: #f8fafc;
    border-color: #dbe2ea;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.95rem;
}

.tm-form-grid .tm-textarea {
    min-height: 90px;
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

/* Tablet (768px and up) */
@media (max-width: 1024px) {
    .tm-sidebar {
        width: 240px;
    }

    .tm-main-container {
        margin-left: 240px;
    }
}

/* Mobile (up to 768px) */
@media (max-width: 768px) {
    .tm-app {
        flex-direction: column;
    }

    .tm-sidebar {
        width: 100%;
        height: auto;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        border-right: none;
        border-top: 1px solid var(--tm-border);
        display: none;
        z-index: var(--tm-z-sticky);
    }

    .tm-sidebar.show {
        display: flex;
    }

    .tm-main-container {
        margin-left: 0;
        margin-bottom: 70px;
    }

    .tm-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 56px;
        z-index: var(--tm-z-sticky);
    }

    .tm-content {
        padding: 70px var(--tm-space-md) 70px;
        margin-top: 0;
    }

    /* Mobile Bottom Navigation */
    .tm-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 70px;
        background-color: var(--tm-card);
        border-top: 1px solid var(--tm-border);
        display: flex;
        justify-content: space-around;
        z-index: var(--tm-z-sticky);
    }

    .tm-nav-item-mobile {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: var(--tm-space-xs);
        flex: 1;
        cursor: pointer;
        padding: var(--tm-space-sm);
        color: var(--tm-text-muted);
        font-size: var(--tm-font-size-xs);
        text-decoration: none;
        transition: all var(--tm-transition-fast);
    }

    .tm-nav-item-mobile.active {
        color: var(--tm-primary);
        font-weight: var(--tm-font-weight-semibold);
    }

    .tm-nav-item-mobile icon {
        width: 24px;
        height: 24px;
    }

    /* Cards in mobile */
    .tm-card {
        margin-bottom: var(--tm-space-md);
    }

    /* Modal adjustments */
    .tm-modal {
        width: 95%;
        max-height: 80vh;
    }

    /* Forms */
    .tm-label {
        font-size: var(--tm-font-size-sm);
    }

    /* Tables */
    .tm-table {
        font-size: var(--tm-font-size-xs);
    }

    .tm-table th, .tm-table td {
        padding: var(--tm-space-sm);
    }
}

/* Extra small mobile (up to 375px) */
@media (max-width: 375px) {
    .tm-header {
        padding: var(--tm-space-md);
        height: 56px;
    }

    .tm-header-title {
        font-size: var(--tm-font-size-base);
    }

    .tm-content {
        padding: 56px var(--tm-space-sm) 70px;
    }

    .tm-card {
        padding: var(--tm-space-md);
    }

    .tm-stat-card {
        padding: var(--tm-space-md);
    }

    .tm-stat-value {
        font-size: var(--tm-font-size-lg);
    }

    .tm-modal {
        width: 100%;
        border-radius: 0;
        max-height: 100vh;
    }
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

.tm-hidden {
    display: none !important;
}

.tm-invisible {
    visibility: hidden;
}

.tm-text-center {
    text-align: center;
}

.tm-text-muted {
    color: var(--tm-text-muted);
}

.tm-flex {
    display: flex;
}

.tm-flex-col {
    flex-direction: column;
}

.tm-gap-md {
    gap: var(--tm-space-md);
}

.tm-mt-md {
    margin-top: var(--tm-space-md);
}

.tm-mb-md {
    margin-bottom: var(--tm-space-md);
}

.tm-p-lg {
    padding: var(--tm-space-lg);
}

.tm-rounded {
    border-radius: var(--tm-radius-md);
}

.tm-cursor-pointer {
    cursor: pointer;
}

.tm-no-wrap {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
