/* Global Chat / My Work / Quick Notes surfaces. */

:root {
  --lucide-global-note: url("https://unpkg.com/lucide-static@1.16.0/icons/notebook-pen.svg");
}

@supports ((-webkit-mask-image: url("")) or (mask-image: url(""))) {
  .rail-item[data-global="notes"] .rail-icon,
  .mobile-global-links button[data-mobile-global="notes"] > span:first-child {
    --ui-icon: var(--lucide-global-note);
  }
}

.workspace-sidebar.global-surface-sidebar .workspace-switcher {
  cursor: default;
}
.workspace-sidebar.global-surface-sidebar .workspace-switcher:hover {
  background: transparent;
}
.workspace-sidebar.global-surface-sidebar .workspace-icon {
  background: var(--surface-2);
  color: var(--text);
}
.workspace-sidebar.global-surface-sidebar .workspace-presence {
  justify-content: space-between;
  color: var(--soft);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.workspace-sidebar.global-surface-sidebar .workspace-presence b {
  margin-left: 0;
  color: var(--muted);
}
.workspace-sidebar.global-surface-sidebar .module-nav {
  padding-top: 2px;
}

.global-sidebar-toolbar {
  padding: 0 4px 14px;
}
.global-sidebar-toolbar button {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  text-align: left;
  padding: 0 11px;
  font-size: 12px;
  font-weight: 650;
}
.global-sidebar-toolbar button:hover { border-color: var(--line-strong); }
.global-sidebar-section-label {
  padding: 0 8px 7px;
  color: var(--soft);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
}
.global-thread-list,
.global-note-list,
.global-work-filter-list { display: grid; gap: 3px; }

.global-thread-row,
.global-note-row {
  width: 100%;
  min-width: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  padding: 9px 9px;
  text-align: left;
}
.global-thread-row:hover,
.global-thread-row.active,
.global-note-row:hover,
.global-note-row.active { background: var(--surface-2); }
.global-thread-row > div,
.global-note-row > div { min-width: 0; display: grid; gap: 2px; }
.global-thread-row strong,
.global-note-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 650;
}
.global-thread-row small,
.global-note-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 10px;
}
.global-thread-row time,
.global-note-row time {
  color: var(--soft);
  font-size: 9px;
  white-space: nowrap;
}
.global-sidebar-empty { padding: 12px 8px; color: var(--muted); font-size: 11px; }

.global-work-filter {
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 10px;
  text-align: left;
  color: var(--muted);
}
.global-work-filter:hover { background: var(--surface-2); color: var(--text); }
.global-work-filter.active { background: var(--green-soft); color: var(--text); }
.global-work-filter span { font-size: 12px; font-weight: 600; }
.global-work-filter b { color: var(--soft); font-size: 10px; font-weight: 600; }

.global-chat-hub .conversation-header { align-items: start; }
.global-chat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.global-chat-actions button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  padding: 0 10px;
  font-size: 11px;
}
.global-chat-actions button:hover { background: var(--surface-2); color: var(--text); }

.global-scope-banner {
  margin-bottom: 18px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
}
.global-scope-banner span { color: var(--soft); font-size: 10px; font-weight: 700; letter-spacing: .07em; }
.global-scope-banner strong { font-size: 12px; }
.global-scope-banner small { margin-left: auto; color: var(--muted); font-size: 10px; }

.quick-note-hub {
  height: 100%;
  min-height: 0;
  overflow: auto;
  padding: 34px clamp(22px, 4vw, 56px) 70px;
}
.quick-note-header {
  max-width: 900px;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}
.quick-note-header h1 { margin: 3px 0 5px; font-size: 28px; line-height: 1.15; }
.quick-note-header p { margin: 0; color: var(--muted); font-size: 14px; }
.quick-note-editor { max-width: 900px; }
.quick-note-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}
.quick-note-meta span { color: var(--green); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.quick-note-meta b { font-weight: 600; }
.quick-note-meta small { margin-left: auto; color: var(--soft); }
#quickNoteTitle {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  outline: 0;
  background: transparent;
  color: var(--text);
  padding: 18px 0 12px;
  font-size: 24px;
  font-weight: 700;
}
#quickNoteBody {
  width: 100%;
  min-height: 260px;
  resize: vertical;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  padding: 18px 0;
  font-size: 15px;
  line-height: 1.7;
}
.quick-note-move {
  max-width: 900px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(220px, .8fr) minmax(300px, 1.2fr);
  gap: 28px;
}
.quick-note-move h2 { margin: 4px 0 6px; font-size: 18px; }
.quick-note-move p { margin: 0; color: var(--muted); font-size: 12px; }
.quick-note-workspaces { display: grid; }
.quick-note-workspaces button {
  min-height: 54px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 7px 2px;
  text-align: left;
}
.quick-note-workspaces button:hover { background: var(--surface-2); }
.quick-note-workspaces button > div { display: grid; min-width: 0; }
.quick-note-workspaces strong { font-size: 12px; }
.quick-note-workspaces small { color: var(--muted); font-size: 10px; }
.quick-note-workspaces b { color: var(--soft); }

.home-quick-capture {
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.home-quick-capture > div:first-child { margin-bottom: 12px; }
.home-quick-capture h2 { margin: 3px 0 0; font-size: 18px; }
.home-quick-capture > div:last-child { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.home-quick-capture button {
  min-width: 0;
  min-height: 66px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: transparent;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 1px 8px;
  align-content: center;
  text-align: left;
  padding: 9px 12px;
}
.home-quick-capture button:last-child { border-right: 0; }
.home-quick-capture button:hover { background: var(--surface-2); }
.home-quick-capture button > span { grid-row: 1 / 3; align-self: center; color: var(--green); font-size: 18px; }
.home-quick-capture button strong { font-size: 12px; }
.home-quick-capture button small { color: var(--muted); font-size: 10px; }

@media (max-width: 767px) {
  .global-chat-actions { overflow-x: auto; flex-wrap: nowrap; }
  .global-chat-actions button { flex: none; }
  .global-scope-banner { align-items: flex-start; flex-direction: column; gap: 3px; }
  .global-scope-banner small { margin-left: 0; }
  .quick-note-hub { padding: 24px 16px 54px; }
  .quick-note-header { display: grid; gap: 12px; }
  .quick-note-header h1 { font-size: 24px; }
  .quick-note-move { grid-template-columns: 1fr; gap: 14px; }
  .quick-note-meta { flex-wrap: wrap; }
  .quick-note-meta small { margin-left: 0; width: 100%; }
  #quickNoteTitle { font-size: 21px; }
  #quickNoteBody { min-height: 220px; }
  .home-quick-capture > div:last-child { grid-template-columns: 1fr; }
  .home-quick-capture button { border-right: 0; }
}