/* ============================================================
   Good Feed — Operating System
   Design system: premium SaaS (Linear / Stripe / Attio / Notion)
   ============================================================ */

:root {
  /* Neutrals */
  --bg: #ffffff;
  --bg-subtle: #fafafa;
  --bg-sunken: #f6f6f7;
  --surface: #ffffff;
  --surface-hover: #f7f7f8;
  --border: #ececed;
  --border-strong: #e0e0e2;
  --line: #f0f0f1;

  /* Text */
  --text: #1a1a1e;
  --text-secondary: #5c5c66;
  --text-tertiary: #8a8a94;
  --text-muted: #a8a8b0;

  /* Brand — warm, hospitality-forward */
  --brand: #5b4bff;
  --brand-hover: #4a3ae0;
  --brand-soft: #eeecff;
  --brand-softer: #f6f5ff;
  --accent: #ff6a3d;         /* Good Feed coral */
  --accent-soft: #fff0eb;

  /* Semantic */
  --green: #12a150;
  --green-soft: #e7f6ee;
  --amber: #d98a00;
  --amber-soft: #fdf3e0;
  --red: #e5484d;
  --red-soft: #fdeced;
  --blue: #2f6feb;
  --blue-soft: #e9f0fe;
  --purple: #8b5cf6;
  --purple-soft: #f1ecfe;
  --teal: #0d9488;
  --teal-soft: #e2f5f2;
  --pink: #e5427f;
  --pink-soft: #fdeaf1;

  /* Shadows — soft, layered */
  --shadow-xs: 0 1px 2px rgba(19,20,24,0.04);
  --shadow-sm: 0 1px 3px rgba(19,20,24,0.06), 0 1px 2px rgba(19,20,24,0.04);
  --shadow-md: 0 4px 12px rgba(19,20,24,0.06), 0 2px 4px rgba(19,20,24,0.04);
  --shadow-lg: 0 12px 32px rgba(19,20,24,0.10), 0 4px 8px rgba(19,20,24,0.05);
  --shadow-xl: 0 24px 56px rgba(19,20,24,0.16), 0 8px 16px rgba(19,20,24,0.06);

  /* Radii */
  --r-sm: 7px;
  --r: 10px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;

  --sidebar-w: 244px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-subtle);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 14px;
  line-height: 1.5;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--brand-soft); }

/* Scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #e2e2e5; border-radius: 8px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #cfcfd4; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ============================================================
   App shell
   ============================================================ */
.app { display: flex; height: 100vh; overflow: hidden; }

/* ---------- Sidebar ---------- */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 14px 12px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px 14px;
}
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: url('good-feed-logo.png') center / cover no-repeat;
  display: grid; place-items: center; color: #fff; font-size: 16px;
  box-shadow: 0 2px 8px rgba(255,106,61,0.35);
  flex-shrink: 0;
}
.brand-name { font-weight: 650; font-size: 15px; letter-spacing: -0.02em; }
.brand-sub { font-size: 11px; color: var(--text-tertiary); margin-top: -1px; }

.workspace-switch {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 9px; margin-bottom: 10px;
  border: 1px solid var(--border); border-radius: var(--r);
  cursor: pointer; transition: background .12s;
}
.workspace-switch:hover { background: var(--surface-hover); }
.workspace-switch .ws-logo {
  width: 24px; height: 24px; border-radius: 7px; background: var(--brand);
  color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 600;
}
.workspace-switch .ws-name { font-weight: 600; font-size: 13px; flex: 1; }
.workspace-switch .chev { color: var(--text-muted); font-size: 11px; }

.nav-section-label {
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-muted);
  padding: 12px 10px 6px;
}
.nav { display: flex; flex-direction: column; gap: 1px; overflow-y: auto; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: 8px;
  color: var(--text-secondary); font-weight: 500; font-size: 13.5px;
  cursor: pointer; transition: background .12s, color .12s; position: relative;
}
.nav-item:hover { background: var(--surface-hover); color: var(--text); }
.nav-item.active { background: var(--brand-softer); color: var(--brand); font-weight: 600; }
.nav-item .ni-icon { width: 18px; text-align: center; font-size: 15px; flex-shrink: 0; }
.nav-item .ni-badge {
  margin-left: auto; font-size: 11px; font-weight: 600;
  background: var(--bg-sunken); color: var(--text-secondary);
  padding: 1px 7px; border-radius: 20px; min-width: 20px; text-align: center;
}
.nav-item.active .ni-badge { background: var(--brand-soft); color: var(--brand); }
.nav-item .ni-badge.hot { background: var(--accent); color: #fff; }

.sidebar-footer { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 8px; }
.user-chip {
  display: flex; align-items: center; gap: 9px; padding: 6px 8px;
  border-radius: 9px; cursor: pointer;
  /* The name/role are text, so a click with any slight mouse movement was treated as
     a text-selection drag and never registered as a click — which is why the avatar
     (no text) opened the menu but clicking the name appeared to do nothing. */
  user-select: none; -webkit-user-select: none;
}
.user-chip:hover { background: var(--surface-hover); }
.user-chip .avatar { width: 28px; height: 28px; }
.user-chip .u-name { font-weight: 600; font-size: 13px; }
.user-chip .u-role { font-size: 11px; color: var(--text-tertiary); }

/* ---------- Main ---------- */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; background: var(--bg-subtle); }

.topbar {
  height: 56px; flex-shrink: 0;
  background: rgba(255,255,255,0.85); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px; padding: 0 24px;
}
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-tertiary); }
.crumbs .cur { color: var(--text); font-weight: 600; }
.crumbs .sep { color: var(--border-strong); }

.searchbar {
  margin-left: auto; display: flex; align-items: center; gap: 8px;
  background: var(--bg-sunken); border: 1px solid transparent;
  border-radius: 9px; padding: 7px 11px; width: 260px; transition: all .15s;
}
.searchbar:focus-within { background: #fff; border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.searchbar input { border: none; outline: none; background: none; flex: 1; font-size: 13px; }
.searchbar .kbd { font-size: 11px; color: var(--text-muted); background: var(--bg); border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; }

.icon-btn {
  width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center;
  color: var(--text-secondary); position: relative; transition: background .12s;
}
.icon-btn:hover { background: var(--surface-hover); color: var(--text); }
.icon-btn .dot { position: absolute; top: 7px; right: 8px; width: 7px; height: 7px; background: var(--accent); border-radius: 50%; border: 1.5px solid #fff; }

.content { flex: 1; overflow-y: auto; padding: 26px 32px 60px; }
.content.flush { padding: 0; }

/* ---------- Page header ---------- */
.page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 22px; }
.page-title { font-size: 22px; font-weight: 680; letter-spacing: -0.025em; }
.page-sub { color: var(--text-tertiary); font-size: 13.5px; margin-top: 3px; }
.page-head .spacer { flex: 1; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 7px; justify-content: center;
  padding: 8px 14px; border-radius: 9px; font-weight: 600; font-size: 13px;
  border: 1px solid transparent; transition: all .13s; white-space: nowrap;
}
.btn:active { transform: translateY(0.5px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-xs); }
.btn-primary:hover { background: var(--brand-hover); box-shadow: var(--shadow-sm); }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 1px 3px rgba(255,106,61,0.3); }
.btn-accent:hover { filter: brightness(0.96); }
.btn-ghost { background: var(--surface); border-color: var(--border-strong); color: var(--text); box-shadow: var(--shadow-xs); }
.btn-ghost:hover { background: var(--surface-hover); }
.btn-subtle { background: var(--bg-sunken); color: var(--text-secondary); }
.btn-subtle:hover { background: #ededf0; color: var(--text); }
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { filter: brightness(0.96); }
.btn-danger-soft { background: var(--red-soft); color: var(--red); }
.btn-danger-soft:hover { background: #fbdcde; }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 7px; }
.btn-icon-only { padding: 8px; }
.btn-wa { background: #25d366; color: #fff; }
.btn-wa:hover { filter: brightness(0.96); }

/* ============================================================
   Cards
   ============================================================ */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); box-shadow: var(--shadow-xs);
}
.card-pad { padding: 18px; }
.card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 15px 18px; border-bottom: 1px solid var(--line);
}
.card-head h3 { font-size: 14px; font-weight: 650; letter-spacing: -0.01em; }
.card-head .spacer { flex: 1; }
.card-head .link { font-size: 12.5px; color: var(--brand); font-weight: 600; cursor: pointer; }
.card-head .link:hover { text-decoration: underline; }

.grid { display: grid; gap: 16px; }

/* ============================================================
   KPI cards
   ============================================================ */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.kpi {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 15px 16px; box-shadow: var(--shadow-xs); cursor: pointer; transition: box-shadow .15s, transform .15s, border-color .15s;
}
.kpi:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); border-color: var(--border-strong); }
.kpi-top { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.kpi-ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-size: 15px; }
.kpi-label { font-size: 12.5px; color: var(--text-secondary); font-weight: 500; }
.kpi-value { font-size: 26px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.kpi-foot { display: flex; align-items: center; gap: 6px; margin-top: 9px; font-size: 12px; }
.trend { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; }
.trend.up { color: var(--green); }
.trend.down { color: var(--red); }
.kpi-foot .muted { color: var(--text-tertiary); }

/* ============================================================
   Chips / badges
   ============================================================ */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2.5px 9px; border-radius: 20px; font-size: 12px; font-weight: 600;
  white-space: nowrap; line-height: 1.5;
}
.chip .dot-s { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.gray { background: var(--bg-sunken); color: var(--text-secondary); }
.chip.green { background: var(--green-soft); color: var(--green); }
.chip.amber { background: var(--amber-soft); color: var(--amber); }
.chip.red { background: var(--red-soft); color: var(--red); }
.chip.blue { background: var(--blue-soft); color: var(--blue); }
.chip.purple { background: var(--purple-soft); color: var(--purple); }
.chip.brand { background: var(--brand-soft); color: var(--brand); }
.chip.teal { background: var(--teal-soft); color: var(--teal); }
.chip.pink { background: var(--pink-soft); color: var(--pink); }
.chip.accent { background: var(--accent-soft); color: var(--accent); }
.chip-lg { padding: 4px 11px; font-size: 12.5px; }

.tag {
  display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 6px;
  font-size: 11.5px; font-weight: 500; background: var(--bg-sunken); color: var(--text-secondary);
}
.tag.brand { background: var(--brand-softer); color: var(--brand); }

/* ============================================================
   Avatars
   ============================================================ */
.avatar {
  width: 36px; height: 36px; border-radius: 50%; object-fit: cover;
  background: var(--bg-sunken); flex-shrink: 0; display: grid; place-items: center;
  font-weight: 600; color: #fff; font-size: 13px; overflow: hidden;
}
.avatar.sq { border-radius: 9px; }
.avatar-stack { display: flex; }
.avatar-stack .avatar { border: 2px solid #fff; margin-left: -8px; width: 28px; height: 28px; }
.avatar-stack .avatar:first-child { margin-left: 0; }
.avatar-stack .more {
  width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; margin-left: -8px;
  background: var(--bg-sunken); color: var(--text-secondary); display: grid; place-items: center;
  font-size: 11px; font-weight: 600;
}

/* ============================================================
   Tables
   ============================================================ */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl thead th {
  text-align: left; font-size: 11.5px; font-weight: 600; color: var(--text-tertiary);
  text-transform: uppercase; letter-spacing: 0.04em; padding: 10px 16px;
  border-bottom: 1px solid var(--border); background: var(--bg-subtle);
  position: sticky; top: 0;
}
.tbl tbody td { padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: middle; }
.tbl tbody tr { transition: background .1s; cursor: pointer; }
.tbl tbody tr:hover { background: var(--bg-subtle); }
.tbl tbody tr:last-child td { border-bottom: none; }
.td-main { font-weight: 600; color: var(--text); }
.td-sub { font-size: 12px; color: var(--text-tertiary); }
.cell-flex { display: flex; align-items: center; gap: 10px; }

/* ============================================================
   Progress
   ============================================================ */
.progress { height: 6px; background: var(--bg-sunken); border-radius: 20px; overflow: hidden; }
.progress .bar { height: 100%; border-radius: 20px; background: var(--brand); transition: width .4s; }
.progress .bar.green { background: var(--green); }
.progress .bar.amber { background: var(--amber); }
.progress .bar.accent { background: var(--accent); }

/* Stepper progress (campaign stages) */
.stepper { display: flex; align-items: center; gap: 0; overflow-x: auto; padding: 4px 0; }
.step { display: flex; align-items: center; gap: 0; flex-shrink: 0; }
.step-node { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 84px; text-align: center; }
.step-dot {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; background: var(--bg-sunken); color: var(--text-muted);
  border: 2px solid var(--border);
}
.step.done .step-dot { background: var(--green); color: #fff; border-color: var(--green); }
.step.current .step-dot { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.step-label { font-size: 11.5px; font-weight: 600; color: var(--text-tertiary); }
.step.done .step-label, .step.current .step-label { color: var(--text); }
.step-line { width: 34px; height: 2px; background: var(--border); margin-top: -18px; }
.step.done .step-line { background: var(--green); }

/* ============================================================
   Timeline (HubSpot style)
   ============================================================ */
.timeline { position: relative; padding-left: 6px; }
.tl-item { position: relative; padding: 0 0 20px 30px; }
.tl-item::before {
  content: ''; position: absolute; left: 9px; top: 22px; bottom: -4px; width: 2px; background: var(--border);
}
.tl-item:last-child::before { display: none; }
.tl-node {
  position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; font-size: 10px; color: #fff; z-index: 1;
  border: 3px solid #fff; box-shadow: 0 0 0 1px var(--border);
}
.tl-title { font-weight: 600; font-size: 13.5px; }
.tl-meta { font-size: 12px; color: var(--text-tertiary); margin-top: 2px; }
.tl-body { font-size: 13px; color: var(--text-secondary); margin-top: 6px; background: var(--bg-subtle); border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; }

/* ============================================================
   Kanban
   ============================================================ */
.kanban { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 10px; align-items: flex-start; }
.kcol { flex: 0 0 296px; background: var(--bg-sunken); border-radius: var(--r-md); padding: 10px; }
.kcol-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 10px; }
.kcol-head .k-title { font-weight: 650; font-size: 13px; }
.kcol-head .k-count { font-size: 11.5px; color: var(--text-tertiary); background: var(--bg); border: 1px solid var(--border); border-radius: 20px; padding: 0 7px; font-weight: 600; }
.kcol-head .k-line { width: 8px; height: 8px; border-radius: 3px; }
.kcards { display: flex; flex-direction: column; gap: 9px; min-height: 40px; }
.kcard {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r);
  padding: 12px; box-shadow: var(--shadow-xs); cursor: grab; transition: box-shadow .13s, transform .13s;
}
.kcard:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.kcard.dragging { opacity: 0.5; }
.kcol.drop-hint { outline: 2px dashed var(--brand); outline-offset: -2px; }
.kcard-title { font-weight: 600; font-size: 13px; margin-bottom: 8px; }
.kcard-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; color: var(--text-tertiary); }

/* ============================================================
   Tabs
   ============================================================ */
.tabs { display: flex; gap: 3px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tab {
  padding: 9px 13px; font-size: 13px; font-weight: 550; color: var(--text-tertiary);
  border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; transition: color .12s;
  display: flex; align-items: center; gap: 7px;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.tab .t-count { font-size: 11px; background: var(--bg-sunken); padding: 0 6px; border-radius: 20px; font-weight: 600; }
.tab.active .t-count { background: var(--brand-soft); color: var(--brand); }

/* ============================================================
   Creator cards
   ============================================================ */
.creator-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.creator-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--shadow-xs); transition: box-shadow .15s, transform .15s, border-color .15s;
}
.creator-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); border-color: var(--border-strong); }
.cc-cover { height: 84px; position: relative; background-size: cover; background-position: center; }
.cc-fav { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,0.9); backdrop-filter: blur(4px); display: grid; place-items: center; font-size: 14px; box-shadow: var(--shadow-sm); }
.cc-fav.on { color: var(--accent); }
.cc-body { padding: 0 16px 16px; margin-top: -30px; }
.cc-avatar { width: 60px; height: 60px; border-radius: 50%; border: 3px solid #fff; box-shadow: var(--shadow-sm); }
.cc-name { font-weight: 680; font-size: 15px; margin-top: 8px; display: flex; align-items: center; gap: 6px; letter-spacing: -0.01em; }
.cc-handle { color: var(--text-tertiary); font-size: 12.5px; }
.cc-socials { display: flex; gap: 6px; margin: 10px 0; }
.cc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.cc-stat { text-align: center; }
.cc-stat .v { font-weight: 700; font-size: 15px; letter-spacing: -0.02em; }
.cc-stat .l { font-size: 10.5px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.03em; margin-top: 2px; }
.cc-scores { display: flex; gap: 8px; margin-bottom: 12px; }
.cc-actions { display: flex; gap: 8px; }
.cc-actions .btn { flex: 1; }

/* Score meter */
.meter { display: flex; align-items: center; gap: 7px; }
.meter-ring { position: relative; width: 34px; height: 34px; flex-shrink: 0; }
.meter-label .v { font-weight: 700; font-size: 13px; }
.meter-label .l { font-size: 10.5px; color: var(--text-tertiary); }

.stars { color: #f5a623; letter-spacing: 1px; font-size: 13px; }
.stars .off { color: var(--border-strong); }

/* ============================================================
   Login
   ============================================================ */
.login-wrap { display: flex; height: 100vh; }
.login-left {
  flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 40px; position: relative; background: var(--bg);
}
.login-card { width: 100%; max-width: 380px; }
.login-logo { display: flex; align-items: center; gap: 11px; margin-bottom: 40px; }
.login-logo .brand-mark { width: 38px; height: 38px; font-size: 20px; }
.login-h { font-size: 26px; font-weight: 720; letter-spacing: -0.03em; }
.login-p { color: var(--text-tertiary); margin-top: 6px; margin-bottom: 30px; font-size: 14px; }
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 6px; color: var(--text-secondary); }
.input {
  width: 100%; padding: 11px 13px; border: 1px solid var(--border-strong); border-radius: 9px;
  font-size: 14px; background: var(--surface); transition: border-color .12s, box-shadow .12s; outline: none;
}
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
textarea.input { resize: vertical; min-height: 76px; }
.sso-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 9px;
  padding: 11px; border: 1px solid var(--border-strong); border-radius: 9px; background: #fff;
  font-weight: 600; font-size: 13.5px; transition: background .12s; box-shadow: var(--shadow-xs);
}
.sso-btn:hover { background: var(--surface-hover); }
.divider-txt { display: flex; align-items: center; gap: 12px; color: var(--text-muted); font-size: 12px; margin: 20px 0; }
.divider-txt::before, .divider-txt::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.login-right {
  flex: 1.05; background: linear-gradient(150deg, #1a1420 0%, #2d1f3d 45%, #4a2d5c 100%);
  display: flex; flex-direction: column; justify-content: center; padding: 60px; color: #fff; position: relative; overflow: hidden;
}
.login-right .glow { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.5; }
.login-quote { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.4; max-width: 460px; position: relative; z-index: 1; }
.login-metric-row { display: flex; gap: 40px; margin-top: 46px; position: relative; z-index: 1; }
.login-metric .v { font-size: 30px; font-weight: 720; letter-spacing: -0.03em; }
.login-metric .l { font-size: 13px; opacity: 0.7; margin-top: 3px; }
.login-float {
  position: absolute; background: rgba(255,255,255,0.09); backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.14); border-radius: 14px; padding: 13px 15px; z-index: 1;
  display: flex; align-items: center; gap: 11px; box-shadow: var(--shadow-lg);
}

/* ============================================================
   Modals
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(20,20,28,0.4); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; z-index: 100; padding: 24px;
  opacity: 0; pointer-events: none; transition: opacity .18s;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-xl);
  width: 100%; max-width: 620px; max-height: 88vh; overflow: hidden; display: flex; flex-direction: column;
  transform: translateY(8px) scale(0.99); transition: transform .18s;
}
.modal-overlay.open .modal { transform: none; }
.modal.wide { max-width: 860px; }
.modal.slim { max-width: 460px; }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 16px; font-weight: 680; letter-spacing: -0.02em; }
.modal-body { padding: 22px; overflow-y: auto; }
.modal-foot { display: flex; align-items: center; gap: 10px; padding: 15px 22px; border-top: 1px solid var(--line); background: var(--bg-subtle); }

/* Drawer (right side) */
.drawer-overlay {
  position: fixed; inset: 0; background: rgba(20,20,28,0.35); z-index: 100;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100vh; width: 520px; max-width: 94vw;
  background: var(--surface); box-shadow: var(--shadow-xl); z-index: 101;
  transform: translateX(100%); transition: transform .24s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column;
}
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.drawer-body { flex: 1; overflow-y: auto; padding: 22px; }
.drawer-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; background: var(--bg-subtle); }

/* ============================================================
   Dropdown / context menu
   ============================================================ */
.menu {
  position: absolute; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); box-shadow: var(--shadow-lg); padding: 5px; min-width: 190px; z-index: 200;
}
.menu-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 7px; font-size: 13px; font-weight: 500; cursor: pointer; color: var(--text-secondary); }
.menu-item:hover { background: var(--surface-hover); color: var(--text); }
.menu-item .m-ico { width: 16px; text-align: center; font-size: 13px; }
.menu-item.danger { color: var(--red); }
.menu-item.danger:hover { background: var(--red-soft); }
.menu-sep { height: 1px; background: var(--line); margin: 5px 0; }
.menu-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); padding: 6px 10px 3px; font-weight: 600; }

/* ============================================================
   Misc layout helpers
   ============================================================ */
.row { display: flex; align-items: center; gap: 10px; }
.col { display: flex; flex-direction: column; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; } .mt-24 { margin-top: 24px; }
.mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; } .mb-20 { margin-bottom: 20px; }
.muted { color: var(--text-tertiary); }
.secondary { color: var(--text-secondary); }
.small { font-size: 12px; }
.strong { font-weight: 650; }
.mono { font-variant-numeric: tabular-nums; }
.flex1 { flex: 1; }
.text-c { text-align: center; }

.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--bg-sunken); border-radius: 9px; padding: 3px; }
.seg button { padding: 5px 12px; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: var(--text-tertiary); }
.seg button.active { background: #fff; color: var(--text); box-shadow: var(--shadow-xs); }

.filter-btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 9px;
  border: 1px solid var(--border-strong); background: #fff; font-size: 13px; font-weight: 550; color: var(--text-secondary);
  box-shadow: var(--shadow-xs); transition: background .12s;
}
.filter-btn:hover { background: var(--surface-hover); }
.filter-btn .fb-val { color: var(--text); font-weight: 600; }

.def-list { display: grid; gap: 14px; }
.def-row { display: grid; grid-template-columns: 130px 1fr; gap: 12px; align-items: start; }
.def-row .dl-label { font-size: 12.5px; color: var(--text-tertiary); font-weight: 550; padding-top: 1px; }
.def-row .dl-val { font-size: 13.5px; font-weight: 500; }

.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0; border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; background: #fff; }
.stat-cell { padding: 15px 18px; border-right: 1px solid var(--line); }
.stat-cell:last-child { border-right: none; }
.stat-cell .sv { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; }
.stat-cell .sl { font-size: 12px; color: var(--text-tertiary); margin-top: 3px; }

/* Checklist */
.checklist { display: flex; flex-direction: column; gap: 2px; }
.check-item { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 9px; cursor: pointer; transition: background .1s; }
.check-item:hover { background: var(--bg-subtle); }
.check-box { width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--border-strong); display: grid; place-items: center; flex-shrink: 0; transition: all .12s; }
.check-item.done .check-box { background: var(--green); border-color: var(--green); color: #fff; }
.check-item.done .check-label { color: var(--text-tertiary); }
.check-label { font-size: 13.5px; font-weight: 500; flex: 1; }

/* Media grid (content library / review) */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.media-card { border-radius: var(--r-md); overflow: hidden; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-xs); transition: box-shadow .15s, transform .15s; cursor: pointer; }
.media-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.media-thumb { aspect-ratio: 4/5; background-size: cover; background-position: center; position: relative; }
.media-thumb .m-type { position: absolute; top: 9px; left: 9px; background: rgba(0,0,0,0.6); color: #fff; border-radius: 6px; padding: 2px 7px; font-size: 11px; font-weight: 600; display: flex; align-items: center; gap: 4px; backdrop-filter: blur(4px); }
.media-thumb .m-dur { position: absolute; bottom: 9px; right: 9px; background: rgba(0,0,0,0.7); color: #fff; border-radius: 6px; padding: 1px 6px; font-size: 11px; font-weight: 600; }
.media-thumb .m-play { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity .15s; background: rgba(0,0,0,0.2); }
.media-card:hover .m-play { opacity: 1; }
.media-thumb .m-play span { width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,0.95); display: grid; place-items: center; font-size: 16px; color: var(--text); }
.media-meta { padding: 11px 12px; }
.media-meta .mm-title { font-weight: 600; font-size: 13px; }
.media-meta .mm-sub { font-size: 11.5px; color: var(--text-tertiary); margin-top: 2px; }
.media-stats { display: flex; gap: 12px; margin-top: 9px; font-size: 11.5px; color: var(--text-secondary); }

/* Charts */
.bars { display: flex; align-items: flex-end; gap: 10px; height: 180px; padding-top: 10px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.bar-fill { width: 100%; max-width: 34px; border-radius: 7px 7px 3px 3px; background: linear-gradient(180deg, var(--brand), #8b7dff); transition: height .5s; position: relative; }
.bar-fill.alt { background: linear-gradient(180deg, var(--accent), #ff9068); }
.bar-label { font-size: 11px; color: var(--text-tertiary); font-weight: 500; }
.legend { display: flex; gap: 16px; margin-top: 4px; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-secondary); }
.legend-dot { width: 9px; height: 9px; border-radius: 3px; }

.spark { display: flex; align-items: flex-end; gap: 3px; height: 40px; }
.spark span { flex: 1; background: var(--brand-soft); border-radius: 2px; min-height: 3px; }

.donut-wrap { display: flex; align-items: center; gap: 20px; }
.donut-legend { display: flex; flex-direction: column; gap: 9px; }
.donut-legend .dl { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.donut-legend .dl b { margin-left: auto; font-variant-numeric: tabular-nums; }

/* Activity feed */
.feed-item { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.feed-item:last-child { border-bottom: none; }
.feed-ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-size: 13px; flex-shrink: 0; }
.feed-txt { font-size: 13px; line-height: 1.5; }
.feed-txt b { font-weight: 650; }
.feed-time { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }

/* Task list */
.task-item { display: flex; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.task-item:last-child { border-bottom: none; }
.task-check { width: 18px; height: 18px; border-radius: 5px; border: 2px solid var(--border-strong); flex-shrink: 0; cursor: pointer; }
.task-check:hover { border-color: var(--brand); }
.task-title { font-size: 13.5px; font-weight: 550; flex: 1; }
.task-due { font-size: 11.5px; }

/* Calendar */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; background: #fff; }
.cal-dow { padding: 10px; text-align: center; font-size: 11.5px; font-weight: 600; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.04em; background: var(--bg-subtle); border-bottom: 1px solid var(--border); border-right: 1px solid var(--line); }
.cal-cell { min-height: 108px; padding: 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); position: relative; }
.cal-cell.other { background: var(--bg-subtle); }
.cal-date { font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.cal-cell.today .cal-date { background: var(--brand); color: #fff; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; }
.cal-event { font-size: 11px; font-weight: 600; padding: 3px 7px; border-radius: 6px; margin-bottom: 4px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 4px; }
.cal-event:hover { filter: brightness(0.97); }

/* Empty / helper */
.hint-bar { display: flex; align-items: center; gap: 10px; padding: 11px 14px; background: var(--brand-softer); border: 1px solid var(--brand-soft); border-radius: var(--r); font-size: 13px; color: var(--brand-hover); }

.divider { height: 1px; background: var(--line); margin: 18px 0; }

/* Toast */
.toast-wrap { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: #1a1a1e; color: #fff; padding: 11px 16px; border-radius: 10px; font-size: 13px; font-weight: 550;
  box-shadow: var(--shadow-xl); display: flex; align-items: center; gap: 10px;
  animation: toastIn .25s ease; max-width: 400px;
}
.toast .t-ico { color: var(--green); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* two-col layouts */
.split { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
.split-wide { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; align-items: start; }
.split-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* ============================================================
   Venues — card grid (Airbnb / Instagram style)
   ============================================================ */
.venue-search {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 12px; padding: 12px 16px; margin-bottom: 24px;
  box-shadow: var(--shadow-xs); max-width: 520px;
  transition: border-color .15s, box-shadow .15s;
}
.venue-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.venue-search input { border: none; outline: none; background: none; flex: 1; font-size: 14px; }

.venue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}
.venue-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-xs);
  cursor: pointer; display: flex; flex-direction: column;
  transition: transform .16s, box-shadow .16s, border-color .16s;
}
.venue-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.venue-cover { height: 140px; position: relative; }
.venue-cover .v-emoji { position: absolute; inset: 0; display: grid; place-items: center; font-size: 42px; filter: drop-shadow(0 2px 8px rgba(0,0,0,.16)); }
.venue-cover .v-status { position: absolute; top: 11px; left: 11px; }
.venue-cover .v-rating {
  position: absolute; top: 11px; right: 11px;
  background: rgba(255,255,255,.94); backdrop-filter: blur(4px);
  border-radius: 20px; padding: 3px 9px; font-size: 12px; font-weight: 650;
  color: var(--text); box-shadow: var(--shadow-sm); display: flex; align-items: center; gap: 4px;
}
.venue-body { padding: 15px 16px 17px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.venue-name { font-weight: 680; font-size: 15.5px; letter-spacing: -0.01em; line-height: 1.25; }
.venue-loc { font-size: 12.5px; color: var(--text-tertiary); display: flex; align-items: center; gap: 4px; }
.venue-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.45; }
.venue-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.venue-empty { text-align: center; padding: 72px 24px; color: var(--text-tertiary); }

@media (max-width: 640px) {
  .venue-grid { grid-template-columns: 1fr; }
  .venue-search { max-width: none; }
}

/* Command palette (⌘K) */
.cmdk-item { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 9px; cursor: pointer; }
.cmdk-item:hover { background: var(--surface-hover); }
.cmdk-item.active { background: var(--brand-softer); }
.cmdk-ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--bg-sunken); font-size: 14px; flex-shrink: 0; }
.cmdk-title { font-weight: 600; font-size: 13.5px; }
.cmdk-sub { font-size: 12px; color: var(--text-tertiary); }
.cmdk-group { font-size: 10.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); padding: 10px 11px 4px; }
.cmdk-empty { padding: 30px; text-align: center; color: var(--text-tertiary); font-size: 13px; }
.cmdk-tag { margin-left: auto; font-size: 11px; color: var(--text-muted); }

@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .split, .split-wide { grid-template-columns: 1fr; }
}

/* ---------- Mobile / phone (creators are phone-first) ---------- */
.nav-toggle { display: none; }          /* hamburger hidden on desktop */
.sidebar-backdrop { display: none; }     /* backdrop hidden on desktop */

@media (max-width: 760px) {
  /* Off-canvas sidebar: fixed drawer that slides in over the content. */
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 150;
    transform: translateX(-100%); transition: transform .22s ease;
    box-shadow: var(--shadow-lg);
  }
  .app.nav-open .sidebar { transform: none; }

  .sidebar-backdrop {
    display: block; position: fixed; inset: 0; z-index: 140;
    background: rgba(20,20,28,0.4); opacity: 0; pointer-events: none;
    transition: opacity .22s;
  }
  .app.nav-open .sidebar-backdrop { opacity: 1; pointer-events: auto; }

  .nav-toggle { display: inline-grid; place-items: center; }

  /* Topbar: keep only the hamburger + crumbs; hide desktop-only search/actions. */
  .topbar { gap: 10px; padding-left: 14px; padding-right: 14px; }
  .topbar .searchbar { display: none; }

  /* Tighter content + single-column everything. */
  .content { padding: 16px 14px 56px; }
  .split, .split-wide, .split-3 { grid-template-columns: 1fr !important; }
  .venue-grid, .creator-grid { grid-template-columns: 1fr !important; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .page-head { flex-wrap: wrap; gap: 10px 12px; }

  /* Modals & the right-side drawer go full-width on a phone. */
  .modal { max-width: 100%; }
  .modal-overlay { padding: 12px; }
  .drawer { width: 100%; max-width: 100%; }
}

/* ---------- Login/sign-up page only: single-column on phones ---------- */
/* Desktop split-screen design is untouched; this hides the right testimonial
   panel under 760px and makes the form full-width with comfortable padding. */
@media (max-width: 760px) {
  .login-right { display: none; }
  .login-wrap { height: auto; min-height: 100vh; }
  .login-left { flex: 1; justify-content: flex-start; padding: 48px 24px 40px; }
  .login-card { max-width: 420px; }   /* fills the phone width cleanly (with the 24px sides) */
}
