:root {
  /* Default to Dark Notion Theme matching the user's screenshots */
  --bg-app: #191919;
  --bg-sidebar: #202020;
  --bg-surface: #232323;
  --bg-elevated: #2c2c2c;
  --bg-hover: rgba(255, 255, 255, 0.06);
  --bg-active: rgba(255, 255, 255, 0.09);
  --bg-editor: #191919;
  --bg-callout: #232323;
  --border: rgba(255, 255, 255, 0.1);
  --border-subtle: rgba(255, 255, 255, 0.06);
  --text-primary: rgba(255, 255, 255, 0.92);
  --text-secondary: #9b9a97;
  --text-muted: #6e6e6e;
  --accent: #2383e2;
  --accent-hover: #3b9eff;
  --accent-soft: rgba(35, 131, 226, 0.18);
  --shadow-float: rgba(0, 0, 0, 0.4) 0px 0px 0px 1px, rgba(0, 0, 0, 0.5) 0px 8px 24px, rgba(0, 0, 0, 0.6) 0px 20px 48px;
  --shadow-card: rgba(255, 255, 255, 0.08) 0px 0px 0px 1px, rgba(0, 0, 0, 0.35) 0px 4px 12px;

  /* Modern Spring Curves */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-snappy: cubic-bezier(0.4, 0, 0.2, 1);

  /* 5 Status Pill Colors */
  --st-not-started-bg: rgba(155, 154, 151, 0.22);
  --st-not-started-fg: #d4d4d4;
  --st-not-started-dot: #9b9a97;

  --st-in-progress-bg: rgba(35, 131, 226, 0.25);
  --st-in-progress-fg: #7cc4fa;
  --st-in-progress-dot: #3b9eff;

  --st-on-hold-bg: rgba(203, 145, 47, 0.25);
  --st-on-hold-fg: #f6c050;
  --st-on-hold-dot: #f59e0b;

  --st-done-bg: rgba(68, 131, 97, 0.28);
  --st-done-fg: #6dd39c;
  --st-done-dot: #448361;

  --st-canceled-bg: rgba(212, 76, 71, 0.26);
  --st-canceled-fg: #ff948f;
  --st-canceled-dot: #e0524c;

  /* Exact Notion Warm Amber Highlight */
  --cmt-bg: rgba(255, 199, 0, 0.10);
  --cmt-bg-active: rgba(255, 199, 0, 0.20);
  --cmt-border: rgba(255, 199, 0, 0.50);

  /* Minimal Scrollbar Tokens */
  --scrollbar-thumb: rgba(255, 255, 255, 0.14);
  --scrollbar-thumb-hover: rgba(255, 255, 255, 0.28);
  --scrollbar-thumb-active: rgba(255, 255, 255, 0.42);
  color-scheme: dark;
}

body.light-theme {
  --bg-app: #ffffff;
  --bg-sidebar: #f7f7f5;
  --bg-surface: #ffffff;
  --bg-elevated: #f1f1ef;
  --bg-hover: rgba(55, 53, 47, 0.06);
  --bg-active: rgba(55, 53, 47, 0.09);
  --bg-editor: #ffffff;
  --bg-callout: #f1f1ef;
  --border: rgba(55, 53, 47, 0.12);
  --border-subtle: rgba(55, 53, 47, 0.08);
  --text-primary: #37352f;
  --text-secondary: #787774;
  --text-muted: #9b9a97;
  --shadow-float: rgba(15, 15, 15, 0.06) 0px 0px 0px 1px, rgba(15, 15, 15, 0.12) 0px 5px 14px, rgba(15, 15, 15, 0.2) 0px 15px 36px;
  --shadow-card: rgba(15, 15, 15, 0.08) 0px 0px 0px 1px, rgba(15, 15, 15, 0.05) 0px 2px 6px;

  --st-not-started-bg: #e3e2e0;
  --st-not-started-fg: #32302c;
  --st-not-started-dot: #91918e;

  --st-in-progress-bg: #d3e5ef;
  --st-in-progress-fg: #183347;
  --st-in-progress-dot: #2383e2;

  --st-on-hold-bg: #fdecc8;
  --st-on-hold-fg: #402c1b;
  --st-on-hold-dot: #cb912f;

  --st-done-bg: #dbeddb;
  --st-done-fg: #1c3829;
  --st-done-dot: #448361;

  --st-canceled-bg: #ffe2dd;
  --st-canceled-fg: #5d1715;
  --st-canceled-dot: #d44c47;

  --cmt-bg: rgba(255, 212, 0, 0.15);
  --cmt-bg-active: rgba(255, 212, 0, 0.28);
  --cmt-border: rgba(229, 184, 0, 0.65);

  --scrollbar-thumb: rgba(55, 53, 47, 0.16);
  --scrollbar-thumb-hover: rgba(55, 53, 47, 0.30);
  --scrollbar-thumb-active: rgba(55, 53, 47, 0.44);
  color-scheme: light;
}

/* ==================== KEYFRAME ANIMATIONS ==================== */
@keyframes pageFadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cardStaggerIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

@keyframes drawerSlideLeft {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes modalBackdropFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes modalDialogPop {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes commentCardAppear {
  from {
    opacity: 0;
    transform: translateX(12px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes highlightPulseDesign {
  0%   { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.55); }
  70%  { box-shadow: 0 0 0 6px rgba(168, 85, 247, 0); }
  100% { box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.22); }
}

@keyframes highlightPulseEdit {
  0%   { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.55); }
  70%  { box-shadow: 0 0 0 6px rgba(56, 189, 248, 0); }
  100% { box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.22); }
}

@keyframes highlightPulseGeneral {
  0%   { box-shadow: 0 0 0 0 rgba(255, 199, 0, 0.55); }
  70%  { box-shadow: 0 0 0 6px rgba(255, 199, 0, 0); }
  100% { box-shadow: 0 0 0 2px rgba(255, 199, 0, 0.22); }
}

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

/* ==================== MINIMAL NOTION / MACOS-STYLE SCROLLBARS ==================== */
*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-corner {
  background: transparent;
}

*::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

*::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

*::-webkit-scrollbar-thumb:active {
  background: var(--scrollbar-thumb-active);
}

@-moz-document url-prefix() {
  * {
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) transparent;
  }
}

body {
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--bg-app);
  color: var(--text-primary);
  height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  transition: background-color 0.25s var(--ease-snappy), color 0.25s var(--ease-snappy);
}

button, input, select, textarea {
  font-family: inherit;
  color: inherit;
}

.hidden {
  display: none !important;
}

/* ==================== BUTTONS WITH TACTILE MICRO-INTERACTIONS ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.16s var(--ease-snappy), color 0.16s var(--ease-snappy), transform 0.12s var(--ease-out-expo), box-shadow 0.16s var(--ease-snappy);
  background: transparent;
}

.btn:active {
  transform: scale(0.96);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(35, 131, 226, 0.32);
}
.btn-primary:active {
  transform: translateY(0) scale(0.97);
}

.btn-secondary {
  background: var(--bg-surface);
  border-color: var(--border);
  color: var(--text-primary);
}
.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: rgba(255, 255, 255, 0.18);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.btn-danger {
  color: #ff7b74;
}
.btn-danger:hover {
  background: rgba(212, 76, 71, 0.14);
}

.btn-full {
  width: 100%;
  padding: 8px 12px;
}

/* ==================== AUTH OVERLAY ==================== */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 20, 0.82);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 24px;
  animation: modalBackdropFade 0.2s var(--ease-out-expo);
}

.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 28px;
  box-shadow: var(--shadow-float);
  animation: modalDialogPop 0.28s var(--ease-out-expo);
}

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  margin-bottom: 20px;
}

.auth-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--text-primary);
  color: var(--bg-app);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 20px;
}

.auth-brand h1 {
  font-size: 20px;
  font-weight: 700;
}

.auth-subtitle {
  color: var(--text-secondary);
  font-size: 13px;
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.45;
}

.auth-tabs {
  display: flex;
  background: var(--bg-elevated);
  padding: 3px;
  border-radius: 6px;
  margin-bottom: 16px;
}

.auth-tab {
  flex: 1;
  padding: 6px 10px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 500;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.16s var(--ease-snappy), color 0.16s var(--ease-snappy);
}

.auth-tab.active {
  background: var(--bg-surface);
  color: var(--text-primary);
}

.form-group {
  margin-bottom: 12px;
}

.form-group label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.input-field {
  width: 100%;
  padding: 7px 10px;
  background: var(--bg-app);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13.5px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.16s var(--ease-snappy), box-shadow 0.16s var(--ease-snappy);
}

.input-field:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.btn-google {
  width: 100%;
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.15s, transform 0.12s;
}
.btn-google:hover {
  background: var(--bg-hover);
  transform: translateY(-1px);
}

.quick-demo-users {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}
.quick-demo-users p {
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.demo-user-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.demo-pill {
  font-size: 11.5px;
  padding: 4px 8px;
  border-radius: 5px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s var(--ease-out-expo);
}
.demo-pill:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
}

/* ==================== WORKSPACE SHELL & LEFT SIDEBAR ==================== */
.app-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  height: 100vh;
  width: 100vw;
  transition: grid-template-columns 0.24s var(--ease-out-expo);
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 0px 1fr;
}

.sidebar {
  position: relative;
  z-index: 200;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 240px;
  min-width: 0;
  overflow: visible;
  user-select: none;
  transition: background-color 0.25s var(--ease-snappy), transform 0.24s var(--ease-out-expo), opacity 0.18s var(--ease-snappy), border-color 0.2s var(--ease-snappy);
}

.app-shell.sidebar-collapsed .sidebar {
  overflow: hidden;
  transform: translateX(-240px);
  opacity: 0;
  pointer-events: none;
  border-right-color: transparent;
}

.notion-workspace-switcher {
  padding: 10px 10px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.sidebar-toggle-btn,
.sidebar-open-btn {
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: background 0.14s var(--ease-snappy), color 0.14s var(--ease-snappy), transform 0.12s var(--ease-out-expo);
}

.sidebar-toggle-btn:hover,
.sidebar-open-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.sidebar-open-btn {
  display: none;
  margin-right: 2px;
}

.app-shell.sidebar-collapsed .sidebar-open-btn {
  display: inline-flex;
}

.ws-user-menu-wrapper {
  position: relative;
  flex: 1;
  min-width: 0;
}

.ws-user-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 7px;
  border-radius: 6px;
  border: none;
  background: transparent;
  cursor: pointer;
  min-width: 0;
  text-align: left;
  transition: background 0.14s var(--ease-snappy);
}
.ws-user-row:hover,
.ws-user-row.active {
  background: var(--bg-hover);
}

.ws-user-name-wrap {
  min-width: 0;
  flex: 1;
}

.ws-user-caret {
  font-size: 10px;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.18s var(--ease-out-expo);
}
.ws-user-row.active .ws-user-caret {
  transform: rotate(180deg);
}

.avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.avatar.avatar-lg {
  width: 30px;
  height: 30px;
  font-size: 11.5px;
}

.user-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Notion-style Account Dropdown Menu */
.user-account-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 248px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 9px;
  box-shadow: var(--shadow-float);
  padding: 6px;
  z-index: 1200;
  transform-origin: top left;
  animation: popScaleIn 0.18s var(--ease-out-expo);
}

.user-dropdown-header {
  padding: 6px 8px 8px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 4px;
}

.user-dropdown-email {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 7px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-dropdown-active-card {
  display: flex;
  align-items: center;
  gap: 9px;
}

.user-dropdown-active-info {
  min-width: 0;
  flex: 1;
}

.user-dropdown-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-dropdown-role {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-dropdown-check {
  font-size: 12px;
  color: var(--accent);
  font-weight: 700;
}

.user-dropdown-section {
  padding: 2px 0;
}

.user-dropdown-section-label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 4px 8px 3px;
}

.user-dropdown-accounts-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-dropdown-account-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  transition: background 0.12s var(--ease-snappy);
}
.user-dropdown-account-btn:hover {
  background: var(--bg-hover);
}

.user-dropdown-account-meta {
  min-width: 0;
  flex: 1;
}

.user-dropdown-account-name {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-dropdown-account-sub {
  font-size: 10.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-dropdown-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 4px 2px;
}

.user-dropdown-actions {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-dropdown-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s var(--ease-snappy), color 0.12s var(--ease-snappy);
}
.user-dropdown-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.user-dropdown-item.danger:hover {
  background: rgba(212, 76, 71, 0.14);
  color: #ff7b74;
}

.user-dropdown-item-icon {
  width: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.auth-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 6px;
  font-size: 13px;
}

.sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 4px 8px 16px;
}

.sidebar-footer {
  padding: 8px;
  border-top: 1px solid var(--border-subtle);
}

.avatar.avatar-xl {
  width: 48px;
  height: 48px;
  font-size: 16px;
}

/* ==================== SETTINGS & PREFERENCES PAGE ==================== */
.settings-view {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  animation: fadeSlideUp 0.24s var(--ease-out-expo);
}

.settings-page-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 36px 40px 64px;
}

.settings-page-container {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.settings-page-header {
  margin-bottom: 6px;
}

.settings-page-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.settings-page-icon {
  font-size: 28px;
  line-height: 1;
}

.settings-page-title-row h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.settings-page-title-row p {
  font-size: 13px;
  color: var(--text-secondary);
}

.settings-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 22px;
}

.settings-card-header {
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.settings-card-header h3 {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.settings-card-header p {
  font-size: 12.5px;
  color: var(--text-secondary);
}

.settings-account-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.settings-account-meta {
  flex: 1;
  min-width: 180px;
}

.settings-account-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.settings-account-role {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.settings-account-email {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.settings-account-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-pref-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.settings-pref-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 0;
}

.settings-pref-row + .settings-pref-row {
  border-top: 1px solid var(--border-subtle);
  padding-top: 14px;
}

.settings-pref-info {
  flex: 1;
}

.settings-pref-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.settings-pref-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.settings-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.nav-section {
  margin-bottom: 6px;
}

.sidebar-section-divider {
  height: 1px;
  background: var(--border);
  margin: 10px 6px 10px;
}

.nav-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 2px 6px;
}

.nav-section-title-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 6px;
  margin-left: -4px;
  border-radius: 5px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.14s var(--ease-snappy), color 0.14s var(--ease-snappy);
}
.nav-section-title-btn:hover,
.nav-section-title-btn.active {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.sidebar-collapse-all-btn {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.14s var(--ease-snappy), color 0.14s var(--ease-snappy), transform 0.12s var(--ease-out-expo);
}
.sidebar-collapse-all-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.sidebar-collapse-all-btn:active {
  transform: scale(0.92);
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  min-height: 28px;
  transition: background 0.14s var(--ease-snappy), color 0.14s var(--ease-snappy), transform 0.12s var(--ease-out-expo);
}
.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  transform: translateX(2px);
}
.nav-item.active {
  background: var(--bg-active);
  color: var(--text-primary);
  font-weight: 600;
}

.nav-item-left {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.nav-item-icon {
  width: 18px;
  text-align: center;
  font-size: 13.5px;
  flex-shrink: 0;
}

.nav-item-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-count {
  font-size: 11px;
  color: var(--text-muted);
}

.client-folder-chevron {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-size: 10px;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.2s var(--ease-out-expo), background 0.12s var(--ease-snappy), color 0.12s var(--ease-snappy);
}
.client-folder-chevron:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}
.client-folder-chevron.expanded {
  transform: rotate(90deg);
  color: var(--text-secondary);
}

.sidebar-client-pages-wrap {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.22s var(--ease-out-expo), opacity 0.18s var(--ease-snappy);
}
.sidebar-client-pages-wrap.expanded {
  grid-template-rows: 1fr;
  opacity: 1;
}

.sidebar-client-pages {
  overflow: hidden;
  margin-left: 34px;
  padding-left: 8px;
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.sidebar-client-pages-wrap.expanded .sidebar-client-pages {
  margin-top: 2px;
  margin-bottom: 5px;
}

.sidebar-subpage-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 5px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12.5px;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.14s var(--ease-snappy), color 0.14s var(--ease-snappy), transform 0.12s var(--ease-out-expo);
}
.sidebar-subpage-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  transform: translateX(2px);
}
.sidebar-subpage-item.active {
  background: var(--bg-active);
  color: var(--text-primary);
  font-weight: 600;
}

.client-dot, .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ==================== STATUS PILLS (5 STATUSES) ==================== */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  line-height: 18px;
  transition: transform 0.15s var(--ease-out-expo), filter 0.15s;
}

.status-pill.not_started { background: var(--st-not-started-bg); color: var(--st-not-started-fg); }
.status-pill.not_started .status-dot { background: var(--st-not-started-dot); }

.status-pill.in_progress { background: var(--st-in-progress-bg); color: var(--st-in-progress-fg); }
.status-pill.in_progress .status-dot { background: var(--st-in-progress-dot); }

.status-pill.on_hold { background: var(--st-on-hold-bg); color: var(--st-on-hold-fg); }
.status-pill.on_hold .status-dot { background: var(--st-on-hold-dot); }

.status-pill.done { background: var(--st-done-bg); color: var(--st-done-fg); }
.status-pill.done .status-dot { background: var(--st-done-dot); }

.status-pill.canceled { background: var(--st-canceled-bg); color: var(--st-canceled-fg); }
.status-pill.canceled .status-dot { background: var(--st-canceled-dot); }

/* ==================== MAIN STAGE & TOP BAR ==================== */
.main-stage {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: var(--bg-app);
}

.notion-topbar {
  height: 44px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  flex-shrink: 0;
}

.notion-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  min-width: 0;
}

.breadcrumb-link {
  padding: 3px 6px;
  border-radius: 4px;
  cursor: pointer;
  color: var(--text-primary);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.14s;
}
.breadcrumb-link:hover {
  background: var(--bg-hover);
}

.notion-topbar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.edited-timestamp {
  font-size: 12px;
  color: var(--text-muted);
  margin-right: 6px;
}

/* ==================== DASHBOARD DATABASE VIEW ==================== */
.dashboard-view {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  animation: pageFadeSlideIn 0.24s var(--ease-out-expo);
}

.notion-db-header {
  padding: 24px 48px 0;
  border-bottom: 1px solid var(--border);
}

.notion-db-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.notion-db-title-row h2 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.notion-db-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.notion-view-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
}

.notion-view-tab {
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  border: none;
  background: transparent;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s, border-color 0.15s;
}
.notion-view-tab.active {
  color: var(--text-primary);
  border-bottom-color: var(--text-primary);
  font-weight: 600;
}

.notion-db-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 6px;
}

.search-box {
  position: relative;
}
.search-box input {
  width: 200px;
  padding: 5px 10px 5px 28px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 13px;
  color: var(--text-primary);
  outline: none;
  transition: width 0.22s var(--ease-out-expo), background 0.16s, border-color 0.16s;
}
.search-box input:hover {
  background: var(--bg-elevated);
}
.search-box input:focus {
  width: 250px;
  background: var(--bg-elevated);
  border-color: var(--border);
}
.search-box-icon {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 12px;
}

.dashboard-body {
  flex: 1;
  overflow: auto;
  padding: 20px 48px 48px;
}

.sb-table {
  width: 100%;
  border-collapse: collapse;
  animation: pageFadeSlideIn 0.22s var(--ease-out-expo);
}
.sb-table th,
.sb-table td {
  padding: 9px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border-subtle);
  font-size: 13.5px;
  transition: background 0.12s;
}
.sb-table th:last-child,
.sb-table td:last-child {
  border-right: none;
}
.sb-table th {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}
.sb-table tr:hover td {
  background: var(--bg-hover);
  cursor: pointer;
}

.kanban-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(230px, 1fr));
  gap: 14px;
  align-items: start;
}
.kanban-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 260px;
  padding: 6px;
  margin: -6px;
  border-radius: 10px;
  border: 1.5px dashed transparent;
  animation: pageFadeSlideIn 0.25s var(--ease-out-expo);
  transition: background 0.16s var(--ease-snappy), border-color 0.16s var(--ease-snappy), box-shadow 0.16s var(--ease-snappy);
}
.kanban-col.drag-over {
  background: rgba(35, 131, 226, 0.08);
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(35, 131, 226, 0.18);
}
.kanban-col-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 2px;
}
.kanban-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 180px;
}
.sb-card {
  background: var(--bg-surface);
  border-radius: 8px;
  padding: 12px;
  cursor: grab;
  user-select: none;
  box-shadow: var(--shadow-card);
  animation: cardStaggerIn 0.26s var(--ease-out-expo) backwards;
  transition: transform 0.2s var(--ease-out-expo), background 0.16s var(--ease-snappy), box-shadow 0.2s var(--ease-out-expo), opacity 0.15s;
}
.sb-card:hover {
  background: var(--bg-elevated);
  transform: translateY(-3px);
  box-shadow: rgba(255, 255, 255, 0.12) 0px 0px 0px 1px, rgba(0, 0, 0, 0.45) 0px 10px 24px;
}
.sb-card:active {
  cursor: grabbing;
  transform: translateY(-1px) scale(0.99);
}
.sb-card.dragging {
  opacity: 0.42;
  transform: scale(0.97);
  cursor: grabbing;
  box-shadow: 0 0 0 1.5px var(--accent);
}
.sb-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.sb-card-num {
  font-size: 11.5px;
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  padding: 1px 5px;
  margin-left: -5px;
  border-radius: 5px;
  border: 1px solid transparent;
  cursor: text;
  transition: background 0.14s, color 0.14s, border-color 0.14s;
}
.sb-card-num:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.inline-card-num-editor {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--bg-app);
  border: 1px solid var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-primary);
}
.inline-card-num-editor span {
  color: var(--text-muted);
  user-select: none;
}
.inline-card-num-editor input {
  width: 48px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  outline: none;
  padding: 0;
}

.sb-card-client {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid transparent;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  max-width: 165px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: background 0.14s var(--ease-snappy), color 0.14s var(--ease-snappy), border-color 0.14s var(--ease-snappy), transform 0.12s var(--ease-out-expo);
}
.sb-card-client:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border);
  transform: translateY(-1px);
}
.sb-card-client:active {
  transform: translateY(0) scale(0.97);
}

.sb-card-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.sb-card-snippet {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.42;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
}

.sb-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}

.sb-card-comments {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
  color: var(--text-muted);
}
.sb-card-comments.has-comments {
  color: #f59e0b;
  font-weight: 600;
}

/* ==================== ALL CLIENT FOLDERS DIRECTORY GRID ==================== */
.clients-directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 16px;
  align-items: stretch;
}

.client-folder-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-card);
  animation: cardStaggerIn 0.24s var(--ease-out-expo) backwards;
  transition: transform 0.2s var(--ease-out-expo), background 0.16s var(--ease-snappy), border-color 0.16s var(--ease-snappy), box-shadow 0.2s var(--ease-out-expo);
}
.client-folder-card:hover {
  background: var(--bg-elevated);
  border-color: var(--border);
  transform: translateY(-3px);
  box-shadow: rgba(255, 255, 255, 0.12) 0px 0px 0px 1px, rgba(0, 0, 0, 0.45) 0px 10px 24px;
}

.client-folder-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.client-folder-card-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 0;
}

.client-folder-icon-badge {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.client-folder-count-badge {
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  white-space: nowrap;
}

.client-folder-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.client-folder-recent-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
  margin-top: auto;
}

.client-folder-recent-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-folder-add-card {
  border: 1px dashed var(--border);
  background: transparent;
  align-items: center;
  justify-content: center;
  min-height: 150px;
  color: var(--text-secondary);
  font-weight: 600;
}
.client-folder-add-card:hover {
  color: var(--text-primary);
  border-color: var(--accent);
}

/* ==================== UNIFIED NOTION SCRIPT + INLINE RIGHT MARGIN COMMENTS ==================== */
.editor-view {
  display: grid;
  grid-template-columns: 236px 1fr;
  height: 100%;
  overflow: hidden;
  position: relative;
  animation: pageFadeSlideIn 0.24s var(--ease-out-expo);
  transition: grid-template-columns 0.24s var(--ease-out-expo);
}

.editor-view.info-panel-collapsed {
  grid-template-columns: 0px 1fr;
}

.sb-info-sidebar {
  width: 236px;
  min-width: 0;
  height: 100%;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  user-select: none;
  z-index: 30;
  transition: transform 0.24s var(--ease-out-expo), opacity 0.18s var(--ease-snappy), border-color 0.2s var(--ease-snappy), background-color 0.25s var(--ease-snappy);
}

.editor-view.info-panel-collapsed .sb-info-sidebar {
  transform: translateX(-236px);
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  border-right-color: transparent;
}

.sb-info-header {
  height: 44px;
  padding: 0 12px 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.sb-info-header-left {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.sb-info-toggle-btn {
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.sb-info-toggle-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.info-panel-open-btn {
  display: none;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  margin-right: 2px;
}

.info-panel-open-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border);
}

.editor-view.info-panel-collapsed .info-panel-open-btn {
  display: inline-flex;
}

.sb-info-body {
  flex: 1;
  padding: 16px 14px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sb-info-prop-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sb-info-prop-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

.sb-info-prop-control {
  display: flex;
  align-items: center;
  min-height: 28px;
}

.editor-stage-col {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  overflow: hidden;
}

.document-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 44px 48px 220px;
  scroll-behavior: smooth;
}

.notion-canvas-stage {
  max-width: 1060px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 670px) 320px;
  gap: 44px;
  align-items: start;
  position: relative;
}

.notion-script-col {
  min-width: 0;
}

.editor-page-id-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.14s var(--ease-snappy), color 0.14s var(--ease-snappy), border-color 0.14s var(--ease-snappy), transform 0.12s var(--ease-out-expo);
}

.editor-page-id-badge:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border);
}

.editor-page-id-badge:active {
  transform: scale(0.96);
}

.editor-id-edit-group {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.editor-id-inline-box {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12.5px;
  font-weight: 600;
  cursor: text;
  transition: border-color 0.14s, box-shadow 0.14s, background 0.14s;
}
.editor-id-inline-box:hover {
  border-color: var(--border);
  background: var(--bg-hover);
}
.editor-id-inline-box:focus-within {
  border-color: var(--accent);
  background: var(--bg-app);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.editor-id-hash {
  color: var(--text-muted);
  user-select: none;
}

.editor-id-inline-input {
  width: 54px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  outline: none;
  padding: 0;
}

.editor-id-copy-btn {
  width: 25px;
  height: 25px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.14s, color 0.14s, border-color 0.14s;
}
.editor-id-copy-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border);
}

.breadcrumb-id-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.14s, color 0.14s, border-color 0.14s;
}
.breadcrumb-id-badge:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border);
}

.editor-title-input {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 38px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.18;
  letter-spacing: -0.02em;
  outline: none;
  margin-bottom: 18px;
  resize: none;
  overflow: hidden;
  display: block;
}
.editor-title-input::placeholder {
  color: var(--text-muted);
}

.notion-compact-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 28px;
  font-size: 14px;
  color: var(--text-secondary);
}

.notion-meta-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 26px;
}

.notion-meta-label {
  color: var(--text-primary);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 95px;
}

.notion-prop-select {
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  outline: none;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}
.notion-prop-select:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.notion-prop-select option {
  background: var(--bg-sidebar);
  color: var(--text-primary);
}

.status-pill-dropdown-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.status-pill-trigger {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  transition: transform 0.14s var(--ease-out-expo), filter 0.14s;
}
.status-pill-trigger:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}
.status-pill-trigger:active {
  transform: scale(0.96);
}

.status-pill-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 156px;
  background: #252525;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: popoverSpringIn 0.16s var(--ease-out-expo);
}
body.light-theme .status-pill-dropdown-menu {
  background: #ffffff;
  border-color: rgba(55, 53, 47, 0.14);
  box-shadow: 0 8px 24px rgba(15, 15, 15, 0.12);
}

.status-pill-option {
  width: 100%;
  border: none;
  background: transparent;
  padding: 5px 7px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s;
}
.status-pill-option:hover {
  background: rgba(255, 255, 255, 0.08);
}
body.light-theme .status-pill-option:hover {
  background: rgba(55, 53, 47, 0.06);
}

/* ==================== SCRIPT TYPOGRAPHY & ANIMATED INLINE HIGHLIGHTS ==================== */
.script-editor {
  outline: none;
  font-size: 15.5px;
  line-height: 1.72;
  color: var(--text-primary);
  min-height: 600px;
}

.script-editor h1 {
  font-size: 26px;
  font-weight: 700;
  margin: 28px 0 10px;
  line-height: 1.3;
}

.script-editor h2 {
  font-size: 18.5px;
  font-weight: 700;
  margin: 24px 0 10px;
  line-height: 1.35;
}

.script-editor h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 18px 0 8px;
}

.script-editor h4 {
  font-size: 14.5px;
  font-weight: 600;
  margin: 14px 0 6px;
  line-height: 1.4;
}

.script-editor p {
  margin: 0 0 16px;
}

.script-editor ul,
.script-editor ol {
  margin: 0 0 16px 24px;
}

.script-editor li {
  margin-bottom: 4px;
}

.script-editor blockquote {
  border-left: 3px solid var(--text-primary);
  padding: 2px 14px;
  margin: 14px 0;
}

.script-editor pre.script-code-block {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 12px 14px;
  margin: 14px 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-primary);
  overflow-x: auto;
  white-space: pre-wrap;
}

.script-editor details.toggle-heading {
  margin: 14px 0;
  border-radius: 6px;
}

.script-editor details.toggle-heading > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--text-primary);
  outline: none;
  padding: 2px 0;
}

.script-editor details.toggle-heading > summary::-webkit-details-marker {
  display: none;
}

.script-editor details.toggle-heading > summary::before {
  content: '▸';
  display: inline-block;
  font-size: 13px;
  color: var(--text-secondary);
  transition: transform 0.16s var(--ease-out-expo);
}

.script-editor details.toggle-heading[open] > summary::before {
  transform: rotate(90deg);
}

.script-editor details.toggle-heading.toggle-h1 > summary {
  font-size: 26px;
  line-height: 1.3;
}

.script-editor details.toggle-heading.toggle-h2 > summary {
  font-size: 18.5px;
  line-height: 1.35;
}

.script-editor details.toggle-heading.toggle-h3 > summary {
  font-size: 16px;
  font-weight: 600;
}

.script-editor details.toggle-heading.toggle-h4 > summary {
  font-size: 14.5px;
  font-weight: 600;
}

.script-editor details.toggle-heading > .toggle-body {
  padding: 6px 0 4px 22px;
}

.script-editor .callout {
  padding: 12px 16px;
  border-radius: 8px;
  margin: 14px 0;
  background: var(--bg-callout);
  border: 1px solid var(--border-subtle);
  font-size: 14.5px;
  transition: border-color 0.2s;
}

.script-editor table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
}
.script-editor th,
.script-editor td {
  border: 1px solid var(--border);
  padding: 8px 10px;
  text-align: left;
}
.script-editor th {
  background: var(--bg-sidebar);
  font-weight: 600;
}

.script-editor img {
  max-width: 100%;
  border-radius: 8px;
  margin: 12px 0;
}

/* Color-Coded Script Highlights with Smooth Glow & Pulse */
.script-editor mark.comment-highlight {
  background: var(--cmt-bg);
  color: inherit;
  border-bottom: 2px solid var(--cmt-border);
  padding: 2px 0;
  margin: 0;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.2s var(--ease-out-expo), border-color 0.2s;
}

.script-editor mark.comment-highlight:hover {
  background: var(--cmt-bg-active);
}

.script-editor mark.comment-highlight.active {
  background: var(--cmt-bg-active);
}

/* 🎨 DESIGN COMMENT HIGHLIGHT (PURPLE) */
.script-editor mark.comment-highlight[data-comment-type="design"] {
  background: rgba(168, 85, 247, 0.12);
  border-bottom: 2px solid rgba(168, 85, 247, 0.65);
}
.script-editor mark.comment-highlight[data-comment-type="design"]:hover {
  background: rgba(168, 85, 247, 0.20);
}
.script-editor mark.comment-highlight[data-comment-type="design"].active {
  background: rgba(168, 85, 247, 0.24);
}

/* 🎬 EDIT COMMENT HIGHLIGHT (CYAN / BLUE) */
.script-editor mark.comment-highlight[data-comment-type="edit"] {
  background: rgba(56, 189, 248, 0.11);
  border-bottom: 2px solid rgba(56, 189, 248, 0.65);
}
.script-editor mark.comment-highlight[data-comment-type="edit"]:hover {
  background: rgba(56, 189, 248, 0.19);
}
.script-editor mark.comment-highlight[data-comment-type="edit"].active {
  background: rgba(56, 189, 248, 0.23);
}

.script-editor mark.comment-highlight.resolved {
  background: transparent !important;
  border-bottom: 1px dashed var(--text-muted) !important;
  box-shadow: none !important;
}

/* ==================== FLOATING RIGHT-MARGIN COMMENT CARDS WITH TRUE 60FPS SMOOTH MOTION ==================== */
.notion-comments-rail {
  position: relative;
  min-height: 600px;
}

.floating-comment-card {
  position: absolute;
  left: 0;
  right: 0;
  background: #202020;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  will-change: top, transform, box-shadow;
  transition:
    top 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.2s ease,
    box-shadow 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.2s ease;
}

body.light-theme .floating-comment-card {
  background: #ffffff;
  border-color: rgba(55, 53, 47, 0.11);
  box-shadow: 0 2px 8px rgba(15, 15, 15, 0.06);
}

.floating-comment-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

body.light-theme .floating-comment-card:hover {
  border-color: rgba(55, 53, 47, 0.2);
}

.floating-comment-card.active {
  background: #202020;
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.42);
  transform: translate3d(-4px, 0, 0);
  z-index: 30;
}

body.light-theme .floating-comment-card.active {
  background: #ffffff;
  border-color: rgba(55, 53, 47, 0.22);
  box-shadow: 0 8px 24px rgba(15, 15, 15, 0.1);
}

/* 🎨 SUBTLE PURPLE TINT FOR DESIGN COMMENTS */
.floating-comment-card.type-design {
  background: linear-gradient(180deg, rgba(168, 85, 247, 0.065) 0%, rgba(168, 85, 247, 0.025) 100%), #202020;
  border-color: rgba(168, 85, 247, 0.18);
}
.floating-comment-card.type-design:hover {
  border-color: rgba(168, 85, 247, 0.32);
}
.floating-comment-card.type-design.active {
  background: linear-gradient(180deg, rgba(168, 85, 247, 0.095) 0%, rgba(168, 85, 247, 0.04) 100%), #202020;
  border-color: rgba(168, 85, 247, 0.42);
}

/* 🎬 SUBTLE BLUE TINT FOR EDIT COMMENTS */
.floating-comment-card.type-edit {
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.065) 0%, rgba(56, 189, 248, 0.025) 100%), #202020;
  border-color: rgba(56, 189, 248, 0.18);
}
.floating-comment-card.type-edit:hover {
  border-color: rgba(56, 189, 248, 0.32);
}
.floating-comment-card.type-edit.active {
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.095) 0%, rgba(56, 189, 248, 0.04) 100%), #202020;
  border-color: rgba(56, 189, 248, 0.42);
}

/* 💬 SUBTLE AMBER TINT FOR GENERAL COMMENTS */
.floating-comment-card.type-general {
  background: linear-gradient(180deg, rgba(255, 199, 0, 0.05) 0%, rgba(255, 199, 0, 0.02) 100%), #202020;
  border-color: rgba(255, 199, 0, 0.16);
}
.floating-comment-card.type-general:hover {
  border-color: rgba(255, 199, 0, 0.28);
}
.floating-comment-card.type-general.active {
  background: linear-gradient(180deg, rgba(255, 199, 0, 0.08) 0%, rgba(255, 199, 0, 0.035) 100%), #202020;
  border-color: rgba(255, 199, 0, 0.36);
}

/* Category Pill Badges (informational legend) */
.cmt-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid transparent;
  user-select: none;
}

.cmt-type-badge.design {
  background: rgba(168, 85, 247, 0.22);
  color: #d8b4fe;
  border-color: rgba(168, 85, 247, 0.45);
}
body.light-theme .cmt-type-badge.design {
  color: #6b21a8;
}

.cmt-type-badge.edit {
  background: rgba(56, 189, 248, 0.22);
  color: #bae6fd;
  border-color: rgba(56, 189, 248, 0.45);
}
body.light-theme .cmt-type-badge.edit {
  color: #075985;
}

.cmt-type-badge.general {
  background: rgba(255, 199, 0, 0.18);
  color: #fde047;
  border-color: rgba(255, 199, 0, 0.42);
}
body.light-theme .cmt-type-badge.general {
  color: #854d0e;
}

.cmt-type-badge.figma {
  background: rgba(10, 207, 131, 0.20);
  color: #6ee7b7;
  border-color: rgba(10, 207, 131, 0.48);
}
body.light-theme .cmt-type-badge.figma {
  color: #065f46;
}

.cmt-type-selector {
  display: flex;
  gap: 5px;
  margin-bottom: 8px;
}

.cmt-type-option {
  flex: 1;
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s var(--ease-out-expo);
}
.cmt-type-option:active {
  transform: scale(0.95);
}
.cmt-type-option.design.selected,
.cmt-type-option.design:hover {
  background: rgba(168, 85, 247, 0.26);
  border-color: #a855f7;
  color: #e9d5ff;
  transform: translateY(-1px);
}
.cmt-type-option.edit.selected,
.cmt-type-option.edit:hover {
  background: rgba(56, 189, 248, 0.24);
  border-color: #38bdf8;
  color: #bae6fd;
  transform: translateY(-1px);
}
.cmt-type-option.general.selected,
.cmt-type-option.general:hover {
  background: rgba(255, 199, 0, 0.22);
  border-color: #eab308;
  color: #fef08a;
  transform: translateY(-1px);
}

.comment-msg {
  margin-bottom: 10px;
}
.comment-msg:last-of-type {
  margin-bottom: 0;
}

.comment-msg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.comment-author-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-avatar {
  width: 22px;
  height: 22px;
  font-size: 9.5px;
  flex-shrink: 0;
}

.comment-author-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.comment-date {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
}

/* Hover-only Top-Right Unified Action Pill (Reaction, Resolve, More) */
.comment-hover-actions {
  position: absolute;
  top: 8px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 1px;
  padding: 2px 3px;
  background: #252525;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.14s ease;
  z-index: 5;
}

body.light-theme .comment-hover-actions {
  background: #f7f7f5;
  border-color: rgba(55, 53, 47, 0.14);
  box-shadow: 0 2px 6px rgba(15, 15, 15, 0.08);
}

.floating-comment-card:hover .comment-hover-actions {
  opacity: 1;
  pointer-events: auto;
}

.comment-action-icon {
  width: 24px;
  height: 22px;
  border: none;
  background: transparent;
  color: #9b9b9b;
  padding: 0;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.comment-action-icon:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #e8e8e6;
}
body.light-theme .comment-action-icon:hover {
  background: rgba(55, 53, 47, 0.08);
  color: #37352f;
}

/* Minimalistic More Dropdown Menu */
.comment-more-menu {
  position: absolute;
  top: 36px;
  right: 10px;
  width: 176px;
  background: #252525;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

body.light-theme .comment-more-menu {
  background: #ffffff;
  border-color: rgba(55, 53, 47, 0.14);
  box-shadow: 0 8px 24px rgba(15, 15, 15, 0.12);
}

.comment-more-item {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 12.5px;
  padding: 6px 8px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s;
}
.comment-more-item:hover {
  background: rgba(255, 255, 255, 0.08);
}
body.light-theme .comment-more-item:hover {
  background: rgba(55, 53, 47, 0.06);
}
.comment-more-item.danger {
  color: #f87171;
}
.comment-more-item.danger:hover {
  background: rgba(248, 113, 113, 0.12);
}

.comment-body {
  font-size: 13px;
  line-height: 1.46;
  color: rgba(255, 255, 255, 0.88);
  padding-left: 30px;
  white-space: pre-wrap;
}

body.light-theme .comment-body {
  color: #37352f;
}

.comment-images {
  padding-left: 30px;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.comment-images img {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  cursor: zoom-in;
  display: block;
  transition: transform 0.2s var(--ease-out-expo), box-shadow 0.2s var(--ease-out-expo);
}
.comment-images img:hover {
  transform: scale(1.015);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.comment-reaction-row {
  padding-left: 30px;
  margin-top: 6px;
}

.comment-reaction-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  font-size: 11.5px;
  background: rgba(35, 131, 226, 0.16);
  border: 1px solid rgba(35, 131, 226, 0.4);
  border-radius: 999px;
  color: #93c5fd;
  cursor: pointer;
}

/* Selected State Bottom Reply Row (Avatar + Blue-bordered Reply... Input Pill) */
.notion-inline-reply-bar {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-top: 0;
  padding-top: 0;
  pointer-events: none;
  transition:
    max-height 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.22s ease,
    margin-top 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.floating-comment-card.active .notion-inline-reply-bar,
.floating-comment-card.composer-card .notion-inline-reply-bar {
  max-height: 54px;
  opacity: 1;
  margin-top: 10px;
  pointer-events: auto;
}

.reply-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.reply-input-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1.5px solid #2383e2;
  border-radius: 8px;
  padding: 4px 6px 4px 10px;
  min-width: 0;
}

.reply-inline-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 12.5px;
  color: var(--text-primary);
  min-width: 0;
}
.reply-inline-input::placeholder {
  color: #787774;
}

.reply-inline-icons {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.reply-icon-btn {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: #8a8a8a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: background 0.14s, color 0.14s;
}
.reply-icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.reply-send-btn {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: #474747;
  color: #1f1f1f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.14s var(--ease-out-expo);
}
.reply-send-btn:hover {
  background: #2383e2;
  color: #ffffff;
  transform: scale(1.08);
}

.composer-images-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  padding-left: 30px;
}

.preview-thumb {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
  animation: popoverSpringIn 0.2s var(--ease-out-expo);
}
.preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.preview-thumb button {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.75);
  color: #fff;
  font-size: 10px;
  cursor: pointer;
}

/* ==================== NOTION VERTICAL FLOATING SETTINGS PANEL (SPRING ANIMATED) ==================== */
.notion-context-panel {
  position: fixed;
  z-index: 1600;
  width: 256px;
  background: rgba(34, 34, 34, 0.98);
  backdrop-filter: blur(14px);
  color: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 9px 10px 10px;
  box-shadow: var(--shadow-float);
  user-select: none;
  transform-origin: top center;
  animation: popoverSpringIn 0.18s var(--ease-out-expo);
  transition: top 0.14s var(--ease-out-expo), left 0.14s var(--ease-out-expo);
}

body.light-theme .notion-context-panel {
  background: rgba(255, 255, 255, 0.98);
  color: #37352f;
  border-color: rgba(55, 53, 47, 0.14);
}

.ncp-turn-into-wrap {
  position: relative;
  margin-bottom: 4px;
}

.ncp-turn-into-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border: none;
  background: transparent;
  border-radius: 7px;
  font-size: 13.5px;
  font-weight: 500;
  color: inherit;
  cursor: pointer;
  transition: background 0.12s;
}
.ncp-turn-into-btn:hover,
.ncp-turn-into-btn.active {
  background: rgba(255, 255, 255, 0.08);
}
body.light-theme .ncp-turn-into-btn:hover,
body.light-theme .ncp-turn-into-btn.active {
  background: rgba(55, 53, 47, 0.06);
}

.ncp-turn-into-left {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.ncp-turn-into-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.ncp-turn-into-chevron {
  display: inline-flex;
  align-items: center;
  color: var(--text-secondary);
}

/* Side-by-Side Flyout Submenu (Matching User Screenshot) */
.ncp-submenu {
  position: absolute;
  left: calc(100% + 14px);
  top: -10px;
  width: 224px;
  max-height: 460px;
  overflow-y: auto;
  padding: 6px;
  background: rgba(34, 34, 34, 0.98);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 11px;
  box-shadow: var(--shadow-float);
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 1650;
  animation: popoverSpringIn 0.16s var(--ease-out-expo);
}

.ncp-submenu.flip-left {
  left: auto;
  right: calc(100% + 14px);
}

body.light-theme .ncp-submenu {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(55, 53, 47, 0.14);
}

.ncp-sub-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 4px 4px;
}
body.light-theme .ncp-sub-divider {
  background: rgba(55, 53, 47, 0.09);
}

.ncp-sub-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  border: none;
  background: transparent;
  color: inherit;
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s;
}
.ncp-sub-item:hover,
.ncp-sub-item.active {
  background: rgba(255, 255, 255, 0.08);
}
body.light-theme .ncp-sub-item:hover,
body.light-theme .ncp-sub-item.active {
  background: rgba(55, 53, 47, 0.06);
}

.ncp-sub-item-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ncp-sub-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  flex-shrink: 0;
}
.ncp-sub-item:hover .ncp-sub-icon,
.ncp-sub-item.active .ncp-sub-icon {
  color: var(--text-primary);
}

.ncp-sub-check {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  opacity: 0;
  flex-shrink: 0;
}
.ncp-sub-item.active .ncp-sub-check {
  opacity: 1;
}

.ncp-icon-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  padding: 3px 0;
}

.ncp-icon-btn {
  height: 36px;
  border: none;
  background: transparent;
  color: inherit;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.12s, transform 0.12s var(--ease-out-expo);
}
.ncp-icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}
.ncp-icon-btn:active {
  transform: scale(0.92);
}
body.light-theme .ncp-icon-btn:hover {
  background: rgba(55, 53, 47, 0.07);
}

.ncp-icon-btn.boxed-a {
  background: rgba(255, 255, 255, 0.09);
  border-radius: 7px;
}
body.light-theme .ncp-icon-btn.boxed-a {
  background: rgba(55, 53, 47, 0.08);
}

.ncp-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.09);
  margin: 8px 2px;
}
body.light-theme .ncp-divider {
  background: rgba(55, 53, 47, 0.1);
}

.ncp-section-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 2px 6px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ncp-cmt-selector {
  margin: 0 0 2px;
  gap: 6px;
}

.ncp-cmt-selector .cmt-type-option {
  padding: 6px 8px;
  border-radius: 7px;
  font-size: 12px;
  gap: 5px;
}

.ncp-skill-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 152px;
  overflow-y: auto;
}

.ncp-skill-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  padding: 7px 8px;
  border: none;
  background: transparent;
  color: inherit;
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.12s, transform 0.12s;
}
.ncp-skill-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(2px);
}
body.light-theme .ncp-skill-btn:hover {
  background: rgba(55, 53, 47, 0.06);
}

.ncp-skill-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  flex-shrink: 0;
}

/* ==================== SLIDE-OVER HISTORY DRAWER & DIFF MODAL ==================== */
.history-drawer-overlay {
  position: fixed;
  top: 44px;
  right: 0;
  bottom: 0;
  width: 340px;
  background: var(--bg-sidebar);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-float);
  z-index: 1400;
  display: flex;
  flex-direction: column;
  animation: drawerSlideLeft 0.25s var(--ease-out-expo);
}

.history-drawer-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: 13.5px;
}

.history-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.revision-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  transition: transform 0.16s var(--ease-out-expo), border-color 0.16s, box-shadow 0.16s;
}
.revision-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}
.revision-summary {
  font-size: 13px;
  font-weight: 500;
  margin: 5px 0;
}

/* Slash Menu */
.slash-menu {
  position: fixed;
  z-index: 1600;
  width: 250px;
  max-height: 300px;
  overflow-y: auto;
  background: var(--bg-sidebar);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px;
  box-shadow: var(--shadow-float);
  animation: popoverSpringIn 0.18s var(--ease-out-expo);
}
.slash-menu-header {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 4px 8px;
  text-transform: uppercase;
}
.slash-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border: none;
  background: transparent;
  border-radius: 5px;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s, transform 0.12s;
}
.slash-item:hover {
  background: var(--bg-hover);
  transform: translateX(2px);
}
.slash-item-icon {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}
.slash-item-title {
  font-size: 13px;
  font-weight: 500;
}
.slash-item-desc {
  font-size: 11px;
  color: var(--text-secondary);
}

/* Diff Modal & Lightbox */
.diff-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1800;
  padding: 28px;
  animation: modalBackdropFade 0.2s var(--ease-out-expo);
}
.diff-modal {
  width: 100%;
  max-width: 820px;
  max-height: 85vh;
  background: var(--bg-sidebar);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-float);
  animation: modalDialogPop 0.24s var(--ease-out-expo);
}
.diff-modal-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.diff-modal-body {
  padding: 24px 32px;
  overflow-y: auto;
  font-size: 15px;
  line-height: 1.7;
  white-space: pre-wrap;
  background: var(--bg-app);
}
ins.diff-add {
  background: var(--st-done-bg);
  color: var(--st-done-fg);
  text-decoration: none;
  padding: 1px 4px;
  border-radius: 3px;
}
del.diff-del {
  background: var(--st-canceled-bg);
  color: var(--st-canceled-fg);
  text-decoration: line-through;
  padding: 1px 4px;
  border-radius: 3px;
}
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2500;
  padding: 32px;
  cursor: zoom-out;
  animation: modalBackdropFade 0.2s var(--ease-out-expo);
}
.lightbox img {
  max-width: 92vw;
  max-height: 90vh;
  border-radius: 10px;
  animation: modalDialogPop 0.24s var(--ease-out-expo);
}

/* ==================== COPY LINK BUTTONS & TOAST ==================== */
.copy-link-btn {
  gap: 5px;
  font-weight: 500;
  transition: background 0.16s var(--ease-snappy), border-color 0.16s var(--ease-snappy), color 0.16s var(--ease-snappy), transform 0.12s var(--ease-out-expo);
}
.copy-link-btn.copied {
  background: var(--st-done-bg);
  border-color: var(--st-done-dot);
  color: var(--st-done-fg);
}

.sb-card-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
  transition: background 0.14s, color 0.14s, border-color 0.14s;
}
.sb-card-copy-btn:hover {
  background: var(--bg-surface);
  border-color: var(--border);
  color: var(--text-primary);
}
.sb-card-copy-btn.copied {
  color: var(--st-done-fg);
  background: var(--st-done-bg);
}

.copy-link-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--st-done-dot);
  color: var(--text-primary);
  padding: 10px 16px;
  border-radius: 8px;
  box-shadow: var(--shadow-float);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  z-index: 3000;
  animation: popScaleIn 0.2s var(--ease-out-expo);
}
.copy-link-toast span:first-child {
  color: var(--st-done-fg);
  font-weight: 700;
}

/* ==================== APPLE SF SYMBOLS INLINE VECTOR ICONS ==================== */
.sf-icon {
  display: inline-block;
  vertical-align: -0.15em;
  flex-shrink: 0;
}

.nav-item-icon,
.subpage-sf-icon,
.prop-key-icon,
.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.db-heading-sf-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
}
.db-heading-sf-icon .sf-icon {
  width: 24px;
  height: 24px;
  vertical-align: middle;
}

.sb-card-comments {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.comment-reaction-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* ==================== TOPBAR PAGE BURGER MENU ==================== */
.page-burger-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.page-burger-btn {
  width: 30px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.page-burger-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 224px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px;
  box-shadow: var(--shadow-float);
  z-index: 2600;
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: popScaleIn 0.16s var(--ease-out-expo);
}

.page-burger-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.page-burger-item:hover {
  background: var(--bg-hover);
}
.page-burger-item.danger {
  color: var(--danger);
}
.page-burger-item.danger:hover {
  background: rgba(235, 87, 87, 0.12);
}

.page-burger-item-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  flex-shrink: 0;
}
.page-burger-item.danger .page-burger-item-icon {
  color: var(--danger);
}

.page-burger-divider {
  height: 1px;
  background: var(--border);
  margin: 3px 4px;
}

/* ==================== STORYBOARD ASSIGNEE PILL & DROPDOWN ==================== */
.assignee-pill-trigger {
  background: transparent;
  border: 1px solid transparent;
  padding: 2px 6px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  transition: background 0.14s, border-color 0.14s, transform 0.12s;
}
.assignee-pill-trigger:hover {
  background: var(--bg-hover);
  border-color: var(--border);
}

.assignee-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
}
.assignee-pill.unassigned {
  color: var(--text-muted);
}

.assignee-pill-avatar {
  width: 18px;
  height: 18px;
  font-size: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.assignee-dropdown-menu {
  min-width: 210px;
}

.assignee-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
}
.assignee-option.selected {
  background: var(--bg-active);
}

.assignee-option-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.25;
}

.assignee-option-name {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-primary);
}

.assignee-option-role {
  font-size: 10.5px;
  color: var(--text-muted);
}

.assignee-unassigned-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px dashed var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ==================== PRIORITY PILLS & DEADLINE PICKER ==================== */
.priority-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}
.priority-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.priority-pill.low {
  background: var(--st-not-started-bg);
  color: var(--st-not-started-fg);
}
.priority-pill.low .priority-dot,
.priority-dot.low {
  background: var(--st-not-started-dot);
}

.priority-pill.medium {
  background: var(--st-in-progress-bg);
  color: var(--st-in-progress-fg);
}
.priority-pill.medium .priority-dot,
.priority-dot.medium {
  background: var(--st-in-progress-dot);
}

.priority-pill.high {
  background: var(--st-on-hold-bg);
  color: var(--st-on-hold-fg);
}
.priority-pill.high .priority-dot,
.priority-dot.high {
  background: var(--st-on-hold-dot);
}

.priority-pill.urgent {
  background: var(--st-canceled-bg);
  color: var(--st-canceled-fg);
}
.priority-pill.urgent .priority-dot,
.priority-dot.urgent {
  background: var(--st-canceled-dot);
}

.deadline-pill-wrap {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s, color 0.14s;
}
.deadline-pill-wrap:hover {
  background: var(--bg-hover);
  border-color: var(--border);
  color: var(--text-primary);
}

.deadline-inline-input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  padding: 0;
}

/* ==================== CREATE NEW STORYBOARD MODAL ==================== */
.new-sb-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3200;
  padding: 20px;
  animation: modalBackdropFade 0.18s var(--ease-snappy);
}

.new-sb-modal {
  width: 100%;
  max-width: 500px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-float);
  overflow: hidden;
  animation: modalDialogPop 0.22s var(--ease-out-expo);
}

.new-sb-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.new-sb-header-title-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.new-sb-header-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-hover);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.new-sb-modal-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.new-sb-modal-subtitle {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-top: 3px;
  line-height: 1.4;
}

.new-sb-form {
  padding: 18px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.new-sb-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.new-sb-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.new-sb-input,
.new-sb-select {
  width: 100%;
  padding: 9px 11px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--bg-app);
  color: var(--text-primary);
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.new-sb-input:focus,
.new-sb-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.new-sb-title-num-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.new-sb-num-field {
  width: 112px;
  flex-shrink: 0;
}

.new-sb-num-input-wrap {
  display: flex;
  align-items: center;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--bg-app);
  padding-left: 10px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.new-sb-num-input-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.new-sb-hash-prefix {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-muted);
  user-select: none;
}

.new-sb-num-input {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 9px 10px 9px 4px !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.new-sb-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.new-sb-priority-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.new-sb-priority-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 6px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--bg-app);
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s, color 0.14s, transform 0.1s;
}
.new-sb-priority-option:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.new-sb-priority-option.active {
  background: var(--bg-elevated);
  border-color: var(--accent);
  color: var(--text-primary);
  box-shadow: 0 0 0 1px var(--accent);
}

.new-sb-quick-dates {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.new-sb-date-chip {
  padding: 2px 7px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.new-sb-date-chip:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--accent);
}

.new-sb-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--border-subtle);
}

/* ==================== INBOX & @MENTION NOTIFICATIONS ==================== */
.inbox-unread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1;
}

.inbox-view-wrap {
  max-width: 820px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.inbox-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.inbox-filter-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 3px;
}

.inbox-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 5px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.14s var(--ease-snappy), color 0.14s var(--ease-snappy);
}
.inbox-tab-btn:hover {
  color: var(--text-primary);
}
.inbox-tab-btn.active {
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-weight: 600;
}

.inbox-tab-count {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-hover);
  padding: 1px 6px;
  border-radius: 999px;
}

.inbox-mark-all-btn {
  font-size: 12px;
  padding: 5px 11px;
}

.inbox-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inbox-notif-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  cursor: pointer;
  animation: fadeSlideUp 0.22s var(--ease-out-expo) backwards;
  transition: background 0.16s var(--ease-snappy), border-color 0.16s var(--ease-snappy), transform 0.16s var(--ease-out-expo);
}
.inbox-notif-card:hover {
  background: var(--bg-elevated);
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}
.inbox-notif-card.unread {
  border-left: 3px solid var(--accent);
}
.inbox-notif-card.read {
  opacity: 0.78;
}
.inbox-notif-card.read:hover {
  opacity: 1;
}

.inbox-notif-left {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 2px;
  flex-shrink: 0;
}

.inbox-unread-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.inbox-notif-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.inbox-notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.inbox-notif-title-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  min-width: 0;
}

.inbox-actor-name {
  font-weight: 600;
  color: var(--text-primary);
}

.inbox-action-text {
  color: var(--text-secondary);
}

.inbox-sb-badge {
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-hover);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 12px;
}

.inbox-client-label {
  font-size: 12px;
  color: var(--text-muted);
}

.inbox-notif-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.inbox-notif-time {
  font-size: 11.5px;
  color: var(--text-muted);
}

.inbox-notif-actions {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.inbox-action-btn {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.inbox-action-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.inbox-action-btn.danger:hover {
  background: rgba(212, 76, 71, 0.14);
  color: #ff7b74;
}

.inbox-quote-preview {
  font-size: 12px;
  color: var(--text-muted);
  border-left: 2px solid var(--border);
  padding-left: 9px;
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inbox-message-body {
  font-size: 13.5px;
  color: var(--text-primary);
  line-height: 1.45;
}

.inbox-empty-state {
  padding: 52px 24px;
  text-align: center;
  background: var(--bg-surface);
  border: 1px dashed var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.inbox-empty-icon {
  color: var(--text-muted);
  margin-bottom: 4px;
}

.inbox-empty-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.inbox-empty-sub {
  font-size: 12.5px;
  color: var(--text-secondary);
  max-width: 400px;
  line-height: 1.45;
}

/* ==================== @MENTION PILLS & AUTOCOMPLETE MENU ==================== */
.mention-pill {
  display: inline-flex;
  align-items: center;
  padding: 0 5px;
  border-radius: 4px;
  background: rgba(35, 131, 226, 0.18);
  color: #60a5fa;
  font-weight: 600;
  font-size: 0.95em;
}
body.light-theme .mention-pill {
  background: rgba(35, 131, 226, 0.14);
  color: #1d4ed8;
}

.mention-autocomplete-menu {
  position: fixed;
  width: 224px;
  max-height: 220px;
  overflow-y: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px;
  box-shadow: var(--shadow-float);
  z-index: 3000;
  animation: popScaleIn 0.14s var(--ease-out-expo);
}

.mention-menu-header {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 8px 3px;
}

.mention-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  transition: background 0.1s;
}
.mention-menu-item:hover,
.mention-menu-item.active {
  background: var(--bg-hover);
}

.mention-menu-item-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mention-menu-item-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mention-menu-item-role {
  font-size: 10.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==================== COMMENT VISUAL BOARD (INLINE PREVIEW + FIGMA / MIRO / MILANOTE CANVAS) ==================== */
.cboard-inline-preview {
  margin-left: 30px;
  margin-top: 8px;
  background: #17171a;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 9px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.composer-card .cboard-inline-preview {
  margin-left: 0;
  margin-top: 0;
  margin-bottom: 8px;
}

.cboard-inline-preview:hover {
  border-color: rgba(168, 85, 247, 0.55);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  transform: translateY(-1px);
}

body.light-theme .cboard-inline-preview {
  background: #f4f4f6;
  border-color: rgba(55, 53, 47, 0.14);
}

.cboard-inline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 9px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 11.5px;
}

body.light-theme .cboard-inline-header {
  background: rgba(55, 53, 47, 0.04);
  border-bottom-color: rgba(55, 53, 47, 0.1);
}

.cboard-inline-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--text-primary);
}

.cboard-inline-title svg {
  color: #a855f7;
}

.cboard-inline-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cboard-inline-open-pill {
  font-size: 10.5px;
  font-weight: 600;
  color: #c084fc;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.32);
  padding: 1px 6px;
  border-radius: 5px;
}

.cboard-inline-remove-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1;
  padding: 1px 4px;
  border-radius: 4px;
  cursor: pointer;
}
.cboard-inline-remove-btn:hover {
  background: rgba(248, 113, 113, 0.16);
  color: #f87171;
}

.cboard-inline-stage {
  position: relative;
  height: 118px;
  width: 100%;
  background-color: #141416;
  background-image: radial-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1px);
  background-size: 12px 12px;
  overflow: hidden;
}

body.light-theme .cboard-inline-stage {
  background-color: #fafafa;
  background-image: radial-gradient(rgba(55, 53, 47, 0.18) 1px, transparent 1px);
}

/* Fullscreen / Large Interactive Comment Visual Board Modal */
.cboard-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 8, 10, 0.76);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3500;
  padding: 20px;
}

.cboard-modal {
  width: min(1360px, 96vw);
  height: min(860px, 92vh);
  background: #161618;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.72);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: popScaleIn 0.18s var(--ease-out-expo);
}

body.light-theme .cboard-modal {
  background: #ffffff;
  border-color: rgba(55, 53, 47, 0.16);
}

.cboard-header {
  height: 54px;
  padding: 0 16px;
  background: #1d1d20;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}

body.light-theme .cboard-header {
  background: #f7f7f5;
  border-bottom-color: rgba(55, 53, 47, 0.1);
}

.cboard-header-left {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.cboard-logo-badge {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(168, 85, 247, 0.16);
  border: 1px solid rgba(168, 85, 247, 0.38);
  color: #c084fc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cboard-title-stack {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.cboard-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cboard-title-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.cboard-count-pill {
  font-size: 11px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 7px;
  border-radius: 999px;
}

.cboard-quote-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 520px;
}

.cboard-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cboard-zoom-controls {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 7px;
  padding: 2px;
}

body.light-theme .cboard-zoom-controls {
  background: rgba(55, 53, 47, 0.05);
  border-color: rgba(55, 53, 47, 0.12);
}

.cboard-top-btn,
.cboard-zoom-readout {
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  height: 26px;
  padding: 0 8px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.12s;
}
.cboard-top-btn:hover,
.cboard-zoom-readout:hover {
  background: rgba(255, 255, 255, 0.09);
}

.cboard-save-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
}

/* Infinite Canvas Viewport */
.cboard-viewport {
  position: relative;
  flex: 1;
  width: 100%;
  overflow: hidden;
  background-color: #131315;
  background-image: radial-gradient(rgba(255, 255, 255, 0.15) 1.25px, transparent 1.25px);
  background-size: 22px 22px;
  user-select: none;
  cursor: default;
}

body.light-theme .cboard-viewport {
  background-color: #f8f8fa;
  background-image: radial-gradient(rgba(55, 53, 47, 0.2) 1.25px, transparent 1.25px);
}

.cboard-viewport.tool-hand {
  cursor: grab;
}
.cboard-viewport.tool-hand.panning {
  cursor: grabbing;
}
.cboard-viewport.tool-shape,
.cboard-viewport.tool-arrow,
.cboard-viewport.tool-sticky,
.cboard-viewport.tool-text {
  cursor: crosshair;
}
.cboard-viewport.drag-over {
  outline: 2px dashed #a855f7;
  outline-offset: -8px;
}

.cboard-world {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  transform-origin: 0 0;
  will-change: transform;
}

.cboard-items-layer {
  position: relative;
}

/* Board Nodes (Shapes, Sticky, Text, Image/SVG, Arrow) */
.cboard-node {
  position: absolute;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: move;
  user-select: none;
  transition: box-shadow 0.1s ease;
}

.cboard-viewport.tool-hand .cboard-node {
  cursor: grab;
}

.cboard-node.selected {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
  z-index: 20;
}

.cboard-node-shape-rect {
  border-radius: 10px;
  border: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.cboard-node-shape-ellipse {
  border-radius: 9999px;
  border: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.cboard-node-shape-sticky {
  border-radius: 8px;
  padding: 14px 16px;
  text-align: left;
  align-items: flex-start;
  justify-content: flex-start;
  color: #ffffff;
  font-weight: 500;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.38);
  border: none;
  cursor: text;
}

.cboard-node-shape-diamond {
  padding: 0;
  border: none;
}

.cboard-diamond-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.28));
}

/* Figma-style Point-to-Point Vector Arrow */
.cboard-node-arrow {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  overflow: visible;
  pointer-events: none;
}
.cboard-node-arrow.selected {
  outline: none;
  z-index: 25;
}
.cboard-arrow-vector-svg {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  overflow: visible;
  pointer-events: none;
}
.cboard-arrow-hit-line {
  pointer-events: stroke;
  cursor: move;
}
.cboard-arrow-endpoint {
  position: absolute;
  width: 11px;
  height: 11px;
  margin-left: -5.5px;
  margin-top: -5.5px;
  background: #ffffff;
  border: 2.2px solid #2563eb;
  border-radius: 999px;
  cursor: crosshair;
  pointer-events: auto;
  z-index: 35;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
  transition: transform 0.1s ease;
}
.cboard-arrow-endpoint:hover {
  transform: scale(1.25);
}

.cboard-node-text {
  padding: 6px 10px;
  min-width: 48px;
  min-height: 28px;
  color: #f4f4f5;
  font-weight: 600;
  text-align: left;
  align-items: flex-start;
  justify-content: flex-start;
  border-radius: 6px;
  cursor: text;
}

.cboard-node-image {
  padding: 0;
  border-radius: 8px;
  overflow: visible;
}

.cboard-node-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
  border-radius: 6px;
}

.cboard-node-icon {
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cboard-node-icon svg {
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.cboard-node-label {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 1.3em;
  outline: none;
  word-break: break-word;
  white-space: pre-wrap;
  line-height: 1.35;
  cursor: text;
}

.cboard-node-label[contenteditable="true"] {
  cursor: text;
  user-select: text;
}

/* Selection Resize Handles */
.cboard-handle {
  position: absolute;
  width: 9px;
  height: 9px;
  background: #ffffff;
  border: 2px solid #2563eb;
  border-radius: 2px;
  z-index: 30;
}
.cboard-handle.nw { top: -6px; left: -6px; cursor: nwse-resize; }
.cboard-handle.ne { top: -6px; right: -6px; cursor: nesw-resize; }
.cboard-handle.se { bottom: -6px; right: -6px; cursor: nwse-resize; }
.cboard-handle.sw { bottom: -6px; left: -6px; cursor: nesw-resize; }

/* Floating Top Item Inspector */
.cboard-inspector {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: #222226;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.52);
  z-index: 60;
}

body.light-theme .cboard-inspector {
  background: #ffffff;
  border-color: rgba(55, 53, 47, 0.16);
}

.cboard-font-control-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cboard-color-row,
.cboard-size-row {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cboard-font-size-input {
  width: 48px;
  height: 25px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  padding: 0 4px;
  outline: none;
}
.cboard-font-size-input:focus {
  border-color: #3b82f6;
}
.cboard-font-unit {
  font-size: 11px;
  color: var(--text-muted);
  margin-right: 2px;
}

.cboard-color-swatch {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  padding: 0;
  transition: transform 0.12s ease;
}
.cboard-color-swatch:hover {
  transform: scale(1.18);
}

.cboard-insp-divider {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.12);
}

.cboard-insp-btn {
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  height: 26px;
  min-width: 26px;
  padding: 0 6px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.12s;
}
.cboard-insp-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}
.cboard-insp-btn.danger {
  color: #f87171;
}
.cboard-insp-btn.danger:hover {
  background: rgba(248, 113, 113, 0.15);
}

/* Empty Board Hint */
.cboard-empty-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -56%);
  text-align: center;
  pointer-events: none;
  opacity: 0.55;
}

.cboard-empty-hint-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.cboard-empty-hint-sub {
  font-size: 12.5px;
  color: var(--text-secondary);
  max-width: 390px;
  line-height: 1.45;
}

/* Bottom Floating Dock Toolbar (Move, Hand, Shapes, Text, SVG/PNG, Icons) */
.cboard-dock {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: #202024;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.6);
  z-index: 70;
}

body.light-theme .cboard-dock {
  background: #ffffff;
  border-color: rgba(55, 53, 47, 0.16);
  box-shadow: 0 14px 36px rgba(15, 15, 15, 0.16);
}

.cboard-tool-wrap {
  position: relative;
}

.cboard-tool-btn {
  height: 36px;
  padding: 0 11px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.cboard-tool-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.cboard-tool-btn.active {
  background: #2383e2;
  color: #ffffff;
}

.cboard-dock-divider {
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, 0.12);
  margin: 0 3px;
}

/* Popover Menus Above Dock (Shapes & Quick Icons) */
.cboard-popover-menu {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  background: #222226;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.62);
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 80;
}

body.light-theme .cboard-popover-menu {
  background: #ffffff;
  border-color: rgba(55, 53, 47, 0.16);
}

.cboard-popover-title {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 4px 8px 5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.cboard-popover-item {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 12.5px;
  font-weight: 500;
  padding: 7px 9px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s;
}
.cboard-popover-item:hover,
.cboard-popover-item.active {
  background: rgba(255, 255, 255, 0.09);
}

.cboard-icons-grid-menu {
  width: 316px;
  padding: 8px;
  gap: 6px;
}

.cboard-icon-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 7px;
  padding: 0 8px;
  height: 31px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.cboard-icon-search-wrap:focus-within {
  border-color: #a855f7;
  background: rgba(255, 255, 255, 0.08);
}

body.light-theme .cboard-icon-search-wrap {
  background: rgba(15, 15, 15, 0.04);
  border-color: rgba(55, 53, 47, 0.18);
}

.cboard-icon-search-glyph {
  color: var(--text-muted);
  flex-shrink: 0;
  margin-right: 6px;
}

.cboard-icon-search-input {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 12px;
  outline: none;
}

.cboard-icon-search-input::placeholder {
  color: var(--text-muted);
}

.cboard-icon-search-clear {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1;
  padding: 2px 4px;
  cursor: pointer;
  border-radius: 4px;
}
.cboard-icon-search-clear:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}

.cboard-icons-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  padding: 2px;
  max-height: 236px;
  overflow-y: auto;
}

.cboard-icon-stamp-btn {
  height: 48px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 9.5px;
  padding: 4px;
  cursor: pointer;
  overflow: hidden;
  transition: background 0.12s, border-color 0.12s, transform 0.12s;
}
.cboard-icon-stamp-btn:hover {
  background: rgba(168, 85, 247, 0.16);
  border-color: rgba(168, 85, 247, 0.45);
  transform: translateY(-1px);
}

.cboard-icon-stamp-btn span:last-child {
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cboard-icon-stamp-btn img,
.cboard-icon-stamp-btn svg {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.cboard-icons-empty-state {
  grid-column: 1 / -1;
  padding: 18px 8px;
  text-align: center;
  font-size: 11.5px;
  color: var(--text-muted);
}

.cboard-icons-footer-tip {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 5px 6px 2px;
  font-size: 10.5px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.35;
}
.cboard-icons-footer-tip strong {
  color: var(--text-secondary);
}
.cboard-icons-footer-tip kbd {
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  padding: 0 4px;
  font-size: 10px;
  font-family: inherit;
  color: var(--text-primary);
}

/* ==================== FIGMA ARTBOARD HIGHLIGHT & COMPOSER ==================== */
.script-editor mark.figma-artboard-highlight {
  background: rgba(10, 207, 131, 0.14);
  color: inherit;
  border-bottom: 2px solid #0acf83;
  padding: 2px 0;
  margin: 0;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.script-editor mark.figma-artboard-highlight:hover {
  background: rgba(10, 207, 131, 0.25);
  border-bottom-color: #1abcfe;
}

.ncp-figma-assign-btn {
  width: 100%;
  height: 33px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border-radius: 8px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease;
}

.ncp-figma-assign-btn:hover,
.ncp-figma-assign-btn.active {
  background: rgba(10, 207, 131, 0.12);
  border-color: rgba(10, 207, 131, 0.45);
}

body.light-theme .ncp-figma-assign-btn {
  border-color: rgba(55, 53, 47, 0.14);
  background: rgba(15, 15, 15, 0.03);
}

.ncp-figma-composer {
  margin-top: 6px;
  padding: 8px;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

body.light-theme .ncp-figma-composer {
  background: rgba(15, 15, 15, 0.04);
  border-color: rgba(55, 53, 47, 0.16);
}

.ncp-figma-composer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.ncp-figma-composer-header kbd {
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  padding: 0 4px;
  font-size: 9.5px;
  font-family: inherit;
  color: var(--text-primary);
}

.ncp-figma-close-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0 3px;
}
.ncp-figma-close-btn:hover {
  color: var(--text-primary);
}

.ncp-figma-input {
  width: 100%;
  height: 29px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-size: 11.5px;
  padding: 0 8px;
  outline: none;
}

.ncp-figma-input:focus {
  border-color: #0acf83;
}

body.light-theme .ncp-figma-input {
  background: #ffffff;
  border-color: rgba(55, 53, 47, 0.2);
}

.ncp-figma-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 2px;
}

.ncp-figma-target-toggle {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}

.ncp-figma-target-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 4px;
  cursor: pointer;
}

.ncp-figma-target-btn.active {
  background: #2383e2;
  color: #ffffff;
}

.ncp-figma-save-btn {
  height: 26px;
  padding: 0 11px;
  border-radius: 6px;
  border: none;
  background: #0acf83;
  color: #091e14;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.14s ease;
}

.ncp-figma-save-btn:hover {
  filter: brightness(1.08);
}

/* Floating Hover Pill Above Linked Figma Artboard Highlights */
.figma-artboard-hover-pill {
  position: fixed;
  z-index: 1200;
  background: #1f1f23;
  border: 1px solid rgba(10, 207, 131, 0.45);
  border-radius: 999px;
  padding: 4px 8px 4px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
  font-size: 11.5px;
}

body.light-theme .figma-artboard-hover-pill {
  background: #ffffff;
  border-color: rgba(10, 207, 131, 0.55);
  box-shadow: 0 10px 26px rgba(15, 15, 15, 0.16);
}

.figma-hover-pill-label {
  font-weight: 600;
  color: var(--text-primary);
  max-width: 210px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.figma-hover-pill-label:hover {
  text-decoration: underline;
}

.figma-hover-pill-action {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.figma-hover-pill-action:hover {
  background: rgba(10, 207, 131, 0.18);
  color: var(--text-primary);
}
.figma-hover-pill-action.danger:hover {
  background: rgba(248, 113, 113, 0.2);
  color: #f87171;
}
