/* ==========================================================================
   SECRETARY AI — MASTER EXECUTIVE DOCKET DESIGN SYSTEM (v0.1)
   Palette: Warm Ivory Silk (#FAF8F5), Obsidian Ink (#14171D), Linen Lines (#E7E2D5)
   ========================================================================== */

:root {
  /* Palette aligned to the MF Matrix DeepSeek design system (ivory + stone + amber) */
  --bg-canvas: #FAF8F5;        /* ivory-100 page background */
  --bg-surface: #FFFFFF;       /* white surface for actionable task cards */
  --bg-elevated: #FFFFFF;      /* elevated surface (cards/modals) */
  --bg-subtle: #F5F2EB;        /* ivory-200 subtle surface */
  --bg-hover: #F5F5F4;         /* stone-100 hover */
  --bg-tree: #FAF8F5;          /* sidebar tree */

  --border-hairline: #E7E5E4;  /* stone-200 divider */
  --border-hover: #D6D3D1;     /* stone-300 */
  --border-focus: #1C1917;     /* stone-900 */

  --ink-primary: #1C1917;      /* stone-900 */
  --ink-secondary: #57534E;    /* stone-600 */
  --ink-muted: #78716C;        /* stone-500 */
  --ink-faint: #A8A29E;        /* stone-400 */

  --accent-brass: #B45309;     /* brand amber */
  --accent-brass-soft: #FEF3C7;/* amber-100 */
  --accent-brass-border: #FDE68A; /* amber-200 */
  --accent-navy: #1C1917;      /* stone-900 */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);

  --badge-urgent-bg: #FFF1F2;  /* rose-50 */
  --badge-urgent-fg: #9F1239;  /* rose-800 */
  --badge-urgent-border: #FECDD3; /* rose-200 */

  --badge-amber-bg: #FFFBEB;   /* amber-50 */
  --badge-amber-fg: #92400E;   /* amber-800 */
  --badge-amber-border: #FDE68A; /* amber-200 */

  --badge-blue-bg: #EFF6FF;    /* blue-50 */
  --badge-blue-fg: #1E40AF;    /* blue-800 */
  --badge-blue-border: #BFDBFE;/* blue-200 */

  --badge-sage-bg: #ECFDF5;    /* emerald-50 */
  --badge-sage-fg: #065F46;    /* emerald-800 */
  --badge-sage-border: #A7F3D0;/* emerald-200 */

  --badge-purple-bg: #F5F3FF;
  --badge-purple-fg: #5B21B6;
  --badge-purple-border: #DDD6FE;

  /* Soft shadow scale from MF Matrix */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 1px rgba(0, 0, 0, 0.02);
  --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.03);
  --shadow-elevated: 0 12px 28px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-floating: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 9999px;

  --font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-editorial: 'Newsreader', Georgia, serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* Global focus treatment matching MF Matrix */
:focus-visible {
  outline: 2px solid #B45309;
  outline-offset: 2px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

html {
  zoom: 1;
}

body {
  background-color: var(--bg-canvas);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ==========================================================================
   TOP HORIZON DOCKET HEADER (End-to-End Translucent Frosted Glass Header)
   ========================================================================== */
.master-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  width: 100%;
  border-radius: 0;
  padding: 8px 24px;
  box-sizing: border-box;
  background: rgba(250, 248, 245, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-hairline);
  box-shadow: var(--shadow-sm);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.master-header .header-inner-pill {
  pointer-events: auto;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  border-radius: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: none;
  width: 100%;
  max-width: 100%;
  margin: 0;
}

.master-header.is-scrolled {
  background: rgba(250, 248, 245, 0.97);
  box-shadow: var(--shadow-card);
  border-bottom-color: var(--border-hairline);
}

.brand-meta-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-seal {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: #FFFFFF;
  border: 1px solid rgba(226, 221, 209, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  flex-shrink: 0;
}

.brand-seal img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.brand-text-block {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.brand-title {
  font-family: var(--font-editorial);
  font-size: 16.5px;
  font-weight: 600;
  color: #1C1917;
  letter-spacing: -0.015em;
  line-height: 1.15;
  display: flex;
  align-items: center;
}

.institutional-tag {
  display: inline-flex;
  align-items: center;
  gap: 3.5px;
  font-family: var(--font-sans);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 1.5px 6px;
  border-radius: 9999px;
  background: #FEF3C7;
  border: 1px solid #FCD34D;
  color: #92400E;
  line-height: 1.2;
}

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

.ticker-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseGreen 2s infinite;
  flex-shrink: 0;
}

@keyframes pulseGreen {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.header-ticker {
  font-size: 10.5px;
  color: #78716C;
  font-weight: 500;
  letter-spacing: -0.005em;
  font-variant-numeric: tabular-nums;
}

/* Central Command & Voice Input */
.master-command-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 242, 235, 0.8);
  border: 1px solid rgba(226, 221, 209, 0.9);
  border-radius: 9999px;
  padding: 5px 13px;
  box-shadow: inset 0 1px 2px rgba(44, 38, 28, 0.04);
  width: 100%;
  max-width: 480px;
  cursor: text;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.master-command-pill:hover,
.master-command-pill:focus-within {
  background: #FFFFFF;
  border-color: #B45309;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.12), 0 2px 8px rgba(44, 38, 28, 0.04);
}

.master-command-pill.drag-snapshot {
  background: #EFF6FF;
  border-color: #3B82F6;
  box-shadow: 0 0 14px rgba(59, 130, 246, 0.25);
}

/* Staged snapshot thumbnail in the command bar */
.staged-snapshot-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  padding: 2px;
}

.staged-snapshot-chip img {
  width: 26px;
  height: 26px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

.staged-snapshot-remove {
  border: none;
  background: transparent;
  color: #78716C;
  font-size: 10px;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  line-height: 1;
}

.staged-snapshot-remove:hover {
  color: #DC2626;
  background: rgba(220, 38, 38, 0.1);
}

.master-command-pill input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 12.5px;
  color: #1C1917;
  font-family: var(--font-sans);
  flex: 1;
  min-width: 0;
}

.master-command-pill input::placeholder {
  color: #A8A29E;
  font-weight: 400;
}

.command-shortcut-chip {
  font-size: 9.5px;
  font-weight: 600;
  color: #78716C;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(226, 221, 209, 0.95);
  border-radius: 4px;
  padding: 1.5px 5px;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.command-mic-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1px solid rgba(226, 221, 209, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #57534E;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.command-mic-btn:hover {
  background: #F59E0B;
  color: #FFFFFF;
  border-color: #F59E0B;
  transform: scale(1.05);
}

.command-mic-btn.recording {
  background: #EF4444;
  color: #FFFFFF;
  border-color: #EF4444;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Live Voice Recording Moving Waveform Bars */
.live-voice-visualizer {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 18px;
  padding: 0 4px;
}

.live-voice-visualizer .v-bar {
  width: 2.5px;
  height: 6px;
  background: #F59E0B;
  border-radius: 2px;
  animation: liveWave 0.8s ease-in-out infinite alternate;
}

.live-voice-visualizer .v-bar:nth-child(1) { animation-delay: 0.1s; height: 8px; }
.live-voice-visualizer .v-bar:nth-child(2) { animation-delay: 0.25s; height: 14px; }
.live-voice-visualizer .v-bar:nth-child(3) { animation-delay: 0.4s; height: 11px; }
.live-voice-visualizer .v-bar:nth-child(4) { animation-delay: 0.15s; height: 16px; }
.live-voice-visualizer .v-bar:nth-child(5) { animation-delay: 0.3s; height: 13px; }
.live-voice-visualizer .v-bar:nth-child(6) { animation-delay: 0.45s; height: 9px; }
.live-voice-visualizer .v-bar:nth-child(7) { animation-delay: 0.2s; height: 15px; }
.live-voice-visualizer .v-bar:nth-child(8) { animation-delay: 0.35s; height: 7px; }

@keyframes liveWave {
  0% { transform: scaleY(0.4); background: #F59E0B; }
  50% { transform: scaleY(1.3); background: #D97706; }
  100% { transform: scaleY(0.6); background: #EF4444; }
}

/* Top Stats & Quick Controls */
.header-status-pills {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

.header-pill-btn {
  font-size: 11.5px;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(226, 221, 209, 0.9);
  color: #44403C;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-sans);
}

.header-pill-btn:hover {
  background: #FFFFFF;
  border-color: #A8A29E;
  color: #1C1917;
  box-shadow: 0 2px 6px rgba(44, 38, 28, 0.06);
  transform: translateY(-1px);
}

.master-header .undo-dock-btn {
  font-size: 11.5px;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(226, 221, 209, 0.9);
  color: #44403C;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-sans);
}

.master-header .undo-dock-btn:hover:not(:disabled) {
  background: #FFFFFF;
  border-color: #A8A29E;
  color: #1C1917;
  box-shadow: 0 2px 6px rgba(44, 38, 28, 0.06);
  transform: translateY(-1px);
}

.master-header .undo-dock-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.header-pill {
  font-size: 11.5px;
  padding: 5px 10px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(226, 221, 209, 0.9);
  color: #57534E;
  display: flex;
  align-items: center;
  gap: 5px;
  font-variant-numeric: tabular-nums;
  transition: all 0.15s ease;
  font-weight: 500;
  font-family: var(--font-sans);
}

.header-pill strong {
  font-weight: 700;
}

.clickable-header-stat {
  cursor: pointer;
  user-select: none;
}

.clickable-header-stat:hover {
  background: #FFFFFF;
  border-color: #A8A29E;
  color: #1C1917;
  box-shadow: 0 2px 6px rgba(44, 38, 28, 0.06);
  transform: translateY(-1px);
}

.header-pill.alert {
  background: #FEF2F2;
  border-color: #FECACA;
  color: #DC2626;
  font-weight: 600;
}

.header-pill.alert:hover {
  background: #FEE2E2;
  border-color: #F87171;
  color: #B91C1C;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.15);
}

.pill-upcoming-style {
  background: #EFF6FF;
  border-color: #BFDBFE;
  color: #1D4ED8;
}

.pill-upcoming-style:hover {
  background: #DBEAFE;
  border-color: #93C5FD;
  color: #1E40AF;
}

.pill-active-style {
  background: #F0FDF4;
  border-color: #BBF7D0;
  color: #15803D;
}

.pill-active-style:hover {
  background: #DCFCE7;
  border-color: #86EFAC;
  color: #166534;
}

.master-header .btn {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(226, 221, 209, 0.9);
  color: #44403C;
}

.master-header .btn:hover {
  background: #FFFFFF;
  color: #1C1917;
  border-color: #A8A29E;
}

/* ==========================================================================
   PORTFOLIO DOSSIER ACCORDION (CLIENT CHIPS)
   ========================================================================== */
  .portfolio-bar-section {
    background: var(--bg-canvas);
    border-bottom: 1px solid var(--border-hairline);
  padding: 12px 24px 10px 20px;
}

/* Full-height body row: left pane spans header-to-bottom, strip +
   workspace stack in the right column */
.app-body-row {
  display: flex;
  align-items: stretch;
  flex: 1;
  min-height: 0;
}

.app-main-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.portfolio-bar-top {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 8px;
}

/* Single portfolio row: chips + sphere pills share one line */
.portfolio-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.portfolio-bar-row .dossier-strip {
  flex: 1;
  min-width: 0;
  padding-bottom: 0;
}

.sphere-inline {
  flex-shrink: 0;
}

.portfolio-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}

.sphere-pill-toggle {
  display: flex;
  background: var(--bg-subtle);
  padding: 2px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-hairline);
}

.sphere-pill-btn {
  border: none;
  background: transparent;
  padding: 3px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-secondary);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s ease;
}

.sphere-pill-btn.active {
  background: var(--bg-surface);
  color: var(--ink-primary);
  box-shadow: var(--shadow-sm);
}

.dossier-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  overflow-x: visible;
  padding-bottom: 4px;
}

.dossier-chip {
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: 12px;
  padding: 9px 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.15s ease;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  user-select: none;
  min-height: 40px;
}

.dossier-chip:hover {
  border-color: #C8C0AF;
  transform: translateY(-1px);
}

.dossier-chip.active {
  background: #2563EB;
  color: #FFFFFF;
  border-color: #1D4ED8;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.28);
}

.dossier-chip.active .dossier-client-name {
  color: #FFFFFF;
  font-weight: 700;
  letter-spacing: 0.015em;
}

.dossier-chip.active .dossier-client-sub { color: #DBEAFE; }
.dossier-chip.active .dossier-counter {
  background: rgba(255, 255, 255, 0.3);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.4);
}

.dossier-client-name { font-size: 13px; font-weight: 600; }
.dossier-client-sub { font-size: 10.5px; color: var(--ink-secondary); }
.dossier-counter {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-hairline);
  color: var(--ink-secondary);
}

/* ==========================================================================
   3-PANE COLLAPSIBLE APPLICATION SHELL
   ========================================================================== */
.app-workspace-shell {
  display: flex;
  align-items: stretch;
  min-height: calc(100vh - 130px);
  position: relative;
  overflow: hidden;
}

/* Collapsible & Resizable Left Tree Pane */
.left-pane-wrapper {
  width: 270px;
  min-width: 220px;
  max-width: 520px;
  flex-shrink: 0;
  background: var(--bg-tree);
  border-right: 1px solid var(--border-hairline);
  position: relative;
  display: flex;
  flex-direction: column;
  transition: width 0.22s cubic-bezier(0.16, 1, 0.3, 1), min-width 0.22s ease;
}

.left-pane-wrapper.is-resizing {
  transition: none !important;
  user-select: none;
}

.left-pane-wrapper.collapsed {
  width: 36px !important;
  min-width: 36px !important;
  max-width: 36px !important;
  border-right: 1px solid var(--border-hairline);
  cursor: pointer;
}

.left-pane-wrapper.collapsed .left-pane-inner {
  display: none !important;
}

.left-pane-wrapper.collapsed .left-pane-toggle {
  display: none !important;
}

.left-pane-wrapper.collapsed .pane-resizer {
  display: none !important;
}

.left-pane-wrapper.collapsed .collapsed-rail {
  display: flex !important;
}

.left-pane-inner {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Vertical Collapsed Rail Strip (Crisp White with Lit Hover) */
.collapsed-rail {
  display: none;
  width: 36px;
  height: 100%;
  background: #FFFFFF;
  border-right: 1px solid var(--border-hairline);
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 18px 0;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  z-index: 10;
}

.collapsed-rail:hover {
  background: #FFFDF8;
  box-shadow: inset 0 0 0 1px #E5C384, 0 0 16px rgba(229, 195, 132, 0.25);
}

.collapsed-rail-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-secondary);
  margin-bottom: 20px;
  transition: all 0.15s ease;
}

.collapsed-rail:hover .collapsed-rail-icon {
  background: #14171D;
  color: #FAF8F5;
  transform: scale(1.08);
}

.collapsed-rail-text {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.15s ease;
}

.collapsed-rail:hover .collapsed-rail-text {
  color: var(--accent-brass);
}

.collapsed-rail-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 8px;
  background: var(--bg-subtle);
  color: var(--ink-primary);
  border: 1px solid var(--border-hairline);
  writing-mode: horizontal-tb;
  transform: rotate(90deg);
}

.collapsed-rail:hover .collapsed-rail-badge {
  background: #14171D;
  color: #FFFFFF;
  border-color: #14171D;
}

/* Pane Resizer Handle */
.pane-resizer {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 6px;
  cursor: col-resize;
  z-index: 55;
  background: transparent;
  transition: background 0.15s ease;
}

.pane-resizer:hover, .pane-resizer.dragging {
  background: rgba(140, 115, 75, 0.4);
}

.left-resizer {
  right: -3px;
}

.right-resizer {
  left: -3px;
}

/* Header Collapse Arrow Buttons (Non-colliding with Resizer) */
.pane-collapse-header-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.pane-collapse-header-btn:hover {
  background: #14171D;
  color: #FAF8F5;
  border-color: #14171D;
}

/* Tree Content (compact: tree opens near the top, aligned with main window) */
.tree-pane-header {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tasks-title-badge {
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.segmented-tabs {
  display: flex;
  background: var(--bg-subtle);
  padding: 2px;
  border-radius: 6px;
  border: 1px solid var(--border-hairline);
}

.seg-btn {
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--ink-secondary);
  border-radius: 4px;
  cursor: pointer;
}

.seg-btn.active {
  background: var(--bg-surface);
  color: var(--ink-primary);
  box-shadow: var(--shadow-sm);
}

.tree-search-wrap {
  padding: 6px 8px;
  border-bottom: 1px solid var(--border-hairline);
  background: var(--bg-canvas);
}

.tree-search-input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 11.5px;
  outline: none;
  color: var(--ink-primary);
}

.tree-scroll-container {
  padding: 8px 8px;
  overflow-y: auto;
  flex: 1;
}

/* Tree Section Divider Headers */
.tree-section-header {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8C734B;
  padding: 6px 8px 3px;
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(232, 226, 216, 0.8);
}

  .tree-section-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-transform: none;
  }

  .tree-action-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-sm);
    color: var(--ink-muted);
    cursor: pointer;
    transition: var(--transition-fast);
    flex: 0 0 auto;
  }

  .tree-action-pill svg {
    display: block;
  }

  .tree-action-pill:hover {
    background: var(--bg-surface);
    color: var(--ink-primary);
    border-color: var(--accent-brass);
  }

  .tree-action-pill-row {
    margin-left: auto;
    width: 18px;
    height: 18px;
  }

  .tree-action-sep {
    color: var(--ink-muted);
  }

.tree-section-header:first-child {
  border-top: none;
  margin-top: 0;
  padding-top: 2px;
}

.tree-node-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 6px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-primary);
  background: transparent;
  transition: all 0.14s ease;
  user-select: none;
  margin-bottom: 1px;
  border: 1px solid transparent;
  min-height: 26px;
}

.tree-node-row:hover {
  background: #F3ECE1;
  border-color: #E6DCB8;
  color: #14171D;
}

.tree-node-row.active {
  background: #FFFFFF;
  border-color: #8C734B;
  font-weight: 700;
  color: #14171D;
  box-shadow: 0 1px 4px rgba(140, 115, 75, 0.12);
}

.tree-node-row.active .node-icon {
  transform: scale(1.1);
}

/* Distinct Customer Node vs Project Node in Left Tree */
.tree-node-row.tree-customer-row {
  border: 1px solid rgba(140, 115, 75, 0.12);
  margin-top: 2px;
  margin-bottom: 1px;
  font-weight: 600;
  border-radius: 6px;
}

.tree-node-row.tree-customer-row:hover {
  filter: brightness(0.97);
}

.tree-node-row.tree-customer-row.active {
  background: #FFFFFF !important;
  border-color: #2563EB;
  box-shadow: 0 1px 5px rgba(37, 99, 235, 0.18);
}

/* Individual Color Accents for Customers */
.tree-customer-row.cust-internal {
  background: rgba(217, 119, 6, 0.09);
  border-left: 3px solid #D97706;
}
.tree-customer-row.cust-mizuho {
  background: rgba(124, 58, 237, 0.08);
  border-left: 3px solid #7C3AED;
}
.tree-customer-row.cust-smbc {
  background: rgba(37, 99, 235, 0.08);
  border-left: 3px solid #2563EB;
}
.tree-customer-row.cust-scb, .tree-customer-row.cust-standard-chartered {
  background: rgba(5, 150, 105, 0.08);
  border-left: 3px solid #059669;
}
.tree-customer-row.cust-default {
  background: rgba(30, 41, 59, 0.05);
  border-left: 3px solid #64748B;
}

.tree-customer-tag {
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #334155;
  margin-right: 2px;
}

.tree-project-row {
  margin-left: 4px;
}

/* Personal Projects Indentation to match Client level indentation */
.tree-personal-project-row {
  margin-left: 14px !important;
  border-left: 2px solid rgba(124, 58, 237, 0.15);
  padding-left: 8px !important;
}

.tree-personal-project-row:hover {
  border-left-color: #7C3AED;
}

.tree-chev-btn {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  cursor: pointer;
  color: var(--ink-muted);
  transition: background 0.1s ease;
}

.tree-chev-btn:hover {
  background: rgba(140, 115, 75, 0.15);
  color: var(--ink-primary);
}

.tree-node-row .chev {
  width: 12px;
  height: 12px;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.tree-node-row .chev.open { transform: rotate(90deg); }

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

.tree-node-row .node-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.tree-node-row .node-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  background: var(--bg-surface);
  border: 1px solid #E2DAD0;
  color: var(--ink-secondary);
  flex-shrink: 0;
}

.tree-node-row.active .node-badge {
  background: #14171D;
  color: #FFFFFF;
  border-color: #14171D;
}

.tree-children {
  margin-left: 8px;
  padding-left: 6px;
  border-left: 1px solid var(--border-hairline);
}

.tree-children.hidden { display: none; }

/* ==========================================================================
   CENTER VIEWPORT (TASKS STREAM & BOARDROOM TABLE)
   ========================================================================== */
.center-viewport {
  flex: 1;
  min-width: 0;
  background: var(--bg-canvas);
  padding: 16px 20px;
  overflow-y: auto;
  position: relative;
}

  .docket-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px -4px rgba(44, 38, 28, 0.04);
  overflow: visible;
}

/* Toolbar & View Switcher */
.docket-top-toolbar {
  position: relative;
  z-index: 60;
  padding: 12px 18px;
    border-bottom: 1px solid var(--border-hairline);
    background: var(--bg-surface);
    display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.toolbar-left-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.view-mode-toggle {
  display: flex;
  background: var(--bg-subtle);
  padding: 2px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-hairline);
}

.view-mode-btn {
  border: none;
  background: transparent;
  padding: 5px 14px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-secondary);
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.view-mode-btn.active {
  background: var(--bg-surface);
  color: var(--ink-primary);
  box-shadow: var(--shadow-sm);
}

/* Universal Search Input */
.universal-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: 9px;
  padding: 8px 14px;
  min-width: 300px;
  flex: 1;
  max-width: 460px;
}

.universal-search-box input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 13px;
  width: 100%;
}

.toolbar-right-cluster {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* All toolbar controls grouped at the right edge */
.toolbar-right-all {
  margin-left: auto;
  justify-content: flex-end;
  flex-wrap: wrap;
  row-gap: 8px;
}

/* Hero Add Task: bigger, colorful */
  .btn-add-task {
    background: #2563EB;
    border-color: #1D4ED8;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 9px;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

  .btn-add-task:hover {
    background: #1D4ED8;
    border-color: #2563EB;
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.45);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid var(--border-hairline);
  background: var(--bg-surface);
  color: var(--ink-primary);
  cursor: pointer;
  transition: all 0.12s ease;
  position: relative;
}

.btn:hover {
  background: var(--bg-subtle);
  border-color: #C8C0AF;
}

.btn-primary {
  background: #14171D;
  color: #FAF8F5;
  border-color: #14171D;
}

.btn-primary:hover {
  background: #2D333D;
  color: #FFFFFF;
}

/* Docket Popover Menu (Sort & Status Filters) */
.docket-popover {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 170px;
  background: #FFFFFF;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 28px -4px rgba(20, 23, 29, 0.16), 0 2px 6px rgba(0, 0, 0, 0.04);
  padding: 6px;
  z-index: 200;
}

.toolbar-right-cluster .docket-popover {
  left: auto;
  right: 0;
}

.docket-popover.open {
  display: block;
}

.pop-item {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-secondary);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.1s ease;
  white-space: nowrap;
}

.pop-item:hover {
  background: var(--bg-subtle);
  color: var(--ink-primary);
}

.pop-item.active {
  background: var(--bg-hover);
  color: var(--ink-primary);
  font-weight: 600;
}

/* ==========================================================================
   ELEGANT IN-PAGE EXECUTIVE DIALOG MODAL (NEVER TOP-BROWSER POPUPS)
   ========================================================================== */
.modal-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(20, 23, 29, 0.45);
  backdrop-filter: blur(4px);
  z-index: 500;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.modal-backdrop.open {
  display: flex;
  opacity: 1;
}

.modal-dialog-box {
  background: #FFFFFF;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-floating);
  width: 90%;
  max-width: 640px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.open .modal-dialog-box {
  transform: scale(1);
}

.modal-dialog-header {
  padding: 14px 20px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-family: var(--font-editorial);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-primary);
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 14px;
  color: var(--ink-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
}

.modal-close-btn:hover {
  color: var(--ink-primary);
  background: var(--bg-subtle);
}

.modal-dialog-body {
  padding: 20px;
  overflow-y: auto;
  font-size: 13px;
  color: var(--ink-secondary);
}

.modal-dialog-footer {
  padding: 12px 20px;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.modal-form-group {
  margin-bottom: 14px;
}

.modal-form-group:last-child {
  margin-bottom: 0;
}

.modal-form-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-primary);
  margin-bottom: 5px;
}

.modal-form-input {
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-hairline);
  background: var(--bg-canvas);
  font-size: 13px;
  color: var(--ink-primary);
  outline: none;
  font-family: var(--font-sans);
}

.modal-form-input:focus {
  border-color: var(--ink-primary);
  background: #FFFFFF;
}

/* Columns grid in modal */
.columns-grid-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.column-toggle-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ink-primary);
  cursor: pointer;
  padding: 4px 0;
}

/* Master Select Bar */
.master-select-row {
    padding: 8px 18px;
    background: var(--bg-canvas);
    border-bottom: 1px solid var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-secondary);
}

.select-all-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

/* ==========================================================================
   VIEW 1: HORIZON GROUPED STREAM (CARD DOCKET)
   ========================================================================== */
.stream-viewport-container {
  padding: 8px;
}

.docket-group-block {
  margin-bottom: 14px;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
}

.docket-group-header {
  padding: 10px 16px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-left: 4px solid #14171D;
  user-select: none;
}

.docket-group-header.standard-chartered { border-left-color: #059669; background: #F4F9F5; }
.docket-group-header.smbc { border-left-color: #2563EB; background: #F2F7FD; }
.docket-group-header.mizuho { border-left-color: #7C3AED; background: #F8F4FD; }
.docket-group-header.internal { border-left-color: #D97706; background: #FAF6EF; }
.docket-group-header.personal { border-left-color: #8C734B; background: #F7F3EB; }

.group-left-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.group-collapse-btn {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--ink-muted);
  transition: all 0.15s ease;
}

.group-collapse-btn:hover {
  background: rgba(0, 0, 0, 0.08);
  color: var(--ink-primary);
}

.group-collapse-btn svg {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.group-collapse-btn.collapsed svg {
  transform: rotate(-90deg);
}

.group-cards-list.collapsed {
  display: none !important;
}

.group-sphere-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 4px;
}

.group-sphere-badge.business {
  background: #E0E7FF;
  color: #1E40AF;
  border: 1px solid #A5B4FC;
}

.group-sphere-badge.personal {
  background: #F3E8FF;
  color: #6B21A8;
  border: 1px solid #D8B4FE;
}

.group-project-title-editable {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-primary);
  cursor: default;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 0.15s ease;
  /* Size to content (never stretch): blank areas must hit the row so
     double-click there hides instead of renaming. Badges stay right via
     margin-left:auto. Still shrinks with ellipsis when space is tight. */
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-project-title-editable:hover {
  background: rgba(0, 0, 0, 0.05);
}

.group-project-title-editable.editing {
  background: #FFFFFF;
  outline: 1px solid #14171D;
}

.group-progress-text {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-secondary);
  font-variant-numeric: tabular-nums;
  display: none; /* hidden per design */
}

/* Customer prefix label in group header */
.group-cust-prefix {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-secondary);
  white-space: nowrap;
  cursor: default;
  user-select: none;
}

/* Right cluster in group header (sphere badge) */
.group-right-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

/* Hide per-group thead rows (using single sticky global header instead) */
.group-thead-hidden {
  display: none;
}

/* Sticky Column Header Row for Stream View (inset 9px to match 8px container padding + 1px card border) */
.stream-header-row {
  position: sticky;
  top: 0;
  z-index: 15;
    background: var(--bg-canvas);
    border-bottom: 2px solid var(--border-hairline);
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  margin: 0 9px;
  box-sizing: border-box;
}

.stream-header-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  table-layout: fixed;
  box-sizing: border-box;
}

.stream-header-table thead th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-secondary);
  padding: 7px 6px !important;
  box-sizing: border-box !important;
  background: #FAF8F5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Hide stream header when in table view */
#stream-header-row.hidden-in-table {
  display: none;
}

/* Master Select Bar with Collapse / Expand All */
.master-select-row {
  padding: 8px 18px;
  background: #FAF8F5;
  border-bottom: 1px solid var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-secondary);
}

.master-select-left-tools {
  display: flex;
  align-items: center;
  gap: 14px;
}

.collapse-expand-btn-group {
  display: flex;
  align-items: center;
  gap: 4px;
  border-right: 1px solid var(--border-hairline);
  padding-right: 12px;
}

.tool-tiny-btn {
  border: 1px solid var(--border-hairline);
  background: var(--bg-surface);
  color: var(--ink-secondary);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.tool-tiny-btn:hover {
  background: #14171D;
  color: #FAF8F5;
  border-color: #14171D;
}

#btn-collapse-toggle svg {
  transition: transform 0.2s ease;
}

#btn-collapse-toggle.toggled-open svg {
  transform: rotate(180deg);
}

.master-select-right-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

/* Undo / Undo Button in Header */
.undo-dock-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-hairline);
  background: var(--bg-surface);
  color: var(--ink-primary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.undo-dock-btn:hover:not(:disabled) {
  background: #14171D;
  color: #FAF8F5;
  border-color: #14171D;
}

.undo-dock-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Retained Task Tag: tiny R suffix (modified item kept on screen) */
.retained-filter-tag {
  font-size: 9px;
  font-weight: 800;
  padding: 0 4px;
  border-radius: 4px;
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #FCD34D;
  display: inline-flex;
  align-items: center;
}

/* Luminous Electric Blue / Emerald Green Attention Glow (Feedback #10 & #11) */
@keyframes taskAttentionBlink {
  0% {
    background-color: #EFF6FF;
    box-shadow: 0 0 0 3px #2563EB, 0 4px 16px rgba(37, 99, 235, 0.28);
  }
  30% {
    background-color: #ECFDF5;
    box-shadow: 0 0 0 3px #10B981, 0 4px 16px rgba(16, 185, 129, 0.24);
  }
  65% {
    background-color: #F0FDF4;
    box-shadow: 0 0 0 1.5px #34D399;
  }
  100% {
    background-color: #FFFFFF;
    box-shadow: none;
  }
}

.task-attention-blink {
  animation: taskAttentionBlink 2.2s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

/* Individual Docket Row Card (Compact Boardroom-Height Alignment) */
.docket-row-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 14px;          /* Matches Boardroom table td height ~38-40px */
  border-bottom: 1px solid var(--border-hairline);
  background: #FFFFFF;         /* Crisp pure white */
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
  position: relative;
  min-height: 38px;
}

.docket-row-card:last-child { border-bottom: none; }
.docket-row-card:hover { 
  background: #FCFAF6; 
  box-shadow: inset 2px 0 0 var(--accent-brass);
}

.docket-row-card.active-inspected {
  background: #F8F3EA;
  box-shadow: inset 3px 0 0 #14171D;
}

.row-checkbox {
  width: 15px;
  height: 15px;
  accent-color: #14171D;
  cursor: pointer;
  flex-shrink: 0;
}

/* Status column: low-friction circle-check toggle (far-left checkbox stays
   as the multi-select control; this toggles done/active for the row) */
.row-done-toggle-btn {
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 50%;
  border: 1.5px solid var(--border-hover);
  background: var(--bg-surface);
  color: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  transition: all 0.15s ease;
  flex-shrink: 0;
  vertical-align: middle;
}

.row-done-toggle-btn:hover {
  border-color: #14171D;
  color: #14171D;
  background: var(--bg-subtle);
}

.row-done-toggle-btn.done {
  background: var(--badge-sage-bg);
  color: var(--badge-sage-fg);
  border-color: var(--badge-sage-border);
}

.row-done-toggle-btn.done:hover {
  background: var(--badge-sage-bg);
  color: var(--badge-sage-fg);
  filter: brightness(0.96);
}

.row-main-content {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.row-title-line {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-task-title-text {
  cursor: pointer;
  display: inline-block;
  direction: ltr !important;
  unicode-bidi: isolate;
  text-align: left !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
  max-width: 100%;
}
.row-task-title-text:hover {
  color: var(--accent-brass);
  text-decoration: underline;
  text-underline-offset: 2px;
}
/* Subtasks: collapsed badge, indented expansion rows, dossier child rows */
.sub-badge {
  display: inline-block;
  margin-left: 7px;
  padding: 0 7px;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 18px;
  border-radius: 9px;
  border: 1px solid var(--ink-faint, #d8d2c4);
  background: rgba(127, 127, 127, 0.08);
  color: var(--ink-muted);
  cursor: pointer;
  white-space: nowrap;
  vertical-align: 1px;
}
.sub-badge:hover {
  border-color: var(--accent-brass);
  color: var(--accent-brass);
}
.sub-badge.open {
  background: rgba(176, 141, 79, 0.14);
  border-color: var(--accent-brass);
  color: var(--accent-brass);
}
tr.sub-row {
  background: rgba(127, 127, 127, 0.06);
}
td.task-title-cell.sub-indent .title-cell-flex {
  padding-left: 24px;
  background-image: linear-gradient(rgba(127, 127, 127, 0.35), rgba(127, 127, 127, 0.35)), linear-gradient(rgba(127, 127, 127, 0.35), rgba(127, 127, 127, 0.35));
  background-size: 1px 100%, 9px 1px;
  background-position: 10px 0, 10px 50%;
  background-repeat: no-repeat;
}
tr.sub-row:has(+ tr:not(.sub-row)) td.task-title-cell.sub-indent .title-cell-flex {
  background-size: 1px 50%, 9px 1px;
}
.dossier-child-title {
  cursor: pointer;
  flex: 1;
}
.dossier-child-title:hover {
  color: var(--accent-brass);
}
.dossier-child-toggle {
  border: 1px solid var(--ink-faint, #d8d2c4);
  background: transparent;
  border-radius: 6px;
  font-size: 11px;
  padding: 1px 7px;
  cursor: pointer;
}
.dossier-child-toggle:hover {
  border-color: var(--accent-brass);
  color: var(--accent-brass);
}
.dossier-subtask-row.is-done .dossier-child-title {
  text-decoration: line-through;
  color: var(--ink-muted);
}
/* Dossier lineage: header vs branch identity */
.dossier-lineage {
  font-size: 11.5px;
  margin-top: 2px;
}
.dossier-lineage-main {
  color: var(--accent-brass);
  font-weight: 700;
}
.dossier-lineage-sub {
  color: var(--ink-muted);
  cursor: pointer;
}
.dossier-lineage-sub:hover {
  color: var(--accent-brass);
  text-decoration: underline;
  text-underline-offset: 2px;
}
/* Move-under header picker inside the executive modal */
.modal-picklist {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 240px;
  overflow-y: auto;
  margin-top: 8px;
}
.modal-picklist button {
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 6px 9px;
  font-size: 13px;
  cursor: pointer;
  color: inherit;
}
.modal-picklist button:hover {
  border-color: var(--accent-brass);
}
.modal-picklist button em {
  font-style: normal;
  opacity: 0.6;
  font-size: 11.5px;
}
.modal-pick-empty {
  font-size: 12px;
  opacity: 0.65;
  padding: 6px 2px;
}

.row-task-title-text.editing {
  outline: 2px solid var(--accent-brass);
  background: #FFFFFF;
  padding: 1px 4px;
  border-radius: 4px;
}

.row-id-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
}

/* In-place Clickable Priority Badges: fixed width, centered, dot + text */
.clickable-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  min-width: 74px;
  padding: 3px 8px;
  border-radius: 9999px;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  user-select: none;
  transition: background 0.12s ease, border-color 0.12s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

.clickable-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.badge-urgent { color: #B91C1C; }
.badge-urgent:hover { background: var(--badge-urgent-bg); border-color: var(--badge-urgent-border); }
.badge-high { color: #B45309; }
.badge-high:hover { background: var(--badge-amber-bg); border-color: var(--badge-amber-border); }
.badge-medium { color: #1D4ED8; }
.badge-medium:hover { background: var(--badge-blue-bg); border-color: var(--badge-blue-border); }
.badge-low { color: var(--ink-secondary); }
.badge-low:hover { background: var(--bg-subtle); border-color: var(--border-hairline); }

.badge-business { background: var(--badge-blue-bg); color: var(--badge-blue-fg); border: 1px solid var(--badge-blue-border); }
.badge-personal { background: var(--badge-purple-bg); color: var(--badge-purple-fg); border: 1px solid var(--badge-purple-border); }

.row-client-subline {
  font-size: 11px;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

/* Row Meta Cluster: Single Row or tight 2-line Aligned */
.row-vertical-meta {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 160px;
  flex-shrink: 0;
  text-align: right;
  border-left: 1px dashed rgba(220, 212, 200, 0.6);
  padding-left: 14px;
}

.time-cluster {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-secondary);
  white-space: nowrap;
}

.time-cluster.overdue {
  color: var(--badge-urgent-fg);
  font-weight: 600;
}

.time-cluster.soon {
  color: #B45309;
  font-weight: 600;
}

.alert-cluster {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--accent-brass);
  white-space: nowrap;
}

/* In-Place Hover Action Palette */
.row-hover-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.15s ease;
  flex-shrink: 0;
}

.docket-row-card:hover .row-hover-actions {
  opacity: 1;
}

.hover-act-btn {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--border-hairline);
  background: var(--bg-surface);
  color: var(--ink-secondary);
  cursor: pointer;
}

.hover-act-btn:hover {
  background: #14171D;
  color: #FAF8F5;
  border-color: #14171D;
}

/* ==========================================================================
   FLOATING RIGHT-CLICK CONTEXT MENU
   ========================================================================== */
.custom-context-menu {
  display: none;
  position: fixed;
  z-index: 1000;
  min-width: 210px;
  background: #FFFFFF;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-floating);
  padding: 6px;
  font-size: 12.5px;
  user-select: none;
}

.custom-context-menu.open {
  display: block;
}

.context-menu-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 12px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--ink-primary);
  font-weight: 500;
  transition: background 0.1s ease;
}

.context-menu-item:hover {
  background: var(--bg-subtle);
  color: var(--ink-primary);
}

.context-menu-item.danger {
  color: #DC2626;
}

.context-menu-item.danger:hover {
  background: #FEE2E2;
}

.context-menu-divider {
  height: 1px;
  background: var(--border-hairline);
  margin: 5px 0;
}

/* ==========================================================================
   VIEW 2: BOARDROOM TABLE (HIGH DENSITY)
   ========================================================================== */
.table-viewport-container {
  display: none;
  overflow-x: auto;
}

.boardroom-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  min-width: 920px;
  table-layout: fixed;
}

.boardroom-table thead th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-secondary);
  padding: 8px 10px;
  background: #FAF8F5;
  border-bottom: 1px solid var(--border-hairline);
  white-space: nowrap;
  position: relative;
  user-select: none;
  overflow: hidden;
  text-overflow: ellipsis;
}

.boardroom-table th .th-resizer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 6px;
  cursor: col-resize;
  user-select: none;
  z-index: 2;
}

.boardroom-table th .th-resizer:hover,
.boardroom-table th .th-resizer.resizing {
  background: var(--accent-brass);
}

.boardroom-table tbody tr {
  border-bottom: 1px solid var(--border-hairline);
  cursor: pointer;
  transition: background 0.12s ease;
}

.boardroom-table tbody tr:hover { background: #FAF9F7; }
.boardroom-table tbody tr.active-inspected { background: #F7F5EE; }

.boardroom-table td {
  padding: 7px 6px;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12.5px;
}

.cell-ellipsis {
  direction: ltr !important;
  unicode-bidi: isolate;
  text-align: left !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  max-width: 100%;
}

/* Quick In-Place Popover Pickers for Dates & Times */
.quick-inline-picker {
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.quick-inline-picker:hover {
  background: #FFFFFF;
  border-color: #CBD5E1;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.quick-inline-select {
  border: 1px solid transparent;
  background: transparent;
  font-size: 12px;
  font-family: inherit;
  color: inherit;
  padding: 2px 4px;
  border-radius: 4px;
  cursor: pointer;
  max-width: 100%;
  outline: none;
}

.quick-inline-select:hover, .quick-inline-select:focus {
  background: #FFFFFF;
  border-color: #CBD5E1;
}

/* More Reminders Badge */
.more-reminders-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
  color: var(--accent-brass);
  background: var(--bg-subtle);
  border: 1px solid var(--border-hairline);
  border-radius: 8px;
  padding: 0 4px;
  cursor: pointer;
  margin-left: 2px;
}

.more-reminders-badge:hover {
  background: #14171D;
  color: #FFFFFF;
}

/* ==========================================================================
   COLLAPSIBLE RIGHT EXECUTIVE DOSSIER
   ========================================================================== */
/* Collapsible & Resizable Right Executive Dossier */
.right-pane-wrapper {
  width: 380px;
  min-width: 300px;
  max-width: 650px;
  flex-shrink: 0;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-hairline);
  position: relative;
  display: flex;
  flex-direction: column;
  transition: width 0.22s cubic-bezier(0.16, 1, 0.3, 1), min-width 0.22s ease;
}

.right-pane-wrapper.is-resizing {
  transition: none !important;
  user-select: none;
}

.right-pane-wrapper.collapsed {
  width: 36px !important;
  min-width: 36px !important;
  max-width: 36px !important;
  border-left: 1px solid var(--border-hairline);
  cursor: pointer;
}

.right-pane-wrapper.collapsed .right-pane-inner {
  display: none !important;
}

.right-pane-wrapper.collapsed .right-pane-toggle {
  display: none !important;
}

.right-pane-wrapper.collapsed .pane-resizer {
  display: none !important;
}

.right-pane-wrapper.collapsed .collapsed-rail-right {
  display: flex !important;
}

.right-pane-inner {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Right Pane Collapsed Rail */
.collapsed-rail-right {
  display: none;
  width: 36px;
  height: 100%;
  background: #FFFFFF;
  border-left: 1px solid var(--border-hairline);
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 18px 0;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  z-index: 10;
}

.collapsed-rail-right:hover {
  background: #FFFDF8;
  box-shadow: inset 0 0 0 1px #E5C384, 0 0 16px rgba(229, 195, 132, 0.25);
}

.collapsed-rail-right .collapsed-rail-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-secondary);
  margin-bottom: 20px;
  transition: all 0.15s ease;
}

.collapsed-rail-right:hover .collapsed-rail-icon {
  background: #14171D;
  color: #FAF8F5;
  transform: scale(1.08);
}

.collapsed-rail-right .collapsed-rail-text {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.15s ease;
}

.collapsed-rail-right:hover .collapsed-rail-text {
  color: var(--accent-brass);
}

.collapsed-rail-right .collapsed-rail-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 8px;
  background: var(--bg-subtle);
  color: var(--ink-primary);
  border: 1px solid var(--border-hairline);
  writing-mode: horizontal-tb;
  transform: rotate(90deg);
}

.collapsed-rail-right:hover .collapsed-rail-badge {
  background: #14171D;
  color: #FFFFFF;
  border-color: #14171D;
}

.right-pane-toggle {
  left: -13px;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: none;
}

.right-pane-reopen-btn {
  display: none !important;
}

.dossier-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-hairline);
  background: #FAF8F5;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dossier-header-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
  margin: 0 10px;
}

.dossier-header-title {
  font-family: var(--font-editorial);
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

#dossier-header-task-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-primary);
  max-width: 220px;
}

.dossier-header-created {
  font-size: 11px;
  color: #8C98A9;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dossier-scroll-content {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Audio Memo Player Widget */
.voice-memo-player-card {
  background: var(--accent-brass-soft);
  border: 1px solid #E6DDCF;
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.voice-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-brass);
  margin-bottom: 8px;
}

.waveform-box {
  display: flex;
  align-items: center;
  gap: 2.5px;
  height: 32px;
  cursor: pointer;
  margin-bottom: 8px;
}

.wf-bar {
  flex: 1;
  background: #C4B9A6;
  border-radius: 2px;
  height: 25%;
  transition: all 0.12s ease;
}

.wf-bar.played { background: #14171D; }

.voice-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-play-voice {
  background: #14171D;
  color: #FAF8F5;
  border: none;
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Form Controls in Dossier */
.dossier-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Sphere toggle matches the Priority select height so no dead space sits
   under the shorter control in the 2-up Sphere/Priority row */
.dossier-scroll-content .sphere-pill-toggle {
  min-height: 34px;
  box-sizing: border-box;
}
.dossier-scroll-content .sphere-pill-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 8px;
}

.dossier-input, .dossier-select {
  width: 100%;
  background: #FAF8F5;
  border: 1px solid var(--border-hairline);
  border-radius: 8px;
  padding: 7px 11px;
  font-size: 12.5px;
  color: var(--ink-primary);
  outline: none;
  font-family: var(--font-sans);
  transition: border-color 0.15s ease;
}

.dossier-input:focus, .dossier-select:focus {
  border-color: #14171D;
  background: #FFFFFF;
}

/* Decoupled Schedule Card */
.temporal-control-card {
  background: #FAF8F5;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 10px;
}

.temporal-grid-2 {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 6px;
}

.temp-item {
  min-width: 0;
  width: 100%;
}

.temp-item label {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-secondary);
  margin-bottom: 4px;
}

.temp-item input[type="datetime-local"] {
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
  padding: 6px 10px;
  font-size: 12px;
}

/* Multi-Day Recurrence Selector (Feedback #9) */
.weekday-picker-row {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}

.day-chip-btn {
  flex: 1;
  padding: 4px 0;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  border: 1px solid var(--border-hairline);
  background: var(--bg-surface);
  color: var(--ink-secondary);
  cursor: pointer;
  transition: all 0.12s ease;
}

.day-chip-btn.active {
  background: #14171D;
  color: #FAF8F5;
  border-color: #14171D;
}

/* Subtask Checklist in Dossier */
.dossier-checklist-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dossier-subtask-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-primary);
  padding: 4px 0;
  border-bottom: 1px dashed var(--border-hairline);
}

.dossier-subtask-row:last-child { border-bottom: none; }

/* AI Interpretation Box (Feedback #7) */
.ai-interpret-panel {
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 10px;
  background: var(--bg-tree);
}

.ai-interpret-btn {
  width: 100%;
  padding: 6px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid var(--accent-brass);
  background: var(--accent-brass-soft);
  color: var(--accent-brass);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 6px;
  transition: all 0.15s ease;
}

.ai-interpret-btn:hover {
  background: var(--accent-brass);
  color: #FAF8F5;
}

.dossier-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border-hairline);
  background: #FAF8F5;
  display: flex;
  gap: 8px;
}

/* ==========================================================================
   FLOATING MULTI-SELECT BATCH ACTION DOCK
   ========================================================================== */
.master-floating-batch-dock {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  opacity: 0;
  pointer-events: none;
    background: var(--bg-surface);
    border: 1px solid var(--border-hairline);
  box-shadow: 0 16px 40px -4px rgba(44, 38, 28, 0.18), 0 2px 8px rgba(0, 0, 0, 0.04);
  color: #0F172A;
  padding: 6px 10px 6px 14px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 500;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.master-floating-batch-dock.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.batch-count-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 700;
  color: #1C1917;
  white-space: nowrap;
}

.batch-indicator-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3B82F6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.batch-divider {
  width: 1px;
  height: 18px;
  background: rgba(214, 208, 194, 0.9);
  flex-shrink: 0;
}

.batch-actions-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.batch-action-btn {
  background: #FFFFFF;
  border: 1px solid rgba(226, 221, 209, 0.95);
  color: #334155;
  border-radius: 9999px;
  padding: 5px 11px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.batch-action-btn:hover {
  background: #F8FAFC;
  border-color: #94A3B8;
  color: #0F172A;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.batch-action-btn svg {
  flex-shrink: 0;
  stroke: currentColor;
}

.batch-action-btn.danger {
  background: #FEF2F2;
  border-color: #FECACA;
  color: #DC2626;
}

.batch-action-btn.danger:hover {
  background: #DC2626;
  border-color: #DC2626;
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.25);
}

.batch-dismiss-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(226, 221, 209, 0.95);
  background: #FFFFFF;
  color: #64748B;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-left: 2px;
}

.batch-dismiss-btn:hover {
  background: #F1F5F9;
  color: #0F172A;
  border-color: #94A3B8;
}

/* Toast */
.master-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(60px);
  opacity: 0;
  background: #14171D;
  color: #FAF8F5;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
  box-shadow: var(--shadow-floating);
  z-index: 300;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.master-toast.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Grouped Boardroom Table in Stream View */
.group-table-wrap {
  width: 100%;
  overflow-x: auto;
  background: #FFFFFF;
}

.group-boardroom-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  table-layout: fixed;
}

.group-boardroom-table thead th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-secondary);
  padding: 7px 6px !important;
  box-sizing: border-box !important;
  background: #FAF8F5;
  border-bottom: 1px solid var(--border-hairline);
  white-space: nowrap;
  position: relative;
  user-select: none;
  overflow: hidden;
  text-overflow: ellipsis;
}

.group-boardroom-table th .th-resizer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 6px;
  cursor: col-resize;
  user-select: none;
  z-index: 2;
}

.group-boardroom-table th .th-resizer:hover,
.group-boardroom-table th .th-resizer.resizing {
  background: var(--accent-brass);
}

.group-boardroom-table tbody tr {
  border-bottom: 1px solid var(--border-hairline);
  transition: background var(--transition-fast);
}

.group-boardroom-table tbody tr:last-child {
  border-bottom: none;
}

.group-boardroom-table tbody tr:hover { background: #FCFAF6; }
.group-boardroom-table tbody tr.active-inspected { background: #F8F3EA; }

.group-boardroom-table td {
  padding: 7px 6px !important;
  box-sizing: border-box !important;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
}

/* Tabular figures (Inter tnum) so dates/IDs align down data columns */
.group-boardroom-table,
.stream-header-table {
  font-variant-numeric: tabular-nums;
}

/* Status circle toggle sits centered in its column */
.group-boardroom-table td.c-status,
.boardroom-table td.c-status {
  text-align: center;
}

/* ==========================================================================
   EXECUTIVE DATETIME & NATURAL LANGUAGE POPOVER PICKER
   ========================================================================== */
.exec-dt-popover {
  display: none;
  position: fixed;
  z-index: 1200;
  width: 440px;
  max-width: 95vw;
  background: #FFFFFF;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 36px rgba(20, 23, 29, 0.16), 0 4px 12px rgba(20, 23, 29, 0.08);
  font-family: var(--font-sans);
  overflow: hidden;
  animation: execPopIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.exec-dt-popover.open {
  display: flex;
  flex-direction: column;
}

@keyframes execPopIn {
  from { opacity: 0; transform: translateY(6px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.exec-dt-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #FAF8F5;
  border-bottom: 1px solid var(--border-hairline);
}

.exec-dt-natural-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  background: #FFFFFF;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  padding: 5px 10px;
  color: var(--ink-secondary);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.exec-dt-natural-wrap:focus-within {
  border-color: var(--accent-brass);
  box-shadow: 0 0 0 2px rgba(184, 138, 68, 0.2);
}

.exec-dt-natural-input {
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  font-size: 12px;
  color: var(--ink-primary);
  font-family: inherit;
}

.exec-dt-close-btn {
  background: transparent;
  border: none;
  font-size: 14px;
  color: var(--ink-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
}

.exec-dt-close-btn:hover {
  background: #E5E7EB;
  color: var(--ink-primary);
}

/* Quick Presets Bar */
.exec-dt-presets {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  overflow-x: auto;
  background: #FFFDF9;
  border-bottom: 1px solid var(--border-hairline);
}

.exec-dt-preset-btn {
  white-space: nowrap;
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 12px;
  border: 1px solid #E5E7EB;
  background: #FFFFFF;
  color: var(--ink-secondary);
  cursor: pointer;
  transition: all 0.12s ease;
}

.exec-dt-preset-btn:hover {
  border-color: var(--accent-brass);
  color: var(--accent-brass);
  background: #FAF5EE;
}

/* Body with Calendar & DSLR Time Wheels */
.exec-dt-body {
  display: flex;
  min-height: 230px;
}

.exec-dt-calendar-pane {
  flex: 1.25;
  padding: 12px 14px;
  border-right: 1px solid var(--border-hairline);
}

.exec-dt-cal-month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.exec-dt-month-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-primary);
  letter-spacing: 0.02em;
}

.exec-dt-nav-btn {
  background: transparent;
  border: 1px solid #E5E7EB;
  border-radius: 4px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  color: var(--ink-secondary);
}

.exec-dt-nav-btn:hover {
  background: #F3F4F6;
  color: var(--ink-primary);
}

.exec-dt-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
}

.cal-head-cell {
  font-size: 10px;
  font-weight: 700;
  color: #9CA3AF;
  padding: 4px 0;
  text-transform: uppercase;
}

.cal-day-cell {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-primary);
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.1s ease;
  user-select: none;
}

.cal-day-cell:hover:not(.empty) {
  background: #F3F4F6;
}

.cal-day-cell.other-month {
  color: #D1D5DB;
}

.cal-day-cell.today {
  border: 1px solid var(--accent-brass);
  font-weight: 700;
}

.cal-day-cell.selected {
  background: var(--ink-primary) !important;
  color: #FAF8F5 !important;
  font-weight: 700;
}

/* DSLR Time Pane */
.exec-dt-time-pane {
  flex: 0.95;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  background: #FCFCFB;
}

.exec-dt-time-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-secondary);
  margin-bottom: 8px;
}

.exec-dt-wheels-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: auto 0;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 8px 4px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.04);
}

.exec-dt-wheel-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: ns-resize;
  user-select: none;
  padding: 2px 4px;
  border-radius: 6px;
  transition: background 0.12s ease;
}

.exec-dt-wheel-col:hover {
  background: #F7F5EE;
  box-shadow: 0 0 0 1px var(--accent-brass-border);
}

.wheel-col-label {
  font-size: 9px;
  font-weight: 700;
  color: #9CA3AF;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.wheel-scroll-viewport {
  height: 80px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.wheel-item {
  height: 26px;
  line-height: 26px;
  font-size: 13px;
  font-weight: 500;
  color: #9CA3AF;
  text-align: center;
  cursor: pointer;
  transition: all 0.1s ease;
}

.wheel-item.active {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink-primary);
  background: #F3F4F6;
  border-radius: 4px;
  width: 32px;
}

.wheel-colon {
  font-size: 18px;
  font-weight: 700;
  color: #9CA3AF;
  padding-bottom: 4px;
}

.exec-dt-ampm-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-left: 4px;
}

.ampm-chip {
  padding: 4px 6px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 4px;
  border: 1px solid #E5E7EB;
  background: #FFFFFF;
  color: var(--ink-secondary);
  cursor: pointer;
  transition: all 0.12s ease;
}

.ampm-chip.active {
  background: var(--ink-primary);
  color: #FFFFFF;
  border-color: var(--ink-primary);
}

.exec-dt-wheel-hint {
  font-size: 10px;
  color: #9CA3AF;
  text-align: center;
  margin-top: 4px;
}

/* Recurrence Cadence Controls */
.exec-dt-cadence-section {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #E5E7EB;
}

.exec-dt-cadence-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748B;
  margin-bottom: 5px;
}

.exec-dt-cadence-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.cadence-chip {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2.5px 8px;
  border-radius: 9999px;
  border: 1px solid #E2E8F0;
  background: #FFFFFF;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cadence-chip:hover {
  border-color: #D97706;
  color: #D97706;
}

.cadence-chip.active {
  background: #FEF3C7;
  border-color: #F59E0B;
  color: #92400E;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(245, 158, 11, 0.2);
}

/* Recurrence Badge: Compact Circled R (Feedback: avoids overlap) */
.recur-circle-badge,
.recur-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  min-width: 14px;
  max-width: 14px;
  border-radius: 50%;
  background: #EFF6FF;
  border: 1px solid #60A5FA;
  color: #1D4ED8;
  font-size: 8.5px;
  font-weight: 800;
  font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  line-height: 1;
  margin-left: 5px;
  flex-shrink: 0;
  cursor: pointer;
  user-select: none;
  vertical-align: middle;
  transition: all 0.15s ease;
}

.recur-circle-badge:hover,
.recur-badge:hover {
  background: #2563EB;
  border-color: #2563EB;
  color: #FFFFFF;
  transform: scale(1.12);
}

/* Footer with Confirm checkmark */
.exec-dt-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #FAF8F5;
  border-top: 1px solid var(--border-hairline);
}

.exec-dt-preview-text {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-primary);
}

.exec-dt-foot-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.exec-dt-confirm-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: #10B981;
  border: 1px solid #059669;
  border-radius: 6px;
  color: #FFFFFF;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.3);
  transition: all 0.12s ease;
}

.exec-dt-confirm-btn:hover {
  background: #059669;
  transform: scale(1.02);
}

/* Dossier Custom Date Picker Triggers */
.dossier-custom-dt-trigger {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 10px;
  font-size: 12px;
  color: var(--ink-primary);
  background: var(--bg-canvas);
  border: 1px solid var(--border-hairline);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.dossier-custom-dt-trigger:hover {
  background: #FFFFFF;
  border-color: var(--accent-brass);
}

/* ==========================================================================
   GEMINI-VIEW FIX PACK (2026-09-08) — overrides, existing rules untouched
   ========================================================================== */

/* --- Sharp logo at native resolution on white tile --- */
.brand-seal-logo {
  background: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 0;
  overflow: hidden;
}
.brand-seal-logo img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  display: block;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* --- Freeze page: header locked, panes scroll independently --- */
html, body {
  height: 100%;
  overflow: hidden !important;
}
body {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.master-header {
  flex-shrink: 0;
}
.app-workspace-shell {
  flex: 1;
  min-height: 0;
  height: auto;
  min-height: 0;
}
/* Left pane: tree scrolls inside */
.left-pane-inner {
  min-height: 0;
}
.tree-scroll-container {
  overflow-y: auto !important;
  flex: 1;
  min-height: 0;
}
/* Center: toolbar fixed, only the stream list scrolls */
.center-viewport {
  overflow: hidden !important;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.docket-box {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}
.docket-top-toolbar,
.master-select-row {
  flex-shrink: 0;
}
.stream-header-row {
  flex-shrink: 0;
}
.stream-viewport-container {
  overflow-y: auto !important;
  flex: 1;
  min-height: 0;
}
/* Right pane: dossier body scrolls inside */
.right-pane-inner {
  min-height: 0;
}
.dossier-scroll-content {
  overflow-y: auto !important;
  flex: 1;
  min-height: 0;
}

/* --- Retired views: never show table/board --- */
.view-mode-toggle {
  display: none !important;
}
#table-view-container:not(.flat-visible) {
  display: none !important;
}

#table-view-container.flat-visible {
  display: block;
}

/* Grouped / Flat list toggle (extreme left of toolbar) */
.view-toggle {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-hairline);
  border-radius: 9999px;
  padding: 2px;
}

.view-toggle-btn {
  border: none;
  background: transparent;
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-secondary);
  border-radius: 9999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.view-toggle-btn:hover {
  color: var(--ink-primary);
}

.view-toggle-btn.active {
  background: #14171D;
  color: #FAF8F5;
  box-shadow: var(--shadow-sm);
}

.view-toggle-btn .view-nav-counter {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 9999px;
  margin-left: 4px;
  background: rgba(20, 23, 29, 0.1);
  color: #14171D;
  display: inline-block;
  line-height: 1.3;
}

.view-toggle-btn.active .view-nav-counter {
  background: rgba(255, 255, 255, 0.28);
  color: #FFFFFF;
}

/* Flat boardroom table follows the same fit engine (no forced min width) */
.boardroom-table {
  min-width: 0;
}

.boardroom-table td {
  font-size: 13px;
}

/* --- Search at far right of toolbar --- */
.universal-search-right {
  margin-left: auto;
  order: 99;
}

/* --- Column alignment: same fixed layout for sticky header + group tables --- */
.stream-header-table,
.group-boardroom-table {
  table-layout: fixed !important;
  width: 100% !important;
  border-collapse: collapse !important;
}

/* --- Persistent add/edit mark (survives re-renders until next change) --- */
@keyframes taskMarkedPulse {
  0% { filter: brightness(1.12); }
  100% { filter: brightness(1); }
}
tr.task-marked-new td {
  background: #ECFDF5 !important;
}
tr.task-marked-edit td {
  background: #EFF6FF !important;
}
tr.task-marked-new,
tr.task-marked-edit {
  animation: taskMarkedPulse 0.9s ease 3;
}

/* --- Group header: prefix plain grey (non-editable), project bold (editable) --- */
.group-cust-prefix {
  color: #9AA0AC !important;
  font-weight: 500 !important;
  cursor: default !important;
}
.group-project-title-editable {
  font-weight: 800 !important;
  cursor: default !important;
}
/* Left-tree rename editor input (mirrors row-title-edit-input) */
.tree-rename-input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-weight: 600;
  font-size: 12px;
  color: var(--ink-primary);
  background: #FFFFFF;
  border: 1px solid #14171D;
  border-radius: 4px;
  padding: 1px 5px;
  outline: none;
  width: 100%;
}

/* --- Dossier header: compact, ID tiny greyed --- */
.dossier-header-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
#dossier-header-task-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  max-width: 220px;
  vertical-align: bottom;
}
#dossier-task-id {
  font-size: 9px !important;
  color: #B6BCC7 !important;
  font-weight: 500 !important;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

/* --- Domain mini icon before task names (same glyphs as left pane) --- */
.domain-mini-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  margin-right: 7px;
  vertical-align: -3px;
  cursor: pointer;
  flex-shrink: 0;
}
.domain-mini-icon.domain-business {
  color: #2563EB;
  background: #EAF0FE;
  border: 1px solid #C7D8F8;
}
.domain-mini-icon.domain-personal {
  color: #7C3AED;
  background: #F3EAFD;
  border: 1px solid #DCCBFA;
}
/* --- View switcher dropdown in dark header --- */
.view-switcher-select {
  background: #1E293B;
  color: #F8FAFC;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 8px;
  cursor: pointer;
  outline: none;
}
.view-switcher-select option {
  background: #FFFFFF;
  color: #14171D;
}

/* --- Title cell: icon inline with name, tight to checkbox --- */
.group-boardroom-table td.task-title-cell,
.stream-header-table td.task-title-cell {
  min-width: 0 !important;
}
td.task-title-cell {
  min-width: 0;
  max-width: 280px;
  padding-left: 4px !important;
}
/* Inner flex wrapper keeps the td a real table-cell so fixed-layout
   columns stay aligned between sticky header and group tables */
.title-cell-flex {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  width: 100%;
  overflow: hidden;
}
td.task-title-cell .domain-mini-icon {
  margin-right: 0;
}
td.task-title-cell .cell-ellipsis {
  flex: 1;
  min-width: 0;
}

/* --- ghost-thead-widths: per-group thead stays in layout (zero-height ghost) so
   body columns honor the same fixed widths as the sticky header --- */
.group-boardroom-table thead.group-thead-hidden {
  display: table-header-group !important;
  visibility: hidden !important;
  height: 0 !important;
  max-height: 0 !important;
  border: none !important;
}
.group-boardroom-table thead.group-thead-hidden th {
  font-size: 0 !important;
  line-height: 0 !important;
  height: 0 !important;
  max-height: 0 !important;
  padding: 0 6px !important;
  border: none !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

/* --- row-polish-v3: arrow cursor, ellipsis-after-only, equal row heights --- */
.row-task-title-text {
  cursor: default !important;
  direction: ltr;
  unicode-bidi: normal;
}
.group-boardroom-table tbody tr,
.boardroom-table tbody tr {
  height: 45px;
}
.group-boardroom-table tbody tr td,
.boardroom-table tbody tr td {
  height: 45px;
  vertical-align: middle;
}
td.task-title-cell .cell-ellipsis,
td.task-title-cell .row-task-title-text {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.row-title-edit-input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-weight: 600;
  color: var(--ink-primary);
  background: #FFFFFF;
  border: 1px solid var(--accent-brass);
  border-radius: 4px;
  padding: 1px 5px;
  outline: none;
  width: 100%;
}

/* --- Dossier pin + auto-close/hover-preview pack (2026-09-08) --- */
.dossier-pin-top {
  flex-shrink: 0;
  align-self: flex-start;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  color: #B6BCC7;
  border-radius: 6px;
  padding: 0;
  margin: -4px -6px 0 0;
  transition: color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}
.dossier-pin-top #icon-pin-right {
  transform: rotate(28deg);
  display: block;
}
.dossier-pin-top:hover {
  color: #14171D;
  background: rgba(20, 23, 29, 0.06);
}
.dossier-pin-top.pinned {
  color: #14171D;
}
.dossier-pin-top.pinned #icon-pin-right {
  fill: currentColor;
}

/* Left pane smooth hover preview: overlay expansion without layout jump */
.left-pane-wrapper,
.right-pane-wrapper {
  transition: width 0.28s cubic-bezier(0.16, 1, 0.3, 1), min-width 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s ease;
}
.left-pane-wrapper.collapsed.hover-preview {
  width: 270px !important;
  min-width: 270px !important;
  max-width: 270px !important;
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 120;
  box-shadow: 12px 0 32px rgba(20, 23, 29, 0.14);
  cursor: default;
}
.left-pane-wrapper.collapsed.hover-preview .left-pane-inner {
  display: flex !important;
}
.left-pane-wrapper.collapsed.hover-preview .collapsed-rail {
  display: none !important;
}
.left-pane-wrapper.collapsed.hover-preview .pane-resizer {
  display: none !important;
}

/* Customer cell: flexible select + tiny trailing attachment glyph */
.customer-cell-flex {
  display: flex;
  align-items: center;
  gap: 6px;
}

.customer-cell-flex .quick-inline-select {
  flex: 1;
  min-width: 0;
}

.attach-mini {
  margin-left: auto;
  display: inline-block;
  min-width: 15px;
  text-align: right;
  font-size: 11px;
  line-height: 1;
  opacity: 0.75;
  flex-shrink: 0;
  cursor: default;
}

/* --- Thin elegant scrollbars (single bottom bar, only when overflowing) --- */
.stream-viewport-container,
.tree-scroll-container,
.dossier-scroll-content,
.group-table-wrap {
  scrollbar-width: thin;
  scrollbar-color: #D4CABE transparent;
}
.stream-viewport-container::-webkit-scrollbar,
.tree-scroll-container::-webkit-scrollbar,
.dossier-scroll-content::-webkit-scrollbar,
.group-table-wrap::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}
.stream-viewport-container::-webkit-scrollbar-track,
.tree-scroll-container::-webkit-scrollbar-track,
.dossier-scroll-content::-webkit-scrollbar-track,
.group-table-wrap::-webkit-scrollbar-track {
  background: transparent;
}
.stream-viewport-container::-webkit-scrollbar-thumb,
.tree-scroll-container::-webkit-scrollbar-thumb,
.dossier-scroll-content::-webkit-scrollbar-thumb,
.group-table-wrap::-webkit-scrollbar-thumb {
  background: #D4CABE;
  border-radius: 8px;
}
.stream-viewport-container::-webkit-scrollbar-thumb:hover,
.tree-scroll-container::-webkit-scrollbar-thumb:hover,
.dossier-scroll-content::-webkit-scrollbar-thumb:hover,
.group-table-wrap::-webkit-scrollbar-thumb:hover {
  background: #8C734B;
}

/* --- stream-col-classes: rebuilt table cell polish --- */
.group-boardroom-table td.c-check,
.boardroom-table td.c-check {
  text-align: center;
  padding-left: 2px !important;
  padding-right: 2px !important;
}
.group-boardroom-table td.c-id,
.boardroom-table td.c-id {
  font-family: var(--font-mono);
  color: var(--ink-muted);
}
td.task-title-cell {
  font-weight: 600;
}

/* --- Tasks board (left-pane entry + smart sections view) --- */
.tasks-board-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: calc(100% - 16px);
  margin: 8px 8px 4px 8px;
  padding: 8px 12px;
  border: 1px solid var(--accent-border, #D8EFE6);
  border-radius: 8px;
  background: var(--accent-soft, #EFFAF4);
  color: var(--ink, #1F2937);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}
.tasks-board-btn:hover {
  border-color: var(--accent, #059669);
}
.tasks-board-btn.active {
  background: var(--accent, #059669);
  border-color: var(--accent, #059669);
  color: #fff;
}
.tasks-board-btn.active .tasks-board-count {
  background: rgba(255,255,255,.25);
  color: #fff;
}
.tasks-board-star {
  font-size: 14px;
  line-height: 1;
}
.tasks-board-count {
  margin-left: auto;
  min-width: 22px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  background: var(--bg-subtle, #F1F5F9);
  color: var(--ink-muted, #64748B);
}
.section-title {
  font-weight: 700;
  font-size: 13px;
}
.docket-group-header.section-head {
  border-left-color: var(--accent, #059669);
  background: var(--accent-soft, #EFFAF4);
}
.group-count-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 10px;
  background: var(--bg-subtle, #F1F5F9);
  color: var(--ink-muted, #64748B);
}
/* Small + in project headers: create prefilled for that section. */
.group-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(214, 208, 194, 0.85);
  background: #FFFFFF;
  color: #059669;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(44, 38, 28, 0.04);
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}
.group-add-btn:hover {
  background: #059669;
  border-color: #059669;
  color: #FFFFFF;
  transform: scale(1.08);
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25);
}
.group-add-btn svg {
  display: block;
  stroke: currentColor;
}
/* Kind chip: notes read differently from tasks at a glance. */
.kind-chip {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 0 6px;
  margin-left: 6px;
  border-radius: 8px;
  background: #FEF3C7;
  color: #92400E;
  vertical-align: 1px;
  white-space: nowrap;
}
/* ==========================================================================
   INSTITUTIONAL NOTES & REFERENCE VAULT
   ========================================================================== */
  .notes-vault-hero {
    background: var(--bg-surface);
    border: 1px solid var(--border-hairline);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 12px 14px 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 16px -2px rgba(44, 38, 28, 0.05);
}

.notes-vault-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #854D0E;
  background: #FEF3C7;
  border: 1px solid #FDE68A;
  padding: 2px 8px;
  border-radius: 9999px;
  margin-bottom: 6px;
}

.notes-vault-heading {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.notes-vault-title {
  font-family: var(--font-serif, "Playfair Display", Georgia, serif);
  font-size: 19px;
  font-weight: 700;
  color: #0F172A;
  margin: 0;
  letter-spacing: -0.01em;
}

.notes-vault-count {
  font-size: 11.5px;
  font-weight: 700;
  color: #64748B;
  background: rgba(0, 0, 0, 0.05);
  padding: 2px 8px;
  border-radius: 9999px;
}

.notes-vault-desc {
  font-size: 12px;
  color: #64748B;
  margin: 4px 0 0 0;
  line-height: 1.4;
}

.notes-hero-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #0F172A;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid #0F172A;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);
  white-space: nowrap;
}

.notes-hero-add-btn:hover {
  background: #1E293B;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.22);
}

.notes-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 14px 8px 14px;
  flex-wrap: wrap;
}

.notes-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 240px;
}

.notes-search-svg {
  position: absolute;
  left: 10px;
  color: #94A3B8;
  pointer-events: none;
}

.notes-search-field {
  width: 100%;
  height: 32px;
  padding: 0 28px 0 30px;
  font-size: 12px;
  font-family: var(--font-sans);
  border-radius: 8px;
  border: 1px solid rgba(214, 208, 194, 0.9);
  background: #FFFFFF;
  color: #1E293B;
  outline: none;
  transition: all 0.15s ease;
}

.notes-search-field:focus {
  border-color: #3B82F6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.notes-search-clear-btn {
  position: absolute;
  right: 8px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  background: #E2E8F0;
  color: #64748B;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.notes-category-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.notes-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 9999px;
  border: 1px solid rgba(226, 221, 209, 0.95);
  background: #FFFFFF;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.notes-chip:hover {
  background: #F8FAFC;
  border-color: #CBD5E1;
  color: #1E293B;
}

.notes-chip.active {
  background: #0F172A;
  border-color: #0F172A;
  color: #FFFFFF;
}

.notes-chip-count {
  font-size: 10.5px;
  opacity: 0.75;
}

.notes-group-section {
  margin: 10px 14px 16px 14px;
}

.notes-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 4px 8px 4px;
  border-bottom: 1px solid rgba(226, 221, 209, 0.7);
  margin-bottom: 8px;
  cursor: pointer;
  user-select: none;
}

.notes-group-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.notes-collapse-btn {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #64748B;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.notes-collapse-btn.collapsed svg {
  transform: rotate(-90deg);
}

.notes-group-title {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.notes-group-badge {
  font-size: 11px;
  font-weight: 700;
  color: #64748B;
  background: #F1F5F9;
  padding: 1px 7px;
  border-radius: 9999px;
  border: 1px solid #E2E8F0;
}

.notes-cards-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.notes-cards-stack.collapsed {
  display: none;
}

/* Individual Institutional Note Card */
.note-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 52px;
  padding: 10px 16px;
  border-radius: 10px;
  background: #FFFFFF;
  border: 1px solid rgba(226, 221, 209, 0.95);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  width: 100%;
}

.note-card:hover {
  border-color: #94A3B8;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}

.note-card.active-inspected {
  border-color: #3B82F6 !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2) !important;
}

.note-card.task-marked-new {
  background: #F0FDF4 !important;
  border-color: #10B981 !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25) !important;
  animation: taskMarkedPulse 0.9s ease 3;
}

.note-card.task-marked-edit {
  background: #EFF6FF !important;
  border-color: #3B82F6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25) !important;
  animation: taskMarkedPulse 0.9s ease 3;
}

.note-card-main {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.note-card-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.note-card-kind-tag {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
  background: #F1F5F9;
  color: #475569;
  border: 1px solid #E2E8F0;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.note-card-kind-tag.kind-idea {
  background: #FEF3C7;
  color: #92400E;
  border-color: #FDE68A;
}

.note-card-kind-tag.kind-meeting {
  background: #EEF2FF;
  color: #4338CA;
  border-color: #C7D2FE;
}

.note-card-kind-tag.kind-password {
  background: #FEF2F2;
  color: #991B1B;
  border-color: #FECACA;
}

.note-card-kind-tag.kind-api {
  background: #F0FDF4;
  color: #166534;
  border-color: #BBF7D0;
}

.note-card-kind-tag.kind-reference {
  background: #F3E8FF;
  color: #6B21A8;
  border-color: #E9D5FF;
}

.note-card-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #0F172A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.note-card-title:hover {
  text-decoration: underline;
}

.note-card-snippet {
  font-size: 12px;
  color: #64748B;
  margin-top: 3px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.note-card-meta-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.note-card-date {
  font-size: 11px;
  font-weight: 600;
  color: #94A3B8;
  white-space: nowrap;
}

.note-kind-select {
  font-size: 11.5px;
  font-weight: 600;
  color: #334155;
  background: #F8FAFC;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  padding: 3px 8px;
  cursor: pointer;
  outline: none;
}

.note-kind-select:focus {
  border-color: #3B82F6;
}

.note-btn-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid #E2E8F0;
  background: #FFFFFF;
  color: #2563EB;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.note-btn-action:hover {
  background: #EFF6FF;
  border-color: #BFDBFE;
}

.note-btn-action.delete {
  width: 26px;
  height: 26px;
  padding: 0;
  justify-content: center;
  border-color: transparent;
  background: transparent;
  color: #94A3B8;
}

.note-btn-action.delete:hover {
  background: #FEF2F2;
  color: #EF4444;
  border-color: #FECACA;
}

.notes-empty-state {
  text-align: center;
  padding: 60px 20px;
  background: #FFFFFF;
  border: 1px dashed rgba(214, 208, 194, 0.9);
  border-radius: 12px;
  margin: 20px 14px;
}

.notes-empty-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.notes-empty-title {
  font-size: 15px;
  font-weight: 700;
  color: #1E293B;
  margin-bottom: 4px;
}

.notes-empty-subtitle {
  font-size: 12.5px;
  color: #64748B;
  max-width: 420px;
  margin: 0 auto;
  line-height: 1.5;
}

.notes-reset-filter-btn {
  margin-top: 12px;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid #CBD5E1;
  background: #F8FAFC;
  color: #334155;
  cursor: pointer;
}

.notes-reset-filter-btn:hover {
  background: #F1F5F9;
  color: #0F172A;
}

/* ==========================================================================
   FLOATING HEADER RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 1280px) {
  .master-header {
    padding: 0 10px;
    top: 6px;
  }
  .master-header .header-inner-pill {
    padding: 6px 14px;
    gap: 10px;
  }
  .master-command-pill {
    max-width: 380px;
  }
}

@media (max-width: 1024px) {
  .header-status-pills .pill-active-style,
  .header-status-pills .pill-upcoming-style {
    display: none;
  }
  .header-ticker-row {
    display: none;
  }
  .master-command-pill {
    max-width: 280px;
  }
}

@media (max-width: 768px) {
  .master-header {
    padding: 0 6px;
    top: 4px;
  }
  .master-header .header-inner-pill {
    border-radius: 16px;
    flex-wrap: wrap;
    padding: 8px 12px;
  }
  .master-command-pill {
    order: 3;
    max-width: 100%;
    margin-top: 4px;
  }
}

/* ==========================================================================
   DIRECT DROPDOWN POPOVER FOR BOTTOM BATCH BAR (NO MODAL POPUP WINDOW)
   ========================================================================== */
.batch-direct-popover {
  display: flex;
  flex-direction: column;
  position: fixed;
  z-index: 550;
  width: 240px;
  max-height: 280px;
  background: #FFFFFF;
  border: 1px solid rgba(203, 196, 180, 0.95);
  border-radius: 12px;
  box-shadow: 0 16px 36px -4px rgba(44, 38, 28, 0.22), 0 4px 12px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  animation: batchPopIn 0.16s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes batchPopIn {
  0% { opacity: 0; transform: translateY(8px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.batch-popover-header {
  padding: 8px 12px;
  background: #FAF8F5;
  border-bottom: 1px solid var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.batch-popover-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-secondary);
}

.batch-popover-close {
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--ink-muted);
  font-size: 12px;
  padding: 2px 4px;
  border-radius: 4px;
}
.batch-popover-close:hover {
  background: rgba(0,0,0,0.05);
  color: var(--ink-primary);
}

.batch-popover-list {
  overflow-y: auto;
  max-height: 180px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.batch-popover-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-primary);
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease;
}

.batch-popover-item:hover {
  background: #F4EFEA;
  color: #14171D;
}

.batch-popover-item.none-item {
  color: var(--ink-muted);
  border-bottom: 1px dashed var(--border-hairline);
  border-radius: 6px 6px 0 0;
  margin-bottom: 2px;
}

.batch-popover-item-icon {
  font-size: 12px;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

.batch-popover-item-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.batch-popover-footer {
  padding: 6px 8px;
  background: #FAF8F5;
  border-top: 1px solid var(--border-hairline);
  display: flex;
  align-items: center;
  gap: 6px;
}

.batch-popover-input {
  flex: 1;
  border: 1px solid var(--border-hairline);
  background: #FFFFFF;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11.5px;
  outline: none;
}

.batch-popover-input:focus {
  border-color: var(--accent-brass);
}

.batch-popover-add-btn {
  border: none;
  background: #14171D;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.batch-popover-add-btn:hover {
  background: #2D333F;
}

/* --- Indeterminate Partial Selection for Master Checkbox --- */
.row-checkbox:indeterminate,
#master-select-all-checkbox:indeterminate {
  accent-color: #8C734B !important;
}

.select-all-checkbox-label.has-partial-selection {
  color: #8C734B;
  font-weight: 600;
}

.select-all-checkbox-label.has-selection {
  color: #14171D;
  font-weight: 600;
}

/* ==========================================================================
   INTERACTIVE EXECUTIVE PROJECT PICKER WITH PERSONAL HOVER SUB-COLUMN
   ========================================================================== */
.quick-inline-project-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 2px 6px;
  font-size: 12px;
  color: var(--ink-primary);
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  text-align: left;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.quick-inline-project-btn:hover {
  background: rgba(243, 239, 234, 0.9);
  border-color: var(--border-hairline);
  color: var(--ink-primary);
}

.quick-inline-project-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100px;
}

.project-picker-popover,
.project-picker-subcol {
  position: fixed;
    background: var(--bg-surface);
    border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px -5px rgba(20, 23, 29, 0.16), 0 0 0 1px rgba(0, 0, 0, 0.04);
  padding: 6px;
  min-width: 200px;
  max-width: 270px;
  max-height: 380px;
  overflow-y: auto;
  z-index: 10000;
  font-family: var(--font-sans);
  animation: popoverFadeIn 0.12s ease-out;
}

.project-picker-subcol {
  z-index: 10005;
  box-shadow: 0 14px 34px -4px rgba(20, 23, 29, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

@keyframes popoverFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.project-picker-popover .pop-section-label,
.project-picker-subcol .pop-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  padding: 4px 8px 2px;
}

.project-picker-popover .pop-divider,
.project-picker-subcol .pop-divider {
  height: 1px;
  background: var(--border-hairline);
  margin: 4px 0;
}

.project-picker-popover .pop-item,
.project-picker-subcol .pop-item {
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-primary);
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.1s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-picker-popover .pop-item:hover,
.project-picker-subcol .pop-item:hover {
  background: var(--bg-subtle);
  color: var(--ink-primary);
}

.project-picker-popover .pop-item.active,
.project-picker-subcol .pop-item.active {
  background: var(--accent-brass-soft);
  color: var(--accent-brass);
  font-weight: 600;
}

.project-picker-popover .pop-item-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.project-picker-popover .flyout-arrow {
  font-size: 11px;
  color: var(--ink-muted);
  margin-left: 8px;
}

.project-picker-popover .pop-item-has-flyout.flyout-active {
  background: var(--bg-subtle);
  color: var(--ink-primary);
}


