/* roadmaps design system — modern SaaS app shell (Linear/Height/Vercel-grade).
   Inter variable, sidebar app shell for admin, polished public portal, inline
   SVG icon set. Class names from the views are preserved. */
:root {
  --bg: #f7f7f9; --surface: #ffffff; --raised: #ffffff;
  --ink: #15171c; --ink-2: #51555e; --muted: #8b8f99;
  --line: #ececed; --line-2: #f3f3f5; --hover: #f5f5f7;
  --brand: #5b5bd6; --brand-ink: #18181b;
  --green: #157f48; --green-bg: #e3f4ea; --amber: #976a16; --amber-bg: #f6eed8;
  --purple: #6d4ad6; --red: #c2362a; --red-bg: #fbe7e4;
  --radius: 4px; --radius-sm: 4px; --radius-xs: 4px; --radius-lg: 4px;
  --shadow-xs: 0 1px 2px rgba(18,18,23,.05);
  --shadow: 0 1px 2px rgba(18,18,23,.04), 0 2px 6px -2px rgba(18,18,23,.06);
  --shadow-md: 0 6px 16px -4px rgba(18,18,23,.12), 0 2px 6px -2px rgba(18,18,23,.06);
  --shadow-lg: 0 20px 48px -16px rgba(18,18,23,.24);
  --sidebar-w: 246px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font); background: var(--bg); color: var(--ink);
  font-size: 14px; line-height: 1.55; letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility; font-feature-settings: 'cv02','cv03','cv04','cv11';
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: none; }
h1,h2,h3 { letter-spacing: -0.025em; line-height: 1.2; font-weight: 650; color: var(--ink); margin: 0; }
h1 { font-weight: 700; }
.serif { font-weight: 700; letter-spacing: -0.035em; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.grow { flex: 1; }
.row { display: flex; gap: 12px; align-items: center; }
.row.wrap-row { flex-wrap: wrap; }
.spread { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 14px; }
hr { border: none; border-top: 1px solid var(--line); margin: 20px 0; }
code { font-family: ui-monospace,'SF Mono',Menlo,monospace; font-size: .86em; background: var(--line-2); padding: .14em .44em; border-radius: 4px; }
.ico { display: inline-block; vertical-align: -0.18em; flex: none; }

/* simple sticky header (onboarding / fallback pages) */
.topbar { background: rgba(255,255,255,.85); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.topbar .wrap { display: flex; align-items: center; gap: 14px; height: 56px; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 640px; }
.brand { font-weight: 700; font-size: 16.5px; letter-spacing: -.03em; color: var(--ink); }
.brand:hover { text-decoration: none; }

/* ============ APP SHELL (admin) ============ */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: var(--surface); border-right: 1px solid var(--line); padding: 12px; gap: 6px; }
.side-top { padding: 2px; }
.ws-switch { position: relative; display: flex; align-items: center; gap: 9px; padding: 8px;
  border-radius: 4px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; transition: background .12s; }
.ws-switch:hover { background: var(--hover); }
.ws-name { font-weight: 650; font-size: 13.5px; letter-spacing: -.01em; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-chevron { color: var(--muted); display: flex; }
.ws-switch form { position: absolute; inset: 0; margin: 0; }
.ws-switch select { width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; }
.side-nav { display: flex; flex-direction: column; gap: 1px; margin-top: 6px; }
.side-nav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 4px;
  color: var(--ink-2); font-weight: 500; font-size: 13.5px; transition: background .1s, color .1s; }
.side-nav a .ico { color: var(--muted); transition: color .1s; }
.side-nav a:hover { background: var(--hover); color: var(--ink); }
.side-nav a:hover .ico { color: var(--ink-2); }
.side-nav a.active { background: color-mix(in srgb, var(--brand) 11%, transparent); color: var(--brand); font-weight: 600; }
.side-nav a.active .ico { color: var(--brand); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 4px; padding-top: 8px; border-top: 1px solid var(--line-2); }
.side-link { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 4px; color: var(--ink-2); font-weight: 500; font-size: 13px; }
.side-link .ico { color: var(--muted); }
.side-link:hover { background: var(--hover); color: var(--ink); }
.side-user { display: flex; align-items: center; gap: 8px; padding: 6px 8px; }
.side-email { flex: 1; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user form { margin: 0; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px;
  border-radius: 4px; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; transition: .12s; }
.icon-btn:hover { background: var(--hover); color: var(--ink); }
.canvas { min-width: 0; background: var(--bg); }
.inner { padding: 10px 40px 56px; max-width: 1040px; }
/* Inside the canvas, legacy .wrap becomes a passthrough (the canvas controls width). */
.canvas .wrap { max-width: none; padding: 0; margin: 0; }

/* ============ PORTAL HEADER ============ */
.portal-bar { background: rgba(255,255,255,.85); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.portal-bar-in { max-width: 940px; margin: 0 auto; padding: 0 22px; height: 60px; display: flex; align-items: center; gap: 20px; }
.portal-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; letter-spacing: -.03em; color: var(--ink); }
.portal-logo img { height: 26px; }
.logo-mark { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 4px;
  background: var(--brand); color: #fff; font-size: 14px; font-weight: 700; }
.portal-nav { display: flex; gap: 2px; }
.portal-nav a { padding: 7px 13px; border-radius: 4px; color: var(--ink-2); font-weight: 500; font-size: 13.5px; }
.portal-nav a:hover { background: var(--hover); color: var(--ink); }
.portal-nav a.active { color: var(--ink); font-weight: 600; }
.portal-bar-in .avatar { margin-left: auto; }

/* ============ BUTTONS ============ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-family: var(--font);
  font-size: 13.5px; font-weight: 550; padding: 8px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer;
  transition: background .12s, border-color .12s, box-shadow .12s, transform .04s; box-shadow: var(--shadow-xs); white-space: nowrap; }
.btn .ico { color: currentColor; opacity: .85; }
.btn:hover { border-color: #dadade; background: #fcfcfd; }
.btn:active { transform: translateY(.5px); }
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.btn.primary { background: var(--brand-ink); color: #fff; border-color: var(--brand-ink); }
.btn.primary:hover { background: #000; border-color: #000; }
.btn.brand { background: var(--brand); color: #fff; border-color: transparent; box-shadow: 0 1px 2px color-mix(in srgb,var(--brand) 40%,transparent); }
.btn.brand:hover { filter: brightness(1.07); }
.btn.ghost { border-color: transparent; background: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--hover); }
.btn.danger { color: var(--red); border-color: var(--red-bg); }
.btn.danger:hover { background: var(--red-bg); border-color: var(--red); }
.btn.sm { padding: 5px 10px; font-size: 12.5px; gap: 5px; }
.btn.lg { padding: 11px 18px; font-size: 14.5px; border-radius: var(--radius); }
.btn:disabled { opacity: .5; cursor: default; }

/* ============ CARDS / PANELS ============ */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.card.flat { box-shadow: none; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.panel > .panel-row { padding: 13px 18px; border-bottom: 1px solid var(--line-2); }
.panel > .panel-row:last-child { border-bottom: none; }
a.panel-row:hover { background: var(--hover); }

/* ============ FORMS ============ */
label { display: block; font-weight: 550; font-size: 12.5px; margin-bottom: 6px; color: var(--ink-2); }
input[type=text], input[type=email], input[type=url], input[type=search], select, textarea {
  width: 100%; font-family: var(--font); font-size: 13.5px; color: var(--ink); padding: 9px 12px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); outline: none;
  transition: border-color .12s, box-shadow .12s; box-shadow: var(--shadow-xs); }
input::placeholder, textarea::placeholder { color: #aeb2bb; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb,var(--brand) 16%,transparent); }
textarea { resize: vertical; min-height: 88px; line-height: 1.5; }
.field { margin-bottom: 16px; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 5px; }

/* ============ CHIPS / STATUS ============ */
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 550; padding: 2.5px 9px; border-radius: 4px; background: var(--line-2); color: var(--ink-2); }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: currentColor; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 4px;
  color: var(--sc, var(--muted)); background: color-mix(in srgb, var(--sc, #888) 12%, transparent); }
.status .dot { background: var(--sc, var(--muted)); }

/* ============ VOTE ============ */
.vote { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 52px; gap: 1px;
  padding: 7px 6px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface);
  color: var(--ink-2); cursor: pointer; line-height: 1.1; transition: .12s; user-select: none; box-shadow: var(--shadow-xs); }
.vote:hover { border-color: var(--brand); color: var(--brand); }
.vote.voted { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 1px 3px color-mix(in srgb,var(--brand) 40%,transparent); }
.vote .ico { opacity: .95; }
.vote .count { font-weight: 700; font-size: 14px; letter-spacing: -.02em; }
.vote .lbl { font-size: 10px; opacity: .7; font-weight: 500; }

/* ============ POST LIST ============ */
.post-item { display: flex; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--line-2); transition: background .1s; }
.post-item:hover { background: var(--hover); }
.post-item:last-child { border-bottom: none; }
.post-item h3 { margin: 0 0 5px; font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; }
.post-item h3 a { color: var(--ink); }
.post-item .meta { font-size: 12.5px; color: var(--muted); display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.post-item .meta .ico { color: var(--muted); }

/* ============ KANBAN ============ */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 14px; }
.kanban-col { background: var(--line-2); border-radius: var(--radius); display: flex; flex-direction: column; min-height: 140px; }
.kanban-col > .col-head { padding: 12px 14px 10px; font-weight: 650; font-size: 12.5px; letter-spacing: -.01em; display: flex; justify-content: space-between; align-items: center; color: var(--ink-2); }
.kanban-col > .col-head .count-pill { background: var(--surface); color: var(--muted); border-radius: 4px; padding: 1px 8px; font-size: 11px; font-weight: 600; }
.kanban-col > .col-body { padding: 0 8px 8px; display: flex; flex-direction: column; gap: 8px; }
.kanban-card { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 12px; background: var(--surface); cursor: grab; box-shadow: var(--shadow-xs); transition: box-shadow .12s, transform .04s, border-color .12s; }
.kanban-card:hover { box-shadow: var(--shadow-md); border-color: #dcdce1; }
.kanban-card:active { cursor: grabbing; }
.kanban-card a { color: var(--ink); }
.kanban-card.drag-over { outline: 2px dashed var(--brand); }
.kanban-col.drag-over { background: color-mix(in srgb, var(--brand) 9%, var(--line-2)); }

/* ============ CHANGELOG ============ */
.cl-entry { padding: 26px 0; border-bottom: 1px solid var(--line); }
.cl-labels { display: flex; gap: 6px; margin-bottom: 10px; }
.lbl-new { background: var(--green-bg); color: var(--green); }
.lbl-improved { background: color-mix(in srgb,var(--brand) 14%,transparent); color: var(--brand); }
.lbl-fixed { background: var(--amber-bg); color: var(--amber); }

/* ============ PUBLIC ROADMAP ============ */
.rm-page { max-width: 1120px; margin: 0 auto; padding: 46px 24px 72px; }
.rm-head { margin-bottom: 34px; }
.rm-head h1 { font-size: 30px; font-weight: 760; letter-spacing: -.04em; }
.rm-sub { color: var(--muted); font-size: 15px; margin-top: 7px; max-width: 540px; }
.rm-cols { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 26px; align-items: start; }
.rm-col { min-width: 0; }
.rm-col-head { display: flex; align-items: center; gap: 9px; padding-bottom: 12px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.rm-dot { position: relative; width: 10px; height: 10px; border-radius: 50%; background: var(--pa, var(--sc)); flex: none; }
.rm-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--pa, var(--sc));
  opacity: .5; animation: rm-pulse 2.4s cubic-bezier(.35,0,.25,1) infinite; }
@keyframes rm-pulse { 0% { transform: scale(1); opacity: .5; } 70%, 100% { transform: scale(3.2); opacity: 0; } }
.rm-col:nth-child(2) .rm-dot::after { animation-delay: .6s; }
.rm-col:nth-child(3) .rm-dot::after { animation-delay: 1.2s; }
.rm-col:nth-child(4) .rm-dot::after { animation-delay: 1.8s; }
.rm-col:nth-child(5) .rm-dot::after { animation-delay: 2.4s; }
@media (prefers-reduced-motion: reduce) { .rm-dot::after { animation: none; } }
.rm-col-title { font-weight: 650; font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2); }
.rm-col-count { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--muted); }
.rm-col-list { display: flex; flex-direction: column; gap: 11px; }
.rm-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 4px;
  padding: 15px 16px; box-shadow: var(--shadow-xs); transition: box-shadow .15s, border-color .15s, transform .06s; overflow: hidden; }
.rm-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--sc); opacity: 0; transition: opacity .15s; }
.rm-card:hover { box-shadow: var(--shadow-md); border-color: #dbdbe1; transform: translateY(-1px); }
.rm-card:hover::before { opacity: .65; }
.rm-card-title { display: block; font-size: 14.5px; font-weight: 600; line-height: 1.4; letter-spacing: -.012em; color: var(--ink); }
.rm-card-title:hover { color: var(--brand); }
.rm-card-desc { margin: 6px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rm-card-foot { display: flex; align-items: center; gap: 8px; margin-top: 13px; }
.rm-vote { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); background: var(--surface);
  border-radius: 4px; padding: 3px 11px 3px 8px; font-size: 12.5px; font-weight: 650; color: var(--ink-2); cursor: pointer; transition: .12s; }
.rm-vote .ico { opacity: .9; }
.rm-vote:hover { border-color: var(--brand); color: var(--brand); }
.rm-vote.voted { background: var(--brand); border-color: var(--brand); color: #fff; }
.rm-tag { font-size: 11px; font-weight: 550; padding: 2px 8px; border-radius: 4px; color: var(--tc); background: color-mix(in srgb, var(--tc) 13%, transparent); }
.rm-empty { font-size: 12.5px; color: var(--muted); padding: 16px 4px; border: 1px dashed var(--line); border-radius: 4px; text-align: center; }
@media (max-width: 900px) { .rm-cols { grid-template-columns: repeat(2, 1fr) !important; } }
@media (max-width: 560px) { .rm-cols { grid-template-columns: 1fr !important; } }

/* ============ MISC ============ */
.flash { padding: 11px 14px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: 13.5px; font-weight: 500; border: 1px solid transparent; }
.flash.ok { background: var(--green-bg); color: var(--green); }
.flash.err { background: var(--red-bg); color: var(--red); }
.empty { text-align: center; padding: 56px 20px; color: var(--muted); }
.empty .serif { font-size: 19px; color: var(--ink); display: block; margin-bottom: 6px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin: 26px 0 22px; }
.page-head h1 { font-size: 22px; }
.grid-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 14px; }
.stat .n { font-size: 28px; font-weight: 700; letter-spacing: -.035em; }
.stat .l { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tabs a { padding: 9px 13px; color: var(--ink-2); font-weight: 500; font-size: 13.5px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.active { color: var(--ink); border-bottom-color: var(--ink); }
.toolbar { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
/* segmented control (sort tabs reuse .btn.sm groups; this refines a run of them) */
.seg { display: inline-flex; background: var(--line-2); border-radius: var(--radius-sm); padding: 3px; gap: 2px; }
.seg a { padding: 5px 11px; border-radius: 4px; font-size: 12.5px; font-weight: 550; color: var(--ink-2); }
.seg a:hover { color: var(--ink); }
.seg a.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-xs); }
.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-weight: 650; font-size: 12px; flex: none; }

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; align-items: center; flex-wrap: wrap; border-right: none; border-bottom: 1px solid var(--line); }
  .side-nav { flex-direction: row; flex-wrap: wrap; margin-top: 0; }
  .side-nav a span { display: none; }
  .side-foot { margin: 0 0 0 auto; flex-direction: row; border: none; padding-top: 0; }
  .side-link span { display: none; }
  .inner { padding: 16px 20px 48px; }
  .page-head { flex-direction: column; align-items: stretch; }
}

/* ============ THEME TOGGLE ICON ============ */
:root { color-scheme: light; }
.theme-toggle .ico:nth-child(2) { display: none; }
[data-theme="dark"] .theme-toggle .ico:nth-child(1) { display: none; }
[data-theme="dark"] .theme-toggle .ico:nth-child(2) { display: inline-block; }

/* ============ DARK MODE ============ */
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d0e10; --surface: #161719; --raised: #1c1e21;
  --ink: #f0f1f3; --ink-2: #b6bac1; --muted: #7d818b;
  --line: #282a2f; --line-2: #1d1f22; --hover: #1f2125;
  --brand-ink: #f0f1f3;
  --green: #4ec78a; --green-bg: #11281d; --amber: #d9a441; --amber-bg: #2a2113;
  --red: #f0837a; --red-bg: #2c1816;
  --shadow-xs: 0 1px 2px rgba(0,0,0,.4);
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 2px 6px -2px rgba(0,0,0,.5);
  --shadow-md: 0 6px 18px -4px rgba(0,0,0,.6), 0 2px 6px -2px rgba(0,0,0,.45);
  --shadow-lg: 0 24px 52px -16px rgba(0,0,0,.72);
}
[data-theme="dark"] .topbar, [data-theme="dark"] .portal-bar { background: rgba(16,17,20,.82); }
[data-theme="dark"] .btn.primary { color: #15171c; }
[data-theme="dark"] .btn.primary:hover { background: #fff; border-color: #fff; }
[data-theme="dark"] .btn:hover { background: var(--hover); border-color: #3a3d42; }
[data-theme="dark"] .vote:hover { background: var(--hover); }
[data-theme="dark"] .kanban-card:hover, [data-theme="dark"] .rm-card:hover { border-color: #3a3d42; }
[data-theme="dark"] input::placeholder, [data-theme="dark"] textarea::placeholder { color: #676b74; }
/* Status / category text needs lifting toward white on dark backgrounds. */
[data-theme="dark"] .status { color: color-mix(in srgb, var(--sc) 62%, white); background: color-mix(in srgb, var(--sc) 24%, transparent); }
[data-theme="dark"] .rm-tag { color: color-mix(in srgb, var(--tc) 68%, white); background: color-mix(in srgb, var(--tc) 22%, transparent); }
[data-theme="dark"] .lbl-improved { background: color-mix(in srgb, var(--brand) 26%, transparent); color: color-mix(in srgb, var(--brand) 55%, white); }

/* ============ TOASTS ============ */
#toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 100; align-items: center; pointer-events: none; }
.toast { background: var(--ink); color: var(--bg); font-size: 13px; font-weight: 550; padding: 9px 16px; border-radius: 4px; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; pointer-events: auto; }
.toast.show { opacity: 1; transform: translateY(0); }

/* ============ URL BOX (settings / share) ============ */
.url-box { display: flex; align-items: center; gap: 8px; }
.url-box .u { flex: 1; min-width: 0; padding: 9px 12px; background: var(--line-2); border: 1px solid var(--line); border-radius: var(--radius-sm); font-family: ui-monospace,'SF Mono',Menlo,monospace; font-size: 12.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty .btn { margin-top: 14px; }
.share-row { display: flex; gap: 8px; align-items: center; }

/* ============ SIDEBAR SEARCH ============ */
.side-search { display: flex; align-items: center; gap: 7px; margin-top: 8px; padding: 0 9px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); }
.side-search .ico { color: var(--muted); flex: none; }
.side-search input { border: 0; box-shadow: none; padding: 7px 0; font-size: 13px; background: transparent; }
.side-search input:focus { box-shadow: none; }

/* ============ UPLOADER + ATTACHMENTS ============ */
.uploader { margin-top: 10px; }
.uploader-btn { cursor: pointer; }
.uploader-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.up-thumb { position: relative; width: 64px; height: 64px; border-radius: 4px; overflow: hidden; border: 1px solid var(--line); background: var(--line-2); }
.up-thumb img { width: 100%; height: 100%; object-fit: cover; }
.up-thumb.file { display: flex; align-items: center; justify-content: center; font-size: 10px; color: var(--muted); padding: 4px; text-align: center; word-break: break-word; }
.up-thumb .rm { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; border: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 12px; line-height: 1; }
.up-thumb.pending { opacity: .5; }
.attachments { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.att-img { display: block; width: 120px; height: 120px; border-radius: 4px; overflow: hidden; border: 1px solid var(--line); }
.att-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.att-img:hover img { transform: scale(1.04); }
.att-file { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 4px; font-size: 13px; color: var(--ink-2); }
.att-file:hover { border-color: var(--brand); color: var(--brand); }

/* ============ ANALYTICS CHARTS ============ */
.chart { display: flex; align-items: flex-end; gap: 2px; height: 120px; padding-top: 8px; }
.chart .bar { flex: 1; min-height: 2px; border-radius: 3px 3px 0 0; opacity: .85; transition: opacity .1s; }
.chart .bar:hover { opacity: 1; }
.bar-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.bar-lbl { width: 96px; font-size: 12.5px; color: var(--ink-2); flex: none; }
.bar-track { flex: 1; height: 8px; background: var(--line-2); border-radius: 4px; overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 4px; }
.bar-num { width: 28px; text-align: right; font-size: 12.5px; font-weight: 600; color: var(--muted); }

/* ============ BULK ACTION BAR ============ */
.bulk-check { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; flex: none; align-self: center; }
.bulk-bar { position: sticky; bottom: 16px; z-index: 20; display: none; align-items: center; gap: 12px; margin-top: 14px;
  background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 4px; box-shadow: var(--shadow-lg); }
.bulk-bar.show { display: flex; }
.bulk-bar .bulk-count { font-weight: 600; font-size: 13px; }
.bulk-bar select { width: auto; background: rgba(255,255,255,.1); color: var(--bg); border-color: transparent; }
.bulk-bar .grow { flex: 1; }

/* ============ EMBED WIDGET ============ */
body.embed { background: transparent; }
.embed-wrap { padding: 14px; }
.embed-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.embed-head h2 { font-size: 16px; }
#rm-launcher { position: fixed; bottom: 20px; right: 20px; z-index: 2147483000; }

/* ============ PASTEL ACCENTS ============ */
/* Stat cards rotate through soft, theme-aware pastels (tint over the surface so
   they stay subtle in light AND dark). */
.grid-stats .stat:nth-child(5n+1) { --p: #6d4ad6; }  /* lavender */
.grid-stats .stat:nth-child(5n+2) { --p: #1f9e6b; }  /* mint */
.grid-stats .stat:nth-child(5n+3) { --p: #d98324; }  /* peach */
.grid-stats .stat:nth-child(5n+4) { --p: #2c7be6; }  /* sky */
.grid-stats .stat:nth-child(5n+5) { --p: #d6457f; }  /* rose */
.grid-stats .stat { background: color-mix(in srgb, var(--p, var(--brand)) 9%, var(--surface));
  border-color: color-mix(in srgb, var(--p, var(--brand)) 18%, transparent); }
.grid-stats .stat .n { color: var(--p, var(--brand)); }
.grid-stats .stat .l { color: color-mix(in srgb, var(--p, var(--brand)) 50%, var(--muted)); }
[data-theme="dark"] .grid-stats .stat { background: color-mix(in srgb, var(--p, var(--brand)) 16%, var(--surface)); }
[data-theme="dark"] .grid-stats .stat .n { color: color-mix(in srgb, var(--p, var(--brand)) 55%, white); }

/* Soft pastel on the "Get started" / first-run card. */
.card.welcome { background: linear-gradient(135deg,
   color-mix(in srgb, #6d4ad6 8%, var(--surface)),
   color-mix(in srgb, #2c7be6 8%, var(--surface)));
  border-color: color-mix(in srgb, #6d4ad6 16%, transparent); }

/* Empty-state headline gets a gentle gradient wash. */
.empty .serif { background: linear-gradient(90deg, #6d4ad6, #2c7be6);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* Avatars already use per-user pastels; nudge the sidebar nav active tint warmer. */
.side-nav a.active { background: color-mix(in srgb, var(--brand) 13%, transparent); }

/* Column headers stay plain; the pastel lives on the pulsing radials (.rm-dot). */
