/* ============================================================
   Tap4Dollar - Main Stylesheet
   Mobile-first, modern design inspired by Offenero
   ============================================================ */

:root {
    --primary: #3ecf8e;
    --primary-dark: #2db377;
    --primary-light: #e8f8f2;
    --primary-bg: #d4f5e9;
    --text-dark: #1a1a2e;
    --text-gray: #6b7280;
    --text-light: #9ca3af;
    --bg-main: #f3f4f6;
    --bg-white: #ffffff;
    --bg-sidebar: #ffffff;
    --border: #e5e7eb;
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.04);
    --sidebar-width: 230px;
    --header-height: 60px;
    --radius: 12px;
    --radius-sm: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-main);
    color: var(--text-dark);
    font-size: 14px;
    line-height: 1.5;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ============================================================
   LAYOUT
   ============================================================ */
.layout {
    display: flex;
    min-height: 100vh;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-white);
    border-right: 1px solid var(--border);
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.sidebar-logo {
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border);
    font-size: 20px;
    font-weight: 800;
    color: var(--text-dark);
}

.sidebar-logo .logo-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: 900;
    flex-shrink: 0;
}

.sidebar-nav { padding: 12px 0; flex: 1; }

.nav-section-label {
    padding: 10px 20px 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-light);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: var(--text-gray);
    font-weight: 500;
    font-size: 13.5px;
    transition: all 0.15s;
    position: relative;
}

.nav-item:hover { background: var(--bg-main); color: var(--text-dark); }

.nav-item.active {
    background: var(--primary);
    color: white;
    border-radius: 0;
    margin: 0;
}

.nav-item .nav-icon { width: 18px; height: 18px; flex-shrink: 0; }

.nav-badge {
    margin-left: auto;
    background: var(--primary);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
}

.nav-item.active .nav-badge {
    background: rgba(255,255,255,0.3);
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    padding: 6px;
    border-radius: 8px;
    color: var(--text-gray);
    cursor: pointer;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
}

.balance-display {
    font-weight: 700;
    font-size: 16px;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 6px;
}

.avatar-btn {
    position: relative;
    cursor: pointer;
}

.avatar-btn img {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 2px solid var(--primary-light);
    display: block;
    background: var(--primary-light);
}

.avatar-dropdown {
    display: none;
    position: absolute;
    right: 0; top: calc(100% + 10px);
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    min-width: 160px;
    overflow: hidden;
    z-index: 200;
}

.avatar-dropdown.show { display: block; }

.avatar-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--text-gray);
    font-size: 13.5px;
    font-weight: 500;
    transition: background 0.15s;
}

.avatar-dropdown a:hover { background: var(--bg-main); color: var(--text-dark); }
.avatar-dropdown a.logout { color: #ef4444; }

/* ============================================================
   PAGE CONTENT
   ============================================================ */
.page-content {
    padding: 24px;
    flex: 1;
}

/* ============================================================
   CARDS & STATS
   ============================================================ */
.card {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-card.wide {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.stat-icon {
    width: 44px; height: 44px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--primary);
    font-size: 20px;
    flex-shrink: 0;
}

.stat-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.2;
}

.stat-label {
    font-size: 12px;
    color: var(--text-gray);
    font-weight: 500;
}

/* 2-col stat grid on home */
.stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.stat-row-item {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px 24px;
}

.stat-row-item .stat-inner {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* ============================================================
   HOME STATISTICS BAR
   ============================================================ */
.home-stats {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.home-stat-item {
    display: flex;
    align-items: center;
    gap: 14px;
}

.home-stat-item .stat-icon { flex-shrink: 0; }
.home-stat-item .stat-value { font-size: 20px; }

/* ============================================================
   UNLOCK CASHOUT BANNER
   ============================================================ */
.unlock-banner {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.unlock-banner .lock-icon {
    width: 44px; height: 44px;
    color: var(--primary);
    font-size: 28px;
    flex-shrink: 0;
}

.unlock-banner h3 { font-size: 16px; font-weight: 700; margin-bottom: 2px; }
.unlock-banner p { font-size: 13px; color: var(--text-gray); }

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
}

/* ============================================================
   TABS
   ============================================================ */
.tabs {
    display: flex;
    border-bottom: 2px solid var(--border);
    margin-bottom: 20px;
    gap: 0;
}

.tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-gray);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s;
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-btn:hover { color: var(--text-dark); }

/* ============================================================
   ALERTS / INFO BOXES
   ============================================================ */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 20px;
}

.alert-info {
    background: var(--primary-light);
    color: var(--primary-dark);
    border: 1px solid var(--primary-bg);
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
}

.alert-danger {
    background: #fff0f0;
    color: #dc3545;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background: var(--primary-light);
    color: var(--primary-dark);
    border: 1px solid var(--primary-bg);
}

/* ============================================================
   OFFER / SURVEY ITEMS
   ============================================================ */
.offer-list { display: flex; flex-direction: column; gap: 12px; }

.offer-item {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: box-shadow 0.15s;
}

.offer-item:hover { box-shadow: var(--shadow-md); }

.offer-icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    flex-shrink: 0;
    background: var(--primary-light);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}

.offer-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }

.offer-info { flex: 1; min-width: 0; }
.offer-title { font-weight: 600; font-size: 14px; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.offer-desc { font-size: 12px; color: var(--text-gray); }

.earn-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s;
    line-height: 1.2;
    text-align: center;
}

.earn-btn:hover { background: var(--primary-dark); }

/* ============================================================
   SOCIAL POSTS - Platform Cards
   ============================================================ */
.social-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.social-card {
    border-radius: var(--radius);
    padding: 32px 16px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    text-decoration: none;
    color: white;
}

.social-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.social-card .platform-icon { font-size: 36px; }
.social-card .platform-name { font-size: 15px; font-weight: 700; }
.social-card .platform-earn { background: var(--primary); color: white; font-size: 12px; font-weight: 700; padding: 3px 12px; border-radius: 20px; }

.social-instagram { background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.social-facebook { background: #1877f2; }
.social-tiktok { background: #000000; }
.social-youtube { background: #ff0000; }
.social-snapchat { background: #fffc00; color: #000; }
.social-snapchat .platform-earn { background: #333; }
.social-twitter { background: #1da1f2; }

/* ============================================================
   SOCIAL POST WIZARD
   ============================================================ */
.wizard-steps {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 28px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.wizard-step {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.step-num {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--border);
    color: var(--text-gray);
    font-size: 12px;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.step-num.active { background: var(--primary); color: white; }
.step-num.done { background: var(--primary-light); color: var(--primary); }

.step-label { font-size: 12px; color: var(--text-gray); }
.step-label .step-title { font-weight: 600; color: var(--text-dark); font-size: 13px; }
.step-label .step-title.active { color: var(--primary); }

.step-arrow { color: var(--text-light); margin: 0 8px; font-size: 12px; }

/* ============================================================
   LEADERBOARD
   ============================================================ */
.podium-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.podium-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px 16px;
    text-align: center;
}

.podium-rank {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 20px;
    font-weight: 900;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 10px;
}

.podium-rank.rank-1 { background: linear-gradient(135deg, #f6d365, #fda085); color: white; font-size: 22px; }
.podium-rank.rank-2 { background: linear-gradient(135deg, #a8c0ff, #3f2b96); color: white; }
.podium-rank.rank-3 { background: linear-gradient(135deg, #fd7043, #e64a19); color: white; }

.podium-username { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.podium-earnings { color: var(--primary); font-weight: 700; font-size: 13px; margin-bottom: 8px; }
.podium-bonus-badge { background: var(--primary); color: white; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 20px; display: inline-block; }

/* ============================================================
   TABLES
   ============================================================ */
.table-wrapper {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 24px;
}

.data-table { width: 100%; border-collapse: collapse; }
.data-table thead tr { background: #374151; }
.data-table thead th {
    padding: 14px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #e5e7eb;
}

.data-table tbody tr { border-bottom: 1px solid var(--border); transition: background 0.1s; }
.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover { background: #f9fafb; }

.data-table tbody td {
    padding: 14px 16px;
    font-size: 13.5px;
    color: var(--text-dark);
}

.user-cell { display: flex; align-items: center; gap: 10px; }
.user-cell img { width: 34px; height: 34px; border-radius: 50%; background: var(--primary-light); }
.user-cell .uname { color: var(--primary); font-weight: 600; }

.earnings-cell { color: var(--primary); font-weight: 700; }

.bonus-badge {
    background: var(--primary);
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-block;
}

.table-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-gray);
}

.pagination { display: flex; gap: 4px; }
.page-btn {
    width: 30px; height: 30px;
    border: 1px solid var(--border);
    background: var(--bg-white);
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px;
    cursor: pointer;
    color: var(--text-gray);
}

.page-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

/* ============================================================
   BONUS CARDS
   ============================================================ */
.bonus-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.bonus-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.bonus-reward-badge {
    position: absolute;
    top: 12px; right: 12px;
    background: var(--primary);
    color: white;
    font-size: 12px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 6px;
}

.bonus-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; padding-right: 60px; }
.bonus-progress-text { font-size: 12px; color: var(--text-gray); margin-bottom: 10px; }

.progress-bar {
    height: 6px;
    background: var(--primary-light);
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 14px;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 99px;
    transition: width 0.3s;
}

.bonus-actions { display: flex; gap: 8px; }

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-primary:hover { background: var(--primary-dark); }

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
    border-radius: var(--radius-sm);
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
}

.btn-outline:hover { background: var(--primary); color: white; }

/* Tooltip */
.tooltip-wrapper { position: relative; display: inline-block; }
.tooltip-box {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    background: #374151;
    color: white;
    font-size: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    width: 200px;
    z-index: 50;
    line-height: 1.4;
}

.tooltip-wrapper:hover .tooltip-box { display: block; }

/* ============================================================
   CASHOUT PAGE
   ============================================================ */
.cashout-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.method-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px 20px;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.15s;
}

.method-card:hover, .method-card.selected {
    border-color: var(--primary);
    background: var(--primary-light);
}

.method-card .method-icon { font-size: 32px; margin-bottom: 8px; }
.method-card .method-name { font-size: 14px; font-weight: 700; }
.method-card .method-min { font-size: 12px; color: var(--text-gray); margin-top: 4px; }

/* ============================================================
   HELP PAGE
   ============================================================ */
.help-hero {
    background: var(--primary-light);
    border-radius: var(--radius);
    padding: 40px 24px;
    text-align: center;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.help-hero h1 { font-size: 24px; font-weight: 800; color: var(--primary-dark); margin-bottom: 6px; }
.help-hero p { color: var(--text-gray); font-size: 14px; }

.help-layout { display: grid; grid-template-columns: 220px 1fr; gap: 20px; }

.help-sidebar .help-cat {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-gray);
    transition: all 0.15s;
}

.help-sidebar .help-cat:hover { background: var(--bg-main); color: var(--text-dark); }
.help-sidebar .help-cat.active { background: var(--primary); color: white; }

.accordion-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    overflow: hidden;
}

.accordion-head {
    padding: 16px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 600;
    background: var(--bg-white);
    transition: background 0.15s;
    user-select: none;
}

.accordion-head:hover { background: var(--bg-main); }
.accordion-head .chevron { transition: transform 0.2s; color: var(--text-gray); }
.accordion-head.open .chevron { transform: rotate(180deg); }

.accordion-body {
    display: none;
    padding: 16px 20px;
    font-size: 13.5px;
    color: var(--text-gray);
    background: var(--bg-white);
    border-top: 1px solid var(--border);
    line-height: 1.7;
}

.accordion-body.open { display: block; }

/* ============================================================
   SETTINGS
   ============================================================ */
.settings-layout { display: grid; grid-template-columns: 200px 1fr; gap: 20px; }

.settings-nav .s-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-gray);
    transition: all 0.15s;
    margin-bottom: 4px;
}

.settings-nav .s-nav-item:hover { background: var(--bg-main); color: var(--text-dark); }
.settings-nav .s-nav-item.active { background: var(--primary); color: white; }

.settings-panel { display: none; }
.settings-panel.active { display: block; }

.settings-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px;
}

.avatar-picker {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.avatar-picker img {
    width: 64px; height: 64px;
    border-radius: 50%;
    border: 3px solid var(--primary-light);
    background: var(--primary-light);
}

.avatar-refresh-btn {
    width: 36px; height: 36px;
    background: var(--primary-light);
    border: none;
    border-radius: 50%;
    color: var(--primary);
    font-size: 16px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
}

.avatar-refresh-btn:hover { background: var(--primary); color: white; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 13px; font-weight: 600; color: var(--text-dark); }
.form-group input, .form-group select {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 14px;
    color: var(--text-dark);
    background: var(--bg-white);
    transition: border-color 0.15s;
    outline: none;
    width: 100%;
}

.form-group input:focus, .form-group select:focus { border-color: var(--primary); }

.input-eye { position: relative; }
.input-eye input { padding-right: 40px; }
.eye-toggle {
    position: absolute;
    right: 12px; top: 50%;
    transform: translateY(-50%);
    background: none; border: none;
    color: var(--text-gray);
    cursor: pointer;
    font-size: 16px;
}

.form-actions { display: flex; gap: 10px; }

.btn-cancel {
    background: transparent;
    color: var(--text-gray);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-cancel:hover { border-color: var(--text-gray); color: var(--text-dark); }

/* ============================================================
   MEMBERS CHAT
   ============================================================ */
.chat-container {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    height: calc(100vh - 160px);
    min-height: 400px;
}

.chat-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 15px;
}

.online-dot {
    width: 10px; height: 10px;
    background: var(--primary);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chat-msg { display: flex; align-items: flex-start; gap: 10px; }
.chat-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--primary-light); flex-shrink: 0; }

.chat-bubble-wrap {}
.chat-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.bot-badge {
    background: var(--primary);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 20px;
}

.chat-bubble {
    background: #f3f4f6;
    border-radius: 0 12px 12px 12px;
    padding: 10px 14px;
    font-size: 13.5px;
    color: var(--text-dark);
    max-width: 340px;
    line-height: 1.5;
}

.chat-bubble.hidden-msg {
    background: #f3f4f6;
    color: var(--text-light);
    font-style: italic;
}

.chat-input-bar {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
}

.chat-input {
    flex: 1;
    border: 1.5px solid var(--border);
    border-radius: 99px;
    padding: 10px 18px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s;
}

.chat-input:focus { border-color: var(--primary); }

.chat-send-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 99px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.chat-send-btn:hover { background: var(--primary-dark); }

/* ============================================================
   LIVE FEED
   ============================================================ */
.live-feed-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.live-feed-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 15px;
}

.live-feed-header svg { color: var(--primary); }

.live-feed-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    gap: 12px;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}

.live-feed-item:last-child { border-bottom: none; }
.live-feed-item:hover { background: var(--bg-main); }

.feed-avatar { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; }

.feed-info { flex: 1; }
.feed-name { font-weight: 700; font-size: 13px; }
.feed-type { font-size: 12px; color: var(--text-gray); }

.feed-amount { font-weight: 800; color: var(--primary); font-size: 13px; }

/* ============================================================
   NOTIFICATION TOAST
   ============================================================ */
.toast-container {
    position: fixed;
    top: 20px; right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    padding: 14px 18px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 280px;
    max-width: 360px;
    animation: slideIn 0.3s ease;
    border-left: 4px solid var(--primary);
}

.toast.payment { border-left-color: #3b82f6; }

@keyframes slideIn { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.toast-icon { font-size: 20px; flex-shrink: 0; color: var(--primary); }
.toast-icon.payment { color: #3b82f6; }
.toast-title { font-weight: 700; font-size: 13px; margin-bottom: 2px; color: var(--primary); }
.toast-title.payment { color: #3b82f6; }
.toast-body { font-size: 12px; color: var(--text-gray); }
.toast-close { margin-left: auto; background: none; border: none; color: var(--text-light); cursor: pointer; font-size: 16px; line-height: 1; padding: 0; }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 500;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.show { display: flex; }

.modal {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 480px;
    padding: 28px;
    position: relative;
    animation: modalIn 0.25s ease;
}

@keyframes modalIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.modal-close {
    position: absolute; top: 16px; right: 16px;
    background: none; border: none;
    font-size: 22px; color: var(--text-gray);
    cursor: pointer; line-height: 1;
}

.modal-offer-img {
    width: 80px; height: 80px;
    border-radius: 16px;
    margin: 0 auto 16px;
    display: block;
    background: var(--primary-light);
}

.modal-title { font-size: 16px; font-weight: 700; color: var(--primary); text-align: center; margin-bottom: 16px; }

.modal-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 16px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
    text-align: center;
}

.meta-label { font-size: 12px; color: var(--text-gray); margin-bottom: 6px; }
.meta-value { font-weight: 700; }
.meta-value .reward-badge { background: var(--primary); color: white; padding: 4px 14px; border-radius: 6px; font-size: 15px; display: inline-block; }
.meta-value .time-val { font-size: 16px; color: var(--text-dark); }

.modal-instructions { font-size: 13px; color: var(--text-gray); margin-bottom: 6px; font-weight: 600; }
.modal-instructions-text { font-size: 13px; color: var(--text-gray); margin-bottom: 10px; }
.modal-note { font-size: 12px; color: var(--text-light); text-align: center; margin-bottom: 20px; }

.btn-start-earn {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-start-earn:hover { background: var(--primary-dark); }

/* ============================================================
   REWARDS PAGE
   ============================================================ */
.rewards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.reward-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px 16px;
    text-align: center;
    transition: box-shadow 0.15s;
}

.reward-card:hover { box-shadow: var(--shadow-md); }
.reward-card .reward-icon { font-size: 40px; margin-bottom: 10px; }
.reward-card .reward-name { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.reward-card .reward-value { color: var(--primary); font-weight: 800; font-size: 18px; margin-bottom: 12px; }
.reward-card .reward-desc { font-size: 12px; color: var(--text-gray); margin-bottom: 16px; }

/* ============================================================
   INVITE PAGE COPY FIELD
   ============================================================ */
.copy-field {
    display: flex;
    gap: 0;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 16px;
}

.copy-field input {
    flex: 1;
    border: none;
    padding: 12px 16px;
    font-size: 13.5px;
    color: var(--text-gray);
    background: var(--bg-main);
    outline: none;
}

.copy-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}

.copy-btn:hover { background: var(--primary-dark); }

/* ============================================================
   TIMER BADGE
   ============================================================ */
.timer-badge {
    background: var(--primary-light);
    color: var(--primary-dark);
    border: 1px solid var(--primary-bg);
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-weight: 600;
}

/* ============================================================
   FOOTER
   ============================================================ */
.page-footer {
    padding: 20px 24px;
    text-align: center;
    font-size: 12px;
    color: var(--text-light);
    border-top: 1px solid var(--border);
}

.page-footer a { color: var(--primary); }

/* ============================================================
   SCROLL TO TOP
   ============================================================ */
.scroll-top {
    position: fixed;
    bottom: 24px; right: 24px;
    width: 40px; height: 40px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    border: none;
    font-size: 18px;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    z-index: 100;
}

.scroll-top.show { display: flex; }
.scroll-top:hover { background: var(--primary-dark); }

/* ============================================================
   AUTH PAGES (Login/Register)
   ============================================================ */
.auth-page {
    min-height: 100vh;
    background: var(--bg-main);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 36px 32px;
    width: 100%;
    max-width: 420px;
}

.auth-logo {
    text-align: center;
    margin-bottom: 28px;
}

.auth-logo .logo-icon {
    width: 52px; height: 52px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white;
    font-size: 26px;
    font-weight: 900;
    margin: 0 auto 12px;
}

.auth-logo h1 { font-size: 22px; font-weight: 800; }
.auth-logo p { color: var(--text-gray); font-size: 13px; }

.auth-form .form-group { margin-bottom: 16px; }

.auth-switch {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-gray);
}

.auth-switch a { color: var(--primary); font-weight: 600; }

.btn-full { width: 100%; }

/* ============================================================
   MOBILE RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay {
        display: none;
        position: fixed; inset: 0;
        background: rgba(0,0,0,0.4);
        z-index: 99;
    }

    .sidebar-overlay.show { display: block; }

    .main-content { margin-left: 0; }
    .hamburger { display: flex; }

    .page-content { padding: 16px; }

    .home-stats { grid-template-columns: 1fr 1fr; }
    .stats-row { grid-template-columns: 1fr; }

    .social-grid { grid-template-columns: repeat(2, 1fr); }
    .podium-grid { grid-template-columns: repeat(3, 1fr); }
    .bonus-grid { grid-template-columns: 1fr; }
    .help-layout { grid-template-columns: 1fr; }
    .settings-layout { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .cashout-methods { grid-template-columns: repeat(2, 1fr); }

    .data-table { font-size: 12px; }
    .data-table thead th, .data-table tbody td { padding: 10px 12px; }

    .modal { padding: 20px; }
    .wizard-steps { flex-wrap: nowrap; }
}

@media (max-width: 480px) {
    .home-stats { grid-template-columns: 1fr 1fr; gap: 12px; }
    .social-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .podium-grid { gap: 8px; }
    .auth-card { padding: 24px 20px; }
}
