/* ===========================================================
   Postiz — social scheduling. Bright creator dashboard.
   Display: Bricolage Grotesque · Body: Plus Jakarta Sans
   =========================================================== */

:root {
  /* Surfaces */
  --bg: #fbf8f4;
  --bg-tint: #f4eee6;
  --surface: #ffffff;
  --surface-2: #faf7f2;
  --line: #ece5db;
  --line-strong: #ddd3c5;

  /* Ink */
  --ink: #1c1714;
  --ink-2: #5c5249;
  --ink-3: #9a8e80;

  /* Brand accent — vivid tangerine/coral */
  --accent: #ff5a36;
  --accent-deep: #e8431f;
  --accent-soft: #ffe6de;
  --accent-tint: #fff3ef;

  /* Secondary — fresh mint */
  --mint: #16b89a;
  --mint-soft: #d8f5ee;

  /* Platform brand colors */
  --x: #1a1a1a;
  --instagram: #e1306c;
  --linkedin: #0a66c2;
  --facebook: #1877f2;
  --tiktok: #010101;
  --threads: #000000;

  --instagram-grad: linear-gradient(135deg, #feda75, #fa7e1e 30%, #d62976 55%, #962fbf 80%, #4f5bd5);

  /* Status */
  --green: #2bb673;
  --green-soft: #dcf5e8;
  --amber: #f0a020;
  --amber-soft: #fdf0d8;
  --gray-status: #98a0a8;

  --radius: 16px;
  --radius-sm: 11px;
  --radius-lg: 22px;

  --shadow-sm: 0 1px 2px rgba(28,23,20,.05), 0 1px 3px rgba(28,23,20,.04);
  --shadow: 0 4px 14px rgba(28,23,20,.07), 0 1px 3px rgba(28,23,20,.05);
  --shadow-lg: 0 18px 50px rgba(28,23,20,.13), 0 4px 12px rgba(28,23,20,.07);
  --shadow-accent: 0 8px 24px rgba(255,90,54,.32);

  --ease: cubic-bezier(.22,.61,.36,1);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, .display {
  font-family: "Bricolage Grotesque", "Plus Jakarta Sans", sans-serif;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.08;
}

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

/* ============ APP SHELL ============ */
.app {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
}

/* Scrim only exists as a mobile overlay; never a grid item on desktop */
.scrim { display: none; }

/* ----- Sidebar ----- */
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 4px 8px 22px;
}
.brand-mark {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: var(--accent);
  display: grid; place-items: center;
  box-shadow: var(--shadow-accent);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.brand-mark svg { position: relative; z-index: 1; }
.brand-mark::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.35), transparent 55%);
}
.brand-name {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 22px; font-weight: 700;
  letter-spacing: -.03em;
}
.brand-name b { color: var(--accent); }

.nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.nav-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--ink-3);
  padding: 16px 12px 7px;
}
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  font-weight: 600; font-size: 13.5px;
  transition: background .15s, color .15s;
  position: relative;
}
.nav-item svg { width: 18px; height: 18px; stroke-width: 2; flex-shrink: 0; }
.nav-item:hover { background: var(--surface-2); color: var(--ink); }
.nav-item.active { background: var(--accent-tint); color: var(--accent-deep); }
.nav-item.active::before {
  content: ""; position: absolute; left: -16px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px; background: var(--accent); border-radius: 0 3px 3px 0;
}
.nav-item .count {
  margin-left: auto; font-size: 11px; font-weight: 700;
  background: var(--bg-tint); color: var(--ink-2);
  padding: 1px 8px; border-radius: 20px;
}
.nav-item.active .count { background: var(--accent-soft); color: var(--accent-deep); }

.sidebar-foot {
  margin-top: auto;
  padding-top: 14px;
}
.upgrade-card {
  background: linear-gradient(150deg, var(--ink) 0%, #2c241f 100%);
  border-radius: var(--radius);
  padding: 16px;
  color: #fff;
  position: relative;
  overflow: hidden;
  margin-bottom: 12px;
}
.upgrade-card::before {
  content: ""; position: absolute; right: -30px; top: -30px;
  width: 100px; height: 100px; border-radius: 50%;
  background: var(--accent); filter: blur(34px); opacity: .55;
}
.upgrade-card h4 { font-size: 14px; margin-bottom: 4px; position: relative; }
.upgrade-card p { font-size: 11.5px; color: rgba(255,255,255,.65); margin-bottom: 11px; position: relative; }
.upgrade-card button {
  width: 100%; background: #fff; color: var(--ink);
  padding: 8px; border-radius: 9px; font-weight: 700; font-size: 12.5px;
  position: relative; transition: transform .12s;
}
.upgrade-card button:hover { transform: translateY(-1px); }

.user-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 8px; border-radius: var(--radius-sm);
}
.user-chip { cursor: pointer; }
.user-chip:hover { background: var(--surface-2); }
.user-chip .avatar {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--mint); color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: 13px;
}
.user-chip .meta { line-height: 1.25; }
.user-chip .meta b { font-size: 13px; }
.user-chip .meta span { font-size: 11px; color: var(--ink-3); display: block; }

/* ----- Main ----- */
.main { display: flex; flex-direction: column; min-width: 0; }

.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(251,248,244,.82);
  backdrop-filter: saturate(160%) blur(10px);
  position: sticky; top: 0; z-index: 30;
}
.topbar h1 { font-size: 23px; }
.topbar .sub { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.topbar-spacer { flex: 1; }

.search {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 11px; padding: 8px 13px; width: 260px;
  transition: border-color .15s, box-shadow .15s;
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.search svg { width: 16px; height: 16px; color: var(--ink-3); }
.search input { border: none; outline: none; background: none; width: 100%; }

.content { padding: 26px 28px 60px; max-width: 1320px; width: 100%; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 11px;
  font-weight: 700; font-size: 13.5px;
  transition: transform .12s var(--ease), box-shadow .15s, background .15s;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; stroke-width: 2.2; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-accent); }
.btn-primary:hover { background: var(--accent-deep); box-shadow: 0 10px 28px rgba(255,90,54,.4); }
.btn-ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--ink-3); }
.btn-soft { background: var(--accent-tint); color: var(--accent-deep); }
.btn-soft:hover { background: var(--accent-soft); }
.btn-icon {
  width: 38px; height: 38px; border-radius: 11px; padding: 0;
  display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink-2);
}
.btn-icon:hover { background: var(--surface-2); color: var(--ink); }

/* ============ AI COMPOSE ============ */
.ai-compose-bar {
  margin-bottom: 16px;
  padding: 12px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--accent-tint), #fff);
  border: 1px solid var(--accent-soft);
}
.ai-compose-row { display: flex; gap: 8px; align-items: stretch; }
.ai-compose-row .ai-topic { flex: 1; min-width: 0; }
.ai-compose-row .ai-tone { flex: 0 0 130px; }
.btn-ai {
  background: var(--accent); color: #fff; box-shadow: var(--shadow-accent);
  flex: 0 0 auto;
}
.btn-ai:hover { background: var(--accent-deep); }
.btn-ai:disabled { opacity: .65; cursor: progress; }
.btn-ai.loading svg { animation: ai-spin .9s linear infinite; }
@keyframes ai-spin { to { transform: rotate(360deg); } }
.ai-compose-hint { margin-top: 8px; font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
@media (max-width: 560px) {
  .ai-compose-row { flex-wrap: wrap; }
  .ai-compose-row .ai-tone, .btn-ai { flex: 1 1 auto; }
}
.btn-icon svg { width: 18px; height: 18px; }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 9px; }

/* ============ CARDS ============ */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* ============ CALENDAR ============ */
.cal-toolbar {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 18px; flex-wrap: wrap;
}
.cal-nav { display: flex; align-items: center; gap: 4px; }
.cal-month { font-size: 20px; min-width: 188px; }
.seg {
  display: flex; background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 11px; padding: 3px; gap: 2px;
}
.seg button {
  padding: 6px 15px; border-radius: 8px; font-weight: 700; font-size: 12.5px;
  color: var(--ink-2); transition: all .15s;
}
.seg button.active { background: var(--ink); color: #fff; }
.cal-legend { display: flex; align-items: center; gap: 14px; margin-left: auto; flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); font-weight: 600; }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; }

.calendar {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
}
.cal-head { display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 1px solid var(--line); }
.cal-head div {
  padding: 12px 14px; font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-3);
}
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-cell {
  min-height: 128px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 8px; position: relative; transition: background .15s; cursor: pointer;
  display: flex; flex-direction: column; gap: 5px;
}
.cal-cell:nth-child(7n) { border-right: none; }
.cal-cell:hover { background: var(--surface-2); }
.cal-cell.dimmed { background: var(--bg); }
.cal-cell.dimmed .cal-date { color: var(--ink-3); opacity: .55; }
.cal-cell.today .cal-date {
  background: var(--accent); color: #fff; border-radius: 8px;
  width: 26px; height: 26px; display: grid; place-items: center;
}
.cal-cell.drag-over { background: var(--accent-tint); box-shadow: inset 0 0 0 2px var(--accent); }
.cal-date { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.cal-add {
  position: absolute; top: 7px; right: 7px;
  width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center;
  background: var(--accent-tint); color: var(--accent-deep); opacity: 0;
  transition: opacity .15s, transform .12s;
}
.cal-cell:hover .cal-add { opacity: 1; }
.cal-add:hover { transform: scale(1.1); background: var(--accent-soft); }
.cal-add svg { width: 14px; height: 14px; stroke-width: 2.5; }

.chip {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 7px; border-radius: 8px; font-size: 11.5px; font-weight: 600;
  cursor: grab; transition: transform .1s, box-shadow .15s;
  border-left: 3px solid; background: var(--surface-2); color: var(--ink);
  overflow: hidden; white-space: nowrap;
}
.chip:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.chip:active { cursor: grabbing; }
.chip.dragging { opacity: .4; }
.chip .chip-time { font-size: 10px; color: var(--ink-3); font-weight: 700; flex-shrink: 0; }
.chip .chip-txt { overflow: hidden; text-overflow: ellipsis; }
.chip .plat-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.chip.draft { opacity: .72; border-left-style: dashed; }
.chip.published { opacity: .85; }
.chip-more { font-size: 10.5px; font-weight: 700; color: var(--accent-deep); padding: 1px 4px; }

/* Week view */
.week-view { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.week-head { display: grid; grid-template-columns: 60px repeat(7, 1fr); border-bottom: 1px solid var(--line); }
.week-head .wh { padding: 12px 8px; text-align: center; border-left: 1px solid var(--line); }
.week-head .wh:first-child { border-left: none; }
.week-head .wh .wday { font-size: 10.5px; font-weight: 700; text-transform: uppercase; color: var(--ink-3); letter-spacing: .05em; }
.week-head .wh .wnum { font-size: 19px; font-family: "Bricolage Grotesque"; margin-top: 2px; }
.week-head .wh.today .wnum { color: var(--accent); }
.week-body { max-height: 620px; overflow-y: auto; }
.week-row { display: grid; grid-template-columns: 60px repeat(7, 1fr); border-bottom: 1px solid var(--line); }
.week-row .whour { padding: 6px 8px; font-size: 11px; font-weight: 700; color: var(--ink-3); text-align: right; }
.week-slot { border-left: 1px solid var(--line); padding: 4px; min-height: 56px; cursor: pointer; transition: background .15s; display: flex; flex-direction: column; gap: 4px; }
.week-slot:hover { background: var(--surface-2); }
.week-slot.drag-over { background: var(--accent-tint); }

/* ============ QUEUE ============ */
.queue-group { margin-bottom: 26px; }
.queue-date {
  display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; padding-left: 2px;
}
.queue-date h3 { font-size: 16px; }
.queue-date span { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.queue-date .line { flex: 1; height: 1px; background: var(--line); }

.post-row {
  display: flex; align-items: flex-start; gap: 16px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; margin-bottom: 10px;
  box-shadow: var(--shadow-sm); transition: box-shadow .18s, transform .15s, border-color .15s;
}
.post-row:hover { box-shadow: var(--shadow); border-color: var(--line-strong); }
.post-time {
  text-align: center; flex-shrink: 0; width: 64px; padding-top: 2px;
}
.post-time .pt-time { font-family: "Bricolage Grotesque"; font-size: 17px; font-weight: 600; }
.post-time .pt-mer { font-size: 10.5px; font-weight: 700; color: var(--ink-3); }
.post-platforms { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 9px; }
.plat-badge {
  width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: #fff;
}
.plat-badge svg { width: 14px; height: 14px; }
.post-body { flex: 1; min-width: 0; }
.post-text { font-size: 13.5px; color: var(--ink); line-height: 1.5; margin-bottom: 9px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.post-foot { display: flex; align-items: center; gap: 10px; }
.status-pill {
  font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 20px;
  display: inline-flex; align-items: center; gap: 5px;
}
.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; }
.status-scheduled { background: var(--accent-tint); color: var(--accent-deep); }
.status-scheduled::before { background: var(--accent); }
.status-published { background: var(--green-soft); color: #1c8a55; }
.status-published::before { background: var(--green); }
.status-draft { background: var(--bg-tint); color: var(--ink-2); }
.status-draft::before { background: var(--gray-status); }
.post-actions { display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.post-row:hover .post-actions { opacity: 1; }
.act-btn { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: var(--ink-3); transition: all .14s; }
.act-btn:hover { background: var(--surface-2); color: var(--ink); }
.act-btn.danger:hover { background: var(--accent-soft); color: var(--accent-deep); }
.act-btn svg { width: 16px; height: 16px; }
.post-thumb { width: 56px; height: 56px; border-radius: 11px; object-fit: cover; flex-shrink: 0; }

/* ============ CHANNELS ============ */
.channels-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.channel-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow-sm); transition: box-shadow .18s, transform .15s;
  position: relative; overflow: hidden;
}
.channel-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.channel-card .cc-banner { height: 4px; position: absolute; top: 0; left: 0; right: 0; }
.channel-head { display: flex; align-items: center; gap: 13px; margin-bottom: 16px; margin-top: 4px; }
.channel-avatar {
  width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center;
  color: #fff; position: relative; flex-shrink: 0;
}
.channel-avatar svg { width: 24px; height: 24px; }
.channel-avatar .plat-tag {
  position: absolute; bottom: -4px; right: -4px; width: 22px; height: 22px;
  border-radius: 7px; border: 2.5px solid var(--surface); display: grid; place-items: center; color: #fff;
}
.channel-avatar .plat-tag svg { width: 11px; height: 11px; }
.channel-info b { font-size: 15px; display: block; }
.channel-info span { font-size: 12.5px; color: var(--ink-3); }
.channel-stats { display: flex; gap: 20px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.channel-stats .cs b { font-family: "Bricolage Grotesque"; font-size: 18px; display: block; }
.channel-stats .cs span { font-size: 11px; color: var(--ink-3); font-weight: 600; }
.channel-foot { display: flex; align-items: center; justify-content: space-between; }
.channel-foot .conn { font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.channel-foot .conn.on { color: var(--green); }
.channel-foot .conn.off { color: var(--ink-3); }

/* Toggle */
.toggle { width: 42px; height: 24px; border-radius: 20px; background: var(--line-strong); position: relative; transition: background .2s; flex-shrink: 0; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .2s var(--ease); }
.toggle.on { background: var(--green); }
.toggle.on::after { transform: translateX(18px); }

/* ============ ANALYTICS ============ */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.stat-card .si { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 14px; }
.stat-card .si svg { width: 18px; height: 18px; }
.stat-card .sval { font-family: "Bricolage Grotesque"; font-size: 30px; font-weight: 600; letter-spacing: -.03em; }
.stat-card .slabel { font-size: 12.5px; color: var(--ink-3); font-weight: 600; margin-top: 2px; }
.stat-card .strend { position: absolute; top: 18px; right: 18px; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 20px; }
.strend.up { background: var(--green-soft); color: #1c8a55; }
.strend.down { background: var(--accent-soft); color: var(--accent-deep); }

.analytics-row { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; margin-bottom: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.panel-head h3 { font-size: 15.5px; }
.panel-head .ph-sub { font-size: 12px; color: var(--ink-3); }

/* Heatmap */
.heatmap { display: grid; grid-template-columns: 34px repeat(7, 1fr); gap: 4px; }
.heatmap .hm-corner {}
.heatmap .hm-day { font-size: 10.5px; font-weight: 700; color: var(--ink-3); text-align: center; padding-bottom: 4px; }
.heatmap .hm-hour { font-size: 10px; font-weight: 700; color: var(--ink-3); display: flex; align-items: center; justify-content: flex-end; padding-right: 6px; }
.heatmap .hm-cell { aspect-ratio: 1; border-radius: 6px; background: var(--bg-tint); transition: transform .12s; cursor: default; }
.heatmap .hm-cell:hover { transform: scale(1.18); box-shadow: var(--shadow); z-index: 2; position: relative; }

.top-post { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.top-post:last-child { border-bottom: none; }
.top-post .tp-rank { font-family: "Bricolage Grotesque"; font-size: 16px; color: var(--ink-3); width: 22px; flex-shrink: 0; }
.top-post .tp-body { flex: 1; min-width: 0; }
.top-post .tp-text { font-size: 12.5px; line-height: 1.45; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin-bottom: 6px; }
.top-post .tp-stats { display: flex; gap: 14px; font-size: 11.5px; color: var(--ink-3); font-weight: 600; }
.top-post .tp-stats b { color: var(--ink); }
.top-post .tp-plat { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; color: #fff; flex-shrink: 0; }
.top-post .tp-plat svg { width: 13px; height: 13px; }

/* Bar chart */
.bars { display: flex; align-items: flex-end; gap: 8px; 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-col .bar { width: 100%; max-width: 30px; border-radius: 7px 7px 4px 4px; background: linear-gradient(180deg, var(--accent), var(--accent-deep)); transition: height .8s var(--ease); position: relative; }
.bar-col .bar:hover::after { content: attr(data-val); position: absolute; top: -22px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 6px; white-space: nowrap; }
.bar-col .bar.alt { background: linear-gradient(180deg, var(--mint), #0e9b81); }
.bar-col .blabel { font-size: 10.5px; font-weight: 700; color: var(--ink-3); }

/* ============ MODAL / COMPOSER ============ */
.overlay {
  position: fixed; inset: 0; background: rgba(28,23,20,.42);
  backdrop-filter: blur(4px); z-index: 100; display: none;
  align-items: center; justify-content: center; padding: 24px;
  opacity: 0; transition: opacity .2s;
}
.overlay.open { display: flex; opacity: 1; }
.composer {
  background: var(--surface); border-radius: var(--radius-lg);
  width: 100%; max-width: 1000px; max-height: 92vh; overflow: hidden;
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column;
  transform: translateY(16px) scale(.98); transition: transform .25s var(--ease);
}
.overlay.open .composer { transform: none; }
.composer-head {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 24px; border-bottom: 1px solid var(--line);
}
.composer-head h2 { font-size: 19px; }
.composer-body { display: grid; grid-template-columns: 1fr 380px; flex: 1; min-height: 0; overflow: hidden; }
.composer-left { padding: 22px 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; }
.composer-right { background: var(--surface-2); border-left: 1px solid var(--line); padding: 22px; overflow-y: auto; }

.field-label { font-size: 12px; font-weight: 700; color: var(--ink-2); margin-bottom: 9px; display: flex; align-items: center; gap: 7px; text-transform: uppercase; letter-spacing: .04em; }

.channel-pick { display: flex; gap: 10px; flex-wrap: wrap; }
.cpick {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  background: var(--surface); border: 2px solid var(--line); color: var(--ink-3);
  position: relative; transition: all .15s; cursor: pointer;
}
.cpick svg { width: 21px; height: 21px; }
.cpick:hover { border-color: var(--line-strong); }
.cpick.sel { color: #fff; border-color: transparent; }
.cpick.sel::after {
  content: "✓"; position: absolute; top: -6px; right: -6px; width: 19px; height: 19px;
  background: var(--green); color: #fff; border-radius: 50%; font-size: 11px; font-weight: 800;
  display: grid; place-items: center; border: 2px solid var(--surface);
}

.editor-wrap { border: 1.5px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.editor-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.editor-toolbar { display: flex; align-items: center; gap: 2px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.tb-btn { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: var(--ink-2); transition: all .14s; }
.tb-btn:hover { background: var(--surface); color: var(--ink); }
.tb-btn svg { width: 17px; height: 17px; }
.tb-sep { width: 1px; height: 20px; background: var(--line); margin: 0 5px; }
#editor { width: 100%; min-height: 150px; border: none; outline: none; resize: vertical; padding: 14px; font-size: 15px; line-height: 1.55; background: var(--surface); }

.char-counters { display: flex; gap: 8px; flex-wrap: wrap; }
.cc-item { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 20px; background: var(--surface-2); border: 1px solid var(--line); }
.cc-item .cc-dot { width: 8px; height: 8px; border-radius: 50%; }
.cc-item.over { background: var(--accent-soft); color: var(--accent-deep); }
.cc-ring { position: relative; width: 18px; height: 18px; }

.schedule-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.input {
  width: 100%; padding: 10px 13px; border: 1.5px solid var(--line-strong);
  border-radius: 11px; background: var(--surface); outline: none; transition: border-color .15s, box-shadow .15s; font-weight: 600;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }

.emoji-pop {
  position: absolute; bottom: 100%; left: 0; margin-bottom: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-lg); padding: 10px; display: none; grid-template-columns: repeat(8, 1fr); gap: 2px; z-index: 10; width: 280px;
}
.emoji-pop.open { display: grid; }
.emoji-pop button { font-size: 19px; padding: 4px; border-radius: 8px; transition: background .12s; }
.emoji-pop button:hover { background: var(--surface-2); }

.composer-foot { display: flex; align-items: center; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--line); background: var(--surface); }

/* ===== Live previews (platform mockups) ===== */
.preview-tabs { display: flex; gap: 4px; margin-bottom: 16px; flex-wrap: wrap; }
.pv-tab { padding: 6px 11px; border-radius: 9px; font-size: 12px; font-weight: 700; color: var(--ink-3); display: flex; align-items: center; gap: 6px; transition: all .14s; }
.pv-tab svg { width: 14px; height: 14px; }
.pv-tab.active { background: var(--surface); box-shadow: var(--shadow-sm); color: var(--ink); }

.preview-stage { display: flex; flex-direction: column; gap: 14px; }

.pv-card { background: #fff; border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; font-size: 13px; }

/* X / Twitter */
.pv-x { padding: 14px 16px; }
.pv-x .pvh { display: flex; gap: 10px; }
.pv-x .pv-av { width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0; }
.pv-x .pv-name { font-weight: 700; display: flex; align-items: center; gap: 4px; }
.pv-x .pv-name .verify { color: #1d9bf0; }
.pv-x .pv-handle { color: #536471; font-size: 13px; }
.pv-x .pv-text { margin-top: 4px; white-space: pre-wrap; word-break: break-word; line-height: 1.4; color: #0f1419; }
.pv-x .pv-media { margin-top: 10px; border-radius: 16px; overflow: hidden; border: 1px solid #eff3f4; }
.pv-x .pv-media img { width: 100%; display: block; }
.pv-x .pv-actions { display: flex; justify-content: space-between; margin-top: 12px; color: #536471; font-size: 12px; max-width: 320px; }
.pv-x .pv-actions span { display: flex; align-items: center; gap: 5px; }
.pv-x .pv-actions svg { width: 16px; height: 16px; }

/* Instagram */
.pv-ig .pv-igh { display: flex; align-items: center; gap: 10px; padding: 11px 13px; }
.pv-ig .pv-av { width: 32px; height: 32px; border-radius: 50%; padding: 2px; background: var(--instagram-grad); }
.pv-ig .pv-av span { width: 100%; height: 100%; border-radius: 50%; display: block; border: 2px solid #fff; background-size: cover; }
.pv-ig .pv-name { font-weight: 700; font-size: 13px; }
.pv-ig .pv-media { aspect-ratio: 1; background: linear-gradient(135deg,#fdeee8,#f7d9cd); display: grid; place-items: center; }
.pv-ig .pv-media img { width: 100%; height: 100%; object-fit: cover; }
.pv-ig .pv-media .ph { color: #c9a99b; }
.pv-ig .pv-actions { display: flex; gap: 16px; padding: 11px 13px 6px; color: #262626; }
.pv-ig .pv-actions svg { width: 24px; height: 24px; }
.pv-ig .pv-actions .grow { flex: 1; }
.pv-ig .pv-caption { padding: 0 13px 13px; line-height: 1.4; word-break: break-word; }
.pv-ig .pv-caption b { font-weight: 700; }

/* LinkedIn */
.pv-li { padding: 14px 16px; }
.pv-li .pvh { display: flex; gap: 10px; }
.pv-li .pv-av { width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; }
.pv-li .pv-name { font-weight: 700; }
.pv-li .pv-meta { color: #666; font-size: 12px; }
.pv-li .pv-text { margin-top: 11px; white-space: pre-wrap; word-break: break-word; line-height: 1.45; color: #1c1c1c; }
.pv-li .pv-media { margin: 11px -16px 0; }
.pv-li .pv-media img { width: 100%; display: block; }
.pv-li .pv-actions { display: flex; justify-content: space-around; margin-top: 8px; padding-top: 8px; border-top: 1px solid #e8e8e8; color: #666; font-size: 12.5px; font-weight: 600; }
.pv-li .pv-actions span { display: flex; align-items: center; gap: 6px; }
.pv-li .pv-actions svg { width: 17px; height: 17px; }

/* Facebook */
.pv-fb { padding: 14px 16px; }
.pv-fb .pvh { display: flex; gap: 10px; }
.pv-fb .pv-av { width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0; }
.pv-fb .pv-name { font-weight: 700; color: #050505; }
.pv-fb .pv-meta { color: #65676b; font-size: 12px; }
.pv-fb .pv-text { margin-top: 10px; white-space: pre-wrap; word-break: break-word; line-height: 1.45; color: #050505; }
.pv-fb .pv-media { margin: 11px -16px 0; }
.pv-fb .pv-media img { width: 100%; display: block; }
.pv-fb .pv-actions { display: flex; justify-content: space-around; margin-top: 8px; padding-top: 8px; border-top: 1px solid #e4e6eb; color: #65676b; font-size: 13px; font-weight: 600; }

/* TikTok */
.pv-tt { background: #000; color: #fff; aspect-ratio: 9/16; max-height: 420px; position: relative; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; }
.pv-tt .tt-bg { position: absolute; inset: 0; background: linear-gradient(160deg,#2a2a2e,#0a0a0a); }
.pv-tt .tt-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .8; }
.pv-tt .tt-content { position: relative; padding: 16px; z-index: 2; }
.pv-tt .tt-name { font-weight: 700; }
.pv-tt .tt-text { margin-top: 6px; line-height: 1.4; word-break: break-word; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.pv-tt .tt-rail { position: absolute; right: 12px; bottom: 90px; display: flex; flex-direction: column; gap: 18px; z-index: 2; align-items: center; }
.pv-tt .tt-rail .tt-ic { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; }
.pv-tt .tt-rail svg { width: 28px; height: 28px; }

/* Threads */
.pv-th { padding: 14px 16px; }
.pv-th .pvh { display: flex; gap: 10px; }
.pv-th .pv-av { width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; }
.pv-th .pv-name { font-weight: 700; display: flex; align-items: center; gap: 6px; }
.pv-th .pv-name span { color: #999; font-weight: 400; font-size: 12px; }
.pv-th .pv-text { margin-top: 4px; white-space: pre-wrap; word-break: break-word; line-height: 1.4; }
.pv-th .pv-actions { display: flex; gap: 18px; margin-top: 12px; color: #000; }
.pv-th .pv-actions svg { width: 21px; height: 21px; }

.pv-empty-hint { color: #aaa; font-style: italic; }

/* ============ CONNECT MODAL ============ */
.connect-modal {
  background: var(--surface); border-radius: var(--radius-lg);
  width: 100%; max-width: 520px; max-height: 92vh; overflow: hidden;
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column;
  transform: translateY(16px) scale(.98); transition: transform .25s var(--ease);
}
.overlay.open .connect-modal { transform: none; }
.connect-body { padding: 22px 24px; overflow-y: auto; }
.connect-step { font-size: 12.5px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 16px; }
.connect-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.connect-opt {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 18px 10px; border: 1.5px solid var(--line); border-radius: var(--radius);
  background: var(--surface); font-weight: 700; font-size: 13px; color: var(--ink);
  transition: border-color .15s, transform .12s, box-shadow .15s;
}
.connect-opt:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.connect-glyph { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; color: #fff; }
.connect-glyph svg { width: 22px; height: 22px; }
.connect-glyph.lg { width: 52px; height: 52px; border-radius: 15px; }
.connect-glyph.lg svg { width: 26px; height: 26px; }
.connect-form { display: flex; flex-direction: column; }
.connect-auth { display: flex; align-items: center; gap: 14px; padding: 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 18px; }
.connect-auth b { font-size: 15px; display: block; }
.connect-auth span { font-size: 12.5px; color: var(--ink-3); }

/* ============ SETTINGS ============ */
.settings-wrap { display: flex; flex-direction: column; gap: 16px; max-width: 760px; }
.settings-id { display: flex; align-items: center; gap: 14px; padding: 4px 0 18px; }
.settings-avatar { width: 56px; height: 56px; border-radius: 16px; background: var(--mint); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 20px; font-family: "Bricolage Grotesque"; }
.settings-id-meta b { font-size: 17px; display: block; }
.settings-id-meta span { font-size: 13px; color: var(--ink-3); }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.set-field { display: flex; flex-direction: column; }
.set-field .field-label { margin-bottom: 7px; }
.set-toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-top: 1px solid var(--line); }
.set-toggle-row:first-of-type { border-top: none; }
.set-toggle-row b { font-size: 13.5px; display: block; }
.set-toggle-row span { font-size: 12px; color: var(--ink-3); }
.plan-panel .plan-badge { font-size: 11.5px; font-weight: 800; padding: 4px 12px; border-radius: 20px; background: var(--bg-tint); color: var(--ink-2); }
.plan-panel .plan-badge.pro { background: var(--accent); color: #fff; }
.plan-actions { display: flex; gap: 10px; }
.danger-panel { border-color: var(--accent-soft); }
.danger-btn { color: var(--accent-deep); border-color: var(--accent-soft); }
.danger-btn:hover { background: var(--accent-soft); border-color: var(--accent); }
.settings-save-bar { display: flex; align-items: center; justify-content: flex-end; gap: 14px; position: sticky; bottom: 0; padding: 14px 0; }
.save-hint { font-size: 12px; color: var(--ink-3); font-weight: 600; }

/* Channel card remove button */
.cc-remove { margin-left: auto; opacity: 0; transition: opacity .15s; }
.channel-card:hover .cc-remove { opacity: 1; }

/* Search results banner */
.search-banner { display: flex; align-items: center; gap: 9px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 18px; }
.search-banner svg { width: 15px; height: 15px; color: var(--ink-3); }
.search-banner button { margin-left: auto; font-weight: 700; color: var(--accent-deep); font-size: 12.5px; }
.search-banner button:hover { text-decoration: underline; }

/* ============ TOAST ============ */
.toast-wrap { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.toast {
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px;
  font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 10px;
  animation: toast-in .3s var(--ease);
}
.toast svg { width: 17px; height: 17px; color: var(--mint); }
.toast.warn svg { color: var(--amber); }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ============ MISC ============ */
.empty-state { text-align: center; padding: 60px 20px; color: var(--ink-3); }
.empty-state svg { width: 48px; height: 48px; margin-bottom: 14px; opacity: .4; }
.empty-state h3 { font-size: 17px; color: var(--ink-2); margin-bottom: 6px; }

.view { display: none; animation: fade-up .4s var(--ease); }
.view.active { display: block; }
@keyframes fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.stagger > * { animation: fade-up .5s var(--ease) backwards; }

.fab { display: none; }

/* Scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--ink-3); }
::-webkit-scrollbar-track { background: transparent; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1080px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .analytics-row { grid-template-columns: 1fr; }
  .composer-body { grid-template-columns: 1fr; }
  .composer-right { border-left: none; border-top: 1px solid var(--line); }
}
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 80; transform: translateX(-100%); transition: transform .3s var(--ease); box-shadow: var(--shadow-lg); width: 248px; }
  .sidebar.open { transform: none; }
  .menu-toggle { display: grid !important; }
  .search { display: none; }
  .content { padding: 18px 16px 80px; }
  .topbar { padding: 14px 16px; }
  .cal-cell { min-height: 86px; }
  .scrim { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 70; display: none; }
  .scrim.open { display: block; }
  .fab { display: grid; position: fixed; bottom: 22px; right: 22px; width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: #fff; place-items: center; box-shadow: var(--shadow-accent); z-index: 60; }
  .fab svg { width: 26px; height: 26px; }
}
.menu-toggle { display: none; }
@media (max-width: 600px) {
  .stat-grid { grid-template-columns: 1fr; }
  .cal-head div { font-size: 9px; padding: 8px 4px; }
  .cal-cell { padding: 4px; }
  .post-row { flex-wrap: wrap; }
  .heatmap { grid-template-columns: 28px repeat(7, 1fr); }
  .settings-grid { grid-template-columns: 1fr; }
  .connect-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============ SIDEBAR ADMIN LINK ============ */
.nav-admin { margin-top: 2px; color: var(--ink-3); }
.nav-admin:hover { color: var(--accent-deep); background: var(--accent-tint); }

/* ============ CLIENT DASHBOARD ============ */
.dash-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 18px; align-items: stretch; }
.dash-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 22px;
  background: linear-gradient(120deg, var(--accent) 0%, var(--accent-deep) 100%);
  border: none; color: #fff; position: relative; overflow: hidden;
}
.dash-hero::after { content: ""; position: absolute; right: -40px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.18), transparent 70%); }
.dash-hero-text { position: relative; z-index: 1; }
.dash-hero-text h3 { font-size: 22px; color: #fff; margin-bottom: 6px; }
.dash-hero-text p { font-size: 13px; color: rgba(255,255,255,.85); margin-bottom: 16px; }
.dash-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.dash-hero .btn-primary { background: #fff; color: var(--accent-deep); box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.dash-hero .btn-primary:hover { background: #fff; box-shadow: 0 10px 26px rgba(0,0,0,.24); }
.dash-hero .btn-ghost { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.32); }
.dash-hero .btn-ghost:hover { background: rgba(255,255,255,.24); border-color: rgba(255,255,255,.5); }
.dash-next { position: relative; z-index: 1; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); border-radius: var(--radius); padding: 14px 16px; min-width: 180px; max-width: 220px; }
.dash-next-label { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.78); display: block; margin-bottom: 4px; }
.dash-next b { font-size: 15px; display: block; }
.dash-next-txt { font-size: 12px; color: rgba(255,255,255,.85); display: block; margin-top: 6px; line-height: 1.4; }
.dash-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dash-stats .stat-card { margin: 0; }
.dash-side { display: flex; flex-direction: column; gap: 18px; }
.dash-up-list { display: flex; flex-direction: column; }
.dash-up-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer; transition: background .14s; border-radius: 10px; }
.dash-up-row:first-child { border-top: none; }
.dash-up-row:hover { background: var(--surface-2); }
.dash-up-when { width: 88px; flex-shrink: 0; }
.dash-up-when b { font-size: 13px; display: block; }
.dash-up-when span { font-size: 12px; color: var(--ink-3); }
.dash-up-body { flex: 1; min-width: 0; }
.dash-up-plats { display: flex; gap: 5px; margin-bottom: 5px; }
.plat-badge.sm { width: 20px; height: 20px; border-radius: 6px; }
.plat-badge.sm svg { width: 11px; height: 11px; }
.dash-up-txt { font-size: 13px; color: var(--ink-2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.dash-up-thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.dash-ch-list { display: flex; flex-direction: column; }
.dash-ch-row { display: flex; align-items: center; gap: 11px; padding: 9px 0; border-top: 1px solid var(--line); }
.dash-ch-row:first-child { border-top: none; }
.dash-ch-av { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: #fff; flex-shrink: 0; }
.dash-ch-av svg { width: 16px; height: 16px; }
.dash-ch-meta { flex: 1; min-width: 0; line-height: 1.3; }
.dash-ch-meta b { font-size: 13px; display: block; }
.dash-ch-meta span { font-size: 11.5px; color: var(--ink-3); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-ch-state { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; flex-shrink: 0; }
.dash-ch-state.on { background: var(--green-soft); color: #1c8a55; }
.dash-ch-state.off { background: var(--bg-tint); color: var(--ink-3); }
.dash-draft-card { display: flex; flex-direction: column; }
.dash-empty { text-align: center; max-width: 460px; margin: 60px auto; }
.dash-empty-glyph { width: 72px; height: 72px; border-radius: 22px; background: var(--accent-tint); color: var(--accent); display: grid; place-items: center; margin: 0 auto 20px; }
.dash-empty-glyph svg { width: 34px; height: 34px; }
.dash-empty h2 { font-size: 24px; margin-bottom: 10px; }
.dash-empty p { color: var(--ink-2); margin-bottom: 22px; }
.dash-empty-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 1080px) {
  .dash-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .dash-hero { flex-direction: column; align-items: stretch; }
  .dash-next { max-width: none; }
  .dash-stats { grid-template-columns: 1fr 1fr; }
}

/* ============ ONBOARDING ============ */
body.onb-locked { overflow: hidden; }
.onb { position: fixed; inset: 0; z-index: 300; background: rgba(28,23,20,.46); backdrop-filter: blur(6px); display: none; align-items: center; justify-content: center; padding: 24px; }
.onb.open { display: flex; animation: fade-up .3s var(--ease); }
.onb-card { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; max-width: 880px; min-height: 540px; display: grid; grid-template-columns: 264px 1fr; overflow: hidden; }
.onb-side { background: var(--surface-2); border-right: 1px solid var(--line); padding: 26px 22px; display: flex; flex-direction: column; }
.onb-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 30px; }
.onb-brand .brand-mark { width: 36px; height: 36px; }
.onb-brand .brand-name { font-family: "Bricolage Grotesque"; font-size: 21px; font-weight: 700; letter-spacing: -.03em; }
.onb-brand .brand-name b { color: var(--accent); }
.onb-steps { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.onb-step { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 11px; color: var(--ink-3); font-weight: 600; font-size: 13px; transition: all .18s; }
.onb-step.current { background: var(--accent-tint); color: var(--accent-deep); }
.onb-step.done { color: var(--ink-2); }
.onb-step-dot { width: 24px; height: 24px; border-radius: 50%; background: var(--bg-tint); color: var(--ink-3); display: grid; place-items: center; font-size: 12px; font-weight: 800; flex-shrink: 0; }
.onb-step.current .onb-step-dot { background: var(--accent); color: #fff; }
.onb-step.done .onb-step-dot { background: var(--green); color: #fff; }
.onb-step.done .onb-step-dot svg { width: 13px; height: 13px; stroke-width: 3; }
.onb-side-foot { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.onb-main { padding: 26px 30px; display: flex; flex-direction: column; position: relative; }
.onb-skip { position: absolute; top: 22px; right: 26px; font-size: 12.5px; font-weight: 700; color: var(--ink-3); padding: 6px 10px; border-radius: 8px; }
.onb-skip:hover { color: var(--ink); background: var(--surface-2); }
.onb-stage { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 8px 0; overflow-y: auto; }
.onb-foot { display: flex; align-items: center; gap: 14px; padding-top: 18px; border-top: 1px solid var(--line); }
.onb-dots { display: flex; gap: 6px; margin: 0 auto; }
.onb-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); transition: all .2s; }
.onb-dot.on { background: var(--accent); width: 20px; border-radius: 5px; }
/* steps */
.onb-hero { text-align: center; max-width: 440px; margin: 0 auto; }
.onb-hero-glyph { width: 66px; height: 66px; border-radius: 20px; background: var(--accent-tint); color: var(--accent); display: grid; place-items: center; margin: 0 auto 18px; }
.onb-hero-glyph svg { width: 32px; height: 32px; }
.onb-hero-glyph.done { background: var(--green-soft); color: var(--green); }
.onb-hero-glyph.done svg { stroke-width: 3; }
.onb-hero h2 { font-size: 25px; margin-bottom: 10px; }
.onb-hero p { color: var(--ink-2); margin-bottom: 18px; }
.onb-feats { display: flex; flex-direction: column; gap: 10px; text-align: left; margin: 4px 0 16px; }
.onb-feat { display: flex; align-items: center; gap: 13px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; }
.onb-feat svg { width: 20px; height: 20px; color: var(--accent); flex-shrink: 0; }
.onb-feat b { font-size: 13.5px; display: block; }
.onb-feat span { font-size: 12px; color: var(--ink-3); }
.onb-tiny { font-size: 12px; color: var(--ink-3); margin-bottom: 0 !important; }
.onb-form { max-width: 420px; margin: 0 auto; width: 100%; }
.onb-form h2 { font-size: 23px; margin-bottom: 8px; }
.onb-form > p { color: var(--ink-2); margin-bottom: 20px; }
.onb-form .field-label { margin-top: 0; }
.onb-form .input { width: 100%; }
.onb-form .onb-tiny { margin-top: 12px; }
.onb-req { font-size: 10px; font-weight: 800; letter-spacing: .05em; color: var(--accent-deep); background: var(--accent-tint); padding: 1px 7px; border-radius: 20px; margin-left: 6px; text-transform: uppercase; }
.input.onb-err { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); animation: onb-shake .4s; }
@keyframes onb-shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-5px)} 75%{transform:translateX(5px)} }
.onb-grid { grid-template-columns: repeat(3, 1fr); margin: 4px 0; }
.connect-opt.sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); background: var(--accent-tint); }
.onb-summary { display: flex; flex-direction: column; gap: 1px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; text-align: left; margin: 4px 0 16px; }
.onb-sum-row { display: flex; align-items: center; gap: 11px; padding: 12px 16px; background: var(--surface); }
.onb-sum-row svg { width: 17px; height: 17px; color: var(--accent); flex-shrink: 0; }
.onb-sum-row span { font-size: 12.5px; color: var(--ink-3); width: 96px; flex-shrink: 0; }
.onb-sum-row b { font-size: 13.5px; }
@media (max-width: 720px) {
  .onb-card { grid-template-columns: 1fr; min-height: 0; max-height: 92vh; }
  .onb-side { display: none; }
  .onb-main { padding: 22px 18px; }
  .onb-skip { top: 18px; right: 18px; }
  .onb-grid { grid-template-columns: repeat(2, 1fr); }
}
