:root {
  --ink: #0f172a;
  --ink-muted: #334155;
  --paper: #ffffff;
  --desk: #f1f5f9;
  --desk-deep: #e2e8f0;
  --chrome: #ffffff;
  --chrome-2: #f8fafc;
  --hairline: #cbd5e1;
  --accent: #1f4e8c;
  --accent-soft: #eff6ff;
  --accent-hover: #163a69;
  --mark: #b91c1c;
  --hover: #f1f5f9;
  --selected: #e2e8f0;
  --white: #ffffff;
  --sidebar-w: 280px;
  --title-h: 36px;
  --tab-h: 30px;
  --ribbon-h: 110px;
  --status-h: 26px;
  --shadow-menu:
    0 0 0 1px oklch(0 0 0 / 0.06),
    0 1px 2px -1px oklch(0 0 0 / 0.06),
    0 8px 24px oklch(0 0 0 / 0.12);
  --shadow-page:
    0 1px 1px oklch(0 0 0 / 0.06),
    0 10px 28px oklch(0.25 0.03 250 / 0.28);
  --font-ui: "IBM Plex Sans", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.2, 0, 0, 1);
}

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

html,
body,
#root {
  min-height: 100%;
  margin: 0;
}

body {
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--chrome);
}

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

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

button:disabled {
  opacity: 0.4;
  cursor: default;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.app {
  height: 100vh;
  display: grid;
  grid-template-rows: var(--title-h) var(--tab-h) var(--ribbon-h) minmax(0, 1fr) var(--status-h);
  background: var(--chrome);
  transition: grid-template-rows 150ms var(--ease);
  overflow: hidden;
}

.app.is-ribbon-min {
  grid-template-rows: var(--title-h) var(--tab-h) 0px minmax(0, 1fr) var(--status-h);
}

.app.subapp-mode {
  grid-template-rows: var(--title-h) minmax(0, 1fr) var(--status-h);
}

.titlebar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 10px;
  background: var(--chrome);
  border-bottom: 1px solid var(--hairline);
  user-select: none;
  position: relative;
  z-index: 1000;
  overflow: visible;
}

.qat {
  display: flex;
  align-items: center;
  gap: 3px;
}

.sidebar-toggle-qat {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  color: var(--ink);
  transition: background-color 100ms ease-out, color 100ms ease-out;
  margin-right: 2px;
}

.sidebar-toggle-qat:hover {
  background: var(--hover);
}

.sidebar-toggle-qat.is-active {
  background: var(--accent-soft);
  color: var(--accent);
}

.qat-btn {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  color: var(--ink);
  transition: background-color 100ms ease-out;
}

.qat-btn:hover:not(:disabled) {
  background: var(--hover);
}

.qat-btn.is-mark svg {
  color: var(--mark);
}

.doc-title {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.doc-title input {
  width: min(42vw, 420px);
  border: 0;
  background: transparent;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 4px;
  color: var(--ink);
}

.doc-title input:hover,
.doc-title input:focus {
  background: var(--white);
  box-shadow: 0 0 0 1px var(--hairline);
  outline: none;
}

.dirty-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mark);
  flex: none;
}

.leema-app-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 6px 3px 4px;
  border-radius: 4px;
  margin-right: 4px;
  color: var(--ink);
  transition: background-color 100ms ease-out;
}

.leema-app-brand:hover {
  background: var(--hover);
}

.leema-logo-badge {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--ink);
  transition: transform 120ms ease-out, color 120ms ease-out;
}

.leema-app-brand:hover .leema-logo-badge {
  color: var(--accent);
  transform: scale(1.05);
}

.brand-text {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 2px;
  margin-right: 8px;
  font-weight: 600;
  letter-spacing: -0.03em;
  font-size: 15px;
}

.title-right {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pill {
  height: 24px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background-color 100ms ease-out;
}

.pill:hover {
  background: var(--hover);
  color: var(--ink);
}

.account-btn {
  height: 26px;
  padding: 0 8px 0 4px;
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 500;
  background: var(--white);
  box-shadow: 0 0 0 1px oklch(0 0 0 / 0.06);
  transition: background-color 100ms ease-out, scale 150ms ease-out;
}

.account-btn:hover {
  background: var(--hover);
}

.account-btn:active {
  scale: 0.96;
}

.avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  display: grid;
  place-items: center;
}

.tabrow {
  display: flex;
  align-items: stretch;
  padding: 0 8px;
  background: var(--chrome);
  gap: 2px;
  border-bottom: 1px solid var(--hairline);
  position: relative;
  z-index: 20;
}

.tab {
  padding: 0 12px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-muted);
  position: relative;
  border-radius: 4px 4px 0 0;
  transition: color 100ms ease-out, background-color 100ms ease-out;
}

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

.tab.is-on {
  color: var(--ink);
  font-weight: 600;
}

.tab.is-on::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
}

.tab.is-file.is-on {
  background: var(--ink);
  color: var(--paper);
}

.tab.is-file.is-on::after {
  display: none;
}

.tab.is-contextual-table {
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
  border: 1px solid #bfdbfe;
  border-bottom: none;
}

.tab.is-contextual-table:hover {
  background: #dbeafe;
  color: #1e40af;
}

.tab.is-contextual-table.is-on {
  background: #2563eb;
  color: #ffffff;
}

.tab.is-contextual-table.is-on::after {
  background: #ffffff;
}

.tell {
  margin-left: auto;
  align-self: center;
  height: 22px;
  width: 180px;
  border: 0;
  background: var(--white);
  box-shadow: 0 0 0 1px var(--hairline);
  border-radius: 3px;
  padding: 0 8px;
  font-size: 11.5px;
}

.tell:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--accent-soft), 0 0 0 1px var(--accent);
}

.ribbon-min-btn {
  width: 24px;
  height: 24px;
  align-self: center;
  display: grid;
  place-items: center;
  border-radius: 3px;
  color: var(--ink-muted);
  transition: background-color 100ms ease-out;
}

.ribbon-min-btn:hover {
  background: var(--hover);
  color: var(--ink);
}

.ribbon {
  display: flex;
  align-items: stretch;
  background: linear-gradient(#f7f8fa, #eef1f4);
  border-bottom: 1px solid var(--hairline);
  overflow-x: auto;
  overflow-y: hidden;
  position: relative;
  z-index: 20;
}

.group,
.rgroup {
  display: grid;
  grid-template-rows: 1fr 16px;
  padding: 6px 8px 2px;
  position: relative;
  min-width: max-content;
}

.group + .group::before,
.rgroup + .rgroup::before,
.group + .rgroup::before,
.rgroup + .group::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--hairline);
}

.group-body,
.rgroup-body {
  display: flex;
  align-items: stretch;
  gap: 2px;
}

.group-label,
.rgroup-label {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  text-align: center;
  align-self: end;
  line-height: 16px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
  justify-content: center;
}

.row {
  display: flex;
  gap: 2px;
  align-items: center;
  height: 26px;
}

.font-grid {
  display: grid;
  grid-template-rows: 24px 24px;
  gap: 4px;
}

.rbtn {
  height: 26px;
  min-width: 26px;
  padding: 0 6px;
  border-radius: 4px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  color: #1e293b;
  background: transparent;
  transition: all 100ms ease;
  cursor: pointer;
  user-select: none;
  box-sizing: border-box;
  font-size: 11.5px;
  white-space: nowrap;
}

.rbtn:not(:has(.rbtn-label)):not(.lg) {
  width: 26px;
  padding: 0;
  justify-content: center;
}

.rbtn:hover:not(:disabled) {
  background: #f1f5f9;
  border-color: #cbd5e1;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.rbtn.is-on {
  background: #dbeafe !important;
  border-color: #3b82f6 !important;
  color: #1d4ed8 !important;
  box-shadow: inset 0 1px 2px rgba(37, 99, 235, 0.15) !important;
}

.rbtn:active:not(:disabled) {
  transform: translateY(1px);
}

.rbtn.lg {
  width: 58px;
  height: 68px;
  flex-direction: column;
  gap: 3px;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 2px 2px;
}

.rbtn.lg:hover:not(:disabled) {
  background: #f8fafc;
  border-color: #cbd5e1;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.06);
}

.rbtn.lg.is-on {
  background: #dbeafe;
  border-color: #3b82f6;
  box-shadow: inset 0 2px 4px rgba(37, 99, 235, 0.15);
}

.rbtn.lg span {
  font-size: 11px;
  line-height: 12px;
  text-align: center;
  white-space: nowrap;
}

.rbtn.tile {
  height: 40px;
  min-width: 72px;
  flex-direction: column;
  gap: 3px;
  font-size: 11px;
  padding: 4px 8px;
}

.rcombo {
  height: 24px !important;
  border: 1px solid #cbd5e1 !important;
  background: #ffffff !important;
  border-radius: 4px !important;
  color: #1e293b !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  padding: 0 6px 0 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  cursor: pointer !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
  transition: all 120ms ease !important;
  user-select: none !important;
  margin-right: 3px;
}

.rcombo:hover {
  border-color: #94a3b8 !important;
  background: #f8fafc !important;
}

.rcombo:focus,
.rcombo.is-on {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 1.5px #2563eb !important;
  outline: none;
}

.rcombo.font {
  width: 128px !important;
}

.rcombo.size {
  width: 52px !important;
}

.rcombo .chevron {
  font-size: 8.5px;
  color: #64748b;
  margin-left: 4px;
}

.styles-strip,
.styles-grid,
.ribbon .styles-strip {
  display: flex !important;
  flex-direction: row !important;
  gap: 6px !important;
  align-items: center !important;
  padding: 2px 0;
}

button.style-tile,
.ribbon button.style-tile,
.style-chip,
.style-tile {
  width: 76px !important;
  height: 58px !important;
  border-radius: 5px !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  padding: 6px 8px 5px !important;
  text-align: left !important;
  cursor: pointer !important;
  transition: all 120ms ease !important;
  flex-shrink: 0 !important;
  user-select: none !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
  box-sizing: border-box !important;
}

button.style-tile:hover,
.ribbon button.style-tile:hover,
.style-chip:hover,
.style-tile:hover {
  border-color: #3b82f6 !important;
  background: #f8fafc !important;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.12) !important;
  transform: translateY(-1px);
}

button.style-tile.is-on,
.ribbon button.style-tile.is-on,
.style-chip.is-on,
.style-tile.is-on {
  background: #eff6ff !important;
  border: 1.5px solid #2563eb !important;
  box-shadow: 0 0 0 1px #2563eb, 0 1px 3px rgba(37, 99, 235, 0.15) !important;
}

.style-chip .ex,
.style-tile .tile-sample {
  line-height: 1.1;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.style-tile.is-on .tile-sample {
  color: #1d4ed8;
}

.style-chip .nm,
.style-tile .tile-caption {
  font-size: 9.5px;
  font-weight: 500;
  color: #64748b;
  margin-top: 2px;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.style-tile.is-on .tile-caption {
  color: #2563eb;
  font-weight: 600;
}

.menu {
  position: fixed;
  z-index: 60;
  min-width: 168px;
  background: var(--white);
  box-shadow: var(--shadow-menu);
  border-radius: 6px;
  padding: 4px;
}

.menu button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
  text-align: left;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 12.5px;
}

.menu button:hover,
.menu button.is-on {
  background: var(--accent-soft);
}

.swatches {
  display: grid;
  grid-template-columns: repeat(5, 18px);
  gap: 4px;
  padding: 6px;
}

.swatch {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px oklch(0 0 0 / 0.18);
  cursor: pointer;
  transition: transform 100ms ease-out;
}

.swatch:hover {
  transform: scale(1.15);
}

.table-picker {
  display: grid;
  grid-template-columns: repeat(8, 14px);
  gap: 2px;
  padding: 8px;
}

.cell {
  width: 14px;
  height: 14px;
  background: var(--white);
  box-shadow: inset 0 0 0 1px var(--hairline);
  cursor: pointer;
}

.cell.on {
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent);
}

/* App Workspace Container with Sidebar */
.app-workspace-container {
  display: flex;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

/* Sidebar Drawer */
.sidebar-drawer {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: #fbfcfd;
  border-right: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  height: 100%;
  z-index: 10;
  box-shadow: 2px 0 12px oklch(0 0 0 / 0.03);
  animation: slideDrawer 180ms var(--ease);
}

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

.sidebar-header {
  padding: 8px 10px;
  border-bottom: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  background: var(--chrome);
}

.sidebar-tabs {
  display: flex;
  gap: 2px;
  background: var(--chrome-2);
  padding: 2px;
  border-radius: 5px;
  flex: 1;
}

.sidebar-tab-btn {
  flex: 1;
  padding: 4px 6px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 4px;
  color: var(--ink-muted);
  text-align: center;
  transition: all 120ms ease-out;
}

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

.sidebar-tab-btn.is-active {
  background: var(--white);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 2px oklch(0 0 0 / 0.08);
}

.sidebar-close-btn {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  color: var(--ink-muted);
  transition: background-color 100ms ease-out, color 100ms ease-out;
}

.sidebar-close-btn:hover {
  background: var(--hover);
  color: var(--ink);
}

.sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.sidebar-pane {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pane-header h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

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

.btn-text-action {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 3px;
  transition: background-color 100ms ease-out;
}

.btn-text-action:hover {
  background: var(--accent-soft);
}

.sidebar-empty {
  padding: 24px 12px;
  text-align: center;
  color: var(--ink-muted);
}

.sidebar-empty p {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}

.sidebar-empty span {
  font-size: 11.5px;
  line-height: 1.4;
  display: block;
}

/* Outline tree */
.outline-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.outline-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 5px;
  text-align: left;
  font-size: 12.5px;
  transition: background-color 100ms ease-out;
  color: var(--ink);
}

.outline-item:hover {
  background: var(--hover);
}

.outline-item.level-2 {
  padding-left: 20px;
  font-size: 12px;
}

.outline-item.level-3 {
  padding-left: 32px;
  font-size: 11.5px;
  color: var(--ink-muted);
}

.outline-level-indicator {
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  background: var(--chrome-2);
  color: var(--ink-muted);
  flex-shrink: 0;
}

.outline-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Sidebar Documents */
.sidebar-search input {
  width: 100%;
  height: 28px;
  border: 0;
  box-shadow: 0 0 0 1px var(--hairline);
  border-radius: 4px;
  padding: 0 8px;
  font-size: 12px;
  background: var(--white);
}

.sidebar-search input:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--accent-soft), 0 0 0 1px var(--accent);
}

.sidebar-doc-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-doc-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--white);
  box-shadow: 0 0 0 1px var(--hairline);
  cursor: pointer;
  transition: all 120ms ease-out;
}

.sidebar-doc-card:hover {
  box-shadow: 0 0 0 1px var(--accent);
  background: #fbfdff;
}

.sidebar-doc-card.is-active {
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent);
}

.doc-card-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.doc-card-icon {
  color: var(--ink-muted);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.doc-card-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

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

.doc-card-date {
  font-size: 11px;
  color: var(--ink-muted);
}

.doc-card-del {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 3px;
  color: var(--ink-muted);
  opacity: 0;
  transition: opacity 100ms ease-out, background-color 100ms ease-out;
}

.sidebar-doc-card:hover .doc-card-del {
  opacity: 1;
}

.doc-card-del:hover {
  background: #fee2e2;
  color: #b91c1c;
}

/* Sidebar Stats Pane */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.stat-card {
  background: var(--white);
  padding: 10px 12px;
  border-radius: 6px;
  box-shadow: 0 0 0 1px var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-value {
  font-size: 17px;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 10.5px;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stats-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--white);
  padding: 12px;
  border-radius: 6px;
  box-shadow: 0 0 0 1px var(--hairline);
  font-size: 12px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--ink-muted);
}

.stat-row strong {
  color: var(--ink);
  font-weight: 500;
}

/* Floating BubbleMenu */
.bubble-menu {
  display: flex;
  align-items: center;
  background: #1e293b;
  color: #f8fafc;
  padding: 4px 6px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1);
  animation: bubblePop 140ms cubic-bezier(0.16, 1, 0.3, 1);
  gap: 2px;
}

@keyframes bubblePop {
  from {
    transform: translate(-50%, -90%) scale(0.92);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -100%) scale(1);
    opacity: 1;
  }
}

.bubble-group {
  display: flex;
  align-items: center;
  gap: 1px;
}

.bubble-btn {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  color: #cbd5e1;
  transition: all 100ms ease-out;
}

.bubble-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.bubble-btn.is-active {
  background: var(--accent);
  color: #ffffff;
}

.bubble-divider {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 3px;
}

.bubble-popover {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 6px;
  background: var(--white);
  border-radius: 6px;
  box-shadow: var(--shadow-menu);
  z-index: 60;
}

/* Workspace */
.workspace {
  flex: 1;
  min-height: 0;
  background: #f1f5f9;
  overflow: auto;
  position: relative;
  z-index: 0;
  isolation: isolate;
}

.workspace.web {
  background: #f8fafc;
}

.ruler {
  height: 20px;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  width: 100%;
  margin-bottom: 10px;
}

.desk-pad {
  min-height: 100%;
  padding: 32px 24px 64px;
  display: flex;
  justify-content: center;
}

.sheet {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform-origin: top center;
}

@supports (zoom: 1) {
  .sheet {
    zoom: calc(var(--zoom, 100) / 100);
  }
}

@supports not (zoom: 1) {
  .sheet {
    transform: scale(calc(var(--zoom, 100) / 100));
  }
}

.page-stage {
  position: relative;
}

.page {
  width: 8.5in;
  min-height: 11in;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 10px 28px -4px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
  border-radius: 2px;
  position: relative;
  box-sizing: border-box;
}

.page.a4 {
  width: 210mm;
  min-height: 297mm;
}

.page.landscape {
  width: 11in;
  min-height: 8.5in;
}

.page.a4.landscape {
  width: 297mm;
  min-height: 210mm;
}

.page.narrow {
  --pad: 0.5in;
}
.page.normal {
  --pad: 1in;
}
.page.wide {
  --pad: 1.25in;
}

.crop {
  display: none !important;
}

.ProseMirror,
.leema-native-editor {
  min-height: inherit;
  padding: var(--pad, 1in);
  outline: none;
  font-family: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 11pt;
  line-height: 1.6;
  color: #1e293b;
  caret-color: var(--accent);
  box-sizing: border-box;
}

.ProseMirror > *:first-child,
.leema-native-editor > *:first-child {
  margin-top: 0 !important;
}

.cols-2 .ProseMirror,
.cols-2 .leema-native-editor {
  column-count: 2;
  column-gap: 0.4in;
}

.workspace.web .page {
  width: min(920px, 100%);
  min-height: calc(100vh - 220px);
  box-shadow: none;
  background: var(--white);
}

.workspace.web .crop,
.workspace.web .ruler {
  display: none;
}

.ProseMirror p,
.leema-native-editor p {
  margin: 0 0 10pt;
  line-height: 1.6;
  color: #1e293b;
}

.ProseMirror h1,
.leema-native-editor h1 {
  font-family: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 24pt;
  font-weight: 700;
  line-height: 1.25;
  margin: 20pt 0 10pt;
  color: #0f172a;
  letter-spacing: -0.025em;
}

.ProseMirror h2,
.leema-native-editor h2 {
  font-family: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15pt;
  font-weight: 600;
  line-height: 1.3;
  margin: 16pt 0 8pt;
  color: #1e293b;
  letter-spacing: -0.015em;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 4px;
}

.ProseMirror h3,
.leema-native-editor h3 {
  font-family: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12pt;
  font-weight: 600;
  line-height: 1.35;
  margin: 14pt 0 6pt;
  color: #334155;
}

.ProseMirror ul,
.ProseMirror ol,
.leema-native-editor ul,
.leema-native-editor ol {
  margin: 0 0 10pt;
  padding-left: 1.5em;
  line-height: 1.6;
}

.ProseMirror blockquote,
.leema-native-editor blockquote {
  margin: 12pt 0;
  padding: 6pt 16pt;
  border-left: 3px solid #1f4e8c;
  background: #f8fafc;
  border-radius: 0 4px 4px 0;
  color: #475569;
  font-style: italic;
}

.ProseMirror a,
.leema-native-editor a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ProseMirror code,
.leema-native-editor code {
  background: #f1f5f9;
  padding: 2px 5px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: #0f172a;
  border: 1px solid #e2e8f0;
}

.ProseMirror pre,
.leema-native-editor pre {
  background: #0f172a;
  color: #f8fafc;
  padding: 12pt 16pt;
  border-radius: 6px;
  overflow-x: auto;
  margin: 12pt 0;
}

.ProseMirror pre code,
.leema-native-editor pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
}

.ProseMirror img,
.leema-native-editor img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  margin: 10pt 0;
}

.ProseMirror table,
.leema-native-editor table {
  border-collapse: collapse;
  width: 100%;
  margin: 12pt 0;
  font-size: 10pt;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  overflow: hidden;
}

.ProseMirror th,
.ProseMirror td,
.leema-native-editor th,
.leema-native-editor td {
  border: 1px solid #e2e8f0;
  padding: 8pt 12pt;
  min-width: 48px;
  vertical-align: top;
  position: relative;
}

.ProseMirror th,
.leema-native-editor th {
  background: #f8fafc;
  color: #1e293b;
  font-weight: 600;
  font-size: 9.5pt;
  border-color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.ProseMirror tr:nth-child(even) td,
.leema-native-editor tr:nth-child(even) td {
  background: #f8fafc;
}

.ProseMirror .selectedCell:after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(31, 78, 140, 0.12);
  pointer-events: none;
}

.ProseMirror hr,
.leema-native-editor hr {
  border: 0;
  border-top: 1px solid var(--hairline);
  margin: 16pt 0;
}

.ProseMirror p.is-editor-empty:first-child::before {
  content: attr(data-placeholder);
  color: #9aa3ad;
  float: left;
  height: 0;
  pointer-events: none;
}

/* Status bar */
.statusbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 12px;
  background: var(--chrome);
  border-top: 1px solid var(--hairline);
  font-size: 11.5px;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
  position: relative;
  z-index: 20;
}

.statusbar-item {
  display: inline-flex;
  align-items: center;
}

.statusbar-btn {
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--ink-muted);
  transition: background-color 100ms ease-out, color 100ms ease-out;
}

.statusbar-btn:hover {
  background: var(--hover);
  color: var(--ink);
}

.statusbar b {
  font-weight: 600;
  color: var(--ink);
}

.zoom {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.zoom input[type="range"] {
  width: 90px;
  accent-color: var(--accent);
}

/* Backstage dialog */
.backstage {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  background: var(--chrome);
}

.rail {
  background: var(--ink);
  color: #d5dbe3;
  padding: 18px 0;
  display: flex;
  flex-direction: column;
}

.rail-brand {
  padding: 0 18px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--paper);
  letter-spacing: -0.03em;
}

.rail button {
  text-align: left;
  padding: 9px 20px;
  color: inherit;
  font-size: 13.5px;
}

.rail button:hover {
  background: #243044;
  color: var(--paper);
}

.rail button.is-on {
  background: #0a7a86;
  color: var(--paper);
}

.rail .back {
  margin-top: auto;
}

.stage {
  padding: 28px 36px;
  overflow: auto;
}

.stage h2 {
  margin: 0 0 6px;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.stage p.lead {
  margin: 0 0 22px;
  color: var(--ink-muted);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.card {
  text-align: left;
  background: var(--white);
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow-menu);
  min-height: 112px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: scale 150ms ease-out, box-shadow 150ms ease-out;
}

.card:hover {
  box-shadow: 0 0 0 1px var(--accent), 0 8px 24px oklch(0 0 0 / 0.12);
}

.card:active {
  scale: 0.96;
}

.card h3 {
  margin: 0;
  font-size: 15px;
}

.card p {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-muted);
}

.doc-row {
  width: 100%;
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 6px;
  text-align: left;
}

.doc-row:hover {
  background: var(--hover);
}

.findbar {
  position: absolute;
  top: 8px;
  right: 16px;
  z-index: 8;
  display: flex;
  gap: 6px;
  align-items: center;
  background: var(--white);
  box-shadow: var(--shadow-menu);
  border-radius: 6px;
  padding: 6px;
}

.findbar input {
  height: 26px;
  border: 0;
  box-shadow: 0 0 0 1px var(--hairline);
  border-radius: 4px;
  padding: 0 8px;
  font-size: 12.5px;
  width: 160px;
}

.toast {
  position: absolute;
  left: 50%;
  bottom: 44px;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--paper);
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 12.5px;
  z-index: 50;
  box-shadow: var(--shadow-menu);
  max-width: calc(100% - 24px);
  animation: toastIn 140ms ease-out;
}

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

.modal-scrim {
  position: absolute;
  inset: 0;
  background: oklch(0.2 0.03 250 / 0.35);
  z-index: 45;
  display: grid;
  place-items: center;
}

.modal {
  width: min(420px, calc(100% - 32px));
  background: var(--white);
  border-radius: 10px;
  padding: 18px 18px 14px;
  box-shadow: var(--shadow-menu);
}

.modal h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.modal p {
  margin: 0 0 14px;
  color: var(--ink-muted);
  font-size: 13px;
}

.modal label {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
  margin-bottom: 4px;
}

.modal input {
  width: 100%;
  height: 32px;
  border: 0;
  box-shadow: 0 0 0 1px var(--hairline);
  border-radius: 5px;
  padding: 0 10px;
  margin-bottom: 12px;
  font-size: 13px;
}

.modal input:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--accent-soft), 0 0 0 1px var(--accent);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.btn {
  height: 30px;
  padding: 0 12px;
  border-radius: 5px;
  font-size: 12.5px;
  font-weight: 500;
}

.btn.ghost:hover {
  background: var(--hover);
}

.btn.primary {
  background: var(--accent);
  color: var(--paper);
}

.btn.primary:hover {
  background: var(--accent-hover);
}

.btn.primary:disabled {
  opacity: 0.45;
}

.soon {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mark);
  font-weight: 600;
}

/* Multi-Cloud & Offline Sync Styles */
.sync-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 14px;
  border: 1px solid var(--hairline);
  background: var(--paper);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: all 120ms ease-out;
}

.sync-pill-btn:hover {
  background: var(--hover);
  border-color: var(--accent);
}

.sync-pill-btn .dot,
.status-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
}

.sync-pill-btn.syncing .dot,
.status-pill.syncing .dot {
  background: #3b82f6;
  animation: sync-pulse 1s infinite alternate;
}

.sync-pill-btn.offline_pending .dot,
.status-pill.offline_pending .dot {
  background: #f59e0b;
}

.sync-pill-btn.offline .dot,
.status-pill.offline .dot {
  background: #9ca3af;
}

@keyframes sync-pulse {
  from { opacity: 0.4; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1.15); }
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.12);
  color: #065f46;
}

.status-pill.syncing {
  background: rgba(59, 130, 246, 0.12);
  color: #1e40af;
}

.status-pill.offline_pending {
  background: rgba(245, 158, 11, 0.12);
  color: #92400e;
}

.status-pill.offline {
  background: rgba(156, 163, 175, 0.15);
  color: #4b5563;
}

.sync-modal-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 480px;
  max-width: 560px;
}

.sync-status-card,
.sync-status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--chrome);
  border: 1px solid var(--hairline);
}

.sync-status-banner {
  margin-bottom: 18px;
}

.status-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.last-sync {
  font-size: 11.5px;
  color: var(--ink-muted);
}

.sync-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 6px;
}

.sync-tab-btn {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-muted);
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: all 120ms ease;
}

.sync-tab-btn:hover {
  color: var(--ink);
  background: var(--hover);
}

.sync-tab-btn.is-active {
  color: var(--paper);
  background: var(--accent);
}

.sync-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.sync-providers-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sync-provider-card {
  padding: 14px;
  border-radius: 8px;
  background: var(--paper);
  border: 1px solid var(--hairline);
  transition: border-color 120ms ease-out, box-shadow 120ms ease-out;
}

.sync-provider-card.is-connected {
  border-color: var(--accent);
  box-shadow: 0 1px 4px rgba(10, 122, 134, 0.08);
}

.provider-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.provider-icon {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: var(--chrome);
  flex-shrink: 0;
}

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

.provider-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
}

.provider-badge {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--chrome);
  color: var(--ink-muted);
  font-weight: 700;
}

.provider-desc {
  display: block;
  font-size: 11.5px;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.provider-details {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11.5px;
}

.provider-details .field-row {
  display: flex;
  justify-content: space-between;
}

.provider-details label {
  color: var(--ink-muted);
}

.provider-details span {
  font-weight: 600;
  color: var(--ink);
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #cbd5e1;
  transition: 0.2s;
  border-radius: 20px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.2s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--accent);
}

input:checked + .slider:before {
  transform: translateX(16px);
}

/* Sync Logs */
.sync-logs-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 240px;
  overflow-y: auto;
}

.sync-log-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--chrome);
  font-size: 12px;
}

.log-indicator.success {
  color: #10b981;
}

.log-indicator.error {
  color: #ef4444;
}

.log-info {
  display: flex;
  flex-direction: column;
}

.log-action {
  font-size: 10.5px;
  color: var(--ink-muted);
}

.badge-pill {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--chrome);
  color: var(--ink-muted);
}

@media (max-width: 900px) {
  .ribbon {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding: 0 4px;
    gap: 2px;
  }
  .ribbon .group {
    padding: 4px 6px 2px;
    min-width: max-content;
  }
  .ribbon .group-label {
    font-size: 8.5px;
    letter-spacing: 0.04em;
    line-height: 12px;
  }
  .ribbon .rbtn.lg {
    padding: 2px 4px;
    min-width: 40px;
  }
  .ribbon .rbtn.lg span {
    font-size: 9.5px;
  }
  .ribbon .font-grid {
    grid-template-rows: 20px 20px;
    gap: 2px;
  }
  .ribbon .rcombo.font {
    max-width: 90px;
    font-size: 11px;
  }
  .ribbon .rcombo.size {
    max-width: 40px;
    font-size: 11px;
  }
  .ribbon .styles-grid {
    gap: 2px;
  }
  .ribbon .style-tile {
    min-width: 44px;
    padding: 2px 4px;
  }
  .ribbon .style-name {
    font-size: 9px;
  }
}

@media (max-width: 860px) {
  .tell,
  .pill,
  .brand {
    display: none;
  }
  .titlebar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 6px;
  }
  .doc-title {
    justify-self: stretch;
    min-width: 0;
  }
  .doc-title input {
    width: 100%;
    text-align: left;
  }
  .account-btn {
    padding-right: 6px;
  }
  .sidebar-drawer {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.2);
  }
  .desk-pad {
    padding: 12px 8px 48px;
  }
  .statusbar {
    gap: 10px;
    white-space: nowrap;
    overflow: hidden;
  }
  .zoom input[type="range"] {
    display: none;
  }
  .backstage {
    grid-template-columns: 1fr;
  }
  .rail {
    flex-direction: row;
    overflow-x: auto;
    padding: 8px;
  }
  .rail-brand,
  .rail .back {
    display: none;
  }
}

@media print {
  @page {
    margin: 0.75in;
    size: auto;
  }
  .titlebar,
  .tabrow,
  .ribbon,
  .sidebar-drawer,
  .bubble-menu,
  .statusbar,
  .ruler,
  .findbar,
  .crop,
  .backstage,
  .toast,
  .modal-scrim {
    display: none !important;
  }
  .app {
    display: block;
    height: auto;
    overflow: visible;
  }
  .workspace {
    background: white;
    overflow: visible;
  }
  .desk-pad {
    padding: 0;
  }
  .sheet {
    transform: none !important;
    zoom: 1 !important;
  }
  .page,
  .page-stage {
    box-shadow: none;
    transform: none !important;
    width: auto;
    min-height: 0;
  }
  .ProseMirror {
    padding: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

/* ==========================================
   LANDING & LEGAL PAGES (GRAYWORTH DESIGN SYSTEM)
   ========================================== */

.landing-page,
.legal-page {
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  font-family: var(--font-ui);
}

.landing-container,
.legal-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* Landing Header & Nav */
.landing-header,
.legal-header {
  border-bottom: 1px solid var(--hairline);
  background: var(--chrome);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
}

.header-row {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-lockup,
.brand-lockup-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: var(--ink);
}

.brand-name {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.brand-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--accent);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

.landing-nav,
.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.landing-nav a {
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color 150ms ease;
}

.landing-nav a:hover {
  color: var(--ink);
}

/* Hero Section */
.landing-hero {
  padding: 80px 0 60px;
  text-align: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--chrome-2);
  border: 1px solid var(--hairline);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
  margin-bottom: 24px;
}

.pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
}

.hero-headline {
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 0 0 20px;
  font-family: var(--serif);
}

.hero-subtitle {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--ink-muted);
  max-width: 680px;
  margin: 0 0 36px;
  line-height: 1.5;
}

.hero-cta-row {
  display: flex;
  gap: 14px;
  align-items: center;
}

.btn-large {
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 6px;
}

/* Features Grid */
.landing-features {
  padding: 60px 0 80px;
  border-top: 1px solid var(--hairline);
  background: var(--chrome);
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}

.section-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  display: block;
  margin-bottom: 8px;
}

.section-head h2 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 14px;
}

.section-head p {
  color: var(--ink-muted);
  font-size: 15px;
  line-height: 1.5;
  margin: 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--paper);
  border: 1px solid var(--hairline);
  padding: 24px;
  border-radius: 8px;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.feature-card .card-icon {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: var(--chrome-2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 8px;
}

.feature-card p {
  font-size: 13.5px;
  color: var(--ink-muted);
  line-height: 1.5;
  margin: 0;
}

/* Disclosure Section */
.landing-disclosure-section {
  padding: 60px 0;
  border-top: 1px solid var(--hairline);
}

.disclosure-card {
  background: var(--chrome);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 36px;
}

.security-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #0b8793;
  letter-spacing: 0.08em;
}

.disclosure-header h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 6px 0 12px;
}

.disclosure-points {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.point-item {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-muted);
}

.point-item strong {
  color: var(--ink);
  display: block;
  margin-bottom: 3px;
}

.disclosure-footer {
  border-top: 1px solid var(--hairline);
  padding-top: 16px;
}

/* Legal Pages (Privacy & Terms) */
.legal-page .content-body {
  padding: 48px 24px 80px;
  max-width: 800px;
}

.pill-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.legal-page h1 {
  font-size: 38px;
  font-weight: 800;
  margin: 8px 0 6px;
  letter-spacing: -0.03em;
}

.effective-date {
  font-size: 13px;
  color: var(--ink-muted);
  margin-bottom: 36px;
}

.legal-page section {
  margin-bottom: 36px;
}

.legal-page h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 12px;
}

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

.legal-page p,
.legal-page li {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink);
}

.callout-box {
  background: var(--chrome-2);
  border-left: 3px solid #0078D4;
  padding: 16px;
  margin: 16px 0;
  border-radius: 0 6px 6px 0;
  font-size: 13.5px;
}

.contact-block {
  background: var(--chrome);
  padding: 18px;
  border-radius: 6px;
  border: 1px solid var(--hairline);
  font-style: normal;
  font-size: 13.5px;
  line-height: 1.6;
  margin-top: 12px;
}

/* Grayworth Company Footer */
.grayworth-company-footer {
  border-top: 1px solid var(--hairline);
  background: #111311;
  color: #c5c7c5;
  padding: 64px 0 48px;
  margin-top: auto;
  font-size: 13px;
}

.footer-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 48px;
}

.footer-brand-details .footer-copyright {
  margin: 12px 0 8px;
  font-size: 13px;
  color: #e2e4e2;
  font-weight: 500;
}

.footer-brand-address {
  font-style: normal;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #8c8f8c;
  font-size: 12.5px;
}

.footer-brand-address a {
  color: #c5c7c5;
  text-decoration: none;
}

.footer-brand-address a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-directory {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.footer-link-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-link-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: #8c8f8c;
  margin-bottom: 4px;
}

.footer-link-group a {
  color: #c5c7c5;
  text-decoration: none;
  font-size: 13px;
  transition: color 150ms ease;
}

.footer-link-group a:hover {
  color: #ffffff;
}

@media (max-width: 768px) {
  .footer-container {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-directory {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
}

/* ==========================================================================
   Header Breadcrumbs & Real-time Metrics Pill
   ========================================================================== */
.doc-title-breadcrumb-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 440px;
  flex: 1;
}

.workspace-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: #73787e;
  font-weight: 500;
  white-space: nowrap;
}

.breadcrumb-org {
  color: #2b579a;
  font-weight: 600;
}

.breadcrumb-sep {
  color: #b0b4ba;
  font-size: 10px;
}

.doc-metrics-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11.5px;
  color: #334155;
  font-weight: 600;
  border: 1px solid #cbd5e1;
  cursor: pointer;
  transition: all 0.15s ease;
}

.doc-metrics-pill:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
  color: #0f172a;
}

.metric-words {
  font-weight: 600;
}

.metric-time {
  color: #475569;
  font-size: 10.5px;
  font-weight: 500;
}

.account-btn-name {
  font-size: 12.5px;
  font-weight: 600;
  color: #2b3038;
}

/* ==========================================================================
   Account & Workspace Modal
   ========================================================================== */
.account-modal-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 4px 0;
}

.account-profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px 18px;
}

.account-avatar-large {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  flex-shrink: 0;
}

.account-profile-meta {
  flex: 1;
}

.account-profile-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.account-profile-name-row h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
}

.badge-tier {
  background: #0284c7;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 6px;
}

.account-profile-email {
  margin: 2px 0 0 0;
  font-size: 13px;
  color: #64748b;
}

.account-profile-org {
  margin: 4px 0 0 0;
  font-size: 12px;
  color: #475569;
}

.account-actions-row {
  display: flex;
  gap: 12px;
}

.account-edit-form {
  background: #f1f5f9;
  padding: 16px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.account-edit-form h4 {
  margin: 0;
  font-size: 14px;
}

.account-edit-form .field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.account-edit-form .field label {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

.account-edit-form .field input {
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
}

.account-form-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.account-services-section h4 {
  margin: 0 0 10px 0;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}

.account-services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.service-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  transition: all 150ms ease;
}

.service-item.is-connected {
  border-color: #38a169;
  background: #f0fff4;
}

.service-info {
  display: flex;
  flex-direction: column;
}

.service-info strong {
  font-size: 13px;
  color: #1e293b;
}

.service-info span {
  font-size: 11px;
  color: #64748b;
}

/* ==========================================================================
   Templates Gallery Modal
   ========================================================================== */
.templates-subtitle {
  font-size: 13.5px;
  color: #475569;
  margin-top: 0;
  margin-bottom: 16px;
  line-height: 1.5;
}

.templates-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.template-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: all 200ms ease;
}

.template-card:hover {
  border-color: #2b579a;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(43, 87, 154, 0.12);
}

.template-category {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #2b579a;
  background: #eff6ff;
  padding: 2px 6px;
  border-radius: 4px;
}

.template-card-title {
  margin: 10px 0 6px 0;
  font-size: 14.5px;
  font-weight: 700;
  color: #0f172a;
}

.template-card-desc {
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
  margin: 0 0 14px 0;
  flex: 1;
}

.breadcrumb-org-btn,
.breadcrumb-folder-btn {
  background: transparent;
  border: none;
  padding: 2px 4px;
  margin: 0;
  cursor: pointer;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 600;
  transition: all 150ms ease;
  line-height: 1.2;
}

.breadcrumb-org-btn {
  color: #2b579a;
}

.breadcrumb-org-btn:hover {
  background: rgba(43, 87, 154, 0.1);
  text-decoration: underline;
}

.breadcrumb-folder-btn {
  color: #64748b;
}

.breadcrumb-folder-btn:hover {
  background: rgba(100, 116, 139, 0.1);
  text-decoration: underline;
}

.account-tabs-nav {
  display: flex;
  gap: 4px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 8px;
  margin-bottom: 8px;
}

.account-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 150ms ease;
}

.account-tab-btn.is-active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.account-msg-banner {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
}

.account-form-desc {
  font-size: 12.5px;
  color: #64748b;
  margin: 0 0 10px 0;
}

.section-sublabel {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 6px;
  display: block;
}

.quick-profiles-section {
  margin-bottom: 12px;
}

.quick-profiles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.quick-profile-card {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  text-align: left;
  transition: all 150ms ease;
}

.quick-profile-card:hover {
  border-color: #2b579a;
  background: #f8fafc;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(43,87,154,0.1);
}

.quick-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #2b579a;
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.quick-meta {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.quick-meta strong {
  font-size: 11.5px;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quick-meta span {
  font-size: 10px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quick-meta small {
  font-size: 9.5px;
  color: #0284c7;
  font-weight: 600;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 12px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid #e2e8f0;
}

.auth-divider span {
  padding: 0 10px;
  font-size: 11px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.oauth-quick-row {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}

.oauth-btns-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.btn-oauth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 8px;
  font-size: 11.5px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 150ms ease;
}

.btn-oauth:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.btn-ghost {
  background: transparent;
  border: 1px solid #e2e8f0;
  color: #ef4444;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.btn-ghost:hover {
  background: #fef2f2;
  border-color: #fca5a5;
}

/* ==========================================================================
   Executive Cloud Sync & Integrations Modal
   ========================================================================== */
.sync-header-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.sync-status-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sync-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
}

.sync-status-badge.synced {
  background: #dcfce7;
  color: #15803d;
}

.sync-status-badge.syncing {
  background: #dbeafe;
  color: #1d4ed8;
}

.sync-status-badge.offline_pending,
.sync-status-badge.offline {
  background: #fef3c7;
  color: #b45309;
}

.sync-status-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.sync-timestamp {
  font-size: 12px;
  color: #64748b;
}

.sync-tabs-nav {
  display: flex;
  gap: 4px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.sync-nav-btn {
  flex: 1;
  background: transparent;
  border: none;
  padding: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  border-radius: 6px;
  cursor: pointer;
  transition: all 150ms ease;
}

.sync-nav-btn.is-active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.services-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.service-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  transition: border-color 150ms ease;
}

.service-card:hover {
  border-color: #cbd5e1;
}

.service-card.is-connected {
  border-color: #cbd5e1;
  background: #fafbfc;
}

.service-card-main {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  max-width: 75%;
}

.service-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.service-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.service-title-row strong {
  font-size: 14px;
  color: #0f172a;
}

.service-status-pill {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  border-radius: 4px;
}

.service-status-pill.connected {
  background: #dcfce7;
  color: #166534;
}

.service-status-pill.unlinked {
  background: #f1f5f9;
  color: #64748b;
}

.service-desc {
  margin: 0;
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
}

.service-account-meta {
  font-size: 11.5px;
  color: #475569;
  margin-top: 4px;
}

.sync-settings-pane {
  padding: 4px 0;
}

.settings-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.setting-row strong {
  font-size: 13px;
  color: #0f172a;
  display: block;
}

.setting-sub {
  margin: 2px 0 0;
  font-size: 11.5px;
  color: #64748b;
}

.select-input {
  padding: 6px 10px;
  font-size: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  color: #1e293b;
}

.logs-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.log-filter-chips {
  display: flex;
  gap: 6px;
}

.filter-chip {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
}

.filter-chip.is-active {
  background: #2b579a;
  color: #ffffff;
  border-color: #2b579a;
}

.btn-link {
  background: none;
  border: none;
  font-size: 11.5px;
  color: #2b579a;
  cursor: pointer;
}

.btn-link:hover {
  text-decoration: underline;
}

.logs-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
}

.empty-logs {
  text-align: center;
  padding: 24px;
  color: #94a3b8;
  font-size: 12.5px;
}

.log-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 6px;
}

.log-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.log-dot.success {
  background: #16a34a;
}

.log-dot.error {
  background: #dc2626;
}

.log-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.log-headline {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #0f172a;
}

.log-tag {
  font-size: 10px;
  font-weight: 700;
  color: #0284c7;
}

.log-time {
  font-size: 11px;
  color: #64748b;
}

/* ==========================================================================
   Interactive Block Ecosystem & Slash Command Menu
   ========================================================================== */

/* Task List */
ul[data-type="taskList"] {
  list-style: none;
  padding: 0;
  margin: 8px 0;
}

ul[data-type="taskList"] li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 4px 0;
}

ul[data-type="taskList"] li > label {
  user-select: none;
  margin-top: 3px;
  cursor: pointer;
}

ul[data-type="taskList"] li > label input[type="checkbox"] {
  cursor: pointer;
  width: 15px;
  height: 15px;
  accent-color: #2b579a;
}

ul[data-type="taskList"] li > div {
  flex: 1;
}

ul[data-type="taskList"] li[data-checked="true"] > div {
  text-decoration: line-through;
  color: #94a3b8;
}

/* Callout Box */
.editor-callout {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #eff6ff;
  border-left: 4px solid #3b82f6;
  border-radius: 6px;
  padding: 12px 16px;
  margin: 14px 0;
  color: #1e3a8a;
}

.editor-callout .callout-icon {
  font-size: 20px;
  line-height: 1;
  user-select: none;
}

.editor-callout .callout-content {
  flex: 1;
}

.editor-callout .callout-content p {
  margin: 0;
}

/* Collapsible Details / Toggle */
.editor-details {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 12px;
  margin: 12px 0;
  background: #ffffff;
  transition: all 150ms ease;
}

.editor-details[open] {
  border-color: #cbd5e1;
}

.editor-details-summary {
  font-weight: 600;
  color: #1e293b;
  cursor: pointer;
  user-select: none;
  padding: 4px 0;
  outline: none;
}

.editor-details-summary:hover {
  color: #2b579a;
}

.editor-details-content {
  margin-top: 8px;
  padding-left: 12px;
  border-left: 2px solid #e2e8f0;
}

/* Code Block */
.editor-code-block {
  background: #0f172a;
  color: #f8fafc;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.5;
  padding: 14px 18px;
  border-radius: 8px;
  margin: 14px 0;
  overflow-x: auto;
  position: relative;
}

/* Slash Command Menu Popover */
.slash-menu-popup {
  position: absolute;
  z-index: 9999;
  width: 300px;
  max-height: 340px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.slash-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}

.slash-menu-header small {
  font-size: 10px;
  color: #94a3b8;
  font-weight: 500;
  text-transform: none;
}

.slash-menu-list {
  display: flex;
  flex-direction: column;
  padding: 4px;
}

.slash-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  transition: all 100ms ease;
  width: 100%;
}

.slash-menu-item.is-selected,
.slash-menu-item:hover {
  background: #eff6ff;
  color: #1e40af;
}

.slash-item-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
  flex-shrink: 0;
}

.slash-menu-item.is-selected .slash-item-icon,
.slash-menu-item:hover .slash-item-icon {
  background: #dbeafe;
  color: #2b579a;
}

.slash-item-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
}

.slash-item-meta strong {
  font-size: 13px;
  color: #0f172a;
}

.slash-item-meta span {
  font-size: 11px;
  color: #64748b;
  line-height: 1.3;
}

/* ==========================================================================
   Google Drive Material 3 Cloud Explorer
   ========================================================================== */
.gdrive-explorer {
  display: flex;
  flex-direction: column;
  height: 600px;
  max-height: 80vh;
  min-width: 820px;
  background: #ffffff;
  color: #1f1f1f;
  font-family: "Roboto", "Google Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  border-radius: 16px;
  overflow: hidden;
}

.gdrive-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: #ffffff;
  border-bottom: 1px solid #e0e0e0;
  gap: 16px;
}

.gdrive-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gdrive-brand-title {
  font-size: 18px;
  font-weight: 500;
  color: #444746;
  letter-spacing: -0.2px;
}

.gdrive-search-box {
  flex: 1;
  max-width: 500px;
  position: relative;
  display: flex;
  align-items: center;
}

.gdrive-search-input {
  width: 100%;
  height: 40px;
  padding: 0 16px 0 40px;
  background: #eef2fa;
  border: 1px solid transparent;
  border-radius: 24px;
  font-size: 14px;
  color: #1f1f1f;
  transition: background 0.2s, box-shadow 0.2s;
  outline: none;
}

.gdrive-search-input:focus {
  background: #ffffff;
  border-color: #c4d7f5;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.08);
}

.gdrive-search-icon {
  position: absolute;
  left: 14px;
  color: #444746;
  pointer-events: none;
}

.gdrive-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.gdrive-sidebar {
  width: 200px;
  border-right: 1px solid #e0e0e0;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #f8fafc;
}

.gdrive-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 16px;
  border-radius: 20px;
  border: none;
  background: transparent;
  color: #444746;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}

.gdrive-nav-item:hover {
  background: #e9eef6;
}

.gdrive-nav-item.is-active {
  background: #c2e7ff;
  color: #001d35;
  font-weight: 600;
}

.gdrive-main-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #ffffff;
}

.gdrive-breadcrumbs-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  border-bottom: 1px solid #f1f3f4;
  font-size: 13px;
  color: #444746;
}

.gdrive-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.gdrive-crumb-btn {
  background: transparent;
  border: none;
  font-size: 13.5px;
  color: #1a73e8;
  font-weight: 500;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
}

.gdrive-crumb-btn:hover {
  background: #f1f3f4;
}

.gdrive-crumb-btn.current {
  color: #1f1f1f;
  font-weight: 600;
  cursor: default;
}

.gdrive-content-pane {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.gdrive-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.gdrive-table th {
  text-align: left;
  padding: 8px 12px;
  color: #444746;
  font-weight: 500;
  border-bottom: 1px solid #e0e0e0;
  font-size: 12px;
}

.gdrive-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f3f4;
  color: #1f1f1f;
}

.gdrive-row {
  cursor: pointer;
  transition: background 0.1s;
}

.gdrive-row:hover {
  background: #f8fafd;
}

.gdrive-row.is-selected {
  background: #e8f0fe;
}

.gdrive-row-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
}

.gdrive-details-sidebar {
  width: 260px;
  border-left: 1px solid #e0e0e0;
  padding: 18px;
  background: #fafafa;
  overflow-y: auto;
}

.gdrive-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: #ffffff;
  border-top: 1px solid #e0e0e0;
}

.gdrive-google-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1px solid #747775;
  border-radius: 20px;
  padding: 8px 16px;
  color: #1f1f1f;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}

.gdrive-google-btn:hover {
  background: #f8fafd;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3);
}

.gdrive-primary-btn {
  background: #0b57d0;
  color: #ffffff;
  border: none;
  border-radius: 20px;
  padding: 9px 22px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}

.gdrive-primary-btn:hover:not(:disabled) {
  background: #0842a0;
  box-shadow: 0 1px 3px rgba(11, 87, 208, 0.4);
}

.gdrive-primary-btn:disabled {
  background: #e0e2ec;
  color: #8e9099;
  cursor: not-allowed;
}

/* ==========================================================================
   Microsoft OneDrive Fluent Design Cloud Explorer
   ========================================================================== */
.onedrive-explorer {
  display: flex;
  flex-direction: column;
  height: 600px;
  max-height: 80vh;
  min-width: 820px;
  background: #ffffff;
  color: #242424;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.16);
}

.onedrive-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: #0078d4;
  color: #ffffff;
}

.onedrive-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
}

.onedrive-command-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 18px;
  background: #f3f3f3;
  border-bottom: 1px solid #e1dfdd;
}

.onedrive-command-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.onedrive-cmd-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 6px 12px;
  color: #323130;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.onedrive-cmd-btn:hover {
  background: #edebe9;
}

.onedrive-search-input {
  padding: 5px 10px;
  border: 1px solid #8a8886;
  border-radius: 2px;
  font-size: 13px;
  width: 220px;
  outline: none;
}

.onedrive-search-input:focus {
  border-color: #0078d4;
}

.onedrive-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.onedrive-sidebar {
  width: 190px;
  background: #f8f8f8;
  border-right: 1px solid #edebe9;
  padding: 12px 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.onedrive-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: #323130;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  font-weight: 400;
}

.onedrive-nav-item:hover {
  background: #edebe9;
}

.onedrive-nav-item.is-active {
  background: #e1dfdd;
  font-weight: 600;
  color: #0078d4;
}

.onedrive-main-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #ffffff;
}

.onedrive-breadcrumbs-bar {
  display: flex;
  align-items: center;
  padding: 8px 18px;
  border-bottom: 1px solid #edebe9;
  font-size: 13px;
  color: #605e5c;
}

.onedrive-content-pane {
  flex: 1;
  overflow-y: auto;
  padding: 8px 18px;
}

.onedrive-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.onedrive-table th {
  text-align: left;
  padding: 6px 10px;
  color: #605e5c;
  font-weight: 600;
  border-bottom: 1px solid #edebe9;
  font-size: 12px;
}

.onedrive-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #f3f2f1;
  color: #323130;
}

.onedrive-row {
  cursor: pointer;
}

.onedrive-row:hover {
  background: #f3f2f1;
}

.onedrive-row.is-selected {
  background: #edebe9;
  outline: 1px solid #0078d4;
}

.onedrive-details-sidebar {
  width: 250px;
  border-left: 1px solid #edebe9;
  padding: 16px;
  background: #faf9f8;
  overflow-y: auto;
}

.onedrive-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: #f8f8f8;
  border-top: 1px solid #edebe9;
}

.onedrive-primary-btn {
  background: #0078d4;
  color: #ffffff;
  border: none;
  border-radius: 2px;
  padding: 8px 20px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.onedrive-primary-btn:hover:not(:disabled) {
  background: #106ebe;
}

.onedrive-primary-btn:disabled {
  background: #c8c6c4;
  color: #a19f9d;
  cursor: not-allowed;
}

/* Google Docs Native Objects & Smart Canvas Styles */
.smart-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 8px;
  border-radius: 12px;
  background: #f1f3f4;
  color: #3c4043;
  font-size: 0.9em;
  font-weight: 500;
  line-height: 1.5;
  vertical-align: middle;
  border: 1px solid #dadce0;
  user-select: none;
  transition: background 0.15s ease, border-color 0.15s ease;
  margin: 0 2px;
}

.smart-chip:hover {
  background: #e8eaed;
  border-color: #bdc1c6;
}

.smart-chip .chip-icon {
  font-size: 0.95em;
  display: inline-flex;
  align-items: center;
}

.smart-chip.chip-person {
  background: #e8f0fe;
  color: #1a73e8;
  border-color: #d2e3fc;
}
.smart-chip.chip-person:hover {
  background: #d2e3fc;
}

.smart-chip.chip-date {
  background: #f1f3f4;
  color: #5f6368;
}

.smart-chip.chip-file,
.smart-chip.chip-chart {
  background: #e6f4ea;
  color: #137333;
  border-color: #ceead6;
}
.smart-chip.chip-file:hover,
.smart-chip.chip-chart:hover {
  background: #ceead6;
}

.smart-chip.chip-calendar {
  background: #fef7e0;
  color: #b06000;
  border-color: #feefc3;
}

.smart-chip.chip-dropdown {
  cursor: pointer;
  padding-right: 6px;
  font-weight: 600;
}

.smart-chip .chip-dropdown-arrow {
  font-size: 0.75em;
  opacity: 0.7;
}

/* Google Docs Suggestions */
.gdoc-suggestion {
  position: relative;
}

.gdoc-suggestion.suggestion-insertion {
  background: rgba(52, 168, 83, 0.12);
  border-bottom: 2px solid #34a853;
  color: inherit;
}

.gdoc-suggestion.suggestion-deletion {
  background: rgba(234, 67, 53, 0.1);
  text-decoration: line-through;
  color: #ea4335;
}

/* Google Docs Equations */
.gdoc-equation {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0 4px;
  border-radius: 4px;
  background: #f8f9fa;
  border: 1px solid #e8eaed;
  font-family: "Cambria Math", "Latin Modern Math", "STIX Two Math", serif;
  font-style: italic;
  color: #202124;
}

.gdoc-equation .eq-symbol {
  font-style: normal;
  color: #1a73e8;
  font-weight: bold;
}

/* ==========================================================================
   Google Docs Multi-Tab Bar
   ========================================================================== */
.gdoc-tabs-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f1f3f4;
  border-bottom: 1px solid #dadce0;
  padding: 4px 16px;
  overflow-x: auto;
  z-index: 10;
}

.gdoc-tabs-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #5f6368;
  margin-right: 4px;
}

.gdoc-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #3c4043;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.gdoc-tab-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #202124;
}

.gdoc-tab-btn.active {
  background: #ffffff;
  color: #1a73e8;
  border-color: #dadce0;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.15);
  font-weight: 600;
}

/* ==========================================================================
   Google Drive Comments Drawer
   ========================================================================== */
.comments-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(2px);
  z-index: 9998;
  display: flex;
  justify-content: flex-end;
  animation: fadeIn 0.2s ease;
}

.comments-drawer {
  width: 380px;
  max-width: 100vw;
  height: 100vh;
  background: #ffffff;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  z-index: 9999;
  animation: slideLeft 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideLeft {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.comments-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e8eaed;
}

.comments-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.comments-header-title h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #202124;
}

.comments-drawer-filters {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  border-bottom: 1px solid #f1f3f4;
  background: #fafbfc;
}

.filter-chip {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  background: transparent;
  border: 1px solid #dadce0;
  color: #5f6368;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-chip:hover {
  background: #f1f3f4;
}

.filter-chip.active {
  background: #e8f0fe;
  color: #1a73e8;
  border-color: #c2e7ff;
  font-weight: 600;
}

.comments-drawer-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.comment-card {
  background: #ffffff;
  border: 1px solid #e8eaed;
  border-radius: 8px;
  padding: 14px;
  box-shadow: 0 1px 3px rgba(60, 64, 67, 0.08);
  transition: box-shadow 0.15s ease;
}

.comment-card:hover {
  box-shadow: 0 2px 8px rgba(60, 64, 67, 0.15);
}

.comment-card.is-resolved {
  opacity: 0.75;
  background: #fafafa;
}

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

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

.comment-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.comment-avatar-placeholder {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #1a73e8;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
}

.comment-date {
  display: block;
  font-size: 11px;
  color: #5f6368;
}

.comment-status-tag {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.comment-status-tag.open {
  background: #e6f4ea;
  color: #137333;
}

.comment-status-tag.resolved {
  background: #f1f3f4;
  color: #5f6368;
}

.comment-quote-box {
  display: flex;
  gap: 8px;
  background: #f8f9fa;
  border-left: 3px solid #1a73e8;
  padding: 6px 10px;
  margin: 8px 0;
  border-radius: 0 4px 4px 0;
  font-size: 12px;
  color: #3c4043;
}

.comment-body-text {
  font-size: 13.5px;
  color: #202124;
  line-height: 1.45;
  margin-top: 6px;
}

.comment-replies-thread {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #f1f3f4;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.comment-reply-item {
  background: #f8f9fa;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12.5px;
}

.reply-author {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2px;
  font-size: 11.5px;
  color: #3c4043;
}

/* ==========================================================================
   Interactive Dropdown Chip Popover
   ========================================================================== */
.chip-dropdown-popover {
  position: absolute;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18), 0 1px 4px rgba(0, 0, 0, 0.08);
  border: 1px solid #dadce0;
  padding: 6px;
  z-index: 10000;
  min-width: 160px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: fadeIn 0.15s ease;
}

.chip-dropdown-option-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  background: transparent;
  border: none;
  font-size: 13px;
  font-weight: 500;
  color: #202124;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s ease;
}

.chip-dropdown-option-btn:hover {
  background: #f1f3f4;
}

.chip-dropdown-option-btn.selected {
  background: #e8f0fe;
  color: #1a73e8;
  font-weight: 600;
}

.chip-opt-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ==========================================================================
   Suggestion Review Popover
   ========================================================================== */
.suggestion-review-popover {
  position: absolute;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  border: 1px solid #dadce0;
  padding: 12px 14px;
  z-index: 10000;
  min-width: 220px;
  animation: fadeIn 0.15s ease;
}

.sug-popover-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  font-size: 12px;
  color: #5f6368;
}

.sug-popover-meta strong {
  color: #202124;
}

.sug-badge {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 3px;
}

.sug-badge.insertion {
  background: #e6f4ea;
  color: #137333;
}

.sug-badge.deletion {
  background: #fce8e6;
  color: #c5221f;
}

.sug-popover-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.sug-action-btn {
  flex: 1;
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.sug-action-btn.accept {
  background: #137333;
  color: #ffffff;
}

.sug-action-btn.accept:hover {
  background: #0d5a26;
}

.sug-action-btn.reject {
  background: #ffffff;
  border-color: #dadce0;
  color: #5f6368;
}

.sug-action-btn.reject:hover {
  background: #f1f3f4;
  color: #c5221f;
}

/* ==========================================================================
   Watermark Backdrop Overlay
   ========================================================================== */
.sheet-watermark-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.15;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  z-index: 1;
}

/* ==========================================================================
   In-Stream Google Drive Comments & Action Items Section
   ========================================================================== */
.doc-collaboration-stream-section {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 2px dashed #dadce0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stream-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

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

.stream-header-left h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #202124;
}

.stream-badge {
  font-size: 12px;
  font-weight: 600;
  color: #1a73e8;
  background: #e8f0fe;
  padding: 2px 8px;
  border-radius: 12px;
}

.stream-comments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.stream-comment-card {
  background: #f8f9fa;
  border: 1px solid #e8eaed;
  border-radius: 8px;
  padding: 12px;
  font-size: 13px;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.05);
}

.stream-comment-card.resolved {
  opacity: 0.7;
  background: #ffffff;
}

.stream-comment-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

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

.stream-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.stream-avatar-placeholder {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #1a73e8;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stream-date {
  font-size: 11px;
  color: #5f6368;
  margin-left: 4px;
}

.stream-tag {
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 3px;
  text-transform: uppercase;
}

.stream-tag.tag-open {
  background: #e6f4ea;
  color: #137333;
}

.stream-tag.tag-resolved {
  background: #f1f3f4;
  color: #5f6368;
}

.stream-quote {
  font-size: 11.5px;
  color: #3c4043;
  background: #ffffff;
  border-left: 3px solid #1a73e8;
  padding: 4px 8px;
  margin: 6px 0;
  border-radius: 0 4px 4px 0;
}

.stream-content {
  font-size: 12.5px;
  color: #202124;
  line-height: 1.4;
}

/* ==========================================================================
   LEEMA SPREADSHEET CANVAS STYLES
   ========================================================================== */
.leema-sheet-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  background: #ffffff;
  outline: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  user-select: none;
}

.leema-sheet-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  gap: 12px;
}

.sheet-toolbar-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.sheet-tool-btn {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 500;
  color: #334155;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.sheet-tool-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.sheet-tool-btn.active {
  background: #e0f2fe;
  color: #0284c7;
  border-color: #38bdf8;
}

.sheet-tool-divider {
  width: 1px;
  height: 20px;
  background: #cbd5e1;
  margin: 0 4px;
}

.leema-sheet-formulabar {
  display: flex;
  align-items: center;
  padding: 4px 14px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  gap: 8px;
  font-size: 12px;
}

.sheet-cell-address {
  font-weight: 700;
  color: #0284c7;
  min-width: 44px;
  text-align: center;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 4px;
  padding: 2px 6px;
}

.sheet-fx-symbol {
  font-style: italic;
  font-weight: 700;
  color: #64748b;
  font-size: 14px;
}

.sheet-formula-input {
  flex: 1;
  height: 26px;
  padding: 2px 8px;
  font-size: 12.5px;
  border: 1px solid transparent;
  border-radius: 4px;
  outline: none;
  font-family: monospace, sans-serif;
  color: #0f172a;
}

.sheet-formula-input:focus {
  border-color: #38bdf8;
  background: #f8fafc;
}

.leema-sheet-grid-wrapper {
  flex: 1;
  overflow: auto;
  position: relative;
  background: #ffffff;
}

.leema-sheet-table {
  border-collapse: collapse;
  table-layout: fixed;
  width: max-content;
  font-size: 12px;
}

.sheet-corner-header {
  width: 46px;
  height: 24px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  position: sticky;
  top: 0;
  left: 0;
  z-index: 4;
  color: #64748b;
  font-weight: 600;
}

.sheet-col-header {
  min-width: 100px;
  width: 110px;
  height: 24px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  text-align: center;
  font-weight: 600;
  color: #475569;
  position: sticky;
  top: 0;
  z-index: 2;
}

.sheet-col-header.header-selected,
.sheet-row-header.header-selected {
  background: #e0f2fe;
  color: #0284c7;
}

.sheet-row-header {
  width: 46px;
  height: 24px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  text-align: center;
  font-weight: 600;
  color: #475569;
  position: sticky;
  left: 0;
  z-index: 2;
}

.sheet-cell {
  height: 24px;
  border: 1px solid #e2e8f0;
  padding: 0 6px;
  background: #ffffff;
  color: #1e293b;
  cursor: cell;
  position: relative;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sheet-cell.cell-selected {
  outline: 2px solid #0284c7;
  outline-offset: -2px;
  background: #f0f9ff;
  z-index: 1;
}

.sheet-inline-editor {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  padding: 0 6px;
  font-size: 12px;
  font-family: inherit;
  background: #ffffff;
  z-index: 3;
}

/* ==========================================================================
   LEEMA SLIDES CANVAS STYLES
   ========================================================================== */
.leema-slides-app {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  background: #f8fafc;
}

.leema-slides-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
}

.slides-toolbar-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.slides-tool-btn {
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 500;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  cursor: pointer;
}

.slides-tool-btn:hover {
  background: #f1f5f9;
}

.slides-layout-select {
  padding: 5px 8px;
  font-size: 12.5px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
}

.slides-present-btn {
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 600;
  background: #f59e0b;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.slides-present-btn:hover {
  background: #d97706;
}

.leema-slides-workspace {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.slides-thumb-rail {
  width: 220px;
  background: #f1f5f9;
  border-right: 1px solid #e2e8f0;
  overflow-y: auto;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.slides-thumb-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.slides-thumb-num {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  width: 18px;
}

.slides-thumb-preview {
  flex: 1;
  height: 90px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.slides-thumb-item.is-active .slides-thumb-preview {
  border: 2px solid #f59e0b;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.25);
}

.thumb-title {
  font-size: 11px;
  font-weight: 600;
  color: #1e293b;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.thumb-meta {
  font-size: 9.5px;
  color: #94a3b8;
  text-transform: uppercase;
  font-weight: 700;
}

.slides-canvas-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
}

.slides-canvas-card {
  width: 100%;
  max-width: 820px;
  aspect-ratio: 16 / 9;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.slide-input-hero-title {
  font-size: 32px;
  font-weight: 800;
  border: none;
  outline: none;
  color: #0f172a;
  width: 100%;
  margin-bottom: 12px;
  text-align: center;
}

.slide-input-subtitle {
  font-size: 18px;
  color: #475569;
  border: none;
  outline: none;
  width: 100%;
  margin-bottom: 24px;
  text-align: center;
}

.slide-input-presenter {
  font-size: 13px;
  color: #94a3b8;
  border: none;
  outline: none;
  width: 100%;
  text-align: center;
}

.slide-input-title {
  font-size: 26px;
  font-weight: 700;
  border: none;
  outline: none;
  color: #0f172a;
  width: 100%;
  margin-bottom: 20px;
}

.slide-bullet-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.slide-bullet-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.slide-bullet-bullet {
  color: #f59e0b;
  font-size: 18px;
}

.slide-bullet-input {
  flex: 1;
  font-size: 16px;
  color: #334155;
  border: none;
  border-bottom: 1px dashed #cbd5e1;
  outline: none;
  padding: 2px 4px;
}

.slide-remove-bullet-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
}

.slide-add-bullet-btn {
  align-self: flex-start;
  background: transparent;
  border: 1px dashed #cbd5e1;
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 4px;
  cursor: pointer;
  color: #64748b;
}

.slide-stat-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.slide-input-stat-num {
  font-size: 64px;
  font-weight: 900;
  color: #f59e0b;
  border: none;
  outline: none;
  text-align: center;
  width: 100%;
}

.slide-input-stat-label {
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
  border: none;
  outline: none;
  text-align: center;
  width: 100%;
  margin-bottom: 8px;
}

.slide-input-stat-desc {
  font-size: 14px;
  color: #64748b;
  border: none;
  outline: none;
  text-align: center;
  width: 80%;
  resize: none;
}

.slide-two-cols-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.slide-column-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.slide-input-col-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  border: none;
  outline: none;
  background: transparent;
  margin-bottom: 8px;
}

.slide-input-col-text {
  font-size: 13.5px;
  color: #475569;
  border: none;
  outline: none;
  background: transparent;
  resize: none;
  line-height: 1.5;
}

.slides-speaker-notes {
  width: 100%;
  max-width: 820px;
  margin-top: 16px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 10px 14px;
}

.slides-speaker-notes label {
  font-size: 11.5px;
  font-weight: 700;
  color: #64748b;
  display: block;
  margin-bottom: 4px;
}

.slides-speaker-notes textarea {
  width: 100%;
  border: none;
  outline: none;
  font-size: 12.5px;
  color: #334155;
  resize: none;
}

/* Fullscreen Presenter Mode */
.leema-slides-stage.fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #0f172a;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.slides-exit-btn {
  position: absolute;
  top: 20px;
  right: 24px;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border: none;
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
}

.slides-stage-card {
  width: 90vw;
  max-width: 1100px;
  aspect-ratio: 16 / 9;
  background: #ffffff;
  border-radius: 12px;
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
}

.present-hero-title {
  font-size: 48px;
  font-weight: 800;
  color: #0f172a;
  text-align: center;
  margin: 0 0 16px 0;
}

.present-subtitle {
  font-size: 24px;
  color: #475569;
  text-align: center;
  margin: 0 0 32px 0;
}

.present-meta {
  font-size: 16px;
  color: #94a3b8;
  text-align: center;
}

.present-slide-title {
  font-size: 38px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 32px 0;
}

.present-bullet-list {
  list-style: disc;
  padding-left: 32px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.present-bullet-item {
  font-size: 22px;
  color: #334155;
  line-height: 1.4;
}

.present-stat-number {
  font-size: 84px;
  font-weight: 900;
  color: #f59e0b;
}

.present-stat-label {
  font-size: 26px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 12px;
}

.present-stat-desc {
  font-size: 18px;
  color: #64748b;
}

.present-cols-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}

.present-col h3 {
  font-size: 24px;
  color: #0f172a;
  margin: 0 0 12px 0;
}

.present-col p {
  font-size: 18px;
  color: #475569;
  line-height: 1.5;
}

.slides-present-controls {
  position: absolute;
  bottom: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(15, 23, 42, 0.8);
  padding: 8px 18px;
  border-radius: 24px;
}

.slides-ctrl-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

.slides-idx-pill {
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 600;
}

/* ==========================================================================
   LEEMA FORMS CANVAS STYLES
   ========================================================================== */
.leema-forms-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  background: #f1f5f9;
  overflow-y: auto;
}

.forms-subnav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 24px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.forms-subnav-tabs {
  display: flex;
  gap: 6px;
}

.forms-tab-btn {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  border: none;
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
}

.forms-tab-btn.active {
  color: #8b5cf6;
  background: #f5f3ff;
}

.forms-builder-stage,
.forms-preview-stage,
.forms-responses-stage {
  max-width: 720px;
  width: 100%;
  margin: 24px auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 16px 40px;
}

.forms-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 20px 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.forms-header-card {
  border-top: 6px solid #8b5cf6;
}

.forms-title-input {
  font-size: 26px;
  font-weight: 800;
  color: #1e293b;
  border: none;
  border-bottom: 1px solid transparent;
  outline: none;
  width: 100%;
  margin-bottom: 8px;
}

.forms-title-input:focus {
  border-bottom-color: #8b5cf6;
}

.forms-desc-input {
  font-size: 13.5px;
  color: #64748b;
  border: none;
  border-bottom: 1px solid transparent;
  outline: none;
  width: 100%;
  resize: none;
}

.forms-desc-input:focus {
  border-bottom-color: #8b5cf6;
}

.question-header-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.question-title-input {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
  border: none;
  border-bottom: 1px solid #cbd5e1;
  outline: none;
  padding: 4px 0;
}

.question-title-input:focus {
  border-bottom-color: #8b5cf6;
}

.question-type-select {
  padding: 6px 10px;
  font-size: 12.5px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #f8fafc;
}

.question-body {
  margin-bottom: 16px;
}

.preview-input-disabled,
.preview-textarea-disabled {
  font-size: 13px;
  color: #94a3b8;
  padding: 8px 12px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 4px;
}

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

.question-option-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.option-symbol {
  color: #94a3b8;
  font-size: 14px;
}

.option-label-input {
  flex: 1;
  font-size: 13.5px;
  border: none;
  border-bottom: 1px solid #e2e8f0;
  outline: none;
  padding: 2px 0;
}

.option-remove-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
}

.option-add-btn {
  align-self: flex-start;
  background: transparent;
  border: none;
  color: #8b5cf6;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
}

.question-footer-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  border-top: 1px solid #f1f5f9;
  padding-top: 12px;
}

.question-toggle-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: #64748b;
  cursor: pointer;
}

.question-del-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 14px;
}

/* Respondent View */
.forms-respondent-sheet {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.respondent-header h1 {
  font-size: 26px;
  margin: 0 0 8px 0;
}

.respondent-header p {
  font-size: 13.5px;
  color: #64748b;
  margin: 0;
}

.respondent-q-title {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 10px;
}

.req-star {
  color: #ef4444;
}

.respondent-text-input,
.respondent-textarea,
.respondent-select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13.5px;
  outline: none;
}

.respondent-choice-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.respondent-radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: #334155;
  cursor: pointer;
}

.respondent-rating-group {
  display: flex;
  gap: 8px;
}

.rating-pill-btn {
  padding: 8px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  background: #ffffff;
  color: #64748b;
  font-size: 13px;
  cursor: pointer;
}

.rating-pill-btn.active {
  background: #8b5cf6;
  color: #ffffff;
  border-color: #8b5cf6;
}

.submit-form-btn {
  background: #8b5cf6;
  color: #ffffff;
  border: none;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
}

.form-submit-success-banner {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 14px;
}

/* Responses Table */
.summary-count-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px 20px;
  display: inline-flex;
  flex-direction: column;
}

.summary-count-num {
  font-size: 32px;
  font-weight: 800;
  color: #8b5cf6;
}

.summary-count-label {
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
}

.responses-table-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 20px;
}

.responses-table-wrapper {
  overflow-x: auto;
}

.responses-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.responses-table th,
.responses-table td {
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  text-align: left;
}

.responses-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #475569;
}

/* ==========================================================================
   FULL-BLEED SUBAPP VIEWPORT (CALC, IMPRESS, FORMS, CALENDAR)
   ========================================================================== */
.desk-pad.full-bleed {
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: stretch !important;
  align-items: stretch !important;
  width: 100% !important;
  height: 100% !important;
  background: #ffffff !important;
  overflow: hidden !important;
}

/* ==========================================================================
   CORNER APP SWITCHER (SUITE LAUNCHER)
   ========================================================================== */
.leema-app-switcher-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  z-index: 1010;
}

.app-switcher-trigger-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.app-switcher-trigger-btn:hover,
.app-switcher-trigger-btn.is-open {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.08);
}

.app-switcher-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 320px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18), 0 3px 10px rgba(0, 0, 0, 0.08);
  z-index: 99999;
  overflow: hidden;
  animation: switcherFadeIn 0.15s ease-out;
}

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

.switcher-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 8px;
  border-bottom: 1px solid #f1f5f9;
}

.switcher-header-brand {
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.switcher-header-hint {
  font-size: 11px;
  color: #64748b;
}

.switcher-apps-grid {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.switcher-app-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: all 0.15s ease;
}

.switcher-app-item:hover {
  background: #f8fafc !important;
}

.switcher-app-icon-badge {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.switcher-app-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.switcher-app-title {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.2;
}

.switcher-app-desc {
  font-size: 11.5px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.switcher-current-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.switcher-dropdown-footer {
  padding: 8px 16px;
  background: #f8fafc;
  border-top: 1px solid #f1f5f9;
  text-align: center;
}

.switcher-footer-cloud {
  font-size: 11px;
  font-weight: 600;
  color: #0284c7;
}

/* ==========================================================================
   LEEMA CALENDAR & MEETINGS HUB
   ========================================================================== */
.leema-calendar-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  background: #f8fafc;
  overflow-y: auto;
}

.calendar-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.calendar-topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.calendar-topbar-left h2 {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.calendar-badge-sub {
  font-size: 11.5px;
  font-weight: 600;
  color: #0369a1;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 12px;
  padding: 2px 8px;
}

.calendar-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.calendar-notice-banner {
  background: #f0f9ff;
  color: #0369a1;
  border-bottom: 1px solid #bae6fd;
  padding: 8px 24px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.calendar-stage {
  max-width: 900px;
  width: 100%;
  margin: 24px auto;
  padding: 0 16px 40px;
}

.calendar-events-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.meeting-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-left: 5px solid #0369a1;
  border-radius: 8px;
  padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.15s ease;
}

.meeting-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: #cbd5e1;
  border-left-color: #0284c7;
}

.meeting-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.meeting-time-badge {
  display: flex;
  align-items: center;
  gap: 8px;
}

.meeting-date {
  font-size: 12.5px;
  font-weight: 700;
  color: #0369a1;
  background: #f0f9ff;
  padding: 2px 8px;
  border-radius: 4px;
}

.meeting-hours {
  font-size: 12px;
  color: #64748b;
}

.meeting-delete-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 14px;
}

.meeting-delete-btn:hover {
  color: #ef4444;
}

.meeting-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 6px 0;
}

.meeting-desc {
  font-size: 13px;
  color: #475569;
  line-height: 1.4;
  margin: 0 0 10px 0;
}

.meeting-attendees-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.attendees-label {
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
}

.attendee-chip {
  font-size: 11.5px;
  background: #f1f5f9;
  color: #334155;
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.meeting-card-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid #f1f5f9;
  padding-top: 12px;
}

.meeting-action-btn {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
}

.meeting-action-btn.notes-btn {
  background: #f0f9ff;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.meeting-action-btn.notes-btn:hover {
  background: #e0f2fe;
}

.meeting-action-btn.link-btn {
  background: transparent;
  color: #64748b;
  border: 1px solid #cbd5e1;
}

.meeting-action-btn.link-btn:hover {
  background: #f8fafc;
}

/* Modal for scheduling meeting */
.calendar-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.calendar-modal-sheet {
  width: 100%;
  max-width: 480px;
  background: #ffffff;
  border-radius: 10px;
  padding: 24px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
}

.calendar-modal-sheet h3 {
  margin: 0 0 16px 0;
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
}

.calendar-modal-sheet label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 4px;
}

.calendar-modal-sheet input,
.calendar-modal-sheet textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
}

.calendar-modal-sheet input:focus,
.calendar-modal-sheet textarea:focus {
  border-color: #0369a1;
}

.calendar-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

/* ==========================================================================
   Hero Product Window Showcase
   ========================================================================== */
.hero-preview-showcase {
  margin-top: 48px;
  width: 100%;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.hero-product-window {
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  overflow: hidden;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.05),
    0 20px 48px -12px rgba(15, 23, 42, 0.12),
    0 0 0 1px rgba(0, 0, 0, 0.02);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.hero-product-window:hover {
  transform: translateY(-2px);
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.05),
    0 24px 60px -12px rgba(15, 23, 42, 0.16);
}

.product-window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.window-controls {
  display: flex;
  gap: 6px;
}

.window-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #cbd5e1;
}

.window-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60%;
}

.window-title .doc-icon {
  font-size: 13px;
}

.window-action {
  display: flex;
  align-items: center;
}

.window-open-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #1f4e8c;
  cursor: pointer;
  transition: all 150ms ease;
}

.window-open-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.product-window-body {
  position: relative;
  cursor: pointer;
  background: #ffffff;
  overflow: hidden;
}

.product-screenshot {
  width: 100%;
  height: auto;
  display: block;
}

.showcase-caption {
  margin-top: 14px;
  font-size: 13px;
  color: #64748b;
  text-align: center;
}

/* ==========================================================================
   Suite App Strip Section
   ========================================================================== */
.suite-app-strip-section {
  padding: 80px 0 60px;
  background: #ffffff;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}

.suite-strip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.suite-strip-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 20px;
  text-decoration: none;
  transition: all 200ms ease;
  position: relative;
}

.suite-strip-card:hover {
  border-color: var(--app-color);
  box-shadow: 0 10px 24px -4px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.strip-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.suite-strip-card h3 {
  margin: 0 0 4px 0;
  font-size: 16px;
  font-weight: 700;
}

.strip-card-slug {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: #64748b;
  margin-bottom: 10px;
}

.suite-strip-card p {
  margin: 0;
  font-size: 12.5px;
  color: #475569;
  line-height: 1.5;
  flex-grow: 1;
}

.strip-card-footer {
  margin-top: 16px;
  font-size: 12.5px;
  font-weight: 600;
}

/* ==========================================================================
   Leema Files & Workspace Hub (FilesPage)
   ========================================================================== */
.leema-files-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  color: #0f172a;
}

.files-container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

.files-header {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 64px;
}

.files-brand-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.files-brand-btn .brand-title {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.files-brand-btn .brand-section {
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
  padding-left: 8px;
  border-left: 1px solid #cbd5e1;
}

.files-search-bar {
  flex: 1;
  max-width: 540px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 14px;
  color: #64748b;
}

.files-search-bar input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-size: 13.5px;
  color: #0f172a;
}

.clear-search-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #94a3b8;
  padding: 2px;
}

.files-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ghost-btn {
  background: none;
  border: 1px solid #cbd5e1;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
}

.ghost-btn:hover {
  background: #f1f5f9;
}

.user-profile-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 4px 12px 4px 4px;
  cursor: pointer;
}

.user-avatar-badge {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

.user-name-text {
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
}

.files-main {
  padding: 36px 24px 64px;
  flex: 1;
}

.quick-create-section {
  margin-bottom: 32px;
}

.section-title-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
}

.section-title-row h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}

.section-hint {
  font-size: 12.5px;
  color: #64748b;
}

.quick-create-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}

.create-app-card {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 18px;
  text-align: left;
  cursor: pointer;
  transition: all 180ms ease;
  display: flex;
  flex-direction: column;
}

.create-app-card:hover {
  border-color: var(--card-accent);
  box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.card-top-icon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.app-icon-circle {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
}

.card-badge {
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid transparent;
}

.card-info h3 {
  margin: 0 0 4px 0;
  font-size: 15px;
  font-weight: 700;
}

.card-info p {
  margin: 0;
  font-size: 12px;
  color: #64748b;
  line-height: 1.45;
}

/* Featured Physics Card */
.featured-physics-card {
  background: #ffffff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 36px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 28px;
  align-items: center;
  box-shadow: 0 4px 16px rgba(31, 78, 140, 0.06);
}

.featured-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 600;
  color: #1f4e8c;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.featured-tag .pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #1f4e8c;
}

.featured-content h3 {
  margin: 0 0 10px 0;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
}

.featured-content p {
  margin: 0 0 18px 0;
  font-size: 13px;
  color: #475569;
  line-height: 1.55;
}

.featured-cta-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.primary-btn {
  background: #1f4e8c;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 8px 18px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 150ms ease;
}

.primary-btn:hover {
  background: #163a69;
}

.physics-meta {
  font-size: 12px;
  color: #64748b;
}

.featured-preview-thumb {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.featured-preview-thumb img {
  width: 100%;
  height: auto;
  display: block;
}

/* Files Browser Section */
.files-browser-section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
}

.browser-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
}

.filter-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-chip {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  transition: all 150ms ease;
}

.filter-chip.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

.browser-stats {
  font-size: 12px;
  color: #94a3b8;
}

.files-table-wrapper {
  overflow-x: auto;
}

.files-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.files-table th {
  padding: 10px 14px;
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #e2e8f0;
}

.files-table td {
  padding: 14px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
}

.file-row {
  cursor: pointer;
  transition: background 120ms ease;
}

.file-row:hover {
  background: #f8fafc;
}

.file-row.is-current {
  background: #eff6ff;
}

.file-title-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.file-type-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-name-meta {
  display: flex;
  flex-direction: column;
}

.file-name-link {
  font-size: 13.5px;
  font-weight: 600;
  color: #0f172a;
  text-decoration: none;
}

.file-url-slug {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  color: #94a3b8;
}

.app-tag {
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 12px;
  border: 1px solid transparent;
}

.date-text {
  color: #64748b;
  font-size: 12.5px;
}

.row-action-btn {
  background: none;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 4px 8px;
  color: #64748b;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 6px;
  font-size: 12px;
}

.row-action-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.row-action-btn.delete-btn:hover {
  color: #ef4444;
  border-color: #fca5a5;
  background: #fef2f2;
}

.empty-files-state {
  text-align: center;
  padding: 48px 24px;
}

.empty-files-state .empty-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.empty-files-state h3 {
  margin: 0 0 6px 0;
  font-size: 16px;
  font-weight: 700;
}

.empty-files-state p {
  margin: 0 0 20px 0;
  font-size: 13px;
  color: #64748b;
}

@media (max-width: 860px) {
  .featured-physics-card {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   OFFICE PRODUCTIVITY TOOLS MODALS & CANVAS STYLING
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  background: var(--chrome-2, #f8fafc);
  border-bottom: 1px solid var(--hairline, #cbd5e1);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 18px;
  background: var(--chrome-2, #f8fafc);
  border-top: 1px solid var(--hairline, #cbd5e1);
}

.close-btn {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: var(--ink-muted, #475569);
  cursor: pointer;
  transition: all 120ms ease;
}

.close-btn:hover {
  background: #fee2e2;
  color: #dc2626;
}

.char-map-modal,
.thesaurus-modal,
.shapes-modal,
.charts-modal,
.citations-modal {
  background: var(--paper, #ffffff);
  border-radius: 8px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.25);
  width: 92%;
  max-width: 580px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--hairline, #cbd5e1);
  animation: modalPopIn 160ms cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Character Map */
.char-map-nav {
  display: flex;
  gap: 6px;
  padding: 10px 16px;
  overflow-x: auto;
  background: var(--chrome-2, #f8fafc);
  border-bottom: 1px solid var(--hairline, #cbd5e1);
}

.cat-pill {
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--hairline, #cbd5e1);
  background: #ffffff;
  color: var(--ink-muted, #475569);
  cursor: pointer;
  white-space: nowrap;
  transition: all 120ms ease;
}

.cat-pill:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.cat-pill.is-active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

.char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
  gap: 6px;
  padding: 16px;
  max-height: 320px;
  overflow-y: auto;
  background: #ffffff;
}

.char-tile {
  aspect-ratio: 1;
  border: 1px solid var(--hairline, #cbd5e1);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  background: #ffffff;
  transition: all 120ms ease;
  user-select: none;
}

.char-tile:hover {
  background: #eff6ff;
  border-color: #3b82f6;
  transform: scale(1.12);
  z-index: 2;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.15);
}

.char-glyph {
  line-height: 1;
  color: #0f172a;
}

/* Thesaurus */
.thesaurus-search-row {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: var(--chrome-2, #f8fafc);
  border-bottom: 1px solid var(--hairline, #cbd5e1);
}

.thesaurus-input {
  flex: 1;
  border: 1px solid var(--hairline, #cbd5e1);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 14px;
  outline: none;
}

.thesaurus-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.thesaurus-results {
  padding: 16px;
  max-height: 340px;
  overflow-y: auto;
}

.thesaurus-word-title {
  font-size: 13px;
  margin-bottom: 10px;
  color: var(--ink-muted, #475569);
}

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

.synonym-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  transition: all 120ms ease;
}

.synonym-card:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.synonym-text {
  font-size: 14px;
  font-weight: 500;
  color: #1e293b;
}

.synonym-insert-btn {
  font-size: 12px;
  font-weight: 600;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 4px;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 120ms ease;
}

.synonym-insert-btn:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

/* Shapes & Charts */
.shapes-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 16px;
  max-height: 420px;
  overflow-y: auto;
}

.shape-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 14px;
  cursor: pointer;
  transition: all 150ms ease;
  background: #ffffff;
}

.shape-card:hover {
  border-color: #2563eb;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.12);
  transform: translateY(-2px);
}

.shape-preview {
  margin-bottom: 8px;
  pointer-events: none;
}

.shape-title {
  font-weight: 600;
  font-size: 13px;
  color: #1e293b;
}

.shape-desc {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

/* Citations Form */
.citations-modal .field-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.citations-modal label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted, #475569);
}

.citations-modal .modal-input,
.citations-modal .modal-select {
  width: 100%;
  border: 1px solid var(--hairline, #cbd5e1);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13.5px;
  outline: none;
  background: #ffffff;
  color: var(--ink, #0f172a);
}

.citations-modal .modal-input:focus,
.citations-modal .modal-select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

/* Watermark Text Overlay */
.sheet-watermark-overlay-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-45deg);
  font-size: 72px;
  font-weight: 900;
  letter-spacing: 0.18em;
  color: rgba(203, 213, 225, 0.38);
  pointer-events: none;
  user-select: none;
  z-index: 10;
  white-space: nowrap;
  text-transform: uppercase;
  font-family: var(--font-ui, "IBM Plex Sans", sans-serif);
}

/* Gridlines Pattern */
.page.has-gridlines,
.sheet-page.has-gridlines {
  background-image:
    linear-gradient(to right, rgba(203, 213, 225, 0.4) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(203, 213, 225, 0.4) 1px, transparent 1px) !important;
  background-size: 24px 24px !important;
}

/* Reading View Mode */
.page-stage.reading-mode {
  background: #f8fafc;
  padding: 40px 0;
}

.page-stage.reading-mode .page {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
  max-width: 820px;
  margin: 0 auto;
}

.page-stage.reading-mode .sheet-header-band,
.page-stage.reading-mode .sheet-footer-band,
.page-stage.reading-mode .crop {
  display: none !important;
}

/* Dark Canvas Mode */
.page-stage.dark-canvas {
  background: #0f172a !important;
}

/* Table of Contents Card */
.doc-toc-card {
  user-select: none;
  font-family: var(--font-ui, "IBM Plex Sans", sans-serif);
}









