/* ==========================================================================
   VENTARCO STUDIO WORKSPACE — Bespoke Architectural Operating System
   Obsidian-graphite surface hierarchy, 6-column Ventarco drafting grid,
   Schibsted Grotesk typography (with proportional kerning restored),
   Larimar #8FBCCB keystone discipline, hardware-grade resizable Monday tables,
   live team photo avatars, and cinematographer slate views.
   Strictly zero gold/orange/beige. Zero generic boxed-border clutter.
   ========================================================================== */

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/assets/fonts/schibsted-grotesk-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  color-scheme: dark;

  /* Stratified Obsidian-Graphite Architecture */
  --bg-rail: #07090a;
  --bg-canvas: #0b0e10;
  --bg-surface: #101417;
  --bg-elevated: #151a1e;
  --bg-row: #0f1316;
  --bg-row-hover: #151b20;
  --bg-row-selected: rgba(143, 188, 203, 0.085);
  --bg-header: #0d1114;
  --bg-input: #0a0d0f;
  --glass-bg: rgba(15, 20, 24, 0.9);

  /* Ink & Precision Architectural Hairlines */
  --ink: #ecebe6;
  --ink-2: #9ea5a9;
  --ink-3: #646c70;
  --hairline: rgba(236, 235, 230, 0.068);
  --hairline-strong: rgba(236, 235, 230, 0.125);
  --grid-line: rgba(236, 235, 230, 0.022);
  --rim-top: inset 0 1px 0 rgba(255, 255, 255, 0.048);

  /* Ventarco Signature Keystone */
  --larimar: #8fbccb;
  --larimar-deep: #2f6474;
  --larimar-tint: rgba(143, 188, 203, 0.12);
  --larimar-glow: rgba(143, 188, 203, 0.45);

  /* Anodized Jewel-Stone Semantic Palette (Strictly No Gold/Orange/Beige) */
  --tone-slate-bg: #222930;
  --tone-slate-fg: #c8cfd3;
  --tone-slate-bar: #6d7984;

  --tone-neutral-bg: #1c2227;
  --tone-neutral-fg: #a6afb4;
  --tone-neutral-bar: #59646d;

  --tone-larimar-bg: #184e60;
  --tone-larimar-fg: #d6eff8;
  --tone-larimar-bar: #8fbccb;

  --tone-indigo-bg: #1d3a68;
  --tone-indigo-fg: #cee2ff;
  --tone-indigo-bar: #79abf7;

  --tone-violet-bg: #453075;
  --tone-violet-fg: #e7dbff;
  --tone-violet-bar: #be9fff;

  --tone-mint-bg: #15553f;
  --tone-mint-fg: #c2f7df;
  --tone-mint-bar: #5fd6a2;

  --tone-rose-bg: #6f2036;
  --tone-rose-fg: #ffd8e1;
  --tone-rose-bar: #f0829b;

  --sidebar-w: 234px;
  --radius-xs: 3px;
  --radius-sm: 5px;
  --radius-md: 8px;
  --ease-settle: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
}

/* Crisp human-engineered product UI typography (Notion / Linear / Monday) */
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-canvas);
  color: var(--ink);
  font: 400 13.5px/1.44 -apple-system, BlinkMacSystemFont, "Inter", "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  letter-spacing: -0.006em;
  font-feature-settings: "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Keep crisp proportional kerning everywhere (Schibsted Grotesk tnum adds excess comma/period spacing) */
.num, .kpi-val, .due-chip, .nav-count, .hours-cell, .stage-code, .score-pill, .col-resize-readout, .group-count-pill, .view-tab-count {
  font-feature-settings: "kern" 1, "liga" 1;
}

body.is-col-resizing,
body.is-col-resizing * {
  cursor: col-resize !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

/* Hairline Scrollbars */
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(236, 235, 230, 0.13); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(236, 235, 230, 0.24); }

[hidden] { display: none !important; }

h1, h2, h3, h4, p, ul, ol, dl, dd { margin: 0; }
h1, h2 { font-weight: 400; }
h3, h4, strong, b { font-weight: 500; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(143, 188, 203, 0.08);
  color: var(--larimar);
}

:focus-visible {
  outline: 1.5px solid var(--larimar);
  outline-offset: 2px;
}

.ui-glyph {
  width: 14px;
  height: 14px;
  flex: none;
  display: inline-block;
}

.nav-glyph {
  width: 15px;
  height: 15px;
  flex: none;
  display: inline-block;
  color: var(--ink-3);
  transition: color 0.14s ease;
}

/* Semantic Tone Variables */
[data-tone="slate"]   { --t-bg: var(--tone-slate-bg);   --t-fg: var(--tone-slate-fg);   --t-bar: var(--tone-slate-bar); }
[data-tone="neutral"] { --t-bg: var(--tone-neutral-bg); --t-fg: var(--tone-neutral-fg); --t-bar: var(--tone-neutral-bar); }
[data-tone="larimar"] { --t-bg: var(--tone-larimar-bg); --t-fg: var(--tone-larimar-fg); --t-bar: var(--tone-larimar-bar); }
[data-tone="indigo"]  { --t-bg: var(--tone-indigo-bg);  --t-fg: var(--tone-indigo-fg);  --t-bar: var(--tone-indigo-bar); }
[data-tone="violet"]  { --t-bg: var(--tone-violet-bg);  --t-fg: var(--tone-violet-fg);  --t-bar: var(--tone-violet-bar); }
[data-tone="mint"]    { --t-bg: var(--tone-mint-bg);    --t-fg: var(--tone-mint-fg);    --t-bar: var(--tone-mint-bar); }
[data-tone="rose"]    { --t-bg: var(--tone-rose-bg);    --t-fg: var(--tone-rose-fg);    --t-bar: var(--tone-rose-bar); }

/* ==========================================================================
   APP SHELL & OBSIDIAN ARCHITECTURAL SIDEBAR
   ========================================================================== */
.app-shell {
  display: flex;
  min-height: 100dvh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #080a0b 0%, #060809 100%);
  border-right: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  z-index: 30;
}

.sidebar-top {
  padding: 20px 18px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  transition: opacity 0.16s ease;
}

.brand-lockup:hover { opacity: 0.88; }

.brand-lockup img {
  height: 34px;
  width: auto;
  display: block;
}

.mobile-nav-toggle {
  display: none;
  padding: 5px 11px;
  background: rgba(236, 235, 230, 0.05);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-xs);
  font-size: 12px;
  color: var(--ink-2);
}

.sidebar-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 4px 12px 12px;
  gap: 16px;
}

.cmd-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 7px 10px;
  background: rgba(236, 235, 230, 0.028);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  color: var(--ink-3);
  font-size: 12.5px;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.cmd-trigger-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cmd-trigger:hover {
  border-color: var(--hairline-strong);
  background: rgba(236, 235, 230, 0.05);
  color: var(--ink);
}

.cmd-trigger kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  padding: 1px 5px;
  background: rgba(236, 235, 230, 0.045);
  border-radius: 3px;
  color: var(--ink-3);
}

.nav-tree {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.nav-heading {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 0 10px 6px;
  opacity: 0.85;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 400;
  transition: background-color 0.14s ease, color 0.14s ease;
}

.nav-item-lead {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 1;
}

.nav-item:hover {
  background: rgba(236, 235, 230, 0.042);
  color: var(--ink);
}

.nav-item:hover .nav-glyph { color: var(--ink-2); }

.nav-item.is-active {
  background: linear-gradient(90deg, rgba(143, 188, 203, 0.12) 0%, rgba(143, 188, 203, 0.03) 100%);
  color: var(--ink);
  font-weight: 500;
  box-shadow: inset 2px 0 0 var(--larimar);
}

.nav-item.is-active .nav-glyph { color: var(--larimar); }

.nav-label {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Quiet Tabular Architectural Index Counters (No Pill Clutter) */
.nav-count {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}

.nav-item.is-active .nav-count {
  color: var(--larimar);
}

.nav-count:empty { display: none; }

.board-shortcuts {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 3px 0 2px 17px;
  padding-left: 11px;
  border-left: 1px solid var(--hairline);
}

.board-shortcut {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5.5px 8px;
  border-radius: var(--radius-xs);
  font-size: 12.5px;
  color: var(--ink-2);
  transition: background-color 0.14s ease, color 0.14s ease;
}

.board-shortcut:hover {
  background: rgba(236, 235, 230, 0.04);
  color: var(--ink);
}

.board-shortcut.is-active {
  background: rgba(143, 188, 203, 0.09);
  color: var(--larimar);
  font-weight: 500;
}

.board-dot {
  width: 5px;
  height: 5px;
  border-radius: 1.5px;
  background: var(--t-bar, var(--larimar));
  flex: none;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.operator-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.operator-card {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  flex: 1;
  min-width: 0;
  text-align: left;
  transition: background-color 0.15s ease;
}

.operator-card:hover {
  background: rgba(236, 235, 230, 0.048);
}

.operator-meta {
  min-width: 0;
  flex: 1;
}

.operator-meta strong {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.operator-meta small {
  display: block;
  font-size: 10.5px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.operator-icon-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  color: var(--ink-3);
  flex: none;
  transition: background-color 0.14s ease, color 0.14s ease;
}

.operator-icon-btn:hover {
  background: rgba(143, 188, 203, 0.12);
  color: var(--larimar);
}

/* ==========================================================================
   CANVAS WITH VENTARCO 6-COLUMN ARCHITECTURAL HAIRLINE GRID
   ========================================================================== */
.workspace-stage {
  position: relative;
  flex: 1;
  min-width: 0;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 64% 310px at 78% -45px, rgba(143, 188, 203, 0.062), transparent 72%),
    var(--bg-canvas);
}

.arch-grid-lines {
  position: fixed;
  top: 0;
  bottom: 0;
  left: var(--sidebar-w);
  right: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  padding: 0 clamp(20px, 3vw, 44px);
  pointer-events: none;
  z-index: 0;
}

.arch-grid-lines i {
  border-left: 1px solid var(--grid-line);
}

.arch-grid-lines i:last-child {
  border-right: 1px solid var(--grid-line);
}

.canvas {
  position: relative;
  z-index: 1;
  flex: 1;
  padding: 24px clamp(20px, 3vw, 44px) 76px;
  max-width: 1680px;
  width: 100%;
  margin: 0 auto;
}

.studio-foot {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 13px clamp(20px, 3vw, 44px);
  border-top: 1px solid var(--hairline);
  font-size: 11px;
  color: var(--ink-3);
}

/* ==========================================================================
   BESPOKE EDITORIAL HEADERS & TIERED ACTION BUTTONS (Zero Box Soup)
   ========================================================================== */
.crumb-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  color: var(--ink-3);
  margin-bottom: 8px;
}

.crumb-bar a:hover { color: var(--larimar); }
.crumb-sep { opacity: 0.35; }

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
}

.page-head h1 {
  font-size: clamp(27px, 2.6vw, 37px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.04em;
  display: inline-flex;
  align-items: center;
  gap: 13px;
  flex-wrap: wrap;
}

.page-sub {
  margin-top: 6px;
  color: var(--ink-2);
  font-size: 13.5px;
  max-width: 66ch;
}

.kicker {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--larimar);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
}

.sample-flag {
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--ink-2);
  background: rgba(236, 235, 230, 0.065);
}

.head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.action-sep {
  width: 1px;
  height: 18px;
  background: var(--hairline-strong);
  margin: 0 3px;
}

/* Stage Progress Pips beside Board Title */
.stage-pips {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  background: rgba(236, 235, 230, 0.03);
  border-radius: 20px;
  transition: background-color 0.15s ease;
}

.stage-pips:hover {
  background: rgba(143, 188, 203, 0.1);
}

.stage-pip {
  width: 5.5px;
  height: 5.5px;
  border-radius: 50%;
  background: rgba(236, 235, 230, 0.15);
}

.stage-pip.is-done { background: var(--tone-mint-bar); }
.stage-pip.is-now {
  background: var(--larimar);
  box-shadow: 0 0 0 3px rgba(143, 188, 203, 0.2);
}

/* Precision Tiered Buttons */
.btn-primary, .btn-outline, .btn-subtle, .btn-ghost, .btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 13px;
  font-size: 12.5px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  white-space: nowrap;
  transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}

.btn-primary {
  background: var(--ink);
  color: #07090a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 1px 4px rgba(0, 0, 0, 0.45);
}

.btn-primary:hover:not(:disabled) {
  background: var(--larimar);
  color: #060b0d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 2px 12px rgba(143, 188, 203, 0.28);
}

.btn-primary:disabled {
  opacity: 0.34;
  cursor: not-allowed;
}

.btn-outline {
  background: rgba(236, 235, 230, 0.044);
  color: var(--ink);
  border-color: rgba(236, 235, 230, 0.08);
  box-shadow: var(--rim-top);
}

.btn-outline:hover {
  background: rgba(143, 188, 203, 0.1);
  border-color: rgba(143, 188, 203, 0.35);
  color: var(--ink);
}

.btn-subtle {
  background: transparent;
  color: var(--ink-2);
  padding: 7px 10px;
}

.btn-subtle:hover {
  background: rgba(236, 235, 230, 0.055);
  color: var(--ink);
}

.btn-ghost {
  color: var(--ink-2);
  padding: 6px 9px;
  font-weight: 400;
}

.btn-ghost:hover {
  background: rgba(236, 235, 230, 0.05);
  color: var(--ink);
}

.btn-danger {
  background: rgba(111, 32, 54, 0.34);
  border-color: rgba(240, 130, 155, 0.28);
  color: var(--tone-rose-fg);
}

.btn-danger:hover {
  background: rgba(111, 32, 54, 0.58);
}

.dovela-mini {
  width: 12px;
  height: 14px;
  flex: none;
}

/* ==========================================================================
   ARCHITECTURAL STUDIO STRIP (DESK) & TITLE-BLOCK METADATA RIBBON
   ========================================================================== */
.studio-strip {
  display: grid;
  grid-template-columns: 1.28fr 1fr;
  border: 1px solid var(--hairline);
  border-top: 1px solid rgba(236, 235, 230, 0.11);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  box-shadow: var(--rim-top), 0 14px 36px rgba(0, 0, 0, 0.32);
  overflow: hidden;
  margin-bottom: 20px;
}

.strip-spotlight {
  position: relative;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-right: 1px solid var(--hairline);
  background:
    linear-gradient(90deg, rgba(236, 235, 230, 0.022) 1px, transparent 1px) 0 0 / 16.6667% 100%,
    linear-gradient(135deg, rgba(143, 188, 203, 0.045) 0%, transparent 55%),
    var(--bg-rail);
  isolation: isolate;
}

.strip-arch {
  position: absolute;
  right: 18px;
  top: -12px;
  height: 132%;
  width: auto;
  opacity: 0.16;
  pointer-events: none;
  z-index: -1;
}

.strip-spotlight h2 {
  font-size: clamp(18px, 1.8vw, 22px);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.028em;
  max-width: 38ch;
}

.strip-spotlight p {
  margin-top: 5px;
  font-size: 12.5px;
  color: var(--ink-2);
}

.strip-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.kpi-cell {
  padding: 16px 18px;
  border-right: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}

.kpi-cell:last-child { border-right: 0; }

.kpi-cell small {
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.kpi-val {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.kpi-sub {
  font-size: 11px;
  color: var(--ink-3);
}

/* Architectural Drawing Title-Block Metadata Ribbon */
.project-ribbon {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  border-top: 1px solid var(--hairline-strong);
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 14px;
}

.ribbon-cell {
  flex: 1 1 135px;
  padding: 10px 14px 10px 0;
  margin-right: 14px;
  border-right: 1px solid var(--hairline);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: color 0.14s ease;
}

.ribbon-cell:last-child {
  border-right: 0;
  margin-right: 0;
}

button.ribbon-cell:hover strong {
  color: var(--larimar);
}

.ribbon-cell small {
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.ribbon-cell strong {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   VIEW TABS, RECESSED SEGMENTED TOOLBAR & STAGE FILTER RAIL
   ========================================================================== */
.view-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 14px;
  overflow-x: auto;
}

.view-tab {
  padding: 9px 13px;
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-2);
  border-bottom: 1.5px solid transparent;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.14s ease, border-color 0.14s ease;
}

.view-tab:hover { color: var(--ink); }

.view-tab[aria-selected="true"],
.view-tab[aria-pressed="true"] {
  color: var(--ink);
  font-weight: 500;
  border-bottom-color: var(--larimar);
}

.view-tab-count {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--ink-3);
}

.view-tab[aria-selected="true"] .view-tab-count {
  color: var(--larimar);
}

/* Clean Unified Toolbar */
.board-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.toolbar-left, .toolbar-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.search-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.search-wrap .ui-glyph {
  position: absolute;
  left: 10px;
  color: var(--ink-3);
  pointer-events: none;
}

.toolbar-input {
  background: var(--bg-input);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 6.5px 10px 6.5px 30px;
  font-size: 12.5px;
  color: var(--ink);
  width: 192px;
  transition: border-color 0.15s ease, width 0.18s var(--ease-settle);
}

.toolbar-input:focus {
  border-color: rgba(143, 188, 203, 0.5);
  outline: none;
  width: 224px;
}

.toolbar-input::placeholder { color: var(--ink-3); }

/* Recessed Obsidian Segmented Control Track (Replaces Boxed Pill Soup) */
.seg-track {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: var(--bg-input);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
}

.filter-chip {
  padding: 4.5px 10px;
  font-size: 12px;
  font-weight: 400;
  border-radius: 3.5px;
  color: var(--ink-2);
  background: transparent;
  transition: background-color 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}

.filter-chip:hover {
  color: var(--ink);
  background: rgba(236, 235, 230, 0.04);
}

.filter-chip.is-on {
  background: var(--bg-elevated);
  color: var(--ink);
  font-weight: 500;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 1px 3px rgba(0, 0, 0, 0.45);
}

.toolbar-select {
  background: var(--bg-input);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color 0.14s ease, color 0.14s ease;
}

.toolbar-select:hover,
.toolbar-select:focus {
  border-color: var(--hairline-strong);
  color: var(--ink);
  outline: none;
}

/* Architectural Stage Filter Rail (01 Inquiry -> 08 Aftercare) */
.stage-filter-rail {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--hairline);
  overflow-x: auto;
}

.stage-rail-label {
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-3);
  flex: none;
}

.stage-rail-items {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
}

.stage-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4.5px 9px;
  border-radius: 4px;
  font-size: 11.5px;
  color: var(--ink-2);
  white-space: nowrap;
  background: transparent;
  transition: background-color 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}

.stage-pill.is-zero {
  opacity: 0.48;
}

.stage-pill:hover {
  opacity: 1;
  background: rgba(236, 235, 230, 0.048);
  color: var(--ink);
}

.stage-pill.is-on {
  opacity: 1;
  background: rgba(143, 188, 203, 0.13);
  color: var(--ink);
  font-weight: 500;
  box-shadow: inset 0 0 0 1px rgba(143, 188, 203, 0.34);
}

.stage-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--t-bar, var(--larimar));
  flex: none;
}

.stage-code {
  font-size: 10.5px;
  color: var(--ink-3);
}

.stage-pill.is-on .stage-code {
  color: var(--larimar);
}

.stage-pill-num {
  font-size: 10.5px;
  color: var(--ink-3);
  margin-left: 1px;
}

.stage-pill.is-on .stage-pill-num {
  color: var(--larimar);
}

/* ==========================================================================
   HARDWARE-GRADE RESIZABLE MONDAY TABLES, SUBITEMS & SUMMARY BARS
   ========================================================================== */
.monday-groups {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.monday-group {
  display: flex;
  flex-direction: column;
}

.group-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 2px 8px;
}

.group-title-left {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.group-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--t-bar, var(--larimar));
}

.chevron {
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.16s var(--ease-settle);
  margin-top: -2px;
}

.group-toggle[aria-expanded="false"] .chevron {
  transform: rotate(-45deg);
  margin-top: 0;
}

.group-count-pill {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-3);
}

.group-table-wrap {
  position: relative;
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--t-bar, var(--larimar));
  border-radius: var(--radius-sm);
  background: var(--bg-row);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.26);
  overflow-x: auto;
}

/* Synchronized Variable-Width Grids (every group shares exact CSS vars!) */
.m-grid-tasks {
  display: grid;
  grid-template-columns:
    34px
    var(--ct-title, minmax(242px, 1fr))
    var(--ct-thread, 66px)
    var(--ct-owner, 106px)
    var(--ct-status, 124px)
    var(--ct-due, 92px)
    var(--ct-priority, 88px)
    var(--ct-reviewer, 114px)
    var(--ct-decision, 120px)
    var(--ct-hours, 76px);
  width: max(100%, max-content);
  align-items: stretch;
}

.m-grid-leads {
  display: grid;
  grid-template-columns:
    var(--cl-title, minmax(230px, 1fr))
    var(--cl-col2, 146px)
    var(--cl-col3, 76px)
    var(--cl-col4, 112px)
    var(--cl-col5, 96px)
    var(--cl-col6, minmax(190px, 0.95fr))
    var(--cl-col7, 94px)
    var(--cl-col8, 128px);
  width: max(100%, max-content);
  align-items: stretch;
}

.m-grid-shoots {
  display: grid;
  grid-template-columns:
    var(--cs-title, minmax(220px, 1fr))
    var(--cs-op, 150px)
    var(--cs-cam, 188px)
    var(--cs-spec, 162px)
    var(--cs-rig, 156px)
    var(--cs-rights, 132px)
    var(--cs-status, 134px)
    var(--cs-date, 90px);
  width: max(100%, max-content);
  align-items: stretch;
}

/* Precision Column Headers + Hover-to-Resize Lines */
.m-head {
  background: var(--bg-header);
  border-bottom: 1px solid var(--hairline);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.m-head > div {
  position: relative;
  padding: 8px 8px;
  border-right: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  min-width: 0;
}

.m-head > div:last-child { border-right: 0; }

.m-th-label {
  overflow: hidden;
  text-overflow: ellipsis;
}

.m-head-title {
  justify-content: flex-start !important;
  padding-left: 12px !important;
}

/* Tactile Column Resize Hit Zone + Glowing Larimar Drafting Line */
.col-resizer {
  position: absolute;
  top: 0;
  right: -5px;
  bottom: 0;
  width: 9px;
  cursor: col-resize;
  z-index: 8;
  display: flex;
  justify-content: center;
}

.col-resizer::before {
  content: "";
  width: 2px;
  height: 100%;
  background: transparent;
  transition: background-color 0.12s ease, box-shadow 0.12s ease;
}

.col-resizer:hover::before,
.col-resizer.is-dragging::before {
  background: var(--larimar);
  box-shadow: 0 0 10px var(--larimar-glow);
}

/* Full-height drafting guide extending down through the table while dragging */
.col-resizer.is-dragging::after {
  content: "";
  position: absolute;
  top: 0;
  left: 4px;
  width: 1px;
  height: 900px;
  background: rgba(143, 188, 203, 0.45);
  pointer-events: none;
}

.col-resize-readout {
  position: fixed;
  z-index: 130;
  pointer-events: none;
  padding: 3px 7px;
  border-radius: 4px;
  background: var(--larimar);
  color: #060b0d;
  font-size: 11px;
  font-weight: 500;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
}

.col-resize-readout[hidden] { display: none; }

/* Sleek Table Rows */
.m-row {
  border-bottom: 1px solid var(--hairline);
  background: var(--bg-row);
  transition: background-color 0.12s ease;
}

.m-row:hover { background: var(--bg-row-hover); }
.m-row.is-selected { background: var(--bg-row-selected); }

.m-row > * {
  min-width: 0;
  min-height: 40px;
  border-right: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  font-size: 13px;
}

.m-row > *:last-child { border-right: 0; }

.m-check-cell {
  padding: 0 !important;
  position: sticky;
  left: 0;
  z-index: 3;
  background: inherit;
}

.row-check {
  width: 14px;
  height: 14px;
  accent-color: var(--larimar);
  cursor: pointer;
  opacity: 0.45;
  transition: opacity 0.12s ease;
}

.m-row:hover .row-check,
.row-check:checked {
  opacity: 1;
}

/* Sticky Item Title Cell */
.m-cell-title {
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px 7px 12px !important;
  position: sticky;
  left: 34px;
  z-index: 3;
  background: inherit;
  box-shadow: 1px 0 0 var(--hairline);
  text-align: left;
}

.m-grid-leads .m-cell-title,
.m-grid-shoots .m-cell-title {
  left: 0;
}

.title-main {
  min-width: 0;
  flex: 1;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.title-main strong {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.32;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.title-main small {
  font-size: 11px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inline-rename-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--larimar);
  border-radius: 3px;
  padding: 4px 7px;
  font-size: 13px;
  color: var(--ink);
}

.subitem-toggle {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--ink-3);
  background: rgba(236, 235, 230, 0.035);
  flex: none;
  transition: background-color 0.14s ease, color 0.14s ease;
}

.subitem-toggle:hover,
.subitem-toggle[aria-expanded="true"] {
  color: var(--larimar);
  background: var(--larimar-tint);
}

.row-open-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  pointer-events: none;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border: 1px solid rgba(143, 188, 203, 0.4);
  border-radius: 4px;
  background: rgba(15, 20, 24, 0.96);
  backdrop-filter: blur(8px);
  color: var(--ink);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
  transition: opacity 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.m-row:hover .row-open-btn,
.row-open-btn:focus-visible {
  opacity: 1;
  pointer-events: auto;
}
.row-open-btn:hover { border-color: var(--larimar); color: var(--larimar); }

/* Expandable Inline Subitems Drawer inside Main Table */
.inline-subitems {
  background: #0b0f12;
  border-bottom: 1px solid var(--hairline);
  padding: 8px 16px 10px 52px;
  position: relative;
}

.inline-subitems::before {
  content: "";
  position: absolute;
  left: 34px;
  top: 0;
  bottom: 12px;
  border-left: 1px solid var(--larimar-deep);
}

.inline-sub-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 0;
  font-size: 12.5px;
  color: var(--ink-2);
}

.inline-sub-row input[type="checkbox"] {
  accent-color: var(--larimar);
}

/* Thread Counter Bubble */
.updates-btn {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.updates-bubble {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 26px;
  height: 22px;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-3);
  transition: background-color 0.14s ease, color 0.14s ease;
}

.updates-btn:hover .updates-bubble {
  background: rgba(236, 235, 230, 0.06);
  color: var(--ink);
}

.updates-bubble.has-items {
  background: var(--larimar-tint);
  color: var(--larimar);
}

/* Anodized Full-Bleed Monday Jewel-Stone Cells + Quiet Empty Decisions */
.m-cell-solid { padding: 0 !important; }

.cell-fill {
  width: 100%;
  height: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(0, 0, 0, 0.08) 100%), var(--t-bg);
  color: var(--t-fg);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), inset -1px 0 0 rgba(7, 9, 10, 0.55), inset 0 -1px 0 rgba(7, 9, 10, 0.55);
  transition: filter 0.14s ease, background-color 0.14s ease;
  user-select: none;
}

/* Clean quiet empty Decision cells so actual statuses shine like jewels */
.cell-fill.is-empty {
  background: transparent;
  box-shadow: none;
  color: var(--ink-3);
  font-weight: 400;
}

.cell-fill.is-empty .empty-dash {
  opacity: 0.5;
  transition: opacity 0.14s ease, color 0.14s ease;
}

.m-cell-solid button:hover .cell-fill.is-empty,
.m-cell-solid a:hover .cell-fill.is-empty {
  filter: none;
  background: rgba(143, 188, 203, 0.07);
}

.m-cell-solid button:hover .cell-fill.is-empty .empty-dash,
.m-cell-solid a:hover .cell-fill.is-empty .empty-dash {
  opacity: 1;
  color: var(--larimar);
}

.m-cell-solid button,
.m-cell-solid a {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  display: block;
}

.m-cell-solid button:hover .cell-fill:not(.is-empty),
.m-cell-solid a:hover .cell-fill:not(.is-empty) {
  filter: brightness(1.13);
}

.m-cell-solid button::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  border-style: solid;
  border-width: 0;
  border-color: transparent rgba(7, 9, 10, 0.62) transparent transparent;
  transition: border-width 0.14s var(--ease-settle);
}

.m-cell-solid button:hover::after {
  border-width: 0 8px 8px 0;
}

/* Plain Interactive Cells (Strictly Single-Line Crisp Alignment) */
.m-cell-btn {
  width: 100%;
  height: 100%;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12.5px;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.m-cell-btn:hover {
  background: rgba(236, 235, 230, 0.035);
  color: var(--ink);
}

.cell-text-clip {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.cell-stack {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  width: 100%;
  text-align: left;
  padding: 5px 4px;
}

.cell-stack strong {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cell-stack small {
  font-size: 11px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.due-chip {
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
}

.due-chip.is-overdue { background: var(--tone-rose-bg); color: var(--tone-rose-fg); font-weight: 500; }
.due-chip.is-today { background: var(--tone-larimar-bg); color: var(--tone-larimar-fg); font-weight: 500; }

/* Live Profile Photo & Initials Avatars Across Every Column & Tag */
.person-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  max-width: 100%;
}

.avatar-ring {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
  flex: none;
  background: var(--tone-larimar-bg);
  color: var(--tone-larimar-fg);
  border: 1px solid rgba(255, 255, 255, 0.16);
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.person-chip.is-md .avatar-ring {
  width: 34px;
  height: 34px;
  font-size: 12px;
}

.person-chip.is-lg .avatar-ring {
  width: 52px;
  height: 52px;
  font-size: 17px;
}

.avatar-ring.has-photo {
  background: #0d1114;
  border-color: rgba(236, 235, 230, 0.22);
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.person-chip[data-color="violet"] .avatar-ring:not(.has-photo) { background: var(--tone-violet-bg); color: var(--tone-violet-fg); }
.person-chip[data-color="mint"]   .avatar-ring:not(.has-photo) { background: var(--tone-mint-bg);   color: var(--tone-mint-fg); }
.person-chip[data-color="indigo"] .avatar-ring:not(.has-photo) { background: var(--tone-indigo-bg); color: var(--tone-indigo-fg); }
.person-chip[data-color="rose"]   .avatar-ring:not(.has-photo) { background: var(--tone-rose-bg);   color: var(--tone-rose-fg); }

.person-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12.5px;
  color: var(--ink);
}

/* Profile Photo Editor Preview in Modal */
.profile-avatar-editor {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px;
  background: var(--bg-rail);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.profile-avatar-preview {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 500;
  overflow: hidden;
  background: var(--tone-larimar-bg);
  color: var(--tone-larimar-fg);
  border: 1.5px solid rgba(143, 188, 203, 0.45);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.profile-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.color-swatches {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.color-swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--t-bar);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease;
}

.color-swatch:hover { transform: scale(1.1); }
.color-swatch.is-picked { border-color: var(--ink); box-shadow: 0 0 0 2px var(--bg-canvas); }

/* Sleek Seamless Inline Quick-Add Row */
.quick-add-row {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--hairline);
  background: rgba(8, 10, 12, 0.35);
  transition: background-color 0.14s ease;
}

.quick-add-row:focus-within {
  background: rgba(143, 188, 203, 0.045);
}

.quick-add-row input {
  flex: 1;
  background: transparent;
  border: 0;
  padding: 9px 14px 9px 44px;
  font-size: 12.5px;
  color: var(--ink);
  outline: none;
}

.quick-add-row input::placeholder { color: var(--ink-3); }

.quick-add-row button {
  padding: 6px 14px;
  margin-right: 6px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-3);
  transition: background-color 0.14s ease, color 0.14s ease;
}

.quick-add-row:focus-within button,
.quick-add-row button:hover {
  color: var(--larimar);
  background: var(--larimar-tint);
}

/* Precision Group Summary Footer */
.m-summary {
  background: #0a0d0f;
  font-size: 11px;
  color: var(--ink-3);
}

.m-summary > div {
  min-height: 31px;
  padding: 5px 8px;
  border-right: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.m-summary > div:last-child { border-right: 0; }

.stacked-bar {
  width: 100%;
  height: 7px;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  gap: 1px;
  background: rgba(236, 235, 230, 0.05);
}

.stacked-seg {
  height: 100%;
  background: var(--t-bar);
  transition: width 0.22s var(--ease-settle);
}

/* Status Pill & Fit Score */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 500;
  background: var(--t-bg);
  color: var(--t-fg);
  white-space: nowrap;
}

.status-pill::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--t-bar);
}

.score-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 500;
}

.score-pill.is-high { background: var(--tone-mint-bg); color: var(--tone-mint-fg); }
.score-pill.is-mid  { background: var(--tone-larimar-bg); color: var(--tone-larimar-fg); }
.score-pill.is-low  { background: var(--tone-slate-bg); color: var(--tone-slate-fg); }

/* Cinematographer & Crew Spec Grid */
.crew-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.crew-card {
  background: var(--bg-surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 15px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--rim-top);
  transition: border-color 0.15s ease;
}

.crew-card:hover {
  border-color: rgba(143, 188, 203, 0.35);
}

.spec-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.spec-tag {
  font-size: 11px;
  padding: 2.5px 7px;
  border-radius: 3px;
  background: rgba(236, 235, 230, 0.045);
  color: var(--ink-2);
}

/* ==========================================================================
   FLOATING BULK MULTI-SELECT DOCK
   ========================================================================== */
.bulk-dock {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 65;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 7px 11px;
  background: var(--glass-bg);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  border: 1px solid rgba(143, 188, 203, 0.35);
  border-radius: 8px;
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.72);
  animation: dockUp 0.2s var(--ease-settle);
}

@keyframes dockUp {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

.bulk-count {
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--tone-larimar-bg);
  color: var(--tone-larimar-fg);
  font-size: 12px;
  font-weight: 500;
}

/* ==========================================================================
   KANBAN, TIMELINE & FILES GALLERY
   ========================================================================== */
.kanban-lanes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
  align-items: start;
}

.kanban-col {
  background: var(--bg-surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  overflow: hidden;
  min-height: 220px;
  display: flex;
  flex-direction: column;
}

.kanban-col-head {
  padding: 10px 13px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.08)), var(--t-bg);
  color: var(--t-fg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 500;
}

.kanban-cards {
  padding: 9px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.kanban-card {
  background: var(--bg-elevated);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  cursor: grab;
  box-shadow: var(--rim-top);
  transition: border-color 0.14s ease, transform 0.14s var(--ease-settle);
}

.kanban-card:hover {
  border-color: rgba(143, 188, 203, 0.42);
  transform: translateY(-1px);
}

.kanban-card-title {
  text-align: left;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}

.kanban-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--hairline);
  font-size: 11px;
  color: var(--ink-2);
}

/* Timeline */
.timeline-card {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  overflow-x: auto;
}

.timeline-row {
  display: grid;
  grid-template-columns: 260px 1fr;
  border-bottom: 1px solid var(--hairline);
  min-width: 780px;
  align-items: center;
}

.timeline-row:last-child { border-bottom: 0; }
.timeline-label { padding: 10px 14px; border-right: 1px solid var(--hairline); display: flex; flex-direction: column; gap: 3px; }
.timeline-track { position: relative; height: 40px; background-image: linear-gradient(90deg, rgba(236, 235, 230, 0.03) 1px, transparent 1px); background-size: 7.1428% 100%; }
.timeline-bar { position: absolute; top: 8px; height: 24px; border-radius: 4px; background: var(--t-bg); border: 1px solid var(--t-bar); color: var(--t-fg); font-size: 11px; font-weight: 500; padding: 0 8px; display: flex; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Files Gallery Grid */
.files-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.file-card {
  background: var(--bg-surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease;
}

.file-card:hover { border-color: rgba(143, 188, 203, 0.45); }

.file-thumb-box {
  height: 148px;
  background: var(--bg-rail);
  display: grid;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--hairline);
}

.file-thumb-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.file-meta {
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ==========================================================================
   WAVY 8-STAGE VENTARCO CLIENT ROUTE
   ========================================================================== */
.route-map {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  position: relative;
  isolation: isolate;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: var(--bg-surface);
  background-image: repeating-linear-gradient(0deg, transparent 0 27px, rgba(236, 235, 230, 0.022) 27px 28px);
  margin: 12px 0 24px;
}

.route-phase { min-width: 0; border-right: 1px solid var(--hairline); }
.route-phase:last-child { border-right: 0; }
.route-phase-head { height: 34px; padding: 8px 13px; background: var(--bg-header); border-bottom: 1px solid var(--hairline); font-size: 10px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.route-pair { display: grid; grid-template-columns: 1fr 1fr; height: 248px; padding: 0 5px; }
.route-svg { position: absolute; top: 34px; left: 0; width: 100%; height: 128px; pointer-events: none; z-index: -1; }
.route-svg path { fill: none; stroke: var(--larimar-deep); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.route-stop { position: relative; align-self: start; margin: var(--rise, 40px) 4px 0; padding-top: 18px; text-align: left; min-width: 0; }
.route-node { position: absolute; top: -4px; left: calc(50% - 4px); width: 9px; height: 9px; border-radius: 50%; background: var(--bg-canvas); border: 1.5px solid var(--ink-2); }
.route-node::after { content: ""; position: absolute; top: 8px; left: 3px; height: 14px; border-left: 1px solid var(--hairline-strong); }
.route-tile { display: flex; flex-direction: column; justify-content: space-between; gap: 7px; padding: 10px; min-height: 104px; background: var(--bg-elevated); border: 1px solid var(--hairline); border-radius: var(--radius-sm); transition: border-color 0.15s ease, background-color 0.15s ease; }
.route-stop:hover .route-tile { border-color: rgba(143, 188, 203, 0.5); }
.route-stop[data-state="done"] .route-node { background: var(--tone-mint-bar); border-color: var(--tone-mint-bar); }
.route-stop[data-state="done"] .route-tile { border-top: 2px solid var(--tone-mint-bar); }
.route-stop[data-state="current"] .route-node { background: var(--larimar); border-color: var(--larimar); box-shadow: 0 0 0 4px rgba(143, 188, 203, 0.18); }
.route-stop[aria-pressed="true"] .route-tile { background: rgba(47, 100, 116, 0.25); border-color: var(--larimar); }
.route-tile-top { display: flex; align-items: center; justify-content: space-between; font-size: 10.5px; color: var(--ink-3); }
.route-tile-name { font-size: 13px; font-weight: 500; line-height: 1.2; color: var(--ink); overflow-wrap: anywhere; }
.route-tile-foot { font-size: 10.5px; color: var(--larimar); }
.route-stop[data-state="done"] .route-tile-foot { color: var(--tone-mint-bar); }

/* ==========================================================================
   PANELS, FORMS, THREADED UPDATES & REACTIONS
   ========================================================================== */
.split-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 20px;
  align-items: start;
}

.panel-card {
  background: var(--bg-surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--rim-top);
}

.panel-card + .panel-card { margin-top: 14px; }

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.panel-head h2, .panel-head h3 {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}

.form-grid .span-2 { grid-column: 1 / -1; }

.field-label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-2);
}

.field-label input,
.field-label select,
.field-label textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 400;
  color: var(--ink);
}

.field-label input:focus,
.field-label select:focus,
.field-label textarea:focus {
  border-color: var(--larimar);
  outline: none;
}

.field-label textarea { resize: vertical; min-height: 70px; }

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 13px;
  cursor: pointer;
}

.check-item input[type="checkbox"] {
  width: 15px;
  height: 15px;
  margin-top: 2px;
  accent-color: var(--larimar);
  flex: none;
}

.resource-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--hairline);
}

.resource-row:last-child { border-bottom: 0; }
.lang-links { display: inline-flex; gap: 5px; }
.lang-chip {
  padding: 3.5px 8px;
  background: rgba(236, 235, 230, 0.045);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-2);
  transition: border-color 0.14s ease, color 0.14s ease, background-color 0.14s ease;
}
.lang-chip:hover { border-color: rgba(143, 188, 203, 0.45); color: var(--larimar); background: var(--larimar-tint); }

/* Rich Monday-Style Updates Composer */
.composer-box {
  background: var(--bg-input);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.composer-box:focus-within { border-color: rgba(143, 188, 203, 0.55); }
.composer-box.is-dragover { border-color: var(--larimar); background: rgba(143, 188, 203, 0.06); }

.composer-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--hairline);
  background: rgba(236, 235, 230, 0.02);
}

.fmt-btn {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11.5px;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.fmt-btn:hover { background: rgba(236, 235, 230, 0.07); color: var(--ink); }

.composer-box textarea {
  width: 100%;
  background: transparent;
  border: 0;
  padding: 11px 13px;
  font-size: 13px;
  color: var(--ink);
  resize: vertical;
  min-height: 78px;
  outline: none;
}

.composer-files-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 12px 8px;
}

.composer-files-bar:empty { display: none; }

.composer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-top: 1px solid var(--hairline);
  background: rgba(236, 235, 230, 0.015);
}

.file-pick-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
}

.file-pick-label:hover { background: rgba(236, 235, 230, 0.06); color: var(--ink); }
.file-pick-label input { display: none; }

/* Update Thread Cards, Reactions & Nested Replies */
.update-card {
  background: var(--bg-elevated);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 14px 15px;
  margin-top: 12px;
  box-shadow: var(--rim-top);
}

.update-card.is-pinned {
  border-color: rgba(143, 188, 203, 0.35);
  box-shadow: inset 3px 0 0 var(--larimar);
}

.update-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
}

.update-actions { display: inline-flex; align-items: center; gap: 3px; }
.update-act-btn { padding: 3px 7px; border-radius: 4px; font-size: 11px; color: var(--ink-3); }
.update-act-btn:hover { background: rgba(236, 235, 230, 0.06); color: var(--ink); }
.update-act-btn.is-active { color: var(--larimar); }

.update-body { font-size: 13.5px; line-height: 1.55; color: var(--ink); overflow-wrap: anywhere; }
.update-body p + p { margin-top: 7px; }
.update-body ul { padding-left: 18px; margin: 6px 0; }
.update-body li { margin: 3px 0; }

.mention-chip {
  color: var(--larimar);
  background: var(--larimar-tint);
  padding: 0 5px;
  border-radius: 3px;
  font-weight: 500;
}

.update-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.update-img-thumb {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--hairline-strong);
  aspect-ratio: 16 / 10;
  background: var(--bg-rail);
  display: block;
}

.update-img-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s var(--ease-settle);
}

.update-img-thumb:hover img { transform: scale(1.04); }

.attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 8px 6px 0 0;
  padding: 4px 9px;
  border: 1px solid var(--hairline-strong);
  border-radius: 4px;
  font-size: 11.5px;
  color: var(--larimar);
  background: rgba(143, 188, 203, 0.06);
}

.update-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 11px;
  padding-top: 9px;
  border-top: 1px solid var(--hairline);
}

.reaction-strip { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }

.reaction-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2.5px 8px;
  border-radius: 12px;
  font-size: 12px;
  border: 1px solid var(--hairline);
  background: rgba(236, 235, 230, 0.03);
  color: var(--ink-2);
  transition: border-color 0.14s ease, background-color 0.14s ease;
}

.reaction-pill:hover { border-color: var(--hairline-strong); color: var(--ink); }
.reaction-pill.is-mine { background: var(--larimar-tint); border-color: rgba(143, 188, 203, 0.45); color: var(--ink); }

.thread-replies {
  margin-top: 10px;
  padding-left: 14px;
  border-left: 1.5px solid rgba(143, 188, 203, 0.28);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.reply-card {
  background: rgba(11, 14, 16, 0.55);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.reply-form { display: flex; gap: 6px; margin-top: 6px; }
.reply-form input {
  flex: 1;
  min-width: 0;
  background: var(--bg-input);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-size: 12.5px;
  color: var(--ink);
}

/* ==========================================================================
   GLASS POPOVERS, SLIDE-OVER DRAWER, LIGHTBOX & MODAL
   ========================================================================== */
.cell-popover {
  position: fixed;
  z-index: 95;
  width: 248px;
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.74);
  padding: 8px;
}

.popover-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.popover-list { display: flex; flex-direction: column; gap: 4px; }

.popover-color-opt {
  width: 100%;
  padding: 8px 8px;
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.08)), var(--t-bg);
  color: var(--t-fg);
  font-size: 11.5px;
  font-weight: 500;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: filter 0.12s ease, transform 0.1s ease;
}

.popover-color-opt:hover { filter: brightness(1.15); transform: translateY(-1px); }

.emoji-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px; }
.emoji-btn { height: 32px; border-radius: 5px; font-size: 16px; display: grid; place-items: center; }
.emoji-btn:hover { background: rgba(236, 235, 230, 0.1); }

.popover-person-opt {
  width: 100%;
  padding: 7px 8px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  font-size: 12.5px;
}

.popover-person-opt:hover { background: rgba(236, 235, 230, 0.06); }

.popover-custom {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--hairline);
  display: flex;
  gap: 5px;
}

.popover-custom input {
  flex: 1;
  min-width: 0;
  background: var(--bg-input);
  border: 1px solid var(--hairline-strong);
  border-radius: 4px;
  padding: 5px 7px;
  font-size: 12px;
}

/* Slide-Over Right Item Drawer */
.item-drawer {
  position: fixed;
  inset: 0;
  z-index: 75;
  pointer-events: none;
  visibility: hidden;
}

.item-drawer.is-open { pointer-events: auto; visibility: visible; }

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 7, 8, 0.64);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.item-drawer.is-open .drawer-backdrop { opacity: 1; }

.drawer-panel {
  position: absolute;
  inset: 0 0 0 auto;
  width: min(580px, 100vw);
  background: var(--bg-surface);
  border-left: 1px solid var(--hairline-strong);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.24s var(--ease-settle);
}

.item-drawer.is-open .drawer-panel { transform: translateX(0); }

.drawer-head {
  padding: 18px 22px 0;
  border-bottom: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer-top-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.drawer-head h2 { font-size: 21px; font-weight: 400; letter-spacing: -0.03em; line-height: 1.18; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 22px 36px; }

/* Full-Screen Image Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(6, 8, 9, 0.9);
  backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px;
  gap: 14px;
}

.lightbox[hidden] { display: none; }

.lightbox img {
  max-width: min(1160px, 92vw);
  max-height: 78dvh;
  border-radius: var(--radius-md);
  border: 1px solid var(--hairline-strong);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.8);
}

/* Modal Dialog */
.studio-modal {
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  color: var(--ink);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-md);
  padding: 0;
  width: min(740px, calc(100vw - 24px));
  max-height: 88dvh;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.78);
}

.studio-modal::backdrop { background: rgba(5, 7, 8, 0.72); backdrop-filter: blur(3px); }
.modal-body { padding: 24px 26px; max-height: 88dvh; overflow-y: auto; }
.modal-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.modal-top h2 { font-size: 22px; font-weight: 400; letter-spacing: -0.035em; }

.template-preview {
  background: var(--bg-rail);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 15px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.55;
  margin: 10px 0;
}

.bracket-token {
  color: var(--larimar);
  background: var(--larimar-tint);
  padding: 0 3px;
  border-radius: 2px;
}

.cmd-results { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; max-height: 360px; overflow-y: auto; }
.cmd-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 11px; border-radius: var(--radius-sm); text-align: left; }
.cmd-row:hover, .cmd-row:focus { background: rgba(236, 235, 230, 0.06); }

/* Toast */
.toast {
  position: fixed;
  bottom: 20px;
  right: 22px;
  z-index: 120;
  padding: 9px 15px;
  background: var(--glass-bg);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(143, 188, 203, 0.35);
  border-left: 3px solid var(--larimar);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s var(--ease-settle);
}

.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast[data-tone="error"] { border-color: var(--tone-rose-bar); }

/* ==========================================================================
   RESPONSIVE PHONE & TABLET (390×844 ZERO PAGE OVERFLOW)
   ========================================================================== */
@media (max-width: 1040px) {
  .studio-strip, .split-grid { grid-template-columns: 1fr; }
  .strip-spotlight { border-right: 0; border-bottom: 1px solid var(--hairline); }
  .strip-kpis { grid-template-columns: repeat(2, 1fr); }
  .kpi-cell { border-bottom: 1px solid var(--hairline); }
  .route-map { grid-template-columns: 1fr; background-image: none; }
  .route-svg { display: none; }
  .route-phase { border-right: 0; border-bottom: 1px solid var(--hairline); }
  .route-pair { grid-template-columns: 1fr; height: auto; padding: 8px 10px 10px 30px; gap: 6px; position: relative; }
  .route-pair::before { content: ""; position: absolute; left: 16px; top: 0; bottom: 0; border-left: 1.5px solid var(--larimar-deep); }
  .route-stop { margin: 0; padding: 0; }
  .route-node { left: -18px; top: calc(50% - 4px); }
  .route-node::after { display: none; }
  .route-tile { min-height: 0; flex-direction: row; align-items: center; }
}

@media (max-width: 760px) {
  .app-shell { flex-direction: column; }
  .sidebar { position: sticky; top: 0; width: 100%; height: auto; border-right: 0; border-bottom: 1px solid var(--hairline); }
  .sidebar-top { padding: 12px 16px; }
  .mobile-nav-toggle { display: inline-flex; }
  .sidebar-body { display: none; border-top: 1px solid var(--hairline); max-height: 75dvh; }
  .sidebar-body.is-open { display: flex; }
  .workspace-stage { margin-left: 0; }
  .arch-grid-lines { left: 0; }
  .canvas { padding: 16px 14px 48px; }
  .page-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .strip-spotlight { flex-direction: column; align-items: flex-start; }
  .form-grid { grid-template-columns: 1fr; }
  .toolbar-input { width: 100%; }
  .toolbar-input:focus { width: 100%; }
  .modal-body { padding: 18px 16px; }
  .bulk-dock { width: calc(100vw - 24px); justify-content: center; }
  .profile-avatar-editor { flex-direction: column; text-align: center; }
}


/* ==========================================================================
   THEME TOGGLE, DUAL BRAND LOGO & CRISP WHITE LIGHT THEME (data-theme="light")
   ========================================================================== */
.logo-light { display: none !important; }
html[data-theme="light"] .logo-dark { display: none !important; }
html[data-theme="light"] .logo-light { display: block !important; }

.sidebar-top-tools {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.theme-toggle-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  color: var(--ink-2);
  background: rgba(236, 235, 230, 0.045);
  border: 1px solid var(--hairline);
  transition: background-color 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.theme-toggle-btn:hover {
  color: var(--larimar);
  border-color: var(--larimar-glow);
  background: var(--larimar-tint);
}

/* Show Sun icon in Dark mode ("switch to Light"), Moon icon in Light mode ("switch to Dark") */
.theme-toggle-btn .icon-moon { display: none; }
html[data-theme="light"] .theme-toggle-btn .icon-sun { display: none; }
html[data-theme="light"] .theme-toggle-btn .icon-moon { display: inline-block; }

html[data-theme="light"] {
  color-scheme: light;

  --bg-rail: #ffffff;
  --bg-canvas: #ffffff;
  --bg-surface: #ffffff;
  --bg-elevated: #f3f5f8;
  --bg-row: #ffffff;
  --bg-row-hover: #f4f8fa;
  --bg-row-selected: rgba(47, 100, 116, 0.085);
  --bg-header: #f7f9fb;
  --bg-input: #ffffff;
  --glass-bg: rgba(255, 255, 255, 0.96);

  --ink: #0d0f10;
  --ink-2: #4a5359;
  --ink-3: #78838a;
  --hairline: rgba(13, 15, 16, 0.088);
  --hairline-strong: rgba(13, 15, 16, 0.16);
  --grid-line: rgba(13, 15, 16, 0.032);
  --rim-top: inset 0 1px 0 rgba(255, 255, 255, 0.85);

  --larimar: #256072;
  --larimar-deep: #2f6474;
  --larimar-tint: rgba(47, 100, 116, 0.1);
  --larimar-glow: rgba(47, 100, 116, 0.35);

  /* Crisp Monday.com White-Canvas Jewel-Stone Status Cells */
  --tone-slate-bg: #6a7682;
  --tone-slate-fg: #ffffff;
  --tone-slate-bar: #6a7682;

  --tone-neutral-bg: #7f8a95;
  --tone-neutral-fg: #ffffff;
  --tone-neutral-bar: #7f8a95;

  --tone-larimar-bg: #1e6e85;
  --tone-larimar-fg: #ffffff;
  --tone-larimar-bar: #2886a1;

  --tone-indigo-bg: #2959d4;
  --tone-indigo-fg: #ffffff;
  --tone-indigo-bar: #3b6df0;

  --tone-violet-bg: #6b43c7;
  --tone-violet-fg: #ffffff;
  --tone-violet-bar: #7c54de;

  --tone-mint-bg: #0c8459;
  --tone-mint-fg: #ffffff;
  --tone-mint-bar: #129c6b;

  --tone-rose-bg: #c8234b;
  --tone-rose-fg: #ffffff;
  --tone-rose-bar: #de325c;
}

html[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(13, 15, 16, 0.16); }
html[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: rgba(13, 15, 16, 0.28); }

html[data-theme="light"] .sidebar {
  background: #ffffff;
  border-right: 1px solid var(--hairline);
}

html[data-theme="light"] .workspace-stage {
  background:
    radial-gradient(ellipse 64% 280px at 78% -45px, rgba(143, 188, 203, 0.16), transparent 72%),
    #ffffff;
}

html[data-theme="light"] .cmd-trigger,
html[data-theme="light"] .theme-toggle-btn,
html[data-theme="light"] .mobile-nav-toggle {
  background: #f6f8fa;
  border-color: var(--hairline);
  color: var(--ink-2);
}

html[data-theme="light"] .cmd-trigger:hover,
html[data-theme="light"] .nav-item:hover,
html[data-theme="light"] .board-shortcut:hover,
html[data-theme="light"] .operator-card:hover,
html[data-theme="light"] .btn-subtle:hover,
html[data-theme="light"] .btn-ghost:hover {
  background: rgba(13, 15, 16, 0.048);
  color: var(--ink);
}

html[data-theme="light"] .cmd-trigger kbd,
html[data-theme="light"] .sample-flag,
html[data-theme="light"] .stage-pips,
html[data-theme="light"] .spec-tag,
html[data-theme="light"] .subitem-toggle {
  background: rgba(13, 15, 16, 0.055);
  color: var(--ink-2);
}

html[data-theme="light"] .stage-pip {
  background: rgba(13, 15, 16, 0.16);
}

html[data-theme="light"] .nav-item.is-active {
  background: linear-gradient(90deg, rgba(47, 100, 116, 0.11) 0%, rgba(47, 100, 116, 0.02) 100%);
}

html[data-theme="light"] .btn-primary {
  background: #0d0f10;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(13, 15, 16, 0.16);
}

html[data-theme="light"] .btn-primary:hover:not(:disabled) {
  background: #256072;
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(37, 96, 114, 0.25);
}

html[data-theme="light"] .btn-outline,
html[data-theme="light"] .lang-chip {
  background: #ffffff;
  border-color: var(--hairline-strong);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(13, 15, 16, 0.04);
}

html[data-theme="light"] .btn-outline:hover,
html[data-theme="light"] .lang-chip:hover {
  background: rgba(47, 100, 116, 0.07);
  border-color: rgba(47, 100, 116, 0.4);
  color: var(--larimar);
}

html[data-theme="light"] .btn-danger {
  background: rgba(200, 35, 75, 0.09);
  border-color: rgba(200, 35, 75, 0.28);
  color: #b4193e;
}

html[data-theme="light"] .studio-strip,
html[data-theme="light"] .group-table-wrap,
html[data-theme="light"] .panel-card,
html[data-theme="light"] .crew-card,
html[data-theme="light"] .kanban-col,
html[data-theme="light"] .file-card {
  box-shadow: 0 4px 18px rgba(13, 15, 16, 0.045);
  border-color: var(--hairline);
}

html[data-theme="light"] .strip-spotlight {
  background:
    linear-gradient(90deg, rgba(13, 15, 16, 0.028) 1px, transparent 1px) 0 0 / 16.6667% 100%,
    linear-gradient(135deg, rgba(143, 188, 203, 0.14) 0%, transparent 58%),
    #fafbfc;
}

html[data-theme="light"] .strip-arch {
  filter: invert(1);
  opacity: 0.08;
}

html[data-theme="light"] .seg-track {
  background: #f1f3f6;
  border-color: var(--hairline);
}

html[data-theme="light"] .filter-chip:hover {
  background: rgba(13, 15, 16, 0.04);
}

html[data-theme="light"] .filter-chip.is-on {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(13, 15, 16, 0.1);
}

html[data-theme="light"] .stage-pill:hover {
  background: rgba(13, 15, 16, 0.045);
}

html[data-theme="light"] .stage-pill.is-on {
  background: rgba(47, 100, 116, 0.1);
  box-shadow: inset 0 0 0 1px rgba(47, 100, 116, 0.3);
}

html[data-theme="light"] .cell-fill:not(.is-empty) {
  background: var(--t-bg);
  color: var(--t-fg);
  box-shadow: inset -1px 0 0 #ffffff, inset 0 -1px 0 #ffffff;
}

html[data-theme="light"] .m-cell-solid button::after {
  border-color: transparent rgba(255, 255, 255, 0.65) transparent transparent;
}

html[data-theme="light"] .row-open-btn {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(47, 100, 116, 0.35);
  box-shadow: 0 3px 10px rgba(13, 15, 16, 0.12);
}

html[data-theme="light"] .quick-add-row,
html[data-theme="light"] .m-summary,
html[data-theme="light"] .inline-subitems,
html[data-theme="light"] .monday-subdrawer,
html[data-theme="light"] .reply-card,
html[data-theme="light"] .template-preview,
html[data-theme="light"] .profile-avatar-editor {
  background: #f7f9fb;
}

html[data-theme="light"] .stacked-bar {
  background: rgba(13, 15, 16, 0.07);
}

html[data-theme="light"] .avatar-ring.has-photo {
  background: #f1f3f5;
  border-color: rgba(13, 15, 16, 0.16);
}

html[data-theme="light"] .cell-popover,
html[data-theme="light"] .studio-modal,
html[data-theme="light"] .bulk-dock,
html[data-theme="light"] .toast,
html[data-theme="light"] .drawer-panel {
  box-shadow: 0 18px 48px rgba(13, 15, 16, 0.16);
}

html[data-theme="light"] .drawer-backdrop,
html[data-theme="light"] .studio-modal::backdrop {
  background: rgba(13, 15, 16, 0.28);
}

html[data-theme="light"] .btn-danger {
  background: rgba(202, 52, 77, 0.1);
  border-color: rgba(202, 52, 77, 0.34);
  color: #b4233c;
}
html[data-theme="light"] .btn-danger:hover {
  background: rgba(202, 52, 77, 0.18);
}
html[data-theme="light"] .route-stop[aria-pressed="true"] .route-tile {
  background: rgba(43, 122, 148, 0.1);
  border-color: var(--larimar);
}

/* ==========================================================================
   MONDAY.COM EXPAND ARROW (▸ / ▾), SUBCATEGORIES SUB-TABLE & STATUS HISTORY
   ========================================================================== */
.title-with-arrow {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.row-expand-arrow {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  display: inline-grid;
  place-items: center;
  flex: none;
  color: var(--ink-3);
  transition: background-color 0.14s ease, color 0.14s ease, transform 0.16s var(--ease-settle);
}

.row-expand-arrow:hover {
  background: var(--larimar-tint);
  color: var(--larimar);
}

.row-expand-arrow[aria-expanded="true"] {
  color: var(--larimar);
  background: var(--larimar-tint);
}

.row-expand-arrow svg {
  width: 11px;
  height: 11px;
  transition: transform 0.16s var(--ease-settle);
}

.row-expand-arrow[aria-expanded="true"] svg {
  transform: rotate(90deg);
}

/* Indented Monday Subitems & Status Transition Drawer */
.monday-subdrawer {
  position: relative;
  background: rgba(9, 12, 14, 0.55);
  border-bottom: 1px solid var(--hairline);
  padding: 12px 16px 14px 48px;
}

.monday-subdrawer::before {
  content: "";
  position: absolute;
  left: 22px;
  top: 0;
  bottom: 16px;
  width: 14px;
  border-left: 2px solid var(--t-bar, var(--larimar));
  border-bottom: 2px solid var(--t-bar, var(--larimar));
  border-bottom-left-radius: 6px;
  opacity: 0.72;
  pointer-events: none;
}

.subdrawer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 9px;
}

.subdrawer-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.subdrawer-tab {
  padding: 3.5px 9px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-3);
  transition: background-color 0.14s ease, color 0.14s ease;
}

.subdrawer-tab:hover {
  color: var(--ink);
  background: rgba(143, 188, 203, 0.08);
}

.subdrawer-tab.is-on {
  color: var(--larimar);
  background: var(--larimar-tint);
}

.subtable-card {
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--t-bar, var(--larimar));
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  overflow-x: auto;
}

.m-grid-subitems {
  display: grid;
  grid-template-columns:
    30px
    minmax(210px, 1.8fr)
    112px
    124px
    136px
    132px
    88px
    36px;
  min-width: 868px;
  align-items: stretch;
}

.m-grid-subitems.m-head {
  font-size: 10px;
}

.m-grid-subitems.m-row > * {
  min-height: 36px;
  font-size: 12.5px;
}

/* Monday.com Visual Status Change & Approval Stream ([From] -> [To]) */
.status-stream {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  divide-y: 1px solid var(--hairline);
}

.status-event-row {
  display: grid;
  grid-template-columns: 126px minmax(130px, 0.9fr) minmax(160px, 1.2fr) auto minmax(150px, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--hairline);
  font-size: 12px;
}

.status-event-row:last-child { border-bottom: 0; }

.status-transition-pair {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.transition-arrow {
  color: var(--ink-3);
  font-size: 12px;
}

.mini-status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2.5px 8px;
  border-radius: 3.5px;
  font-size: 11px;
  font-weight: 500;
  background: var(--t-bg, var(--tone-slate-bg));
  color: var(--t-fg, var(--tone-slate-fg));
  white-space: nowrap;
}

.approved-stamp {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--ink-2);
}

@media (max-width: 900px) {
  .monday-subdrawer { padding-left: 24px; }
  .monday-subdrawer::before { left: 10px; width: 8px; }
  .status-event-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }
}

/* Project onboarding */
.panel-card:has(#productionBrief) { max-width: 920px; }
.panel-card:has(#productionBrief) p { margin: 14px 0; max-width: 76ch; }
#productionBrief { margin-top: 22px; }
#productionBrief details { border-top: 1px solid var(--border, #546067); }
#productionBrief summary { padding: 14px 0; cursor: pointer; font-weight: 600; }
#productionBrief .form-grid { margin: 12px 0 20px; }
#productionBrief textarea { width: 100%; }

/* ==========================================================================
   NOTION × UNTITLED UI v12 SHELL + AUTHENTIC MONDAY.COM BOARDS
   - App Chrome, Login-Home & User Management: Notion / Anytype / Untitled UI v12
   - Boards, Desk, Pipeline & Production: Pixel-faithful Monday.com Work OS
   - Strictly zero gold, yellow, orange, or beige accents anywhere.
   ========================================================================== */

:root {
  --bg-rail: #09090b;
  --bg-canvas: #111217;
  --bg-surface: #161821;
  --bg-elevated: #1e212d;
  --bg-row: #161821;
  --bg-row-hover: #1e212e;
  --bg-row-selected: rgba(0, 115, 234, 0.14);
  --bg-header: #161821;
  --bg-input: #14161e;
  --glass-bg: rgba(24, 27, 36, 0.96);

  --ink: #f4f4f6;
  --ink-2: #9da2b3;
  --ink-3: #696f82;
  --hairline: rgba(255, 255, 255, 0.08);
  --hairline-strong: rgba(255, 255, 255, 0.15);
  --m-grid-border: #2c3142;
  --m-blue: #0073ea;
  --m-blue-hover: #0060b9;

  /* Soft Translucent Dot-Pill Palette (for User Management & Inline Tags) */
  --tone-slate-bg: rgba(121, 126, 147, 0.18);
  --tone-slate-fg: #c5c9d6;
  --tone-slate-bar: #797e93;

  --tone-neutral-bg: rgba(121, 126, 147, 0.16);
  --tone-neutral-fg: #b8bcc9;
  --tone-neutral-bar: #797e93;

  --tone-larimar-bg: rgba(0, 134, 192, 0.18);
  --tone-larimar-fg: #7dd3fc;
  --tone-larimar-bar: #00a9ff;

  --tone-indigo-bg: rgba(87, 155, 252, 0.18);
  --tone-indigo-fg: #93c5fd;
  --tone-indigo-bar: #579bfc;

  --tone-violet-bg: rgba(162, 93, 220, 0.18);
  --tone-violet-fg: #d8b4fe;
  --tone-violet-bar: #a25ddc;

  --tone-mint-bg: rgba(0, 200, 117, 0.16);
  --tone-mint-fg: #6ee7b7;
  --tone-mint-bar: #00c875;

  --tone-rose-bg: rgba(226, 68, 92, 0.18);
  --tone-rose-fg: #fda4af;
  --tone-rose-bar: #e2445c;

  --sidebar-w: 240px;
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
}

html[data-theme="light"] {
  --bg-rail: #f6f7fb;
  --bg-canvas: #ffffff;
  --bg-surface: #ffffff;
  --bg-elevated: #ffffff;
  --bg-row: #ffffff;
  --bg-row-hover: #f5f6f8;
  --bg-row-selected: #cce5ff;
  --bg-header: #ffffff;
  --bg-input: #ffffff;
  --glass-bg: rgba(255, 255, 255, 0.98);

  --ink: #323338;
  --ink-2: #676879;
  --ink-3: #8c8f9e;
  --hairline: #e6e9ef;
  --hairline-strong: #d0d4e4;
  --m-grid-border: #d0d4e4;
  --m-blue: #0073ea;
  --m-blue-hover: #0060b9;

  --larimar: #0073ea;
  --larimar-deep: #0060b9;
  --larimar-tint: rgba(0, 115, 234, 0.08);

  /* Soft Pastel Dot-Pill Palette (Light — Zero Gold/Orange) */
  --tone-slate-bg: #ecedf5;
  --tone-slate-fg: #4b4e63;
  --tone-slate-bar: #797e93;

  --tone-neutral-bg: #ecedf5;
  --tone-neutral-fg: #4b4e63;
  --tone-neutral-bar: #797e93;

  --tone-larimar-bg: #e1f4ff;
  --tone-larimar-fg: #00628f;
  --tone-larimar-bar: #0086c0;

  --tone-indigo-bg: #e5f0ff;
  --tone-indigo-fg: #0052cc;
  --tone-indigo-bar: #579bfc;

  --tone-violet-bg: #f3e8ff;
  --tone-violet-fg: #6b21a8;
  --tone-violet-bar: #a25ddc;

  --tone-mint-bg: #e3fcef;
  --tone-mint-fg: #006644;
  --tone-mint-bar: #00c875;

  --tone-rose-bg: #ffe8ec;
  --tone-rose-fg: #b81d35;
  --tone-rose-bar: #e2445c;
}

/* Authentic Monday.com Solid Cell & Group Accent Mapping (Zero Orange/Yellow/Gold) */
[data-tone="mint"]    { --m-solid: #00c875; --m-group: #00c875; }
[data-tone="larimar"] { --m-solid: #0086c0; --m-group: #0086c0; }
[data-tone="indigo"]  { --m-solid: #579bfc; --m-group: #579bfc; }
[data-tone="violet"]  { --m-solid: #a25ddc; --m-group: #a25ddc; }
[data-tone="rose"]    { --m-solid: #e2445c; --m-group: #e2445c; }
[data-tone="slate"]   { --m-solid: #797e93; --m-group: #797e93; }
[data-tone="neutral"] { --m-solid: #5c6178; --m-group: #579bfc; }
html[data-theme="light"] [data-tone="neutral"] { --m-solid: #797e93; --m-group: #579bfc; }

.arch-grid-lines { display: none !important; }
.workspace-stage {
  margin-left: var(--sidebar-w);
  background: var(--bg-canvas) !important;
}

/* ==========================================================================
   1. NOTION ONBOARDING / SIGN-IN SCREEN (Reference Image 1)
   ========================================================================== */
body.is-auth-locked .sidebar,
body.is-auth-locked .studio-topbar,
body.is-auth-locked .studio-foot {
  display: none !important;
}

body.is-auth-locked .workspace-stage {
  margin-left: 0 !important;
  background: #191919 !important;
}
html[data-theme="light"] body.is-auth-locked .workspace-stage {
  background: #ffffff !important;
}
body.is-auth-locked .canvas {
  padding: 0 !important;
  max-width: none !important;
}

.notion-auth-screen {
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 20px 44px;
  position: relative;
}

.notion-auth-topbar {
  position: absolute;
  top: 18px;
  left: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notion-auth-topright {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.notion-lang-select select {
  appearance: auto;
  background: transparent;
  border: 0;
  color: #9b9a97;
  font-size: 13px;
  padding: 4px 6px;
  border-radius: 5px;
  cursor: pointer;
}
html[data-theme="light"] .notion-lang-select select { color: #787774; }

.notion-top-link {
  font-size: 12.5px;
  color: #8e8d8a;
  padding: 5px 9px;
  border-radius: 5px;
  transition: background-color 0.14s ease, color 0.14s ease;
}
.notion-lang-select select:hover,
.notion-top-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #f0efed;
}
html[data-theme="light"] .notion-lang-select select:hover,
html[data-theme="light"] .notion-top-link:hover {
  background: rgba(17, 17, 19, 0.05);
  color: #191919;
}

.notion-auth-center {
  width: 100%;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.notion-auth-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.022em;
  color: #f0efed;
  margin: 0 0 5px;
  text-align: center;
}
html[data-theme="light"] .notion-auth-title { color: #191919; }

.notion-auth-sub {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.012em;
  color: #6e6e6e;
  margin: 0 0 28px;
  text-align: center;
}
html[data-theme="light"] .notion-auth-sub { color: #787774; }

.notion-avatar-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}

.notion-avatar-circle {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: #232323;
  border: 1.5px solid #3a3a3a;
  display: grid;
  place-items: center;
  color: #8a8a8a;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
html[data-theme="light"] .notion-avatar-circle {
  background: #f7f7f5;
  border-color: #dfdfd8;
  color: #787774;
}
.notion-avatar-circle:hover { border-color: #2383e2; }
.notion-avatar-circle img { width: 100%; height: 100%; object-fit: cover; display: block; }
.notion-avatar-circle svg { width: 44px; height: 44px; }

.notion-add-photo-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #7c7c7c;
  padding: 2px 7px;
  border-radius: 4px;
  cursor: pointer;
}
.notion-add-photo-btn:hover { color: #d4d4d4; background: rgba(255, 255, 255, 0.05); }
html[data-theme="light"] .notion-add-photo-btn:hover { color: #191919; background: rgba(0, 0, 0, 0.04); }

.notion-auth-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.notion-field {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  width: 100%;
}

.notion-field > span {
  font-size: 12px;
  font-weight: 400;
  color: #8e8d8a;
}
html[data-theme="light"] .notion-field > span { color: #6b6a67; }

.notion-field input {
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border-radius: 5px;
  background: #202020;
  border: 1px solid #363636;
  color: #f0efed;
  font-size: 13.5px;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
html[data-theme="light"] .notion-field input {
  background: #f9f9f8;
  border-color: #dcdcd8;
  color: #191919;
}
.notion-field input::placeholder { color: #636363; }
.notion-field input:focus {
  outline: none;
  border-color: #2383e2;
  box-shadow: 0 0 0 2px rgba(35, 131, 226, 0.28);
}

.notion-pw-wrap { position: relative; width: 100%; }
.notion-pw-wrap input { padding-right: 34px; }
.notion-pw-eye {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-radius: 4px;
  display: grid;
  place-items: center;
  color: #7c7c7c;
}
.notion-pw-eye:hover { color: #e5e5e5; background: rgba(255, 255, 255, 0.06); }

.notion-continue-btn {
  width: 100%;
  height: 34px;
  margin-top: 8px;
  border-radius: 5px;
  background: #23629f;
  color: #eaeef4;
  font-size: 13.5px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.14s ease;
}
.notion-continue-btn:hover { background: #2383e2; color: #ffffff; }
html[data-theme="light"] .notion-continue-btn { background: #2383e2; color: #ffffff; }
html[data-theme="light"] .notion-continue-btn:hover { background: #1a6ec4; }

.notion-switch-row { margin-top: 14px; }
.notion-text-btn { font-size: 12px; color: #7c7c7c; }
.notion-text-btn:hover { color: #e5e5e5; text-decoration: underline; }
html[data-theme="light"] .notion-text-btn:hover { color: #191919; }

.notion-auth-legal {
  margin-top: 32px;
  font-size: 11px;
  line-height: 1.48;
  color: #5e5e5e;
  text-align: center;
  max-width: 300px;
}

/* ==========================================================================
   2. SIDEBAR, STICKY TOPBAR & UNTITLED UI POPOVERS (Images 2, 3, 5, 6)
   ========================================================================== */
.sidebar {
  width: var(--sidebar-w) !important;
  background: var(--bg-rail) !important;
  border-right: 1px solid var(--hairline) !important;
}

.sidebar-top {
  padding: 13px 12px 10px !important;
  gap: 6px;
}

.ws-switcher-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 9px 6px 7px;
  border-radius: 8px;
  flex: 1;
  min-width: 0;
  text-align: left;
  transition: background-color 0.14s ease;
}
.ws-switcher-btn:hover { background: rgba(255, 255, 255, 0.06); }
html[data-theme="light"] .ws-switcher-btn:hover { background: rgba(0, 0, 0, 0.05); }

.ws-icon-box {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--hairline-strong);
  display: grid;
  place-items: center;
  color: var(--ink);
  flex: none;
}

.ws-switcher-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.ws-switcher-meta strong { font-size: 13.5px; font-weight: 600; letter-spacing: -0.015em; color: var(--ink); }
.ws-switcher-meta small { font-size: 11px; color: var(--ink-3); }
.ws-chevron { width: 12px; height: 12px; color: var(--ink-3); flex: none; }

.ws-compose-btn {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: 1px solid var(--hairline);
  background: var(--bg-surface);
  display: grid;
  place-items: center;
  color: var(--ink-2);
}
.ws-compose-btn:hover { border-color: var(--hairline-strong); color: var(--ink); }

.quick-actions-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}
.quick-actions-row .cmd-trigger {
  margin-bottom: 0 !important;
  flex: 1;
  height: 32px;
  padding: 0 9px !important;
  border-radius: 7px !important;
  background: var(--bg-surface) !important;
  border: 1px solid var(--hairline) !important;
  font-size: 12.5px !important;
}
.cmd-search-mini {
  height: 32px;
  padding: 0 8px;
  border-radius: 7px;
  background: var(--bg-surface);
  border: 1px solid var(--hairline);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-2);
  flex: none;
}
.cmd-search-mini:hover,
.quick-actions-row .cmd-trigger:hover {
  border-color: var(--hairline-strong) !important;
  color: var(--ink) !important;
}
.cmd-search-mini kbd { font-size: 10.5px; color: var(--ink-3); font-family: inherit; }

.nav-tree { gap: 14px !important; }
.nav-heading {
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-size: 11.5px !important;
  font-weight: 500 !important;
  color: var(--ink-3) !important;
  padding: 4px 9px 4px !important;
  display: flex;
  align-items: center;
  gap: 5px;
}

.nav-item {
  border-radius: 6px !important;
  padding: 6.5px 9px !important;
  font-size: 13px !important;
  color: var(--ink-2) !important;
  box-shadow: none !important;
  background: transparent !important;
}
.nav-item:hover {
  background: rgba(255, 255, 255, 0.055) !important;
  color: var(--ink) !important;
}
html[data-theme="light"] .nav-item:hover {
  background: rgba(0, 0, 0, 0.045) !important;
}
.nav-item.is-active {
  background: rgba(255, 255, 255, 0.09) !important;
  color: var(--ink) !important;
  font-weight: 500 !important;
  box-shadow: none !important;
}
html[data-theme="light"] .nav-item.is-active {
  background: #e6f0ff !important;
  color: #0052cc !important;
}
.nav-item.is-active .nav-glyph { color: currentColor !important; }

.board-shortcuts {
  margin: 0 !important;
  padding: 0 !important;
  border-left: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.board-shortcut .board-dot {
  width: 8px;
  height: 8px;
  border-radius: 2.5px;
  background: var(--m-group, #0086c0);
  flex: none;
}

.nav-count {
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 11px !important;
  color: var(--ink-3);
}
html[data-theme="light"] .nav-count { background: rgba(0, 0, 0, 0.055); }

/* Sticky Breadcrumb Topbar */
.studio-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 48px;
  padding: 0 clamp(20px, 3vw, 38px);
  background: color-mix(in srgb, var(--bg-canvas) 90%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 8px; min-width: 0; }
.topbar-nav-arrows { display: inline-flex; align-items: center; gap: 2px; margin-right: 4px; }
.topbar-icon-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: var(--ink-3);
}
.topbar-icon-btn:hover { background: rgba(255, 255, 255, 0.06); color: var(--ink); }
html[data-theme="light"] .topbar-icon-btn:hover { background: rgba(0, 0, 0, 0.05); }

.topbar-crumbs { display: flex; align-items: center; gap: 7px; font-size: 13px; min-width: 0; }
.topbar-crumb-root { color: var(--ink-3); }
.topbar-crumb-root:hover { color: var(--ink); }
.topbar-crumb-sep { color: var(--ink-3); opacity: 0.45; }
.topbar-crumb-current { color: var(--ink); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.topbar-search-pill {
  height: 30px;
  min-width: 170px;
  padding: 0 9px;
  border-radius: 7px;
  background: var(--bg-surface);
  border: 1px solid var(--hairline);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-3);
  font-size: 12.5px;
}
.topbar-search-pill:hover { border-color: var(--hairline-strong); color: var(--ink-2); }
.topbar-search-pill span { flex: 1; text-align: left; }
.topbar-search-pill kbd { font-size: 10.5px; font-family: inherit; color: var(--ink-3); }

.topbar-invite-btn {
  height: 30px !important;
  padding: 0 11px !important;
  font-size: 12.5px !important;
  border-radius: 7px !important;
}

.topbar-avatar-btn {
  position: relative;
  padding: 2px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
}
.topbar-avatar-btn:hover { box-shadow: 0 0 0 2px var(--hairline-strong); }
.topbar-avatar-btn .person-chip { pointer-events: none; }
.topbar-avatar-btn .avatar-ring { width: 28px; height: 28px; }
.avatar-online-dot {
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00c875;
  border: 1.5px solid var(--bg-canvas);
}

/* Floating Menus & Monday Status Brick Picker */
.cell-popover {
  border-radius: 8px !important;
  background: var(--bg-elevated) !important;
  border: 1px solid var(--hairline-strong) !important;
  padding: 8px !important;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.48) !important;
}
html[data-theme="light"] .cell-popover {
  box-shadow: 0 10px 32px rgba(17, 20, 34, 0.16) !important;
}

.monday-status-picker {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 2px;
}

.popover-color-opt {
  width: 100% !important;
  height: 32px !important;
  border-radius: 4px !important;
  background: var(--m-solid, #797e93) !important;
  color: #ffffff !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 10px !important;
  box-shadow: none !important;
  transition: filter 0.12s ease, transform 0.1s ease !important;
}
.popover-color-opt:hover {
  filter: brightness(1.08);
  transform: scale(1.01);
}

.uui-menu { display: flex; flex-direction: column; gap: 2px; }
.uui-menu-kicker {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 6px 10px 4px;
}
.uui-divider { height: 1px; background: var(--hairline); margin: 5px -8px; }
.uui-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--ink-2);
  text-align: left;
}
.uui-menu-item:hover { background: rgba(255, 255, 255, 0.07); color: var(--ink); }
html[data-theme="light"] .uui-menu-item:hover { background: #f3f4f8; color: var(--ink); }

.uui-ws-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
}
.uui-ws-card:hover { background: rgba(255, 255, 255, 0.05); }
html[data-theme="light"] .uui-ws-card:hover { background: #f5f6f8; }
.uui-ws-card.is-selected { background: rgba(255, 255, 255, 0.045); border-color: var(--hairline-strong); }
html[data-theme="light"] .uui-ws-card.is-selected { background: #f5f7fb; }
.uui-check-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--m-blue);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.uui-account-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border-radius: 7px;
}
.uui-account-row:hover { background: rgba(255, 255, 255, 0.055); }
html[data-theme="light"] .uui-account-row:hover { background: #f3f4f8; }
.uui-radio {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1.5px solid var(--hairline-strong);
  flex: none;
  position: relative;
}
.uui-radio.is-on { border-color: var(--m-blue); background: var(--m-blue); }
.uui-radio.is-on::after {
  content: "";
  position: absolute;
  inset: 3.5px;
  border-radius: 50%;
  background: #ffffff;
}

/* Untitled UI v12 Document Type Badge (Image 6) */
.uui-doc-badge {
  width: 32px;
  height: 22px;
  border-radius: 4px;
  display: inline-grid;
  place-items: center;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  flex: none;
}
.uui-doc-badge.is-pdf {
  background: #e11d48;
  color: #ffffff;
}

/* ==========================================================================
   3. AUTHENTIC MONDAY.COM BOARD HEADER, TABS & SINGLE ACTION BAR
   ========================================================================== */
.canvas {
  padding: 22px clamp(20px, 3vw, 38px) 60px !important;
  max-width: 1640px !important;
}

.m-board-header {
  margin-bottom: 12px;
}

.m-board-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.m-board-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.m-board-title-group h1,
.page-head h1 {
  font-size: 24px !important;
  font-weight: 600 !important;
  letter-spacing: -0.022em !important;
  line-height: 1.2 !important;
  color: var(--ink);
}

.m-stage-badge {
  height: 23px;
  padding: 0 9px;
  border-radius: 4px;
  background: var(--m-solid, #0086c0);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  transition: filter 0.12s ease;
}
.m-stage-badge:hover { filter: brightness(1.08); }

.m-board-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.m-facepile {
  display: inline-flex;
  align-items: center;
  margin-right: 6px;
}
.m-facepile .person-chip {
  margin-left: -6px;
}
.m-facepile .person-chip:first-child { margin-left: 0; }
.m-facepile .avatar-ring {
  width: 28px;
  height: 28px;
  border: 2px solid var(--bg-canvas) !important;
}

.m-head-btn {
  height: 32px;
  padding: 0 10px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-2);
  transition: background-color 0.12s ease, color 0.12s ease;
}
.m-head-btn:hover {
  background: var(--bg-row-hover);
  color: var(--ink);
}

.m-board-desc {
  margin-top: 4px;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.42;
}
.m-board-meta-inline { color: var(--ink-3); }

/* Monday Underline View Tabs */
.m-view-tabs {
  margin-top: 10px;
  margin-bottom: 0 !important;
  border-bottom: 1px solid var(--m-grid-border) !important;
  gap: 2px !important;
}
.m-view-tabs .view-tab {
  padding: 8px 14px !important;
  font-size: 13.5px !important;
  font-weight: 400 !important;
  color: var(--ink-2) !important;
  border-bottom: 2.5px solid transparent !important;
  border-radius: 4px 4px 0 0;
}
.m-view-tabs .view-tab:hover {
  background: var(--bg-row-hover);
  color: var(--ink) !important;
}
.m-view-tabs .view-tab[aria-selected="true"] {
  color: var(--ink) !important;
  font-weight: 500 !important;
  border-bottom-color: var(--m-blue) !important;
}
.m-tab-icon { width: 14px; height: 14px; opacity: 0.75; }

/* Monday Single-Line Action & Filter Bar */
.m-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 0 16px;
}

.m-action-left,
.m-action-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

/* Monday Signature Split Blue "New item | ▾" Button */
.m-new-split {
  display: inline-flex;
  align-items: stretch;
  height: 32px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--m-blue);
  color: #ffffff;
  margin-right: 4px;
}
.m-new-main {
  padding: 0 12px;
  font-size: 13.5px;
  font-weight: 400;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  transition: background-color 0.12s ease;
}
.m-new-caret {
  width: 26px;
  border-left: 1px solid rgba(0, 0, 0, 0.2);
  font-size: 11px;
  color: #ffffff;
  display: grid;
  place-items: center;
  transition: background-color 0.12s ease;
}
.m-new-main:hover,
.m-new-caret:hover,
.m-new-solo:hover {
  background: var(--m-blue-hover);
}
.m-new-solo {
  height: 32px;
  padding: 0 12px;
  border-radius: 4px;
  background: var(--m-blue);
  color: #ffffff;
  font-size: 13.5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 4px;
}

.m-tool-search {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.m-tool-search .ui-glyph {
  position: absolute;
  left: 9px;
  color: var(--ink-3);
  pointer-events: none;
}
.m-tool-search input {
  height: 32px;
  width: 152px;
  padding: 0 10px 0 29px;
  border-radius: 4px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  transition: background-color 0.12s ease, border-color 0.12s ease, width 0.16s ease;
}
.m-tool-search input:hover {
  background: var(--bg-row-hover);
}
.m-tool-search input:focus {
  outline: none;
  width: 204px;
  background: var(--bg-input);
  border-color: var(--m-blue);
}
.m-tool-search input::placeholder { color: var(--ink-2); }

.m-tool-btn {
  height: 32px;
  padding: 0 10px;
  border-radius: 4px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
}
.m-tool-btn:hover {
  background: var(--bg-row-hover);
  color: var(--ink);
}
.m-tool-btn.is-active {
  background: rgba(0, 115, 234, 0.16);
  color: #579bfc;
}
html[data-theme="light"] .m-tool-btn.is-active {
  background: #cce5ff;
  color: #0052cc;
}

/* ==========================================================================
   4. MONDAY.COM IDENTICAL GROUPS, 6PX LEFT BAR, 36PX ROWS & SOLID CELLS
   ========================================================================== */
.monday-groups {
  display: flex;
  flex-direction: column;
  gap: 28px !important;
}

.group-title-row {
  padding: 0 2px 7px !important;
}

.group-toggle {
  font-size: 16.5px !important;
  font-weight: 600 !important;
  letter-spacing: -0.015em !important;
  color: var(--m-group, #579bfc) !important;
  gap: 9px !important;
}

.group-count-pill {
  font-size: 12.5px !important;
  font-weight: 400 !important;
  color: var(--ink-3) !important;
}

/* Outer scroll container has no border so floating summary sits cleanly underneath */
.group-table-wrap {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow-x: auto;
}

/* Inner Monday Group Box with Signature 6px Solid Colored Left Accent Bar */
.group-table-box {
  border: 1px solid var(--m-grid-border);
  border-left: 6px solid var(--m-group, #579bfc) !important;
  border-radius: 6px;
  background: var(--bg-row);
  overflow: hidden;
}

/* Monday 36px Column Header Row */
.m-head {
  background: var(--bg-header) !important;
  border-bottom: 1px solid var(--m-grid-border) !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  color: var(--ink-2) !important;
}

.m-head > div {
  min-height: 36px !important;
  padding: 0 8px !important;
  border-right: 1px solid var(--m-grid-border) !important;
  justify-content: center !important;
}
.m-head > div:last-child { border-right: 0 !important; }
.m-head .m-head-title {
  justify-content: flex-start !important;
  padding-left: 12px !important;
}
.m-th-thread .m-th-icon {
  color: var(--ink-3);
  display: inline-grid;
  place-items: center;
}
.m-th-thread .m-th-icon svg { width: 14px; height: 14px; }

/* Monday Crisp 36px Item Rows */
.m-row {
  border-bottom: 1px solid var(--m-grid-border) !important;
  background: var(--bg-row) !important;
}
.m-row:hover { background: var(--bg-row-hover) !important; }
.m-row.is-selected { background: var(--bg-row-selected) !important; }

.m-row > * {
  min-height: 36px !important;
  padding: 0 8px !important;
  border-right: 1px solid var(--m-grid-border) !important;
  font-size: 13px !important;
  justify-content: center !important;
}
.m-row > *:last-child { border-right: 0 !important; }

.m-check-cell {
  border-right: 1px solid var(--m-grid-border) !important;
}

.m-cell-title {
  justify-content: space-between !important;
  padding: 4px 10px 4px 10px !important;
  box-shadow: none !important;
}

.title-main strong {
  font-size: 13px !important;
  font-weight: 400 !important;
  color: var(--ink) !important;
}
.m-grid-leads .title-main strong,
.m-grid-shoots .title-main strong {
  font-weight: 500 !important;
}

/* Monday Update / Conversation Bubble Cell */
.m-cell-thread { padding: 0 !important; }
.updates-bubble {
  position: relative;
  width: 28px;
  height: 26px;
  padding: 0 !important;
  border-radius: 5px;
  background: transparent !important;
  color: var(--ink-3) !important;
  display: inline-grid !important;
  place-items: center !important;
}
.updates-bubble svg { width: 18px; height: 18px; }
.updates-btn:hover .updates-bubble { color: var(--m-blue) !important; }
.updates-bubble.has-items { color: var(--m-blue) !important; }
html[data-theme="dark"] .updates-bubble.has-items { color: #579bfc !important; }

.m-thread-badge {
  position: absolute;
  right: -2px;
  bottom: -1px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 999px;
  background: var(--m-blue);
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 600;
  display: inline-grid;
  place-items: center;
  line-height: 1;
}

/* Monday Centered 26px Circular Person Avatars */
.person-chip.is-board { gap: 0; }
.person-chip.is-board .avatar-ring {
  width: 26px;
  height: 26px;
  font-size: 10.5px;
  font-weight: 600;
  box-shadow: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
}
html[data-theme="light"] .person-chip.is-board .avatar-ring {
  border-color: rgba(0, 0, 0, 0.08);
}

.m-person-empty {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px dashed var(--hairline-strong);
  display: inline-grid;
  place-items: center;
  color: var(--ink-3);
  opacity: 0.65;
  transition: opacity 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.m-cell-btn:hover .m-person-empty {
  opacity: 1;
  border-color: var(--m-blue);
  color: var(--m-blue);
}
.m-person-empty svg { width: 15px; height: 15px; }

/* FULL-BLEED EDGE-TO-EDGE SOLID MONDAY STATUS, PRIORITY & DECISION CELLS */
.m-cell-solid {
  padding: 0 !important;
}

.m-cell-solid button,
.m-cell-solid a {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  position: relative;
  overflow: hidden;
}

.cell-fill {
  width: 100% !important;
  height: 100% !important;
  min-height: 36px !important;
  border-radius: 0 !important;
  border: 0 !important;
  padding: 0 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: var(--m-solid, #797e93) !important;
  color: #ffffff !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  box-shadow: none !important;
  transition: filter 0.12s ease !important;
}

.cell-fill.is-empty {
  background: #232736 !important;
  color: transparent !important;
}
html[data-theme="light"] .cell-fill.is-empty {
  background: #c4c4c4 !important;
  opacity: 0.35;
}
.m-cell-solid button:hover .cell-fill:not(.is-empty),
.m-cell-solid a:hover .cell-fill:not(.is-empty) {
  filter: brightness(1.07);
}
.m-cell-solid button:hover .cell-fill.is-empty,
.m-cell-solid a:hover .cell-fill.is-empty {
  opacity: 0.6;
}

/* Signature Monday Top-Right Corner Dog-Ear Fold on Hover */
.m-cell-solid button::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  border-style: solid;
  border-width: 0;
  border-color: transparent rgba(0, 0, 0, 0.38) transparent transparent;
  transition: border-width 0.12s ease;
}
html[data-theme="light"] .m-cell-solid button::after {
  border-color: transparent rgba(255, 255, 255, 0.72) transparent transparent;
}
.m-cell-solid button:hover::after {
  border-width: 0 9px 9px 0 !important;
}

/* Monday Date Cell & Overdue Exclamation Dot */
.due-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--ink);
  background: transparent !important;
}
.m-overdue-dot {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #e2445c;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  display: inline-grid;
  place-items: center;
  line-height: 1;
}
.due-chip.is-overdue {
  color: var(--ink) !important;
  font-weight: 400 !important;
}

/* Monday Bottom "+ Add item" Row inside Group Box */
.quick-add-row {
  min-height: 36px;
  border-bottom: 0 !important;
  background: var(--bg-row) !important;
}
.quick-add-row:hover,
.quick-add-row:focus-within {
  background: var(--bg-row-hover) !important;
}
.quick-add-row input {
  padding: 0 14px 0 46px !important;
  height: 36px;
  font-size: 13px !important;
}

/* Monday Detached Floating Group Summary Footer & 18px Battery Bars */
.m-summary {
  background: transparent !important;
  border: 0 !important;
}

.m-summary > div {
  border-right: 0 !important;
  min-height: 36px !important;
  padding: 0 !important;
}

.m-summary .m-sum-spacer {
  background: transparent !important;
}

.m-summary .m-sum-card {
  background: var(--bg-row);
  border-left: 1px solid var(--m-grid-border);
  border-right: 1px solid var(--m-grid-border) !important;
  border-bottom: 1px solid var(--m-grid-border);
  padding: 6px 8px !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.m-summary .m-sum-spacer + .m-sum-card {
  border-bottom-left-radius: 6px;
}
.m-summary .m-sum-card:has(+ .m-sum-spacer),
.m-summary .m-sum-card:last-child {
  border-bottom-right-radius: 6px;
}

.m-summary .stacked-bar {
  width: 100%;
  height: 18px !important;
  border-radius: 2px !important;
  gap: 0 !important;
  background: rgba(121, 126, 147, 0.25) !important;
}

.stacked-seg {
  background: var(--m-solid, var(--t-bar)) !important;
}

.m-timeline-pill {
  height: 20px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--m-group, #0073ea);
  color: #ffffff;
  font-size: 11px;
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

/* Indented Monday Subitems Sub-Table */
.monday-subdrawer {
  background: color-mix(in srgb, var(--bg-canvas) 75%, var(--bg-row)) !important;
  border-bottom: 1px solid var(--m-grid-border) !important;
}
.monday-subdrawer::before {
  border-color: var(--m-group, #579bfc) !important;
}
.subtable-card {
  border: 1px solid var(--m-grid-border) !important;
  border-left: 6px solid var(--m-group, #579bfc) !important;
  border-radius: 6px !important;
  background: var(--bg-row) !important;
}

/* ==========================================================================
   5. SOFT DOT-PILLS & USER MANAGEMENT DIRECTORY (Images 2, 3, 4)
   ========================================================================== */
.h1-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  padding: 0 7px;
  border-radius: 5px;
  background: var(--bg-surface);
  border: 1px solid var(--hairline-strong);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
}

.status-pill,
.mini-status-chip {
  height: 24px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 0 9px !important;
  border-radius: 6px !important;
  background: var(--t-bg) !important;
  color: var(--t-fg) !important;
  border: 1px solid color-mix(in srgb, var(--t-bar) 24%, transparent) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
}
.status-pill::before { display: none !important; }
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--t-bar, currentColor);
  flex: none;
}

.btn-primary {
  border-radius: 6px !important;
  font-weight: 500 !important;
  font-size: 13px !important;
  padding: 7px 14px !important;
  background: var(--m-blue) !important;
  color: #ffffff !important;
  box-shadow: none !important;
}
.btn-primary:hover:not(:disabled) {
  background: var(--m-blue-hover) !important;
  color: #ffffff !important;
}

.btn-outline {
  border-radius: 6px !important;
  font-size: 12.5px !important;
  padding: 6px 11px !important;
}

.um-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--hairline);
}
.um-toolbar-left, .um-toolbar-right { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.um-view-pill {
  height: 30px;
  padding: 0 10px;
  border-radius: 7px;
  background: var(--bg-elevated);
  border: 1px solid var(--hairline-strong);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink);
}
.um-filter-pill {
  height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--hairline-strong);
  font-size: 12px;
  color: var(--ink-2);
  cursor: pointer;
}
.um-seat-note { font-size: 12px; color: var(--ink-3); margin-left: 4px; }

.um-table-card {
  border: 1px solid var(--hairline);
  border-radius: 9px;
  background: var(--bg-row);
  overflow-x: auto;
}
.um-table { width: 100%; border-collapse: collapse; min-width: 820px; font-size: 13px; }
.um-table th, .um-table td {
  padding: 10px 13px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--hairline);
  border-right: 1px solid var(--hairline);
}
.um-table th:last-child, .um-table td:last-child { border-right: 0; }
.um-table tbody tr:last-child td { border-bottom: 0; }
.um-table thead th { background: var(--bg-header); font-size: 12px; font-weight: 500; color: var(--ink-2); }
.um-th-inner { display: inline-flex; align-items: center; gap: 6px; }
.um-th-inner svg { width: 13px; height: 13px; color: var(--ink-3); }
.um-table tbody tr:hover { background: var(--bg-row-hover); }
.um-user-cell { display: flex; align-items: center; gap: 10px; }
.um-email-link {
  color: var(--ink-2);
  text-decoration: underline;
  text-decoration-color: var(--hairline-strong);
  text-underline-offset: 3px;
  font-size: 12.5px;
}
.um-actions { display: inline-flex; align-items: center; gap: 5px; }
.um-act-chip {
  height: 25px;
  padding: 0 8px;
  border-radius: 5px;
  border: 1px solid var(--hairline-strong);
  background: var(--bg-surface);
  font-size: 11.5px;
  color: var(--ink-2);
}
.um-act-chip:hover { border-color: var(--ink-2); color: var(--ink); }
.um-act-chip.is-danger:hover { border-color: var(--tone-rose-bar); color: var(--tone-rose-bar); }

.role-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 500;
  background: var(--t-bg, var(--tone-slate-bg));
  color: var(--t-fg, var(--tone-slate-fg));
}

.code-cmd-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  background: var(--bg-rail);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: var(--ink);
  overflow-x: auto;
}

@media (max-width: 960px) {
  .workspace-stage { margin-left: 0; }
  .topbar-search-pill { min-width: 0; }
  .topbar-search-pill span, .topbar-search-pill kbd { display: none; }
}

/* Fit all 10 Monday columns comfortably inside 1440px desktop viewports without horizontal scroll */
.m-grid-tasks {
  grid-template-columns:
    32px
    var(--ct-title, minmax(210px, 1fr))
    var(--ct-thread, 46px)
    var(--ct-owner, 70px)
    var(--ct-status, 130px)
    var(--ct-due, 98px)
    var(--ct-priority, 104px)
    var(--ct-reviewer, 74px)
    var(--ct-decision, 128px)
    var(--ct-hours, 68px) !important;
  width: max(100%, max-content) !important;
}

.m-cell-title {
  left: 32px !important;
}
.m-grid-leads .m-cell-title,
.m-grid-shoots .m-cell-title {
  left: 0 !important;
}

.topbar-avatar-btn * {
  pointer-events: none;
}

.m-timeline-pill {
  font-size: 10.5px !important;
  padding: 0 8px !important;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sleek Monday Chevron on Select Filter Buttons */
select.m-tool-btn,
select.um-filter-pill,
select.toolbar-select {
  appearance: none !important;
  -webkit-appearance: none !important;
  padding-right: 24px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 12 12' fill='none' stroke='%238c8f9e' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4.5L6 7.5l3-3'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 8px center !important;
}

/* Untitled UI v12 Sign-out Footer Pill inside Account Menu (Reference Image 6) */
.uui-signout-all-btn {
  width: 100%;
  height: 32px;
  margin-top: 6px;
  border-radius: 7px;
  border: 1px solid var(--hairline-strong);
  background: var(--bg-surface);
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: border-color 0.12s ease, color 0.12s ease, background-color 0.12s ease;
}
.uui-signout-all-btn:hover {
  border-color: var(--ink-2);
  color: var(--ink);
  background: var(--bg-row-hover);
}
