/* ==========================================================================
   Creator dashboard, builds on styles.css
   ========================================================================== */

.dash {
  --side-w: 272px;
  --panel: var(--card); /* solid: the lava background must never show through panels */
  --panel-line: rgba(243, 239, 230, 0.08);
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px -12px rgba(0, 0, 0, .12);
}

.dash svg:not([fill]) { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.btn-sm { height: 38px; padding: 0 18px !important; font-size: 14px; gap: 8px; }
.btn.full { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn .lock { width: 16px; height: 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- Sidebar ---------- */

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: var(--side-w);
  display: flex;
  flex-direction: column;
  padding: 36px 20px 24px;
  background: var(--card-2);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-right: 1px solid var(--panel-line);
  overflow-y: auto;
}
.sidebar .brand { font-size: 34px; padding: 0 16px; margin-bottom: 40px; }

.side-nav { display: flex; flex-direction: column; gap: 4px; }
.side-nav a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 15px;
  color: var(--ink-2);
  transition: background .15s, color .15s;
}
.side-nav a svg { width: 21px; height: 21px; flex: none; }
.side-nav a:hover { background: var(--card); color: var(--ink); }
.side-nav a[aria-current="page"] {
  background: var(--card);
  color: var(--ink);
  font-weight: 600;
  box-shadow: var(--shadow);
}
.side-nav .nav-levelup { position: relative; margin-top: 21px; }
.side-nav .nav-levelup::before { content: ""; position: absolute; left: 0; right: 0; top: -13px; border-top: 1px solid var(--panel-line); }
/* Tabs that aren't built yet (SOON in dashboard.js): visible, but nothing happens on click */
.dash a.is-soon { cursor: default; }
.side-nav a.is-soon { padding-right: 8px; color: var(--muted); white-space: nowrap; }
.side-nav a.is-soon .soon { padding: 2px 6px; font-size: 10px; }
.side-nav a.is-soon:hover { background: none; }
.dash main a.is-soon, .account-panel a.is-soon { opacity: .45; pointer-events: none; }
.levelup-card.is-soon { cursor: default; }
.levelup-card.is-soon:hover { transform: none; }
.levelup-card .soon { display: inline-block; margin: 14px 0 0; background: rgba(243, 239, 230, .08); }

.soon, .plan-pill {
  margin-left: auto;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(243, 239, 230, .06);
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}
.plan-pill { background: var(--accent); color: var(--on-accent); }

.levelup-card {
  position: relative;
  display: block;
  margin: 28px 0 0;
  padding: 26px 22px;
  border-radius: 16px;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(160deg, rgba(255, 176, 32, .14), #33270f 60%, #33270f);
  transition: transform .2s;
}
.levelup-card:hover { transform: translateY(-2px); }
.levelup-card::before {
  content: "";
  position: absolute; z-index: -1;
  width: 160px; height: 160px; right: -50px; bottom: -60px;
  border-radius: 50%;
  background: var(--magenta);
  filter: blur(40px);
  opacity: .45;
}
.levelup-card svg { width: 38px; height: 38px; margin: 0 auto 18px; display: block; animation: twinkle 5s ease-in-out infinite; }
.levelup-card p {
  margin: 0;
  font-size: 13px;
  letter-spacing: .38em;
  text-transform: uppercase;
  line-height: 1.8;
}
.levelup-card span { display: block; margin-top: 14px; font-size: 13px; font-weight: 600; }

.side-foot { margin-top: auto; padding: 28px 8px 0; }
.side-foot strong { display: block; font-family: var(--display); font-weight: 800; font-stretch: 112%; font-size: 18px; }
.side-foot span { display: block; margin-top: 6px; font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); line-height: 1.7; }

.sidebar-scrim { display: none; }

/* ---------- Main + topbar ---------- */

.dash-main {
  margin-left: var(--side-w);
  min-height: 100vh;
  padding: 0 clamp(20px, 3.4vw, 52px) 64px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding: 24px 0 16px;
}
.topbar::before {
  content: "";
  position: absolute;
  inset: 0 -52px;
  z-index: -1;
  background: linear-gradient(var(--bg) 55%, transparent);
}

.icon-btn {
  position: relative;
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  transition: background .15s;
}
.icon-btn:hover { background: rgba(255,255,255,.9); }
.icon-btn svg { width: 22px; height: 22px; }
.menu-btn { display: none; margin-right: auto; }
.bell .dot {
  position: absolute; top: 9px; right: 10px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--magenta);
  box-shadow: 0 0 0 2px var(--bg);
}

.search { position: relative; width: min(280px, 100%); }
.search > svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--muted); }
.search input {
  width: 100%;
  height: 46px;
  padding: 0 14px 0 42px;
  border: 1px solid var(--panel-line);
  border-radius: 10px;
  background: var(--card);
  font: inherit;
  font-size: 14px;
}
.search input:focus { outline: none; border-color: var(--ink); }
.search-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  margin: 0; padding: 6px;
  list-style: none;
  background: var(--card);
  border: 1px solid var(--panel-line);
  border-radius: 12px;
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.6);
}
.search-results a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 8px; font-size: 14px; }
.search-results a:hover { background: var(--card-2); }
.search-results a span { color: var(--muted); font-size: 12px; }
.search-results .none { padding: 10px 12px; font-size: 14px; color: var(--muted); }

.avatar {
  width: 46px; height: 46px;
  border: 0; border-radius: 50%;
  background: linear-gradient(135deg, #1a1a1a, #3d2c0c);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  box-shadow: 0 0 0 3px var(--card);
}

.avatar { overflow: hidden; padding: 0; }
.avatar > span { display: grid; place-items: center; width: 100%; height: 100%; }
.avatar img, .avatar-lg img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.avatar-lg { overflow: hidden; }
.avatar-edit { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; }
.avatar-edit b { display: block; font-size: 14px; }
.avatar-edit .muted { display: block; margin-top: 2px; }
.avatar-actions { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.avatar-actions label.btn { display: inline-flex; margin: 0; cursor: pointer; }
.avatar-actions input[type="file"] { display: none; }

.pop { position: relative; }
.pop-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 320px;
  padding: 16px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--panel-line);
  box-shadow: 0 20px 50px -14px rgba(0, 0, 0, 0.6);
}
.pop-panel h4 { margin: 0 0 8px; font-size: 14px; }
.pop-panel ul { margin: 0; padding: 0; list-style: none; }
.pop-panel li { padding: 12px 0; border-top: 1px solid var(--panel-line); font-size: 13.5px; }
.pop-panel li b { display: block; }
.pop-panel li span { display: block; color: var(--ink-2); margin-top: 2px; }
.pop-panel li time { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
.account-panel { width: 220px; padding: 10px; }
.account-panel .acc-name { margin: 6px 10px 0; font-weight: 600; }
.account-panel .acc-email { margin: 2px 10px 0; font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-panel .acc-plan { margin: 0 10px 8px; font-size: 13px; color: var(--muted); }
.account-panel a,
.account-panel button {
  display: block; width: 100%;
  padding: 10px; border: 0; border-radius: 8px;
  background: none; text-align: left; font-size: 14px;
}
.account-panel a:hover, .account-panel button:hover { background: var(--card-2); }

/* ---------- Shared page pieces ---------- */

.tab { animation: tab-in .35s ease; }
@keyframes tab-in { from { opacity: 0; transform: translateY(8px); } }

.page-head { margin: 8px 0 32px; }
.page-head .eyebrow { margin: 0; }
.page-head h1 {
  margin: 10px 0 0;
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 112%;
  font-size: clamp(36px, 4.6vw, 60px);
  letter-spacing: -.035em;
  line-height: 1;
}
.page-sub { margin: 14px 0 0; max-width: 620px; font-size: 15.5px; color: var(--ink-2); letter-spacing: .02em; }
.page-head.center { text-align: center; }
.page-head.center .page-sub { margin-left: auto; margin-right: auto; }

.panel {
  border: 1px solid var(--panel-line);
  border-radius: 16px;
  background: var(--panel);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}
.panel { padding: 26px; margin-bottom: 20px; }
.panel h2 { margin: 0 0 18px; font-size: 17px; font-weight: 600; }
.panel h2.mt { margin-top: 32px; }

.two-col { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
.two-col > .panel { margin-bottom: 0; }
.two-col { margin-bottom: 20px; } /* same gap as between panels, so the next one doesn't touch */
.span-2 { grid-column: 1 / -1; }
.sticky { position: sticky; top: 96px; }
.sticky .eyebrow { margin: 0 0 12px; }
.sticky .btn { margin-top: 14px; }

.grow { flex: 1; min-width: 0; }

.app-tile {
  display: inline-grid; place-items: center;
  width: 46px; height: 46px; flex: none;
  border-radius: 10px;
  background: var(--c, #222);
  color: #fff;
  font-family: var(--display);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -.01em;
}
.app-tile.add { background: var(--card); color: var(--ink); border: 1px solid var(--panel-line); font-weight: 400; font-size: 22px; }

.status { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.status.ok { background: rgba(90, 210, 140, .14); color: #6fdc9a; }
.status.ok::before { content: "● "; font-size: 9px; vertical-align: 1px; }

.tag { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--panel-line); background: var(--card); font-size: 12px; white-space: nowrap; }

.verified {
  display: inline-grid; place-items: center;
  width: 17px; height: 17px;
  border-radius: 50%;
  background: #3b6cf6;
  color: #fff;
  vertical-align: -2px;
}
.verified svg { width: 11px; height: 11px; stroke-width: 3; }

.avatar-lg {
  display: grid; place-items: center;
  width: 76px; height: 76px; flex: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #111, #3d2c0c 70%, #7a5410);
  color: #fff;
  font-family: var(--display);
  font-weight: 800;
  font-size: 24px;
}

/* ---------- Home ---------- */

.home-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-top: 8px; }
.welcome-hi { margin: 0; font-size: 24px; }
.welcome h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 112%;
  font-size: clamp(48px, 5.4vw, 72px);
  letter-spacing: -.04em;
  line-height: 1;
}

.passport-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  width: min(480px, 100%);
  padding: 24px 150px 24px 28px;
  border-radius: 16px;
  background: linear-gradient(120deg, var(--card), #33270f);
  border: 1px solid var(--panel-line);
  box-shadow: var(--shadow);
  transition: transform .2s;
}
.passport-card:hover { transform: translateY(-2px); }
.passport-card .eyebrow { margin: 0; color: var(--ink); }
.passport-card p:last-child { margin: 8px 0 0; font-size: 14px; color: var(--ink-2); }
.passport-mini {
  position: absolute; right: 28px; top: 50%;
  width: 104px; height: 104px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border-radius: 12px;
  background: linear-gradient(150deg, var(--card) 10%, #33270f 60%, #33270f);
  box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .45);
  transform: translateY(-50%) rotate(-10deg);
  transition: transform .3s;
}
.passport-card:hover .passport-mini { transform: translateY(-50%) rotate(-4deg) scale(1.04); }
.passport-mini svg { width: 36px; height: 36px; order: 2; }
.passport-mini span { font-family: var(--display); font-weight: 800; font-size: 15px; }

.hero-banner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  margin: 32px 0 24px;
  min-height: 210px;
  border-radius: 18px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(60% 120% at 85% 50%, rgba(255, 176, 32, .55), transparent 70%),
    radial-gradient(40% 80% at 65% 110%, rgba(255, 176, 32, .7), transparent 70%),
    linear-gradient(100deg, #33270f 30%, #33270f);
  border: 1px solid var(--panel-line);
}
.hero-banner-copy { padding: 34px 32px; position: relative; }
.hero-banner h2 { margin: 0; font-family: var(--display); font-weight: 800; font-stretch: 108%; font-size: 30px; letter-spacing: -.02em; }
.hero-banner p { margin: 10px 0 0; max-width: 380px; font-size: 15px; letter-spacing: .06em; color: var(--ink-2); }
.progress { display: inline-block; vertical-align: middle; width: min(400px, 70%); height: 6px; margin: 22px 14px 0 0; border-radius: 99px; background: rgba(243, 239, 230, .1); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .6s ease; }
.progress-label { font-size: 14px; vertical-align: -9px; }
.hero-banner .btn { display: flex; width: max-content; margin-top: 22px; height: 48px; padding: 0 26px; }

.hero-banner-art { position: relative; }
.hero-banner-art > svg {
  position: absolute; left: 50%; top: 50%;
  width: 90px; height: 90px;
  transform: translate(-50%, -50%);
  animation: spin-slow 16s linear infinite;
  filter: drop-shadow(0 6px 18px rgba(120, 20, 90, .35));
}
@keyframes spin-slow { to { transform: translate(-50%, -50%) rotate(360deg); } }
.ring {
  position: absolute; left: 50%; top: 50%;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.7);
  transform: translate(-50%, -50%);
}
.ring.r1 { width: 150px; height: 150px; }
.ring.r2 { width: 260px; height: 260px; border-color: rgba(255,255,255,.5); }
.ring.r3 { width: 380px; height: 380px; border-color: rgba(255,255,255,.35); }

.swatch {
  position: relative;
  display: grid; place-items: center;
  border-radius: 8px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 12px;
  overflow: hidden;
}
.swatch.dark  { background: #26211a; color: #fff; }
.swatch.light { background: var(--card-2); color: var(--ink); }
.swatch.glow  { background: radial-gradient(circle at 50% 30%, #33270f, #3a2a08 60%, #111); color: #fff; }
.swatch.star  { background: #26211a; color: #fff; }
.swatch.star > svg { width: 26px; height: 26px; }
.swatch.frame { background: #26211a; color: #fff; box-shadow: inset 0 0 0 5px #ffb020; }

/* ---------- Forms ---------- */

.form label { display: block; margin-bottom: 16px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.form input:not([type="checkbox"]):not([type="radio"]),
.form select,
.form textarea,
.connect-form input,
.connect-form select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 11px 13px;
  border: 1px solid rgba(243, 239, 230, .16);
  border-radius: 9px;
  background: var(--card);
  font: inherit;
  font-size: 15px;
  font-weight: 400;
  color: var(--ink);
}
.form textarea { resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus, .connect-form input:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(255, 176, 32, .2);
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 16px; }
.form-actions { display: flex; justify-content: flex-end; margin-top: 8px; }
.form-actions .btn { height: 46px; padding: 0 30px; }

.chip-set { margin: 0 0 8px; padding: 0; border: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip-set legend { margin-bottom: 8px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.form .chip { margin: 0; }

.secure-note { display: flex; gap: 10px; margin: 6px 0 0; padding: 12px 14px; border-radius: 10px; background: var(--card-2); font-size: 13px; color: var(--ink-2); }
.secure-note .lock { width: 18px; height: 18px; flex: none; }

/* ---------- Share Passport ---------- */

.share-live { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 24px; padding: 14px 16px; border-radius: 12px; background: var(--card-2); }
.share-live a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.share-live.is-off a { color: var(--muted); }
.share-live .status:not(.ok) { background: var(--card-2); color: var(--muted); }
.slug-field { display: flex; align-items: stretch; margin-top: 6px; border: 1px solid rgba(243, 239, 230, .14); border-radius: 10px; background: var(--card); overflow: hidden; }
.slug-field > span { display: flex; align-items: center; padding: 0 4px 0 14px; color: var(--muted); font-weight: 400; white-space: nowrap; }
.form .slug-field input:not([type="checkbox"]) { flex: 1; min-width: 0; margin: 0; border: 0; border-radius: 0; padding-left: 0; }
.slug-field small { display: block; }
.slug-copy { flex: none; padding: 0 16px; border: 0; border-left: 1px solid rgba(243, 239, 230, .14); background: var(--card); color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.slug-copy:hover { background: var(--card-2); }
.form h2 .plan-pill { margin-left: 8px; vertical-align: 2px; }
.check-row { display: flex !important; align-items: center; gap: 10px; font-weight: 400 !important; }
.check-row input { width: 18px; height: 18px; accent-color: var(--ink); }
.link-rows { display: grid; gap: 8px; margin: 0 0 12px; padding: 0; list-style: none; }
.link-rows li { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr) auto; gap: 8px; align-items: center; }
.form .link-rows input { margin: 0; }
.form-error { margin: 14px 0 0; padding: 10px 14px; border-radius: 10px; background: rgba(255, 110, 90, .14); color: #ff7a6b; font-size: 14px; }
#share-preview .pp { max-width: none; padding: 26px 18px 20px; }

/* ---------- Passport ---------- */

.passport {
  padding: 24px;
  border-radius: 18px;
  background: linear-gradient(160deg, var(--card) 30%, rgba(255, 176, 32, .14) 80%, #33270f);
  border: 1px solid var(--panel-line);
  box-shadow: 0 20px 50px -24px rgba(0, 0, 0, 0.6);
}
.passport-top { display: flex; align-items: center; gap: 14px; }
.passport-top b { display: block; font-size: 17px; }
.passport-top > div > span { display: block; font-size: 13px; color: var(--muted); margin-top: 3px; }
.passport-top .avatar-lg { width: 60px; height: 60px; font-size: 19px; }
.passport-logo { margin-left: auto; align-self: flex-start; }
.passport-logo svg { width: 22px; height: 22px; }
.passport-bio { margin: 16px 0; font-size: 14px; line-height: 1.55; }
.passport-stats { display: grid; grid-template-columns: repeat(3, 1fr); padding: 14px 0; border-top: 1px solid var(--panel-line); border-bottom: 1px solid var(--panel-line); }
.passport-stats b { display: block; font-family: var(--display); font-weight: 800; font-size: 22px; }
.passport-stats span { font-size: 12px; color: var(--muted); }
.passport-row { display: flex; gap: 12px; padding: 10px 0 0; font-size: 13.5px; }
.passport-row span { width: 64px; flex: none; color: var(--muted); }
.passport-row b { font-weight: 500; }
.passport-tiles { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.passport-tiles > span { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.passport-tiles .app-tile { width: 36px; height: 36px; font-size: 11px; border-radius: 8px; }
.passport-tiles small { font-size: 11px; font-weight: 600; }

/* ---------- Lists (games) ---------- */

.list { margin: 0; padding: 0; list-style: none; }
.list li { display: flex; align-items: center; gap: 18px; padding: 14px 0; border-top: 1px solid var(--panel-line); }
.list li:first-child { border-top: 0; padding-top: 0; }
.list li:last-child { padding-bottom: 0; }
.list b { display: block; }
.list .muted { font-size: 13.5px; }
.list .empty { color: var(--muted); }
.stat-cell { width: 140px; }
.stat-cell span { display: block; font-size: 12px; color: var(--muted); }
.stat-cell b { font-size: 14.5px; font-weight: 500; }

/* ---------- Socials ---------- */

.social-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.social { margin: 0; display: flex; flex-direction: column; }
.social header { display: flex; align-items: center; gap: 14px; }
.social header b { display: block; }
.social header .muted { font-size: 13.5px; }
.social header .status { margin-left: auto; }
.social-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 0; margin: 22px 0 18px; }
.social-stats b { display: block; font-family: var(--display); font-weight: 800; font-stretch: 108%; font-size: 28px; letter-spacing: -.02em; }
.social-stats span { font-size: 12.5px; color: var(--muted); }
/* "?" next to a number, explains it on hover or focus */
.social-stats .info-tip { position: relative; display: inline-grid; place-items: center; width: 18px; height: 18px; margin-left: 8px; vertical-align: middle; border-radius: 50%; background: var(--panel); border: 1px solid var(--panel-line); color: var(--muted); font-family: var(--body, inherit); font-size: 11px; font-weight: 700; letter-spacing: 0; cursor: help; }
.social-stats .info-tip:hover, .social-stats .info-tip:focus-visible { color: var(--ink); border-color: var(--muted); outline: none; }
.social-stats .info-tip::after { content: attr(data-tip); position: absolute; right: -12px; bottom: calc(100% + 8px); width: 240px; max-width: 70vw; padding: 10px 12px; border-radius: 10px; background: var(--card); border: 1px solid var(--panel-line); box-shadow: 0 10px 30px rgba(0,0,0,.45); color: var(--ink); font-size: 12.5px; font-weight: 400; line-height: 1.45; text-align: left; opacity: 0; pointer-events: none; transition: opacity .15s; z-index: 5; }
.social-stats .info-tip:hover::after, .social-stats .info-tip:focus-visible::after { opacity: 1; }
.social footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--panel-line); }
.social-actions { display: flex; gap: 14px; }
/* "More stats": everything else a connected platform shares (RKNKT_INSIGHTS in api.js) */
.social-more { margin: -4px 0 16px; font-size: 13.5px; }
.social-more summary { cursor: pointer; color: var(--muted); font-weight: 600; list-style: none; }
.social-more summary::-webkit-details-marker { display: none; }
.social-more summary::after { content: " +"; }
.social-more[open] summary::after { content: " \2212"; }
.social-more summary:hover, .social-more summary:focus-visible { color: var(--ink); }
.social-more dl { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; margin: 12px 0 0; }
.social-more dt { color: var(--muted); font-size: 12px; margin-top: 8px; }
.social-more dd { margin: 0; overflow-wrap: anywhere; line-height: 1.45; }
.social-more a { text-decoration: underline; }
.social-more-head { margin: 14px 0 8px; color: var(--muted); font-size: 12px; }
.social-more .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.social-more .post-card { text-decoration: none; }

/* Post previews (RKNKT_INSIGHTS.posts in api.js): dashboard "More stats" and the admin platform page */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.post-card { display: flex; flex-direction: column; min-width: 0; border-radius: 12px; background: var(--card-2, #24201a); border: 1px solid var(--panel-line); overflow: hidden; color: inherit; text-decoration: none; transition: border-color .15s, transform .15s; }
a.post-card:hover, a.post-card:focus-visible { border-color: var(--muted); transform: translateY(-2px); outline: none; }
.post-thumb { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--panel); }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-thumb em { position: absolute; right: 6px; bottom: 6px; padding: 2px 6px; border-radius: 6px; background: #0f0d09; color: #f3efe6; font: 600 11px/1.3 "JetBrains Mono", monospace; font-style: normal; }
.post-ph { display: grid; place-items: center; width: 100%; height: 100%; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.post-body { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px 12px; min-width: 0; }
.post-body b { font-size: 13.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.post-body small { color: var(--muted); font-size: 12px; }
.status.unverified { background: rgba(255, 176, 32, .14); color: #ffc24d; }
/* Connect buttons in the platform's own colour and logo, like "Sign in with Google" */
.connect-oauth { display: inline-flex; align-items: center; gap: 10px; width: 100%; justify-content: center; background: var(--c); color: #fff; border: 1px solid rgba(255,255,255,.16); font-weight: 600; }
.connect-oauth:hover { filter: brightness(1.12); }
.connect-oauth .pf-logo { width: 18px; height: 18px; flex: none; }
.social > .connect-oauth { margin-bottom: 16px; }

/* ---------- Settings ---------- */

.settings .panel h2 { display: flex; align-items: center; gap: 10px; }
.settings .panel h2 .status { font-size: 12px; }
.settings-facts { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 10px 16px; margin: 0; font-size: 14.5px; }
.settings-facts dt { color: var(--muted); }
.settings-facts dd { margin: 0; overflow-wrap: anywhere; }
.mfa-steps { margin: 0 0 14px; padding-left: 20px; font-size: 14px; color: var(--ink-2); }
.mfa-qr { width: 180px; height: 180px; margin: 0 0 10px; padding: 10px; border: 1px solid var(--panel-line); border-radius: 12px; background: var(--card); }
/* Undo the icon styling (.dash svg) so the QR code keeps sharp, scannable squares */
.dash .mfa-qr svg { display: block; width: 100%; height: 100%; fill: none; stroke: none; stroke-width: 1; stroke-linecap: butt; stroke-linejoin: miter; }
.mfa-key code { color: var(--ink); font-weight: 600; letter-spacing: .04em; }
.mfa-form, .delete-form { margin-top: 14px; }
.delete-form label { margin-bottom: 10px; }
.btn-danger { background: #d9473a; border-color: #d9473a; color: #fff; }
.btn-danger:hover { background: #e85a4c; border-color: #e85a4c; }
.mfa-form label { margin-bottom: 10px; }
.mfa-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.recovery-codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 14px 0 16px; padding: 14px; list-style: none; border-radius: 12px; background: var(--card-2); }
.recovery-codes code { font-size: 15px; font-weight: 600; letter-spacing: .06em; }
.link-btn { border: 0; background: none; padding: 0; font-size: 13px; color: var(--muted); text-decoration: underline; }
.link-btn:hover { color: #ff7a6b; }
.social:not(.connected) { opacity: .92; border-style: dashed; }
.connect-form { display: flex; gap: 8px; margin-top: 22px; align-items: center; }
.connect-form input, .connect-form select { margin: 0; }
.connect-form select { width: auto; flex: none; max-width: 42%; }
.connect-form input[hidden] { display: none; }
.note { margin-top: 18px; }
.part-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 16px; font-size: 19px; font-weight: 600; }
.part-head .muted { font-size: 14px; font-weight: 400; }
[data-part="games"] { margin-top: 40px; }

/* ---------- Filters, assets ---------- */

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.filter {
  padding: 8px 16px;
  border: 1px solid rgba(243, 239, 230, .14);
  border-radius: 999px;
  background: var(--card);
  font-size: 14px;
}
.filter:hover { border-color: var(--ink); }
.filter.is-active { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.asset {
  border: 1px solid var(--panel-line);
  border-radius: 14px;
  background: var(--panel);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.asset-preview { height: 140px; border-radius: 0; font-size: 18px; }
.asset-preview.star > svg { width: 44px; height: 44px; }
.asset.locked .asset-preview > :not(.asset-lock) { filter: blur(3px); opacity: .6; }
.asset.locked .asset-preview { color: rgba(255,255,255,.5); }
.asset.locked .swatch.light { color: rgba(0,0,0,.3); }
.asset-lock {
  position: absolute; top: 10px; right: 10px;
  display: flex; align-items: center; gap: 6px;
  padding: 5px 10px 5px 8px;
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font-family: var(--body);
  font-size: 12px;
  font-weight: 600;
}
.asset-lock .lock { width: 13px; height: 13px; stroke-width: 2; }
.asset-info { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; }
.asset-info b { display: block; font-size: 14.5px; }

/* ---------- Banners ---------- */

.soon-banner {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 16px;
  padding: 14px 18px;
  border-radius: 12px;
  background: linear-gradient(90deg, #33270f, #33270f);
  border: 1px solid rgba(255, 176, 32, .25);
}
.soon-banner .soon { margin: 0; background: var(--accent); color: var(--on-accent); }
.soon-banner p { margin: 0; font-size: 14px; }

.upsell {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 20px;
  padding: 16px 18px;
  border-radius: 12px;
  background: #26211a;
  color: #fff;
}
.upsell .lock { width: 22px; height: 22px; flex: none; }
.upsell b { display: block; font-size: 14.5px; }
.upsell span { font-size: 13px; color: #4a4436; }
.upsell .btn { margin-left: auto; background: var(--card); color: var(--ink); border-color: var(--card); }

/* ---------- Reports ---------- */

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.kpi { padding: 20px 22px; border-radius: 14px; background: var(--panel); border: 1px solid var(--panel-line); box-shadow: var(--shadow); }
.kpi span { display: block; font-size: 13px; color: var(--muted); }
.kpi b { display: block; margin-top: 8px; font-family: var(--display); font-weight: 800; font-stretch: 108%; font-size: 32px; letter-spacing: -.02em; line-height: 1; }
.kpi em { display: block; margin-top: 8px; font-style: normal; font-size: 12.5px; }
.kpi em.up { color: #6fdc9a; }

.bar-chart { display: grid; grid-template-columns: 44px 1fr; gap: 8px; height: 260px; padding-bottom: 26px; }
.y-axis { display: flex; flex-direction: column; justify-content: space-between; font-size: 11.5px; color: var(--muted); text-align: right; transform: translateY(-6px); }
.y-axis span:last-child { transform: translateY(12px); }
.plot { position: relative; display: flex; align-items: flex-end; gap: 2px; border-bottom: 1px solid rgba(243, 239, 230, .2); }
.gridlines { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.gridlines i { display: block; border-top: 1px dashed rgba(243, 239, 230, .1); }
.gridlines i:last-child { border: 0; }
.bar-col { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; outline: none; cursor: default; }
.bar { position: relative; width: min(44px, 60%); border-radius: 4px 4px 0 0; background: var(--magenta); transition: filter .15s; }
.bar-col:last-child .bar { background: #c12f95; }
.bar-col:hover .bar, .bar-col:focus-visible .bar { filter: brightness(.85); }
.bar-x { position: absolute; bottom: -24px; font-size: 12px; color: var(--muted); }
.bar-tip {
  position: absolute; bottom: calc(100% + 8px); left: 50%;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--accent);
  color: #4a4436;
  font-size: 11.5px;
  white-space: nowrap;
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s;
}
.bar-tip b { display: block; color: #fff; font-size: 13px; }
.bar-col:hover .bar-tip, .bar-col:focus-visible .bar-tip { opacity: 1; }

.platform-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.platform-table th { text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); padding: 0 0 10px; }
.platform-table td { padding: 9px 0; border-top: 1px solid var(--panel-line); }
.platform-table .num { text-align: right; }
.pt-name { display: flex; align-items: center; gap: 10px; }
.pt-name .app-tile { width: 28px; height: 28px; font-size: 10px; border-radius: 7px; }
.pt-bar { display: inline-block; width: 80px; height: 6px; margin-right: 12px; border-radius: 99px; background: #f3e6ee; vertical-align: middle; overflow: hidden; }
.pt-bar i { display: block; height: 100%; border-radius: inherit; background: var(--magenta); }

/* ---------- Opportunities ---------- */

.opp-list { display: grid; gap: 14px; }
.opp { display: flex; align-items: center; gap: 22px; margin: 0; }
.opp-match {
  display: grid; place-items: center; align-content: center;
  width: 74px; height: 74px; flex: none;
  border-radius: 50%;
  background: conic-gradient(var(--magenta) calc(var(--m, 80) * 1%), #f5e3ee 0);
  position: relative;
}
.opp-match::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--card); }
.opp-match b, .opp-match span { position: relative; }
.opp-match b { font-family: var(--display); font-weight: 800; font-size: 18px; line-height: 1; }
.opp-match span { font-size: 10.5px; color: var(--muted); }
.opp-title { display: flex; align-items: center; gap: 10px; }
.opp-title b { font-size: 16px; }
.opp dl { display: flex; flex-wrap: wrap; gap: 6px 28px; margin: 12px 0 0; }
.opp dt { font-size: 11.5px; color: var(--muted); }
.opp dd { margin: 2px 0 0; font-size: 14px; }

/* ---------- Plans ---------- */

.billing-toggle {
  display: inline-flex;
  margin-top: 26px;
  padding: 4px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--panel-line);
}
.billing-toggle button { padding: 9px 20px; border: 0; border-radius: 999px; background: none; font-size: 14px; }
.billing-toggle button.is-active { background: var(--accent); color: var(--on-accent); }
.billing-toggle span { margin-left: 6px; font-size: 11px; color: var(--magenta); font-weight: 600; }
.billing-toggle .is-active span { color: rgba(255, 176, 32, .3); }

.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-bottom: 28px; align-items: stretch; }
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 30px 28px;
  border-radius: 20px;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  box-shadow: var(--shadow);
}
.plan.featured {
  background: var(--accent);
  color: var(--on-accent);
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 30px 60px -30px rgba(120, 20, 90, .7);
}
.plan.featured::before {
  content: "";
  position: absolute; z-index: -1;
  width: 260px; height: 220px; right: -80px; top: -90px;
  border-radius: 50%;
  background: var(--magenta);
  filter: blur(60px);
  opacity: .55;
}
.plan.current { outline: 2px solid var(--magenta); outline-offset: -2px; }
.plan-badge {
  position: absolute; top: 22px; right: 22px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 600;
}
.plan-badge.current-badge { background: var(--magenta); color: #fff; }
.plan.featured .plan-badge.current-badge { top: 52px; }
.plan h2 { margin: 0; font-family: var(--display); font-weight: 800; font-stretch: 110%; font-size: 26px; }
.plan-tag { margin: 6px 0 0; min-height: 42px; font-size: 14px; color: var(--muted); }
.plan.featured .plan-tag { color: #4a4436; }
.price { display: flex; align-items: baseline; gap: 8px; margin: 22px 0; }
.price b { font-family: var(--display); font-weight: 800; font-stretch: 110%; font-size: 48px; letter-spacing: -.03em; line-height: 1; }
.price span { font-size: 14px; color: var(--muted); }
.plan.featured .price span { color: #4a4436; }
.plan.featured .btn-solid { background: var(--card); color: var(--ink); border-color: var(--card); }
.plan.featured .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.plan ul { margin: 24px 0 0; padding: 0; list-style: none; }
.plan li { display: flex; gap: 10px; padding: 7px 0; font-size: 14.5px; }
.plan li svg { width: 17px; height: 17px; flex: none; margin-top: 2px; stroke-width: 2.4; color: var(--magenta); }

.compare .table-wrap { overflow-x: auto; }
.compare table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 14px; }
.compare th, .compare td { padding: 12px 14px; text-align: center; border-top: 1px solid var(--panel-line); }
.compare thead th { border-top: 0; font-size: 15px; }
.compare th:first-child, .compare td:first-child { text-align: left; padding-left: 0; }
.compare .is-current { background: rgba(255, 176, 32, .08); }

.faq { max-width: 760px; margin: 12px auto 0; }
.faq details { padding: 16px 4px; border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
.faq summary::after { content: "+"; font-weight: 400; font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq summary::-webkit-details-marker { display: none; }
.faq p { margin: 10px 0 0; color: var(--ink-2); font-size: 14.5px; }

/* ---------- Modal & toast ---------- */

.modal {
  width: min(440px, calc(100vw - 32px));
  padding: 28px;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6);
}
.modal::backdrop { background: rgba(20, 8, 16, .35); backdrop-filter: blur(4px); }
.modal h3 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 24px; }
.modal p { color: var(--ink-2); }
.modal .demo-note { display: block; margin: 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.modal-actions .btn { height: 44px; padding: 0 22px; }

/* Get started prompt: offers the Creator Passport questionnaire, can be skipped */
.start-modal { width: min(480px, calc(100vw - 32px)); }
.start-modal .star3d { display: block; width: 44px; height: 44px; margin-bottom: 14px; color: var(--magenta); }
.start-modal .eyebrow { margin: 0 0 6px; }
.start-list { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 14.5px; }
.start-list li { display: flex; gap: 10px; align-items: baseline; color: var(--ink-2); }
.start-list li b { color: var(--ink); font-weight: 600; }
.start-list li::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--magenta); transform: translateY(-1px); }

.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 200;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 14px;
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.6);
  transform: translate(-50%, 20px);
  opacity: 0;
  transition: opacity .25s, transform .25s;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Home: offers, inbox, collabs, trips ---------- */

.count-pill {
  display: inline-grid; place-items: center;
  min-width: 20px; height: 20px; padding: 0 7px; margin-left: 6px;
  border-radius: 999px; background: var(--magenta); color: #fff;
  font-size: 11.5px; font-weight: 700; vertical-align: 1px;
}
.side-nav .count-pill { margin-left: auto; }

.activity {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 28px 0 20px;
}
.act { margin: 0; padding: 22px 24px; }
.act h2 { display: flex; align-items: center; gap: 4px; margin-bottom: 14px; font-size: 16px; }
.head-link { display: inline-flex; align-items: center; gap: 2px; margin-left: auto; font-size: 13px; font-weight: 500; color: var(--muted); }
.head-link:hover { color: var(--ink); }
.head-link .chev { width: 16px; height: 16px; }
.empty-note { margin: 0; font-size: 14px; color: var(--muted); }
.empty-note a { text-decoration: underline; }

.offer-list, .thread-mini, .collab-list, .trip-list { margin: 0; padding: 0; list-style: none; }
.offer-list li, .collab-list li, .trip-list li { padding: 14px 0; border-top: 1px solid var(--panel-line); }
.offer-list li:first-child, .collab-list li:first-child, .trip-list li:first-child { border-top: 0; padding-top: 0; }
.offer-list li:last-child, .collab-list li:last-child, .trip-list li:last-child { padding-bottom: 0; }

.offer-list li { display: flex; align-items: center; gap: 14px; }
.offer-list b { display: block; font-size: 15px; }
.offer-list .muted { display: block; font-size: 13.5px; margin-top: 2px; }
.offer-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.offer-pay { padding: 3px 9px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 600; }
.offer-actions { display: flex; flex-direction: column; gap: 6px; flex: none; }
.offer-actions .btn { height: 34px; padding: 0 16px !important; font-size: 13px; }

.thread-mini a {
  display: flex; align-items: center; gap: 12px;
  margin: 0 -10px; padding: 10px; border-radius: 10px;
}
.thread-mini a:hover { background: rgba(255,255,255,.9); }
.thread-mini b, .thread-list b { display: block; font-size: 14.5px; }
.thread-mini .muted, .thread-list .muted { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; }
.thread-mini time { flex: none; align-self: flex-start; font-size: 12px; color: var(--muted); }
.is-unread b::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 7px; border-radius: 50%; background: var(--magenta); vertical-align: 2px; }
.is-unread .muted { color: var(--ink-2); }
.thread-avatar {
  display: grid; place-items: center; flex: none;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--c); color: #fff; font-weight: 700; font-size: 15px;
}

.collab-top { display: flex; justify-content: space-between; gap: 12px; }
.collab-top b { font-size: 15px; }
.collab-list li > .muted { display: block; }
.progress.thin { display: block; width: 100%; height: 5px; margin: 10px 0 8px; }

.trip-list li { display: flex; align-items: center; gap: 14px; }
.trip-list b { display: block; font-size: 15px; }
.trip-date {
  flex: none; width: 76px; padding: 8px 6px; border-radius: 10px;
  background: var(--card); border: 1px solid var(--panel-line);
  text-align: center; font-size: 12.5px; font-weight: 700; line-height: 1.25;
}

/* ---------- Messages ---------- */

.messenger { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 20px; height: min(640px, calc(100vh - 260px)); min-height: 420px; }
.messenger .panel { margin: 0; }
.thread-list { padding: 10px; overflow-y: auto; }
.thread-list ul { margin: 0; padding: 0; list-style: none; }
.thread-list a { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; }
.thread-list a:hover { background: rgba(255,255,255,.9); }
.thread-list a.is-active { background: var(--card); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.unread-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--magenta); }
.thread-list .is-unread b::after { display: none; }

.conversation { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.convo-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--panel-line); }
.convo-back { display: none; }
.bubbles { flex: 1; margin: 0; padding: 20px; list-style: none; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: min(76%, 520px); align-self: flex-start; }
.bubble p { margin: 0; padding: 10px 14px; border-radius: 16px 16px 16px 4px; background: var(--card); border: 1px solid var(--panel-line); font-size: 14.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble time { display: block; margin: 4px 6px 0; font-size: 11.5px; color: var(--muted); }
.bubble.me { align-self: flex-end; text-align: right; }
.bubble.me p { background: var(--accent); color: var(--on-accent); border-color: var(--accent); border-radius: 16px 16px 4px 16px; text-align: left; }
.composer { display: flex; gap: 10px; align-items: flex-end; padding: 14px 16px; border-top: 1px solid var(--panel-line); }
.composer textarea {
  flex: 1; min-height: 42px; max-height: 140px; padding: 10px 14px; resize: none;
  border: 1px solid rgba(243, 239, 230, .14); border-radius: 12px; background: var(--card); font: inherit; font-size: 14.5px;
}
.composer textarea:focus { outline: none; border-color: var(--ink); }
.composer .btn { height: 42px; }
.email-form { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--panel-line); }

/* ---------- Messages, live: new bubbles pop in, "is typing" dots, "Seen", new message pop-up ---------- */

.bubble.is-new { animation: bubble-in .38s cubic-bezier(.2, .9, .3, 1.25) both; transform-origin: 0 100%; }
.bubble.me.is-new { transform-origin: 100% 100%; }
@keyframes bubble-in {
  from { opacity: 0; transform: translateY(14px) scale(.9); }
  60% { opacity: 1; }
}
.bubble.is-sending p { opacity: .65; }
.bubble.is-sending time::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 6px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -1px; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.bubble.is-failed p { background: var(--card); color: var(--ink); border-color: #e5484d; }
.bubble.is-failed time { color: #c62d32; }
.bubble .seen { color: var(--magenta); font-weight: 600; animation: fade-up .35s ease both; }
.bubble .seen svg { width: 13px; height: 13px; margin-right: 2px; vertical-align: -2px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
@keyframes fade-up { from { opacity: 0; transform: translateY(3px); } }

/* "Sam is typing" with three dots bouncing in a bubble */
.typing-row { display: flex; align-items: center; gap: 10px; align-self: flex-start; animation: bubble-in .3s cubic-bezier(.2, .9, .3, 1.25) both; transform-origin: 0 100%; }
.typing-row[hidden] { display: none; }
.typing-dots { display: inline-flex; gap: 4px; padding: 13px 14px; border-radius: 16px 16px 16px 4px; background: var(--card); border: 1px solid var(--panel-line); }
.typing-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--magenta); animation: typing-dot 1.2s ease-in-out infinite; }
.typing-dots i:nth-child(2) { animation-delay: .15s; }
.typing-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes typing-dot {
  0%, 60%, 100% { transform: translateY(0); opacity: .45; }
  30% { transform: translateY(-6px); opacity: 1; }
}
.typing-name { font-size: 12.5px; color: var(--muted); }

.composer .btn:active { transform: scale(.94); }
.composer .btn { transition: transform .12s; }

/* New message somewhere else: a card slides in at the bottom right, and opens the conversation */
.msg-pop {
  position: fixed; right: 24px; bottom: 24px; z-index: 210;
  display: flex; align-items: center; gap: 12px;
  width: min(360px, calc(100vw - 32px));
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--panel-line);
  box-shadow: 0 20px 50px -18px rgba(0, 0, 0, 0.6);
  color: var(--ink);
  text-decoration: none;
  transform: translateY(24px) scale(.96);
  opacity: 0;
  transition: opacity .3s, transform .45s cubic-bezier(.2, .9, .3, 1.2);
}
.msg-pop.is-visible { opacity: 1; transform: none; }
.msg-pop .grow { min-width: 0; }
.msg-pop b { display: block; font-size: 14px; }
.msg-pop span.muted { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-pop small { display: block; margin-bottom: 2px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--magenta); }

/* Unread counters bump when a new message comes in */
.bump { animation: bump .45s cubic-bezier(.2, .9, .3, 1.4); }
@keyframes bump { 40% { transform: scale(1.35); } }

@media (prefers-reduced-motion: reduce) {
  .bubble.is-new, .typing-row, .bubble .seen, .bump { animation: none; }
  .typing-dots i { animation: none; opacity: .8; }
  .msg-pop { transition: opacity .2s; transform: none; }
}
.convo-empty { flex: 1; display: grid; place-content: center; justify-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.convo-empty svg { width: 40px; height: 40px; color: var(--pink); }

/* ---------- My Rates ---------- */

.rate-rows { margin: 0 0 20px; padding: 0; list-style: none; }
.rate-rows li { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--panel-line); }
.rate-rows li:first-child { border-top: 0; padding-top: 0; }
.rate-rows b { display: block; }
.rate-rows .rate-auto {
  padding: 4px 10px; border-radius: 999px; background: rgba(255, 176, 32, .14); color: #ffb020;
  font-size: 12px; font-weight: 600; visibility: hidden;
}
.rate-rows li.is-auto .rate-auto { visibility: visible; }
.form .rate-field { position: relative; width: 150px; margin: 0; flex: none; }
.rate-field i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--muted); z-index: 1; }
.form .rate-field input { padding-left: 28px; text-align: right; }
.is-auto .rate-field input { color: var(--muted); }
.form .rate-flex { max-width: 320px; }

/* ---------- Responsive ---------- */

@media (max-width: 1280px) {
  .social-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .home-top { flex-direction: column; }
}

@media (max-width: 1080px) {
  .two-col { grid-template-columns: 1fr; }
  .sticky { position: static; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .plans { grid-template-columns: 1fr; max-width: 480px; margin-left: auto; margin-right: auto; }
}

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; box-shadow: 20px 0 60px -20px rgba(0,0,0,.2); }
  .sidebar-open .sidebar { transform: none; }
  .sidebar-open .sidebar-scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(20,8,16,.3); }
  .dash-main { margin-left: 0; }
  .menu-btn { display: grid; }
  .hero-banner { grid-template-columns: 1fr; }
  .hero-banner-art { position: absolute; inset: 0 0 0 55%; opacity: .6; z-index: -1; }
}

@media (max-width: 640px) {
  .dash-main { padding: 0 16px 48px; }
  .topbar { gap: 8px; }
  .search { width: auto; flex: 1; }
  .pop-panel { position: fixed; top: 76px; left: 16px; right: 16px; width: auto; }
  .social-grid, .kpis, .grid-2, .grid-4 { grid-template-columns: 1fr; }
  .passport-card { padding-right: 130px; }
  .passport-mini { width: 84px; height: 84px; right: 20px; }
  .hero-banner-copy { padding: 26px 22px; }
  .list li { flex-wrap: wrap; gap: 12px; }
  .hide-sm { display: none; }
  .stat-cell { width: auto; }
  .opp { flex-wrap: wrap; }
  .upsell { flex-wrap: wrap; }
  .upsell .btn { margin-left: 0; }
  .activity { grid-template-columns: minmax(0, 1fr); }
  .act { padding: 20px 18px; }
  .offer-list li { flex-direction: column; align-items: stretch; }
  .offer-actions { flex-direction: row; }
  .offer-actions .btn { flex: 1; }
  .trip-list li { flex-wrap: wrap; }
  .messenger { grid-template-columns: minmax(0, 1fr); height: auto; min-height: 0; }
  .messenger.has-active .thread-list { display: none; }
  .messenger:not(.has-active) .conversation { display: none; }
  .conversation { height: calc(100vh - 220px); min-height: 380px; }
  .convo-back { display: grid; width: 36px; height: 36px; }
  .bubble { max-width: 88%; }
  .rate-rows li { flex-wrap: wrap; }
  .link-rows li { grid-template-columns: minmax(0, 1fr) auto; }
  .link-rows li [name="url"] { grid-column: 1; }
  .rate-rows .rate-auto { order: 3; }
  .rate-rows li:not(.is-auto) .rate-auto { display: none; }
}

@media (max-width: 1080px) and (min-width: 641px) {
  .activity { grid-template-columns: minmax(0, 1fr); }
}
