/* ═══════════════════════════════════════════════════════════════════════
   OmniManager — by OmniChrome
   Dark-only OmniChrome design system. Component styles are OmniManager's own.

   TOKENS: the :root below is a LOCAL-DEV FALLBACK. The canonical token block
   is /static/omnichrome-tokens.css (OmniClipper repo, shared origin), linked
   from index.html AFTER this file so it wins in prod. Edit tokens there, not
   here — this copy only keeps :3100 styled when the shared file is absent.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  /* brand */
  --brand-magenta: #ff2db7;
  --brand-blue: #2e93f0;
  --brand-gradient: linear-gradient(95deg, #ff2db7 0%, #2e93f0 100%);
  --brand-gradient-45: linear-gradient(45deg, #ff2db7 0%, #2e93f0 100%);
  --brand-gradient-subtle: linear-gradient(95deg, rgba(255,45,183,0.15) 0%, rgba(46,147,240,0.15) 100%);
  /* accent (electric blue) */
  --accent: #3aa0ff;
  --accent-hover: #5fb3ff;
  --accent-active: #2384ec;
  --accent-subtle: rgba(58,160,255,0.14);
  --accent-border: rgba(58,160,255,0.45);
  --accent-bright: #6fc0ff;
  /* magenta */
  --magenta: #ff2db7;
  --magenta-hover: #e81fa3;
  --magenta-subtle: rgba(255,45,183,0.12);
  --magenta-border: rgba(255,45,183,0.35);
  /* semantic */
  --green: #00e08a; --green-subtle: rgba(0,224,138,0.16);
  --red: #ff3355; --red-subtle: rgba(255,51,85,0.16);
  --amber: #ffb020; --amber-subtle: rgba(255,176,32,0.16);
  --violet: #b06bff; --violet-subtle: rgba(176,107,255,0.16);
  /* dark immersive surfaces (only theme) */
  --bg: #06081a; --bg-2: #090d24;
  --surface: #0e1430; --surface-2: #161e44; --surface-3: #212e63;
  --border: #2b3a6e; --border-subtle: #1a2347;
  --text: #eef1fb; --text-2: #c2c9e6; --muted: #8089b0; --muted-2: #565d85;
  /* glass */
  --glass: rgba(22,30,68,0.55); --glass-strong: rgba(22,30,68,0.82);
  --glass-border: rgba(130,165,255,0.22); --glass-blur: blur(16px);
  /* immersive backdrops */
  --bg-immersive: radial-gradient(circle at 18% -10%, rgba(58,160,255,0.16), transparent 45%), radial-gradient(circle at 95% 110%, rgba(255,45,183,0.14), transparent 50%), #06081a;
  --bg-grid-img: linear-gradient(rgba(130,165,255,0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(130,165,255,0.04) 1px, transparent 1px);
  /* glow */
  --glow-blue: 0 0 28px rgba(58,160,255,0.5);
  --glow-magenta: 0 0 28px rgba(255,45,183,0.5);
  --glow-accent: 0 0 52px rgba(58,160,255,0.3);
  /* geometry */
  --radius-xs: 4px; --radius-sm: 10px; --radius: 14px; --radius-lg: 20px; --radius-xl: 28px; --radius-full: 9999px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
  --shadow: 0 4px 12px rgba(0,0,0,0.45), 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.5), 0 2px 6px rgba(0,0,0,0.3);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.55), 0 4px 12px rgba(0,0,0,0.3);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 120ms; --duration: 200ms; --duration-slow: 340ms;
  /* fonts */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, sans-serif;
  --font-brand: "Josefin Sans", var(--font);
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  /* layout */
  --topbar-h: 60px;
  --sidebar-w: 220px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
.bg-immersive { position: fixed; inset: 0; background: var(--bg-immersive); z-index: -2; }
.bg-grid { position: fixed; inset: 0; background-image: var(--bg-grid-img); background-size: 46px 46px; z-index: -1; }

button { font-family: inherit; }
input, textarea, select { font-family: inherit; }
a { color: var(--accent); text-decoration: none; }
.tabular { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
/* Secondary/helper copy sizing lives here rather than in ~20 inline
   fontSize overrides in app.js. Split by tag because block helper text and
   inline helper text were consistently authored at different sizes. */
p.muted { font-size: 13.5px; }
span.muted, div.muted { font-size: 13px; }
.hidden { display: none !important; }

/* ── Topbar ─────────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 100;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 14px;
  padding: 0 20px;
  background: var(--glass); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
}
.brand { display: flex; align-items: baseline; gap: 10px; cursor: pointer; }
.brand-lockup { height: 24px; width: auto; display: block; }
.brand-by { font-size: 11px; color: var(--muted); letter-spacing: 0.08em; white-space: nowrap; transform: translateY(-2px); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.menu-btn {
  display: none;
  background: none; border: none; color: var(--text-2); cursor: pointer;
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  align-items: center; justify-content: center;
}
.menu-btn:hover { background: var(--surface-2); color: var(--text); }

/* ── Sidebar ────────────────────────────────────────────────────────── */
.sidebar {
  position: fixed; top: var(--topbar-h); bottom: 0; left: 0; width: var(--sidebar-w);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 18px 12px;
  background: var(--glass); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border-right: 1px solid var(--glass-border);
  z-index: 90;
}
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--text-2); font-size: 14px; font-weight: 500;
  background: none; border: none; cursor: pointer; text-align: left; width: 100%;
  transition: background var(--duration-fast), color var(--duration-fast);
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--accent-subtle); color: var(--accent); }
.nav-item .ico { display: inline-flex; }

.sidebar-foot { display: flex; flex-direction: column; gap: 10px; }
.sidebar-cross { display: flex; flex-direction: column; gap: 4px; }
.ws-switch label { display: block; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-2); margin: 0 2px 4px; }
.ws-switch select { width: 100%; }
.sidebar-user {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 6px 0; border-top: 1px solid var(--border-subtle);
}
.sidebar-user .avatar { flex: none; }
.sidebar-user__body { min-width: 0; flex: 1; }
.sidebar-user__name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user__role { font-size: 11px; color: var(--muted); text-transform: capitalize; }

body.anon .sidebar, body.anon .menu-btn, body.anon .backdrop { display: none; }

.backdrop {
  display: none; position: fixed; inset: 0; background: rgba(9,9,10,0.66); z-index: 85;
}

/* ── Page shell ─────────────────────────────────────────────────────── */
.page { padding: 28px 28px 64px; max-width: 1280px; }
body.authed .page { margin-left: var(--sidebar-w); }
body.anon .page { max-width: none; padding: 0; margin: 0; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 25px; }
.page-head p { color: var(--muted); font-size: 14px; margin-top: 2px; }
.page-head .actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Display type ───────────────────────────────────────────────────── */
/* Newsreader 500 is the redesign's single serif voice. Declared once here so
   every display heading stays in step; individual rules set only size. */
.page-head h1, .detail-head__title h1, .modal__title, .cal-head h2,
.auth-card h1, .empty h3, .overview__big, .detail-progress__pct,
.stat-tile__num, .help-head h3 {
  font-family: var(--font-brand); font-weight: 500; letter-spacing: -0.01em;
}

/* ── Micro-labels ───────────────────────────────────────────────────── */
/* IBM Plex Mono, uppercase, wide tracking — the redesign's eyebrow voice.
   Plex Mono is loaded at 400/500 only, so no 600/700 weights here. */
.eyebrow, .stat-tile__label, .ws-switch label, .cal-dow, .role-badge,
.platform-tag, .viral-badge, .overdue-strip__tag, .status-pill,
.due-tag, .clip-tile__meta, .detail-subhead h2 {
  font-family: var(--font-mono); font-weight: 400;
}

.eyebrow {
  display: inline-block; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted);
}

/* ── Buttons ────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--accent); color: #fff; border: none;
  border-radius: var(--radius-sm); padding: 9px 16px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background var(--duration-fast), transform 50ms, border-color var(--duration-fast), color var(--duration-fast);
  box-shadow: 0 6px 18px -10px var(--accent);
  white-space: nowrap;
}
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: default; }
/* Loudest CTA: solid indigo accent with white text. (Was var(--brand-gradient),
   which the monochrome token override turns near-white → white-on-white text.
   Same fix OmniClipper applied to its own button.gradient.) */
.btn--gradient { background: var(--accent); box-shadow: var(--glow-accent); }
.btn--gradient:hover { background: var(--accent-hover); }
/* Used throughout app.js; previously undefined, so it silently fell back to
   the base .btn. Declared explicitly — same appearance, stated intent. */
.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px -10px var(--accent); }
.btn--primary:hover { background: var(--accent-hover); }
.btn--outline { background: transparent; color: var(--text-2); border: 1px solid var(--border); box-shadow: none; }
.btn--outline:hover { background: var(--surface-2); color: var(--text); border-color: var(--glass-border); }
.btn--ghost { background: transparent; color: var(--text-2); box-shadow: none; }
.btn--ghost:hover { background: var(--surface-2); color: var(--text); }
.btn--destructive { background: var(--red); box-shadow: none; }
.btn--destructive:hover { background: #c95d3f; }
.btn--danger-ghost { background: transparent; color: var(--muted); box-shadow: none; }
.btn--danger-ghost:hover { background: var(--red-subtle); color: var(--red); }
.btn--sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: var(--radius-sm);
  background: transparent; border: 1px solid var(--border); color: var(--text-2); cursor: pointer;
}
.icon-btn:hover { color: var(--accent); border-color: var(--glass-border); background: var(--surface-2); }

/* ── Forms ──────────────────────────────────────────────────────────── */
.field { margin-bottom: 15px; }
.field__label { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; letter-spacing: 0.02em; }
.input, .textarea, .select, select {
  width: 100%;
  background: #141416; color: var(--text);
  border: 1px solid #34343a; border-radius: var(--radius-md);
  padding: 9px 12px; font-size: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}
.textarea { resize: vertical; min-height: 70px; line-height: 1.5; }
.input:focus, .textarea:focus, .select:focus, select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 0 0 3px var(--accent-subtle);
}
.input::placeholder, .textarea::placeholder { color: var(--muted-2); }
select option { background: var(--surface); color: var(--text); }

.check-row { display: flex; flex-wrap: wrap; gap: 8px; }
.check-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--radius-full);
  border: 1px solid #34343a; background: #141416;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  color: var(--text-2); font-size: 13px; font-weight: 500; cursor: pointer; user-select: none;
  transition: all var(--duration-fast);
}
.check-pill.is-on { border-color: var(--accent-border); background: var(--accent-subtle); color: var(--accent-bright); }

/* ── Panels & cards ─────────────────────────────────────────────────── */
.panel {
  background: var(--glass); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border); border-radius: var(--radius-lg);
  padding: 22px; box-shadow: var(--glow-inset), var(--shadow);
}

/* The portfolio hero is the page's primary surface, so it gets the redesign's
   raised-panel recipe: a top-lit gradient body, brighter border, inset white
   hairline and a long directional shadow. Used sparingly on purpose — applying
   it to every card would flatten the hierarchy. */
.overview > .panel:first-child {
  background: linear-gradient(180deg, #1f1f23, #191919);
  backdrop-filter: none; -webkit-backdrop-filter: none;
  border-color: #34343a; border-radius: 16px;
  box-shadow: var(--glow-inset), var(--shadow-lg);
}

/* portfolio overview */
.overview { display: grid; grid-template-columns: minmax(280px, 1.2fr) 1fr; gap: 16px; margin-bottom: 26px; }
/* Display numerals: Newsreader 500 (the redesign's one serif voice). The old
   gradient-clipped fill is gone — it resolves to flat off-white now. */
.overview__big { font-size: 52px; font-family: var(--font-brand); font-weight: 500;
  letter-spacing: -0.01em; line-height: 1; color: var(--text); }
.overview__big sup { font-size: 24px; color: var(--muted); }
.overview__top { display: flex; align-items: baseline; gap: 14px; margin: 10px 0 14px; flex-wrap: wrap; }
.overview__sub { color: var(--muted); font-size: 13px; }
.pill-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat-tile {
  background: var(--glass); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--glow-inset);
}
.stat-tile__label { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.stat-tile__num { font-size: 27px; margin: 3px 0 1px; }
.stat-tile__hint { font-size: 12px; color: var(--muted-2); }

/* project grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.card {
  text-align: left; cursor: pointer;
  background: var(--glass); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border); border-radius: var(--radius-lg);
  padding: 20px; box-shadow: var(--glow-inset), var(--shadow);
  /* align-items must be explicit: Chrome's button UA style centers flex children */
  display: flex; flex-direction: column; gap: 10px; align-items: stretch; color: var(--text);
  transition: border-color var(--duration-fast), transform var(--duration-fast), box-shadow var(--duration-fast);
}
.card:hover { border-color: var(--accent-border); transform: translateY(-2px); box-shadow: var(--glow-inset), var(--shadow-md); }
.card__name { font-size: 17px; font-weight: 600; }
.card__desc { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 38px; }
.card__meter-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.card__meter-top .label { font-size: 12px; color: var(--muted); }
.card__meter-top .val { font-size: 13px; font-weight: 700; color: var(--accent-bright); }
.card__foot { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.card__open { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 600; color: var(--accent); }
.card__badges { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* meter */
.meter { height: 7px; border-radius: var(--radius-full); background: var(--surface-2); overflow: hidden; }
.meter__fill { height: 100%; width: 0; border-radius: var(--radius-full); background: var(--accent); transition: width 0.5s var(--ease); }

/* ── Pills & badges ─────────────────────────────────────────────────── */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--text-2);
  border: 1px solid var(--border); border-radius: var(--radius-full);
  padding: 3px 10px; background: var(--surface);
}
.pill__dot { width: 7px; height: 7px; border-radius: 50%; }
.dot-low { background: var(--green); }
.dot-medium { background: var(--accent); }
.dot-high { background: var(--amber); }
.dot-critical { background: var(--red); }

.status-pill {
  display: inline-flex; align-items: center;
  font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  border-radius: var(--radius-full); padding: 3px 9px;
  border: 1px solid transparent; white-space: nowrap;
}
.st-idea      { background: var(--surface-2);      color: var(--muted);        border-color: var(--border); }
.st-scripting { background: var(--accent-subtle);  color: var(--accent-bright); border-color: var(--accent-border); }
.st-recording { background: var(--amber-subtle);   color: var(--amber);        border-color: rgba(201,165,74,0.4); }
.st-editing   { background: var(--violet-subtle);  color: var(--violet);       border-color: rgba(200,200,205,0.35); }
.st-scheduled { background: var(--magenta-subtle); color: var(--magenta);      border-color: var(--magenta-border); }
.st-published { background: var(--green-subtle);   color: var(--green);        border-color: rgba(63,191,143,0.4); }

.platform-tag {
  display: inline-flex; align-items: center;
  font-size: 9.5px; letter-spacing: 0.06em; color: var(--text-2);
  background: var(--bg-2); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs); padding: 2px 6px;
}
.due-tag { font-size: 12px; color: var(--muted); white-space: nowrap; }
.due-tag.overdue { color: var(--red); }

.role-badge {
  display: inline-flex; font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase;
  border-radius: var(--radius-xs); padding: 2px 7px;
  background: var(--accent-subtle); color: var(--accent-bright); border: 1px solid var(--accent-border);
}
.role-badge.owner { background: var(--magenta-subtle); color: var(--magenta); border-color: var(--magenta-border); }

/* ── Avatars ────────────────────────────────────────────────────────── */
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff;
  border: 2px solid var(--surface);
  flex: none;
}
.avatar--sm { width: 26px; height: 26px; font-size: 10px; }
/* Five neutral steps instead of the old rainbow gradients — still visually
   distinct per member, but inside the monochrome ramp. */
.av-0 { background: #2c2c31; }
.av-1 { background: #34343a; }
.av-2 { background: #232327; }
.av-3 { background: #3c3c43; }
.av-4 { background: #1c1c20; }
.avatars { display: flex; }
.avatars .avatar:not(:first-child) { margin-left: -8px; }
.avatar--more { background: var(--surface-3); color: var(--text-2); font-size: 10px; }
.avatars--empty { font-size: 12px; color: var(--muted-2); }

/* ── Detail page ────────────────────────────────────────────────────── */
.back-link {
  display: inline-flex; align-items: center; gap: 7px;
  background: none; border: none; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; padding: 0;
}
.back-link:hover { color: var(--accent); }
.detail-actions { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.detail-actions__right { display: flex; gap: 8px; }

.detail-card {
  background: var(--glass); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border); border-radius: var(--radius-lg);
  padding: 26px; box-shadow: var(--glow-inset), var(--shadow);
}
.detail-head__title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.detail-head__title h1 { font-size: 24px; }
.detail-head > p { color: var(--muted); font-size: 14px; margin-top: 6px; max-width: 720px; }
.detail-progress { display: flex; align-items: center; gap: 18px; margin: 20px 0 26px; }
.detail-progress__pct { font-size: 34px; font-family: var(--font-brand); font-weight: 500;
  letter-spacing: -0.01em; color: var(--text); }
.detail-progress__bar { flex: 1; }
.detail-progress__hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.detail-body { display: grid; grid-template-columns: 1.5fr 1fr; gap: 30px; }
.detail-subhead { display: flex; align-items: center; gap: 8px; margin-bottom: 13px; color: var(--text); }
.detail-subhead h2 { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.detail-subhead .ico { color: var(--accent); display: inline-flex; }
.detail-subhead .count { font-size: 12px; color: var(--muted); background: var(--surface-2); border-radius: var(--radius-full); padding: 1px 8px; }
.detail-section { margin-bottom: 28px; }

.add-row { display: flex; gap: 8px; margin-bottom: 14px; }
.add-row .input { flex: 1; }

/* milestones */
.mlist { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.mitem { border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); background: var(--surface); padding: 4px 8px; }
.mitem__row { display: flex; align-items: center; gap: 10px; min-height: 38px; }
.mcheck {
  width: 20px; height: 20px; border-radius: 6px; flex: none;
  border: 1.5px solid var(--border); background: var(--bg-2); color: #fff; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all var(--duration-fast);
}
.mcheck:hover { border-color: var(--accent); }
/* Solid accent, not the brand gradient — the gradient flattens to near-white
   under the monochrome tokens and hid the white ✓ glyph entirely. */
.mcheck.is-done { background: var(--accent); border-color: var(--accent); }
.mitem__name { flex: 1; font-size: 14px; font-weight: 500; cursor: default; }
.mitem.is-done .mitem__name { color: var(--muted-2); text-decoration: line-through; }
.mitem__actions { display: flex; gap: 2px; }
.act {
  width: 28px; height: 28px; border-radius: 7px; border: none; background: none;
  color: var(--muted-2); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.act:hover { background: var(--surface-2); color: var(--text-2); }
.act.is-on { color: var(--accent); }
.act--danger:hover { background: var(--red-subtle); color: var(--red); }
.mitem__note { padding: 4px 8px 8px 30px; }
.mitem__edit { padding: 5px 8px; font-size: 14px; }

/* content list on the detail page + board cards */
.citem {
  border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); background: var(--surface);
  padding: 10px 12px; display: flex; flex-direction: column; gap: 7px; cursor: pointer;
  transition: border-color var(--duration-fast);
}
.citem:hover { border-color: var(--accent-border); }
.citem__top { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.citem__title { font-size: 14px; font-weight: 600; flex: 1; min-width: 0; }
.citem__meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.citem__meta .spacer { flex: 1; }
.clist { display: flex; flex-direction: column; gap: 8px; }

/* team list */
.team-list { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.team-item { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border-subtle); background: var(--surface); border-radius: var(--radius-sm); padding: 8px 10px; }
.team-item__body { flex: 1; min-width: 0; }
.team-item__name { font-size: 13.5px; font-weight: 600; }
.team-item__role { font-size: 12px; color: var(--muted); }
.assign-row { display: flex; gap: 8px; }
.assign-row .select { flex: 1; }

.notes-block { margin-top: 26px; }
.notes-foot { display: flex; justify-content: flex-end; margin-top: 9px; }

/* ── Board ──────────────────────────────────────────────────────────── */
.board { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 18px; align-items: flex-start; }
.board-col {
  flex: 0 0 272px; max-width: 272px;
  background: var(--glass); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border); border-radius: var(--radius);
  padding: 12px; box-shadow: var(--glow-inset);
}
.board-col__head { display: flex; align-items: center; gap: 8px; margin-bottom: 11px; padding: 0 2px; }
.board-col__head .count { margin-left: auto; font-size: 12px; color: var(--muted); background: var(--surface-2); border-radius: var(--radius-full); padding: 1px 8px; }
.board-col .clist { min-height: 8px; }
.citem__proj { font-size: 11px; color: var(--muted-2); font-weight: 600; }
.citem__nav { display: flex; gap: 2px; }
.citem__nav .act { width: 24px; height: 24px; }

/* ── Calendar ───────────────────────────────────────────────────────── */
.cal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.cal-head h2 { font-size: 19px; min-width: 190px; }
.cal-legend { margin-left: auto; display: flex; gap: 12px; flex-wrap: wrap; }
.cal-legend__item { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); }
.cal-legend__item .status-pill { width: 7px; height: 7px; padding: 0; border-radius: 50%; border-width: 0; display: inline-block; }
.cal-legend__item .is-overdue-dot { background: var(--red); }
@media (max-width: 900px) { .cal-legend { display: none; } }
.cal-chip.is-overdue { background: var(--red-subtle); color: var(--red); border-color: rgba(224,112,79,0.4); }
.overdue-strip {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 14px; padding: 10px 14px;
  border: 1px solid rgba(224,112,79,0.3); background: var(--red-subtle);
  border-radius: var(--radius); font-size: 12.5px; color: var(--text-2);
}
.overdue-strip__tag { color: var(--red); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; flex: none; }
.overdue-strip__item {
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--text-2); font: inherit; font-size: 12.5px;
}
.overdue-strip__item b { color: var(--text); font-weight: 600; }
.overdue-strip__item:hover b { text-decoration: underline; }
.overdue-strip__more { color: var(--muted); font-size: 12px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dow { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-2); text-align: center; padding: 4px 0; }
.cal-day {
  min-height: 106px; border: 1px solid var(--border-subtle); border-radius: var(--radius-sm);
  background: var(--surface); padding: 6px; display: flex; flex-direction: column; gap: 4px;
  transition: border-color var(--duration-fast);
}
.cal-day:hover { border-color: var(--glass-border); }
.cal-day.is-out { opacity: 0.38; }
.cal-day.is-today { border-color: var(--accent-border); box-shadow: 0 0 0 1px var(--accent-border) inset; }
.cal-day__num { font-size: 12px; font-weight: 600; color: var(--muted); }
.cal-day.is-today .cal-day__num { color: var(--accent-bright); }
.cal-chip {
  font-size: 11px; font-weight: 600; border-radius: 6px; padding: 3px 6px; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; border: none; width: 100%;
}
.cal-chip:hover { filter: brightness(1.25); }
.cal-more { font-size: 10.5px; color: var(--muted-2); padding-left: 2px; }

/* ── Team page ──────────────────────────────────────────────────────── */
.member-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 4px; border-bottom: 1px solid var(--border-subtle);
}
.member-row:last-child { border-bottom: none; }
.member-row__body { flex: 1; min-width: 0; }
.member-row__name { font-weight: 600; font-size: 14px; }
.member-row__email { font-size: 12.5px; color: var(--muted); }
.member-row .select { width: 120px; }
.invite-link-box {
  display: flex; gap: 8px; align-items: center;
  background: var(--bg-2); border: 1px dashed var(--accent-border); border-radius: var(--radius-sm);
  padding: 10px 12px; margin-top: 12px;
}
.invite-link-box code { font-family: var(--font-mono); font-size: 12px; color: var(--accent-bright); overflow-wrap: anywhere; flex: 1; }
.invite-row { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--border-subtle); font-size: 13.5px; }
.invite-row:last-child { border-bottom: none; }
.invite-row .who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: start; }

/* member picker in project form */
.member-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.member-pick {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-2); padding: 7px 9px; cursor: pointer; user-select: none;
  transition: all var(--duration-fast);
}
.member-pick.is-on { border-color: var(--accent-border); background: var(--accent-subtle); }
.member-pick__name { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-pick .cbox {
  width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center; color: #fff; flex: none;
}
.member-pick.is-on .cbox { background: var(--accent); border-color: var(--accent); }
.member-pick:not(.is-on) .cbox .ico { visibility: hidden; }

/* ── Clips (OmniClipper) ────────────────────────────────────────────── */
.clip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; }
.clip-tile {
  position: relative; cursor: pointer; overflow: hidden;
  border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); background: var(--surface);
  display: flex; flex-direction: column;
  transition: border-color var(--duration-fast), transform var(--duration-fast);
}
.clip-tile:hover { border-color: var(--accent-border); transform: translateY(-1px); }
.clip-tile__thumb {
  aspect-ratio: 16 / 9; background: var(--bg-2); display: flex; align-items: center; justify-content: center;
  color: var(--muted-2); overflow: hidden;
}
.clip-tile__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.clip-tile__body { padding: 8px 10px 9px; min-width: 0; }
.clip-tile__title { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clip-tile__meta { display: flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 11px; color: var(--muted); flex-wrap: wrap; }
.clip-tile__via { font-size: 10.5px; color: var(--muted-2); }
.clip-tile__x { position: absolute; top: 5px; right: 5px; background: rgba(9,9,10,0.62); border-radius: 6px; }
.clip-tile--pick.is-on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.clip-check {
  position: absolute; top: 6px; left: 6px; z-index: 2;
  width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--border);
  background: rgba(9,9,10,0.66); color: #fff; display: flex; align-items: center; justify-content: center;
}
.clip-check .ico { visibility: hidden; }
.clip-tile--pick.is-on .clip-check { background: var(--accent); border-color: var(--accent); }
.clip-tile--pick.is-on .clip-check .ico { visibility: visible; }

.viral-badge {
  display: inline-flex; align-items: center;
  font-size: 9.5px; letter-spacing: 0.08em; padding: 1px 7px; border-radius: var(--radius-full);
  background: var(--accent-subtle); color: var(--accent-bright); border: 1px solid var(--accent-border);
}
/* Solid accent — the gradient went near-white and swallowed the white label. */
.viral-badge.hot { background: var(--accent); color: #fff; border: none; }

.clip-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px; font-weight: 700; color: var(--accent-bright);
  background: var(--accent-subtle); border: 1px solid var(--accent-border);
  border-radius: var(--radius-full); padding: 2px 8px;
}
.clip-strip { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.clip-chip-wrap { display: inline-flex; align-items: center; gap: 2px; }
.clip-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; color: var(--text-2); cursor: pointer;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-full); padding: 4px 11px;
}
.clip-chip:hover { border-color: var(--accent-border); color: var(--accent-bright); }

.job-list { display: flex; flex-direction: column; gap: 6px; }
.job-row {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--border-subtle); background: var(--surface);
  border-radius: var(--radius-sm); padding: 8px 11px; font-size: 13px;
}
.job-row__name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40%; }
.job-row__line { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }

/* ── Empty states & skeletons ───────────────────────────────────────── */
.empty {
  text-align: center; padding: 56px 20px;
  border: 1px dashed var(--border); border-radius: var(--radius-lg); color: var(--muted);
}
.empty__icon {
  width: 44px; height: 44px; margin: 0 auto 12px; border-radius: 50%;
  background: var(--accent-subtle); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.empty h3 { color: var(--text); font-size: 17px; margin-bottom: 4px; }
.empty p { font-size: 13.5px; margin-bottom: 16px; }
.skeleton {
  height: 190px; border-radius: var(--radius-lg);
  background: linear-gradient(100deg, var(--surface) 40%, var(--surface-2) 50%, var(--surface) 60%);
  background-size: 200% 100%; animation: shimmer 1.4s infinite;
  border: 1px solid var(--border-subtle);
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ── Auth screens ───────────────────────────────────────────────────── */
.auth-wrap { min-height: calc(100vh - var(--topbar-h)); display: flex; align-items: center; justify-content: center; padding: 28px 20px; }
.auth-card {
  width: 100%; max-width: 430px;
  background: linear-gradient(180deg, #1f1f23, #191919);
  border: 1px solid #34343a; border-radius: var(--radius-lg);
  padding: 32px 30px; box-shadow: var(--glow-inset), var(--shadow-lg);
}
.auth-card h1 { font-size: 22px; margin-bottom: 4px; }
.auth-card .sub { color: var(--muted); font-size: 13.5px; margin-bottom: 22px; }
.auth-alt { text-align: center; font-size: 13.5px; color: var(--muted); margin-top: 18px; }
.auth-alt a { font-weight: 600; cursor: pointer; }
.auth-card .btn { width: 100%; margin-top: 4px; padding: 11px 16px; }
.invite-banner {
  border: 1px solid var(--accent-border); background: var(--accent-subtle);
  border-radius: var(--radius-sm); padding: 12px 14px; font-size: 13.5px; margin-bottom: 18px; color: var(--text-2);
}
.invite-banner b { color: var(--text); }

/* ── Modals ─────────────────────────────────────────────────────────── */
.overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(9,9,10,0.72); backdrop-filter: blur(4px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 7vh 18px 18px; overflow-y: auto;
  animation: fadeIn var(--duration-fast) ease;
}
.modal {
  width: 100%; max-width: 560px;
  background: linear-gradient(180deg, #1f1f23, #191919);
  border: 1px solid #34343a; border-radius: var(--radius-lg);
  box-shadow: var(--glow-inset), var(--shadow-lg);
  animation: rise var(--duration) var(--ease);
}
.modal--sm { max-width: 420px; }
.modal__head { padding: 22px 24px 0; }
.modal__title { font-size: 18px; }
.modal__desc { font-size: 13.5px; color: var(--muted); margin-top: 3px; }
.modal__body { padding: 18px 24px; }
.modal__foot { display: flex; justify-content: flex-end; gap: 10px; padding: 0 24px 22px; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* ── Toasts ─────────────────────────────────────────────────────────── */
.toast-root { position: fixed; bottom: 22px; right: 22px; z-index: 300; display: flex; flex-direction: column; gap: 9px; }
.toast {
  background: var(--glass-strong); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  color: var(--text); border: 1px solid var(--glass-border); border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-md);
  padding: 11px 16px; font-size: 13.5px; font-weight: 500; max-width: 340px;
  animation: toastIn var(--duration) var(--ease);
}
.toast--success { border-left-color: var(--green); }
.toast--error { border-left-color: var(--red); }
.toast.is-out { animation: toastOut var(--duration) ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(20px); } }

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 920px) {
  body.authed .page { margin-left: 0; }
  .page { padding: 20px 16px 64px; }
  .menu-btn { display: inline-flex; }
  .sidebar { transform: translateX(-100%); transition: transform var(--duration) var(--ease); box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: translateX(0); }
  .backdrop.show { display: block; }
  .brand-by { display: none; }
  .overview { grid-template-columns: 1fr; }
  .detail-body { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .cal-day { min-height: 74px; }
  .member-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .brand-lockup { height: 20px; }
  .topbar { padding: 0 12px; gap: 8px; }
  .topbar-right .label { display: none; }
}

/* OmniChrome help panel — shared pattern across all three apps */
.help-wrap { position: relative; }
.help-panel {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 500;
  display: none; width: 240px; padding: 8px;
  background: var(--glass-strong); backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--glow-inset), var(--shadow-lg); font-family: var(--font);
}
.help-panel.open { display: block; }
.help-head { padding: 6px 8px 8px; }
.help-head h3 {
  font-size: 14px; font-family: var(--font-brand); font-weight: 500;
  letter-spacing: -0.01em; margin: 0; color: var(--text);
}
.help-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 8px; border-radius: 10px;
  color: var(--text-2); font-size: 13px; text-decoration: none;
  cursor: pointer; background: none; border: none; width: 100%; text-align: left;
}
.help-item:hover { background: var(--surface-2); color: var(--text); }
.help-item svg { width: 16px; height: 16px; flex: none; }

.help-btn {
  width: 38px; height: 38px; flex: none; padding: 0; display: grid; place-items: center;
  cursor: pointer; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text-2);
  transition: color var(--duration) var(--ease), border-color var(--duration) var(--ease), background var(--duration) var(--ease);
}
.help-btn:hover { color: var(--accent); border-color: var(--accent-border); }
.help-btn svg { width: 19px; height: 19px; }
