:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --primary: #2563eb;
  --secondary: #3b82f6;
  --success: #16a34a;
  --danger: #ef4444;
  --warning: #f59e0b;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 6px 18px rgba(15, 23, 42, 0.05);
  --radius-xl: 24px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 10px;
  --nav-height: 78px;
  --sidebar-width: 248px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.09), transparent 24%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 28%, #f1f5f9 100%);
  color: var(--text);
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  border: 0;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

button:hover {
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0) scale(0.98);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  border-radius: var(--radius-md);
  padding: 0.85rem 0.95rem;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(37, 99, 235, 0.5);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

textarea {
  resize: vertical;
  min-height: 112px;
}

.app-shell {
  max-width: 1560px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem calc(var(--nav-height) + 1rem);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  margin-bottom: 1.25rem;
  background: rgba(248, 250, 252, 0.86);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 18px;
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft);
}

.topbar-brand,
.topbar-actions,
.action-row,
.hero-actions,
.card-head,
.toolbar-head,
.profile-head,
.review-head,
.review-actions,
.withdrawal-actions,
.task-card-top,
.task-card-bottom,
.sidebar-brand,
.compact-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.topbar-actions,
.action-row,
.hero-actions,
.review-actions,
.withdrawal-actions,
.task-card-bottom {
  flex-wrap: wrap;
}

.topbar-actions {
  justify-content: flex-end;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.06em;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.22);
}

.eyebrow,
.section-kicker {
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}

.topbar h1,
.hero-card h2,
.panel-card h3,
.admin-header h2,
.workspace-sidebar strong {
  margin: 0;
}

.topbar h1 {
  font-size: 1.25rem;
}

.language-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
}

.language-pill span {
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--muted);
}

.language-pill select {
  width: auto;
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.gold-btn,
.task-action,
.approve,
.reject,
.mark-paid {
  min-height: 44px;
  padding: 0.8rem 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border-radius: 12px;
  font-weight: 700;
}

.primary-btn {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.24);
}

.secondary-btn,
.task-action.primary,
.mark-paid {
  background: #eaf1ff;
  color: var(--primary);
  border: 1px solid rgba(37, 99, 235, 0.12);
}

.ghost-btn,
.task-action.secondary {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.gold-btn {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
  box-shadow: 0 10px 20px rgba(245, 158, 11, 0.18);
}

.approve {
  background: rgba(22, 163, 74, 0.12);
  color: var(--success);
}

.reject {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.panel-view,
.screen,
.admin-page,
.seller-page {
  display: none;
}

.main-layout {
  display: block;
}

.panel-view.active,
.screen.active,
.admin-page.active,
.seller-page.active {
  display: block;
}

body[data-page-area="public"] #publicHomePanel,
body[data-page-area="auth"] #userAuthPanel,
body[data-page-area="user"] #userPanel,
body[data-page-area="admin"] #adminPanel,
body[data-page-area="seller"] #advertiserPanel {
  display: block;
}

.landing-layout,
.auth-layout,
.stats-grid,
.content-grid,
.filters-grid,
.wallet-grid,
.profile-grid,
.admin-grid,
.admin-review-grid,
.admin-stats-grid,
.settings-grid,
.bonus-wheel-grid,
.favorites-preview,
.leaderboard-list,
.review-list,
.withdrawal-list,
.task-list,
.transaction-list,
.modal-form,
.review-meta,
.withdrawal-meta,
.task-meta,
.info-list,
.steps-list {
  display: grid;
  gap: 1rem;
}

.landing-layout,
.auth-layout {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.landing-layout > *:first-child,
.auth-layout > *:first-child {
  grid-column: span 7;
}

.landing-layout > *:last-child,
.auth-layout > *:last-child {
  grid-column: span 5;
}

.workspace-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.workspace-sidebar {
  position: sticky;
  top: 92px;
  padding: 1.1rem;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
}

.workspace-sidebar span,
.workspace-sidebar a {
  color: var(--muted);
}

.workspace-main {
  min-width: 0;
}

.sidebar-brand {
  margin-bottom: 1.2rem;
}

.sidebar-brand > div:last-child {
  display: grid;
  gap: 0.16rem;
}

.sidebar-brand span {
  font-size: 0.84rem;
}

.sidebar-nav,
.sidebar-link-list {
  display: grid;
  gap: 0.5rem;
}

.sidebar-link-list a,
.nav-item {
  display: inline-flex;
  align-items: center;
  width: 100%;
  justify-content: flex-start;
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
}

.nav-item.active,
.sidebar-link-list a:hover,
.sidebar-link-list a.active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(59, 130, 246, 0.08));
  color: var(--primary);
  border-color: rgba(37, 99, 235, 0.16);
}

.nav-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
}

.nav-icon svg,
.card-icon svg,
.action-icon svg,
.modal-close svg {
  width: 100%;
  height: 100%;
}

.sidebar-summary {
  margin-top: 1.2rem;
  padding: 1rem;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.08), rgba(59, 130, 246, 0.03));
  border: 1px solid rgba(37, 99, 235, 0.12);
}

.sidebar-summary strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.1rem;
}

.hero-card,
.panel-card,
.stat-card,
.modal-card,
.bottom-nav {
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
}

.hero-card {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem;
  margin-bottom: 1.25rem;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #2563eb, #3b82f6 56%, #60a5fa);
  color: #fff;
  box-shadow: 0 22px 48px rgba(37, 99, 235, 0.22);
}

.hero-card::after {
  content: "";
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  align-self: center;
  flex: 0 0 auto;
}

.hero-card h2 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
}

.hero-card p {
  margin: 0.55rem 0 0;
  color: rgba(255, 255, 255, 0.84);
}

.landing-hero {
  min-height: 280px;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 245, 249, 0.95));
}

.landing-hero::after {
  background: rgba(37, 99, 235, 0.08);
}

.landing-hero h2,
.landing-hero p {
  color: var(--text);
}

.landing-stats {
  display: grid;
  align-content: end;
  gap: 0.75rem;
  min-width: 220px;
}

.mini-stat,
.shortcut-card {
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
}

.mini-stat span,
.shortcut-card p,
.muted,
.stat-card p,
.stat-card span,
.field span {
  margin: 0;
  color: var(--muted);
}

.mini-stat strong,
.shortcut-card h3 {
  display: block;
  margin-top: 0.4rem;
}

.landing-shortcuts {
  display: grid;
  gap: 1rem;
}

.stat-card,
.panel-card {
  border-radius: var(--radius-lg);
}

.stat-card {
  position: relative;
  padding: 1.15rem;
}

.card-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 0.85rem;
}

.card-icon.blue {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
}

.card-icon.green {
  background: rgba(22, 163, 74, 0.1);
  color: var(--success);
}

.card-icon.orange {
  background: rgba(245, 158, 11, 0.12);
  color: var(--warning);
}

.stat-card strong {
  display: block;
  margin: 0.35rem 0;
  font-size: 1.65rem;
  font-weight: 800;
}

.panel-card {
  padding: 1.15rem;
}

.badge,
.soft-badge,
.vip-chip,
.task-badge,
.priority-badge,
.status-pill,
.boost-badge,
.boost-inline,
.timeline-pill,
.confidence-badge,
.risk-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
}

.badge-blue,
.soft-badge,
.tab-btn.active {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
}

.vip-chip,
.boost-badge,
.boost-inline {
  background: rgba(245, 158, 11, 0.14);
  color: #a16207;
}

.priority-badge,
.status-pill.processing,
.confidence-badge.review {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
}

.status-pill.active,
.confidence-badge.safe,
.risk-badge.safe {
  background: rgba(22, 163, 74, 0.12);
  color: var(--success);
}

.status-pill.paused,
.status-pill.danger,
.risk-badge.warning,
.confidence-badge.warning {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.progress-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.progress-track {
  flex: 1;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6edf7;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  transition: width 0.35s ease;
}

.progress-fill.blue {
  background: linear-gradient(90deg, var(--primary), #60a5fa);
}

.progress-fill.green {
  background: linear-gradient(90deg, var(--success), #4ade80);
}

.progress-fill.orange {
  background: linear-gradient(90deg, var(--warning), #fbbf24);
}

.task-toolbar {
  position: sticky;
  top: 92px;
  z-index: 10;
}

.category-tabs {
  display: flex;
  gap: 0.65rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
  scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  flex: 0 0 auto;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  font-weight: 700;
}

.task-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.task-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.task-card,
.review-card,
.withdrawal-card,
.transaction-item,
.leaderboard-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.task-card {
  padding: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.task-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
}

.task-card.boosted {
  background: linear-gradient(180deg, rgba(255, 250, 235, 0.9), #fff);
  border-color: rgba(245, 158, 11, 0.22);
}

.task-meta h3 {
  margin: 0;
  font-size: 1.05rem;
}

.clamp-2 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.reward-text {
  color: var(--success);
  font-size: 1.15rem;
  font-weight: 800;
}

.favorites-preview {
  margin-top: 1rem;
}

.favorite-chip {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fbff;
  font-weight: 600;
}

.leaderboard-item,
.transaction-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1rem;
}

.leaderboard-user {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.txn-icon {
  width: 38px;
  height: 38px;
  margin-bottom: 0;
  flex: 0 0 auto;
}

.rank-badge {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #eff6ff;
  color: var(--primary);
  font-weight: 800;
}

.crown {
  color: #f59e0b;
}

.amount.credit {
  color: var(--success);
}

.amount.debit {
  color: var(--danger);
}

.wallet-grid,
.profile-grid,
.admin-grid,
.admin-review-grid,
.settings-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.content-grid,
.admin-stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-stats-grid .stat-card {
  min-height: 180px;
}

.admin-table-card,
.settings-grid,
.wallet-grid > article:last-child,
.admin-review-grid > article,
.admin-grid > article[id="adminFinance"],
.admin-grid > article[id="sellerCreate"] {
  grid-column: 1 / -1;
}

.field {
  gap: 0.55rem;
}

.inline-input {
  flex: 1;
  min-width: 240px;
}

.table-wrap {
  overflow-x: auto;
}

.log-viewer {
  margin-top: 1rem;
  display: grid;
  gap: 0.75rem;
}

.log-line {
  margin: 0;
  padding: 0.85rem 0.95rem;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fafc;
  color: #0f172a;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 0.82rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 0.95rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.table-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.review-card,
.withdrawal-card {
  padding: 1rem;
}

.review-badges,
.withdrawal-timeline {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.review-confidence,
.review-risk {
  margin-top: 0.9rem;
  padding: 0.85rem 0.95rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--border);
  color: var(--muted);
}

.review-confidence.safe {
  background: rgba(22, 163, 74, 0.06);
  border-color: rgba(22, 163, 74, 0.12);
}

.review-confidence.review {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.14);
}

.review-confidence.warning,
.review-risk.warning {
  background: rgba(239, 68, 68, 0.06);
  border-color: rgba(239, 68, 68, 0.14);
}

.screenshot-box {
  margin-top: 1rem;
  min-height: 170px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--border);
  border-radius: 14px;
  background: #f8fafc;
}

.review-image,
.zoom-image {
  width: 100%;
  border-radius: 12px;
  object-fit: cover;
}

.line-chart {
  min-height: 220px;
}

.chart-bars {
  display: flex;
  align-items: end;
  gap: 0.75rem;
  min-height: 220px;
  padding-top: 1rem;
}

.chart-bar {
  position: relative;
  flex: 1;
  min-height: 42px;
  border-radius: 14px 14px 8px 8px;
  background: linear-gradient(180deg, #93c5fd, var(--primary));
}

.chart-bar span {
  position: absolute;
  bottom: -1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.8rem;
  color: var(--muted);
}

.chart-legend {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.9rem;
}

.legend-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid var(--border);
  font-size: 0.84rem;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-range {
  color: var(--muted);
  font-size: 0.84rem;
  align-self: center;
}

.bonus-wheel-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.info-list div,
.step-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 0.95rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fbfdff;
}

.step-item span {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
  font-weight: 800;
}

.profile-head .avatar {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.reason-box {
  min-height: 120px;
}

.empty-state,
.empty-box {
  min-height: 150px;
  display: grid;
  place-items: center;
  padding: 1rem;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(248, 250, 252, 0.75);
}

.empty-state.compact {
  min-height: 88px;
}

.skeleton-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.skeleton-card {
  height: 250px;
  border-radius: 16px;
  background: linear-gradient(90deg, #eef2f7 0%, #f8fafc 50%, #eef2f7 100%);
  background-size: 200% 100%;
  animation: shimmer 1.15s infinite linear;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.bottom-nav {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 30;
  display: none;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  padding: 0.55rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.14);
}

.bottom-nav .nav-item {
  justify-content: center;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 58px;
  padding: 0.55rem 0.4rem;
  font-size: 0.78rem;
}

.bottom-nav.hidden {
  display: none !important;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  padding: 1.25rem;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(6px);
}

.modal.hidden {
  display: none;
}

.modal-card {
  width: min(720px, 100%);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  padding: 1.2rem;
  border-radius: 20px;
  position: relative;
}

.modal-header {
  margin-bottom: 1rem;
}

.modal-header h2 {
  margin: 0.5rem 0 0.2rem;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 1.3rem;
  line-height: 1;
}

.comment-box {
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #f8fbff;
  font-weight: 600;
}

.pending-badge {
  margin-top: 1rem;
  display: inline-flex;
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
  font-weight: 700;
}

.toast-stack {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 70;
  display: grid;
  gap: 0.65rem;
}

.toast {
  min-width: 240px;
  max-width: 320px;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.toast.success {
  border-color: rgba(22, 163, 74, 0.2);
}

.toast.error {
  border-color: rgba(239, 68, 68, 0.2);
}

.settings-card {
  padding: 1rem;
  box-shadow: none;
  background: #fbfdff;
}

.load-more {
  width: 100%;
}

.hidden {
  display: none !important;
}

.admin-shell .workspace-sidebar,
.advertiser-shell .workspace-sidebar {
  top: 92px;
}

@media (max-width: 1199px) {
  .landing-layout > *:first-child,
  .landing-layout > *:last-child,
  .auth-layout > *,
  .stats-grid,
  .content-grid,
  .task-list,
  .wallet-grid,
  .profile-grid,
  .admin-grid,
  .admin-review-grid,
  .admin-stats-grid,
  .settings-grid,
  .skeleton-list {
    grid-template-columns: 1fr;
  }

  .workspace-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }
}

@media (max-width: 991px) {
  .app-shell {
    padding: 1rem 1rem calc(var(--nav-height) + 1rem);
  }

  .workspace-shell {
    grid-template-columns: 1fr;
  }

  .workspace-sidebar {
    display: none;
  }

  .bottom-nav {
    display: grid;
  }

  .hero-card {
    flex-direction: column;
  }

  .hero-card::after {
    display: none;
  }

  .task-toolbar {
    top: 84px;
  }
}

@media (max-width: 767px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-actions {
    justify-content: space-between;
  }

  .landing-layout,
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .hero-card,
  .panel-card,
  .stat-card,
  .workspace-sidebar,
  .modal-card {
    padding: 1rem;
  }

  .task-card-top,
  .task-card-bottom,
  .card-head,
  .toolbar-head,
  .review-head,
  .review-actions,
  .withdrawal-actions,
  .action-row,
  .hero-actions {
    align-items: stretch;
  }

  .bottom-nav {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
  }

  .toast-stack {
    left: 0.75rem;
    right: 0.75rem;
    top: auto;
    bottom: calc(var(--nav-height) + 1rem);
  }

.toast {
  max-width: none;
  min-width: 0;
}
}

/* V3 Ultra Pro overrides */

:root {
  --bg: #eef4ff;
  --card: rgba(255, 255, 255, 0.76);
  --card-strong: rgba(255, 255, 255, 0.92);
  --primary: #2358d8;
  --secondary: #60a5fa;
  --accent: #14b8a6;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;
  --text: #0f172a;
  --muted: #64748b;
  --border: rgba(148, 163, 184, 0.2);
  --border-strong: rgba(148, 163, 184, 0.28);
  --shadow: 0 22px 60px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.06);
  --radius-xl: 28px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 12px;
  --topbar-height: 88px;
  --sidebar-width: 270px;
}

html,
body {
  min-height: 100%;
  overflow-x: hidden;
}

body {
  background:
    radial-gradient(circle at top left, rgba(96, 165, 250, 0.22), transparent 28%),
    radial-gradient(circle at top right, rgba(20, 184, 166, 0.12), transparent 22%),
    linear-gradient(180deg, #f8fbff 0%, #eef4ff 42%, #edf2f7 100%);
}

body.modal-open {
  overflow: hidden;
}

body.page-ready .app-shell {
  animation: shellFadeIn 0.28s ease;
}

body.page-leaving .app-shell {
  opacity: 0;
  transform: translateY(12px);
}

.app-shell {
  max-width: 1600px;
  min-height: 100vh;
  padding: 1rem 1rem calc(var(--nav-height) + env(safe-area-inset-bottom, 0px) + 2rem);
}

.main-layout,
.panel-view.active,
.workspace-main,
.screen.active,
.admin-page.active,
.seller-page.active {
  min-width: 0;
}

.workspace-shell {
  align-items: start;
  gap: 1.4rem;
}

.workspace-main {
  min-height: 0;
  display: grid;
  gap: 1.25rem;
  padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px) + 1.2rem);
}

.page-area-auth .auth-layout,
.page-area-admin.page-key-login .admin-grid,
.page-area-seller.page-key-login #advertiserAuthSection {
  max-width: 1120px;
  margin: 0 auto;
}

.glass-surface,
.topbar,
.workspace-sidebar,
.panel-card,
.stat-card,
.review-card,
.withdrawal-card,
.task-card,
.modal-card,
.admin-header,
.task-toolbar,
.wallet-balance,
.leaderboard-card,
.notification-card,
.empty-state,
.mini-stat,
.shortcut-card,
.bottom-nav {
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.topbar {
  top: 0.75rem;
  min-height: var(--topbar-height);
  padding: 1rem 1.1rem;
  margin-bottom: 1.4rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
}

.topbar-copy {
  display: grid;
  gap: 0.3rem;
}

.topbar-title-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.topbar-pill,
.topbar-balance {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  background: rgba(255, 255, 255, 0.82);
  color: var(--primary);
  font-weight: 700;
}

.topbar-balance {
  min-width: 118px;
}

.icon-btn {
  position: relative;
  width: 46px;
  height: 46px;
  display: inline-grid;
  place-items: center;
  border-radius: 16px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  box-shadow: var(--shadow-soft);
}

.icon-btn.active {
  color: var(--primary);
  border-color: rgba(37, 99, 235, 0.24);
}

.notification-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: 18px;
  height: 18px;
  padding: 0 0.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
}

.workspace-sidebar {
  top: calc(var(--topbar-height) + 1.5rem);
  border-radius: 24px;
  padding: 1.2rem;
}

.sidebar-nav,
.sidebar-link-list {
  gap: 0.55rem;
}

.sidebar-link-list a,
.nav-item {
  border-radius: 16px;
  padding: 0.9rem 1rem;
}

.sidebar-link-list a.active,
.sidebar-link-list a:hover,
.nav-item.active {
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.14);
}

.hero-card {
  position: relative;
  overflow: hidden;
  padding: 1.6rem;
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: 30px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.26), transparent 34%),
    linear-gradient(135deg, #2154d5, #3677ea 52%, #66a5ff 100%);
}

.hero-balance-card::before {
  content: "";
  position: absolute;
  inset: auto -10% -40% auto;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.hero-chip-row {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.hero-chip-row .soft-badge {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.dashboard-grid,
.content-grid,
.wallet-grid,
.profile-grid,
.admin-grid,
.admin-stats-grid {
  gap: 1.1rem;
}

.stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.content-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.content-grid > .panel-card {
  grid-column: span 4;
}

.dashboard-chart-card {
  min-height: 320px;
}

.panel-card,
.stat-card,
.review-card,
.withdrawal-card,
.task-card {
  border-radius: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.panel-card:hover,
.stat-card:hover,
.review-card:hover,
.withdrawal-card:hover,
.task-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: rgba(37, 99, 235, 0.18);
}

.task-toolbar {
  position: sticky;
  top: calc(var(--topbar-height) + 1.4rem);
  z-index: 18;
  padding: 1rem;
}

.filters-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.tab-btn {
  min-height: 42px;
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-weight: 700;
}

.tab-btn.active {
  border-color: rgba(37, 99, 235, 0.18);
}

.task-list {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.task-card {
  padding: 1.05rem;
  min-height: 280px;
}

.task-card-top {
  align-items: flex-start;
  justify-content: space-between;
}

.task-meta h3 {
  font-size: 1.05rem;
  line-height: 1.35;
}

.reward-text {
  color: var(--success);
  font-size: 1.05rem;
}

.progress-track {
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
}

.progress-fill {
  min-width: 0;
  animation: progressReveal 0.55s ease;
}

@keyframes progressReveal {
  from {
    transform: scaleX(0);
    transform-origin: left;
  }
  to {
    transform: scaleX(1);
    transform-origin: left;
  }
}

.transaction-item {
  width: 100%;
  text-align: left;
  border-radius: 16px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.56);
  box-shadow: none;
}

.transaction-item:hover {
  border-color: rgba(37, 99, 235, 0.14);
}

.amount.credit {
  color: var(--success);
}

.amount.debit {
  color: var(--danger);
}

.table-wrap {
  overflow: auto;
  border-radius: 18px;
  border: 1px solid var(--border);
}

.table-wrap table {
  min-width: 760px;
  background: rgba(255, 255, 255, 0.72);
}

.table-wrap th,
.table-wrap td {
  padding: 0.95rem 1rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.78);
}

.table-wrap th {
  position: sticky;
  top: 0;
  background: rgba(248, 250, 252, 0.96);
  text-align: left;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.review-list,
.withdrawal-list {
  gap: 1rem;
}

.review-card,
.withdrawal-card {
  padding: 1rem;
}

.review-meta,
.withdrawal-meta,
.info-list {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.line-chart {
  min-height: 220px;
  padding: 0.4rem 0;
}

.line-chart svg {
  width: 100%;
  height: auto;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.legend-pill,
.legend-range {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.7rem;
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.92);
  color: var(--muted);
  font-size: 0.8rem;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.settings-shell {
  display: grid;
  gap: 1rem;
}

.settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.settings-tab-panel {
  display: none;
}

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

.settings-actions {
  display: flex;
  justify-content: flex-end;
}

.auth-layout.auth-layout-user,
.auth-layout.auth-layout-admin,
.auth-layout.auth-layout-seller {
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  align-items: stretch;
}

.auth-layout.auth-layout-user > *:first-child,
.auth-layout.auth-layout-user > *:last-child,
.auth-layout.auth-layout-admin > *:first-child,
.auth-layout.auth-layout-admin > *:last-child,
.auth-layout.auth-layout-seller > *:first-child,
.auth-layout.auth-layout-seller > *:last-child {
  grid-column: auto;
}

.auth-feature-card {
  grid-column: 1;
  grid-row: 1 / span 2;
  display: grid;
  gap: 1rem;
  align-content: start;
}

.auth-feature-card .info-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.auth-stack {
  grid-column: 2;
  display: grid;
  gap: 1rem;
  align-content: start;
}

.auth-form-card {
  grid-column: 2;
  display: grid;
  gap: 1rem;
  align-content: start;
}

.compact-chart {
  padding-top: 0.15rem;
}

.compact-chart svg {
  min-height: 118px;
}

.filter-row {
  flex-wrap: wrap;
  align-items: end;
}

.filter-row input,
.filter-row select {
  min-height: 44px;
}

.field-span-2 {
  grid-column: 1 / -1;
}

.wallet-grid-v3 .wallet-wide {
  grid-column: 1 / -1;
}

.wallet-balance-card {
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.34), transparent 34%),
    linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(56, 189, 248, 0.08));
}

.wallet-summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.wallet-summary-strip > div {
  padding: 0.85rem 0.9rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.wallet-summary-strip span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.wallet-summary-strip strong {
  display: block;
  margin-top: 0.35rem;
}

.wallet-chart-card {
  min-height: 280px;
}

.leaderboard-shell {
  display: grid;
  gap: 1rem;
}

.leaderboard-hero-card {
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.22), transparent 34%),
    linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(14, 165, 233, 0.08));
}

.profile-rank-card {
  display: grid;
  gap: 1rem;
}

.profile-favorites-card .favorites-preview {
  margin-top: 0;
}

.seller-wallet-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
}

.seller-balance-card {
  align-content: start;
}

.page-utility-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.admin-stats-grid-compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-dashboard-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-dashboard-grid > .panel-card:last-child {
  grid-column: 1 / -1;
}

.admin-page-grid,
.seller-page-grid {
  display: grid;
  gap: 1rem;
}

.admin-page-grid-aside,
.seller-page-grid-aside {
  display: grid;
  gap: 1rem;
}

.admin-page-grid-aside {
  grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr);
}

.seller-page-grid-aside {
  grid-template-columns: minmax(0, 1.18fr) minmax(280px, 0.82fr);
}

.split-sidebar-card {
  align-content: start;
}

.split-sidebar-card .info-list {
  grid-template-columns: 1fr;
}

.admin-page-grid-aside .split-sidebar-card,
.seller-page-grid-aside .split-sidebar-card {
  position: sticky;
  top: calc(var(--topbar-height) + 1.4rem);
}

.notification-panel {
  position: fixed;
  top: calc(var(--topbar-height) + 1.4rem);
  right: 1.25rem;
  z-index: 65;
  width: min(360px, calc(100vw - 1.5rem));
}

.notification-card {
  padding: 1rem;
  border-radius: 22px;
}

.notification-list {
  display: grid;
  gap: 0.7rem;
}

.notification-item {
  padding: 0.85rem 0.9rem;
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.notification-item strong {
  display: block;
  margin-bottom: 0.2rem;
}

.notification-item p {
  margin: 0;
  color: var(--muted);
}

.log-viewer {
  display: grid;
  gap: 0.7rem;
}

.log-line {
  margin: 0;
  padding: 0.85rem 0.95rem;
  border-radius: 16px;
  background: #0f172a;
  color: #dbeafe;
  overflow: auto;
}

.bottom-nav {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding-bottom: calc(0.55rem + env(safe-area-inset-bottom, 0px));
}

.modal-card {
  background: rgba(255, 255, 255, 0.9);
}

.toast {
  position: relative;
  min-width: 240px;
  border-radius: 16px;
  padding-left: 2.75rem;
  backdrop-filter: blur(12px);
  animation: toastIn 0.28s ease;
}

.toast::before {
  content: "";
  position: absolute;
  left: 1rem;
  top: 50%;
  width: 1.1rem;
  height: 1.1rem;
  transform: translateY(-50%);
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.16);
}

.toast.success::before {
  background: radial-gradient(circle at center, #22c55e 0, #16a34a 75%);
}

.toast.error::before {
  background: radial-gradient(circle at center, #ef4444 0, #dc2626 75%);
  animation: errorShake 0.32s ease;
}

.ripple-surface {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.ripple-dot {
  position: absolute;
  width: 14px;
  height: 14px;
  pointer-events: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  transform: translate(-50%, -50%) scale(0);
  animation: rippleGrow 0.5s ease forwards;
}

.is-loading {
  pointer-events: none;
  opacity: 0.88;
}

.is-loading::after {
  content: "";
  width: 14px;
  height: 14px;
  margin-left: 0.55rem;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  display: inline-block;
  vertical-align: middle;
  animation: spin 0.8s linear infinite;
}

.floating-coins {
  position: fixed;
  top: calc(var(--topbar-height) + 0.5rem);
  right: 1.25rem;
  z-index: 80;
  padding: 0.7rem 0.95rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #854d0e;
  font-weight: 800;
  box-shadow: 0 12px 30px rgba(217, 119, 6, 0.18);
  animation: floatCoins 1.25s ease forwards;
}

.ui-updated {
  animation: pulseUpdate 0.45s ease;
}

@keyframes rippleGrow {
  to {
    transform: translate(-50%, -50%) scale(16);
    opacity: 0;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shellFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatCoins {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  18% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-32px) scale(1.03);
  }
}

@keyframes errorShake {
  0%, 100% { transform: translateY(-50%) translateX(0); }
  25% { transform: translateY(-50%) translateX(-2px); }
  75% { transform: translateY(-50%) translateX(2px); }
}

@keyframes pulseUpdate {
  0% {
    transform: scale(0.98);
    opacity: 0.84;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@media (max-width: 1199px) {
  .content-grid > .panel-card {
    grid-column: span 6;
  }
}

@media (max-width: 991px) {
  .workspace-main {
    padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px) + 2rem);
  }

  .auth-layout.auth-layout-user,
  .auth-layout.auth-layout-admin,
  .auth-layout.auth-layout-seller {
    grid-template-columns: 1fr;
  }

  .auth-feature-card,
  .auth-stack,
  .auth-form-card {
    grid-column: auto;
    grid-row: auto;
  }

  .auth-feature-card .info-list,
  .seller-wallet-grid,
  .admin-stats-grid-compact,
  .admin-dashboard-grid,
  .admin-page-grid-aside,
  .seller-page-grid-aside {
    grid-template-columns: 1fr;
  }

  .admin-page-grid-aside .split-sidebar-card,
  .seller-page-grid-aside .split-sidebar-card {
    position: static;
  }

  .topbar {
    top: 0.5rem;
  }

  .task-toolbar {
    top: calc(var(--topbar-height) + 0.9rem);
  }

  .notification-panel {
    top: auto;
    bottom: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px) + 1rem);
    right: 0.75rem;
    left: 0.75rem;
    width: auto;
  }
}

@media (max-width: 767px) {
  .app-shell {
    padding: 0.85rem 0.85rem calc(var(--nav-height) + env(safe-area-inset-bottom, 0px) + 2rem);
  }

  .page-utility-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .wallet-summary-strip {
    grid-template-columns: 1fr;
  }

  .topbar {
    min-height: 0;
    gap: 0.85rem;
  }

  .topbar-actions {
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .topbar-balance {
    order: -1;
    width: 100%;
    justify-content: flex-start;
  }

  .stats-grid,
  .content-grid,
  .task-list,
  .wallet-grid,
  .profile-grid,
  .admin-grid,
  .admin-stats-grid {
    grid-template-columns: 1fr;
  }

  .content-grid > .panel-card {
    grid-column: auto;
  }

  .task-toolbar {
    position: static;
  }

  .bottom-nav {
    left: 0.6rem;
    right: 0.6rem;
    bottom: 0.6rem;
    gap: 0.3rem;
  }

  .bottom-nav .nav-item {
    min-height: 60px;
    padding: 0.55rem 0.25rem;
    font-size: 0.72rem;
  }
}
