/* ══════════════════════════════════════════════════════
   TriniTasker v2 — Design System
   Navy-dark base · Gold accent · Inter typeface
══════════════════════════════════════════════════════ */

/* ── Tokens ──────────────────────────────────────────── */
:root {
  --bg:       #0B0F1A;
  --s1:       #111622;
  --s2:       #18203A;
  --s3:       #1E2744;
  --s4:       #253050;
  --s5:       #2C395C;
  --border:   rgba(212,175,55,.18);
  --border2:  rgba(255,255,255,.07);

  --gold:     #D4AF37;
  --gold-l:   #F0D060;
  --gold-d:   #AA8C2C;
  --gold-dim: rgba(212,175,55,.12);
  --gold-brd: rgba(212,175,55,.28);

  --text:     #E8EAF0;
  --muted:    rgba(232,234,240,.55);
  --muted2:   rgba(232,234,240,.28);

  --green:    #22C55E;
  --red:      #EF4444;
  --blue:     #3B82F6;
  --amber:    #F59E0B;

  --green-dim: rgba(34,197,94,.12);
  --red-dim:   rgba(239,68,68,.12);
  --blue-dim:  rgba(59,130,246,.12);
  --amber-dim: rgba(245,158,11,.12);

  --r:    12px;
  --r-sm:  8px;
  --r-lg: 18px;

  --sidebar-w: 240px;
  --topbar-h:  58px;
  --shadow: 0 4px 24px rgba(0,0,0,.45);
  --shadow-sm: 0 2px 10px rgba(0,0,0,.3);
}

/* ── Reset ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background:
    url('https://images.unsplash.com/photo-1506905925346-21bda4d32df4?auto=format&fit=crop&w=2070&q=80')
    no-repeat center center fixed;
  background-size: cover;
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(11,15,26,.88);
  z-index: -1;
  pointer-events: none;
}
a { color: var(--gold); text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; color: inherit; }
input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: var(--text);
  background: var(--s2);
  border: 1px solid var(--border2);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  outline: none;
  transition: border-color .2s;
  width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--gold-brd); }
input::placeholder { color: var(--muted2); }
select option { background: var(--s2); }
/* Checkboxes/radios must NOT inherit width:100% from the rule above —
   that was stretching every checkbox in the app (including the
   pre-existing Tasker Responsibility checkbox) to fill its container,
   pushing its label into a tiny sliver of remaining space. */
input[type="checkbox"], input[type="radio"] {
  width: auto; padding: 0; border: none; background: none;
  flex-shrink: 0;
}
img { display: block; max-width: 100%; }

/* ── Auth Screen ─────────────────────────────────────── */
.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: radial-gradient(ellipse at 20% 50%, rgba(212,175,55,.07) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(59,130,246,.06) 0%, transparent 50%),
              var(--bg);
}
.auth-card {
  background: var(--s1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
}
.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.logo-diamond {
  height: 34px;
  width: auto;
  border-radius: 50%;
  flex-shrink: 0;
}
.logo-diamond.sm { height: 26px; }
.logo-text {
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold-l), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -.3px;
}
.logo-text.sm { font-size: 16px; }
.auth-tagline {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 28px;
}
.task-teaser {
  background: linear-gradient(135deg, var(--s2), var(--s3));
  border: 1px solid rgba(212,175,55,.35);
  border-radius: 14px;
  padding: 18px;
  text-align: left;
  margin-bottom: 22px;
}
.tt-badge {
  display: inline-block;
  background: rgba(212,175,55,.15);
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.tt-title { font-size: 17px; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.tt-earn { font-size: 15px; font-weight: 700; color: var(--green); margin-bottom: 2px; }
.tt-loc { font-size: 12.5px; color: var(--muted); margin-bottom: 14px; }
.tt-bait { border-top: 1px solid rgba(255,255,255,.08); padding-top: 12px; }
.tt-bait-title { font-size: 12px; font-weight: 700; color: var(--gold); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .03em; }
.tt-bait ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 7px; }
.tt-bait li { font-size: 12.5px; color: var(--text); display: flex; align-items: center; gap: 8px; }
.tt-bait li i { color: var(--gold); width: 16px; text-align: center; flex-shrink: 0; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--muted2);
  font-size: 12px;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border2);
}
.auth-msg {
  margin-top: 14px;
  font-size: 13px;
  text-align: center;
  min-height: 20px;
}
.auth-msg.error { color: var(--red); }
.auth-msg.success { color: var(--green); }

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 600;
  transition: all .18s;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold-l), var(--gold));
  color: #0B0F1A;
}
.btn-primary:hover { opacity: .88; transform: translateY(-1px); }
.btn-secondary {
  background: var(--s3);
  border: 1px solid var(--border2);
  color: var(--text);
}
.btn-secondary:hover { background: var(--s4); }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--muted);
}
.btn-ghost:hover { border-color: var(--gold-brd); color: var(--gold); }
.btn-danger {
  background: var(--red-dim);
  border: 1px solid rgba(239,68,68,.3);
  color: var(--red);
}
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-google {
  background: var(--s3);
  border: 1px solid var(--border2);
  color: var(--text);
}
.btn-google:hover { border-color: var(--gold-brd); }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-xs { padding: 5px 10px; font-size: 12px; }
.btn-link { background: none; color: var(--muted); font-size: 13px; text-decoration: underline; margin-top: 10px; display: block; text-align: center; }
.btn-link:hover { color: var(--gold); }
.w-full { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* ── Tabs ────────────────────────────────────────────── */
.tab-row {
  display: flex;
  background: var(--s2);
  border-radius: var(--r-sm);
  padding: 3px;
  margin-bottom: 24px;
  gap: 3px;
}
.tab {
  flex: 1;
  padding: 8px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  transition: all .18s;
}
.tab.active {
  background: var(--gold-dim);
  color: var(--gold);
  border: 1px solid var(--gold-brd);
}

/* ── Fields ──────────────────────────────────────────── */
.field-group { margin-bottom: 16px; }
.field-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.field { display: block; }
textarea.field { resize: vertical; min-height: 90px; }

/* ── Sidebar ─────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--s1);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 200;
  transform: translateX(-100%);
  transition: transform .25s ease;
}
.sidebar.open { transform: translateX(0); }
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 199;
  display: none;
}
.sidebar-overlay.show { display: block; }
.sidebar-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--border2);
}
.sidebar-close {
  margin-left: auto;
  color: var(--muted);
  font-size: 16px;
  padding: 4px;
}
.sidebar-user {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border2);
}
.sidebar-user .u-name { font-weight: 700; font-size: 14px; }
.sidebar-user .u-role {
  font-size: 11px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.sidebar-user .u-bal {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.nav-list { list-style: none; flex: 1; overflow-y: auto; padding: 8px 0; }
.nav-list li a, .nav-list li button.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 18px;
  font-size: 14px;
  color: var(--muted);
  border-radius: 0;
  transition: all .15s;
  width: 100%;
  text-align: left;
  font-weight: 500;
}
.nav-list li button.nav-item:hover,
.nav-list li button.nav-item.active {
  color: var(--gold);
  background: var(--gold-dim);
}
.nav-list li button.nav-item .nav-icon { width: 18px; text-align: center; }
.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--border2);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.btn-nav-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--muted);
  transition: all .15s;
}
.btn-nav-foot:hover { color: var(--text); background: var(--s2); }

/* Desktop sidebar always open */
@media (min-width: 900px) {
  .sidebar { transform: translateX(0); }
  .sidebar-close { display: none; }
  .sidebar-overlay { display: none !important; }
  .topbar { left: var(--sidebar-w); }
  .main-content { margin-left: var(--sidebar-w); }
  .fab { left: calc(var(--sidebar-w) + 20px); }
}

/* ── Top Bar ─────────────────────────────────────────── */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  background: var(--s1);
  border-bottom: 1px solid var(--border2);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  z-index: 100;
}
.menu-btn { font-size: 18px; color: var(--muted); padding: 6px; }
.topbar-title { font-weight: 700; font-size: 15px; flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 4px; }
.icon-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  color: var(--muted);
  font-size: 16px;
  transition: all .15s;
}
.icon-btn:hover { color: var(--gold); background: var(--gold-dim); }
.wallet-bal { font-size: 12px; font-weight: 700; color: var(--gold); }
.notif-dot, .msg-dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 8px; height: 8px;
  background: var(--red);
  border-radius: 50%;
  border: 2px solid var(--s1);
}

/* ── Main Content ────────────────────────────────────── */
.main-content {
  margin-top: var(--topbar-h);
  min-height: calc(100vh - var(--topbar-h));
  padding: 24px 20px 100px;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}
@media (min-width: 900px) {
  .main-content {
    margin-left: var(--sidebar-w);
    max-width: calc(1100px + var(--sidebar-w));
    padding: 28px 32px 80px;
  }
}

/* ── FAB ─────────────────────────────────────────────── */
.fab {
  position: fixed;
  bottom: 28px;
  right: 24px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-l), var(--gold));
  color: #0B0F1A;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(212,175,55,.4);
  z-index: 90;
  transition: transform .18s, opacity .18s;
}
.fab:hover { transform: scale(1.08); }
.fab.hide { opacity: 0; pointer-events: none; }

/* ── Cards ───────────────────────────────────────────── */
.card {
  background: var(--s1);
  border: 1px solid var(--border2);
  border-radius: var(--r);
  padding: 20px;
}
.card-gold {
  background: var(--gold-dim);
  border-color: var(--gold-brd);
}
.card-green {
  background: var(--green-dim);
  border-color: var(--green);
}
.card-red {
  background: var(--red-dim);
  border-color: var(--red);
}
.stamp-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 6px;
}
.stamp-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--s3);
  color: var(--muted);
  font-size: 11px;
  border: 1px solid var(--border2);
}
.stamp-cell.stamp-filled {
  background: var(--gold-dim);
  border-color: var(--gold-brd);
  color: var(--gold);
  font-size: 13px;
}
.card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 700px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
@media (min-width: 700px) and (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* ── Stat Cards ──────────────────────────────────────── */
.stat-card {
  background: var(--s1);
  border: 1px solid var(--border2);
  border-radius: var(--r);
  padding: 18px;
}
.stat-label { font-size: 12px; color: var(--muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .5px; }
.stat-value { font-size: 26px; font-weight: 800; color: var(--gold); line-height: 1; }
.stat-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ── Task Cards ──────────────────────────────────────── */
.task-card {
  background: var(--s1);
  border: 1px solid var(--border2);
  border-radius: var(--r);
  padding: 18px;
  transition: border-color .18s, transform .18s;
  cursor: pointer;
}
.task-card:hover { border-color: var(--gold-brd); transform: translateY(-2px); }
.task-card .tc-title { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.task-card .tc-desc { font-size: 13px; color: var(--muted); margin-bottom: 12px; line-height: 1.5; }
.task-card .tc-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.task-card .tc-budget { font-size: 18px; font-weight: 800; color: var(--gold); }
.task-card .tc-loc { font-size: 12px; color: var(--muted); }
.task-card .tc-bids { font-size: 12px; color: var(--muted); }

/* ── Badges / Pills ──────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.badge-gold    { background: var(--gold-dim); color: var(--gold); border: 1px solid var(--gold-brd); }
.badge-green   { background: var(--green-dim); color: var(--green); }
.badge-red     { background: var(--red-dim); color: var(--red); }
.badge-blue    { background: var(--blue-dim); color: var(--blue); }
.badge-amber   { background: var(--amber-dim); color: var(--amber); }
.badge-muted   { background: var(--s3); color: var(--muted); }

/* ── Tables ──────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--r-sm); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { padding: 10px 14px; text-align: left; color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; border-bottom: 1px solid var(--border2); }
td { padding: 12px 14px; border-bottom: 1px solid var(--border2); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,.02); }

/* ── Modal ───────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  z-index: 300;
  display: none;
}
.modal-backdrop.open { display: block; }
.modal-container {
  position: fixed;
  inset: 0;
  z-index: 301;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  pointer-events: none;
}
.modal {
  background: var(--s1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px;
  box-shadow: var(--shadow);
  pointer-events: all;
  animation: modalIn .2s ease;
}
.modal.wide { max-width: 760px; }
@keyframes modalIn {
  from { opacity: 0; transform: scale(.95) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-close {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--s3);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.modal-close:hover { background: var(--s4); color: var(--text); }
.modal-footer { margin-top: 20px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* ── Toast ───────────────────────────────────────────── */
.toast-stack {
  position: fixed;
  bottom: 90px;
  right: 20px;
  z-index: 500;
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--s2);
  border: 1px solid var(--border2);
  border-radius: var(--r-sm);
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 500;
  max-width: 320px;
  box-shadow: var(--shadow-sm);
  animation: toastIn .22s ease;
  pointer-events: all;
  display: flex;
  align-items: center;
  gap: 10px;
}
.toast.success { border-color: rgba(34,197,94,.35); }
.toast.error   { border-color: rgba(239,68,68,.35); }
.toast.warning { border-color: rgba(245,158,11,.35); }
.toast .t-icon { font-size: 15px; }
.toast.success .t-icon { color: var(--green); }
.toast.error   .t-icon { color: var(--red); }
.toast.warning .t-icon { color: var(--amber); }
.toast.info    .t-icon { color: var(--blue); }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Page Loader / Spinner ───────────────────────────── */
.page-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Empty State ─────────────────────────────────────── */
.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}
.empty i { font-size: 40px; margin-bottom: 14px; opacity: .4; }
.empty h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.empty p { font-size: 13px; line-height: 1.6; }

/* ── Page Header ─────────────────────────────────────── */
.page-header {
  margin-bottom: 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.page-header h1 { font-size: 22px; font-weight: 800; }
.page-header p { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* ── Section Heading ─────────────────────────────────── */
.section-head {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin: 24px 0 12px;
}

/* ── Avatar ──────────────────────────────────────────── */
.avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--gold-dim);
  border: 2px solid var(--gold-brd);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  color: var(--gold);
  flex-shrink: 0;
  overflow: hidden;
}
.avatar.lg { width: 56px; height: 56px; font-size: 22px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ── User Row ────────────────────────────────────────── */
.user-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.user-info .u-name { font-size: 14px; font-weight: 600; }
.user-info .u-sub  { font-size: 12px; color: var(--muted); }

/* ── Search / Filter Bar ─────────────────────────────── */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.filter-bar .field {
  max-width: 220px;
  width: auto;
  flex: 1;
  min-width: 140px;
}
.filter-bar select.field { max-width: 160px; }

/* ── Bid Card ────────────────────────────────────────── */
.bid-card {
  background: var(--s2);
  border: 1px solid var(--border2);
  border-radius: var(--r-sm);
  padding: 14px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.bid-card .bid-amount { font-size: 18px; font-weight: 800; color: var(--gold); min-width: 80px; }
.bid-card .bid-note { font-size: 13px; color: var(--muted); flex: 1; }
.bid-card .bid-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ── Message Thread ──────────────────────────────────── */
.msg-list { display: flex; flex-direction: column; gap: 6px; max-height: 380px; overflow-y: auto; padding: 4px 0; }
.msg-bubble {
  max-width: 72%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.5;
}
.msg-bubble.mine { align-self: flex-end; background: var(--gold-dim); border: 1px solid var(--gold-brd); }
.msg-bubble.theirs { align-self: flex-start; background: var(--s3); }
.msg-bubble .msg-time { font-size: 10px; color: var(--muted2); margin-top: 4px; text-align: right; }

/* ── Progress Bar ────────────────────────────────────── */
.progress-bar { height: 6px; background: var(--s3); border-radius: 10px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--gold-d), var(--gold)); border-radius: 10px; transition: width .4s; }

/* ── Star Rating ─────────────────────────────────────── */
.stars { display: flex; gap: 3px; }
.stars i { font-size: 14px; color: var(--gold); }
.stars i.empty { color: var(--s4); }

/* ── Notification Item ───────────────────────────────── */
.notif-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background .15s;
}
.notif-item:hover { background: var(--s2); }
.notif-item.unread { background: var(--gold-dim); }
.notif-item .ni-icon { width: 34px; height: 34px; border-radius: 50%; background: var(--s3); display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.notif-item .ni-text { font-size: 13px; line-height: 1.5; }
.notif-item .ni-time { font-size: 11px; color: var(--muted2); margin-top: 2px; }

/* ── Verification Badge ──────────────────────────────── */
.verified-badge { color: var(--blue); font-size: 14px; }

/* ── PayPal Button Container ─────────────────────────── */
#paypal-button-container { min-height: 50px; }

/* ── Inline Loader ───────────────────────────────────── */
.inline-loader {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
.inline-loader .spinner { width: 18px; height: 18px; border-width: 2px; }

/* ── Section Tabs (sub-nav) ──────────────────────────── */
.section-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 20px;
  scrollbar-width: none;
}
.section-tabs::-webkit-scrollbar { display: none; }
.section-tab {
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  border: 1px solid transparent;
  transition: all .15s;
}
.section-tab.active { background: var(--gold-dim); color: var(--gold); border-color: var(--gold-brd); }
.section-tab:hover:not(.active) { background: var(--s2); }

/* ── Reward / Badge Card ─────────────────────────────── */
.reward-card {
  background: var(--s1);
  border: 1px solid var(--border2);
  border-radius: var(--r);
  padding: 16px;
  text-align: center;
  transition: border-color .18s;
}
.reward-card:hover { border-color: var(--gold-brd); }
.reward-card .rc-icon { font-size: 36px; margin-bottom: 10px; }
.reward-card .rc-name { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.reward-card .rc-pts { font-size: 13px; color: var(--gold); font-weight: 700; }
.reward-card .rc-desc { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.5; }

/* ── Admin Sidebar Layout ────────────────────────────── */
.admin-layout { display: flex; gap: 20px; align-items: flex-start; }
.admin-nav {
  width: 200px;
  flex-shrink: 0;
  background: var(--s1);
  border: 1px solid var(--border2);
  border-radius: var(--r);
  padding: 8px;
  position: sticky;
  top: calc(var(--topbar-h) + 12px);
}
.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--muted);
  width: 100%;
  text-align: left;
  transition: all .15s;
}
.admin-nav-item:hover, .admin-nav-item.active { background: var(--gold-dim); color: var(--gold); }
.admin-body { flex: 1; min-width: 0; }
@media (max-width: 700px) {
  .admin-layout { flex-direction: column; }
  .admin-nav { width: 100%; position: static; }
  .section-tabs { margin-bottom: 16px; }
}

/* ── Escrow Steps ────────────────────────────────────── */
.escrow-steps { display: flex; gap: 0; margin: 20px 0; }
.escrow-step {
  flex: 1;
  text-align: center;
  position: relative;
  padding-top: 10px;
}
.escrow-step::before {
  content: '';
  position: absolute;
  top: 18px;
  left: -50%;
  right: 50%;
  height: 2px;
  background: var(--s4);
}
.escrow-step:first-child::before { display: none; }
.escrow-step.done::before { background: var(--gold); }
.escrow-step .step-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--s4);
  border: 2px solid var(--s5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  margin: 0 auto 8px;
}
.escrow-step.done .step-dot { background: var(--gold); border-color: var(--gold-l); color: #0B0F1A; }
.escrow-step.active .step-dot { border-color: var(--gold); color: var(--gold); }
.escrow-step .step-label { font-size: 11px; color: var(--muted); }

/* ── Utility ─────────────────────────────────────────── */
.mt-4  { margin-top: 4px;  }
.mt-8  { margin-top: 8px;  }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8  { margin-bottom: 8px;  }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.gap-8 { gap: 8px; }
.flex  { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.wrap  { flex-wrap: wrap; }
.bold  { font-weight: 700; }
.text-gold   { color: var(--gold); }
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }
.text-muted  { color: var(--muted); }
.text-sm     { font-size: 13px; }
.text-xs     { font-size: 11px; }
.text-center { text-align: center; }
.truncate    { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
hr.divider   { border: none; border-top: 1px solid var(--border2); margin: 16px 0; }

/* ── Glassmorphism on panels ───────────────────────────────── */
.sidebar, .topbar, .auth-card, .card, .modal, .stat-card, .reward-card, .task-card {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.sidebar  { background: rgba(17,22,34,.92); }
.topbar   { background: rgba(17,22,34,.92); }
.auth-card{ background: rgba(17,22,34,.92); }
.card     { background: rgba(17,22,34,.82); }
.stat-card{ background: rgba(17,22,34,.82); }
.task-card{ background: rgba(17,22,34,.82); }
.modal    { background: rgba(17,22,34,.96); }

/* ── Crown logo animation ──────────────────────────────────── */
.logo-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.logo-crown-float {
  position: absolute;
  top: -24px;
  left: 10px;
  font-size: 18px;
  color: #FFD700;
  text-shadow: 0 0 10px rgba(255,215,0,.7);
  opacity: 0;
  transition: opacity .3s, top .3s;
  pointer-events: none;
}
.logo-wrap:hover .logo-crown-float {
  opacity: 1;
  top: -30px;
  animation: crownFloat 2s ease-in-out infinite;
  text-shadow: 0 0 20px rgba(255,215,0,1);
}
@keyframes crownFloat {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}

/* ── Urgency badges ────────────────────────────────────────── */
.urgency {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.urgency-critical {
  background: linear-gradient(135deg,#EF4444,#DC2626);
  color: #fff;
  animation: pulseCritical 1.5s infinite;
}
.urgency-high   { background: linear-gradient(135deg,#F97316,#EA580C); color:#fff; }
.urgency-medium { background: linear-gradient(135deg,#EAB308,#CA8A04); color:#0B0F1A; }
.urgency-low    { background: linear-gradient(135deg,#10B981,#059669); color:#fff; }
@keyframes pulseCritical {
  0%,100% { box-shadow: 0 0 0 0 rgba(239,68,68,.6); }
  50%      { box-shadow: 0 0 0 8px rgba(239,68,68,0); }
}

/* ── Skill level badges ────────────────────────────────────── */
.skill-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
}
.skill-beginner    { background:rgba(34,197,94,.15);  color:#22C55E; border:1px solid rgba(34,197,94,.3); }
.skill-intermediate{ background:rgba(59,130,246,.15); color:#3B82F6; border:1px solid rgba(59,130,246,.3); }
.skill-expert      { background:rgba(139,92,246,.15); color:#8B5CF6; border:1px solid rgba(139,92,246,.3); }

/* ── Urgency filter pills on Browse ───────────────────────── */
.urgency-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.urgency-filter-btn {
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border2);
  color: var(--muted);
  background: var(--s2);
  cursor: pointer;
  transition: all .15s;
}
.urgency-filter-btn.active,
.urgency-filter-btn:hover { border-color: var(--gold-brd); color: var(--gold); background: var(--gold-dim); }

/* ── Performance metrics grid ──────────────────────────────── */
.perf-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 10px;
  margin-top: 12px;
}
.perf-metric {
  background: rgba(212,175,55,.05);
  border: 1px solid var(--border2);
  border-radius: var(--r-sm);
  padding: 12px;
  text-align: center;
}
.perf-metric .pm-label { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.perf-metric .pm-value { font-size: 20px; font-weight: 800; color: var(--gold); }

/* ── Responsibility agreement box ──────────────────────────── */
.legal-agree-row {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 12px; color: var(--muted); line-height: 1.5;
  margin: 12px 0; cursor: pointer;
}
.legal-agree-row input { margin-top: 2px; accent-color: var(--gold); flex-shrink: 0; }
.legal-agree-row a { color: var(--blue); }
.auth-legal-link {
  display: block; width: 100%; text-align: center; margin-top: 16px;
  background: none; border: none; color: var(--muted); font-size: 11.5px;
  text-decoration: underline; cursor: pointer;
}
.legal-modal .legal-section { max-height: none; }
.legal-page { max-width: 760px; margin: 0 auto; padding-bottom: 60px; }
.legal-h1 { font-size: 24px; font-weight: 800; color: var(--gold); margin-bottom: 4px; }
.legal-toc {
  background: var(--s2); border: 1px solid var(--s4); border-radius: 12px;
  padding: 16px; margin-bottom: 24px;
  display: flex; flex-wrap: wrap; gap: 10px 16px;
}
.legal-toc-title { width: 100%; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; margin-bottom: 4px; }
.legal-toc a { font-size: 12.5px; color: var(--blue); text-decoration: none; }
.legal-toc a:hover { text-decoration: underline; }
.legal-section { padding: 24px 0; border-bottom: 1px solid var(--s3); }
.legal-section:last-child { border-bottom: none; }
.legal-section h2 { font-size: 18px; font-weight: 800; color: var(--text); margin-bottom: 12px; scroll-margin-top: 80px; }
.legal-section h3 { font-size: 14px; font-weight: 700; color: var(--gold); margin: 16px 0 6px; }
.legal-section p, .legal-section li { font-size: 13.5px; color: var(--muted); line-height: 1.7; }
.legal-section ul { padding-left: 20px; margin: 8px 0; }
.legal-section li { margin-bottom: 4px; }
.legal-table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 12.5px; }
.legal-table th, .legal-table td { text-align: left; padding: 8px 10px; border: 1px solid var(--s4); }
.legal-table th { background: var(--s2); color: var(--gold); }
.legal-table td { color: var(--muted); }
.file-list { display: flex; flex-direction: column; gap: 6px; }
.file-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 8px;
  background: var(--s2); border: 1px solid var(--s4);
  font-size: 12.5px; color: var(--text); text-decoration: none;
  transition: border-color .15s ease;
}
.file-chip:hover { border-color: var(--gold); }
.file-chip i { color: var(--gold); width: 16px; text-align: center; }
.toggle-row { display: flex; gap: 10px; flex-wrap: wrap; }
.toggle-opt {
  flex: 1; min-width: 160px;
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--s4); background: var(--s2);
  font-size: 13px; cursor: pointer; transition: border-color .15s ease;
}
.toggle-opt:has(input:checked) { border-color: var(--gold); background: var(--s3); }
.toggle-opt input { accent-color: var(--gold); }
.responsibility-box {
  background: rgba(59,130,246,.08);
  border: 1px solid rgba(59,130,246,.3);
  border-radius: var(--r-sm);
  padding: 14px;
  margin: 16px 0;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.responsibility-box input[type=checkbox] { margin-top: 3px; accent-color: var(--blue); flex-shrink:0; }
.responsibility-box .rb-title { color: var(--blue); font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.responsibility-box .rb-text  { color: var(--muted); font-size: 12px; line-height: 1.6; }
