/* QuickGigs — Tasker mode: different layout, same purple brand */

/* ══════════════════════════════════════════════════════
   TASKER — same palette, slightly deeper bg
   ══════════════════════════════════════════════════════ */
/* Dark tasker tokens — never apply when light theme is active (html.light / body.light) */
html[data-qg-mode="worker"]:not(.light),
body.qg-mode-worker:not(.light) {
  --bg: #0e061c;
  --surface: rgba(255, 255, 255, 0.05);
  --surface-hover: rgba(107, 63, 160, 0.14);
  --border: rgba(200, 168, 233, 0.16);
  --border-hover: #c8a8e9;
  --text: #fff;
  --text-muted: rgba(255, 255, 255, 0.68);
  --text-faint: rgba(255, 255, 255, 0.62);
  --nav-bg: #120828;
  --tab-bg: #120828;
  --card-bg: rgba(255, 255, 255, 0.05);
  --input-bg: rgba(255, 255, 255, 0.07);
  --purple-light: #c8a8e9;
  --lavender: #c8a8e9;
  --purple: #9b6fc4;
  --role-accent: #c8a8e9;
  --role-accent-soft: rgba(107, 63, 160, 0.22);
}

html.light[data-qg-mode="worker"],
html[data-qg-mode="worker"] body.light,
body.light.qg-mode-worker {
  --bg: #f8f6ff;
  --surface: #fff;
  --surface-hover: #f5f2ff;
  --border: #e8e2ff;
  --border-hover: #9b6fc4;
  --text: #2d1b4e;
  --text-muted: #6b6580;
  --text-faint: #6b6580;
  --nav-bg: #fff;
  --tab-bg: #fff;
  --card-bg: #fff;
  --input-bg: #f0eeff;
  --purple-light: #6b3fa0;
  --lavender: #6b3fa0;
  --purple: #6b3fa0;
}

/* ══════════════════════════════════════════════════════
   NAV — tasker layout tweaks (brand header is in qg-brand.css)
   ══════════════════════════════════════════════════════ */
html[data-qg-mode="worker"] .nav,
body.qg-mode-worker .nav {
  padding-top: 14px;
  padding-bottom: 14px;
}

html[data-qg-mode="worker"] .nav-title,
body.qg-mode-worker .nav-title {
  font-weight: 600;
  letter-spacing: -0.01em;
}

html[data-qg-mode="worker"] .avatar,
body.qg-mode-worker .avatar {
  background: linear-gradient(135deg, #6b3fa0, #c8a8e9);
  box-shadow: 0 0 0 2px rgba(200, 168, 233, 0.35);
}

html[data-qg-mode="worker"] .mode-btn,
body.qg-mode-worker .mode-btn {
  background: rgba(107, 63, 160, 0.2);
  color: var(--lavender);
  border-radius: 999px;
}

body.light.qg-mode-worker .mode-btn {
  background: #f0eeff;
  color: var(--purple);
}

/* ══════════════════════════════════════════════════════
   BOTTOM TAB BAR — tasker: floating pill nav
   ══════════════════════════════════════════════════════ */
html[data-qg-mode="worker"] .tab-bar,
body.qg-mode-worker .tab-bar {
  background: var(--tab-bg);
  border-top: none;
  margin: 0 12px 10px;
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(200, 168, 233, 0.2);
  padding: 6px 6px 10px;
  left: 0;
  right: 0;
  width: auto;
}

body.light.qg-mode-worker .tab-bar {
  box-shadow: 0 4px 20px rgba(107, 63, 160, 0.12), 0 0 0 1px #e8e2ff;
}

html[data-qg-mode="worker"] .tab-item,
body.qg-mode-worker .tab-item {
  border-radius: 14px;
  padding: 4px 0;
  transition: background 0.15s;
}

html[data-qg-mode="worker"] .tab-item.active,
body.qg-mode-worker .tab-item.active {
  background: rgba(107, 63, 160, 0.28);
}

body.light.qg-mode-worker .tab-item.active {
  background: #ede9ff;
}

html[data-qg-mode="worker"] .tab-item.active .tab-icon,
html[data-qg-mode="worker"] .tab-item.active .tab-lbl,
body.qg-mode-worker .tab-item.active .tab-icon,
body.qg-mode-worker .tab-item.active .tab-lbl {
  color: var(--lavender);
}

body.light.qg-mode-worker .tab-item.active .tab-icon,
body.light.qg-mode-worker .tab-item.active .tab-lbl {
  color: var(--purple);
}

/* ══════════════════════════════════════════════════════
   DASHBOARD — layout differs; colours stay purple
   Stats: 2×2 on mobile (no horizontal swipe), 4-up on wide.
   Applies to poster + tasker (iOS Safari + Android Chrome).
   ══════════════════════════════════════════════════════ */
html[data-qg-mode="poster"] .stats,
body.qg-mode-poster .stats,
html[data-qg-mode="worker"] .stats,
body.qg-mode-worker .stats,
#statsGrid.stats {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 10px;
  overflow-x: visible !important;
  overflow-y: visible !important;
  flex-wrap: unset !important;
  padding-bottom: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  -webkit-overflow-scrolling: auto;
}

@media (min-width: 720px) {
  html[data-qg-mode="poster"] .stats,
  body.qg-mode-poster .stats,
  html[data-qg-mode="worker"] .stats,
  body.qg-mode-worker .stats,
  #statsGrid.stats {
    grid-template-columns: repeat(4, 1fr) !important;
  }
}

/* Tasker cards keep purple tint — grid cells only (never pill min-width scroll). */
html[data-qg-mode="worker"] .stat-card,
body.qg-mode-worker .stat-card,
#statsGrid .stat-card {
  min-width: 0 !important;
  max-width: 100%;
  flex: unset !important;
  width: auto !important;
  box-sizing: border-box;
}

html[data-qg-mode="worker"] .stat-card,
body.qg-mode-worker .stat-card {
  text-align: center;
  border-radius: 16px;
  padding: 12px 12px;
  border: 1px solid rgba(200, 168, 233, 0.25);
  background: rgba(107, 63, 160, 0.12);
}

html[data-qg-mode="worker"] .stats::-webkit-scrollbar,
body.qg-mode-worker .stats::-webkit-scrollbar { display: none; }

html[data-qg-mode="worker"] .stat-icon,
body.qg-mode-worker .stat-icon { font-size: 16px; margin-bottom: 2px; }

html[data-qg-mode="worker"] .stat-val,
body.qg-mode-worker .stat-val { font-size: 18px; word-break: break-word; }

html[data-qg-mode="worker"] .stat-lbl,
body.qg-mode-worker .stat-lbl { font-size: 9px; text-transform: uppercase; letter-spacing: 0.06em; }

html[data-qg-mode="worker"] .stat-val.purple,
body.qg-mode-worker .stat-val.purple { color: var(--lavender); }

body.light.qg-mode-worker .stat-val.purple { color: var(--purple); }

/* Tasker action cards: stacked full-width pill buttons */
html[data-qg-mode="worker"] .actions,
body.qg-mode-worker .actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

html[data-qg-mode="worker"] .action-card,
body.qg-mode-worker .action-card {
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
}

html[data-qg-mode="worker"] .action-card .action-icon,
body.qg-mode-worker .action-card .action-icon {
  margin-bottom: 0;
  font-size: 24px;
  flex-shrink: 0;
}

html[data-qg-mode="worker"] .action-card .action-title,
body.qg-mode-worker .action-card .action-title { margin-bottom: 0; font-size: 14px; }

html[data-qg-mode="worker"] .action-card .action-desc,
body.qg-mode-worker .action-card .action-desc { display: none; }

html[data-qg-mode="worker"] .action-card.primary,
body.qg-mode-worker .action-card.primary {
  background: linear-gradient(135deg, #6b3fa0, #9b6fc4);
  box-shadow: 0 4px 16px rgba(107, 63, 160, 0.35);
}

html[data-qg-mode="worker"] .action-card.secondary,
body.qg-mode-worker .action-card.secondary {
  background: transparent;
  border: 1.5px solid rgba(200, 168, 233, 0.35);
}

html[data-qg-mode="worker"] .action-card[style*="grid-column"],
body.qg-mode-worker .action-card[style*="grid-column"] {
  grid-column: unset !important;
  margin-top: 0 !important;
}

/* Tasker feed: card blocks instead of divider rows */
html[data-qg-mode="worker"] .task-row,
body.qg-mode-worker .task-row {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 10px;
}

html[data-qg-mode="worker"] .task-row + .task-row,
body.qg-mode-worker .task-row + .task-row {
  border-top: none;
}

html[data-qg-mode="worker"] .task-dot,
body.qg-mode-worker .task-dot {
  border-radius: 50%;
  background: rgba(107, 63, 160, 0.22) !important;
}

html[data-qg-mode="worker"] .see-all,
body.qg-mode-worker .see-all { color: var(--lavender); font-weight: 500; }

body.light.qg-mode-worker .see-all { color: var(--purple); }

html[data-qg-mode="worker"] .empty-btn,
body.qg-mode-worker .empty-btn {
  background: linear-gradient(135deg, #6b3fa0, #9b6fc4);
  border-radius: 999px;
  padding: 12px 28px;
}

html[data-qg-mode="worker"] .empty,
body.qg-mode-worker .empty {
  border-radius: 20px;
  border-color: rgba(200, 168, 233, 0.25);
  background: rgba(107, 63, 160, 0.08);
}

/* Mode switcher — tasker active state (purple) */
html[data-qg-mode="worker"] .mode-switch-opt.active-worker,
body.qg-mode-worker .mode-switch-opt.active-worker {
  border-color: var(--purple-light);
  background: rgba(107, 63, 160, 0.2);
  box-shadow: 0 0 0 1px rgba(155, 111, 196, 0.3);
}

body.light.qg-mode-worker .mode-switch-opt.active-worker {
  background: #ede9ff;
}

/* ══════════════════════════════════════════════════════
   MY TASKS / BROWSE / MESSAGES — tasker layout skin
   ══════════════════════════════════════════════════════ */
html[data-qg-mode="worker"] .tab-btn.active,
body.qg-mode-worker .tab-btn.active {
  color: var(--lavender);
  border-bottom-color: var(--lavender);
}

body.light.qg-mode-worker .tab-btn.active {
  color: var(--purple);
  border-bottom-color: var(--purple);
}

html[data-qg-mode="worker"] .task-card,
body.qg-mode-worker .task-card {
  border-radius: 18px;
  border: 1px solid rgba(200, 168, 233, 0.2);
  border-left: none;
  background: rgba(107, 63, 160, 0.08);
}

html[data-qg-mode="worker"] .btn-primary,
html[data-qg-mode="worker"] .accept-btn,
html[data-qg-mode="worker"] .empty-btn,
body.qg-mode-worker .btn-primary,
body.qg-mode-worker .accept-btn,
body.qg-mode-worker .empty-btn {
  background: linear-gradient(135deg, #6b3fa0, #9b6fc4);
  border-radius: 999px;
}

html[data-qg-mode="worker"] .tc-applicants,
html[data-qg-mode="worker"] .tc-applicants-toggle,
body.qg-mode-worker .tc-applicants,
body.qg-mode-worker .tc-applicants-toggle { color: var(--lavender); }

body.light.qg-mode-worker .tc-applicants,
body.light.qg-mode-worker .tc-applicants-toggle { color: var(--purple); }

html[data-qg-mode="worker"] .mpill.active-all,
body.qg-mode-worker .mpill.active-all {
  background: rgba(107, 63, 160, 0.28);
  color: var(--lavender);
  border-color: rgba(200, 168, 233, 0.4);
  border-radius: 999px;
}

html[data-qg-mode="worker"] .cat-active,
body.qg-mode-worker .cat-active {
  background: rgba(107, 63, 160, 0.32) !important;
  color: var(--lavender) !important;
  border-radius: 999px;
}

html[data-qg-mode="worker"] .mpill,
html[data-qg-mode="worker"] .cpill,
body.qg-mode-worker .mpill,
body.qg-mode-worker .cpill { border-radius: 999px; }

html[data-qg-mode="worker"] .search-box,
body.qg-mode-worker .search-box {
  border-radius: 999px;
  border: 1px solid rgba(200, 168, 233, 0.2);
}

html[data-qg-mode="worker"] .legal-footer a,
body.qg-mode-worker .legal-footer a { color: var(--lavender); }

body.light.qg-mode-worker .legal-footer a { color: var(--purple); }

html[data-qg-mode="worker"] body,
body.qg-mode-worker {
  padding-bottom: 88px;
}
