/* ═══════════════════════════════════════════════════
   PAAU CONNECT — Premium Stylesheet v3.0
   Modern · Clean · Student-Ready · Production
═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ── CSS Variables ──────────────────────────────── */
:root {
  /* Core palette - dark mode */
  --bg: #0a0d14;
  --bg-2: #0f1320;
  --panel: #131929;
  --panel-2: #1a2238;
  --panel-3: #1f2940;
  --text: #eef0f7;
  --text-2: #c4cce0;
  --muted: #7a87a3;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .12);

  /* Brand */
  --accent: #f5c518;
  --accent-2: #e6b800;
  --accent-3: #ffd750;
  --blue: #3b82f6;
  --blue-2: #2563eb;
  --green: #22c55e;
  --red: #ef4444;
  --purple: #8b5cf6;

  /* Effects */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .25);
  --shadow: 0 8px 32px rgba(0, 0, 0, .35);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, .5);
  --shadow-glow: 0 0 40px rgba(245, 197, 24, .12);
  /* Radius scale */
  --radius-sm: 12px;
  --radius-md: 14px;
  --radius: 18px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  /* Chat */
  --chat-self: #2563eb;
  --chat-other: #1a2238;

  /* Bottom nav */
  --bnav-h: 68px;

  /* Blur */
  --glass: rgba(13, 18, 33, .82);
  --glass-border: rgba(255, 255, 255, .08);
}

body.light {
  --bg: #f0f2f8;
  --bg-2: #e8ecf5;
  --panel: #ffffff;
  --panel-2: #f4f6fc;
  --panel-3: #edf0f9;
  --text: #141929;
  --text-2: #374160;
  --muted: #5e6b88;
  --line: rgba(0, 0, 0, .07);
  --line-2: rgba(0, 0, 0, .12);
  --glass: rgba(255, 255, 255, .88);
  --glass-border: rgba(0, 0, 0, .08);
  --shadow: 0 8px 32px rgba(0, 0, 0, .1);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, .15);
  --chat-other: #e5e9f5;
}

/* ── Reset ──────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0
}

html {
  scroll-behavior: smooth;
  height: 100%;
  -webkit-text-size-adjust: 100%
}

body {
  min-height: 100vh;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none
}


img {
  max-width: 100%;
  display: block;
  /* Async image decode — prevents main-thread block on large images */
  content-visibility: auto;
}

/* Lazy-loaded image reveal animation */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity .35s ease;
}
img[loading="lazy"].loaded,
img[loading="lazy"]:not([src=""]) {
  opacity: 1;
}

/* Reduce Cumulative Layout Shift for thumbnails */
.list-thumb img,
.compact-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: auto;
  /* Force GPU compositing layer for image-heavy grids */
  transform: translateZ(0);
  backface-visibility: hidden;
}

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

button {
  cursor: pointer;
  border: none;
  background: none
}

ul,
ol {
  list-style: none
}

/* ── Scrollbar ──────────────────────────────────── */
::-webkit-scrollbar {
  width: 5px;
  height: 5px
}

::-webkit-scrollbar-track {
  background: transparent
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .12);
  border-radius: 99px
}

body.light ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, .12)
}

::selection {
  background: rgba(245, 197, 24, .3);
  color: var(--text)
}

/* ══════════════════════════════════════════════════
   SITE SHELL & LAYOUT
══════════════════════════════════════════════════ */
.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(245, 197, 24, .08), transparent)
}

.page-container {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 calc(var(--bnav-h) + 32px);
  flex: 1;
}

/* ── Header ─────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 12px;
  z-index: 90;
  width: min(1200px, calc(100% - 32px));
  margin: 12px auto 0;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 16px 20px;
}

/* ── Brand ──────────────────────────────────────── */
.brand-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  flex-shrink: 0
}

.brand strong {
  display: block;
  font-weight: 800;
  font-size: .95rem;
  letter-spacing: -.01em
}

.brand span {
  color: var(--muted);
  font-size: .78rem;
  display: block
}

.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  transition: .2s ease;
}

.theme-toggle:hover {
  border-color: rgba(245, 197, 24, .4);
  background: rgba(245, 197, 24, .08);
  transform: rotate(20deg)
}

/* ── Navigation ─────────────────────────────────── */
.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 13px;
  align-items: center;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: .85rem;
  font-weight: 500;
  transition: .22s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text);
  border-color: var(--line-2);
  background: var(--panel-2);
  transform: translateY(-1px)
}

.nav-link.is-active {
  color: var(--text);
  border-color: rgba(245, 197, 24, .35);
  background: rgba(245, 197, 24, .07)
}

.nav-link--accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #111 !important;
  border: none;
  font-weight: 700
}

.nav-link--accent:hover {
  transform: translateY(-2px) scale(1.02);
  filter: brightness(1.06)
}

.nav-link--ghost {
  background: var(--panel-2)
}

.nav-badge {
  min-width: 17px;
  height: 17px;
  border-radius: 99px;
  background: var(--red);
  color: #fff;
  font-size: .6rem;
  font-weight: 800;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, .4)
  }

  50% {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0)
  }
}

/* ── Footer ─────────────────────────────────────── */
.site-footer {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto calc(var(--bnav-h) + 16px);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.footer-note {
  color: var(--muted);
  font-size: .82rem
}

/* ══════════════════════════════════════════════════
   AUTH PAGES — Login & Register
══════════════════════════════════════════════════ */
.auth-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 60% at 20% -10%, rgba(245, 197, 24, .1), transparent),
    radial-gradient(ellipse 60% 50% at 80% 110%, rgba(59, 130, 246, .08), transparent);
}

.auth-card {
  width: min(100%, 440px);
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  padding: 2.5rem;
  animation: slideUpFade .45s cubic-bezier(.22, 1, .36, 1);
}

.auth-card--wide {
  width: min(100%, 560px)
}

@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(24px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

.auth-logo {
  text-align: center;
  margin-bottom: 2rem
}

.auth-logo img {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  margin: 0 auto 10px
}

.auth-logo strong {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -.02em
}

.auth-logo span {
  color: var(--muted);
  font-size: .85rem
}

.auth-title {
  margin-bottom: .35rem;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.02em
}

.auth-sub {
  color: var(--muted);
  font-size: .9rem;
  margin-bottom: 1.75rem;
  line-height: 1.5
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 1.25rem 0;
  color: var(--muted);
  font-size: .8rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line-2)
}

.auth-footer-link {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: .88rem;
}

.auth-footer-link a {
  color: var(--accent);
  font-weight: 600
}

.auth-footer-link a:hover {
  text-decoration: underline
}

.forgot-link {
  display: block;
  text-align: right;
  margin-top: 6px;
  font-size: .82rem;
  color: var(--accent);
  font-weight: 500;
}

.forgot-link:hover {
  text-decoration: underline
}

/* Password toggle icon */
.password-wrap {
  position: relative
}

.password-wrap input {
  padding-right: 44px !important
}

.pw-toggle {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: .9rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color .2s;
}

.pw-toggle:hover {
  color: var(--text)
}

/* ══════════════════════════════════════════════════
   CARDS & PANELS
══════════════════════════════════════════════════ */
.panel,
.form-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 22px;
}

.card,
.stats-card,
.detail-card,
.list-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 12px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.list-thumb {
  aspect-ratio: 16/9;
  max-height: 180px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 10px;
}

.list-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

a.card,
a.list-card {
  display: block
}

a.card:hover,
a.list-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--line-2);
}

.hero {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow), var(--shadow-glow);
  padding: 36px;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 24px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(1.7rem, 3.5vw, 3rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -.03em;
  margin-bottom: 12px
}

.hero h1 span {
  color: var(--accent)
}

.hero p {
  color: var(--text-2);
  line-height: 1.7;
  margin-bottom: 20px
}

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

.stats-card {
  text-align: center;
  background: var(--panel-3)
}

.stats-card strong {
  display: block;
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 4px;
  color: var(--accent)
}

.stats-card span {
  color: var(--muted);
  font-size: .82rem
}

/* ══════════════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════════════ */
.button,
.button-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #111;
  font-weight: 700;
  font-size: .9rem;
  transition: .22s ease;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

.button:hover,
.button-inline:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 8px 24px rgba(245, 197, 24, .3)
}

.button-secondary {
  background: var(--panel-3);
  color: var(--text);
  border-color: var(--line-2)
}

.button-secondary:hover {
  background: var(--panel-2);
  box-shadow: var(--shadow-sm)
}

.button-danger {
  background: rgba(239, 68, 68, .1);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, .2)
}

body.light .button-danger {
  color: #b91c1c
}

.button-ghost {
  background: transparent;
  border-color: var(--line-2);
  color: var(--text-2)
}

.button-ghost:hover {
  background: var(--panel-2);
  color: var(--text)
}

.button-small {
  padding: 8px 13px;
  border-radius: 10px;
  font-size: .82rem
}

.button-xs {
  padding: 5px 10px;
  border-radius: 8px;
  font-size: .76rem
}

.button-full {
  width: 100%;
  justify-content: center
}

/* Auth specific button */
.btn-auth {
  width: 100%;
  padding: 13px 20px;
  border-radius: var(--radius-sm);
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #111;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  transition: .25s ease;
  letter-spacing: .01em;
}

.btn-auth:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(245, 197, 24, .35);
  filter: brightness(1.05)
}

.btn-auth:active {
  transform: translateY(0)
}

/* ══════════════════════════════════════════════════
   FORMS
══════════════════════════════════════════════════ */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 7px
}

.form-field label {
  font-weight: 600;
  font-size: .82rem;
  color: var(--text-2);
  letter-spacing: .01em
}

.form-field input:not([type=file]),
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line-2);
  background: var(--panel-3);
  color: var(--text);
  transition: .2s ease;
}

.form-field input:not([type=file]):focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: rgba(245, 197, 24, .5);
  box-shadow: 0 0 0 3px rgba(245, 197, 24, .1);
  background: var(--panel-2);
}

.form-field textarea {
  min-height: 100px;
  resize: vertical
}

.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px
}

.help-text {
  color: var(--muted);
  font-size: .8rem
}

/* Auth input special */
.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px
}

.auth-field label {
  font-weight: 600;
  font-size: .8rem;
  color: var(--text-2);
  letter-spacing: .02em;
  text-transform: uppercase
}

.auth-field input {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line-2);
  background: var(--panel-2);
  color: var(--text);
  font-size: .95rem;
  transition: .2s ease;
}

.auth-field input:focus {
  border-color: rgba(245, 197, 24, .5);
  box-shadow: 0 0 0 4px rgba(245, 197, 24, .1);
  background: var(--panel-3);
}

.auth-field input::placeholder {
  color: var(--muted)
}

/* Input error state */
.auth-field input.is-error {
  border-color: rgba(239, 68, 68, .5);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .1)
}

.field-error {
  font-size: .78rem;
  color: #fca5a5;
  margin-top: 4px;
  display: none
}

.auth-field.show-error .field-error {
  display: block
}

/* ══════════════════════════════════════════════════
   NOTICES & ALERTS
══════════════════════════════════════════════════ */
.notice {
  margin-bottom: 16px;
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  font-size: .88rem;
  animation: slideUpFade .3s ease;
}

.notice--success {
  border-color: rgba(34, 197, 94, .3);
  background: rgba(34, 197, 94, .06)
}

.notice--error {
  border-color: rgba(239, 68, 68, .3);
  background: rgba(239, 68, 68, .07)
}

.notice--info {
  border-color: rgba(245, 197, 24, .3);
  background: rgba(245, 197, 24, .06)
}

.notice-close {
  color: var(--muted);
  padding: 4px;
  font-size: .9rem;
  transition: color .2s
}

.notice-close:hover {
  color: var(--text)
}

/* Auth notice */
.auth-notice {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: .85rem;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid;
}

.auth-notice.error {
  border-color: rgba(239, 68, 68, .3);
  background: rgba(239, 68, 68, .08);
  color: #fca5a5
}

.auth-notice.success {
  border-color: rgba(34, 197, 94, .3);
  background: rgba(34, 197, 94, .08);
  color: #86efac
}

.auth-notice.info {
  border-color: rgba(245, 197, 24, .3);
  background: rgba(245, 197, 24, .07);
  color: var(--accent)
}

.auth-notice.warning {
  border-color: rgba(249, 115, 22, .3);
  background: rgba(249, 115, 22, .07);
  color: #fdba74
}

body.light .auth-notice.error {
  color: #b91c1c
}

body.light .auth-notice.success {
  color: #166534
}

body.light .auth-notice.info {
  color: #92400e
}

body.light .auth-notice.warning {
  color: #c2410c
}

/* ══════════════════════════════════════════════════
   GRIDS & LAYOUTS
══════════════════════════════════════════════════ */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px
}

.grid-4,
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px
}

.compact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: min(2vw, 16px) !important;
}

.grid-card-link {
  display: flex;
  flex-direction: column;
  padding: 12px;
  text-decoration: none;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  position: relative;
  overflow: hidden;
  height: 100%;
  min-width: 0;
}

.grid-card-link:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow);
  border-color: rgba(245, 197, 24, .4);
}

.grid-card-link .list-thumb {
  aspect-ratio: 4 / 3 !important;
  margin-bottom: 12px;
  border-radius: 6px;
  position: relative;
}

.grid-card-link .grid-card-title {
  margin: 0 0 6px;
  font-size: clamp(0.75rem, 2.8vw, 1.05rem);
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
  text-overflow: ellipsis;
  color: var(--text);
}

.grid-card-link .grid-card-price {
  font-size: clamp(0.8rem, 3.2vw, 1.1rem);
  font-weight: 800;
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: auto;
}

.grid-card-link .list-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  transition: .25s ease;
  z-index: 5;
}

.grid-card-link:hover .list-thumb::after {
  background: rgba(0,0,0,0.4);
}

/* ── Grid card action buttons (View Details / Message) ─── */
.grid-card-link > div:last-child {
  margin-top: auto;
  padding-top: 10px;
}

.grid-card-link > div:last-child > a {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(0.65rem, 2.5vw, 0.78rem) !important;
  padding: 6px 4px !important;
  text-align: center;
  justify-content: center;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 16px
}

.row-between {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap
}

/* ══════════════════════════════════════════════════
   TYPOGRAPHY & UTILITIES
══════════════════════════════════════════════════ */
.kicker {
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  font-size: .72rem;
  font-weight: 700;
  margin-bottom: 6px;
  display: block;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 18px;
  flex-wrap: wrap
}

.section-head h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -.02em;
  word-break: break-word
}

.section-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: .88rem
}

.meta-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: .82rem;
  align-items: center
}

.chip-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap
}

.card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
  align-items: center
}

.chip {
  padding: 5px 10px;
  border-radius: 99px;
  background: var(--panel-3);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: .76rem;
  white-space: nowrap;
}

.inline-form {
  display: inline
}

.inline-field {
  display: flex;
  gap: 8px;
  flex-wrap: wrap
}

.search-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap
}

.search-row .form-field {
  flex: 1 1 160px
}

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
  border: 1px dashed var(--line-2);
  border-radius: var(--radius-lg);
  background: var(--panel-3);
  font-size: .92rem;
  line-height: 1.7;
}

.price {
  font-size: 1rem;
  font-weight: 800;
  color: var(--accent);
  flex-shrink: 0
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 500px
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: .88rem
}

th {
  color: var(--muted);
  font-weight: 600;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .05em
}

/* ══════════════════════════════════════════════════
   PROFILE & AVATAR
══════════════════════════════════════════════════ */
.profile-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: flex-start
}

.avatar,
.avatar-large {
  border-radius: 50%;
  object-fit: cover;
  background: var(--panel-3);
  flex-shrink: 0;
  border: 2px solid var(--line-2)
}

.avatar {
  width: 48px;
  height: 48px
}

.avatar-large {
  width: 90px;
  height: 90px
}

.avatar-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #111;
  border: 2px solid rgba(245, 197, 24, .2);
}

.badge,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 99px;
  background: rgba(245, 197, 24, .1);
  color: var(--accent);
  border: 1px solid rgba(245, 197, 24, .2);
  font-size: .76rem;
  font-weight: 700;
  white-space: nowrap;
}

.pill.urgent {
  background: rgba(239, 68, 68, .1);
  border-color: rgba(239, 68, 68, .2);
  color: #fca5a5
}

body.light .pill.urgent {
  color: #b91c1c
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px
}

.mini-stats .stat {
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--panel-3);
  border: 1px solid var(--line);
  text-align: center
}

.mini-stats strong {
  display: block;
  font-size: 1.3rem;
  font-weight: 900
}

.mini-stats span {
  color: var(--muted);
  font-size: .78rem
}

.profile-meta h2,
.profile-meta h3 {
  margin: 0 0 5px;
  word-break: break-word;
  font-weight: 800
}

.profile-meta p {
  margin: 3px 0;
  color: var(--muted);
  font-size: .88rem
}

/* ══════════════════════════════════════════════════
   LISTING CARDS
══════════════════════════════════════════════════ */
.list-thumb {
  aspect-ratio: 4/3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--panel-3);
  margin-bottom: 12px;
  position: relative;
}

.list-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease
}

a.list-card:hover .list-thumb img {
  transform: scale(1.05)
}

.list-card h3 {
  margin: 0 0 6px;
  font-size: .95rem;
  font-weight: 700;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.35;
  word-break: break-word;
}

.list-card p {
  color: var(--muted);
  margin: 0 0 8px;
  font-size: .82rem;
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

/* ══════════════════════════════════════════════════
   CHAT / MESSAGING
══════════════════════════════════════════════════ */
.chat-shell {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 16px;
  min-height: 78vh;
}

.chat-list {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.chat-list-head {
  padding: 16px 14px 10px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0
}

.chat-list-head h3 {
  margin: 0;
  font-size: .95rem;
  font-weight: 700
}

.chat-list-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  -webkit-overflow-scrolling: touch
}

.chat-row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: .2s ease;
  -webkit-tap-highlight-color: transparent;
}

.chat-row:hover,
.chat-row.active {
  background: rgba(245, 197, 24, .07);
  border-color: rgba(245, 197, 24, .15)
}

.chat-snippet {
  overflow: hidden;
  flex: 1;
  min-width: 0
}

.chat-snippet strong {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: .88rem;
  font-weight: 600
}

.chat-snippet span {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--muted);
  font-size: .76rem;
  margin-top: 2px
}

.chat-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  min-height: 78vh;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.chat-head h3 {
  margin: 0;
  font-size: .95rem;
  font-weight: 700;
  word-break: break-word
}

.chat-head .meta {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: .76rem
}

.chat-messages {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
}

.chat-bubble {
  max-width: min(72%, 480px);
  padding: 10px 14px;
  border-radius: 18px;
  line-height: 1.55;
  font-size: .9rem;
  word-break: break-word;
  overflow-wrap: break-word;
  animation: bubbleIn .2s ease;
}

@keyframes bubbleIn {
  from {
    opacity: 0;
    transform: translateY(6px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

.chat-bubble.self {
  align-self: flex-end;
  background: var(--chat-self);
  color: #fff;
  border-bottom-right-radius: 5px
}

.chat-bubble.other {
  align-self: flex-start;
  background: var(--chat-other);
  color: var(--text);
  border: 1px solid var(--line);
  border-bottom-left-radius: 5px
}

.chat-time {
  display: block;
  margin-top: 4px;
  font-size: .66rem;
  opacity: .7;
  text-align: right
}

.chat-bubble.other .chat-time {
  text-align: left
}

.chat-form {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: var(--panel);
  position: sticky;
  bottom: 0;
  z-index: 2;
  align-items: center;
  flex-shrink: 0;
}

.chat-form input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 99px;
  border: 1.5px solid var(--line-2);
  background: var(--panel-3);
  color: var(--text);
  font-size: .9rem;
  min-width: 0;
  transition: .2s;
}

.chat-form input:focus {
  border-color: rgba(245, 197, 24, .4);
  box-shadow: 0 0 0 3px rgba(245, 197, 24, .08)
}

.chat-form .button-small {
  flex-shrink: 0;
  border-radius: 99px;
  padding: 10px 18px
}

/* ══════════════════════════════════════════════════
   MOBILE BOTTOM NAVIGATION
══════════════════════════════════════════════════ */
.bottom-nav {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--bnav-h);
  background: var(--glass);
  border-top: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, .25);
  padding: 0 env(safe-area-inset-bottom, 0);
}

.bottom-nav-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 8px;
  gap: min(1.5vw, 6px);
}

.bnav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5px;
  padding: 4px 2px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: clamp(8.5px, 2.4vw, 10.5px);
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: .2s ease;
  flex: 1;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  min-width: 0;
  white-space: nowrap;
}

.bnav-link svg {
  width: clamp(17px, 5vw, 20px);
  height: clamp(17px, 5vw, 20px);
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: .2s ease;
  flex-shrink: 0;
}

.bnav-link:hover {
  color: var(--text)
}

.bnav-link.is-active {
  color: var(--accent)
}

.bnav-link.is-active svg {
  stroke: var(--accent)
}

.bnav-link.is-active::after {
  content: '';
  display: block;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 3px;
  border-radius: 99px;
  background: var(--accent)
}

.bnav-badge {
  position: absolute;
  top: 4px;
  right: calc(50% - 18px);
  min-width: 15px;
  height: 15px;
  border-radius: 99px;
  background: var(--red);
  color: #fff;
  font-size: .55rem;
  font-weight: 800;
  padding: 0 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse-badge 2s infinite;
}

/* ══════════════════════════════════════════════════
   WHATSAPP FLOATING BUTTON
══════════════════════════════════════════════════ */
.whatsapp-float {
  position: fixed;
  right: 20px;
  bottom: calc(var(--bnav-h) + 16px);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25d366, #128c7e);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(37, 211, 102, .45);
  z-index: 99;
  transition: .3s cubic-bezier(.34, 1.56, .64, 1);
  -webkit-tap-highlight-color: transparent;
}

.whatsapp-float:hover {
  transform: scale(1.12) translateY(-3px);
  box-shadow: 0 12px 36px rgba(37, 211, 102, .55);
}

.whatsapp-float svg {
  width: 28px;
  height: 28px;
  fill: #fff
}

/* ══════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
══════════════════════════════════════════════════ */

/* Tablets (≤1100px) */
@media(max-width:1100px) {

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

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

  /* .compact-grid removed */

  .chat-shell {
    grid-template-columns: 250px 1fr
  }

  .hero {
    grid-template-columns: 1.2fr 1fr
  }
}

/* Tablets (≤860px) */
@media(max-width:860px) {

  .hero,
  .profile-card,
  .grid-2,
  .grid-3,
  .form-grid {
    grid-template-columns: 1fr
  }

  /* Keep compact-grid fluid on tablet */
  .compact-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
  }

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

  .chat-shell {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 12px
  }

  .chat-list {
    max-height: 280px
  }

  .chat-panel {
    min-height: 480px
  }

  .hero {
    padding: 24px
  }
}

/* Mobile (≤640px) */
@media(max-width:640px) {
  body {
    font-size: 14px
  }

  .site-header,
  .site-footer {
    width: calc(100% - 20px);
    border-radius: 20px
  }

  .page-container {
    width: calc(100% - 20px)
  }

  .hero,
  .panel,
  .form-card {
    padding: 18px
  }

  .card,
  .stats-card {
    padding: 14px
  }

  .auth-card {
    padding: 1.75rem
  }

  .main-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px
  }

  .nav-link {
    text-align: center;
    justify-content: center;
    font-size: .8rem;
    padding: 9px 8px
  }

  .brand span {
    display: none
  }

  .hero {
    grid-template-columns: 1fr
  }

  .hero h1 {
    font-size: 1.65rem
  }

  .hero-actions {
    flex-direction: column
  }

  .hero-actions .button {
    width: 100%;
    justify-content: center
  }

  .row-between {
    flex-direction: column;
    align-items: flex-start
  }

  .form-actions {
    flex-direction: column
  }

  .form-actions .button,
  .form-actions .button-secondary {
    width: 100%;
    justify-content: center
  }

  .card-actions .button,
  .card-actions .button-inline,
  .card-actions .button-small {
    width: auto
  }

  /* Allow 1 or 2 columns on mobile based on width */
  .compact-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
    gap: 10px !important;
  }

  .list-thumb {
    aspect-ratio: 1/1;
    border-radius: 10px
  }

  .list-card h3 {
    font-size: .84rem
  }

  .list-card p {
    font-size: .78rem;
    -webkit-line-clamp: 2
  }

  .chip {
    font-size: .72rem;
    padding: 4px 8px
  }

  .chat-panel {
    min-height: calc(100dvh - 360px)
  }

  .chat-bubble {
    max-width: 88%;
    font-size: .88rem
  }

  .chat-messages {
    padding: 12px;
    gap: 5px
  }

  .chat-form {
    padding: 10px 12px
  }

  .chat-form input {
    font-size: 16px
  }

  .profile-card {
    display: flex;
    flex-direction: column
  }

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

  .section-head {
    flex-direction: column;
    align-items: flex-start
  }

  .table-wrap {
    margin: 0 -4px
  }

  .whatsapp-float {
    right: 14px;
    width: 48px;
    height: 48px
  }

  .whatsapp-float svg {
    width: 25px;
    height: 25px
  }
}

/* Very small (≤400px) */
@media(max-width:400px) {
  .main-nav {
    grid-template-columns: 1fr
  }

  /* Let auto-fill handle columns at very small screens */
  .compact-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
    gap: 8px !important;
  }

  .cards-grid {
    grid-template-columns: 1fr
  }
}

/* ── Animations ─────────────────────────────────── */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

.notice {
  animation: fadeIn .25s ease
}

/* ══════════════════════════════════════════════════
   WELCOME POPUP
══════════════════════════════════════════════════ */
.popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, .75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn .3s ease;
}

.popup-card {
  width: min(100%, 440px);
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: slideUpFade .4s cubic-bezier(.22, 1, .36, 1);
}

.popup-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  line-height: 1;
}

.popup-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: .75rem;
  letter-spacing: -.02em;
}

.popup-body {
  color: var(--text-2);
  line-height: 1.75;
  font-size: .92rem;
  margin-bottom: 1.5rem;
}

/* ROLE SELECTOR */
.role-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 4px;
}

.role-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 12px;
  border-radius: var(--radius);
  border: 2px solid var(--line-2);
  background: var(--panel-3);
  color: var(--text);
  cursor: pointer;
  transition: .22s ease;
  text-align: center;
}

.role-btn:hover {
  border-color: rgba(245, 197, 24, .3);
  background: rgba(245, 197, 24, .05);
}

.role-btn.active {
  border-color: var(--accent);
  background: rgba(245, 197, 24, .08);
}

.role-icon {
  font-size: 2rem;
  line-height: 1;
}

.role-label {
  font-weight: 800;
  font-size: .95rem;
}

.role-desc {
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.4;
}

/* DASHBOARD STATS */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.dash-stat-card {
  background: var(--panel-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: .2s ease;
}

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

.dash-stat-icon {
  font-size: 1.75rem;
  line-height: 1;
  flex-shrink: 0;
}

.dash-stat-card strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1.1;
}

.dash-stat-card span {
  color: var(--muted);
  font-size: .76rem;
  display: block;
  margin-top: 3px;
}

/* SOLD BANNER */
.sold-banner {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  background: rgba(239, 68, 68, .82);
  color: #fff;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 99px;
  backdrop-filter: blur(4px);
  pointer-events: none;
}

@media(max-width:860px) {
  .dash-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media(max-width:480px) {
  .dash-stats {
    grid-template-columns: 1fr 1fr;
  }

  .role-selector {
    grid-template-columns: 1fr 1fr;
  }
}

/* ════════════════════════════════════════════════════
   EARN SYSTEM — Complete UI
════════════════════════════════════════════════════ */

/* Colour tokens */
:root {
  --green:  #10b981;
  --red:    #ef4444;
  --orange: #f97316;
  --blue:   #3b82f6;
  --purple: #8b5cf6;
}

#earn-shell { max-width: 680px; margin: 0 auto; padding: 0 0 120px; }

/* ── Tab Switcher ───────────────────────────────────── */
.earn-tabs-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
}
.earn-tabs {
  position: relative;
  display: flex;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 4px;
  flex: 1;
  max-width: 280px;
}
.earn-tab {
  flex: 1;
  padding: 10px 0;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 10px;
  transition: color .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  position: relative;
  z-index: 1;
}
.earn-tab.active { color: #fff; }
.earn-tab-indicator {
  position: absolute;
  top: 4px; bottom: 4px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark, #5b21b6));
  transition: left .25s cubic-bezier(.4,0,.2,1), width .25s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 4px 12px rgba(99,102,241,.35);
}
.earn-notif-bell {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  color: var(--text);
  font-size: .9rem;
  position: relative;
  white-space: nowrap;
}
.earn-notif-badge {
  background: var(--red);
  color: #fff;
  border-radius: 99px;
  padding: 1px 6px;
  font-size: .7rem;
  font-weight: 800;
  margin-left:2px;
}

/* ── Stats Dashboard ────────────────────────────────── */
.earn-stats-card {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 16px;
}
.earn-stat-item {
  background: var(--panel-2);
  padding: 18px 12px;
  text-align: center;
}
.earn-stat-label {
  display: block;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin-bottom: 6px;
}
.earn-stat-value {
  display: block;
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1;
}
.earn-stat-green .earn-stat-value  { color: var(--green); }
.earn-stat-orange .earn-stat-value { color: var(--orange); }
.earn-stat-blue .earn-stat-value   { color: var(--blue); }
.earn-stat-purple .earn-stat-value { color: var(--purple); }

.earn-badge-strip {
  background: linear-gradient(135deg, rgba(245,197,24,.1), rgba(245,197,24,.05));
  border: 1px solid rgba(245,197,24,.25);
  border-radius: 12px;
  padding: 10px 16px;
  font-size: .84rem;
  margin-bottom: 14px;
  text-align: center;
}

/* ── Actions Row ─────────────────────────────────────── */
.earn-actions-row {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.earn-withdraw-btn {
  flex: 1 1 auto;
  min-height: 48px;
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--green), #059669);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(16,185,129,.3);
  transition: transform .15s, box-shadow .15s;
}
.earn-withdraw-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(16,185,129,.4); }
.earn-withdraw-btn.disabled {
  background: var(--panel-2);
  color: var(--muted);
  cursor: not-allowed;
  box-shadow: none;
  border: 1px solid var(--line);
}
.earn-min-label {
  background: rgba(0,0,0,.2);
  border-radius: 99px;
  padding: 2px 8px;
  font-size: .7rem;
  margin-left: 4px;
}
.earn-secondary-btn {
  min-height: 48px;
  padding: 12px 16px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
}
.earn-secondary-btn:hover { background: var(--panel-3); }

/* ── Section head ──────────────────────────────────── */
.earn-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 10px;
  flex-wrap: wrap;
}
.earn-section-title {
  font-size: 1.1rem;
  font-weight: 800;
  margin: 0;
}
.earn-section-sub {
  font-size: .78rem;
  color: var(--muted);
  margin: 2px 0 0;
}
.earn-filter-select {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  color: var(--text);
  font-size: .82rem;
  cursor: pointer;
}

/* ── Platform chips ─────────────────────────────────── */
.earn-platform-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 16px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.earn-platform-chips::-webkit-scrollbar { display: none; }
.earn-chip {
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: 99px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: .15s;
  white-space: nowrap;
}
.earn-chip.active, .earn-chip:hover {
  border-color: var(--chip-color, var(--accent));
  color: var(--chip-color, var(--accent));
  background: rgba(0,0,0,.15);
}

/* ── Task Feed ────────────────────────────────────────── */
.earn-task-feed {
  display: grid;
  gap: 14px;
}
.earn-task-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  transition: transform .2s, box-shadow .2s;
  position: relative;
  overflow: hidden;
}
.earn-task-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.earn-task-featured {
  border-color: rgba(245,197,24,.35);
  background: linear-gradient(135deg, var(--panel-2), rgba(245,197,24,.04));
}
.earn-featured-badge {
  position: absolute;
  top: 12px; right: 12px;
  background: rgba(245,197,24,.15);
  color: #f5c518;
  border: 1px solid rgba(245,197,24,.3);
  border-radius: 99px;
  padding: 2px 10px;
  font-size: .7rem;
  font-weight: 700;
}
.earn-task-platform {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: .75rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.earn-task-action {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0 0 6px;
  color: var(--text);
}
.earn-task-desc {
  font-size: .82rem;
  color: var(--muted);
  margin: 0 0 12px;
  line-height: 1.5;
}
.earn-task-pay {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 14px;
}
.earn-pay-amount {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--green);
  line-height: 1;
}
.earn-pay-label {
  font-size: .75rem;
  color: var(--muted);
}
.earn-task-progress { margin-bottom: 14px; }
.earn-progress-bar {
  background: var(--panel-3);
  border-radius: 99px;
  height: 6px;
  overflow: hidden;
  margin-bottom: 6px;
}
.earn-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #22d3ee);
  border-radius: 99px;
  transition: width .4s ease;
}
.earn-progress-text {
  font-size: .74rem;
  color: var(--muted);
}
.earn-start-btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 13px;
  background: linear-gradient(135deg, var(--green), #059669);
  color: #fff;
  border-radius: 12px;
  font-weight: 700;
  font-size: .9rem;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 4px 12px rgba(16,185,129,.25);
}
.earn-start-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(16,185,129,.35); }
.earn-task-status {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: .83rem;
  font-weight: 600;
  text-align: center;
}
.earn-task-status.completed { background: rgba(16,185,129,.1); color: var(--green); border: 1px solid rgba(16,185,129,.2); }
.earn-task-status.pending   { background: rgba(249,115,22,.1); color: var(--orange); border: 1px solid rgba(249,115,22,.2); }
.earn-task-status.rejected  { background: rgba(239,68,68,.1); color: var(--red); border: 1px solid rgba(239,68,68,.2); }
.earn-task-status.locked    { background: var(--panel-3); color: var(--muted); border: 1px solid var(--line); }
.earn-resubmit-link { margin-left: 8px; color: var(--accent); text-decoration: underline; font-size: .8rem; }

.earn-load-more-btn {
  padding: 12px 28px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  cursor: pointer;
  font-size: .88rem;
  font-weight: 600;
}
.earn-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 16px;
}
.earn-target-link {
  display: block;
  background: var(--panel-3);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: .82rem;
  color: var(--accent);
  word-break: break-all;
  text-decoration: none;
}
.earn-target-link:hover { background: var(--panel-2); }

/* ── Empty state ─────────────────────────────────────── */
.earn-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
}
.earn-empty-icon { font-size: 3rem; margin-bottom: 16px; }
.earn-empty h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.earn-empty p  { font-size: .88rem; }

/* ── Alerts ──────────────────────────────────────────── */
.earn-announcement {
  background: rgba(245,197,24,.08);
  border: 1px solid rgba(245,197,24,.25);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: .85rem;
  margin-bottom: 16px;
}
.earn-alert {
  border-radius: 12px;
  padding: 12px 16px;
  font-size: .84rem;
  margin-bottom: 14px;
  line-height: 1.5;
}
.earn-alert.warning { background: rgba(249,115,22,.08); border: 1px solid rgba(249,115,22,.25); color: #fb923c; }
.earn-alert.info    { background: rgba(59,130,246,.08); border: 1px solid rgba(59,130,246,.25); color: #60a5fa; }
.earn-alert.success { background: rgba(16,185,129,.08); border: 1px solid rgba(16,185,129,.25); color: var(--green); }

/* ── Client dashboard ───────────────────────────────── */
.earn-client-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 16px;
}
.earn-client-stat {
  background: var(--panel-2);
  padding: 18px 12px;
  text-align: center;
}
.earn-client-stat-val {
  display: block;
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 6px;
}
.earn-client-stat-label {
  display: block;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}
.earn-create-campaign-btn {
  display: block;
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  color: #fff;
  border: none;
  border-radius: 16px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(99,102,241,.35);
  transition: transform .15s, box-shadow .15s;
}
.earn-create-campaign-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(99,102,241,.4); }

/* ── Campaign cards ─────────────────────────────────── */
.earn-campaigns-list { display: grid; gap: 14px; }
.earn-campaign-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
}
.earn-campaign-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.earn-campaign-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.earn-campaign-title { font-size: 1rem; font-weight: 700; margin: 0 0 6px; }
.earn-campaign-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.earn-campaign-cost { font-size: .82rem; }
.earn-pay-link {
  color: var(--accent);
  font-size: .82rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.earn-status-chip {
  padding: 4px 10px;
  border-radius: 99px;
  font-size: .72rem;
  font-weight: 700;
}
.earn-status-active    { background: rgba(16,185,129,.12); color: var(--green); }
.earn-status-paused    { background: rgba(249,115,22,.12); color: var(--orange); }
.earn-status-pending   { background: rgba(156,163,175,.12); color: var(--muted); }
.earn-status-completed { background: rgba(59,130,246,.12); color: var(--blue); }
.earn-status-cancelled { background: rgba(239,68,68,.12); color: var(--red); }
.earn-pay-confirmed { background: rgba(16,185,129,.12); color: var(--green); }
.earn-pay-pending   { background: rgba(249,115,22,.12); color: var(--orange); }
.earn-pay-rejected  { background: rgba(239,68,68,.12); color: var(--red); }

/* ── Modals ──────────────────────────────────────────── */
.earn-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(4px);
  z-index: 2000;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}
@media (min-width: 600px) {
  .earn-modal-overlay { align-items: center; padding: 20px; }
}
.earn-modal {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
@media (min-width: 600px) {
  .earn-modal { border-radius: 20px; max-width: 520px; }
  .earn-modal-lg { max-width: 680px; }
  .earn-modal-xl { max-width: 760px; }
}
.earn-modal-head {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  top: 0;
  background: var(--panel);
  z-index: 1;
}
.earn-modal-head h3 { margin: 0; font-size: 1.1rem; font-weight: 800; }
.earn-modal-close {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  color: var(--muted);
  font-size: 1rem;
  flex-shrink: 0;
}
.earn-modal-body { padding: 20px; flex: 1; }

/* ── Form fields ─────────────────────────────────────── */
.earn-form-field { margin-bottom: 16px; }
.earn-form-field label { display: block; font-size: .82rem; font-weight: 700; margin-bottom: 6px; color: var(--text-2, var(--muted)); }
.earn-form-field input,
.earn-form-field select,
.earn-form-field textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  font-family: inherit;
  font-size: .9rem;
  transition: border-color .15s;
}
.earn-form-field input:focus,
.earn-form-field select:focus,
.earn-form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.earn-field-hint { display: block; font-size: .75rem; color: var(--muted); margin-top: 5px; }
.earn-form-error {
  background: rgba(239,68,68,.08);
  border: 1px solid rgba(239,68,68,.25);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--red);
  font-size: .83rem;
}
.earn-form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.earn-submit-btn {
  display: block;
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 4px 14px rgba(99,102,241,.3);
  margin-top: 8px;
}
.earn-submit-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(99,102,241,.4); }
.earn-submit-btn:disabled { background: var(--panel-2); color: var(--muted); cursor: not-allowed; box-shadow: none; transform: none; box-shadow: none; }
.earn-upload-label {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px;
  border: 2px dashed var(--line);
  border-radius: 14px;
  cursor: pointer;
  transition: border-color .15s;
  font-size: .85rem;
  color: var(--muted);
  text-align: center;
}
.earn-upload-label:hover { border-color: var(--accent); color: var(--accent); }
.earn-upload-label input[type="file"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  top: 0;
  left: 0;
  pointer-events: none;
}
.earn-img-preview {
  width: 100%;
  max-height: 200px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--line);
  margin-top: 12px;
  background: var(--panel-3);
}

/* ── Bank details box ─────────────────────────────────── */
.earn-bank-details {
  background: var(--panel-3);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.earn-bank-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}
.earn-bank-row:last-child { border-bottom: none; }
.earn-bank-row span { font-size: .8rem; color: var(--muted); }

/* ── Withdrawal modal ─────────────────────────────────── */
.earn-balance-chip {
  background: rgba(16,185,129,.08);
  border: 1px solid rgba(16,185,129,.2);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: .85rem;
  margin-bottom: 16px;
  text-align: center;
}

/* ── Referral section ─────────────────────────────────── */
.earn-ref-code-wrap, .earn-ref-link-wrap { margin-bottom: 16px; }
.earn-ref-code-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--panel-3);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 6px;
}
.earn-ref-code {
  flex: 1;
  font-size: 1.2rem;
  font-weight: 900;
  font-family: monospace;
  letter-spacing: .08em;
  color: var(--accent);
}
.earn-ref-link { flex: 1; font-size: .75rem; color: var(--muted); word-break: break-all; }
.earn-copy-btn {
  flex-shrink: 0;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
  transition: background .15s;
}
.earn-copy-btn:hover { background: var(--panel); }
.earn-share-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.earn-share-btn {
  padding: 10px 16px;
  border-radius: 10px;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--line);
  color: #fff;
  text-decoration: none;
  transition: transform .15s;
  flex: 1;
  text-align: center;
}
.earn-share-btn:hover { transform: scale(1.03); }
.earn-share-whatsapp  { background: #25d366; border-color: #25d366; }
.earn-share-telegram  { background: #0088cc; border-color: #0088cc; }
.earn-share-twitter   { background: #1da1f2; border-color: #1da1f2; }
.earn-share-native    { background: var(--panel-2); color: var(--text); }
.earn-ref-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.earn-ref-stat {
  background: var(--panel-2);
  padding: 14px 10px;
  text-align: center;
}
.earn-ref-stat strong { display: block; font-size: 1.1rem; font-weight: 800; }
.earn-ref-stat span   { font-size: .65rem; color: var(--muted); font-weight: 600; text-transform: uppercase; }

/* ── History list ─────────────────────────────────────── */
.earn-history-list { display: flex; flex-direction: column; gap: 10px; }
.earn-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  background: var(--panel-3);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.earn-history-info { display: flex; align-items: flex-start; gap: 10px; flex: 1; min-width: 0; }
.earn-history-icon { font-size: 1.2rem; flex-shrink: 0; }

/* ── Notifications ────────────────────────────────────── */
.earn-notif-item {
  display: flex;
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  margin-bottom: 10px;
  align-items: flex-start;
}
.earn-notif-info    { background: rgba(59,130,246,.06); border: 1px solid rgba(59,130,246,.18); }
.earn-notif-success { background: rgba(16,185,129,.06); border: 1px solid rgba(16,185,129,.18); }
.earn-notif-error   { background: rgba(239,68,68,.06); border: 1px solid rgba(239,68,68,.18); }
.earn-notif-warning { background: rgba(249,115,22,.06); border: 1px solid rgba(249,115,22,.18); }
.earn-notif-icon { font-size: 1.3rem; flex-shrink: 0; }
.earn-notif-item p  { margin: 4px 0 0; font-size: .84rem; color: var(--muted); }

/* ── Campaign wizard ─────────────────────────────────── */
.earn-wizard-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 8px;
}
.earn-wizard-step {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--panel-3);
  border: 2px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .78rem;
  font-weight: 700;
  color: var(--muted);
  transition: .2s;
  flex-shrink: 0;
}
.earn-wizard-step.active { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 0 0 4px rgba(99,102,241,.2); }
.earn-wizard-step.done   { background: var(--green); border-color: var(--green); color: #fff; }
.earn-wizard-line {
  flex: 1;
  height: 2px;
  background: var(--line);
  margin: 0 2px;
}
.earn-wizard-pane-title {
  font-size: .95rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--muted);
}
.earn-wizard-nav { display: flex; gap: 10px; margin-top: 20px; }
.earn-wizard-next {
  flex: 1;
  padding: 13px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
}
.earn-wizard-back {
  padding: 13px 20px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
}
.earn-platform-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.earn-platform-select-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  background: var(--panel-3);
  border: 2px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  transition: .15s;
  color: var(--text);
}
.earn-platform-select-btn:hover,
.earn-platform-select-btn.active {
  border-color: var(--plat-color, var(--accent));
  background: rgba(0,0,0,.2);
  transform: scale(1.04);
}
.earn-plat-emoji { font-size: 1.5rem; }
.earn-plat-name  { font-size: .7rem; font-weight: 700; }
.earn-wiz-sub { font-size: .88rem; color: var(--muted); margin-bottom: 14px; }
.earn-action-list { display: grid; gap: 8px; margin-bottom: 4px; }
.earn-action-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--panel-3);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  font-size: .88rem;
  font-weight: 600;
  transition: .15s;
}
.earn-action-item:hover { border-color: var(--accent); background: rgba(99,102,241,.06); }
.earn-action-item input[type="radio"] { accent-color: var(--accent); width: 16px; height: 16px; flex-shrink: 0; }
.earn-budget-preview {
  padding: 10px 14px;
  background: rgba(99,102,241,.06);
  border: 1px solid rgba(99,102,241,.2);
  border-radius: 10px;
  font-size: .84rem;
  margin-top: 10px;
}
.earn-budget-breakdown { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.earn-budget-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-size: .88rem;
}
.earn-budget-row:last-child { border-bottom: none; }
.earn-budget-divider { border-top: 2px solid var(--line); margin-top: 4px; }
.earn-budget-commission { background: rgba(245,197,24,.04); }
.earn-budget-total { background: rgba(16,185,129,.06); font-weight: 800; font-size: 1rem; }
.earn-budget-total strong { color: var(--green); font-size: 1.1rem; }
.earn-payment-box { margin-bottom: 20px; }
.earn-payment-instruction {
  font-size: .88rem;
  color: var(--muted);
  margin-bottom: 14px;
  line-height: 1.6;
}

/* ── Toast ───────────────────────────────────────────── */
.earn-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  padding: 12px 24px;
  border-radius: 99px;
  font-size: .88rem;
  font-weight: 700;
  white-space: nowrap;
  max-width: 90vw;
  text-overflow: ellipsis;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
  animation: toastIn .3s ease;
}
@keyframes toastIn { from { transform: translateX(-50%) translateY(20px); opacity: 0; } to { transform: translateX(-50%) translateY(0); opacity: 1; } }
.earn-toast-success { background: var(--green); color: #fff; }
.earn-toast-warning { background: var(--orange); color: #fff; }
.earn-toast-error   { background: var(--red); color: #fff; }
.earn-loading { text-align: center; padding: 40px; color: var(--muted); font-size: .88rem; }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 540px) {
  .earn-stats-card, .earn-client-stats { grid-template-columns: 1fr 1fr; }
  .earn-ref-stats { grid-template-columns: 1fr 1fr; }
  .earn-platform-grid { grid-template-columns: repeat(4, 1fr); }
  .earn-stat-value { font-size: .95rem; }
  .earn-actions-row { flex-direction: column; }
  .earn-withdraw-btn { width: 100%; }
  .earn-form-grid-2 { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════
   EARN — TASK TYPE BADGES
══════════════════════════════════════════════════ */
.earn-type-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 99px;
  font-size: .67rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase;
}
.earn-type-social   { background: rgba(24,119,242,.12);   color: #60a5fa; border: 1px solid rgba(24,119,242,.2); }
.earn-type-promo    { background: rgba(139,92,246,.14);   color: #a78bfa; border: 1px solid rgba(139,92,246,.25); }
.earn-type-content  { background: rgba(234,179,8,.12);    color: #fbbf24; border: 1px solid rgba(234,179,8,.22); }
.earn-task-type-filter { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.earn-type-btn {
  padding: 6px 14px; border-radius: 99px; border: 1.5px solid var(--line-2);
  background: var(--panel); color: var(--muted); font-size: .78rem;
  font-weight: 600; cursor: pointer; transition: .2s;
}
.earn-type-btn.active {
  background: var(--accent); color: #111; border-color: var(--accent);
}

/* ══════════════════════════════════════════════════
   SERVICES MODULE
══════════════════════════════════════════════════ */
.svc-hero {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-bottom: 28px;
}
.svc-hero-btn {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 10px; padding: 28px 20px;
  border-radius: 20px; border: 1.5px solid var(--line-2);
  background: var(--panel); color: var(--text); font-weight: 700;
  font-size: 1rem; text-align: center; transition: .25s ease;
  cursor: pointer; text-decoration: none;
}
.svc-hero-btn:hover {
  border-color: var(--accent); background: rgba(245,197,24,.06);
  transform: translateY(-2px);
}
.svc-hero-btn .svc-hero-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
}
.svc-hero-btn span { color: var(--muted); font-size: .8rem; font-weight: 400; }
.svc-view-icon  { background: rgba(99,102,241,.12); }
.svc-post-icon  { background: rgba(245,197,24,.12); }

/* Service Cards */
.svc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.svc-card {
  background: var(--panel); border: 1.5px solid var(--line);
  border-radius: 18px; overflow: hidden; transition: .25s ease;
  display: flex; flex-direction: column;
  box-shadow: 0 2px 12px rgba(0,0,0,.12);
}
.svc-card:hover {
  border-color: rgba(245,197,24,.3);
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0,0,0,.2);
}
.svc-card-thumb {
  aspect-ratio: 16/9; overflow: hidden; position: relative;
  background: var(--panel-3);
}
.svc-card-thumb img {
  width: 100%; height: 100%; object-fit: cover; transition: .4s ease;
}
.svc-card:hover .svc-card-thumb img { transform: scale(1.06); }
.svc-card-body { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.svc-card-name { font-size: .95rem; font-weight: 800; margin: 0; }
.svc-card-cat {
  font-size: .74rem; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: .05em;
}
.svc-card-desc {
  font-size: .82rem; color: var(--muted); line-height: 1.55;
  overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  margin: 0;
}
.svc-card-loc {
  font-size: .78rem; color: var(--muted); display: flex;
  align-items: center; gap: 4px;
}
.svc-card-actions {
  display: flex; gap: 8px; padding: 12px 16px;
  border-top: 1px solid var(--line);
}
.svc-card-actions .button, .svc-card-actions .button-secondary {
  flex: 1; justify-content: center; font-size: .8rem; padding: 8px 10px;
}

/* Service Badges */
.svc-badge {
  position: absolute; top: 10px; left: 10px;
  padding: 4px 10px; border-radius: 99px;
  font-size: .68rem; font-weight: 800; letter-spacing: .04em;
  text-transform: uppercase; z-index: 2;
}
.svc-badge-featured { background: linear-gradient(135deg,#f59e0b,#d97706); color: #000; }
.svc-badge-top      { background: linear-gradient(135deg,#8b5cf6,#6d28d9); color: #fff; }
.svc-badge-new      { background: linear-gradient(135deg,#10b981,#059669); color: #fff; }

/* Service categories chips */
.svc-cats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.svc-cat-chip {
  padding: 7px 16px; border-radius: 99px; font-size: .8rem; font-weight: 600;
  border: 1.5px solid var(--line-2); background: var(--panel); color: var(--muted);
  cursor: pointer; transition: .2s;
}
.svc-cat-chip.active, .svc-cat-chip:hover {
  background: var(--accent); color: #111; border-color: var(--accent);
}

/* Service payment info box */
.svc-pay-box {
  background: rgba(245,197,24,.07); border: 1.5px solid rgba(245,197,24,.25);
  border-radius: 18px; padding: 22px; margin: 20px 0;
}
.svc-pay-box h4 { margin: 0 0 14px; font-size: 1rem; font-weight: 800; }
.svc-pay-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid rgba(245,197,24,.15); font-size: .9rem;
}
.svc-pay-row:last-child { border-bottom: 0; }
.svc-pay-row strong { font-size: 1.1rem; color: var(--accent); }
.svc-pay-amount {
  font-size: 2rem; font-weight: 900; color: var(--accent);
  text-align: center; margin: 14px 0 4px;
}
.svc-pay-duration { text-align: center; color: var(--muted); font-size: .82rem; margin-bottom: 16px; }

/* Gallery in detail page */
.svc-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px,1fr)); gap: 8px; margin: 16px 0; }
.svc-gallery img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: 10px; border: 1.5px solid var(--line); cursor: pointer;
  transition: .2s;
}
.svc-gallery img:hover { transform: scale(1.03); border-color: var(--accent); }

/* Detail page info rows */
.svc-info-row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 0; border-bottom: 1px solid var(--line); font-size: .9rem;
}
.svc-info-row:last-child { border-bottom: 0; }
.svc-info-label { color: var(--muted); min-width: 100px; font-size: .82rem; }
.svc-info-value { font-weight: 600; word-break: break-word; }

/* Screenshot upload modal */
.svc-proof-modal {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(10,13,20,.9); backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.svc-proof-card {
  background: var(--panel); border: 1.5px solid rgba(245,197,24,.25);
  border-radius: 22px; padding: 30px; max-width: 420px; width: 100%;
  text-align: center; box-shadow: 0 32px 80px rgba(0,0,0,.6);
  animation: slideUpFade .35s ease;
}

/* Status chips */
.svc-status {  display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px; border-radius: 99px; font-size: .72rem; font-weight: 700; }
.svc-status-pending  { background: rgba(245,197,24,.14); color: var(--accent); border: 1px solid rgba(245,197,24,.25); }
.svc-status-approved { background: rgba(16,185,129,.12); color: #34d399;       border: 1px solid rgba(16,185,129,.22); }
.svc-status-rejected { background: rgba(239,68,68,.12);  color: #f87171;       border: 1px solid rgba(239,68,68,.22); }

@media (max-width: 640px) {
  .svc-hero { grid-template-columns: 1fr; }
  /* 2 columns on mobile for compact, card-style display */
  .svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .svc-card-actions { flex-direction: column; gap: 6px; }
  .svc-card-actions .button,
  .svc-card-actions .button-secondary { flex: unset; width: 100%; }
  .svc-card-desc { -webkit-line-clamp: 2; }
  .svc-card-body { padding: 10px 12px; gap: 4px; }
  .svc-card-name { font-size: .86rem; }
  .svc-card-cat  { font-size: .68rem; }
}

/* ── Service Status Pills ────────────────────────────── */
.svc-status {
  padding: 3px 10px;
  border-radius: 99px;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.svc-status-pending  { background: rgba(245,158,11,.12); color: #f59e0b; }
.svc-status-approved { background: rgba(34,197,94,.12);  color: #22c55e; }
.svc-status-rejected { background: rgba(239,68,68,.12);  color: #ef4444; }

/* ── Featured / Sponsored Card Highlight ─────────────── */
.svc-card[data-featured="1"] {
  border-color: rgba(245,197,24,.45);
  box-shadow: 0 0 0 1px rgba(245,197,24,.2), 0 4px 24px rgba(245,197,24,.08);
}
.svc-card[data-featured="1"] .svc-card-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 2px rgba(245,197,24,.35);
  pointer-events: none;
}

/* ── Payment Info Box (Sponsor Page) ─────────────────── */
.svc-pay-box {
  background: var(--panel);
  border: 1.5px solid rgba(245,197,24,.25);
  border-radius: 20px;
  padding: 22px 24px;
  margin-bottom: 20px;
}
.svc-pay-box h4 {
  margin: 0 0 16px;
  font-size: 1rem;
  font-weight: 800;
}
.svc-pay-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-2);
  font-size: .88rem;
}
.svc-pay-row span { color: var(--muted); }
.svc-pay-amount {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--accent);
  text-align: center;
  margin: 18px 0 6px;
  letter-spacing: -.02em;
}
.svc-pay-duration {
  text-align: center;
  color: var(--muted);
  font-size: .8rem;
  margin: 0;
}