/* TaskStream — user app (palette matches admin dashboard / DarkPan) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Open+Sans:wght@400;600&display=swap');

/* Brand tokens (shared with admin/css/style.css) */
:root {
  --ts-primary: #EB1616;
  --ts-primary-dark: #c91212;
  --ts-primary-light: #ff4545;
  --ts-secondary: #191C24;
  --ts-surface-elevated: #252836;
  --ts-muted: #6C7293;
  --ts-bg: #000000;
  --ts-success: #10b981;
  --ts-warning: #f59e0b;
  --ts-danger: #ef4444;
}

/* Default: dark UI aligned with admin */
:root {
  --primary: var(--ts-primary);
  --primary-dark: var(--ts-primary-dark);
  --primary-light: var(--ts-primary-light);
  --primary-muted: rgba(235, 22, 22, 0.15);
  --earn: var(--ts-success);
  --earn-dark: #059669;
  --earn-muted: rgba(16, 185, 129, 0.15);
  --accent: var(--ts-warning);
  --accent-light: rgba(245, 158, 11, 0.15);
  --bg: var(--ts-bg);
  --surface: var(--ts-secondary);
  --surface-elevated: var(--ts-surface-elevated);
  --text: #f3f4f6;
  --text-secondary: #d1d5db;
  --text-muted: var(--ts-muted);
  --border: #2d3142;
  --border-light: #232633;
  --success: var(--ts-success);
  --success-bg: rgba(16, 185, 129, 0.15);
  --warning: var(--ts-warning);
  --warning-bg: rgba(245, 158, 11, 0.15);
  --danger: var(--ts-danger);
  --danger-bg: rgba(239, 68, 68, 0.15);
  --info: var(--ts-primary);
  --info-bg: var(--primary-muted);
  --admin-bg: var(--ts-bg);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.55);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --font: 'Inter', 'Open Sans', system-ui, -apple-system, sans-serif;
  --nav-height: 64px;
  --header-height: 56px;
  --admin-sidebar: 260px;
  --max-mobile: 430px;
}

/* Optional light mode — same red brand, lighter surfaces */
[data-theme="light"] {
  --primary: var(--ts-primary);
  --primary-dark: var(--ts-primary-dark);
  --primary-light: var(--ts-primary-light);
  --primary-muted: #fde8e8;
  --bg: #f0f1f5;
  --surface: #ffffff;
  --surface-elevated: #f8f9fc;
  --text: #111827;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.1);
}

[data-theme="dark"] {
  --primary: var(--ts-primary);
  --primary-dark: var(--ts-primary-dark);
  --primary-light: var(--ts-primary-light);
  --primary-muted: rgba(235, 22, 22, 0.15);
  --bg: var(--ts-bg);
  --surface: var(--ts-secondary);
  --surface-elevated: var(--ts-surface-elevated);
  --text: #f3f4f6;
  --text-secondary: #d1d5db;
  --text-muted: var(--ts-muted);
  --border: #2d3142;
  --border-light: #232633;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

/* ——— Mockup hub ——— */
.hub-body {
  background: linear-gradient(145deg, var(--ts-primary-dark) 0%, var(--ts-secondary) 50%, var(--ts-bg) 100%);
  min-height: 100vh;
  padding: 2rem 1.5rem 4rem;
}

.hub-header {
  text-align: center;
  color: #fff;
  margin-bottom: 2.5rem;
}

.hub-header .logo-mark {
  width: 56px;
  height: 56px;
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  backdrop-filter: blur(8px);
}

.hub-header h1 { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.02em; }
.hub-header p { opacity: 0.85; margin-top: 0.5rem; font-size: 0.95rem; }

.hub-badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hub-grid {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .hub-grid { grid-template-columns: 1fr 1fr; }
}

.hub-section h2 {
  color: #fff;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.7;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.hub-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.hub-links a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 0.875rem 1rem;
  border-radius: var(--radius);
  color: #fff;
  font-weight: 500;
  font-size: 0.9rem;
  transition: background 0.15s, transform 0.15s;
}

.hub-links a:hover {
  background: rgba(255,255,255,0.18);
  transform: translateX(4px);
}

.hub-links a .icon {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.hub-links a span.desc {
  font-size: 0.75rem;
  opacity: 0.7;
  font-weight: 400;
  display: block;
}

/* ——— Phone frame (user mockups) ——— */
.mockup-frame {
  max-width: var(--max-mobile);
  width: 100%;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  box-shadow: var(--shadow-lg);
  overflow-x: hidden;
}

@media (max-width: 479px) {
  html {
    overflow-x: hidden;
  }

  body.user-mockup {
    padding: 0;
    overflow-x: hidden;
    width: 100%;
  }

  body.user-mockup .mockup-frame {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    box-shadow: none;
    border-radius: 0;
    overflow-x: hidden;
  }

  .app-header {
    width: 100%;
    padding-left: max(0.75rem, env(safe-area-inset-left));
    padding-right: max(0.75rem, env(safe-area-inset-right));
  }

  .app-header-brand {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
  }

  .app-header-brand .site-logo {
    max-width: min(140px, 42vw);
  }

  .bottom-nav {
    left: 0;
    right: 0;
    transform: none;
    width: 100%;
    max-width: 100%;
    padding-left: max(0.25rem, env(safe-area-inset-left));
    padding-right: max(0.25rem, env(safe-area-inset-right));
  }

  .page-content,
  .page-content--dashboard {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    padding-left: max(0.75rem, env(safe-area-inset-left));
    padding-right: max(0.75rem, env(safe-area-inset-right));
    padding-bottom: calc(var(--nav-height) + 1rem + env(safe-area-inset-bottom));
  }

  .page-content--dashboard .greeting h2 {
    font-size: 1.1rem;
    line-height: 1.3;
  }

  .page-content--dashboard .greeting p {
    font-size: 0.8rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
  }

  .page-content--dashboard .balance-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .page-content--dashboard .balance-card .amount {
    font-size: clamp(1.35rem, 7vw, 2rem);
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .page-content--dashboard .balance-card .meta {
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
  }

  .page-content--dashboard .quick-actions {
    width: 100%;
    gap: 0.5rem;
  }

  .page-content--dashboard .section-head {
    gap: 0.35rem 0.75rem;
    flex-wrap: wrap;
  }

  .page-content--dashboard .section-head h2 {
    min-width: 0;
    flex: 1 1 auto;
  }

  .page-content--dashboard .task-row-layout {
    gap: 0.65rem;
    min-width: 0;
  }

  .page-content--dashboard .task-row-media {
    flex: 0 0 30%;
    width: 30%;
    min-width: 88px;
    max-width: 118px;
    height: auto;
    aspect-ratio: 16 / 10;
  }

  .page-content--dashboard .task-row-facts li {
    font-size: 0.78rem;
    overflow-wrap: anywhere;
  }

  .page-content--dashboard .user-adverts,
  .page-content--dashboard .user-ad-card {
    width: 100%;
    max-width: 100%;
  }

  .page-content--dashboard .user-ad-media--banner img {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 42vw;
    object-fit: cover;
  }

  .page-content--dashboard .payout-feed-message {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

@media (min-width: 480px) {
  body.user-mockup {
    padding: 1.5rem 0;
    background: #0a0a0a;
  }
  body.user-mockup .mockup-frame {
    min-height: calc(100vh - 3rem);
    border-radius: 24px;
    overflow: hidden;
  }
}

.mockup-label {
  text-align: center;
  font-size: 0.7rem;
  color: var(--text-muted);
  padding: 0.5rem;
  background: #e2e8f0;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

body.user-mockup .mockup-label { display: none; }

/* ——— App header ——— */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  min-height: var(--header-height);
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.app-header-brand {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.app-header.transparent {
  background: transparent;
  border-bottom: none;
  position: absolute;
  width: 100%;
  color: #fff;
}

.app-header h1 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.app-header .back-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: var(--bg);
  font-size: 1.25rem;
}

.app-header.transparent .back-btn {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

.header-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-shrink: 0;
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: var(--bg);
  border: none;
  cursor: default;
  font-size: 1.1rem;
}

.avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

/* ——— Bottom navigation ——— */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-mobile);
  display: flex;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 0.5rem 0.25rem calc(0.5rem + env(safe-area-inset-bottom));
  z-index: 100;
}

.bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.35rem;
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
}

.bottom-nav a .nav-icon { font-size: 1.35rem; line-height: 1; }

.bottom-nav a.active {
  color: var(--primary);
}

.bottom-nav a.active .nav-icon {
  transform: scale(1.05);
}

.page-content {
  padding: 1rem;
  padding-bottom: calc(var(--nav-height) + 1.5rem);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.page-content.no-nav {
  padding-bottom: 1.5rem;
}

.page-content--watch {
  padding-top: 0;
  padding-left: 0;
  padding-right: 0;
}

.page-content--watch .watch-body {
  padding: 1rem;
}

.page-content--watch .video-player {
  position: relative;
  background: #000;
}

/* Portrait embeds (TikTok, Instagram): maximize within viewport, centered */
.page-content--watch .video-player--portrait {
  --watch-header-h: 3.25rem;
  --portrait-available-h: calc(
    100dvh - var(--watch-header-h) - env(safe-area-inset-top, 0px)
  );
  width: min(100%, calc(var(--portrait-available-h) * 9 / 16));
  height: min(var(--portrait-available-h), calc(100vw * 16 / 9));
  max-width: 100%;
  aspect-ratio: 9 / 16;
  margin: 0 auto;
  margin-bottom: 0;
  border-radius: 0;
  flex-shrink: 0;
}

.page-content--watch .video-player--portrait .task-embed-player,
.page-content--watch .video-player--portrait iframe {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  border: 0;
}

.page-content--watch:has(.video-player--portrait) {
  display: flex;
  flex-direction: column;
  padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px));
}

.page-content--watch:has(.video-player--portrait) .watch-body {
  flex: 1 1 auto;
  min-height: 0;
}

.watch-start-gate {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.82);
  color: #fff;
  text-align: center;
}

.watch-start-gate[hidden] {
  display: none !important;
}

.watch-start-hint {
  margin: 0;
  font-size: 0.8rem;
  opacity: 0.85;
  max-width: 16rem;
}

.mockup-frame:has(.page-content--watch) .app-header.transparent {
  z-index: 60;
}

/* ——— Auth screens ——— */
.auth-hero {
  background: linear-gradient(160deg, var(--ts-primary-dark) 0%, var(--ts-primary) 45%, var(--ts-secondary) 100%);
  padding: 3rem 1.5rem 4rem;
  color: #fff;
  text-align: center;
  border-radius: 0 0 2rem 2rem;
}

.auth-hero .brand {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.auth-hero p { opacity: 0.9; font-size: 0.95rem; }

.auth-card {
  margin: -2.5rem 1rem 0;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
}

.form-group { margin-bottom: 1rem; }

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--bg);
  color: var(--text-muted);
}

.form-input::placeholder { color: var(--text-muted); }

select.form-input {
  color: var(--text);
  cursor: pointer;
}

select.form-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.password-input-wrap {
  position: relative;
  display: block;
}

.password-input-wrap .form-input {
  width: 100%;
  padding-right: 2.75rem;
}

.password-toggle {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  padding: 0;
}

.password-toggle:hover {
  color: var(--text-secondary);
  background: var(--bg);
}

.password-toggle:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.password-toggle svg {
  width: 20px;
  height: 20px;
  pointer-events: none;
}

.password-toggle .icon-eye-off {
  display: none;
}

.password-toggle.is-visible .icon-eye {
  display: none;
}

.password-toggle.is-visible .icon-eye-off {
  display: block;
}

.form-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.checkbox-label input { width: 16px; height: 16px; accent-color: var(--primary); }

.link { color: var(--primary); font-weight: 600; }

/* ——— Buttons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: default;
  width: 100%;
  text-align: center;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(235, 22, 22, 0.4);
}

.btn-earn {
  background: var(--earn);
  color: #fff;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
}

.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--primary);
  width: auto;
  padding: 0.5rem;
}

.btn-sm {
  padding: 0.5rem 0.875rem;
  font-size: 0.8rem;
  width: auto;
}

.btn-group { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1rem; }

.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.25rem 0;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ——— Cards ——— */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.card + .card { margin-top: 0.75rem; }

/* ——— Wallet hero ——— */
.balance-card {
  background: linear-gradient(135deg, var(--ts-primary-dark) 0%, var(--ts-primary) 55%, #8b1111 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1rem;
  position: relative;
  overflow: hidden;
}

.balance-card::after {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 180px;
  height: 180px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
}

.balance-card .label {
  font-size: 0.8rem;
  opacity: 0.85;
  font-weight: 500;
}

.balance-card .amount {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0.25rem 0 1rem;
}

.balance-card .meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.8rem;
  opacity: 0.9;
}

.balance-card .meta strong { display: block; font-size: 1rem; }

.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.quick-action {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.quick-action .qa-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--primary-muted);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.quick-action span { font-size: 0.8rem; font-weight: 600; }

/* ——— Stats row ——— */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.stat-box {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.5rem;
  text-align: center;
  border: 1px solid var(--border-light);
}

.stat-box .value {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--earn);
}

.stat-box .label {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 0.15rem;
}

/* ——— Site branding ——— */
.site-logo {
  max-height: 36px;
  width: auto;
  display: block;
  object-fit: contain;
}

.app-header-brand .site-logo {
  max-height: 28px;
}

.app-header-brand .site-brand-text {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.auth-hero .site-logo {
  max-height: 48px;
  margin: 0 auto 0.5rem;
  filter: brightness(0) invert(1);
}

.auth-hero .site-brand-text {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
}

.site-logo-admin {
  max-height: 32px;
  max-width: 100%;
  width: auto;
  object-fit: contain;
}

/* ——— Section title ——— */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.section-head h2 {
  font-size: 0.95rem;
  font-weight: 700;
}

.section-head a {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 600;
}

.payout-feed-head {
  margin-top: 1.5rem;
}

.payout-feed-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--earn);
  background: var(--success-bg);
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}

.payout-feed {
  padding: 0.5rem 0;
  margin-bottom: 0.5rem;
}

.payout-feed-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.payout-feed-item:last-child {
  border-bottom: none;
}

.payout-feed-icon {
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.payout-feed-message {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.4;
  color: var(--text);
}

.payout-feed-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0.2rem 0 0;
}

.payout-feed-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  margin: 0 0 0.5rem;
  line-height: 1.45;
}

/* ——— Referrals ——— */
.referral-link-box {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.referral-link-box .form-input {
  font-size: 0.8rem;
}

@media (min-width: 400px) {
  .referral-link-box {
    flex-direction: row;
    align-items: stretch;
  }

  .referral-link-box .form-input {
    flex: 1;
    min-width: 0;
  }

  .referral-link-box .btn {
    flex-shrink: 0;
  }
}

.referral-widget--minimal {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
}

.referral-widget--minimal .referral-link-box {
  margin: 0;
}

/* ——— User advertisements ——— */
.user-adverts {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1rem 0 1.25rem;
}

.user-adverts--dashboard {
  margin: 0 0 1.25rem;
}

.user-ad-card {
  position: relative;
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, transform 0.15s;
}

.user-adverts--dashboard .user-ad-card {
  border-color: rgba(235, 22, 22, 0.35);
  box-shadow: var(--shadow);
}

.user-ad-card--banner-only .user-ad-media--banner img {
  width: 100%;
  max-height: none;
  display: block;
  object-fit: cover;
  vertical-align: middle;
}

.user-ad-sponsored {
  position: absolute;
  top: 0.5rem;
  right: 0.65rem;
  z-index: 2;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--warning);
  background: var(--warning-bg);
  border: 1px solid var(--warning);
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  animation: sponsored-blink 1.4s ease-in-out infinite;
}

@keyframes sponsored-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

@media (prefers-reduced-motion: reduce) {
  .user-ad-sponsored {
    animation: none;
  }
}

a.user-ad-card:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.user-ad-media img {
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  display: block;
  background: var(--bg);
}

.user-ad--flyer .user-ad-media img {
  max-height: 220px;
  object-fit: contain;
  padding: 0.5rem;
}

.user-ad-body {
  padding: 0.875rem 1rem;
}

.user-ad-type {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
}

.user-ad-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0.25rem 0 0;
  line-height: 1.3;
}

.user-ad-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0.35rem 0 0;
  line-height: 1.45;
}

.user-ad-cta {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
}

/* ——— Task / video card ——— */
.task-card {
  display: flex;
  gap: 0.875rem;
  align-items: flex-start;
}

.task-thumb {
  width: 100px;
  height: 68px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #1e293b, #334155);
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.5rem;
}

.task-thumb .duration {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(0,0,0,0.75);
  font-size: 0.65rem;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-weight: 600;
}

/* Horizontal task row (thumbnail left, details right) */
.task-row-card {
  padding: 0.75rem;
  margin-bottom: 0.75rem;
}

.task-row-card.is-completed {
  opacity: 0.6;
}

.task-row-layout {
  display: flex;
  gap: 0.875rem;
  align-items: stretch;
}

.task-row-media {
  position: relative;
  flex: 0 0 118px;
  width: 118px;
  height: 76px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #000;
  display: block;
  text-decoration: none;
}

.task-row-media img,
.task-row-media iframe,
.task-row-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
  display: block;
  pointer-events: none;
}

.task-row-media-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
  background: linear-gradient(135deg, var(--ts-secondary, #191c24), #334155);
}

.task-row-media-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.25);
  pointer-events: none;
}

.task-row-media--locked {
  cursor: default;
  opacity: 0.92;
}

.task-row-media--locked[href] {
  cursor: pointer;
}

.task-row-media-lock {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.task-row-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.task-row-facts {
  list-style: none;
  margin: 0;
  padding: 0;
}

.task-row-facts li {
  font-size: 0.82rem;
  color: var(--text);
  margin-bottom: 0.25rem;
  line-height: 1.35;
}

.task-row-facts li:first-child {
  font-weight: 600;
}

.task-row-facts li::before {
  content: '– ';
  color: var(--text-muted);
}

.fact-label {
  color: var(--text-muted);
}

.fact-earn {
  color: var(--earn, var(--ts-success, #10b981));
  font-weight: 700;
}

.task-row-action {
  margin-top: 0.5rem;
  align-self: flex-start;
  width: auto;
  min-width: 7rem;
}

.task-info { flex: 1; min-width: 0; }

.task-info h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.task-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.earn-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--earn-muted);
  color: var(--earn-dark);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
}

.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 0.5rem;
}

.progress-bar .fill {
  height: 100%;
  background: var(--primary);
  border-radius: var(--radius-full);
}

/* ——— Reset timer banner ——— */
.reset-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--info-bg);
  border: 1px solid var(--primary-light);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
}

.reset-banner .timer {
  font-weight: 800;
  color: var(--info);
  font-variant-numeric: tabular-nums;
}

.reset-banner .icon { font-size: 1.25rem; }

/* ——— Plan cards ——— */
.plan-card {
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  position: relative;
  transition: border-color 0.15s;
}

.plan-card.featured {
  border-color: var(--primary);
  background: linear-gradient(to bottom, var(--primary-muted), var(--surface));
}

.plan-card .plan-badge {
  position: absolute;
  top: -10px;
  right: 1rem;
  background: var(--primary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.plan-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.plan-price {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary);
}

.plan-price span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.plan-features {
  list-style: none;
  margin: 1rem 0;
  font-size: 0.85rem;
}

.plan-features li {
  padding: 0.35rem 0;
  padding-left: 1.25rem;
  position: relative;
  color: var(--text-secondary);
}

.plan-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
}

.plan-card + .plan-card { margin-top: 1rem; }

/* ——— List items ——— */
.list-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--border-light);
}

.list-item:last-child { border-bottom: none; }

.list-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.list-icon.green { background: var(--success-bg); }
.list-icon.amber { background: var(--accent-light); }
.list-icon.red { background: var(--danger-bg); }
.list-icon.blue { background: var(--info-bg); }

.list-body { flex: 1; min-width: 0; }

.list-body .title { font-size: 0.9rem; font-weight: 600; }
.list-body .sub { font-size: 0.75rem; color: var(--text-muted); }

.list-amount {
  font-weight: 700;
  font-size: 0.9rem;
  text-align: right;
}

.list-amount.positive { color: var(--success); }
.list-amount.negative { color: var(--text); }

/* ——— Badges ——— */
.badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-muted { background: var(--bg); color: var(--text-muted); }

/* ——— Video player mockup ——— */
.video-player {
  aspect-ratio: 16/9;
  background: #0f172a;
  border-radius: var(--radius);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  overflow: hidden;
}

.video-player--facebook {
  aspect-ratio: auto;
  min-height: 320px;
}

.video-player--facebook .task-embed-player {
  min-height: 360px !important;
}

.page-content--watch .video-player .task-embed-player,
.page-content--watch .video-player iframe {
  display: block;
  background: #000;
}

.video-player .play-btn {
  width: 64px;
  height: 64px;
  background: rgba(255,255,255,0.95);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.video-player .overlay-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 0.75rem;
  display: flex;
  justify-content: space-between;
  background: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent);
  color: #fff;
  font-size: 0.8rem;
}

.video-player .overlay-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.75rem;
  background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
}

.watch-progress {
  height: 4px;
  background: rgba(255,255,255,0.3);
  border-radius: 2px;
  margin-top: 0.5rem;
}

.watch-progress .fill {
  width: 45%;
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
}

.earn-panel {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  text-align: center;
  border: 1px solid var(--border);
}

.earn-panel .watch-time {
  font-size: 2rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--primary);
}

.earn-panel p { font-size: 0.85rem; color: var(--text-muted); margin: 0.25rem 0 1rem; }

/* ——— Withdraw form ——— */
.amount-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0 1rem;
}

.chip {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--surface);
  color: var(--text-secondary);
}

.chip.selected {
  border-color: var(--primary);
  background: var(--primary-muted);
  color: var(--primary);
}

.info-box {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 0.875rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 1rem;
}

.info-box strong { color: var(--text); }

/* ——— Profile ——— */
.profile-hero {
  text-align: center;
  padding: 1.5rem 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: #fff;
  font-size: 2rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
  border: 3px solid var(--primary-muted);
}

.profile-hero h2 { font-size: 1.15rem; font-weight: 700; }
.profile-hero .email { font-size: 0.85rem; color: var(--text-muted); }

.plan-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.5rem;
  background: var(--primary-muted);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
}

.menu-list .list-item { padding: 1rem; }
.menu-list .list-item .chevron { color: var(--text-muted); }

/* ——— Greeting ——— */
.greeting {
  margin-bottom: 1rem;
}

.greeting h2 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.greeting p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ——— Admin layout ——— */
.admin-body {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: var(--admin-sidebar);
  background: var(--admin-bg);
  color: #94a3b8;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
}

.admin-brand {
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.admin-brand .mark {
  width: 40px;
  height: 40px;
  background: var(--primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
}

.admin-brand span {
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
}

.admin-nav {
  flex: 1;
  padding: 1rem 0.75rem;
  overflow-y: auto;
}

.admin-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.875rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.15rem;
  color: #94a3b8;
}

.admin-nav a:hover { background: rgba(255,255,255,0.05); color: #e2e8f0; }

.admin-nav a.active {
  background: var(--primary-muted);
  color: var(--primary-light);
}

.admin-nav a .nav-icon { font-size: 1.15rem; width: 24px; text-align: center; }

.admin-sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.8rem;
}

.admin-main {
  flex: 1;
  margin-left: var(--admin-sidebar);
  min-height: 100vh;
  background: var(--bg);
}

.admin-topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.875rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.admin-topbar h1 {
  font-size: 1.15rem;
  font-weight: 700;
}

.admin-topbar .search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  width: 280px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.admin-content { padding: 1.5rem; }

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.admin-stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.25rem;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.admin-stat-card .label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.admin-stat-card .value {
  font-size: 1.75rem;
  font-weight: 800;
  margin: 0.25rem 0;
  letter-spacing: -0.02em;
}

.admin-stat-card .change {
  font-size: 0.75rem;
  font-weight: 600;
}

.admin-stat-card .change.up { color: var(--success); }
.admin-stat-card .change.down { color: var(--danger); }

.admin-grid-2 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
}

.admin-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  overflow: hidden;
}

.admin-card .card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-card .card-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
}

/* ——— Data table ——— */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.data-table th {
  text-align: left;
  padding: 0.75rem 1.25rem;
  background: var(--bg);
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.data-table td {
  padding: 0.875rem 1.25rem;
  border-top: 1px solid var(--border-light);
}

.data-table tr:hover td { background: #f8fafc; }

.user-cell {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.user-cell .mini-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-muted);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
}

.table-actions {
  display: flex;
  gap: 0.35rem;
}

.table-actions .btn { width: auto; padding: 0.35rem 0.65rem; font-size: 0.75rem; }

.filters-bar {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.filter-select {
  padding: 0.5rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ——— Admin auth ——— */
.admin-auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--admin-bg) 0%, var(--primary-dark) 100%);
  padding: 2rem;
}

.admin-auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
}

.admin-auth-card .brand {
  text-align: center;
  margin-bottom: 1.5rem;
}

.admin-auth-card .brand .mark {
  width: 48px;
  height: 48px;
  background: var(--primary);
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.admin-auth-card h1 {
  font-size: 1.25rem;
  font-weight: 700;
}

.admin-auth-card .sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.mockup-note {
  text-align: center;
  padding: 0.75rem;
  font-size: 0.7rem;
  color: var(--text-muted);
  background: #fef3c7;
  border-bottom: 1px solid #fcd34d;
}

@media (max-width: 1024px) {
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .admin-grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .admin-sidebar { display: none; }
  .admin-main { margin-left: 0; }
}

/* ——— Theme-specific surfaces ——— */
[data-theme="dark"] body.user-mockup,
body.user-mockup:not([data-theme]) {
  background: #0a0a0a;
}

[data-theme="light"] body.user-mockup {
  background: #d1d5db;
}

[data-theme="dark"] .form-input,
:root:not([data-theme="light"]) .form-input {
  background: var(--surface-elevated);
  border-color: var(--border);
  color: var(--text);
}

[data-theme="light"] .form-input {
  background: var(--surface-elevated);
  color: var(--text);
}

[data-theme="dark"] .video-player,
:root:not([data-theme="light"]) .video-player {
  background: #000;
}

[data-theme="dark"] .notif-item.unread,
[data-theme="light"] .notif-item.unread {
  background: var(--primary-muted);
  border-color: var(--border);
}

/* ——— Preferences: theme & currency ——— */
.pref-section {
  margin-bottom: 1.25rem;
}

.pref-section h2 {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

.theme-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.theme-option {
  display: block;
  padding: 0.75rem 0.5rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
}

.theme-option input,
.currency-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.theme-option .icon { font-size: 1.35rem; display: block; margin-bottom: 0.25rem; }

.theme-option.active {
  border-color: var(--primary);
  background: var(--primary-muted);
  color: var(--primary);
}

.currency-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.pref-hint {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0 0 0.75rem;
}

.currency-option {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.875rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  position: relative;
  width: 100%;
  font-family: inherit;
  color: inherit;
}

.currency-option.active {
  border-color: var(--primary);
  background: var(--primary-muted);
}

.currency-option .code {
  font-weight: 800;
  font-size: 0.95rem;
  min-width: 2.5rem;
}

.currency-option .name {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.currency-select-wrap {
  margin-top: 0.75rem;
}

.currency-select-wrap label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.currency-select-wrap select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
}

.toggle-row strong { font-size: 0.9rem; }
.toggle-row span { font-size: 0.8rem; color: var(--text-muted); }

.toggle-switch {
  position: relative;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background 0.2s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: var(--shadow-sm);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--primary);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

.preview-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-top: 1rem;
}

.preview-card .label { font-size: 0.75rem; color: var(--text-muted); }
.preview-card .preview-amount {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--earn);
  margin-top: 0.25rem;
}

/* ——— Notification bell badge ——— */
.icon-btn-wrap {
  position: relative;
  display: inline-flex;
}

.notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border: 2px solid var(--surface);
  border-radius: 50%;
}

/* ——— Notifications screen ——— */
.filter-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.filter-tab {
  flex-shrink: 0;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.filter-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.notif-group-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 1rem 0 0.5rem;
}

.notif-group-title:first-child { margin-top: 0; }

.notif-item {
  display: flex;
  gap: 0.875rem;
  padding: 0.875rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  margin-bottom: 0.5rem;
  position: relative;
}

.notif-item.unread {
  border-color: var(--primary-muted);
  background: var(--primary-muted);
}

.notif-item.unread::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--primary);
  border-radius: 0 2px 2px 0;
}

.notif-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.notif-body { flex: 1; min-width: 0; }

.notif-body .title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.notif-body .message {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.notif-body .time {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* ——— KYC ——— */
.kyc-banner {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  border: 1px solid;
}

.kyc-banner.pending {
  background: var(--warning-bg);
  border-color: #fdba74;
}

.kyc-banner.verified {
  background: var(--success-bg);
  border-color: #6ee7b7;
}

.kyc-banner.rejected {
  background: rgba(239, 68, 68, 0.08);
  border-color: #fca5a5;
}

.kyc-page .kyc-intro {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.kyc-page .card h2 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.kyc-page .card .card-lead {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.45;
}

.kyc-upload-zone {
  position: relative;
  display: block;
  cursor: pointer;
  margin-bottom: 0.75rem;
  transition: border-color 0.15s, background 0.15s;
}

.kyc-upload-zone:hover {
  border-color: var(--primary);
  background: var(--primary-muted);
}

.kyc-upload-zone.has-file {
  border-style: solid;
  border-color: var(--earn);
  background: var(--success-bg);
  padding: 1rem;
}

.kyc-picked-name {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.35rem;
}

.kyc-file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.kyc-doc-preview .thumb-img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--border);
}

.kyc-doc-preview .thumb-img.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.kyc-checklist {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.kyc-check {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.kyc-check.done {
  border-color: var(--earn);
  color: var(--earn);
  background: var(--success-bg);
}

.kyc-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.kyc-status-panel {
  text-align: center;
  padding: 0.5rem 0 1rem;
}

.kyc-status-panel .status-icon {
  font-size: 2.75rem;
  margin: 1rem 0 0.75rem;
  line-height: 1;
}

.kyc-status-panel h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.kyc-status-panel p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  max-width: 300px;
  margin: 0 auto 1.25rem;
  line-height: 1.5;
}

.withdraw-panel-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin: 1rem 0 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.withdraw-method-panel[hidden] {
  display: none !important;
}

.kyc-banner .kyc-banner-text { flex: 1; font-size: 0.85rem; }
.kyc-banner .kyc-banner-text strong { display: block; margin-bottom: 0.25rem; font-size: 0.95rem; }

.kyc-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  position: relative;
}

.kyc-steps::before {
  content: '';
  position: absolute;
  top: 16px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: var(--border);
  z-index: 0;
}

.kyc-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  z-index: 1;
  flex: 1;
}

.kyc-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

.kyc-step.done .kyc-step-num {
  background: var(--earn);
  border-color: var(--earn);
  color: #fff;
}

.kyc-step.active .kyc-step-num {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.kyc-step-label {
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  max-width: 64px;
}

.kyc-step.active .kyc-step-label,
.kyc-step.done .kyc-step-label { color: var(--text); }

.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2rem 1rem;
  text-align: center;
  background: var(--bg);
  margin-bottom: 1rem;
}

.upload-zone .upload-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.upload-zone p { font-size: 0.85rem; color: var(--text-secondary); }
.upload-zone .hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.35rem; }

.doc-preview {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  border: 1px solid var(--border);
}

.doc-preview .thumb {
  width: 48px;
  height: 48px;
  background: var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}
