:root {
  --linear-ink: #1a1a1a;
  --linear-muted: #73777f;
  --linear-canvas: #f8f9fa;
  --linear-rail: #f1f3f5;
  --linear-line: rgba(0, 0, 0, 0.06);
  --linear-accent: #5460de;
  --linear-danger: #c33d4e;
}

/* Email center final polish: loaded after global theme resets. */
#emailView .email-account-panel,
#emailView .email-inbox-panel,
#emailView .email-detail-panel {
  border-color: var(--email-line) !important;
  border-radius: 10px !important;
  background: #fff !important;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04) !important;
}

#emailView .email-account-panel {
  padding: 18px !important;
  max-height: calc(100vh - 112px) !important;
  overflow: auto !important;
}

#emailView .email-inbox-panel {
  height: calc(100vh - 112px) !important;
  overflow: hidden !important;
  padding: 18px !important;
}

#emailView .email-account-form {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

#emailView .email-account-form input:not([type="checkbox"]),
#emailView .email-filters select,
#emailView .email-filters input[type="search"] {
  min-height: 36px !important;
  border-color: var(--email-line) !important;
  border-radius: 6px !important;
  background: #fff !important;
  padding: 8px 10px !important;
}

#emailView .email-account-form input:not([type="checkbox"]):focus,
#emailView .email-filters select:focus,
#emailView .email-filters input[type="search"]:focus {
  border-color: var(--email-accent) !important;
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08) !important;
}

#emailView #emailAccountSaveBtn {
  min-height: 38px !important;
  border-color: var(--email-accent) !important;
  background: var(--email-accent) !important;
  color: #fff !important;
}

#emailView #emailSyncBtn {
  min-height: 38px !important;
  padding: 0 14px !important;
  min-width: 88px !important;
  white-space: nowrap !important;
}

#emailView .email-add-toggle {
  width: 100% !important;
  min-height: 40px !important;
  margin: 14px 0 0 !important;
  border: 1px solid var(--email-line) !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: var(--email-ink) !important;
  font-weight: 800 !important;
}

#emailView .email-back-btn {
  min-height: 40px !important;
  border-color: var(--email-accent) !important;
  background: var(--email-accent) !important;
  color: #fff !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
}

#emailView .email-checkbox-row,
#emailView .email-unread-filter {
  border-color: var(--email-line) !important;
  background: #fff !important;
  color: #3d424b !important;
}

#emailView .email-checkbox-row input,
#emailView .email-unread-filter input {
  width: 16px !important;
  min-width: 16px !important;
  max-width: 16px !important;
  height: 16px !important;
  min-height: 16px !important;
  max-height: 16px !important;
  margin: 0 !important;
  padding: 0 !important;
  accent-color: var(--email-accent) !important;
}

#emailView .email-account-card,
#emailView .email-message-row,
#emailView .email-detail-meta,
#emailView .email-detail-body,
#emailView .email-attachments li {
  border-color: var(--email-line) !important;
  border-radius: 10px !important;
}

#emailView .email-account-card {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 34px !important;
  align-items: start !important;
  gap: 10px !important;
}

#emailView .email-account-card .danger {
  width: 32px !important;
  min-width: 32px !important;
  max-width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  padding: 0 !important;
}

#emailView .email-message-row.active {
  border-color: var(--email-line-strong) !important;
  background: #fbfbfc !important;
  box-shadow: inset 4px 0 var(--email-accent) !important;
}

#emailView .email-message-list {
  height: 100% !important;
  min-height: 0 !important;
  border: 1px solid var(--email-line) !important;
  border-radius: 10px !important;
  background: #fff !important;
}

#emailView .email-message-row {
  border: 0 !important;
  border-bottom: 1px solid var(--email-line) !important;
  border-radius: 0 !important;
  background: #fff !important;
  padding: 14px 18px 13px !important;
}

#emailView .email-message-row:hover,
#emailView .email-message-row.active {
  background: #fbfbfc !important;
}

#emailView .email-message-row:last-child {
  border-bottom: 0 !important;
}

/* Separate transfer assistant and OCR modes */
body:not(.inbox-mode-ocr) #inboxView .inbox-organize-divider,
body:not(.inbox-mode-ocr) #inboxView .inbox-copy,
body:not(.inbox-mode-ocr) #inboxView .inbox-source-grid,
body:not(.inbox-mode-ocr) #inboxView .inbox-selected-files,
body:not(.inbox-mode-ocr) #inboxView .inbox-console,
body:not(.inbox-mode-ocr) #inboxView .inbox-saved-path,
body:not(.inbox-mode-ocr) #inboxView .inbox-draft,
body:not(.inbox-mode-ocr) #inboxView .inbox-saved-section {
  display: none !important;
}

body.inbox-mode-ocr #inboxView .inbox-transfer,
body.inbox-mode-ocr #inboxView .inbox-organize-divider {
  display: none !important;
}

body:not(.inbox-mode-ocr) #inboxView {
  overflow: hidden !important;
}

body:not(.inbox-mode-ocr) #inboxView .inbox-panel {
  width: min(1195px, calc(100% - 48px)) !important;
  height: calc(100dvh - 96px) !important;
  min-height: calc(100vh - 96px) !important;
  max-height: calc(100dvh - 96px) !important;
  margin-top: 8px !important;
  padding: 0 !important;
  overflow: hidden !important;
}

#inboxView .inbox-transfer {
  height: 100% !important;
  min-height: 0 !important;
  max-height: 100% !important;
  grid-template-rows: auto minmax(0, 1fr) auto auto !important;
  gap: 0 !important;
  border: 0 !important;
  border-radius: 20px !important;
  padding: 0 !important;
  overflow: hidden !important;
}

#inboxView .inbox-transfer-head {
  padding: 14px 24px 10px;
  border-bottom: 1px solid #ececef;
}

#inboxView .inbox-transfer-messages {
  align-content: start;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 22px 8%;
  background: #f5f5f6;
}

#inboxView .inbox-transfer-item {
  width: min(72%, 620px) !important;
  display: flex !important;
  align-items: flex-end;
  gap: 8px;
  border: 0 !important;
  background: transparent !important;
  padding: 0 !important;
}

#inboxView .inbox-transfer-item.is-own {
  justify-self: end;
  flex-direction: row-reverse;
}

#inboxView .inbox-transfer-bubble {
  min-width: 100px;
  display: grid;
  gap: 8px;
  border-radius: 6px 16px 16px 16px;
  background: #ffffff;
  padding: 12px 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

#inboxView .inbox-transfer-item.is-own .inbox-transfer-bubble {
  border-radius: 16px 6px 16px 16px;
  background: #95ec69;
}

#inboxView .inbox-transfer-message-text {
  margin: 0;
  color: #171717;
  white-space: pre-wrap;
  word-break: break-word;
}

#inboxView .inbox-transfer-bubble > small {
  color: rgba(0, 0, 0, 0.48);
  text-align: right;
}

#inboxView .inbox-transfer-image img {
  width: min(300px, 100%);
  max-height: 320px;
  border-radius: 10px;
  object-fit: cover;
}

#inboxView .inbox-transfer-file-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 240px;
}

#inboxView .inbox-transfer-file-card > i {
  font-size: 34px;
}

#inboxView .inbox-transfer-file-card span {
  min-width: 0;
  display: grid;
  gap: 4px;
}

#inboxView .inbox-transfer-actions {
  opacity: 0;
  transition: opacity 120ms ease;
}

#inboxView .inbox-transfer-item:hover .inbox-transfer-actions {
  opacity: 1;
}

#inboxView .inbox-transfer-composer {
  grid-template-columns: 44px minmax(0, 1fr) 44px !important;
  align-items: end;
  padding: 10px 20px 14px;
  border-top: 0;
  background: transparent;
}

#inboxView .inbox-transfer-composer input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

#inboxView .inbox-transfer-composer textarea {
  min-height: 44px !important;
  max-height: 140px;
  resize: vertical !important;
}

#inboxView .inbox-transfer-composer > button {
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 12px;
}

#inboxView .inbox-transfer-attach {
  background: #f1f2f4;
  color: #3f3f46;
}

#inboxView .inbox-transfer-state {
  min-height: 20px;
  padding: 0 20px 10px;
  background: #ffffff;
}

/* Recall Inbox transfer station */
#inboxView .inbox-transfer {
  display: grid;
  gap: 16px;
  border: 1px solid #e4e7ec;
  border-radius: 18px;
  background: #ffffff;
  padding: 22px;
}

#inboxView .inbox-transfer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

#inboxView .inbox-transfer-head h3 {
  margin: 4px 0 6px;
  color: #171717;
  font-size: 22px;
}

#inboxView .inbox-transfer-head p {
  margin: 0;
  color: #71717a;
  line-height: 1.6;
}

#inboxView .inbox-transfer-dropzone {
  position: relative;
  min-height: 128px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px dashed #cbd5e1;
  border-radius: 15px;
  background: #fafafa;
  color: #52525b;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}

#inboxView .inbox-transfer-dropzone.dragover,
#inboxView .inbox-transfer-dropzone:focus-visible {
  border-color: #18181b;
  background: #f4f4f5;
  outline: 0;
}

#inboxView .inbox-transfer-dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

#inboxView .inbox-transfer-dropzone i {
  color: #18181b;
  font-size: 22px;
}

#inboxView .inbox-transfer-dropzone span,
#inboxView .inbox-transfer-state {
  color: #8a8a91;
  font-size: 13px;
}

#inboxView .inbox-transfer-text-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

#inboxView .inbox-transfer-text-form textarea {
  min-height: 82px;
  resize: vertical;
  border: 1px solid #e4e4e7;
  border-radius: 13px;
  background: #ffffff;
  padding: 12px 14px;
}

#inboxView .inbox-transfer-text-form button {
  min-height: 44px;
}

#inboxView .inbox-transfer-list {
  display: grid;
  gap: 8px;
}

#inboxView .inbox-transfer-group {
  margin: 14px 0 2px;
  color: #71717a;
  font-size: 13px;
}

#inboxView .inbox-transfer-item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid #eeeeef;
  border-radius: 13px;
  background: #ffffff;
  padding: 12px;
}

#inboxView .inbox-transfer-item-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #f4f4f5;
  color: #52525b;
}

#inboxView .inbox-transfer-item > div:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 4px;
}

#inboxView .inbox-transfer-item strong,
#inboxView .inbox-transfer-item p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#inboxView .inbox-transfer-item p {
  margin: 0;
  color: #52525b;
  font-size: 13px;
}

#inboxView .inbox-transfer-item small {
  color: #8a8a91;
}

#inboxView .inbox-transfer-actions {
  display: flex;
  gap: 6px;
}

#inboxView .inbox-transfer-actions a,
#inboxView .inbox-transfer-actions button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 0;
  border-radius: 9px;
  background: #f4f4f5;
  color: #3f3f46;
  padding: 0 10px;
  font-size: 12px;
  text-decoration: none;
}

#inboxView .inbox-transfer-actions .danger {
  color: #dc2626;
}

#inboxView .inbox-organize-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #a1a1aa;
  font-size: 12px;
}

#inboxView .inbox-organize-divider::before,
#inboxView .inbox-organize-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: #eeeeef;
}

@media (max-width: 760px) {
  #inboxView .inbox-transfer-text-form,
  #inboxView .inbox-transfer-item {
    grid-template-columns: 1fr;
  }

  #inboxView .inbox-transfer-item-icon {
    display: none;
  }

  #inboxView .inbox-transfer-actions {
    justify-content: flex-start;
  }
}

/* Final shared AI composer theme. Existing layout controls size and position. */
:where(#workspaceChatForm, #marketingAnalysisForm, #marketingReviewAskForm, #messageFollowupForm) {
  border: 1px solid var(--linear-line) !important;
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.04) !important;
  transition: border-color 220ms ease, box-shadow 260ms ease, transform 260ms cubic-bezier(0.16, 1, 0.3, 1) !important;
}

:where(#workspaceChatForm, #marketingAnalysisForm, #marketingReviewAskForm, #messageFollowupForm):focus-within {
  border-color: var(--linear-ink) !important;
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.07) !important;
  transform: translateY(-1px) !important;
}

:where(#workspaceChatForm, #marketingAnalysisForm, #marketingReviewAskForm, #messageFollowupForm) textarea,
.ai-composer-field textarea {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--linear-ink) !important;
  outline: 0 !important;
  resize: none !important;
}

:where(#workspaceChatForm, #marketingAnalysisForm, #marketingReviewAskForm, #messageFollowupForm) textarea::placeholder,
.ai-composer-field textarea::placeholder {
  color: #9ca3af !important;
}

.ai-composer-field {
  padding: 12px 14px !important;
  border: 1px solid var(--linear-line) !important;
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.035) !important;
  transition: border-color 220ms ease, box-shadow 260ms ease, transform 260ms cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.ai-composer-field:focus-within {
  border-color: var(--linear-ink) !important;
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.07) !important;
  transform: translateY(-1px) !important;
}

.ai-composer-field textarea {
  width: 100% !important;
  padding: 8px 2px !important;
}

:where(#workspaceChatForm, #marketingAnalysisForm, #marketingReviewAskForm, #messageFollowupForm) select {
  border: 1px solid rgba(0, 0, 0, 0.07) !important;
  border-radius: 8px !important;
  background: #f9fafb !important;
  color: #6b7280 !important;
  box-shadow: none !important;
}

:where(.ai-send-button, #homeChatSendBtn, #messageFollowupSendBtn) {
  width: 40px !important;
  min-width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  display: inline-grid !important;
  place-items: center !important;
  padding: 0 !important;
  border: 1px solid #bfdbfe !important;
  border-radius: 10px !important;
  background-color: #fff !important;
  background-image: none !important;
  color: #60a5fa !important;
  font-size: 14px !important;
  line-height: 1 !important;
  box-shadow: none !important;
  cursor: pointer !important;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease !important;
}

:where(.ai-send-button, #homeChatSendBtn, #messageFollowupSendBtn):not(:disabled):hover {
  border-color: #2563eb !important;
  background-color: #2563eb !important;
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.2) !important;
  transform: translateY(-1px) !important;
}

:where(.ai-send-button, #homeChatSendBtn, #messageFollowupSendBtn):disabled {
  border-color: #e5e7eb !important;
  background-color: #f9fafb !important;
  color: #d1d5db !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
}

:where(.ai-send-button, #homeChatSendBtn, #messageFollowupSendBtn) i {
  color: currentColor !important;
  transform: translateY(-1px) !important;
}

#workspaceChatForm .composer-icon.send.has-custom-send-icon {
  color: #60a5fa !important;
  background-image: none !important;
}

#marketingAnalysisForm {
  padding: 14px 16px !important;
}

#marketingAnalysisForm .field:first-of-type,
#marketingReviewAskForm textarea {
  min-width: 0 !important;
}

#marketingAnalysisForm .field:first-of-type textarea {
  padding: 8px 2px !important;
}

#inboxAskDialog .inbox-ask-footer {
  align-items: center !important;
}

#analysisForm > .ai-send-button {
  justify-self: end !important;
}

@media (max-width: 768px) {
  :where(.ai-send-button, #homeChatSendBtn, #messageFollowupSendBtn) {
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
  }
}

/* Scoped priority fix for legacy marketing detail button rules. */
@media (min-width: 761px) {
  .yesterday-analysis-wrapper #openMarketingDetailBtn#openMarketingDetailBtn.btn-primary-action {
    min-height: 38px !important;
    padding: 10px 18px !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: #1a1a1c !important;
    color: #ffffff !important;
    font-size: 13px !important;
    font-weight: 650 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
  }

  .yesterday-analysis-wrapper #openMarketingDetailBtn#openMarketingDetailBtn.btn-primary-action:hover:not(:disabled) {
    border: 0 !important;
    color: #ffffff !important;
    opacity: 0.92;
    transform: translateY(-0.5px);
  }
}

/* Scoped yesterday analysis rebuild: every selector is locked inside the wrapper. */
@media (min-width: 761px) {
  .yesterday-analysis-wrapper {
    position: relative;
    min-height: calc(100vh - 64px);
    padding: 0 32px 36px;
    overflow: hidden;
    background: #ffffff;
    color: #1c1c1e;
    --yesterday-ink: #1c1c1e;
    --yesterday-secondary: #48484a;
    --yesterday-tertiary: #8e8e93;
    --yesterday-charcoal: #1a1a1c;
    --yesterday-blue: #007aff;
    --yesterday-warn-bg: rgba(245, 158, 11, 0.04);
    --yesterday-warn-border: rgba(245, 158, 11, 0.12);
    --yesterday-warn-text: #b45309;
  }

  .yesterday-analysis-wrapper .dash-header-bar {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    background: #ffffff;
  }

  .yesterday-analysis-wrapper .dash-title-cluster {
    min-width: 0;
    display: grid;
    gap: 4px;
  }

  .yesterday-analysis-wrapper .dash-title-cluster .marketing-section-kicker,
  .yesterday-analysis-wrapper .dash-title-cluster p {
    display: none;
  }

  .yesterday-analysis-wrapper #marketingTodayTitle {
    margin: 0;
    color: var(--yesterday-ink);
    font-size: 24px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.5px;
  }

  .yesterday-analysis-wrapper .dash-control-cluster {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
  }

  .yesterday-analysis-wrapper .dash-meta-stack {
    display: grid;
    justify-items: end;
    gap: 4px;
    color: var(--yesterday-tertiary);
    font-size: 12px;
    line-height: 1.4;
  }

  .yesterday-analysis-wrapper .dash-breadcrumb,
  .yesterday-analysis-wrapper .dash-updated {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }

  .yesterday-analysis-wrapper .dash-breadcrumb strong {
    color: var(--yesterday-secondary);
    font-weight: 600;
  }

  .yesterday-analysis-wrapper .btn-primary-action {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 18px;
    border: 0;
    border-radius: 8px;
    background: var(--yesterday-charcoal);
    color: #ffffff;
    font-size: 13px;
    font-weight: 650;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .yesterday-analysis-wrapper .btn-primary-action:hover:not(:disabled) {
    opacity: 0.92;
    transform: translateY(-0.5px);
  }

  .yesterday-analysis-wrapper .btn-primary-action:disabled {
    cursor: not-allowed;
    opacity: 0.38;
  }

  .yesterday-analysis-wrapper .marketing-today-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 20px 0 18px;
  }

  .yesterday-analysis-wrapper .marketing-today-date,
  .yesterday-analysis-wrapper .marketing-today-actions > button,
  .yesterday-analysis-wrapper #marketingTodayState {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    background: #ffffff;
    color: var(--yesterday-secondary);
    font-size: 13px;
    font-weight: 600;
    box-shadow: none;
  }

  .yesterday-analysis-wrapper .marketing-today-date select {
    min-height: 0;
    height: 24px;
    padding: 0 18px 0 0;
    border: 0;
    background: transparent;
    color: var(--yesterday-secondary);
    font-size: 13px;
    font-weight: 650;
    appearance: none;
  }

  .yesterday-analysis-wrapper #marketingTodayState {
    margin-left: auto;
    border-color: rgba(0, 0, 0, 0.04);
    background: rgba(0, 0, 0, 0.025);
    color: var(--yesterday-tertiary);
  }

  .yesterday-analysis-wrapper .metrics-grid-container {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin: 0 0 32px;
  }

  .yesterday-analysis-wrapper .metric-card {
    min-height: 118px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 9px;
    padding: 20px;
    border: 1px solid rgba(0, 0, 0, 0.03);
    border-radius: 12px;
    background: #fcfcfc;
    box-shadow: none;
  }

  .yesterday-analysis-wrapper .metric-label {
    color: var(--yesterday-tertiary);
    font-size: 12px;
    font-weight: 650;
  }

  .yesterday-analysis-wrapper .metric-value-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
  }

  .yesterday-analysis-wrapper .metric-number {
    min-width: 0;
    overflow: hidden;
    color: var(--yesterday-ink);
    font-size: 24px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .yesterday-analysis-wrapper .compare-badge {
    flex: 0 0 auto;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
  }

  .yesterday-analysis-wrapper .compare-badge.up {
    background: rgba(34, 197, 94, 0.08);
    color: #16a34a;
  }

  .yesterday-analysis-wrapper .compare-badge.down {
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;
  }

  .yesterday-analysis-wrapper .compare-badge.flat {
    background: rgba(0, 0, 0, 0.04);
    color: var(--yesterday-tertiary);
  }

  .yesterday-analysis-wrapper .marketing-ai-summary,
  .yesterday-analysis-wrapper .marketing-today-conclusion {
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .yesterday-analysis-wrapper .ai-insights-panel {
    padding: 24px;
    border: 1px solid var(--yesterday-warn-border);
    border-radius: 14px;
    background: var(--yesterday-warn-bg);
    box-shadow: none;
  }

  .yesterday-analysis-wrapper .insights-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    color: var(--yesterday-warn-text);
    font-size: 14px;
    font-weight: 750;
  }

  .yesterday-analysis-wrapper .insights-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .yesterday-analysis-wrapper .insights-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: var(--yesterday-secondary);
    font-size: 13.5px;
    line-height: 1.6;
  }

  .yesterday-analysis-wrapper .warning-dot {
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    margin-top: 8px;
    border-radius: 999px;
    background: #f59e0b;
  }

  .yesterday-analysis-wrapper .insights-header .warning-dot {
    margin-top: 0;
  }

  .yesterday-analysis-wrapper .insights-empty {
    margin: 0;
    color: var(--yesterday-secondary);
    font-size: 13.5px;
    line-height: 1.6;
  }

  .yesterday-analysis-wrapper .ai-drawer-overlay {
    position: absolute;
    top: 0;
    right: -460px;
    z-index: 20;
    width: 450px;
    height: 100%;
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(0, 0, 0, 0.04);
    background: #ffffff;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.06);
    transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .yesterday-analysis-wrapper .ai-drawer-overlay.open {
    right: 0;
  }

  .yesterday-analysis-wrapper .drawer-header {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 24px 28px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    background: #ffffff;
  }

  .yesterday-analysis-wrapper .drawer-title {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--yesterday-ink);
    font-size: 16px;
    font-weight: 750;
  }

  .yesterday-analysis-wrapper .btn-close-drawer {
    width: 32px;
    min-width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 8px;
    background: #ffffff;
    color: var(--yesterday-secondary);
  }

  .yesterday-analysis-wrapper .drawer-body-scroll {
    flex: 1 1 auto;
    min-height: 0;
    padding: 28px;
    overflow-y: auto;
  }

  .yesterday-analysis-wrapper .drawer-body-scroll p,
  .yesterday-analysis-wrapper .drawer-body-scroll li {
    color: #27272a;
    font-size: 13.5px;
    line-height: 1.75;
    letter-spacing: -0.2px;
  }

  .yesterday-analysis-wrapper .drawer-body-scroll p {
    margin: 0 0 12px;
  }

  .yesterday-analysis-wrapper .drawer-body-scroll ul {
    margin: 0 0 16px;
    padding-left: 18px;
  }

  .yesterday-analysis-wrapper .drawer-body-scroll li {
    margin-bottom: 10px;
  }

  .yesterday-analysis-wrapper .entity-highlight {
    padding: 1px 4px;
    border-radius: 4px;
    background: rgba(0, 122, 255, 0.05);
    color: var(--yesterday-blue);
    font-weight: 600;
  }
}

/* Marketing center: Linear single-page runtime */
.marketing-subnav {
  width: 220px !important;
  padding: 84px 14px 18px !important;
  gap: 6px !important;
  background: #f4f5f6 !important;
}

.marketing-subnav::before {
  content: "投放中心" !important;
  margin: 0 10px 14px !important;
  color: #1a1a1a !important;
  font-size: 13px !important;
  letter-spacing: 0 !important;
}

.marketing-subnav button {
  position: relative !important;
  min-height: 40px !important;
  padding: 0 12px 0 38px !important;
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  color: #6b7280 !important;
  font-weight: 600 !important;
  transition: all 220ms cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.marketing-subnav button::before {
  position: absolute;
  left: 13px;
  width: 14px;
  color: currentColor;
  font-family: "Font Awesome 6 Free";
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.marketing-subnav button[data-marketing-section="marketingTodaySection"]::before { content: "\f783"; }
.marketing-subnav button[data-marketing-section="marketingTrendSection"]::before { content: "\f201"; }
.marketing-subnav button[data-marketing-section="marketingUploadSection"]::before { content: "\f093"; }
.marketing-subnav button[data-marketing-section="marketingReviewSection"]::before { content: "\f1da"; }

.marketing-subnav button:hover {
  background: rgba(0, 0, 0, 0.025) !important;
  color: #1a1a1a !important;
}

.marketing-subnav button.active {
  border-color: rgba(0, 0, 0, 0.06) !important;
  background: #fff !important;
  color: #1a1a1a !important;
  font-weight: 800 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

.app-shell:has(#marketingView:not(.hidden)) .content {
  margin-left: 220px !important;
}

#marketingView {
  padding: 0 !important;
  overflow: hidden !important;
  background: #fff !important;
}

#marketingView .marketing-page {
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 32px 32px !important;
  overflow: auto !important;
  background: #fff !important;
}

#marketingView .marketing-header {
  display: none !important;
}

#marketingView .marketing-runtime-header {
  position: static;
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 -32px 24px;
  padding: 20px 32px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  background: #fff;
}

#marketingView .marketing-runtime-heading {
  min-width: 0;
}

#marketingView .marketing-runtime-path {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #9ca3af;
  font-size: 11px;
}

#marketingView .marketing-runtime-path strong {
  color: #6b7280;
  font-weight: 600;
}

#marketingView .marketing-runtime-heading h2 {
  margin: 8px 0 0;
  color: #1a1a1a;
  font-size: 22px;
  letter-spacing: 0;
}

#marketingView .marketing-runtime-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #9ca3af;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
}

#marketingView .marketing-runtime-model {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 7px;
  background: #f8f9fa;
  color: #4b5563;
}

#marketingView .marketing-screen {
  min-height: calc(100% - 128px) !important;
  padding: 0 0 120px !important;
  border: 0 !important;
  background: #fff !important;
}

#marketingView .marketing-screen.active {
  display: block !important;
  animation: marketingPanelRise 300ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes marketingPanelRise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

#marketingView .marketing-screen-head {
  position: relative;
  align-items: center !important;
  margin-bottom: 22px !important;
  padding-left: 24px;
}

#marketingView .marketing-screen-head::before,
#marketingView .marketing-ai-summary-head::before {
  content: "";
  position: absolute;
  left: 0;
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: #1a1a1a;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

#marketingView .marketing-screen-head h3 {
  margin-top: 4px !important;
  color: #1a1a1a !important;
  font-size: 17px !important;
}

#marketingView .marketing-screen-head p {
  color: #9ca3af !important;
  font-size: 11px !important;
}

#marketingView .marketing-section-kicker {
  color: #9ca3af !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px !important;
  letter-spacing: 0 !important;
}

#marketingView .marketing-screen-head .secondary,
#marketingView .marketing-screen-head .link-btn {
  min-height: 34px !important;
  border-color: rgba(0, 0, 0, 0.07) !important;
  border-radius: 7px !important;
  background: #fff !important;
  color: #4b5563 !important;
  font-size: 11px !important;
}

#marketingView .marketing-screen-head .secondary:hover,
#marketingView .marketing-screen-head .link-btn:hover {
  border-color: #1a1a1a !important;
  color: #1a1a1a !important;
}

#marketingView .marketing-metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px !important;
  border: 0 !important;
}

#marketingView .marketing-metric {
  min-height: 132px !important;
  padding: 18px !important;
  border: 1px solid rgba(0, 0, 0, 0.055) !important;
  border-radius: 8px !important;
  background: #fff !important;
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), border-color 220ms ease, box-shadow 220ms ease !important;
}

#marketingView .marketing-metric:hover {
  transform: translateY(-2px);
  border-color: #1a1a1a !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05);
}

#marketingView .marketing-metric span {
  color: #9ca3af !important;
  font-size: 11px !important;
}

#marketingView .marketing-metric strong {
  color: #1a1a1a !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 28px !important;
  letter-spacing: 0;
}

#marketingView .marketing-ai-summary {
  margin-top: 20px !important;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.055) !important;
  border-radius: 8px;
}

#marketingView .marketing-ai-summary-head {
  position: relative;
  padding: 16px 20px 16px 42px !important;
  border-bottom-color: rgba(0, 0, 0, 0.045) !important;
  background: #fafbfb !important;
}

#marketingView .marketing-ai-summary-head::before {
  left: 20px;
}

#marketingView .marketing-today-conclusion {
  min-height: 220px !important;
  padding: 22px !important;
}

#marketingView .marketing-data-upload {
  gap: 14px !important;
}

#marketingView .marketing-upload {
  min-height: 132px !important;
  grid-template-columns: 46px minmax(0, 1fr) !important;
  padding: 22px !important;
  border: 1px dashed rgba(0, 0, 0, 0.12) !important;
  border-radius: 8px !important;
  background: #fff !important;
  transition: all 240ms cubic-bezier(0.16, 1, 0.3, 1) !important;
}

#marketingView .marketing-upload:hover {
  transform: translateY(-2px);
  border-color: #1a1a1a !important;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.045);
}

#marketingView .marketing-upload-icon {
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  border-radius: 8px !important;
  background: #f4f5f6 !important;
  color: #6b7280 !important;
  transition: all 220ms ease !important;
}

#marketingView .marketing-upload:hover .marketing-upload-icon {
  background: #1a1a1a !important;
  color: #fff !important;
}

#marketingView .marketing-inline-form {
  grid-template-columns: minmax(0, 1fr) 220px auto !important;
  gap: 14px !important;
  margin-top: 22px !important;
  padding: 20px !important;
  border: 1px solid rgba(0, 0, 0, 0.055) !important;
  border-radius: 8px;
  background: #fafbfb;
}

#marketingView .marketing-inline-form textarea,
#marketingView .marketing-inline-form select {
  border-color: rgba(0, 0, 0, 0.08) !important;
  border-radius: 7px !important;
  background: #fff !important;
  box-shadow: none !important;
}

#marketingView .marketing-inline-form textarea:focus,
#marketingView .marketing-inline-form select:focus {
  outline: 0 !important;
  border-color: #1a1a1a !important;
  box-shadow: inset 0 -1px 0 #1a1a1a !important;
}

#marketingView .marketing-run-button,
#marketingView #marketingReviewSendBtn {
  border-color: #1a1a1a !important;
  border-radius: 7px !important;
  background: #1a1a1a !important;
  color: #fff !important;
}

#marketingView .marketing-review-list {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
  padding: 0 0 24px !important;
}

#marketingView .marketing-file-card {
  min-height: 92px !important;
  grid-template-columns: 42px minmax(0, 1fr) auto !important;
  grid-template-rows: 1fr !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 14px 42px 14px 14px !important;
  border: 1px solid rgba(0, 0, 0, 0.055) !important;
  border-radius: 8px !important;
  background: #fff !important;
  transition: all 220ms cubic-bezier(0.16, 1, 0.3, 1) !important;
}

#marketingView .marketing-file-card:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 0, 0, 0.18) !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
}

#marketingView .marketing-file-card .file-thumb {
  width: 42px !important;
  height: 46px !important;
  border-radius: 7px !important;
  background: #f4f5f6 !important;
}

#marketingView .marketing-file-card .file-card-actions {
  grid-column: auto !important;
  flex-wrap: nowrap !important;
  justify-content: flex-end !important;
}

#marketingView .marketing-file-card .ghost-icon {
  min-height: 28px !important;
  padding: 0 8px !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  border-radius: 6px !important;
  background: #fff !important;
  color: #6b7280 !important;
  font-size: 10px !important;
}

#marketingView .marketing-file-card .ghost-icon:hover {
  border-color: #1a1a1a !important;
  color: #1a1a1a !important;
}

#marketingView .marketing-review-check input {
  accent-color: #1a1a1a !important;
}

#marketingView .marketing-review-composer {
  position: sticky !important;
  bottom: 18px !important;
  width: min(900px, calc(100% - 32px)) !important;
  margin: 24px auto 0 !important;
  padding: 14px 16px 12px !important;
  border: 1px solid rgba(0, 0, 0, 0.09) !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1) !important;
  backdrop-filter: blur(16px);
  transition: border-color 220ms ease, transform 220ms ease, box-shadow 220ms ease !important;
}

#marketingView .marketing-review-composer:focus-within {
  transform: translateY(-2px);
  border-color: #1a1a1a !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.13) !important;
}

#marketingView .marketing-review-composer textarea {
  color: #1a1a1a !important;
}

#marketingView .marketing-review-composer-options select {
  border-color: rgba(0, 0, 0, 0.08) !important;
  border-radius: 7px !important;
  color: #4b5563 !important;
}

@media (max-width: 1100px) {
  #marketingView .marketing-metric-grid,
  #marketingView .marketing-review-list {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  #marketingView .marketing-file-card {
    grid-template-columns: 42px minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
  }

  #marketingView .marketing-file-card .file-card-actions {
    grid-column: 1 / -1 !important;
    justify-content: flex-start !important;
  }
}

@media (max-width: 760px) {
  #marketingView .marketing-page {
    padding: 0 14px 20px !important;
  }

  #marketingView .marketing-runtime-header {
    min-height: 88px;
    margin: 0 -14px 18px;
    padding: 14px;
  }

  #marketingView .marketing-runtime-meta {
    display: none;
  }

  #marketingView .marketing-metric-grid,
  #marketingView .marketing-data-upload,
  #marketingView .marketing-review-list,
  #marketingView .marketing-inline-form {
    grid-template-columns: 1fr !important;
  }
}

/* Review center cleanup and navigation active-state repair. */
#marketingView #marketingReviewSection {
  padding-bottom: 180px !important;
}

#marketingView .marketing-file-card {
  grid-template-columns: minmax(0, 1fr) auto !important;
  padding: 14px !important;
  cursor: pointer;
}

#marketingView .marketing-file-card .file-thumb,
#marketingView .marketing-review-check {
  display: none !important;
}

#marketingView .marketing-file-card.selected {
  border-color: #1a1a1a !important;
  box-shadow: inset 3px 0 #1a1a1a, 0 8px 20px rgba(0, 0, 0, 0.04) !important;
}

#marketingView .marketing-review-composer {
  bottom: 32px !important;
  margin-bottom: 32px !important;
  padding: 16px 18px 14px !important;
}

#marketingView .marketing-review-composer textarea,
#marketingView .marketing-review-composer textarea:focus,
#marketingView .marketing-review-composer textarea:focus-visible {
  min-height: 96px !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

#marketingView .marketing-review-composer-foot {
  min-height: 42px;
  flex-wrap: wrap;
}

.app-shell:has(#todosView:not(.hidden)) .sidebar .nav[data-view="todos"].active {
  background: var(--linear-ink) !important;
  color: #fff !important;
  box-shadow: 0 5px 14px rgba(26, 26, 26, 0.16) !important;
}

/* Page fade-in with a subtle upward growth motion. */
@keyframes bentoFadeUp {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-bento-switch {
  animation: bentoFadeUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: opacity, transform;
}

@media (prefers-reduced-motion: reduce) {
  .animate-bento-switch {
    animation-duration: 1ms;
  }
}

html,
body {
  background: var(--linear-canvas) !important;
  color: var(--linear-ink) !important;
}

body {
  letter-spacing: 0 !important;
}

.app-shell {
  display: grid !important;
  grid-template-columns: 72px minmax(0, 1fr) !important;
  gap: 0 !important;
  width: 100% !important;
  min-height: 100dvh !important;
  height: 100dvh !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: var(--linear-canvas) !important;
}

.app-shell .sidebar,
.app-shell:has(#todosView:not(.hidden)) .sidebar,
.app-shell:has(#settingsView:not(.hidden)) .sidebar {
  position: sticky !important;
  inset: 0 auto 0 0 !important;
  z-index: 120 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  align-items: center !important;
  gap: 0 !important;
  box-sizing: border-box !important;
  width: 72px !important;
  min-width: 72px !important;
  height: 100dvh !important;
  padding: 24px 12px !important;
  overflow: visible !important;
  background: var(--linear-rail) !important;
  border: 0 !important;
  border-right: 1px solid var(--linear-line) !important;
  box-shadow: none !important;
}

.sidebar .brand,
.app-shell:has(#todosView:not(.hidden)) .brand,
.app-shell:has(#settingsView:not(.hidden)) .brand {
  display: contents !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

.sidebar .brand-row,
.app-shell:has(#todosView:not(.hidden)) .brand-row,
.app-shell:has(#settingsView:not(.hidden)) .brand-row {
  display: flex !important;
  width: 100% !important;
  justify-content: center !important;
  align-items: center !important;
}

.sidebar .avatar-wrapper {
  position: relative !important;
  display: block !important;
  width: 40px !important;
  height: 40px !important;
  margin: 0 auto !important;
}

.sidebar .brand-row h1,
.sidebar .brand > p,
.sidebar-search,
.sidebar-sync-status,
.app-shell:has(#todosView:not(.hidden)) .brand-row h1,
.app-shell:has(#todosView:not(.hidden)) .brand > p,
.app-shell:has(#todosView:not(.hidden)) .sidebar-search,
.app-shell:has(#todosView:not(.hidden)) .sidebar-sync-status,
.app-shell:has(#settingsView:not(.hidden)) .brand-row h1,
.app-shell:has(#settingsView:not(.hidden)) .brand > p,
.app-shell:has(#settingsView:not(.hidden)) .sidebar-search,
.app-shell:has(#settingsView:not(.hidden)) .sidebar-sync-status,
.sidebar .nav-left > span:last-child:not(.icon-base),
.sidebar-logout .nav-left > span:last-child:not(.icon-base) {
  display: none !important;
}

.sidebar .brand-mark,
.app-shell:has(#todosView:not(.hidden)) .brand-mark,
.app-shell:has(#settingsView:not(.hidden)) .brand-mark {
  display: grid !important;
  width: 40px !important;
  height: 40px !important;
  place-items: center !important;
  border-radius: 12px !important;
  background: var(--linear-ink) !important;
  color: #fff !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  box-shadow: 0 5px 14px rgba(26, 26, 26, 0.16) !important;
}

.sidebar .status-dot {
  display: none !important;
}

.sidebar .kb-nav,
.app-shell:has(#todosView:not(.hidden)) .kb-nav,
.app-shell:has(#settingsView:not(.hidden)) .kb-nav {
  display: flex !important;
  flex: 1 1 auto !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 12px !important;
  width: 100% !important;
  min-height: 0 !important;
  margin-top: 32px !important;
  overflow: visible !important;
}

.sidebar .kb-nav::before,
.sidebar .sidebar-bottom::before {
  content: none !important;
  display: none !important;
}

.sidebar .nav,
.app-shell:has(#todosView:not(.hidden)) .sidebar .nav,
.app-shell:has(#settingsView:not(.hidden)) .sidebar .nav,
.sidebar .sidebar-logout {
  position: relative !important;
  display: grid !important;
  width: 48px !important;
  min-width: 48px !important;
  height: 48px !important;
  min-height: 48px !important;
  margin: 0 !important;
  padding: 0 !important;
  place-items: center !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: transparent !important;
  color: #7a7f87 !important;
  box-shadow: none !important;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease !important;
}

.sidebar .nav:hover,
.sidebar .sidebar-logout:hover {
  background: rgba(0, 0, 0, 0.04) !important;
  color: var(--linear-ink) !important;
  transform: none !important;
}

.sidebar .nav.active,
.app-shell:has(#settingsView:not(.hidden)) .sidebar .nav.active {
  background: var(--linear-ink) !important;
  color: #fff !important;
  box-shadow: 0 5px 14px rgba(26, 26, 26, 0.16) !important;
}

.sidebar .nav::after,
.sidebar .sidebar-logout::after {
  position: absolute;
  left: 60px;
  z-index: 180;
  padding: 7px 10px;
  border-radius: 6px;
  background: var(--linear-ink);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-5px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.sidebar .nav:hover::after,
.sidebar .sidebar-logout:hover::after {
  opacity: 1;
  transform: translateX(0);
}

.sidebar .nav[data-view="dashboard"]::after { content: "首页搜索"; }
.sidebar .nav[data-view="messages"]::after { content: "消息中心"; }
.sidebar .nav[data-view="todos"]::after { content: "知识笔记"; }
.sidebar .nav[data-view="inbox"]::after { content: "文件中心"; }
.sidebar .nav[data-view="marketing"]::after { content: "投放分析"; }
.sidebar .nav[data-view="settings"]::after { content: "网关设置"; }
.sidebar .sidebar-logout::after { content: "退出登录"; }

.sidebar .nav-left {
  position: static !important;
  display: contents !important;
}

.sidebar .icon-base,
.sidebar .nav .icon-base,
.sidebar .nav.active .icon-base,
.sidebar .sidebar-logout .icon-base {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  display: grid !important;
  width: 24px !important;
  min-width: 24px !important;
  height: 24px !important;
  place-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: currentColor !important;
  transform: translate(-50%, -50%) !important;
}

.sidebar .icon-base i {
  display: block !important;
  width: auto !important;
  height: auto !important;
  color: currentColor !important;
  font-size: 18px !important;
  line-height: 1 !important;
}

.sidebar .nav-badge {
  display: none !important;
}

.sidebar .sidebar-bottom,
.app-shell:has(#todosView:not(.hidden)) .sidebar-bottom,
.app-shell:has(#settingsView:not(.hidden)) .sidebar-bottom {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  width: 100% !important;
  align-items: center !important;
  justify-content: center !important;
  margin-top: 0 !important;
}

.sidebar-bottom .nav[data-view="email"] {
  order: 1 !important;
}

.sidebar-bottom .nav[data-view="settings"] {
  order: 2 !important;
}

.sidebar-bottom .nav[data-view="email"],
.sidebar-bottom .nav[data-view="settings"] {
  width: 48px !important;
  min-width: 48px !important;
  max-width: 48px !important;
  height: 48px !important;
  min-height: 48px !important;
  max-height: 48px !important;
  margin: 0 auto !important;
  padding: 0 !important;
}

.sidebar .sidebar-logout {
  width: 32px !important;
  min-width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  margin: 16px auto 0 !important;
  border: 1px solid var(--linear-line) !important;
  border-radius: 50% !important;
  background: #e5e7eb !important;
  color: var(--linear-ink) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  align-self: center !important;
}

.sidebar .sidebar-logout:hover {
  background: #dfe2e6 !important;
}

.sidebar .sidebar-logout .icon-base {
  position: static !important;
  width: 30px !important;
  min-width: 30px !important;
  height: 30px !important;
  transform: none !important;
}

.sidebar-user-avatar {
  display: grid !important;
  width: 30px !important;
  height: 30px !important;
  place-items: center !important;
  border-radius: 50% !important;
}

.sidebar .nav[data-view="dashboard"] { order: 1; }
.sidebar .nav[data-view="messages"] { order: 2; }
.sidebar .nav[data-view="marketing"] { order: 3; }
.sidebar .nav[data-view="todos"] { order: 4; }
.sidebar .nav[data-view="thoughts"] { order: 5; }
.sidebar .nav[data-view="inbox"] { order: 6; }
.sidebar .nav[data-view="ocr"] { order: 7 !important; }
.sidebar .sidebar-bottom { order: 7; }
.sidebar .kb-nav > .hidden { order: 8; }
.sidebar .marketing-subnav { order: 9; }

.sidebar .nav[data-view="thoughts"] {
  display: grid !important;
  width: 48px !important;
  min-width: 48px !important;
  height: 48px !important;
  min-height: 48px !important;
  place-items: center !important;
  background: transparent !important;
  color: #7a7f87 !important;
  box-shadow: none !important;
}

.sidebar .nav[data-view="thoughts"] .icon-thought {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  width: 24px !important;
  min-width: 24px !important;
  height: 24px !important;
  min-height: 24px !important;
  display: grid !important;
  place-items: center !important;
  transform: translate(-50%, -50%) !important;
}

.sidebar .nav[data-view="thoughts"] .flomo-mark {
  width: 24px !important;
  height: 24px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: currentColor !important;
  box-shadow: none !important;
}

.sidebar .nav[data-view="thoughts"] .bolt-outline {
  position: relative !important;
  width: 22px !important;
  height: 23px !important;
  display: block !important;
  background: currentColor !important;
  clip-path: polygon(54% 0, 15% 56%, 46% 56%, 36% 100%, 87% 42%, 56% 42%) !important;
}

.sidebar .nav[data-view="thoughts"] .bolt-outline::after {
  content: "" !important;
  position: absolute !important;
  inset: 3px !important;
  background: #ffffff !important;
  clip-path: polygon(54% 0, 15% 56%, 46% 56%, 36% 100%, 87% 42%, 56% 42%) !important;
}

.sidebar .nav[data-view="thoughts"]:hover,
.sidebar .nav[data-view="thoughts"].active {
  background: var(--linear-ink) !important;
  color: #ffffff !important;
  box-shadow: 0 5px 14px rgba(26, 26, 26, 0.16) !important;
}

.sidebar .nav[data-view="thoughts"]:hover .bolt-outline::after,
.sidebar .nav[data-view="thoughts"].active .bolt-outline::after {
  background: var(--linear-ink) !important;
}

.marketing-subnav {
  position: fixed !important;
  left: 72px !important;
  top: 0 !important;
  bottom: 0 !important;
  z-index: 110 !important;
  display: flex !important;
  width: 196px !important;
  padding: 84px 14px 18px !important;
  flex-direction: column !important;
  gap: 4px !important;
  background: var(--linear-canvas) !important;
  border-right: 1px solid var(--linear-line) !important;
  box-shadow: none !important;
}

.marketing-subnav.hidden {
  display: none !important;
}

.marketing-subnav::before {
  content: "DATA RUNTIME";
  margin: 0 8px 10px;
  color: #a0a4aa;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.marketing-subnav button {
  min-height: 38px !important;
  padding: 0 10px !important;
  border: 0 !important;
  border-radius: 6px !important;
  background: transparent !important;
  color: #696e76 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  text-align: left !important;
  transition: background 160ms ease, color 160ms ease !important;
}

.marketing-subnav button:hover,
.marketing-subnav button.active {
  background: var(--linear-ink) !important;
  color: #fff !important;
}

.app-shell .content {
  min-width: 0 !important;
  min-height: 100dvh !important;
  height: 100dvh !important;
  overflow: hidden !important;
  border-radius: 0 !important;
  background: var(--linear-canvas) !important;
  box-shadow: none !important;
}

.app-shell:has(#marketingView:not(.hidden)) .content {
  margin-left: 196px !important;
}

.app-shell:has(#messagesView:not(.hidden)) .content {
  height: 100dvh !important;
  min-height: 100dvh !important;
  overflow: hidden !important;
  background: #fff !important;
}

.topbar {
  min-height: 64px !important;
  padding: 0 28px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--linear-line) !important;
  background: rgba(255, 255, 255, 0.94) !important;
  box-shadow: none !important;
  backdrop-filter: blur(14px) !important;
}

.topbar h2 {
  color: var(--linear-ink) !important;
  font-size: 14px !important;
  font-weight: 750 !important;
  letter-spacing: 0 !important;
}

.topbar p {
  margin-top: 2px !important;
  color: #979ba2 !important;
  font-size: 11px !important;
}

.topbar .icon-btn {
  width: 34px !important;
  height: 34px !important;
  border: 1px solid var(--linear-line) !important;
  border-radius: 6px !important;
  background: #fff !important;
  color: var(--linear-ink) !important;
  box-shadow: none !important;
}

.content > .view {
  min-height: 100dvh !important;
  background: var(--linear-canvas) !important;
}

.panel,
.settings-config-card,
.settings-summary-card,
.message-list-panel,
.message-detail-panel {
  border-color: var(--linear-line) !important;
  border-radius: 6px !important;
  box-shadow: none !important;
}

button,
input,
textarea,
select {
  letter-spacing: 0 !important;
}

button.primary,
.primary {
  border-color: var(--linear-ink) !important;
  border-radius: 6px !important;
  background: var(--linear-ink) !important;
  color: #fff !important;
  box-shadow: none !important;
}

button.secondary,
.secondary,
input,
textarea,
select {
  border-color: var(--linear-line) !important;
  border-radius: 6px !important;
  box-shadow: none !important;
}

#dashboardView {
  position: relative !important;
  width: 100% !important;
  height: 100dvh !important;
  min-height: 100dvh !important;
  background: var(--linear-canvas) !important;
}

#dashboardView .home-ai-shell {
  width: 100% !important;
  height: 100dvh !important;
  min-height: 100dvh !important;
  padding: 7vh 28px 30px !important;
  background: var(--linear-canvas) !important;
}

#dashboardView .home-hero {
  margin: auto auto 34px !important;
}

#dashboardView .home-hero h1 {
  color: var(--linear-ink) !important;
  font-size: clamp(30px, 4vw, 44px) !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
}

#dashboardView .home-examples button {
  min-height: 34px !important;
  padding: 0 12px !important;
  border: 1px solid var(--linear-line) !important;
  border-radius: 6px !important;
  background: #fff !important;
  color: #72767e !important;
  box-shadow: none !important;
}

#dashboardView .home-examples button:hover {
  border-color: rgba(0, 0, 0, 0.16) !important;
  color: var(--linear-ink) !important;
  transform: translateY(-1px) !important;
}

#dashboardView .home-chat-form {
  width: min(768px, calc(100% - 32px)) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  gap: 14px !important;
  padding: 16px !important;
  border: 1px solid var(--linear-line) !important;
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.02) !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

#dashboardView .home-chat-form:focus-within {
  border-color: var(--linear-ink) !important;
  transform: scale(1.005) translateY(-1px) !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02) !important;
}

#dashboardView .home-search-main {
  position: relative;
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

#dashboardView .home-chat-form textarea {
  grid-column: auto !important;
  grid-row: auto !important;
  flex: 1;
  min-width: 0;
  min-height: 32px !important;
  max-height: 180px;
  padding: 7px 2px !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--linear-ink) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.45 !important;
  outline: 0 !important;
  resize: none;
}

#dashboardView .home-attach-btn {
  grid-column: auto !important;
  grid-row: auto !important;
  display: grid !important;
  width: 32px !important;
  min-width: 32px !important;
  height: 32px !important;
  place-items: center !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: #9ca3af !important;
  font-size: 14px !important;
}

#dashboardView .home-attach-btn:hover {
  background: #f9fafb !important;
  color: var(--linear-ink) !important;
}

#dashboardView .home-search-submit {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

#dashboardView .home-search-submit kbd {
  padding: 2px 6px;
  border: 1px solid rgba(0, 0, 0, 0.03);
  border-radius: 6px;
  background: rgba(249, 250, 251, 0.5);
  color: #d1d5db;
  font-family: monospace;
  font-size: 10px;
}

#dashboardView .home-send-btn {
  display: grid !important;
  width: 32px !important;
  min-width: 32px !important;
  height: 32px !important;
  place-items: center !important;
  border-radius: 8px !important;
  background: #f3f4f6 !important;
  color: #9ca3af !important;
  font-size: 13px !important;
  cursor: not-allowed !important;
}

#dashboardView .home-chat-form.has-content .home-send-btn:not(:disabled) {
  background: #2563eb !important;
  color: #fff !important;
  cursor: pointer !important;
}

#dashboardView .home-chat-form.has-content #arrow-icon {
  transform: translateY(-1px);
}

#dashboardView .home-chat-tools {
  grid-column: auto !important;
  grid-row: auto !important;
  width: 100% !important;
  min-width: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 12px 4px 0 !important;
  border-top: 1px solid #f9fafb !important;
  color: rgba(156, 163, 175, 0.9) !important;
  font-size: 11px !important;
}

#dashboardView .home-search-status {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

#dashboardView .home-chat-state {
  overflow: hidden;
  color: inherit !important;
  font-size: 11px !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#dashboardView .home-status-dot {
  position: relative;
  display: flex;
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
}

#dashboardView #ping-dot,
#dashboardView #core-dot {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #d1d5db;
}

#dashboardView #ping-dot {
  opacity: 0.75;
  animation: homeStatusPing 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

#dashboardView .home-chat-form.has-content #ping-dot,
#dashboardView .home-chat-form.has-content #core-dot {
  background: #2563eb;
}

#dashboardView .home-model-shell {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(0, 0, 0, 0.02);
  border-radius: 6px;
  background: #f9fafb;
  color: #9ca3af;
}

#dashboardView .home-model-shell:hover {
  color: var(--linear-ink);
}

#dashboardView .home-model-shell select {
  max-width: 190px !important;
  min-height: 26px !important;
  padding: 0 22px 0 8px !important;
  border: 0 !important;
  background: transparent !important;
  color: inherit !important;
  font-family: monospace;
  font-size: 10px !important;
  appearance: none;
}

#dashboardView .home-model-shell i {
  position: absolute;
  right: 8px;
  font-size: 8px;
  pointer-events: none;
}

@keyframes homeStatusPing {
  75%, 100% {
    opacity: 0;
    transform: scale(2);
  }
}

#messagesView .message-center {
  display: grid !important;
  grid-template-columns: 280px minmax(0, 1fr) !important;
  align-items: stretch !important;
  gap: 0 !important;
  width: 100% !important;
  height: 100dvh !important;
  min-height: 100dvh !important;
  overflow: hidden !important;
  background: #fff !important;
}

#messagesView {
  height: 100dvh !important;
  min-height: 100dvh !important;
  overflow: hidden !important;
  background: #fff !important;
}

#messagesView .message-list-panel {
  width: 280px !important;
  min-width: 280px !important;
  height: 100dvh !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  overflow: hidden !important;
  border: 0 !important;
  border-right: 1px solid rgba(0, 0, 0, 0.04) !important;
  border-radius: 0 !important;
  background: #f4f5f6 !important;
  box-shadow: none !important;
}

#messagesView .message-center-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 8px 10px !important;
  padding: 18px 14px 14px !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.02) !important;
}

#messagesView .message-title-line,
#messagesView .message-center-head,
#messagesView .message-head-actions {
  align-items: center !important;
}

#messagesView .message-title-line {
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  min-width: 0 !important;
}

#messagesView .message-title-line h3 {
  flex: 0 0 auto !important;
  margin: 0 !important;
  color: var(--linear-ink) !important;
  font-size: 13px !important;
  font-weight: 750 !important;
  white-space: nowrap !important;
}

#messagesView #messageTotalCount {
  flex: 0 0 auto !important;
  color: #9ca3af;
  font-family: monospace;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap !important;
}

#messagesView .message-center-head > .message-head-copy {
  grid-column: 1;
  min-width: 0;
}

#messagesView .message-center-head > .message-head-actions {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  min-width: max-content !important;
}

#messagesView #messageCenterHint {
  grid-column: 1 / -1 !important;
  max-width: 100%;
  margin: 0 !important;
  overflow: hidden;
  color: #9ca3af !important;
  font-size: 10px !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#messagesView #markAllMessagesReadBtn {
  min-height: 26px !important;
  padding: 0 10px !important;
  border: 1px solid rgba(0, 0, 0, 0.04) !important;
  border-radius: 6px !important;
  background: rgba(255, 255, 255, 0.8) !important;
  color: #6b7280 !important;
  font-size: 10px !important;
  font-weight: 700 !important;
}

#messagesView .message-filter-shell {
  position: relative;
  grid-column: 1 / -1;
  width: fit-content !important;
  max-width: 100% !important;
  display: flex;
  align-items: center;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.03);
  color: #6b7280;
  font-size: 11px;
}

#messagesView .message-filter-shell > span {
  padding-left: 10px;
  white-space: nowrap;
}

#messagesView .message-filter-shell select {
  width: 100%;
  min-height: 30px !important;
  padding: 0 28px 0 5px !important;
  border: 0 !important;
  background: transparent !important;
  color: #6b7280 !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  appearance: none;
}

#messagesView .message-filter-shell i {
  position: absolute;
  right: 10px;
  font-size: 9px;
  pointer-events: none;
}

#messagesView .message-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  min-height: 0 !important;
  padding: 8px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  scrollbar-width: none;
}

#messagesView .message-list-item {
  position: relative !important;
  display: flex !important;
  flex: 0 0 auto !important;
  gap: 8px !important;
  width: 100% !important;
  height: auto !important;
  min-height: 78px !important;
  padding: 12px !important;
  border: 1px solid transparent !important;
  border-radius: 12px !important;
  background: transparent !important;
  outline: 0 !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

#messagesView .message-list-item:hover {
  background: rgba(0, 0, 0, 0.02) !important;
}

#messagesView .message-list-item.active {
  background: #fff !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02) !important;
}

#messagesView .message-active-bar {
  position: absolute;
  top: 16px;
  left: 4px;
  width: 3px;
  height: 32px;
  border-radius: 999px;
  background: var(--linear-ink);
  opacity: 0;
  transform: scaleY(0.5);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

#messagesView .message-list-item.active .message-active-bar {
  opacity: 1;
  transform: scaleY(1);
}

#messagesView .message-list-copy {
  display: grid !important;
  grid-template-rows: auto auto auto !important;
  flex: 1 !important;
  gap: 5px !important;
  min-width: 0 !important;
  padding-left: 8px !important;
  overflow: hidden !important;
}

#messagesView .message-list-copy strong {
  display: flex !important;
  align-items: baseline !important;
  justify-content: space-between !important;
  gap: 8px !important;
  color: #4b5563 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  overflow: hidden !important;
  white-space: nowrap !important;
}

#messagesView .message-list-copy strong > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#messagesView .message-list-item.active .message-list-copy strong {
  color: var(--linear-ink) !important;
  font-weight: 750 !important;
}

#messagesView .message-status {
  padding: 2px 6px !important;
  border-radius: 4px !important;
  background: #f3f4f6 !important;
  color: #6b7280 !important;
  font-size: 9px !important;
  font-weight: 700 !important;
}

#messagesView .message-list-copy em {
  display: block !important;
  min-height: 15px !important;
  overflow: hidden !important;
  color: #9ca3af !important;
  font-size: 11px !important;
  line-height: 1.35 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#messagesView .message-list-copy small {
  display: flex !important;
  justify-content: space-between !important;
  padding-top: 3px !important;
  color: #9ca3af !important;
  font-family: monospace;
  font-size: 9px !important;
  line-height: 1.25 !important;
  overflow: hidden !important;
}

#messagesView .message-detail-panel {
  min-width: 0 !important;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  height: 100dvh !important;
  min-height: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fafbfb !important;
  box-shadow: none !important;
}

#messagesView .message-detail-head {
  display: flex !important;
  align-items: center !important;
  padding: 20px 32px !important;
  border-bottom: 1px solid #f3f4f6 !important;
  background: #fafbfb !important;
}

#messagesView .message-detail-heading {
  display: grid;
  gap: 5px;
  min-width: 0;
}

#messagesView .message-detail-path {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  color: #9ca3af;
  font-family: monospace;
  font-size: 11px;
  white-space: nowrap;
}

#messagesView #messageDetailPath {
  overflow: hidden;
  text-decoration: underline;
  text-overflow: ellipsis;
}

#messagesView #messageDetailTitle {
  color: var(--linear-ink) !important;
  font-size: 18px !important;
  font-weight: 750 !important;
}

#messagesView #messageDetailMeta {
  display: none !important;
}

#messagesView #copyMessageDetailBtn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  min-height: 30px !important;
  padding: 0 12px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: var(--linear-ink) !important;
  color: #fff !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08) !important;
}

#messagesView .message-detail-content {
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 28px 32px 12px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-sizing: border-box !important;
  color: #374151 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

#messagesView .message-detail-section:last-child {
  margin-bottom: 0 !important;
}

#messagesView .message-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 28px 0 16px;
}

#messagesView .message-detail-section {
  margin: 0 0 32px;
}

#messagesView .message-generic-card {
  padding: 16px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  background: #fff;
  color: #4b5563;
  font-size: 12px;
  line-height: 1.7;
}

#messagesView .message-generic-card p {
  margin: 0 0 10px;
}

#messagesView .message-generic-card p:last-child {
  margin-bottom: 0;
}

#messagesView .message-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

#messagesView .message-metric-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  background: #fff;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

#messagesView .message-metric-card:hover {
  border-color: rgba(0, 0, 0, 0.15);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

#messagesView .message-metric-card span {
  color: #9ca3af;
  font-size: 10px;
  font-weight: 700;
}

#messagesView .message-metric-card strong {
  color: var(--linear-ink);
  font-family: monospace;
  font-size: 14px;
}

#messagesView .message-section-title:first-child {
  margin-top: 0;
}

#messagesView .message-section-indicator {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border-radius: 4px;
  background: var(--linear-ink);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

#messagesView .message-section-title h2,
#messagesView .message-section-title h3 {
  margin: 0 !important;
  color: var(--linear-ink) !important;
  font-size: 14px !important;
  font-weight: 750 !important;
  letter-spacing: 0 !important;
}

#messagesView .message-conclusion-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px !important;
  padding: 0 !important;
  list-style: none !important;
}

#messagesView .message-data-card,
#messagesView .message-risk-card {
  margin: 0 !important;
  padding: 16px !important;
  border: 1px solid rgba(0, 0, 0, 0.05) !important;
  border-radius: 12px !important;
  background: #fff !important;
  color: #4b5563 !important;
  font-size: 12px !important;
  line-height: 1.65 !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

#messagesView .message-data-card:hover {
  border-color: rgba(0, 0, 0, 0.15) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

#messagesView .message-risk-card {
  border-color: rgba(254, 202, 202, 0.4) !important;
  background: rgba(254, 242, 242, 0.15) !important;
}

#messagesView .message-table-shell {
  margin: 0 0 16px;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-gutter: stable;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  background: #fff;
}

#messagesView .message-table-shell table {
  width: max-content !important;
  min-width: 100% !important;
  margin: 0 !important;
  border-collapse: collapse !important;
  font-size: 12px !important;
}

#messagesView .message-table-shell thead tr {
  border-bottom: 1px solid rgba(0, 0, 0, 0.04) !important;
  background: #f9fafb !important;
}

#messagesView .message-table-shell th {
  color: #9ca3af !important;
  font-family: monospace;
  font-size: 11px !important;
  font-weight: 500 !important;
}

#messagesView .message-table-shell th,
#messagesView .message-table-shell td {
  min-width: 88px !important;
  padding: 12px !important;
  border: 0 !important;
  text-align: left !important;
  white-space: nowrap !important;
}

#messagesView .message-table-shell::-webkit-scrollbar {
  height: 10px;
}

#messagesView .message-table-shell::-webkit-scrollbar-track {
  background: #f3f4f6;
}

#messagesView .message-table-shell::-webkit-scrollbar-thumb {
  border: 2px solid #f3f4f6;
  border-radius: 999px;
  background: #9ca3af;
}

#messagesView .message-table-shell::-webkit-scrollbar-thumb:hover {
  background: #6b7280;
}

#messagesView .message-table-shell tbody tr {
  border-bottom: 1px solid #f9fafb !important;
  transition: background 0.15s ease;
}

#messagesView .message-table-shell tbody tr:hover {
  background: rgba(249, 250, 251, 0.8) !important;
}

#messagesView .message-table-shell tbody tr:last-child {
  border-bottom: 0 !important;
}

#messagesView .message-table-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.02);
  background: rgba(249, 250, 251, 0.5);
  color: #9ca3af;
  font-size: 11px;
}

@media (max-width: 900px) {
  #messagesView .message-center {
    grid-template-columns: 250px minmax(0, 1fr) !important;
  }

  #messagesView .message-list-panel {
    width: 250px !important;
    min-width: 250px !important;
  }

  #messagesView .message-conclusion-grid {
    grid-template-columns: 1fr;
  }

  #messagesView .message-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

#marketingView,
#todosView,
#inboxView,
#settingsView {
  padding: 24px !important;
}

#marketingView .marketing-screen {
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
}

#marketingView .marketing-kpi-card:first-child {
  background: var(--linear-ink) !important;
  color: #fff !important;
}

#todosView .notes-shell {
  min-height: calc(100dvh - 112px) !important;
  gap: 0 !important;
  overflow: hidden !important;
  border: 1px solid var(--linear-line) !important;
  border-radius: 6px !important;
}

#todosView .notes-sidebar {
  border: 0 !important;
  border-right: 1px solid var(--linear-line) !important;
  border-radius: 0 !important;
  background: var(--linear-canvas) !important;
}

#todosView .note-editor-panel {
  border: 0 !important;
  border-radius: 0 !important;
  position: relative !important;
  overflow-y: auto !important;
}

#todosView .note-toolbar {
  position: sticky !important;
  top: 0 !important;
  z-index: 60 !important;
  flex-shrink: 0 !important;
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(12px) !important;
  box-shadow: 0 1px 0 var(--linear-line) !important;
}

#inboxView .inbox-panel,
#settingsView .settings-page {
  max-width: 1180px !important;
  margin: 0 auto !important;
}

#inboxView .inbox-source-card {
  border: 1px dashed rgba(0, 0, 0, 0.16) !important;
  border-radius: 6px !important;
  background: var(--linear-canvas) !important;
  box-shadow: none !important;
}

#settingsView .settings-tabs {
  border-bottom: 1px solid var(--linear-line) !important;
}

#settingsView .settings-tabs button {
  border-radius: 0 !important;
  background: transparent !important;
}

#settingsView .settings-tabs button.active {
  color: var(--linear-ink) !important;
  box-shadow: inset 0 -2px var(--linear-ink) !important;
}

@media (max-width: 768px) {
  .app-shell {
    display: block !important;
  }

  .app-shell .sidebar {
    width: min(78vw, 292px) !important;
    max-width: min(78vw, 292px) !important;
    padding: 18px !important;
  }

  .sidebar .brand-row h1,
  .sidebar .nav-left > span:last-child:not(.icon-base),
  .sidebar-logout .nav-left > span:last-child:not(.icon-base) {
    display: block !important;
  }

  .sidebar .brand-row {
    justify-content: flex-start !important;
    gap: 10px !important;
  }

  .sidebar .nav,
  .sidebar .sidebar-logout {
    width: 100% !important;
    grid-template-columns: 32px 1fr !important;
    justify-items: start !important;
    padding: 0 10px !important;
  }

  .sidebar .nav::after,
  .sidebar .sidebar-logout::after {
    display: none !important;
  }

  .marketing-subnav {
    display: none !important;
  }

  .app-shell:has(#marketingView:not(.hidden)) .content {
    margin-left: 0 !important;
  }

  .topbar {
    padding: 0 14px !important;
  }

  #marketingView,
  #todosView,
  #inboxView,
  #settingsView {
    padding: 12px !important;
  }
}

/* Message follow-up drawer keeps the report and conversation as separate surfaces. */
.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(15, 23, 42, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
}

.drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

body.chat-drawer-open {
  overflow: hidden;
}

.chat-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1000;
  width: 440px;
  max-width: 100%;
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border-left: 1px solid rgba(15, 23, 42, 0.1);
  background: #fff;
  box-shadow: -24px 0 70px rgba(15, 23, 42, 0.16);
  transform: translateX(100%);
  transition: transform 300ms ease;
}

.chat-drawer.open {
  transform: translateX(0);
}

.chat-drawer .drawer-header {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.chat-drawer .drawer-header > div {
  min-width: 0;
}

.chat-drawer .drawer-header span {
  display: block;
  margin-bottom: 4px;
  color: #9ca3af;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.chat-drawer .drawer-header h3 {
  overflow: hidden;
  color: #111827;
  font-size: 16px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-drawer .drawer-close-btn {
  width: 34px;
  min-width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 9px;
  background: #fff;
  color: #6b7280;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.chat-drawer .message-followup-thread {
  width: 100% !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  margin: 0 !important;
  padding: 20px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  background: #fafbfc !important;
  box-sizing: border-box !important;
}

.chat-drawer .message-followup-thread.hidden {
  display: flex !important;
}

.chat-drawer .message-followup-thread:empty::before {
  content: "追问记录会显示在这里";
  margin: auto;
  color: #9ca3af;
  font-size: 13px;
}

.chat-drawer .home-message {
  display: flex !important;
}

.chat-drawer .home-message.user {
  justify-content: flex-end !important;
}

.chat-drawer .home-message.assistant {
  justify-content: flex-start !important;
}

.chat-drawer .home-message-body {
  max-width: 88% !important;
  padding: 11px 13px !important;
  border-radius: 12px !important;
  line-height: 1.6 !important;
  overflow-wrap: anywhere !important;
}

.chat-drawer .home-message.user .home-message-body {
  background: #111827 !important;
  color: #fff !important;
}

.chat-drawer .home-message.assistant .home-message-body {
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  background: #fff !important;
  color: #111827 !important;
}

.chat-drawer .message-followup-dock {
  width: 100% !important;
  margin: 0 !important;
  padding: 14px !important;
  border-top: 1px solid rgba(15, 23, 42, 0.08) !important;
  background: #fff !important;
  box-sizing: border-box !important;
}

.chat-drawer .message-followup-dock.hidden {
  display: none !important;
}

.chat-drawer .message-followup-panel {
  width: 100% !important;
}

.chat-drawer .message-followup-form {
  width: 100% !important;
  min-height: 58px !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 8px !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  border-radius: 14px !important;
  background: #fff !important;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07) !important;
  box-sizing: border-box !important;
}

.chat-drawer .message-followup-form:focus-within {
  border-color: #111827 !important;
}

.chat-drawer .message-followup-form .home-attach-btn {
  width: 32px !important;
  min-width: 32px !important;
  height: 32px !important;
  display: grid !important;
  place-items: center !important;
  color: #9ca3af !important;
}

.chat-drawer .message-followup-form .home-search-main {
  min-width: 0 !important;
  flex: 1 1 auto !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.chat-drawer .message-followup-form textarea {
  min-width: 0 !important;
  min-height: 36px !important;
  max-height: 114px !important;
  flex: 1 1 auto !important;
  padding: 8px 4px !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #111827 !important;
  font-size: 14px !important;
  line-height: 1.45 !important;
  resize: none !important;
  outline: 0 !important;
}

.chat-drawer .message-followup-form .home-search-submit {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
}

.chat-drawer .message-followup-form kbd {
  color: #9ca3af !important;
  font-size: 9px !important;
}

.chat-drawer .message-followup-form .home-send-btn {
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  display: grid !important;
  place-items: center !important;
  border: 1px solid #dbeafe !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: #60a5fa !important;
}

.chat-drawer .message-followup-form.has-content .home-send-btn:not(:disabled) {
  border-color: #1d4ed8 !important;
  background: #1d4ed8 !important;
  color: #fff !important;
}

.chat-drawer .message-followup-form .home-chat-state {
  display: none !important;
}

#messagesView #openMessageFollowupDrawerBtn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  min-height: 30px !important;
  padding: 0 12px !important;
  border: 1px solid rgba(15, 23, 42, 0.1) !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #374151 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

@media (max-width: 768px) {
  .chat-drawer {
    width: 85%;
  }

  .chat-drawer .drawer-header {
    padding-top: max(18px, env(safe-area-inset-top));
  }

  .chat-drawer .message-followup-dock {
    padding-bottom: max(14px, env(safe-area-inset-bottom)) !important;
  }

  .chat-drawer .message-followup-form kbd {
    display: none !important;
  }
}

/* Keep the marketing runtime overrides above the legacy theme cascade. */
@media (min-width: 761px) {
  .marketing-subnav {
    width: 220px !important;
    background: #f4f5f6 !important;
  }

  .app-shell:has(#marketingView:not(.hidden)) .content {
    margin-left: 220px !important;
  }
}

.marketing-subnav::before {
  content: "投放中心" !important;
  color: #1a1a1a !important;
  letter-spacing: 0 !important;
}

.marketing-subnav button {
  padding: 0 12px 0 38px !important;
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: #6b7280 !important;
}

.marketing-subnav button:hover {
  background: rgba(0, 0, 0, 0.025) !important;
  color: #1a1a1a !important;
}

.marketing-subnav button.active {
  border-color: rgba(0, 0, 0, 0.06) !important;
  background: #fff !important;
  color: #1a1a1a !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

#marketingView {
  height: 100dvh !important;
  min-height: 0 !important;
  padding: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  background: #fff !important;
}

#marketingView .marketing-page {
  height: auto !important;
  min-height: 100% !important;
  overflow: visible !important;
}

#marketingView .marketing-screen {
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
}

@media (max-width: 760px) {
  #marketingView {
    padding: 0 !important;
  }
}

/* Notes: centered Linear writing workspace */
#todosView {
  padding: 0 !important;
  overflow: hidden !important;
  background: #fff !important;
}

#todosView .notes-shell {
  width: 100% !important;
  height: 100dvh !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: 240px minmax(0, 1fr) !important;
  gap: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
}

#todosView .notes-sidebar {
  width: 240px !important;
  min-width: 240px !important;
  height: 100dvh !important;
  padding: 18px 14px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  border: 0 !important;
  border-right: 1px solid rgba(0, 0, 0, 0.04) !important;
  border-radius: 0 !important;
  background: #f4f5f6 !important;
}

#todosView .notes-sidebar .panel-head {
  display: block !important;
  margin: 0 0 14px !important;
}

#todosView .notes-sidebar .panel-head h3 {
  margin: 0 4px 14px !important;
  color: #1a1a1a !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

#todosView .notes-sidebar .panel-head h3::after {
  display: none !important;
}

#todosView .notes-head-actions {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 4px !important;
  padding: 3px !important;
  border-radius: 9px !important;
  background: rgba(0, 0, 0, 0.03) !important;
}

#todosView .notes-head-actions button {
  min-width: 0 !important;
  min-height: 30px !important;
  padding: 0 8px !important;
  border: 1px solid transparent !important;
  border-radius: 7px !important;
  background: transparent !important;
  color: #9ca3af !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}

#todosView #noteOutlineToggleBtn {
  border-color: rgba(0, 0, 0, 0.04) !important;
  background: #fff !important;
  color: #1a1a1a !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

#todosView #newNoteBtn {
  grid-column: 1 / -1;
  min-height: 36px !important;
  margin-top: 8px !important;
  border-color: rgba(0, 0, 0, 0.06) !important;
  background: #fff !important;
  color: #1a1a1a !important;
  font-size: 11px !important;
  transition: border-color 220ms ease, transform 220ms ease, box-shadow 220ms ease !important;
}

#todosView #newNoteBtn:hover {
  transform: translateY(-1px);
  border-color: #1a1a1a !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04) !important;
}

#todosView .notes-search {
  min-height: 34px !important;
  margin: 0 0 14px !important;
  border: 1px solid rgba(0, 0, 0, 0.05) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.72) !important;
  box-shadow: none !important;
}

#todosView .notes-search input {
  color: #1a1a1a !important;
  font-size: 11px !important;
}

#todosView .note-folder-group {
  margin: 1px 0 !important;
}

#todosView .note-folder-row {
  position: relative !important;
  min-height: 34px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 7px !important;
  background: transparent !important;
  transition: background 180ms ease !important;
}

#todosView .note-folder-row:hover {
  background: rgba(0, 0, 0, 0.025) !important;
}

#todosView .note-folder-group.selected > .note-folder-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 6px;
  height: 12px;
  border-radius: 2px;
  background: #1a1a1a;
  transform: translateY(-50%);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.14);
}

#todosView .note-folder-toggle {
  min-height: 34px !important;
  padding-left: calc(8px + var(--folder-indent, 0px)) !important;
  color: #6b7280 !important;
  font-size: 11px !important;
}

#todosView .note-folder-group.selected > .note-folder-row .note-folder-toggle,
#todosView .note-folder-group.selected > .note-folder-row .note-folder-name {
  color: #1a1a1a !important;
  font-weight: 800 !important;
}

#todosView .note-folder-arrow {
  width: 10px !important;
  color: #b1b5bb !important;
  font-size: 8px !important;
}

#todosView .note-folder-icon {
  width: 16px !important;
  height: 16px !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#todosView .note-folder-icon i {
  display: grid !important;
  width: 16px !important;
  height: 16px !important;
  place-items: center;
  background: none !important;
  color: #9ca3af !important;
  font-family: "Font Awesome 6 Free";
  font-size: 12px !important;
  font-style: normal;
  font-weight: 400;
}

#todosView .note-folder-icon i::before {
  content: "\f07b";
}

#todosView .note-folder-group.selected > .note-folder-row .note-folder-icon i::before {
  content: "\f07c";
}

#todosView .note-folder-more {
  color: #9ca3af !important;
  font-size: 11px !important;
}

#todosView .note-folder-notes {
  margin: 1px 0 3px !important;
  padding-left: 20px !important;
}

#todosView .note-folder-notes .note-item {
  min-height: 42px !important;
  margin: 1px 0 !important;
  padding: 5px 28px 5px 8px !important;
  border: 1px solid transparent !important;
  border-radius: 7px !important;
  background: transparent !important;
  box-shadow: none !important;
}

#todosView .note-folder-notes .note-item:hover {
  background: rgba(0, 0, 0, 0.025) !important;
}

#todosView .note-folder-notes .note-item.active {
  border-color: rgba(0, 0, 0, 0.055) !important;
  background: #fff !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.025) !important;
}

#todosView .note-folder-notes .note-item.active::before {
  display: none !important;
}

#todosView .note-folder-notes .note-open strong {
  color: #4b5563 !important;
  font-size: 11px !important;
}

#todosView .note-folder-notes .note-item.active .note-open strong {
  color: #1a1a1a !important;
  font-weight: 800 !important;
}

#todosView .note-editor-panel {
  position: relative !important;
  width: 100% !important;
  height: 100dvh !important;
  min-height: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
  scroll-padding-top: 68px;
}

#todosView .note-toolbar {
  position: sticky !important;
  top: 0 !important;
  z-index: 60 !important;
  width: 100% !important;
  max-width: none !important;
  height: 58px !important;
  min-height: 58px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 8px 72px !important;
  overflow: visible !important;
  border: 0 !important;
  border-bottom: 1px solid #f1f2f3 !important;
  background: rgba(250, 251, 251, 0.92) !important;
  box-shadow: none !important;
  backdrop-filter: blur(14px) !important;
}

#todosView .note-toolbar-capsule {
  max-width: min(100%, 760px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px 8px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
  scrollbar-width: none;
}

#todosView .note-toolbar-capsule::-webkit-scrollbar {
  display: none;
}

#todosView .note-toolbar-divider {
  width: 1px;
  height: 14px;
  flex: 0 0 1px;
  margin: 0 4px;
  background: #e5e7eb;
}

#todosView .note-toolbar button,
#todosView .note-toolbar select,
#todosView .note-toolbar .note-color-trigger {
  width: 28px !important;
  min-width: 28px !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 7px !important;
  background: transparent !important;
  color: #5f6670 !important;
  font-size: 12px !important;
  font-weight: 650 !important;
  box-shadow: none !important;
}

#todosView .note-toolbar button:hover,
#todosView .note-toolbar select:hover,
#todosView .note-toolbar .note-color-trigger:hover {
  background: rgba(0, 0, 0, 0.035) !important;
  color: #1a1a1a !important;
}

#todosView .note-toolbar button.active,
#todosView .note-toolbar select.active {
  border-color: transparent !important;
  background: rgba(0, 0, 0, 0.055) !important;
  color: #1a1a1a !important;
}

#todosView .note-toolbar select {
  width: 68px !important;
  min-width: 68px !important;
  font-size: 10px !important;
  font-weight: 700 !important;
}

#todosView .note-toolbar .note-color-trigger {
  width: 32px !important;
  min-width: 32px !important;
}

#todosView .note-toolbar button strong,
#todosView .note-toolbar button em,
#todosView .note-toolbar button s {
  color: currentColor !important;
  font-size: 13px !important;
  font-weight: 750 !important;
  text-decoration-thickness: 1px !important;
}

#todosView .note-toolbar .note-icon {
  width: 18px !important;
  height: 18px !important;
  color: currentColor !important;
  filter: grayscale(1);
}

#todosView .note-toolbar-capsule button[data-note-format="todo"] {
  display: inline-flex !important;
}

#todosView .note-toolbar button[data-note-format="todo"],
#todosView .note-toolbar button[data-note-format="quote"],
#todosView .note-toolbar button[data-note-format="code"],
#todosView .note-toolbar button[data-note-format="hr"],
#todosView .note-toolbar button[data-note-format="link"],
#todosView .note-toolbar button[data-note-format="image"] {
  font-size: 0 !important;
}

#todosView .note-toolbar button[data-note-format="todo"]::before,
#todosView .note-toolbar button[data-note-format="quote"]::before,
#todosView .note-toolbar button[data-note-format="code"]::before,
#todosView .note-toolbar button[data-note-format="hr"]::before,
#todosView .note-toolbar button[data-note-format="link"]::before,
#todosView .note-toolbar button[data-note-format="image"]::before {
  color: currentColor;
  font-family: "Font Awesome 6 Free";
  font-size: 11px;
  font-weight: 900;
}

#todosView .note-toolbar button[data-note-format="todo"]::before { content: "\f14a"; }
#todosView .note-toolbar button[data-note-format="quote"]::before { content: "\f10d"; }
#todosView .note-toolbar button[data-note-format="code"]::before { content: "\f121"; }
#todosView .note-toolbar button[data-note-format="hr"]::before { content: "\f068"; }
#todosView .note-toolbar button[data-note-format="link"]::before { content: "\f0c1"; }
#todosView .note-toolbar button[data-note-format="image"]::before { content: "\f03e"; }

#todosView .note-toolbar-save-state {
  position: absolute;
  right: 20px;
  color: #9ca3af;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  white-space: nowrap;
}

#todosView .note-title-field,
#todosView .note-editor,
#todosView #noteSavedPath,
#todosView .note-statusbar {
  width: min(760px, calc(100% - 64px)) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

#todosView .note-title-field {
  margin-top: 52px !important;
}

#todosView .note-title-field > span {
  display: none !important;
}

#todosView .note-title-field input {
  min-height: 54px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: #1a1a1a !important;
  font-size: 30px !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
  line-height: 1.15 !important;
  box-shadow: none !important;
}

#todosView .note-title-field input::placeholder {
  color: #d1d5db !important;
}

#todosView .note-title-field input:focus {
  outline: 0 !important;
  box-shadow: none !important;
}

#todosView .note-editor {
  min-height: 72vh !important;
  padding: 24px 0 100px !important;
  overflow: visible !important;
  color: #4b5563 !important;
  font-size: 14px !important;
  line-height: 1.8 !important;
}

#todosView .note-statusbar {
  display: flex !important;
  justify-content: space-between !important;
  padding: 12px 0 24px !important;
  border-top: 1px solid rgba(0, 0, 0, 0.035) !important;
  color: #9ca3af !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px !important;
}

@media (max-width: 900px) {
  #todosView .notes-shell {
    grid-template-columns: 210px minmax(0, 1fr) !important;
  }

  #todosView .notes-sidebar {
    width: 210px !important;
    min-width: 210px !important;
  }

  #todosView .note-toolbar {
    justify-content: flex-start !important;
    padding: 8px 12px !important;
  }

  #todosView .note-toolbar-save-state {
    display: none;
  }
}

@media (max-width: 760px) {
  #todosView {
    overflow: visible !important;
  }

  #todosView .notes-shell {
    display: block !important;
    height: auto !important;
    min-height: 100dvh !important;
    overflow: visible !important;
  }

  #todosView .notes-sidebar {
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    max-height: 42dvh !important;
  }

  #todosView .note-editor-panel {
    height: auto !important;
    min-height: 100dvh !important;
    overflow: visible !important;
  }

  #todosView .note-toolbar-capsule {
    justify-content: flex-start;
  }

  #todosView .note-title-field,
  #todosView .note-editor,
  #todosView #noteSavedPath,
  #todosView .note-statusbar {
    width: calc(100% - 32px) !important;
  }
}

/* Inbox OCR: Linear intake console */
#inboxView {
  height: 100dvh !important;
  min-height: 0 !important;
  padding: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  background: #fafbfb !important;
}

#inboxView .inbox-panel {
  position: relative;
  width: min(896px, calc(100% - 48px)) !important;
  min-height: 100% !important;
  margin: 0 auto !important;
  padding: 36px 0 80px !important;
  gap: 24px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}

#marketingView #marketingUploadSection .upload-stage-wrapper:focus-within {
  transform: none !important;
}

#inboxView .inbox-copy {
  position: relative;
  min-height: 108px;
  padding: 0 280px 22px 0;
  border-bottom: 1px solid #f0f1f2;
}

#inboxView .inbox-breadcrumb {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  color: #9ca3af;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
}

#inboxView .inbox-breadcrumb strong {
  color: #6b7280;
  font-weight: 700;
}

#inboxView .inbox-copy h3 {
  margin: 0 0 7px !important;
  color: #1a1a1a !important;
  font-size: 22px !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
}

#inboxView .inbox-copy p {
  max-width: 560px !important;
  color: #9ca3af !important;
  font-size: 11px !important;
  line-height: 1.6 !important;
}

#inboxView .inbox-target-path {
  position: absolute;
  top: 2px;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  color: #9ca3af;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
}

#inboxView .inbox-target-path code {
  padding: 5px 8px;
  border: 1px solid rgba(0, 0, 0, 0.03);
  border-radius: 6px;
  background: #f3f4f6;
  color: #4b5563;
  font-family: inherit;
  font-size: 10px;
}

#inboxView .inbox-source-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 18px !important;
}

#inboxView .inbox-source-card {
  position: relative !important;
  min-height: 192px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-end !important;
  gap: 5px !important;
  padding: 22px !important;
  overflow: hidden !important;
  border: 1px dashed rgba(0, 0, 0, 0.1) !important;
  border-radius: 16px !important;
  background: #fff !important;
  color: #1a1a1a !important;
  box-shadow: none !important;
  transition: transform 240ms cubic-bezier(0.16, 1, 0.3, 1), border-color 240ms ease, box-shadow 240ms ease !important;
}

#inboxView .inbox-source-card:hover,
#inboxView .inbox-source-card.dragover {
  transform: translateY(-2px);
  border-color: #1a1a1a !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.025) !important;
}

#inboxView .inbox-source-icon {
  position: absolute;
  top: 22px;
  left: 22px;
  width: 40px !important;
  height: 40px !important;
  border-radius: 10px !important;
  background: #f5f6f7 !important;
  color: #9ca3af !important;
  font-size: 13px !important;
  box-shadow: none !important;
  transition: all 240ms cubic-bezier(0.16, 1, 0.3, 1) !important;
}

#inboxView .inbox-source-card:hover .inbox-source-icon,
#inboxView .inbox-source-card.dragover .inbox-source-icon {
  background: #1a1a1a !important;
  color: #fff !important;
}

#inboxView .inbox-source-type {
  position: absolute;
  top: 24px;
  right: 22px;
  padding: 3px 6px;
  border: 1px solid rgba(0, 0, 0, 0.025);
  border-radius: 5px;
  background: #f8f9fa;
  color: #9ca3af;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 8px;
  font-weight: 600;
}

#inboxView .inbox-source-card strong {
  color: #30343a !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

#inboxView .inbox-source-card small {
  color: #9ca3af !important;
  font-size: 10px !important;
  line-height: 1.5 !important;
}

#inboxView .inbox-selected-files {
  gap: 8px !important;
  padding: 14px !important;
  border: 1px solid rgba(0, 0, 0, 0.045);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.74);
}

#inboxView .inbox-file-pill {
  max-width: 260px !important;
  padding: 9px 34px 9px 10px !important;
  border-color: rgba(0, 0, 0, 0.05) !important;
  border-radius: 8px !important;
  background: #fff !important;
}

#inboxView .inbox-file-pill strong {
  color: #4b5563 !important;
  font-size: 10px !important;
}

#inboxView .inbox-file-pill small {
  color: #9ca3af !important;
  font-size: 9px !important;
}

#inboxView .inbox-file-remove {
  top: 8px !important;
  right: 8px !important;
  width: 18px !important;
  min-width: 18px !important;
  height: 18px !important;
  border-radius: 5px !important;
  background: #f4f5f6 !important;
  color: #9ca3af !important;
  font-size: 12px !important;
}

#inboxView .inbox-console {
  min-height: 78px;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 20px !important;
  padding: 16px 18px !important;
  border: 1px solid rgba(0, 0, 0, 0.04) !important;
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.035) !important;
}

#inboxView .inbox-console-status {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

#inboxView .inbox-state-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  border: 1px solid #dbeafe;
  border-radius: 7px;
  background: #eff6ff;
  color: #2563eb;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

#inboxView .inbox-state-pill > i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3b82f6;
  animation: inboxStatusPulse 1.6s ease-in-out infinite;
}

@keyframes inboxStatusPulse {
  0%, 100% { opacity: 0.35; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1); }
}

#inboxView .inbox-console-status small {
  overflow: hidden;
  color: #9ca3af;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#inboxView .inbox-console-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

#inboxView .inbox-console button {
  min-height: 36px !important;
  padding: 0 14px !important;
  border-radius: 9px !important;
  font-size: 10px !important;
  font-weight: 800 !important;
}

#inboxView #inboxResetBtn {
  border-color: rgba(0, 0, 0, 0.03) !important;
  background: #f7f8f9 !important;
  color: #6b7280 !important;
}

#inboxView #inboxResetBtn:hover {
  background: #f1f2f3 !important;
  color: #1a1a1a !important;
}

#inboxView #inboxRecognizeBtn {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  padding: 0 18px !important;
  border-color: #1a1a1a !important;
  background: #1a1a1a !important;
  color: #fff !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.12) !important;
}

#inboxView #inboxRecognizeBtn:hover {
  background: #000 !important;
}

#inboxView .inbox-saved-path {
  border-color: rgba(0, 0, 0, 0.05) !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #6b7280 !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px !important;
}

#inboxView .inbox-draft {
  gap: 16px !important;
}

#inboxView .inbox-draft-preview,
#inboxView .inbox-draft-editor {
  border-color: rgba(0, 0, 0, 0.05) !important;
  border-radius: 12px !important;
  background: #fff !important;
  box-shadow: none !important;
}

#inboxView .inbox-draft-editor input,
#inboxView .inbox-draft-editor textarea {
  border-color: rgba(0, 0, 0, 0.07) !important;
  border-radius: 8px !important;
  background: #fafbfb !important;
  box-shadow: none !important;
}

#inboxView .inbox-draft-editor input:focus,
#inboxView .inbox-draft-editor textarea:focus {
  outline: 0 !important;
  border-color: #1a1a1a !important;
}

@media (max-width: 760px) {
  #inboxView .inbox-panel {
    width: calc(100% - 28px) !important;
    padding-top: 20px !important;
  }

  #inboxView .inbox-copy {
    padding-right: 0;
  }

  #inboxView .inbox-target-path {
    position: static;
    align-items: flex-start;
    margin-top: 12px;
  }

  #inboxView .inbox-source-grid {
    grid-template-columns: 1fr !important;
  }

  #inboxView .inbox-console,
  #inboxView .inbox-console-status {
    align-items: stretch !important;
    flex-direction: column;
  }

  #inboxView .inbox-console-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  #inboxView .inbox-draft {
    grid-template-columns: 1fr !important;
  }
}

/* View isolation: hidden routes must always win over page-specific display rules. */
#appView > .content > .view.hidden {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

#appView > .content > .view:not(.hidden) {
  visibility: visible;
}

/* Marketing report detail: reuse the full message-detail presentation in a modal. */
#marketingView .marketing-summary-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

#marketingView #openMarketingDetailBtn {
  min-height: 30px !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px !important;
  border: 1px solid rgba(0, 0, 0, 0.07) !important;
  border-radius: 7px !important;
  background: #fff !important;
  color: #4b5563 !important;
  font-size: 10px !important;
  font-weight: 750 !important;
}

#marketingView #openMarketingDetailBtn:hover:not(:disabled) {
  border-color: #1a1a1a !important;
  color: #1a1a1a !important;
}

#marketingView #openMarketingDetailBtn:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.marketing-detail-dialog {
  width: min(1180px, calc(100vw - 56px));
  height: min(820px, calc(100dvh - 56px));
  max-width: none;
  max-height: none;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  background: #fafbfb;
  color: #374151;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.18);
}

.marketing-detail-dialog::backdrop {
  background: rgba(17, 24, 39, 0.28);
  backdrop-filter: blur(3px);
}

.marketing-detail-head {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.045);
  background: rgba(250, 251, 251, 0.96);
}

.marketing-detail-heading {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.marketing-detail-path {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  color: #9ca3af;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  white-space: nowrap;
}

#marketingDetailPath {
  overflow: hidden;
  text-decoration: underline;
  text-overflow: ellipsis;
}

#marketingDetailTitle {
  margin: 0;
  color: #1a1a1a;
  font-size: 18px;
  font-weight: 800;
}

#marketingDetailMeta {
  margin: 0;
  color: #9ca3af;
  font-size: 10px;
}

.marketing-detail-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.marketing-detail-actions button {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 11px;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 7px;
  background: #fff;
  color: #4b5563;
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
}

#copyMarketingDetailBtn {
  border-color: #1a1a1a;
  background: #1a1a1a;
  color: #fff;
}

#closeMarketingDetailBtn {
  width: 30px;
  padding: 0;
}

.marketing-detail-content {
  height: calc(100% - 86px);
  overflow-y: auto;
  padding: 30px 34px 48px;
  background: #fafbfb;
  color: #374151;
}

.marketing-detail-content .message-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 28px 0 16px;
}

.marketing-detail-content .message-section-title:first-child {
  margin-top: 0;
}

.marketing-detail-content .message-section-indicator {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border-radius: 4px;
  background: #1a1a1a;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.marketing-detail-content .message-section-title h2,
.marketing-detail-content .message-section-title h3 {
  margin: 0 !important;
  color: #1a1a1a !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
}

.marketing-detail-content .message-detail-section {
  margin-bottom: 32px;
}

.marketing-detail-content .message-generic-card,
.marketing-detail-content .message-data-card,
.marketing-detail-content .message-risk-card {
  margin: 0 !important;
  padding: 16px !important;
  border: 1px solid rgba(0, 0, 0, 0.05) !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: #4b5563 !important;
  font-size: 12px !important;
  line-height: 1.7 !important;
}

.marketing-detail-content .message-generic-card p {
  margin: 0 0 10px;
}

.marketing-detail-content .message-generic-card p:last-child {
  margin-bottom: 0;
}

.marketing-detail-content .message-conclusion-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px !important;
  padding: 0 !important;
  list-style: none !important;
}

.marketing-detail-content .message-risk-card {
  border-color: rgba(254, 202, 202, 0.45) !important;
  background: rgba(254, 242, 242, 0.18) !important;
}

.marketing-detail-content .message-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.marketing-detail-content .message-metric-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 10px;
  background: #fff;
}

.marketing-detail-content .message-metric-card span {
  color: #9ca3af;
  font-size: 10px;
  font-weight: 700;
}

.marketing-detail-content .message-metric-card strong {
  color: #1a1a1a;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
}

.marketing-detail-content .message-table-shell {
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 10px;
  background: #fff;
}

.marketing-detail-content .message-table-shell table {
  width: 100% !important;
  margin: 0 !important;
  border-collapse: collapse !important;
  font-size: 12px !important;
}

.marketing-detail-content .message-table-shell th,
.marketing-detail-content .message-table-shell td {
  padding: 12px !important;
  border: 0 !important;
  border-bottom: 1px solid #f5f6f7 !important;
  text-align: left !important;
}

.marketing-detail-content .message-table-shell th {
  background: #f9fafb;
  color: #9ca3af;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
}

.marketing-detail-content .message-table-footer {
  padding: 12px 16px;
  background: rgba(249, 250, 251, 0.65);
  color: #9ca3af;
  font-size: 10px;
}

@media (max-width: 760px) {
  .marketing-detail-dialog {
    width: calc(100vw - 20px);
    height: calc(100dvh - 20px);
  }

  .marketing-detail-head {
    padding: 14px;
  }

  #marketingDetailMeta,
  #copyMarketingDetailBtn {
    display: none;
  }

  .marketing-detail-content {
    padding: 20px 16px 36px;
  }

  .marketing-detail-content .message-conclusion-grid,
  .marketing-detail-content .message-metric-grid {
    grid-template-columns: 1fr;
  }
}

/* Final review-card controls: no file badge, centered monochrome selection. */
#marketingView .marketing-file-card {
  min-height: 68px !important;
  grid-template-columns: minmax(0, 1fr) auto 24px !important;
  grid-template-rows: auto !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 10px 12px !important;
}

#marketingView .marketing-file-card .file-thumb {
  display: none !important;
}

#marketingView .marketing-file-card .file-card-body {
  grid-column: 1 !important;
  min-height: 0 !important;
  gap: 3px !important;
}

#marketingView .marketing-file-card .file-card-actions {
  grid-column: 2 !important;
  align-self: center !important;
}

#marketingView .marketing-review-check {
  position: static !important;
  grid-column: 3 !important;
  align-self: center !important;
  display: grid !important;
  min-width: 20px !important;
  max-width: 20px !important;
  min-height: 20px !important;
  max-height: 20px !important;
  width: 20px !important;
  height: 20px !important;
  place-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

#marketingView .marketing-review-check input {
  appearance: none !important;
  box-sizing: border-box !important;
  flex: 0 0 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  min-height: 18px !important;
  max-height: 18px !important;
  width: 18px !important;
  height: 18px !important;
  display: grid !important;
  place-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid #aeb4bc !important;
  border-radius: 4px !important;
  outline: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
  cursor: pointer;
}

#marketingView .marketing-review-check input::after {
  content: "";
  width: 5px;
  height: 9px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  opacity: 0;
  transform: translateY(-1px) rotate(45deg);
}

#marketingView .marketing-review-check input:checked {
  border-color: #1a1a1a !important;
  background: #1a1a1a !important;
}

#marketingView .marketing-review-check input:checked::after {
  opacity: 1;
}

#marketingView .marketing-review-check input:focus,
#marketingView .marketing-review-check input:focus-visible {
  outline: 0 !important;
  box-shadow: none !important;
}

/* Global UI foundation: Linear / cold-salt cleanup.
   This layer intentionally sits last to normalize the legacy CSS stack while
   preserving the existing DOM, data flow, and event bindings. */
:root {
  --ui-font-sans: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Segoe UI", sans-serif;
  --ui-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --ui-ink: #1A1A1A;
  --ui-canvas: #FAFBFB;
  --ui-card: #FFFFFF;
  --ui-border: rgba(0, 0, 0, 0.04);
  --ui-border-strong: rgba(0, 0, 0, 0.12);
  --ui-muted: #9CA3AF;
  --ui-muted-strong: #6B7280;
  --ui-blue-bg: #EFF6FF;
  --ui-blue-text: #2563EB;
  --ui-blue-border: #DBEAFE;
}

html,
body {
  font-family: var(--ui-font-sans) !important;
  background: var(--ui-canvas) !important;
  color: var(--ui-ink) !important;
}

body :where(*):not(.fa):not(.fa-solid):not(.fa-regular):not(.fa-brands):not([class^="fa-"]):not([class*=" fa-"]) {
  font-family: inherit;
}

:where(button, input, textarea, select) {
  font-family: var(--ui-font-sans) !important;
}

/* Tailwind-compatible utility aliases used by the visual spec. */
.font-mono {
  font-family: var(--ui-font-mono) !important;
}

.text-xl {
  font-size: 20px !important;
  line-height: 28px !important;
}

.font-black {
  font-weight: 900 !important;
}

.tracking-tight {
  letter-spacing: -0.025em !important;
}

.tracking-widest {
  letter-spacing: 0.1em !important;
}

.uppercase {
  text-transform: uppercase !important;
}

.bg-white {
  background-color: #fff !important;
}

.bg-\[\#FAFBFB\] {
  background-color: var(--ui-canvas) !important;
}

.bg-\[\#1A1A1A\] {
  background-color: var(--ui-ink) !important;
}

.text-\[\#1A1A1A\] {
  color: var(--ui-ink) !important;
}

.text-gray-400 {
  color: var(--ui-muted) !important;
}

.bg-blue-50 {
  background-color: var(--ui-blue-bg) !important;
}

.text-blue-600 {
  color: var(--ui-blue-text) !important;
}

.border-blue-100 {
  border-color: var(--ui-blue-border) !important;
}

.rounded-lg {
  border-radius: 8px !important;
}

/* Typography scale. */
:where(h1, h2, h3, .view-title, .page-title, .settings-hero h2, .panel-head h3, .marketing-screen-head h3, .dialog-head h3, .notes-editor-head h2, .message-detail-head h3, .home-hero h1) {
  color: var(--ui-ink) !important;
  font-size: 20px !important;
  line-height: 28px !important;
  font-weight: 900 !important;
  letter-spacing: -0.025em !important;
}

:where(.file-type-mark, .inbox-source-type, .inbox-cloud-type, .settings-card-icon, .message-status, .nav-badge, .tag, .badge, [class*="badge"], [class*="type-mark"]) {
  font-family: var(--ui-font-mono) !important;
  font-size: 9px !important;
  line-height: 1 !important;
  font-weight: 500 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  color: var(--ui-muted) !important;
}

:where(small, time, .meta, .file-card-body small, .message-list-copy small, .workspace-card small, .note-card-title-line small, .marketing-metric small, .home-chat-state, .note-statusbar, .settings-security-note, .sidebar-sync-status) {
  font-family: var(--ui-font-mono) !important;
  font-size: 11px !important;
  line-height: 1.45 !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
}

/* Monospace data surfaces: paths, sizes, status codes, timestamps, snippets. */
:where(code, pre, kbd, samp, .saved-path, .pathbar span, [id$="Path"], [id*="Path"], [class*="path"], [class*="Path"], [class*="status"], [class*="State"], [id*="State"], [id*="state"], [class*="timestamp"], [class*="time"], [datetime]) {
  font-family: var(--ui-font-mono) !important;
}

:where(.saved-path, .pathbar span, [id$="Path"], [id*="Path"], [class*="path"], [class*="Path"], [class*="status"], [class*="State"], [id*="State"], [id*="state"]) {
  font-size: 11px !important;
  color: var(--ui-muted-strong) !important;
}

/* Canvas, cards, panels. */
:where(.app-shell, .content, .view, .auth-shell, .home-ai-shell, .marketing-page, #settingsView, #todosView, #dashboardView, #messagesView, #inboxView, #marketingView) {
  background: var(--ui-canvas) !important;
}

:where(.panel, .auth-card, .card, .settings-summary-card, .settings-config-card, .workspace-card, .workspace-file-card, .file-card, .message-list-item, .message-detail-card, .inbox-source-card, .inbox-saved-card, .thought-card, .note-open, .marketing-metric, .marketing-file-card, .browser-row, .inbox-cloud-row, dialog, .workspace-asset-dialog, .marketing-review-composer, .home-search-shell, .home-message, .note-editor-shell) {
  border: 1px solid var(--ui-border) !important;
  background: var(--ui-card) !important;
  color: var(--ui-ink) !important;
  box-shadow: none !important;
}

:where(.workspace-file-card:hover, .file-card:hover, .message-list-item:hover, .inbox-source-card:hover, .thought-card:hover, .marketing-file-card:hover, .browser-row:hover, .inbox-cloud-row:hover) {
  border-color: var(--ui-border-strong) !important;
  background: #fff !important;
  box-shadow: none !important;
}

:where(.workspace-file-card.selected, .file-card.selected, .message-list-item.active, .inbox-cloud-row.selected, .marketing-file-card.selected, .thought-tags button.active) {
  border-color: var(--ui-ink) !important;
  background: #fff !important;
  color: var(--ui-ink) !important;
  box-shadow: inset 3px 0 var(--ui-ink) !important;
}

/* Buttons and form controls. */
:where(.primary, button.primary, .button-row .primary, [type="submit"], .marketing-run-button, #homeChatSendBtn, .home-send-btn) {
  border-color: var(--ui-ink) !important;
  background: var(--ui-ink) !important;
  color: #fff !important;
}

:where(.primary:hover, button.primary:hover, .button-row .primary:hover, [type="submit"]:hover, .marketing-run-button:hover, #homeChatSendBtn:hover, .home-send-btn:hover) {
  border-color: var(--ui-ink) !important;
  background: var(--ui-ink) !important;
  color: #fff !important;
  filter: none !important;
}

:where(.secondary, button.secondary, .ghost-icon, .link-btn, .icon-btn, .toolbar-actions button, .message-head-actions button, .reader-actions button, .subhead button, .settings-tabs button, .home-examples button) {
  border: 1px solid var(--ui-border) !important;
  background: #fff !important;
  color: var(--ui-ink) !important;
  box-shadow: none !important;
}

:where(.secondary:hover, button.secondary:hover, .ghost-icon:hover, .link-btn:hover, .icon-btn:hover, .toolbar-actions button:hover, .message-head-actions button:hover, .reader-actions button:hover, .subhead button:hover, .settings-tabs button:hover, .home-examples button:hover) {
  border-color: var(--ui-border-strong) !important;
  background: #fff !important;
  color: var(--ui-ink) !important;
}

:where(input, textarea, select) {
  border: 1px solid var(--ui-border) !important;
  background: #fff !important;
  color: var(--ui-ink) !important;
  box-shadow: none !important;
}

:where(input:focus, textarea:focus, select:focus, input:focus-visible, textarea:focus-visible, select:focus-visible) {
  border-color: rgba(0, 0, 0, 0.18) !important;
  outline: 0 !important;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.04) !important;
}

/* Desaturated blue status pills. */
:where(.settings-state-pill, .inbox-state-pill, .message-status, .sidebar-sync-status, .status-pill, [class*="state-pill"], [class*="status-pill"]) {
  border: 1px solid var(--ui-blue-border) !important;
  border-radius: 8px !important;
  background: var(--ui-blue-bg) !important;
  color: var(--ui-blue-text) !important;
  font-family: var(--ui-font-mono) !important;
  font-size: 11px !important;
  font-weight: 400 !important;
}

#dashboardView .home-search-status {
  display: none !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--ui-muted-strong) !important;
}

#dashboardView .home-ai-shell.home-chat-active .home-search-status {
  display: flex !important;
}

#dashboardView .home-search-status .home-chat-state {
  color: var(--ui-muted-strong) !important;
}

#dashboardView .home-search-status #ping-dot,
#dashboardView .home-search-status #core-dot {
  background: #D1D5DB !important;
}

#dashboardView .home-chat-form.has-content .home-search-status #ping-dot,
#dashboardView .home-chat-form.has-content .home-search-status #core-dot,
#dashboardView .home-ai-shell.home-chat-active .home-search-status #ping-dot,
#dashboardView .home-ai-shell.home-chat-active .home-search-status #core-dot {
  background: var(--ui-blue-text) !important;
}

#dashboardView .home-analysis-open > :not(.home-analysis-overlay) {
  opacity: 0.4 !important;
  transition: opacity 220ms ease !important;
}

#dashboardView .home-analysis-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 500 !important;
  display: grid !important;
  place-items: center !important;
  padding: 32px !important;
  background: rgba(0, 0, 0, 0.06) !important;
  backdrop-filter: blur(3px) !important;
  -webkit-backdrop-filter: blur(3px) !important;
  opacity: 1 !important;
  transition: opacity 260ms ease !important;
}

#dashboardView .home-analysis-overlay.hidden {
  display: none !important;
}

#dashboardView .home-analysis-overlay.is-closing {
  opacity: 0 !important;
}

#dashboardView .home-analysis-modal {
  position: relative !important;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) auto !important;
  width: min(840px, 92vw) !important;
  max-height: 85vh !important;
  overflow: hidden !important;
  border: 1px solid rgba(0, 0, 0, 0.05) !important;
  border-radius: 12px !important;
  background: #fff !important;
  color: var(--ui-ink) !important;
  box-shadow:
    0 34px 90px rgba(15, 23, 42, 0.18),
    0 10px 28px rgba(15, 23, 42, 0.10),
    0 0 0 1px rgba(255, 255, 255, 0.9) inset !important;
  opacity: 1 !important;
  transform: scale(1) translateY(0) !important;
  animation: homeAnalysisModalIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) both !important;
}

#dashboardView .home-analysis-overlay.is-closing .home-analysis-modal {
  opacity: 0 !important;
  transform: scale(0.97) translateY(10px) !important;
  transition: opacity 240ms ease, transform 240ms ease !important;
  animation: none !important;
}

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

#dashboardView .home-analysis-close {
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  z-index: 3 !important;
  width: 32px !important;
  height: 32px !important;
  display: grid !important;
  place-items: center !important;
  border: 1px solid rgba(0, 0, 0, 0.05) !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.92) !important;
  color: #6b7280 !important;
  font-size: 20px !important;
  line-height: 1 !important;
  cursor: pointer !important;
}

#dashboardView .home-analysis-close:hover {
  background: #f7f7f8 !important;
  color: var(--ui-ink) !important;
}

#dashboardView .home-analysis-context {
  padding: 28px 56px 6px 32px !important;
  color: #9ca3af !important;
  font-size: 12px !important;
  line-height: 1.65 !important;
  mask-image: linear-gradient(to bottom, transparent 0%, #000 36%, #000 100%) !important;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 36%, #000 100%) !important;
}

#dashboardView .home-analysis-context p {
  margin: 0 !important;
}

#dashboardView .home-analysis-content {
  min-height: 360px !important;
  overflow: auto !important;
  padding: 18px 32px 28px !important;
  color: #2f3742 !important;
}

#dashboardView .home-analysis-loading {
  min-height: 280px !important;
  display: grid !important;
  place-items: center !important;
  align-content: center !important;
  gap: 10px !important;
  text-align: center !important;
  color: #6b7280 !important;
}

#dashboardView .home-analysis-loading span {
  width: 10px !important;
  height: 10px !important;
  border-radius: 999px !important;
  background: var(--ui-ink) !important;
  box-shadow: 0 0 0 8px rgba(26, 26, 26, 0.05) !important;
  animation: homeAnalysisPulse 1.3s ease-in-out infinite !important;
}

@keyframes homeAnalysisPulse {
  0%, 100% { transform: scale(0.85); opacity: 0.55; }
  50% { transform: scale(1); opacity: 1; }
}

#dashboardView .home-analysis-loading strong {
  color: var(--ui-ink) !important;
  font-size: 15px !important;
}

#dashboardView .home-analysis-loading small {
  color: #9ca3af !important;
}

#dashboardView .home-analysis-sources {
  margin-top: 28px !important;
  padding-top: 16px !important;
  border-top: 1px solid #f2f2f7 !important;
}

#dashboardView .home-analysis-footer {
  position: sticky !important;
  bottom: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  padding: 12px 16px !important;
  border-top: 1px solid #f2f2f7 !important;
  background: rgba(255, 255, 255, 0.96) !important;
}

#dashboardView .home-analysis-tools-left,
#dashboardView .home-analysis-tools-right {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

#dashboardView .home-analysis-footer button {
  min-height: 32px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  padding: 0 10px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: #4b5563 !important;
  font-size: 12px !important;
  cursor: pointer !important;
}

#dashboardView .home-analysis-tools-right button {
  width: 32px !important;
  padding: 0 !important;
}

#dashboardView .home-analysis-footer button:hover {
  background: #f5f5f6 !important;
  color: var(--ui-ink) !important;
}

#messagesView .message-followup-thread {
  display: flex !important;
  width: min(920px, calc(100% - 64px)) !important;
  margin: 0 auto 12px !important;
  padding: 0 0 8px !important;
  flex-direction: column !important;
  gap: 14px !important;
}

#messagesView .message-followup-thread.hidden,
#messagesView .message-followup-form.hidden {
  display: none !important;
}

#messagesView .message-followup-form {
  position: sticky !important;
  bottom: 18px !important;
  z-index: 5 !important;
  width: min(920px, calc(100% - 64px)) !important;
  margin: 16px auto 24px !important;
  border: 1px solid var(--ui-border-strong) !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, 0.94) !important;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.06) !important;
  backdrop-filter: blur(12px);
}

#messagesView .message-followup-form textarea {
  min-height: 44px !important;
  max-height: 150px !important;
  resize: none !important;
}

#messagesView .message-followup-form .home-chat-state {
  min-height: 0 !important;
  padding: 0 14px 10px !important;
  text-align: left !important;
}

#messagesView .home-message.user {
  justify-content: flex-end !important;
}

#messagesView .home-message.assistant {
  justify-content: flex-start !important;
}

#messagesView .home-message-body {
  max-width: min(720px, 86%) !important;
  border-radius: 10px !important;
  padding: 12px 15px !important;
  line-height: 1.65 !important;
  overflow-wrap: anywhere !important;
}

#messagesView .home-message.user .home-message-body {
  background: var(--ui-ink) !important;
  color: #fff !important;
}

#messagesView .home-message.assistant .home-message-body {
  border: 0 !important;
  background: transparent !important;
  color: var(--ui-ink) !important;
  padding-left: 0 !important;
}

#messagesView .message-followup-dock {
  position: sticky !important;
  bottom: 16px !important;
  z-index: 8 !important;
  width: min(630px, calc(100% - 48px)) !important;
  margin: 12px auto 24px !important;
  display: grid !important;
  justify-items: center !important;
  gap: 8px !important;
}

#messagesView .message-followup-dock.hidden {
  display: none !important;
}

#messagesView .message-followup-toggle {
  min-height: 24px !important;
  padding: 0 10px !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.86) !important;
  color: #6b7280 !important;
  font-size: 11px !important;
  cursor: pointer !important;
  box-shadow: none !important;
}

#messagesView .message-followup-toggle:hover {
  border-color: rgba(0, 0, 0, 0.16) !important;
  color: var(--ui-ink) !important;
  background: #fff !important;
}

#messagesView .message-followup-panel {
  width: 100% !important;
  max-height: 144px !important;
  overflow: hidden !important;
  opacity: 1 !important;
  transform: translateY(0) !important;
  transition: max-height 220ms cubic-bezier(0.16, 1, 0.3, 1), opacity 180ms ease, transform 220ms cubic-bezier(0.16, 1, 0.3, 1) !important;
}

#messagesView .message-followup-panel.collapsed {
  max-height: 0 !important;
  opacity: 0 !important;
  transform: translateY(8px) !important;
  pointer-events: none !important;
}

#messagesView .message-followup-form {
  position: relative !important;
  bottom: auto !important;
  width: 100% !important;
  min-height: 63px !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  margin: 0 !important;
  padding: 9px !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  border-radius: 15px !important;
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.06) !important;
  backdrop-filter: blur(10px);
  transition: border-color 180ms ease, box-shadow 180ms ease !important;
}

#messagesView .message-followup-form:focus-within {
  border-color: #000 !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08) !important;
}

#messagesView .message-followup-form .home-attach-btn {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  display: grid !important;
  place-items: center !important;
  border: 0 !important;
  border-radius: 9px !important;
  background: transparent !important;
  color: #9ca3af !important;
  font-size: 15px !important;
}

#messagesView .message-followup-form .home-search-main {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

#messagesView .message-followup-form textarea {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  min-height: 42px !important;
  max-height: 114px !important;
  padding: 9px 6px !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--ui-ink) !important;
  font-size: 18px !important;
  line-height: 1.45 !important;
  resize: none !important;
  outline: 0 !important;
}

#messagesView .message-followup-form textarea:focus,
#messagesView .message-followup-form textarea:focus-visible {
  border: 0 !important;
  box-shadow: none !important;
}

#messagesView .message-followup-form .home-search-submit {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex: 0 0 auto !important;
}

#messagesView .message-followup-form kbd {
  color: #9ca3af !important;
  font-size: 13px !important;
  font-family: var(--ui-font-mono) !important;
}

#messagesView .message-followup-form .home-send-btn {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  display: grid !important;
  place-items: center !important;
  border: 1px solid #dbeafe !important;
  border-radius: 12px !important;
  background: #fff !important;
  color: #60a5fa !important;
  box-shadow: none !important;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease !important;
}

#messagesView .message-followup-form.has-content .home-send-btn:not(:disabled) {
  border-color: #1d4ed8 !important;
  background: #1d4ed8 !important;
  color: #fff !important;
}

#messagesView .message-followup-form.has-content .home-send-btn:not(:disabled):hover {
  transform: translateY(-1px) !important;
}

#messagesView .message-followup-form .home-chat-state {
  display: none !important;
}

/* Keep destructive actions quiet but recognizable. */
:where(.danger, button.danger, .ghost-icon.danger) {
  color: #B91C1C !important;
  border-color: rgba(185, 28, 28, 0.12) !important;
  background: #fff !important;
}

/* Notes sidebar final isolation: keep the tree compact after global card resets. */
#todosView .note-folder-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 24px !important;
  align-items: center !important;
  gap: 4px !important;
  min-width: 0 !important;
}

#todosView .note-folder-toggle {
  min-width: 0 !important;
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

#todosView .note-folder-name {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-family: var(--ui-font-sans) !important;
  font-size: 12px !important;
  line-height: 1.3 !important;
}

#todosView .note-folder-more {
  position: relative !important;
  z-index: 2 !important;
  width: 22px !important;
  min-width: 22px !important;
  height: 22px !important;
  min-height: 22px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 7px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #9ca3af !important;
  cursor: pointer !important;
  pointer-events: auto !important;
}

#todosView .note-folder-notes {
  padding: 2px 0 4px calc(var(--folder-indent, 0px) + 32px) !important;
}

#todosView .note-folder-notes .note-item {
  position: relative !important;
  min-height: 36px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 24px !important;
  align-items: center !important;
  gap: 4px !important;
  margin: 1px 0 !important;
  padding: 2px 4px 2px 8px !important;
  border: 1px solid transparent !important;
  border-radius: 9px !important;
  background: transparent !important;
  box-shadow: none !important;
}

#todosView .note-folder-notes .note-item:hover {
  background: rgba(0, 0, 0, 0.025) !important;
}

#todosView .note-folder-notes .note-item.active {
  border-color: rgba(0, 0, 0, 0.08) !important;
  background: #fff !important;
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.035) !important;
}

#todosView .note-folder-notes .note-open {
  min-width: 0 !important;
  width: 100% !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 2px !important;
  padding: 6px 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  text-align: left !important;
}

#todosView .note-folder-notes .note-card-title-line {
  min-width: 0 !important;
  display: block !important;
}

#todosView .note-folder-notes .note-open strong {
  display: block !important;
  min-width: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-family: var(--ui-font-sans) !important;
  font-size: 12px !important;
  font-weight: 760 !important;
  line-height: 1.35 !important;
  color: #1a1a1a !important;
}

#todosView .note-folder-notes .note-open small {
  display: none !important;
}

#todosView .note-folder-notes .note-open > span:not(.note-card-title-line) {
  display: block !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-family: var(--ui-font-sans) !important;
  font-size: 10px !important;
  line-height: 1.25 !important;
  color: #a1a8b3 !important;
}

#todosView .note-folder-notes .note-item .row-actions {
  position: relative !important;
  z-index: 2 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transform: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

#todosView .note-folder-notes .note-item:hover .row-actions,
#todosView .note-folder-notes .note-item.active .row-actions,
#todosView .note-folder-notes .note-item:focus-within .row-actions {
  opacity: 1 !important;
  pointer-events: auto !important;
}

#todosView .note-folder-notes .note-item .row-actions button {
  width: 22px !important;
  min-width: 22px !important;
  height: 22px !important;
  min-height: 22px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 7px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #9ca3af !important;
  font-size: 12px !important;
  cursor: pointer !important;
  pointer-events: auto !important;
}

#todosView .note-folder-notes .note-item .row-actions button:hover,
#todosView .note-folder-notes .note-item .row-actions button:focus-visible,
#todosView .note-folder-more:focus-visible,
#todosView .note-folder-more:hover {
  background: rgba(0, 0, 0, 0.045) !important;
  color: #1a1a1a !important;
}

/* Tiptap image resize affordance. */
#todosView .note-editor [data-resize-container][data-node="image"] {
  width: fit-content !important;
  max-width: 100% !important;
  margin: 18px 0 !important;
}

#todosView .note-editor [data-resize-wrapper] {
  max-width: 100% !important;
  line-height: 0 !important;
}

#todosView .note-editor [data-resize-wrapper] > img {
  display: block !important;
  max-width: 100% !important;
  height: auto !important;
  border-radius: 12px !important;
}

#todosView .note-editor [data-resize-container][data-node="image"].ProseMirror-selectednode [data-resize-wrapper],
#todosView .note-editor [data-resize-container][data-node="image"]:has(.ProseMirror-selectednode) [data-resize-wrapper],
#todosView .note-editor [data-resize-container][data-node="image"][data-resize-state="true"] [data-resize-wrapper] {
  outline: 1.5px solid #1a1a1a !important;
  outline-offset: 4px !important;
  border-radius: 13px !important;
}

#todosView .note-editor [data-resize-handle] {
  width: 12px !important;
  height: 12px !important;
  margin: -6px !important;
  border: 2px solid #fff !important;
  border-radius: 999px !important;
  background: #1a1a1a !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18) !important;
  opacity: 0 !important;
  transition: opacity 160ms ease, transform 160ms ease !important;
}

#todosView .note-editor [data-resize-container][data-node="image"]:hover [data-resize-handle],
#todosView .note-editor [data-resize-container][data-node="image"].ProseMirror-selectednode [data-resize-handle],
#todosView .note-editor [data-resize-container][data-node="image"]:has(.ProseMirror-selectednode) [data-resize-handle],
#todosView .note-editor [data-resize-container][data-node="image"][data-resize-state="true"] [data-resize-handle] {
  opacity: 1 !important;
}

#todosView .note-editor [data-resize-handle="top-left"],
#todosView .note-editor [data-resize-handle="bottom-right"] {
  cursor: nwse-resize !important;
}

#todosView .note-editor [data-resize-handle="top-right"],
#todosView .note-editor [data-resize-handle="bottom-left"] {
  cursor: nesw-resize !important;
}

.marketing-today-actions {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.marketing-today-date {
  width: max-content !important;
  flex: 0 0 auto !important;
  min-height: 34px !important;
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  padding: 0 8px 0 10px !important;
  border: 1px solid rgba(0, 0, 0, 0.07) !important;
  border-radius: 7px !important;
  background: #fff !important;
  color: #6b7280 !important;
  font-size: 11px !important;
  font-weight: 650 !important;
  white-space: nowrap !important;
}

.marketing-today-date select {
  min-width: 112px !important;
  width: auto !important;
  flex: 0 0 auto !important;
  padding: 0 4px !important;
  border: 0 !important;
  background: transparent !important;
  color: #1f2937 !important;
  font: inherit !important;
  outline: none !important;
}

@media (max-width: 768px) {
  .marketing-today-actions {
    width: 100% !important;
    align-items: stretch !important;
    flex-direction: column !important;
  }

  .marketing-today-date,
  .marketing-today-date select {
    width: 100% !important;
  }
}

/* Multi-dimensional marketing trend dashboard. */
.trend-analysis-wrapper {
  display: grid !important;
  gap: 26px !important;
  min-width: 0 !important;
}

.trend-analysis-wrapper .trend-page-head {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 24px !important;
  padding-bottom: 26px !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
}

.trend-analysis-wrapper .trend-page-head h2 {
  margin: 0 !important;
  color: #111318 !important;
  font-size: 30px !important;
  font-weight: 850 !important;
  line-height: 1.12 !important;
}

.trend-analysis-wrapper .trend-page-meta {
  display: grid !important;
  justify-items: end !important;
  gap: 8px !important;
  color: #8d9099 !important;
  font-size: 14px !important;
  font-weight: 750 !important;
  line-height: 1.2 !important;
}

.trend-analysis-wrapper .trend-page-meta div {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.trend-analysis-wrapper .trend-page-meta strong {
  color: #8d9099 !important;
  font-weight: 800 !important;
}

.trend-analysis-wrapper .trend-page-meta time {
  color: #8d9099 !important;
  font-size: 14px !important;
  font-weight: 750 !important;
}

.trend-analysis-wrapper .trend-card {
  background-color: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.045) !important;
  border-radius: 16px !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.012) !important;
}

.trend-analysis-wrapper .filter-inline-row {
  position: relative !important;
  z-index: 12 !important;
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  padding: 18px 0 8px !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.trend-analysis-wrapper .trend-filter {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  min-width: 0 !important;
  min-height: 44px !important;
  padding: 0 42px 0 18px !important;
  border: 1px solid rgba(0, 0, 0, 0.02) !important;
  border-radius: 9px !important;
  background: rgba(0, 0, 0, 0.035) !important;
}

.trend-analysis-wrapper .trend-filter span {
  color: #9a9ca5 !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
}

.trend-analysis-wrapper .trend-filter::after {
  content: "\f078" !important;
  position: absolute !important;
  top: 50% !important;
  right: 17px !important;
  bottom: auto !important;
  transform: translateY(-50%) !important;
  color: #4c4f56 !important;
  font-family: "Font Awesome 6 Free" !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  pointer-events: none !important;
}

.trend-analysis-wrapper .trend-date-trigger {
  min-height: 34px !important;
  border: 1px solid rgba(0, 0, 0, 0.02) !important;
  border-radius: 9px !important;
  background: rgba(0, 0, 0, 0.035) !important;
  color: #48484a !important;
  font-size: 14px !important;
  font-weight: 800 !important;
}

.trend-analysis-wrapper .trend-filter select {
  width: auto !important;
  max-width: 220px !important;
  min-width: 92px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: #3f4147 !important;
  font-size: 14px !important;
  font-weight: 850 !important;
  appearance: none !important;
}

.trend-analysis-wrapper .trend-date-picker {
  position: relative !important;
  margin-left: 6px !important;
}

.trend-analysis-wrapper .trend-date-trigger {
  min-width: 278px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  min-height: 44px !important;
  padding: 0 17px !important;
  cursor: pointer !important;
}

.trend-analysis-wrapper .trend-date-trigger .fa-calendar {
  display: none !important;
}

.trend-analysis-wrapper .trend-date-trigger[aria-expanded="true"] {
  border-color: rgba(0, 122, 255, 0.18) !important;
  background: rgba(0, 122, 255, 0.04) !important;
}

.trend-analysis-wrapper .trend-date-panel {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  right: 0 !important;
  width: min(720px, calc(100vw - 80px)) !important;
  display: grid !important;
  grid-template-columns: 130px minmax(0, 1fr) !important;
  overflow: hidden !important;
  border: 1px solid rgba(0, 0, 0, 0.04) !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, 0.98) !important;
  box-shadow: 0 18px 56px rgba(0, 0, 0, 0.1) !important;
  backdrop-filter: blur(10px) !important;
}

.trend-analysis-wrapper .trend-date-panel.hidden {
  display: none !important;
}

.trend-analysis-wrapper .trend-date-shortcuts {
  display: grid !important;
  align-content: start !important;
  gap: 2px !important;
  padding: 10px !important;
  border-right: 1px solid rgba(0, 0, 0, 0.04) !important;
  background: rgba(0, 0, 0, 0.02) !important;
}

.trend-analysis-wrapper .trend-date-shortcuts button {
  min-height: 34px !important;
  padding: 0 10px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: #6b7280 !important;
  font-size: 11px !important;
  text-align: left !important;
}

.trend-analysis-wrapper .trend-date-shortcuts button:hover {
  background: rgba(0, 122, 255, 0.06) !important;
  color: #007aff !important;
}

.trend-analysis-wrapper .trend-calendar-area {
  min-width: 0 !important;
  padding: 14px !important;
}

.trend-analysis-wrapper .trend-calendar-nav {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 12px !important;
  color: #27272a !important;
  font-size: 12px !important;
  font-weight: 750 !important;
}

.trend-analysis-wrapper .trend-calendar-nav button {
  width: 30px !important;
  height: 30px !important;
  padding: 0 !important;
  border: 1px solid rgba(0, 0, 0, 0.04) !important;
  border-radius: 8px !important;
  background: #fff !important;
}

.trend-analysis-wrapper .trend-calendars {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 18px !important;
}

.trend-analysis-wrapper .trend-calendar {
  min-width: 0 !important;
}

.trend-analysis-wrapper .trend-calendar > strong {
  display: block !important;
  margin-bottom: 10px !important;
  color: #1c1c1e !important;
  font-size: 12px !important;
  text-align: center !important;
}

.trend-analysis-wrapper .trend-calendar-week,
.trend-analysis-wrapper .trend-calendar-days {
  display: grid !important;
  grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
  gap: 3px !important;
}

.trend-analysis-wrapper .trend-calendar-week span {
  padding: 4px 0 !important;
  color: #8e8e93 !important;
  font-size: 9px !important;
  text-align: center !important;
}

.trend-analysis-wrapper .trend-calendar-days button {
  height: 28px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 7px !important;
  background: transparent !important;
  color: #48484a !important;
  font-size: 10px !important;
}

.trend-analysis-wrapper .trend-calendar-days button.muted {
  color: #c7c7cc !important;
}

.trend-analysis-wrapper .trend-calendar-days button.in-range {
  background: rgba(0, 122, 255, 0.06) !important;
  color: #007aff !important;
}

.trend-analysis-wrapper .trend-calendar-days button.selected {
  background: #007aff !important;
  color: #fff !important;
  font-weight: 800 !important;
}

.trend-analysis-wrapper .trend-card {
  padding: 38px 44px 24px !important;
  margin-bottom: 0 !important;
}

.trend-analysis-wrapper .trend-card-head {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 20px !important;
  margin-bottom: 22px !important;
}

.trend-analysis-wrapper .trend-card-head span {
  color: #111318 !important;
  font-size: 18px !important;
  font-weight: 850 !important;
}

.trend-analysis-wrapper .trend-chart {
  width: 100% !important;
  min-width: 0 !important;
  height: 430px !important;
}

.trend-analysis-wrapper .chart-avg-badge-dock {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
}

.trend-analysis-wrapper .trend-avg-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
  padding: 6px 10px !important;
  border-radius: 6px !important;
  font-size: 13px !important;
  font-weight: 850 !important;
  line-height: 1.35 !important;
  white-space: nowrap !important;
}

.trend-analysis-wrapper .trend-avg-badge strong {
  color: inherit !important;
  font-size: 13px !important;
  font-weight: 900 !important;
}

.trend-analysis-wrapper .trend-avg-badge.cost {
  background-color: rgba(0, 122, 255, 0.075) !important;
  color: #007aff !important;
}

.trend-analysis-wrapper .trend-avg-badge.expense {
  background-color: rgba(255, 149, 0, 0.09) !important;
  color: #e77d00 !important;
}

.trend-analysis-wrapper .trend-avg-badge.conversion {
  background-color: rgba(29, 173, 85, 0.09) !important;
  color: #1cad55 !important;
}

.trend-analysis-wrapper .trend-avg-badge.danger {
  background-color: rgba(233, 32, 39, 0.075) !important;
  color: #e92027 !important;
}

.trend-analysis-wrapper .chart-avg-badge-dock.operation .trend-avg-badge.cost {
  background-color: #f3f8ff !important;
}

.trend-analysis-wrapper .chart-avg-badge-dock.operation .trend-avg-badge.cost strong {
  color: #1677ff !important;
}

.trend-analysis-wrapper .chart-avg-badge-dock.operation .trend-avg-badge.conversion {
  background-color: #f0fbf4 !important;
}

.trend-analysis-wrapper .chart-avg-badge-dock.operation .trend-avg-badge.conversion strong {
  color: #22b95b !important;
}

.trend-analysis-wrapper .chart-avg-badge-dock.operation .trend-avg-badge.danger {
  background-color: #fff1f2 !important;
}

.trend-analysis-wrapper .chart-avg-badge-dock.operation .trend-avg-badge.danger strong {
  color: #ef2d33 !important;
}

/* Home landing final override: keep the main search cluster one third larger. */
@media (min-width: 761px) {
  #dashboardView .home-ai-shell:not(.home-chat-active) .home-hero {
    width: min(1064px, 100%) !important;
    margin-bottom: 53px !important;
  }

  #dashboardView .home-ai-shell:not(.home-chat-active) .home-hero h1 {
    margin-bottom: 37px !important;
    font-size: 45px !important;
    line-height: 1.16 !important;
    letter-spacing: -0.7px !important;
  }

  #dashboardView .home-ai-shell:not(.home-chat-active) .home-examples {
    width: min(960px, 100%) !important;
    column-gap: 13px !important;
    row-gap: 16px !important;
  }

  #dashboardView .home-ai-shell:not(.home-chat-active) .home-examples button {
    padding: 12px 24px !important;
    border-radius: 27px !important;
    font-size: 18px !important;
    line-height: 1.2 !important;
  }

  #dashboardView .home-ai-shell:not(.home-chat-active) .home-chat-form {
    width: min(960px, 100%) !important;
    gap: 16px !important;
  }

  #dashboardView .home-ai-shell:not(.home-chat-active) .home-search-main {
    min-height: 80px !important;
    gap: 19px !important;
    padding: 18px 24px !important;
    border-radius: 24px !important;
  }

  #dashboardView .home-ai-shell:not(.home-chat-active) .home-attach-btn {
    width: 24px !important;
    min-width: 24px !important;
    height: 32px !important;
    font-size: 24px !important;
  }

  #dashboardView .home-ai-shell:not(.home-chat-active) .home-chat-form textarea {
    height: 43px !important;
    min-height: 43px !important;
    max-height: 43px !important;
    padding: 7px 0 !important;
    font-size: 20px !important;
    line-height: 29px !important;
  }

  #dashboardView .home-ai-shell:not(.home-chat-active) #homeChatSendBtn,
  #dashboardView .home-ai-shell:not(.home-chat-active) .home-search-submit {
    width: 43px !important;
    min-width: 43px !important;
    max-width: 43px !important;
    height: 43px !important;
    min-height: 43px !important;
    max-height: 43px !important;
    flex-basis: 43px !important;
  }

  #dashboardView .home-ai-shell:not(.home-chat-active) #homeChatSendBtn {
    font-size: 17px !important;
  }

  #dashboardView .home-ai-shell:not(.home-chat-active) .home-model-shell {
    border-radius: 11px !important;
  }

  #dashboardView .home-ai-shell:not(.home-chat-active) .home-model-shell select {
    max-width: 240px !important;
    min-height: 36px !important;
    padding: 7px 32px 7px 16px !important;
    font-size: 16.5px !important;
  }
}

/* Notes editor: suppress stray horizontal bars inside editable content. */
#todosView .note-editor,
#todosView .note-editor .recall-tiptap-content,
#todosView .note-editor .ProseMirror {
  max-width: 100% !important;
  overflow-x: hidden !important;
}

#todosView .note-editor .recall-tiptap-content *,
#todosView .note-editor .ProseMirror * {
  max-width: 100%;
  scrollbar-width: none !important;
}

#todosView .note-editor .recall-tiptap-content *::-webkit-scrollbar,
#todosView .note-editor .ProseMirror *::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}

#todosView .note-editor .recall-tiptap-content pre,
#todosView .note-editor .ProseMirror pre {
  overflow-x: hidden !important;
  white-space: pre-wrap !important;
  overflow-wrap: anywhere !important;
}

#todosView .note-editor .markdown-table-wrap {
  overflow-x: hidden !important;
}

#todosView .note-editor table {
  width: 100% !important;
  table-layout: fixed !important;
}

#todosView .note-editor hr,
#todosView .note-editor [data-node="horizontalRule"],
#todosView .note-editor .ProseMirror-selectednode[data-type="horizontalRule"] {
  display: none !important;
}

/* Keep the review center cloud picker isolated from the global card treatment. */
#marketingReviewCloudDialog.marketing-review-cloud-dialog {
  border-color: rgba(15, 23, 42, 0.06) !important;
  background: #ffffff !important;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.18) !important;
}

#marketingReviewCloudDialog .inbox-cloud-row,
#marketingReviewCloudDialog .inbox-cloud-row.file {
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
}

#marketingReviewCloudDialog .inbox-cloud-row:hover,
#marketingReviewCloudDialog .inbox-cloud-row.file:hover {
  border-color: transparent !important;
  background: rgba(0, 0, 0, 0.025) !important;
  box-shadow: none !important;
}

#marketingReviewCloudDialog .inbox-cloud-row.file.selected {
  border-color: transparent !important;
  background: rgba(0, 122, 255, 0.055) !important;
  box-shadow: inset 0 0 0 1px rgba(0, 122, 255, 0.11) !important;
}

#marketingReviewCloudDialog .inbox-cloud-type {
  border: 0 !important;
  background: #f2f3f5 !important;
}

#marketingReviewCloudDialog .inbox-cloud-type.folder {
  background: #fff7e7 !important;
}

#marketingReviewCloudDialog .inbox-cloud-type.type-xlsx {
  background: #edf8f1 !important;
}

#marketingReviewCloudDialog .inbox-cloud-type.type-pdf {
  background: #fff0f0 !important;
}

#marketingReviewCloudDialog .marketing-review-cloud-location span {
  color: #555a63 !important;
  font-size: 13px !important;
}

#marketingReviewCloudDialog #marketingReviewCloudUpBtn,
#marketingReviewCloudDialog #marketingReviewCloudSelectAllBtn,
#marketingReviewCloudDialog [data-open-marketing-review-dir] {
  border-color: transparent !important;
  background: rgba(0, 0, 0, 0.04) !important;
  box-shadow: none !important;
}

#marketingReviewCloudDialog [data-open-marketing-review-dir]:hover {
  background: #1a1a1c !important;
  color: #ffffff !important;
}

#marketingReviewCloudDialog #marketingReviewCloudConfirmBtn {
  border-color: #1a1a1c !important;
  background: #1a1a1c !important;
  color: #ffffff !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14) !important;
}

#marketingReviewCloudDialog #marketingReviewCloudConfirmBtn:hover {
  border-color: #000000 !important;
  background: #000000 !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2) !important;
}

/* Settings center: isolated borderless air-flow stage. */
#settingsView:has(> .settings-stage-wrapper) {
  padding: 0 !important;
  background: #ffffff !important;
}

#settingsView .settings-stage-wrapper {
  --settings-ink: #1c1c1e;
  --settings-secondary: #48484a;
  --settings-muted: #8e8e93;
  --settings-blue: #007aff;
  --settings-green: #34c759;
  width: min(1120px, 100%) !important;
  max-width: 1120px !important;
  min-height: 100dvh !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  margin: 0 auto !important;
  padding: 40px 60px 56px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #ffffff !important;
  box-shadow: none !important;
  color: var(--settings-ink) !important;
  overflow-y: auto !important;
}

.settings-stage-wrapper .settings-stage-header {
  width: min(760px, 100%) !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 24px !important;
  margin: 0 0 30px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.settings-stage-wrapper .settings-stage-header h2 {
  margin: 0 !important;
  color: var(--settings-ink) !important;
  font-size: 30px !important;
  font-weight: 820 !important;
  line-height: 1.16 !important;
  letter-spacing: 0 !important;
}

.settings-stage-wrapper .settings-stage-header p {
  margin: 8px 0 0 !important;
  color: var(--settings-muted) !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  line-height: 1.6 !important;
}

.settings-stage-wrapper .live-status-pulse {
  min-height: 28px !important;
  display: inline-flex !important;
  flex: 0 0 auto !important;
  align-items: center !important;
  gap: 7px !important;
  margin-top: 3px !important;
  padding: 5px 11px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: rgba(52, 199, 89, 0.06) !important;
  color: var(--settings-green) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
}

.settings-stage-wrapper .pulse-dot {
  width: 6px !important;
  height: 6px !important;
  display: block !important;
  flex: 0 0 6px !important;
  border-radius: 50% !important;
  background: var(--settings-green) !important;
  animation: settingsPulseBreathe 2s ease-in-out infinite !important;
}

.settings-stage-wrapper .live-status-pulse:has(#configState.toast) {
  background: rgba(255, 59, 48, 0.06) !important;
  color: #ff3b30 !important;
}

.settings-stage-wrapper .live-status-pulse:has(#configState.toast) .pulse-dot {
  background: #ff3b30 !important;
}

.settings-stage-wrapper .settings-fluent-tabs {
  width: min(760px, 100%) !important;
  display: flex !important;
  align-items: center !important;
  gap: 32px !important;
  margin: 0 0 46px !important;
  padding: 0 0 12px !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03) !important;
  background: transparent !important;
}

.settings-stage-wrapper .settings-fluent-tabs .tab-fluent-item {
  position: relative !important;
  min-height: 24px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--settings-muted) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 24px !important;
  box-shadow: none !important;
  transition: color 220ms ease !important;
}

.settings-stage-wrapper .settings-fluent-tabs .tab-fluent-item:hover,
.settings-stage-wrapper .settings-fluent-tabs .tab-fluent-item.active {
  background: transparent !important;
  color: var(--settings-ink) !important;
  box-shadow: none !important;
}

.settings-stage-wrapper .settings-fluent-tabs .tab-fluent-item.active {
  font-weight: 800 !important;
}

.settings-stage-wrapper .settings-fluent-tabs .tab-fluent-item.active::after {
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: -13px !important;
  height: 2px !important;
  border-radius: 2px !important;
  background: #1a1a1c !important;
}

.settings-stage-wrapper .settings-binding-cache {
  display: none !important;
}

.settings-stage-wrapper .settings-stage-content,
.settings-stage-wrapper .settings-pure-panel {
  width: min(620px, 100%) !important;
}

.settings-stage-wrapper .settings-pure-panel {
  display: flex !important;
  flex-direction: column !important;
  gap: 24px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.settings-stage-wrapper .settings-pure-panel.hidden {
  display: none !important;
}

.settings-stage-wrapper .settings-panel-header {
  margin: 0 0 8px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.settings-stage-wrapper .settings-panel-header h3 {
  margin: 0 !important;
  color: var(--settings-ink) !important;
  font-size: 21px !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
  letter-spacing: 0 !important;
}

.settings-stage-wrapper .settings-panel-header p {
  margin: 7px 0 0 !important;
  color: var(--settings-muted) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.55 !important;
}

.settings-stage-wrapper .field {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  margin: 0 !important;
  color: var(--settings-secondary) !important;
}

.settings-stage-wrapper .field > span,
.settings-stage-wrapper .settings-switch > span {
  color: var(--settings-secondary) !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  letter-spacing: 0 !important;
}

.settings-stage-wrapper :where(input, select, textarea) {
  width: 100% !important;
  min-height: 48px !important;
  margin: 0 !important;
  padding: 0 16px !important;
  border: 1px solid transparent !important;
  border-radius: 12px !important;
  outline: 0 !important;
  background: rgba(0, 0, 0, 0.02) !important;
  color: var(--settings-ink) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  box-shadow: none !important;
  transition: background-color 250ms cubic-bezier(0.16, 1, 0.3, 1), border-color 250ms ease, box-shadow 250ms cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.settings-stage-wrapper :where(input, select, textarea):focus,
.settings-stage-wrapper :where(input, select, textarea):focus-visible {
  border-color: rgba(0, 122, 255, 0.2) !important;
  outline: 0 !important;
  background: #ffffff !important;
  box-shadow: 0 12px 40px rgba(0, 122, 255, 0.06), 0 4px 12px rgba(0, 0, 0, 0.01) !important;
}

.settings-stage-wrapper :where(input, textarea)::placeholder {
  color: #bbbabe !important;
}

.settings-stage-wrapper .settings-switch {
  min-height: 40px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 18px !important;
  margin: 0 !important;
  padding: 0 2px !important;
}

.settings-stage-wrapper .settings-switch input {
  position: absolute !important;
  width: 1px !important;
  min-height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.settings-stage-wrapper .settings-switch i {
  border: 0 !important;
  box-shadow: none !important;
}

.settings-stage-wrapper .button-row {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 14px !important;
  margin: 8px 0 0 !important;
  padding: 24px 0 0 !important;
  border: 0 !important;
}

.settings-stage-wrapper .button-row button {
  min-height: 44px !important;
  padding: 0 20px !important;
  border: 0 !important;
  border-radius: 12px !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  box-shadow: none !important;
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), background-color 220ms ease, box-shadow 220ms ease !important;
}

.settings-stage-wrapper .button-row .secondary {
  background: rgba(0, 0, 0, 0.03) !important;
  color: var(--settings-secondary) !important;
}

.settings-stage-wrapper .button-row .secondary:hover {
  background: rgba(0, 0, 0, 0.06) !important;
  color: var(--settings-ink) !important;
}

.settings-stage-wrapper .button-row .primary {
  background: #1a1a1c !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

.settings-stage-wrapper .button-row .primary:hover {
  background: #000000 !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16) !important;
  transform: translateY(-1px) !important;
}

.settings-stage-wrapper .button-row .primary:active,
.settings-stage-wrapper .button-row .secondary:active {
  transform: translateY(0.5px) !important;
}

.settings-stage-wrapper .settings-account-info {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  padding: 16px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: rgba(0, 0, 0, 0.02) !important;
}

.settings-stage-wrapper .settings-account-info span {
  color: var(--settings-muted) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}

.settings-stage-wrapper .settings-account-info strong {
  color: var(--settings-ink) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

.settings-stage-wrapper .settings-security-note {
  width: min(620px, 100%) !important;
  margin: 36px 0 0 !important;
  color: #a1a1aa !important;
  font-size: 11.5px !important;
  font-weight: 500 !important;
  line-height: 1.55 !important;
  text-align: left !important;
}

@keyframes settingsPulseBreathe {
  0%, 100% { opacity: 0.4; transform: scale(0.92); }
  50% { opacity: 1; transform: scale(1); }
}

@media (max-width: 760px) {
  #settingsView .settings-stage-wrapper {
    min-height: 100dvh !important;
    padding: 28px 20px 44px !important;
  }

  .settings-stage-wrapper .settings-fluent-tabs {
    gap: 22px !important;
    overflow-x: auto !important;
  }

  .settings-stage-wrapper .settings-fluent-tabs .tab-fluent-item {
    flex: 0 0 auto !important;
  }

  .settings-stage-wrapper .button-row {
    flex-wrap: wrap !important;
  }
}

/* Yesterday final visual density: darker asset surfaces, model chip, pure-black insight copy. */
.yesterday-analysis-wrapper .metric-card {
  background: #f7f8fa !important;
}

.yesterday-analysis-wrapper .marketing-today-date,
.yesterday-analysis-wrapper .marketing-today-model-chip {
  min-height: 42px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 0 18px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: #f7f8fa !important;
  color: #48484a !important;
  font-size: 14px !important;
  font-weight: 850 !important;
  box-shadow: none !important;
}

.yesterday-analysis-wrapper .marketing-today-model-chip {
  min-height: 32px !important;
  padding: 0 12px !important;
  border-radius: 8px !important;
  font-size: 12.5px !important;
  font-weight: 900 !important;
  letter-spacing: 0.02em !important;
}

.yesterday-analysis-wrapper .marketing-today-date select {
  color: #48484a !important;
  font-size: 14px !important;
  font-weight: 850 !important;
}

.yesterday-analysis-wrapper .insights-item,
.yesterday-analysis-wrapper .insights-item span {
  color: #1a1a1c !important;
  font-weight: 650 !important;
}

.yesterday-analysis-wrapper .insights-item .entity-highlight {
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #1a1a1c !important;
  font-weight: 650 !important;
}

/* Marketing secondary nav final state: active item uses a black rail, not a white card. */
.marketing-subnav button {
  color: #8e939b !important;
  font-weight: 700 !important;
}

.marketing-subnav button::before {
  color: currentColor !important;
}

.marketing-subnav button:hover {
  background: transparent !important;
  color: #48484a !important;
  box-shadow: none !important;
}

.marketing-subnav button.active {
  border-color: transparent !important;
  background: transparent !important;
  color: #1a1a1c !important;
  font-weight: 900 !important;
  box-shadow: none !important;
}

.marketing-subnav button.active::after {
  content: "" !important;
  position: absolute !important;
  left: -14px !important;
  top: 50% !important;
  width: 5px !important;
  height: 28px !important;
  border-radius: 0 999px 999px 0 !important;
  background: #1a1a1c !important;
  transform: translateY(-50%) !important;
}

/* Yesterday final visual density: darker asset surfaces, model chip, pure-black insight copy. */
.yesterday-analysis-wrapper .metric-card {
  background: #f7f8fa !important;
}

.yesterday-analysis-wrapper .marketing-today-date,
.yesterday-analysis-wrapper .marketing-today-model-chip {
  min-height: 42px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 0 18px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: #f7f8fa !important;
  color: #48484a !important;
  font-size: 14px !important;
  font-weight: 850 !important;
  box-shadow: none !important;
}

.yesterday-analysis-wrapper .marketing-today-model-chip {
  min-height: 32px !important;
  padding: 0 12px !important;
  border-radius: 8px !important;
  font-size: 12.5px !important;
  font-weight: 900 !important;
  letter-spacing: 0.02em !important;
}

.yesterday-analysis-wrapper .marketing-today-date select {
  color: #48484a !important;
  font-size: 14px !important;
  font-weight: 850 !important;
}

.yesterday-analysis-wrapper .insights-item,
.yesterday-analysis-wrapper .insights-item span {
  color: #1a1a1c !important;
  font-weight: 650 !important;
}

.yesterday-analysis-wrapper .insights-item .entity-highlight {
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #1a1a1c !important;
  font-weight: 650 !important;
}

/* Marketing secondary nav: active item uses a black rail, not a white card. */
.marketing-subnav button {
  color: #8e939b !important;
  font-weight: 700 !important;
}

.marketing-subnav button::before {
  color: currentColor !important;
}

.marketing-subnav button:hover {
  background: transparent !important;
  color: #48484a !important;
  box-shadow: none !important;
}

.marketing-subnav button.active {
  border-color: transparent !important;
  background: transparent !important;
  color: #1a1a1c !important;
  font-weight: 900 !important;
  box-shadow: none !important;
}

.marketing-subnav button.active::after {
  content: "" !important;
  position: absolute !important;
  left: -14px !important;
  top: 50% !important;
  width: 5px !important;
  height: 28px !important;
  border-radius: 0 999px 999px 0 !important;
  background: #1a1a1c !important;
  transform: translateY(-50%) !important;
}

/* Home landing composition: scale the main search cluster up by roughly one third. */
@media (min-width: 761px) {
  #dashboardView .home-ai-shell:not(.home-chat-active) .home-hero {
    width: min(1064px, 100%) !important;
    margin-bottom: 53px !important;
  }

  #dashboardView .home-ai-shell:not(.home-chat-active) .home-hero h1 {
    margin-bottom: 37px !important;
    font-size: 45px !important;
    line-height: 1.16 !important;
    letter-spacing: -0.7px !important;
  }

  #dashboardView .home-ai-shell:not(.home-chat-active) .home-examples {
    width: min(960px, 100%) !important;
    column-gap: 13px !important;
    row-gap: 16px !important;
  }

  #dashboardView .home-ai-shell:not(.home-chat-active) .home-examples button {
    padding: 12px 24px !important;
    border-radius: 27px !important;
    font-size: 18px !important;
    line-height: 1.2 !important;
  }

  #dashboardView .home-ai-shell:not(.home-chat-active) .home-chat-form {
    width: min(960px, 100%) !important;
    gap: 16px !important;
  }

  #dashboardView .home-ai-shell:not(.home-chat-active) .home-search-main {
    min-height: 80px !important;
    gap: 19px !important;
    padding: 18px 24px !important;
    border-radius: 24px !important;
  }

  #dashboardView .home-ai-shell:not(.home-chat-active) .home-attach-btn {
    width: 24px !important;
    min-width: 24px !important;
    height: 32px !important;
    font-size: 24px !important;
  }

  #dashboardView .home-ai-shell:not(.home-chat-active) .home-chat-form textarea {
    height: 43px !important;
    min-height: 43px !important;
    max-height: 43px !important;
    padding: 7px 0 !important;
    font-size: 20px !important;
    line-height: 29px !important;
  }

  #dashboardView .home-ai-shell:not(.home-chat-active) #homeChatSendBtn,
  #dashboardView .home-ai-shell:not(.home-chat-active) .home-search-submit {
    width: 43px !important;
    min-width: 43px !important;
    max-width: 43px !important;
    height: 43px !important;
    min-height: 43px !important;
    max-height: 43px !important;
    flex-basis: 43px !important;
  }

  #dashboardView .home-ai-shell:not(.home-chat-active) #homeChatSendBtn {
    font-size: 17px !important;
  }

  #dashboardView .home-ai-shell:not(.home-chat-active) .home-model-shell {
    border-radius: 11px !important;
  }

  #dashboardView .home-ai-shell:not(.home-chat-active) .home-model-shell select {
    max-width: 240px !important;
    min-height: 36px !important;
    padding: 7px 32px 7px 16px !important;
    font-size: 16.5px !important;
  }
}

@media (max-width: 900px) {
  .trend-analysis-wrapper .filter-inline-row {
    flex-wrap: wrap !important;
  }

  .trend-analysis-wrapper .trend-date-picker {
    width: 100% !important;
    margin-left: 0 !important;
  }

  .trend-analysis-wrapper .trend-date-trigger {
    width: 100% !important;
  }

  .trend-analysis-wrapper .trend-date-panel {
    right: auto !important;
    left: 0 !important;
    width: min(680px, calc(100vw - 36px)) !important;
  }

  .trend-analysis-wrapper .trend-card-head {
    align-items: flex-start !important;
    flex-direction: column !important;
  }

  .trend-analysis-wrapper .chart-avg-badge-dock {
    justify-content: flex-start !important;
  }
}

@media (max-width: 600px) {
  .trend-analysis-wrapper .trend-page-head {
    align-items: flex-start !important;
    flex-direction: column !important;
  }

  .trend-analysis-wrapper .trend-page-meta {
    justify-items: start !important;
  }

  .trend-analysis-wrapper .trend-filter {
    width: 100% !important;
  }

  .trend-analysis-wrapper .trend-date-panel {
    grid-template-columns: 1fr !important;
  }

  .trend-analysis-wrapper .trend-date-shortcuts {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    border-right: 0 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04) !important;
  }

  .trend-analysis-wrapper .trend-date-shortcuts button {
    padding: 0 4px !important;
    text-align: center !important;
  }

  .trend-analysis-wrapper .trend-calendars {
    grid-template-columns: 1fr !important;
  }

  .trend-analysis-wrapper .trend-calendar + .trend-calendar {
    display: none !important;
  }

  .trend-analysis-wrapper .trend-chart {
    height: 320px !important;
  }
}

/* Final message drawer layout: isolate it from legacy message/chat grid rules. */
body > .chat-drawer {
  width: 72vw !important;
  min-width: 760px !important;
  max-width: none !important;
  display: grid !important;
  grid-template-areas:
    "header"
    "conversation"
    "composer" !important;
  grid-template-rows: auto minmax(0, 1fr) auto !important;
  align-items: stretch !important;
  background: #fff !important;
}

body > .chat-drawer > .drawer-header {
  grid-area: header !important;
  grid-row: 1 !important;
  position: relative !important;
  z-index: 2 !important;
  min-height: 88px !important;
  padding: 18px 68px 18px 28px !important;
  border-bottom: 1px solid #e5e7eb !important;
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02) !important;
  backdrop-filter: blur(14px) !important;
  box-sizing: border-box !important;
}

body > .chat-drawer .drawer-heading {
  min-width: 0 !important;
  display: grid !important;
  gap: 3px !important;
}

body > .chat-drawer .drawer-header span {
  margin: 0 !important;
  color: #9ca3af !important;
  font-size: 10px !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
}

body > .chat-drawer .drawer-header h3 {
  margin: 0 !important;
  color: #111827 !important;
  font-size: 18px !important;
  line-height: 1.35 !important;
}

body > .chat-drawer .drawer-header p {
  margin: 0 !important;
  overflow: hidden !important;
  color: #9ca3af !important;
  font-size: 11px !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body > .chat-drawer .drawer-close-btn {
  position: absolute !important;
  top: 50% !important;
  right: 22px !important;
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  padding: 0 !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: #6b7280 !important;
  font-size: 20px !important;
  line-height: 1 !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05) !important;
  transform: translateY(-50%) !important;
}

body > .chat-drawer .drawer-close-btn:hover {
  border-color: #d1d5db !important;
  background: #f3f4f6 !important;
  color: #111827 !important;
}

body > .chat-drawer > .message-followup-thread,
body > .chat-drawer > .message-followup-thread.active,
body > .chat-drawer > .message-followup-thread.hidden {
  grid-area: conversation !important;
  grid-row: 2 !important;
  align-self: stretch !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  gap: 18px !important;
  margin: 0 !important;
  padding: 30px max(32px, calc((100% - 820px) / 2)) 36px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  background: #fff !important;
  box-sizing: border-box !important;
}

body > .chat-drawer .home-message {
  width: 100% !important;
  display: flex !important;
  flex: 0 0 auto !important;
}

body > .chat-drawer .home-message-body {
  width: fit-content !important;
  max-width: min(680px, 82%) !important;
  margin: 0 !important;
  padding: 13px 16px !important;
  border-radius: 14px !important;
  font-size: 14px !important;
  line-height: 1.65 !important;
  box-shadow: none !important;
}

body > .chat-drawer .home-message.user .home-message-body {
  border-bottom-right-radius: 5px !important;
  background: #111827 !important;
  color: #fff !important;
}

body > .chat-drawer .home-message.assistant .home-message-body {
  border: 1px solid #e5e7eb !important;
  border-bottom-left-radius: 5px !important;
  background: #fff !important;
  color: #1f2937 !important;
}

body > .chat-drawer > .message-followup-dock {
  grid-area: composer !important;
  grid-row: 3 !important;
  position: relative !important;
  inset: auto !important;
  z-index: 2 !important;
  width: 100% !important;
  display: block !important;
  margin: 0 !important;
  padding: 14px max(24px, calc((100% - 860px) / 2)) 18px !important;
  border-top: 1px solid #e5e7eb !important;
  background: rgba(255, 255, 255, 0.98) !important;
  box-sizing: border-box !important;
  backdrop-filter: blur(14px) !important;
}

body > .chat-drawer .message-followup-panel {
  width: 100% !important;
  display: block !important;
  max-height: none !important;
  overflow: visible !important;
  opacity: 1 !important;
  transform: none !important;
}

body > .chat-drawer .message-followup-toolbar {
  grid-area: toolbar !important;
  min-width: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  padding: 2px 0 0 !important;
  color: #9ca3af !important;
  font-size: 11px !important;
}

body > .chat-drawer .message-followup-model-shell {
  position: relative !important;
  min-width: 170px !important;
  max-width: 280px !important;
}

body > .chat-drawer .message-followup-model-shell select {
  width: 100% !important;
  min-height: 30px !important;
  padding: 0 28px 0 10px !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 9px !important;
  appearance: none !important;
  background: #fff !important;
  color: #4b5563 !important;
  font-size: 11px !important;
  font-weight: 650 !important;
  outline: 0 !important;
}

body > .chat-drawer .message-followup-model-shell select:focus {
  border-color: #111827 !important;
}

body > .chat-drawer .message-followup-model-shell i {
  position: absolute !important;
  top: 50% !important;
  right: 10px !important;
  color: #9ca3af !important;
  font-size: 9px !important;
  pointer-events: none !important;
  transform: translateY(-50%) !important;
}

body > .chat-drawer .message-followup-form {
  width: 100% !important;
  min-height: 62px !important;
  display: grid !important;
  grid-template-areas:
    "main main"
    "toolbar state" !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 6px 14px !important;
  padding: 10px 12px 9px 14px !important;
  border: 1px solid #d1d5db !important;
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07) !important;
}

body > .chat-drawer .message-followup-form:focus-within {
  border-color: #111827 !important;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.1) !important;
}

body > .chat-drawer .message-followup-form .home-search-main {
  grid-area: main !important;
  min-width: 0 !important;
  width: 100% !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 14px !important;
}

body > .chat-drawer .message-followup-form textarea {
  min-width: 0 !important;
  width: 100% !important;
  min-height: 44px !important;
  max-height: 140px !important;
  padding: 10px 2px !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
}

body > .chat-drawer .message-followup-form .home-search-submit {
  min-width: max-content !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  align-self: center !important;
  gap: 8px !important;
  padding: 0 !important;
}

body > .chat-drawer .message-followup-form .home-send-btn {
  width: 38px !important;
  min-width: 38px !important;
  height: 38px !important;
  border-radius: 11px !important;
}

body > .chat-drawer .message-followup-form .home-chat-state {
  grid-area: state !important;
  min-height: 16px !important;
  display: block !important;
  align-self: center !important;
  padding: 0 !important;
  color: #9ca3af !important;
  font-size: 10px !important;
  text-align: left !important;
}

@media (max-width: 1024px) {
  body > .chat-drawer {
    width: 85vw !important;
    min-width: 0 !important;
  }
}

@media (max-width: 768px) {
  body > .chat-drawer {
    width: 100vw !important;
    min-width: 0 !important;
  }

  body > .chat-drawer > .drawer-header {
    min-height: 82px !important;
    padding: max(14px, env(safe-area-inset-top)) 58px 14px 16px !important;
  }

  body > .chat-drawer .drawer-close-btn {
    right: 14px !important;
  }

  body > .chat-drawer > .message-followup-thread,
  body > .chat-drawer > .message-followup-thread.active,
  body > .chat-drawer > .message-followup-thread.hidden {
    padding: 20px 14px 24px !important;
  }

  body > .chat-drawer .home-message-body {
    max-width: 88% !important;
  }

  body > .chat-drawer > .message-followup-dock {
    padding: 10px 10px max(10px, env(safe-area-inset-bottom)) !important;
  }

  body > .chat-drawer .message-followup-toolbar {
    justify-content: flex-start !important;
  }

  body > .chat-drawer .message-followup-model-shell {
    min-width: 0 !important;
    max-width: min(220px, 68vw) !important;
  }
}

/* Mobile auth and primary navigation layout. */
@media (max-width: 768px) {
  #authView.auth-shell {
    width: 100% !important;
    min-height: 100dvh !important;
    padding: 20px 0 !important;
  }

  #authView .auth-card {
    width: 90% !important;
    max-width: 460px !important;
    margin: auto !important;
    padding: 24px 20px !important;
    overflow: hidden !important;
  }

  #authView .auth-card .field,
  #authView .auth-card input,
  #authView .auth-card button,
  #authView .auth-card .button-row {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  #authView .auth-card .button-row {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .app-shell {
    display: block !important;
  }

  .app-shell .sidebar,
  .app-shell:has(#todosView:not(.hidden)) .sidebar,
  .app-shell:has(#settingsView:not(.hidden)) .sidebar {
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    width: 80vw !important;
    min-width: 0 !important;
    max-width: 300px !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: none !important;
    padding: max(18px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom)) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    z-index: 120 !important;
    transform: translateX(-104%) !important;
    transition: transform 200ms ease !important;
    border-radius: 0 16px 16px 0 !important;
    box-shadow: 20px 0 60px rgba(15, 23, 42, 0.2) !important;
  }

  body.sidebar-open .app-shell .sidebar,
  body.sidebar-open .app-shell:has(#todosView:not(.hidden)) .sidebar,
  body.sidebar-open .app-shell:has(#settingsView:not(.hidden)) .sidebar {
    transform: translateX(0) !important;
  }

  .sidebar .brand-row h1,
  .sidebar .nav-left > span:last-child:not(.icon-base),
  .sidebar-logout .nav-left > span:last-child:not(.icon-base) {
    display: block !important;
  }

  .sidebar .nav,
  .sidebar .sidebar-logout {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 44px !important;
    padding: 0 12px !important;
    border-radius: 8px !important;
    box-sizing: border-box !important;
  }

  .sidebar .sidebar-logout {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto !important;
    margin: 10px auto 0 !important;
    white-space: nowrap !important;
  }

  .sidebar .sidebar-logout .nav-left {
    width: 100% !important;
    min-width: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
  }

  .content {
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
  }
}

/* Final AI composer cascade: visual behavior is shared, geometry stays local. */
:where(#workspaceChatForm, #marketingAnalysisForm, #marketingReviewAskForm, #messageFollowupForm) {
  border: 1px solid var(--linear-line) !important;
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.04) !important;
  transition: border-color 220ms ease, box-shadow 260ms ease, transform 260ms cubic-bezier(0.16, 1, 0.3, 1) !important;
}

:where(#workspaceChatForm, #marketingAnalysisForm, #marketingReviewAskForm, #messageFollowupForm):focus-within,
.ai-composer-field:focus-within {
  border-color: var(--linear-ink) !important;
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.07) !important;
  transform: translateY(-1px) !important;
}

:where(#workspaceChatForm, #marketingAnalysisForm, #marketingReviewAskForm, #messageFollowupForm) textarea,
.ai-composer-field textarea {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--linear-ink) !important;
  outline: 0 !important;
  resize: none !important;
}

:where(#workspaceChatForm, #marketingAnalysisForm, #marketingReviewAskForm, #messageFollowupForm) select {
  border: 1px solid rgba(0, 0, 0, 0.07) !important;
  border-radius: 8px !important;
  background: #f9fafb !important;
  color: #6b7280 !important;
  box-shadow: none !important;
}

:where(.ai-send-button, #homeChatSendBtn, #messageFollowupSendBtn),
#workspaceChatForm .composer-icon.send.has-custom-send-icon {
  width: 40px !important;
  min-width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  display: inline-grid !important;
  place-items: center !important;
  padding: 0 !important;
  border: 1px solid #bfdbfe !important;
  border-radius: 10px !important;
  background-color: #fff !important;
  background-image: none !important;
  color: #60a5fa !important;
  font-size: 14px !important;
  line-height: 1 !important;
  box-shadow: none !important;
  cursor: pointer !important;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease !important;
}

:where(.ai-send-button, #homeChatSendBtn, #messageFollowupSendBtn):not(:disabled):hover,
#workspaceChatForm .composer-icon.send.has-custom-send-icon:not(:disabled):hover {
  border-color: #2563eb !important;
  background-color: #2563eb !important;
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.2) !important;
  transform: translateY(-1px) !important;
}

:where(.ai-send-button, #homeChatSendBtn, #messageFollowupSendBtn):disabled {
  border-color: #e5e7eb !important;
  background-color: #f9fafb !important;
  color: #d1d5db !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
}

:where(.ai-send-button, #homeChatSendBtn, #messageFollowupSendBtn) i,
#workspaceChatForm .composer-icon.send.has-custom-send-icon i {
  display: inline-block !important;
  color: currentColor !important;
  transform: translateY(-1px) !important;
}

/* Note list stays compact: title and save time only. */
#todosView .note-folder-notes .note-card-title-line {
  min-width: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
}

#todosView .note-folder-notes .note-card-title-line strong {
  min-width: 0 !important;
  flex: 1 1 auto !important;
}

#todosView .note-folder-notes .note-card-title-line small {
  display: block !important;
  flex: 0 0 auto !important;
  margin: 0 !important;
  color: #9ca3af !important;
  font-size: 10px !important;
  line-height: 1.35 !important;
  white-space: nowrap !important;
}

/* Follow-up composer text must fill the left side instead of inheriting home grid placement. */
body > .chat-drawer #messageFollowupForm .home-search-main {
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
}

body > .chat-drawer #messageFollowupInput {
  grid-column: 1 !important;
  grid-row: 1 !important;
  align-self: stretch !important;
  min-width: 0 !important;
  width: 100% !important;
  min-height: 64px !important;
  max-height: 180px !important;
  padding: 14px 4px !important;
  color: #111827 !important;
  font-size: 17px !important;
  font-weight: 500 !important;
  line-height: 1.55 !important;
  text-align: left !important;
}

body > .chat-drawer #messageFollowupInput::placeholder {
  color: #9ca3af !important;
  font-size: 17px !important;
}

body > .chat-drawer #messageFollowupForm .home-search-submit {
  grid-column: 2 !important;
  grid-row: 1 !important;
  align-self: center !important;
}

/* All AI send controls: black while empty, blue after input, always circular. */
:where(.ai-send-button, #homeChatSendBtn, #messageFollowupSendBtn),
#workspaceChatForm .composer-icon.send.has-custom-send-icon {
  border-color: #111827 !important;
  border-radius: 50% !important;
  background-color: #111827 !important;
  color: #fff !important;
  opacity: 1 !important;
}

:where(.ai-send-button, #homeChatSendBtn, #messageFollowupSendBtn):disabled {
  border-color: #111827 !important;
  background-color: #111827 !important;
  color: #fff !important;
  opacity: 1 !important;
}

:where(.ai-send-button, #homeChatSendBtn, #messageFollowupSendBtn):not(:disabled):hover {
  border-color: #111827 !important;
  background-color: #111827 !important;
  color: #fff !important;
}

:where(
  #homeChatForm.has-content,
  #messageFollowupForm.has-content,
  #workspaceChatForm:has(textarea:not(:placeholder-shown)),
  #marketingAnalysisForm:has(textarea:not(:placeholder-shown)),
  #marketingReviewAskForm:has(textarea:not(:placeholder-shown)),
  #analysisForm:has(.ai-composer-field textarea:not(:placeholder-shown)),
  #inboxAskDialog:has(.ai-composer-field textarea:not(:placeholder-shown))
) :where(.ai-send-button, #homeChatSendBtn, #messageFollowupSendBtn) {
  border-color: #2563eb !important;
  background-color: #2563eb !important;
  color: #fff !important;
}

:where(
  #homeChatForm.has-content,
  #messageFollowupForm.has-content,
  #workspaceChatForm:has(textarea:not(:placeholder-shown)),
  #marketingAnalysisForm:has(textarea:not(:placeholder-shown)),
  #marketingReviewAskForm:has(textarea:not(:placeholder-shown)),
  #analysisForm:has(.ai-composer-field textarea:not(:placeholder-shown)),
  #inboxAskDialog:has(.ai-composer-field textarea:not(:placeholder-shown))
) :where(.ai-send-button, #homeChatSendBtn, #messageFollowupSendBtn):not(:disabled):hover {
  border-color: #2563eb !important;
  background-color: #2563eb !important;
}

:where(.home-search-submit, .composer-actions) kbd {
  display: none !important;
}

/* Dashboard has older high-specificity sizing; force its send control to a true circle. */
#dashboardView #homeChatSendBtn {
  width: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  flex: 0 0 40px !important;
  padding: 0 !important;
  border: 1px solid #111827 !important;
  border-radius: 50% !important;
  background: #111827 !important;
  color: #fff !important;
  cursor: not-allowed !important;
}

#dashboardView #homeChatForm.has-content #homeChatSendBtn:not(:disabled) {
  border-color: #2563eb !important;
  background: #2563eb !important;
  color: #fff !important;
  cursor: pointer !important;
}

/* Follow-up drawer mirrors the dashboard send control exactly. */
body > .chat-drawer #messageFollowupSendBtn {
  width: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  flex: 0 0 40px !important;
  padding: 0 !important;
  border: 1px solid #111827 !important;
  border-radius: 50% !important;
  background: #111827 !important;
  color: #fff !important;
  opacity: 1 !important;
  cursor: not-allowed !important;
}

body > .chat-drawer #messageFollowupForm.has-content #messageFollowupSendBtn:not(:disabled) {
  border-color: #2563eb !important;
  background: #2563eb !important;
  color: #fff !important;
  cursor: pointer !important;
}

body > .chat-drawer .message-followup-toolbar {
  gap: 0 !important;
}

/* Review center footer: model left, dashboard-style circular send control right. */
#marketingView #marketingReviewAskForm .marketing-review-composer-foot {
  justify-content: space-between !important;
}

#marketingView #marketingReviewAskForm .marketing-review-composer-options,
#marketingView #marketingReviewAskForm .marketing-review-composer-options label {
  min-width: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 0 !important;
  margin: 0 !important;
}

#marketingView #marketingReviewAskForm #marketingReviewModel {
  margin: 0 !important;
}

#marketingView #marketingReviewSendBtn {
  width: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  flex: 0 0 40px !important;
  padding: 0 !important;
  border: 1px solid #111827 !important;
  border-radius: 50% !important;
  background: #111827 !important;
  color: #fff !important;
  opacity: 1 !important;
}

#marketingView #marketingReviewAskForm:has(#marketingReviewQuestion:not(:placeholder-shown)) #marketingReviewSendBtn {
  border-color: #2563eb !important;
  background: #2563eb !important;
  color: #fff !important;
}

/* Notes desktop sidebar reaches the requested writing boundary. */
@media (min-width: 901px) {
  #todosView .notes-shell:not(.note-sidebar-collapsed) {
    grid-template-columns: 350px minmax(0, 1fr) !important;
  }

  #todosView .notes-shell:not(.note-sidebar-collapsed) .notes-sidebar {
    width: 350px !important;
    min-width: 350px !important;
  }
}

/* Upload analysis composer is one complete dashboard-style input surface. */
#marketingView #marketingAnalysisForm {
  position: relative !important;
  display: grid !important;
  grid-template-areas:
    "input input"
    "model send" !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 12px 16px !important;
  padding: 18px !important;
  overflow: visible !important;
  border: 1px solid var(--linear-line) !important;
  border-radius: 16px !important;
  background: #fff !important;
  box-sizing: border-box !important;
}

#marketingView #marketingAnalysisForm > .field:first-of-type {
  grid-area: input !important;
  min-width: 0 !important;
  width: 100% !important;
  margin: 0 !important;
}

#marketingView #marketingAnalysisForm textarea {
  width: 100% !important;
  min-height: 92px !important;
  max-height: 180px !important;
  padding: 10px 2px !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  resize: none !important;
}

#marketingView #marketingAnalysisForm .marketing-model-field {
  grid-area: model !important;
  min-width: 0 !important;
  width: fit-content !important;
  margin: 0 !important;
  justify-self: start !important;
}

#marketingView #marketingAnalysisForm #marketingModel {
  width: 220px !important;
  min-height: 38px !important;
  margin: 0 !important;
}

#marketingView #marketingAnalysisForm .marketing-run-button {
  grid-area: send !important;
  justify-self: end !important;
  width: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  padding: 0 !important;
  border: 1px solid #111827 !important;
  border-radius: 50% !important;
  background: #111827 !important;
  color: #fff !important;
  opacity: 1 !important;
}

#marketingView #marketingAnalysisForm:has(textarea:not(:placeholder-shown)) .marketing-run-button {
  border-color: #2563eb !important;
  background: #2563eb !important;
  color: #fff !important;
}

/* Notes page minimal cleanup: remove search and heavy focus/tree borders only. */
#todosView .notes-search {
  display: none !important;
}

#todosView .note-editor,
#todosView .note-editor:focus,
#todosView .note-editor:focus-visible {
  border-color: transparent !important;
  outline: 0 !important;
  box-shadow: none !important;
}

#todosView .note-folder-row,
#todosView .note-folder-row:hover,
#todosView .note-folder-group.selected > .note-folder-row,
#todosView .note-folder-notes .note-item,
#todosView .note-folder-notes .note-item:hover,
#todosView .note-folder-notes .note-item.active {
  border-color: transparent !important;
  box-shadow: none !important;
}

/* Data upload page: scoped, borderless Apple-style workflow. */
.data-upload-wrapper {
  display: flex !important;
  flex-direction: column !important;
  min-height: 100% !important;
  padding: 50px 60px 120px !important;
  overflow-y: auto !important;
  position: relative !important;
}

.data-upload-wrapper .upload-header-zone {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 24px !important;
  max-width: 900px !important;
  margin: 0 0 40px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.data-upload-wrapper .upload-header-zone::before {
  display: none !important;
}

.data-upload-wrapper .marketing-section-kicker {
  margin-bottom: 10px !important;
}

.data-upload-wrapper .upload-main-title {
  margin: 0 0 8px !important;
  color: #1c1c1e !important;
  font-size: 26px !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
  letter-spacing: 0 !important;
}

.data-upload-wrapper .upload-subtitle {
  margin: 0 !important;
  color: #8e8e93 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
}

.data-upload-wrapper #marketingAnalysisState {
  flex: 0 0 auto !important;
  padding: 7px 12px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: rgba(0, 0, 0, 0.035) !important;
  color: #48484a !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

.data-upload-wrapper .upload-assets-stack {
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
  max-width: 900px !important;
  margin: 0 0 40px !important;
  padding: 0 !important;
}

.data-upload-wrapper .upload-stream-card {
  min-height: 0 !important;
  width: 100% !important;
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 18px !important;
  padding: 20px 24px !important;
  border: 1px solid rgba(0, 0, 0, 0.03) !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, 0.65) !important;
  box-shadow: none !important;
  cursor: pointer !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  transition: border-color 300ms cubic-bezier(0.16, 1, 0.3, 1), background 300ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 300ms cubic-bezier(0.16, 1, 0.3, 1), transform 300ms cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.data-upload-wrapper .upload-stream-card:hover {
  transform: translateY(-1px) !important;
  border-color: rgba(0, 122, 255, 0.25) !important;
  background: #ffffff !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.02) !important;
}

.data-upload-wrapper .upload-stream-card input[type="file"] {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.data-upload-wrapper .card-left-meta {
  display: flex !important;
  align-items: center !important;
  gap: 18px !important;
  min-width: 0 !important;
}

.data-upload-wrapper .icon-badge-avatar {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: rgba(0, 0, 0, 0.02) !important;
  color: #48484a !important;
  font-size: 14px !important;
  transition: background 250ms ease, color 250ms ease !important;
}

.data-upload-wrapper .upload-stream-card:hover .icon-badge-avatar {
  background: rgba(0, 122, 255, 0.06) !important;
  color: #007aff !important;
}

.data-upload-wrapper .text-meta-group {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  min-width: 0 !important;
}

.data-upload-wrapper .upload-card-text-title {
  margin: 0 !important;
  color: #1c1c1e !important;
  font-size: 14.5px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
}

.data-upload-wrapper .upload-card-text-desc {
  margin: 0 !important;
  color: #8e8e93 !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  line-height: 1.45 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.data-upload-wrapper .action-pill-indicator {
  flex: 0 0 auto !important;
  padding: 5px 12px !important;
  border: 0 !important;
  border-radius: 6px !important;
  background: rgba(0, 122, 255, 0.05) !important;
  color: #007aff !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  transition: background 200ms ease, color 200ms ease !important;
}

.data-upload-wrapper .upload-stream-card:hover .action-pill-indicator {
  background: #007aff !important;
  color: #ffffff !important;
}

.data-upload-wrapper .home-style-floating-dock {
  max-width: 900px !important;
  display: flex !important;
  grid-template-areas: none !important;
  grid-template-columns: none !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  margin: 0 !important;
  padding: 14px 20px !important;
  overflow: visible !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  border-radius: 20px !important;
  background: rgba(255, 255, 255, 0.85) !important;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.03) !important;
  backdrop-filter: blur(30px) !important;
  -webkit-backdrop-filter: blur(30px) !important;
  box-sizing: border-box !important;
  transition: border-color 300ms cubic-bezier(0.16, 1, 0.3, 1), background 300ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 300ms cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.data-upload-wrapper .home-style-floating-dock:focus-within {
  border-color: rgba(0, 122, 255, 0.2) !important;
  background: #ffffff !important;
  box-shadow: 0 10px 40px rgba(0, 122, 255, 0.06), 0 12px 40px rgba(0, 0, 0, 0.04) !important;
}

.data-upload-wrapper .home-style-floating-dock > .field:first-of-type {
  flex: 1 1 auto !important;
  grid-area: auto !important;
  min-width: 0 !important;
  width: auto !important;
  margin: 0 !important;
}

.data-upload-wrapper .textarea-fluent {
  width: 100% !important;
  height: 24px !important;
  min-height: 24px !important;
  max-height: 72px !important;
  padding: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #1c1c1e !important;
  font-size: 14.5px !important;
  font-weight: 500 !important;
  line-height: 24px !important;
  resize: none !important;
}

.data-upload-wrapper .textarea-fluent::placeholder {
  color: #bbbabe !important;
}

.data-upload-wrapper .dock-right-actions {
  flex: 0 0 auto !important;
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
}

.data-upload-wrapper .dock-right-actions .marketing-model-field {
  grid-area: auto !important;
  width: auto !important;
  min-width: 0 !important;
  margin: 0 !important;
  justify-self: auto !important;
}

.data-upload-wrapper .model-select-fluent {
  width: auto !important;
  min-width: 156px !important;
  min-height: 30px !important;
  margin: 0 !important;
  padding: 6px 28px 6px 12px !important;
  border: 0 !important;
  border-radius: 8px !important;
  outline: 0 !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  background: rgba(0, 0, 0, 0.03) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='none' stroke='%2348484a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M1 1l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 10px center !important;
  background-size: 8px 5px !important;
  color: #48484a !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
}

.data-upload-wrapper .btn-submit-circle {
  grid-area: auto !important;
  justify-self: auto !important;
  width: 34px !important;
  min-width: 34px !important;
  max-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  max-height: 34px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: #1a1a1c !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
  cursor: pointer !important;
  opacity: 1 !important;
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1), background 200ms ease, box-shadow 200ms ease !important;
}

.data-upload-wrapper .btn-submit-circle:hover,
.data-upload-wrapper #marketingAnalysisForm:has(textarea:not(:placeholder-shown)) .btn-submit-circle:hover {
  transform: scale(1.06) !important;
  background: #000000 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

.data-upload-wrapper #marketingAnalysisForm:has(textarea:not(:placeholder-shown)) .btn-submit-circle {
  border: 0 !important;
  background: #1a1a1c !important;
  color: #ffffff !important;
}

.data-upload-wrapper .upload-bottom-tips {
  max-width: 900px !important;
  margin: 20px 0 0 !important;
  padding-left: 4px !important;
  color: #8e8e93 !important;
  font-size: 11.5px !important;
  font-weight: 500 !important;
}

.data-upload-wrapper .upload-bottom-tips .saved-path {
  margin-left: 8px !important;
}

@media (max-width: 720px) {
  .data-upload-wrapper {
    padding: 32px 18px 96px !important;
  }

  .data-upload-wrapper .upload-header-zone,
  .data-upload-wrapper .upload-stream-card,
  .data-upload-wrapper .home-style-floating-dock {
    max-width: none !important;
  }

  .data-upload-wrapper .upload-header-zone,
  .data-upload-wrapper .home-style-floating-dock {
    align-items: stretch !important;
    flex-direction: column !important;
  }

  .data-upload-wrapper .dock-right-actions {
    justify-content: space-between !important;
  }
}

/* Data upload page: isolated one-click report trigger. */
#marketingView #marketingUploadSection .upload-stage-wrapper {
  width: 100% !important;
  max-width: 1080px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 28px !important;
  margin: 0 !important;
  padding: 30px 0 0 !important;
  overflow: visible !important;
  border: 0 !important;
  border-top: 1px solid rgba(0, 0, 0, 0.03) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#marketingView #marketingUploadSection .upload-stage-wrapper .upload-preflight-bar {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-wrap: wrap !important;
  gap: 16px !important;
}

#marketingView #marketingUploadSection .upload-stage-wrapper .upload-preflight-capsule {
  min-height: 42px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  margin: 0 !important;
  padding: 0 16px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: rgba(0, 0, 0, 0.02) !important;
  color: #66666a !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
}

#marketingView #marketingUploadSection .upload-stage-wrapper .model-select-fluent {
  width: auto !important;
  min-width: 166px !important;
  min-height: 42px !important;
  margin: 0 !important;
  padding: 0 25px 0 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  background-color: transparent !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}

#marketingView #marketingUploadSection .upload-stage-wrapper #marketingAnalysisState {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
}

#marketingView #marketingUploadSection .upload-stage-wrapper .upload-generate-button {
  width: min(100%, 320px) !important;
  min-height: 64px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  padding: 18px 24px !important;
  border: 0 !important;
  border-radius: 14px !important;
  background: #1a1a1c !important;
  color: #ffffff !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
  font-size: 16px !important;
  font-weight: 750 !important;
  line-height: 1.3 !important;
  cursor: pointer !important;
  transform: translateY(0) !important;
  transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1), background-color 260ms ease, box-shadow 260ms cubic-bezier(0.16, 1, 0.3, 1) !important;
}

#marketingView #marketingUploadSection .upload-stage-wrapper .upload-generate-button:hover {
  background: #000000 !important;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.25) !important;
  transform: translateY(-1.5px) !important;
}

#marketingView #marketingUploadSection .upload-stage-wrapper .upload-generate-button:active {
  transform: translateY(0.5px) !important;
}

@media (max-width: 720px) {
  #marketingView #marketingUploadSection .upload-stage-wrapper {
    max-width: none !important;
    gap: 24px !important;
    padding-top: 24px !important;
  }
}

/* Messages: stop short lists/reports from leaving full-viewport blank panels. */
.app-shell:has(#messagesView:not(.hidden)) .content,
#messagesView,
#messagesView .message-center {
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
}

#messagesView .message-center {
  align-items: start !important;
}

#messagesView .message-list-panel,
#messagesView .message-detail-panel {
  align-self: start !important;
  height: auto !important;
  max-height: 100dvh !important;
}

#messagesView .message-list,
#messagesView .message-detail-content {
  height: auto !important;
  max-height: calc(100dvh - 104px) !important;
  overflow-y: auto !important;
}

@media (max-width: 760px) {
  #messagesView .message-list-panel,
  #messagesView .message-detail-panel,
  #messagesView .message-detail-content {
    max-height: none !important;
  }

  #messagesView .message-list {
    max-height: 42dvh !important;
  }
}

/* Notes toolbar: unified Lucide-style controls and semantic groups. */
#todosView .note-toolbar {
  height: 64px !important;
  min-height: 64px !important;
  padding: 8px 72px !important;
  border-bottom: 1px solid #eef2f6 !important;
  background: rgba(248, 250, 252, 0.88) !important;
}

#todosView .note-toolbar-capsule {
  max-width: min(100%, 820px) !important;
  gap: 5px !important;
  padding: 6px 9px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 11px !important;
  background: #fff !important;
  box-shadow: 0 4px 8px rgba(15, 23, 42, 0.035), 0 12px 28px rgba(15, 23, 42, 0.045) !important;
}

#todosView .note-toolbar-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

#todosView .note-toolbar-divider {
  width: 1px !important;
  height: 18px !important;
  margin: 0 4px !important;
  background: #e2e8f0 !important;
}

#todosView .note-toolbar-capsule button,
#todosView .note-toolbar-capsule .note-color-trigger {
  width: 32px !important;
  min-width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 7px !important;
  background: transparent !important;
  color: #475569 !important;
  box-shadow: none !important;
  cursor: pointer !important;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease !important;
}

#todosView .note-toolbar-capsule button::before,
#todosView .note-toolbar-capsule button::after,
#todosView .note-toolbar-capsule .note-color-trigger::before,
#todosView .note-toolbar-capsule .note-color-trigger::after {
  display: none !important;
  content: none !important;
}

#todosView .note-toolbar-capsule button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

#todosView .note-toolbar-capsule button:hover,
#todosView .note-toolbar-capsule .note-color-trigger:hover {
  background: #f1f5f9 !important;
  color: #334155 !important;
}

#todosView .note-toolbar-capsule button:active,
#todosView .note-toolbar-capsule .note-color-trigger:active {
  transform: translateY(1px);
}

#todosView .note-toolbar-capsule button.active,
#todosView .note-toolbar-capsule .note-color-trigger.active {
  background: #e0f2fe !important;
  color: #0284c7 !important;
}

#todosView .note-toolbar-block-group select {
  width: 82px !important;
  min-width: 82px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 24px 0 9px !important;
  border: 0 !important;
  border-radius: 7px !important;
  background-color: transparent !important;
  color: #475569 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: background-color 160ms ease, color 160ms ease !important;
}

#todosView .note-toolbar-block-group select:hover,
#todosView .note-toolbar-block-group select:focus {
  background-color: #f1f5f9 !important;
  color: #334155 !important;
  outline: none !important;
}

@media (max-width: 900px) {
  #todosView .note-toolbar {
    justify-content: flex-start !important;
    padding: 8px 12px !important;
  }

  #todosView .note-toolbar-capsule {
    justify-content: flex-start !important;
  }
}

/* Sidebar message notifications. */
.sidebar #message-target-node {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  overflow: visible;
  transform: translate(-50%, -50%);
}

.sidebar #message-target-node .icon-base {
  top: 50% !important;
  left: 50% !important;
}

.sidebar #message-target-node .nav-badge {
  position: absolute !important;
  top: -9px !important;
  right: -12px !important;
  z-index: 4;
  min-width: 16px !important;
  height: 16px !important;
  display: inline-grid !important;
  place-items: center !important;
  padding: 0 4px !important;
  border: 2px solid #fff !important;
  border-radius: 999px !important;
  background: #ef4444 !important;
  color: #fff !important;
  box-sizing: border-box !important;
  font-size: 9px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  pointer-events: none;
  animation: messageBadgePopIn 320ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.sidebar #message-target-node .nav-badge.badge-dot {
  top: -5px !important;
  right: -7px !important;
  width: 10px !important;
  min-width: 10px !important;
  height: 10px !important;
  padding: 0 !important;
}

.sidebar #message-target-node .nav-badge.hidden {
  display: none !important;
}

.sidebar #message-target-node.pulse-effect {
  animation: messageTargetPulse 500ms ease-out;
}

@keyframes messageBadgePopIn {
  from {
    opacity: 0;
    transform: scale(0);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes messageTargetPulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    filter: drop-shadow(0 0 0 rgba(37, 99, 235, 0));
  }
  25%, 75% {
    transform: translate(-50%, -50%) scale(1.12);
    filter: drop-shadow(0 0 7px rgba(37, 99, 235, 0.42));
  }
  50% {
    transform: translate(-50%, -50%) scale(1);
    filter: drop-shadow(0 0 2px rgba(37, 99, 235, 0.14));
  }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar #message-target-node,
  .sidebar #message-target-node .nav-badge {
    animation: none !important;
  }
}

/* Home search and compact rail alignment. */
.app-shell .sidebar,
.app-shell:has(#todosView:not(.hidden)) .sidebar,
.app-shell:has(#settingsView:not(.hidden)) .sidebar {
  justify-content: space-between !important;
  padding: 20px 12px !important;
  background: #fafafa !important;
  border-right-color: rgba(0, 0, 0, 0.04) !important;
}

.sidebar .avatar-wrapper,
.sidebar .brand-mark,
.app-shell:has(#todosView:not(.hidden)) .brand-mark,
.app-shell:has(#settingsView:not(.hidden)) .brand-mark {
  width: 46px !important;
  height: 46px !important;
}

.sidebar .brand-mark,
.app-shell:has(#todosView:not(.hidden)) .brand-mark,
.app-shell:has(#settingsView:not(.hidden)) .brand-mark {
  border-radius: 14px !important;
  background: #1a1a1c !important;
  color: #fff !important;
  box-shadow: 0 5px 14px rgba(26, 26, 28, 0.17), inset 0 1px rgba(255, 255, 255, 0.08) !important;
}

.sidebar .kb-nav,
.app-shell:has(#todosView:not(.hidden)) .kb-nav,
.app-shell:has(#settingsView:not(.hidden)) .kb-nav {
  margin-top: 24px !important;
  gap: 10px !important;
}

.sidebar .nav,
.app-shell:has(#todosView:not(.hidden)) .sidebar .nav,
.app-shell:has(#settingsView:not(.hidden)) .sidebar .nav {
  width: 46px !important;
  min-width: 46px !important;
  height: 46px !important;
  min-height: 46px !important;
  border-radius: 14px !important;
  color: #71717a !important;
}

.sidebar .nav:not(.active):hover {
  background: #f0f0f1 !important;
  color: #1a1a1c !important;
  box-shadow: none !important;
}

.sidebar .nav.active,
.app-shell:has(#todosView:not(.hidden)) .sidebar .nav.active,
.app-shell:has(#settingsView:not(.hidden)) .sidebar .nav.active {
  background: #1a1a1c !important;
  color: #fff !important;
  box-shadow: 0 5px 14px rgba(26, 26, 28, 0.17), inset 0 1px rgba(255, 255, 255, 0.08) !important;
}

.sidebar .nav.active:hover {
  background: #000 !important;
  color: #fff !important;
  transform: scale(1.02) !important;
}

.sidebar .nav[data-view="thoughts"]:not(.active):hover .bolt-outline::after {
  background: #f0f0f1 !important;
}

.sidebar .nav[data-view="thoughts"].active .bolt-outline::after {
  background: #1a1a1c !important;
}

.sidebar .nav[data-view="thoughts"].active:hover .bolt-outline::after {
  background: #000 !important;
}

.sidebar .sidebar-logout {
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  margin-top: 14px !important;
  border: 0 !important;
  background: #e4e4e7 !important;
}

.sidebar .sidebar-logout .icon-base,
.sidebar-user-avatar {
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
}

#dashboardView .home-hero {
  width: min(820px, 100%) !important;
  gap: 28px !important;
  margin: auto auto 30px !important;
}

#dashboardView .home-hero h1 {
  font-size: 34px !important;
  line-height: 1.15 !important;
  letter-spacing: -0.5px !important;
}

#dashboardView .home-examples {
  width: min(760px, 100%) !important;
  gap: 10px !important;
}

#dashboardView .home-examples button {
  min-height: 36px !important;
  padding: 0 14px !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  border-radius: 20px !important;
  background: rgba(255, 255, 255, 0.85) !important;
  color: #64646d !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.02) !important;
  transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease, transform 180ms ease !important;
}

#dashboardView .home-examples button:hover {
  border-color: rgba(0, 122, 255, 0.18) !important;
  background: #fff !important;
  color: #007aff !important;
  transform: translateY(-1px) !important;
}

#dashboardView .home-chat-form.search-area-wrapper {
  border: 1.5px solid transparent !important;
  border-radius: 18px !important;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.055), 0 1px 3px rgba(15, 23, 42, 0.025) !important;
  transform: none !important;
  transition: border-color 0.2s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.2s cubic-bezier(0.2, 0, 0, 1) !important;
}

#dashboardView .home-chat-form.search-area-wrapper:focus-within {
  border-color: #000 !important;
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.07), 0 1px 3px rgba(15, 23, 42, 0.03) !important;
  transform: none !important;
}

#dashboardView #homeChatSendBtn,
#dashboardView #homeChatSendBtn:disabled {
  border-radius: 50% !important;
  background: #1a1a1c !important;
  color: #fff !important;
  opacity: 1 !important;
  cursor: default !important;
  box-shadow: none !important;
  transition: background-color 0.2s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.2s cubic-bezier(0.2, 0, 0, 1), transform 0.2s cubic-bezier(0.2, 0, 0, 1) !important;
}

#dashboardView .home-chat-form.has-content #homeChatSendBtn:not(:disabled) {
  background: #007aff !important;
  cursor: pointer !important;
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.24) !important;
}

#dashboardView .home-chat-form.has-content #homeChatSendBtn:not(:disabled):hover {
  background: #006ee6 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 16px rgba(0, 122, 255, 0.3) !important;
}

/* Reference home page composition. */
.app-shell:has(#dashboardView:not(.hidden)) {
  background-color: #f4f5f6 !important;
  background-image:
    radial-gradient(at 90% 10%, rgba(235, 215, 255, 0.4) 0, transparent 50%),
    radial-gradient(at 10% 90%, rgba(205, 235, 255, 0.4) 0, transparent 50%) !important;
}

.app-shell:has(#dashboardView:not(.hidden)) .content,
#dashboardView,
#dashboardView .home-ai-shell {
  background: transparent !important;
}

.sidebar .sidebar-reference-icon {
  width: 18px !important;
  height: 18px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2.2 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

.sidebar .sidebar-reference-icon-fill {
  fill: currentColor !important;
  stroke: none !important;
}

.sidebar .kb-nav,
.app-shell:has(#todosView:not(.hidden)) .kb-nav,
.app-shell:has(#settingsView:not(.hidden)) .kb-nav {
  flex: 0 1 auto !important;
  gap: 20px !important;
  margin-top: 40px !important;
  margin-bottom: auto !important;
}

.sidebar .nav[data-view="dashboard"]:hover {
  background: #000 !important;
  color: #fff !important;
  transform: scale(1.02) !important;
}

.sidebar .nav::after,
.sidebar .sidebar-logout::after {
  display: none !important;
}

#dashboardView .home-ai-shell:not(.home-chat-active) {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
  padding: 40px !important;
}

#dashboardView .home-ai-shell:not(.home-chat-active) .home-chat-messages,
#dashboardView .home-ai-shell:not(.home-chat-active) .home-close-chat {
  display: none !important;
}

#dashboardView .home-ai-shell:not(.home-chat-active) .home-hero {
  display: flex !important;
  width: min(800px, 100%) !important;
  flex-direction: column !important;
  align-items: center !important;
  align-self: center !important;
  justify-self: center !important;
  gap: 0 !important;
  margin: 0 0 40px !important;
}

#dashboardView .home-ai-shell:not(.home-chat-active) .home-hero h1 {
  margin: 0 0 28px !important;
  color: #1c1c1e !important;
  font-size: 34px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  letter-spacing: -0.5px !important;
}

#dashboardView .home-ai-shell:not(.home-chat-active) .home-examples {
  display: flex !important;
  width: min(720px, 100%) !important;
  justify-content: center !important;
  column-gap: 10px !important;
  row-gap: 12px !important;
}

#dashboardView .home-ai-shell:not(.home-chat-active) .home-examples button {
  min-height: 0 !important;
  padding: 9px 18px !important;
  border: 1px solid rgba(255, 255, 255, 0.5) !important;
  border-radius: 20px !important;
  background: rgba(255, 255, 255, 0.85) !important;
  color: #48484a !important;
  font-size: 13.5px !important;
  font-weight: 400 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.015) !important;
}

#dashboardView .home-ai-shell:not(.home-chat-active) .home-examples button:hover {
  background: #fff !important;
  color: #007aff !important;
  transform: translateY(-1px) !important;
}

#dashboardView .home-ai-shell:not(.home-chat-active) .home-chat-form {
  position: static !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  width: min(720px, 100%) !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

#dashboardView .home-ai-shell:not(.home-chat-active) .home-chat-form:focus-within {
  border: 0 !important;
  box-shadow: none !important;
}

#dashboardView .home-ai-shell:not(.home-chat-active) .home-search-main {
  display: flex !important;
  width: 100% !important;
  min-height: 32px !important;
  align-items: center !important;
  gap: 14px !important;
  padding: 14px 18px !important;
  border: 1.5px solid transparent !important;
  border-radius: 18px !important;
  background: #fff !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.01), 0 6px 24px rgba(0, 0, 0, 0.03) !important;
  transition: border-color 0.2s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.2s ease !important;
}

#dashboardView .home-ai-shell:not(.home-chat-active) .home-search-main:focus-within {
  border-color: #000 !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.01) !important;
}

#dashboardView .home-ai-shell:not(.home-chat-active) .home-attach-btn {
  width: 18px !important;
  min-width: 18px !important;
  height: 24px !important;
  padding: 0 !important;
  border-radius: 0 !important;
  color: #a1a1aa !important;
  font-size: 18px !important;
}

#dashboardView .home-ai-shell:not(.home-chat-active) .home-chat-form textarea {
  height: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  padding: 5px 0 !important;
  color: #1c1c1e !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  line-height: 22px !important;
  overflow: hidden !important;
}

#dashboardView .home-ai-shell:not(.home-chat-active) .home-chat-form textarea::placeholder {
  color: #bcbcbf !important;
}

#dashboardView .home-ai-shell:not(.home-chat-active) #homeChatSendBtn {
  width: 32px !important;
  min-width: 32px !important;
  max-width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  flex: 0 0 32px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  font-size: 13px !important;
}

#dashboardView .home-ai-shell:not(.home-chat-active) .home-search-submit {
  display: grid !important;
  width: 32px !important;
  min-width: 32px !important;
  max-width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  flex: 0 0 32px !important;
  place-items: center !important;
  gap: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

#dashboardView .home-ai-shell:not(.home-chat-active) #homeChatSendBtn i {
  display: block !important;
  margin: 0 !important;
  transform: none !important;
}

#dashboardView .home-ai-shell:not(.home-chat-active) .home-attachments {
  margin-top: 12px !important;
}

#dashboardView .home-ai-shell:not(.home-chat-active) .home-chat-tools {
  position: static !important;
  display: flex !important;
  width: auto !important;
  align-self: flex-start !important;
  padding: 0 !important;
  border: 0 !important;
}

#dashboardView .home-ai-shell:not(.home-chat-active) .home-search-status {
  display: none !important;
}

#dashboardView .home-ai-shell:not(.home-chat-active) .home-model-shell {
  min-height: 0 !important;
  border: 1px solid rgba(0, 0, 0, 0.04) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.5) !important;
  color: #66666a !important;
}

#dashboardView .home-ai-shell:not(.home-chat-active) .home-model-shell select {
  max-width: 180px !important;
  min-height: 27px !important;
  padding: 5px 24px 5px 12px !important;
  color: #66666a !important;
  font-family: inherit !important;
  font-size: 12.5px !important;
}

@media (max-width: 768px) {
  #dashboardView .home-ai-shell:not(.home-chat-active) {
    padding: 20px 16px calc(124px + env(safe-area-inset-bottom)) !important;
  }

  #dashboardView .home-ai-shell:not(.home-chat-active) .home-hero {
    width: 100% !important;
    margin: 0 !important;
  }

  #dashboardView .home-ai-shell:not(.home-chat-active) .home-examples {
    display: none !important;
  }

  #dashboardView .home-ai-shell:not(.home-chat-active) .home-chat-form {
    position: fixed !important;
    left: 12px !important;
    right: 12px !important;
    bottom: max(12px, env(safe-area-inset-bottom)) !important;
    display: grid !important;
    width: auto !important;
    padding: 10px !important;
    border: 1px solid var(--linear-line) !important;
    border-radius: 22px !important;
    background: #fff !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.05) !important;
  }

  #dashboardView .home-ai-shell:not(.home-chat-active) .home-search-main {
    min-height: 46px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  #dashboardView .home-ai-shell:not(.home-chat-active) .home-chat-tools {
    display: none !important;
  }
}

/* Message prototype final polish: loaded last, so these values own the page. */
@media (min-width: 761px) {
  #appView.app-shell:has(#messagesView:not(.hidden)) {
    --msg-canvas: #f4f5f6;
    --msg-sidebar: #fafafa;
    --msg-ink: #1c1c1e;
    --msg-secondary: #48484a;
    --msg-tertiary: #8e8e93;
    --msg-charcoal: #1a1a1c;
    --msg-blue: #007aff;
  }

  #appView.app-shell:has(#messagesView:not(.hidden)) .content,
  #messagesView,
  #messagesView .ios-message-center,
  #messagesView .message-detail-panel {
    background: #ffffff !important;
  }

  #messagesView .message-list-panel,
  #messagesView .message-center-head,
  #messagesView .message-list {
    background: #fcfcfc !important;
  }

  #messagesView .message-list-item.msg-card {
    border: 0 !important;
    background: transparent !important;
    color: var(--msg-ink) !important;
    box-shadow: none !important;
  }

  #messagesView .message-list-item.msg-card:hover {
    background: rgba(0, 0, 0, 0.02) !important;
    box-shadow: none !important;
  }

  #messagesView .message-list-item.msg-card.active {
    border: 0 !important;
    background: #ffffff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02), 0 1px 2px rgba(0, 0, 0, 0.01) !important;
  }

  #messagesView .message-list-item.msg-card.active::before {
    background: var(--msg-charcoal) !important;
  }

  #messagesView .message-list-copy strong {
    color: var(--msg-ink) !important;
    font-weight: 600 !important;
  }

  #messagesView .message-list-copy em {
    color: var(--msg-tertiary) !important;
    font-weight: 400 !important;
  }

  #messagesView .message-list-copy small {
    color: #a1a1aa !important;
    font-weight: 500 !important;
  }

  #messagesView .status-badge {
    padding: 2px 6px !important;
    border: 0 !important;
    border-radius: 6px !important;
    font-size: 10.5px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    box-shadow: none !important;
  }

  #messagesView .status-badge-done {
    background: rgba(34, 197, 94, 0.09) !important;
    color: #16a34a !important;
  }

  #messagesView .status-badge-failed {
    background: rgba(239, 68, 68, 0.09) !important;
    color: #dc2626 !important;
  }

  #messagesView .status-badge-pending {
    background: rgba(0, 122, 255, 0.09) !important;
    color: var(--msg-blue) !important;
  }

  #messagesView .message-detail-path {
    color: var(--msg-tertiary) !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-size: 12px !important;
  }

  #messagesView .message-detail-path span {
    color: var(--msg-secondary) !important;
  }

  #messagesView #messageDetailTitle {
    color: var(--msg-ink) !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    line-height: 1.22 !important;
    letter-spacing: -0.4px !important;
  }

  #messagesView #openMessageFollowupDrawerBtn {
    order: 1 !important;
    min-height: 34px !important;
    padding: 8px 16px !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: var(--msg-charcoal) !important;
    color: #ffffff !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
  }

  #messagesView #copyMessageDetailBtn {
    order: 2 !important;
    min-height: 34px !important;
    padding: 7px 14px !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    color: var(--msg-secondary) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    box-shadow: none !important;
  }

  #messagesView .message-detail-content {
    padding: 32px 40px !important;
    color: #27272a !important;
    font-size: 14.5px !important;
    line-height: 1.75 !important;
    letter-spacing: -0.2px !important;
  }

  #messagesView .message-detail-content h1,
  #messagesView .message-detail-content h2,
  #messagesView .message-detail-content h3,
  #messagesView .message-detail-content h4,
  #messagesView .message-prototype-section-title {
    color: var(--msg-ink) !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.45 !important;
  }

  #messagesView .message-detail-content p,
  #messagesView .message-detail-content li,
  #messagesView .message-detail-content ol {
    color: #27272a !important;
    font-size: 14.5px !important;
    line-height: 1.75 !important;
    letter-spacing: -0.2px !important;
  }

  #messagesView .message-detail-content strong,
  #messagesView .message-detail-content b,
  #messagesView .entity-highlight {
    color: var(--msg-ink) !important;
    font-weight: 600 !important;
  }

  #messagesView .message-detail-content a {
    color: var(--msg-blue) !important;
    font-weight: 600 !important;
    text-decoration: none !important;
  }

  #messagesView .message-prototype-table,
  #messagesView .message-prototype-text,
  #messagesView .message-prototype-list,
  #messagesView .message-prototype-metrics,
  #messagesView .message-prototype-metric {
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
}

/* Scoped final overrides for legacy !important marketing controls. */
@media (min-width: 761px) {
  .yesterday-analysis-wrapper .marketing-today-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    margin: 20px 0 18px !important;
  }

  .yesterday-analysis-wrapper .marketing-today-date,
  .yesterday-analysis-wrapper .marketing-today-actions > button,
  .yesterday-analysis-wrapper #marketingTodayState {
    min-height: 34px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;
    padding: 7px 14px !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    color: #48484a !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    box-shadow: none !important;
  }

  .yesterday-analysis-wrapper .marketing-today-date select {
    min-width: 0 !important;
    width: auto !important;
    height: 24px !important;
    padding: 0 18px 0 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: #48484a !important;
    font-size: 13px !important;
    font-weight: 650 !important;
    appearance: none !important;
  }

  .yesterday-analysis-wrapper #marketingTodayState {
    margin-left: auto !important;
    border-color: rgba(0, 0, 0, 0.04) !important;
    background: rgba(0, 0, 0, 0.025) !important;
    color: #8e8e93 !important;
  }
}

/* Scoped layout repair: keep yesterday data readable and the drawer structured. */
@media (min-width: 761px) {
  .yesterday-analysis-wrapper {
    overflow: hidden !important;
  }

  .yesterday-analysis-wrapper .metrics-grid-container {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(210px, 1fr)) !important;
    gap: 16px !important;
    align-items: stretch !important;
  }

  .yesterday-analysis-wrapper .metric-card {
    min-width: 0 !important;
    min-height: 120px !important;
    padding: 20px !important;
    border: 1px solid rgba(0, 0, 0, 0.03) !important;
    border-radius: 12px !important;
    background: #fcfcfc !important;
  }

  .yesterday-analysis-wrapper .metric-value-row {
    display: grid !important;
    grid-template-columns: minmax(0, auto) max-content !important;
    align-items: center !important;
    justify-content: start !important;
    column-gap: 12px !important;
    row-gap: 6px !important;
  }

  .yesterday-analysis-wrapper .metric-number {
    overflow: visible !important;
    color: #1c1c1e !important;
    font-size: clamp(20px, 1.35vw, 25px) !important;
    font-weight: 800 !important;
    line-height: 1.16 !important;
    letter-spacing: -0.5px !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
  }

  .yesterday-analysis-wrapper .compare-badge {
    max-width: none !important;
    white-space: nowrap !important;
  }

  .yesterday-analysis-wrapper .ai-drawer-overlay {
    right: calc(-100% - 40px) !important;
    width: calc(100% - 32px) !important;
    max-width: calc(100% - 32px) !important;
  }

  .yesterday-analysis-wrapper .ai-drawer-overlay.open {
    right: 0 !important;
  }

  .yesterday-analysis-wrapper .drawer-body-scroll {
    padding: 30px 34px 40px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  .yesterday-analysis-wrapper .drawer-body-scroll h1,
  .yesterday-analysis-wrapper .drawer-body-scroll h2,
  .yesterday-analysis-wrapper .drawer-body-scroll h3 {
    margin: 22px 0 12px !important;
    color: #1c1c1e !important;
    font-weight: 800 !important;
    line-height: 1.28 !important;
    letter-spacing: -0.4px !important;
  }

  .yesterday-analysis-wrapper .drawer-body-scroll h1:first-child,
  .yesterday-analysis-wrapper .drawer-body-scroll h2:first-child,
  .yesterday-analysis-wrapper .drawer-body-scroll h3:first-child {
    margin-top: 0 !important;
  }

  .yesterday-analysis-wrapper .drawer-body-scroll table {
    width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
    margin: 14px 0 18px !important;
    font-size: 12px !important;
  }

  .yesterday-analysis-wrapper .drawer-body-scroll th,
  .yesterday-analysis-wrapper .drawer-body-scroll td {
    padding: 8px 7px !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
    color: #27272a !important;
    line-height: 1.45 !important;
    text-align: left !important;
    vertical-align: top !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
  }

  .yesterday-analysis-wrapper .drawer-body-scroll th {
    background: rgba(0, 0, 0, 0.025) !important;
    font-weight: 700 !important;
  }
}

/* Final live fixes: notes cleanup and the real in-app review center surface. */
#todosView .notes-search,
#todosView .note-outline-search {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

#todosView .notes-sidebar,
#todosView .notes-sidebar.panel,
#todosView .note-folder-row,
#todosView .note-folder-row:hover,
#todosView .note-folder-group.selected > .note-folder-row,
#todosView .note-folder-notes .note-item,
#todosView .note-folder-notes .note-item:hover,
#todosView .note-folder-notes .note-item.active,
#todosView .note-folder-notes .note-open,
#todosView .note-outline-panel,
#todosView .note-outline-row,
#todosView .note-outline-row:hover {
  border-color: transparent !important;
  outline: 0 !important;
  box-shadow: none !important;
}

#todosView .note-folder-row::before,
#todosView .note-folder-row::after,
#todosView .note-folder-notes .note-item::before,
#todosView .note-folder-notes .note-item::after,
#todosView .note-outline-row::before,
#todosView .note-outline-row::after {
  border: 0 !important;
  box-shadow: none !important;
}

#todosView .note-editor,
#todosView .note-editor:focus,
#todosView .note-editor:focus-visible,
#todosView .note-editor.ProseMirror-focused,
#todosView .note-editor .ProseMirror,
#todosView .note-editor .ProseMirror:focus,
#todosView .note-editor .ProseMirror-focused,
#todosView .note-editor [contenteditable="true"],
#todosView .note-editor [contenteditable="true"]:focus,
#todosView .note-editor [contenteditable="true"]:focus-visible {
  border-color: transparent !important;
  outline: 0 !important;
  box-shadow: none !important;
}

#marketingView #marketingReviewSection.marketing-review-screen {
  --review-canvas: #f4f5f6;
  --review-sidebar: #fafafa;
  --review-ink: #1c1c1e;
  --review-muted: #8e8e93;
  --review-blue: #007aff;
  --review-black: #1a1a1c;
  min-height: calc(100dvh - 138px) !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  gap: 16px !important;
  padding: 42px 24px 58px !important;
  background: var(--review-canvas) !important;
  animation: reviewCenterFadeIn 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

#marketingView #marketingReviewSection .marketing-screen-head {
  width: min(840px, 100%) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 22px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  text-align: center !important;
}

#marketingView #marketingReviewSection .marketing-section-kicker {
  display: none !important;
}

#marketingView #marketingReviewSection .marketing-screen-head h3 {
  margin: 0 !important;
  color: var(--review-ink) !important;
  font-size: 28px !important;
  font-weight: 880 !important;
  line-height: 1.16 !important;
  letter-spacing: -0.8px !important;
}

#marketingView #marketingReviewSection .marketing-screen-head p {
  max-width: 620px !important;
  margin: 10px auto 0 !important;
  color: var(--review-muted) !important;
  font-size: 14.5px !important;
  font-weight: 500 !important;
  line-height: 1.65 !important;
}

#marketingView #marketingReviewSection .kb-file-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  margin: 0 !important;
}

#marketingView #marketingReviewSection .kb-file-actions .secondary,
#marketingView #marketingReviewSection .kb-file-actions .link-btn,
#marketingView #marketingReviewSection #marketingFileHint {
  min-height: 34px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  padding: 8px 14px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.75) !important;
  color: #48484a !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  line-height: 1 !important;
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.04) !important;
  backdrop-filter: blur(20px) !important;
  cursor: pointer !important;
}

#marketingView #marketingReviewSection .kb-file-actions label[for="marketingReviewUploadInput"]::before {
  content: "+" !important;
  color: var(--review-blue) !important;
  font-weight: 800 !important;
}

#marketingView #marketingReviewSection #openMarketingReviewCloudBtn::before {
  content: "\f0c2" !important;
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900 !important;
  color: var(--review-blue) !important;
}

#marketingView #marketingReviewSection #marketingFileHint {
  background: rgba(0, 122, 255, 0.04) !important;
  color: var(--review-blue) !important;
  cursor: default !important;
}

#marketingView #marketingReviewSection #marketingFiles {
  width: min(840px, 100%) !important;
  min-height: 0 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 auto -2px !important;
  padding: 0 !important;
}

#marketingView #marketingReviewSection .workspace-upload-empty {
  display: none !important;
}

#marketingView #marketingReviewSection .marketing-file-card {
  width: auto !important;
  max-width: min(100%, 360px) !important;
  min-height: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 7px 9px 7px 12px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.78) !important;
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.04) !important;
  backdrop-filter: blur(18px) !important;
  animation: reviewFileScaleIn 240ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

#marketingView #marketingReviewSection .marketing-file-card::before {
  content: "\1F4CA" !important;
  flex: 0 0 auto !important;
  font-size: 13px !important;
  line-height: 1 !important;
}

#marketingView #marketingReviewSection .marketing-file-card .file-card-body {
  min-width: 0 !important;
  display: block !important;
}

#marketingView #marketingReviewSection .marketing-file-card .file-card-body strong {
  max-width: 260px !important;
  display: block !important;
  overflow: hidden !important;
  color: #48484a !important;
  font-size: 12px !important;
  font-weight: 650 !important;
  line-height: 1.2 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#marketingView #marketingReviewSection .marketing-file-card .file-card-body small,
#marketingView #marketingReviewSection .marketing-file-card .file-card-actions .ghost-icon:not(.danger),
#marketingView #marketingReviewSection .marketing-file-card .file-card-actions a {
  display: none !important;
}

#marketingView #marketingReviewSection .marketing-file-card .file-card-actions {
  display: inline-flex !important;
  flex: 0 0 auto !important;
  margin: 0 !important;
}

#marketingView #marketingReviewSection .marketing-file-card .ghost-icon.danger {
  width: 18px !important;
  min-width: 18px !important;
  height: 18px !important;
  min-height: 18px !important;
  display: grid !important;
  place-items: center !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  color: #c7c7cc !important;
  font-size: 0 !important;
  box-shadow: none !important;
}

#marketingView #marketingReviewSection .marketing-file-card .ghost-icon.danger::before {
  content: "\00d7" !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
}

#marketingView #marketingReviewSection .marketing-file-card .ghost-icon.danger:hover {
  background: rgba(255, 59, 48, 0.08) !important;
  color: #ff3b30 !important;
}

#marketingView #marketingReviewSection #marketingReviewAskForm {
  position: relative !important;
  bottom: auto !important;
  width: min(840px, 100%) !important;
  min-height: 132px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  margin: 0 auto !important;
  padding: 16px 18px 14px !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  border-radius: 22px !important;
  background: rgba(255, 255, 255, 0.85) !important;
  box-shadow: none !important;
  backdrop-filter: blur(30px) !important;
  transition: border-color 220ms ease, background-color 220ms ease, box-shadow 220ms ease, transform 220ms ease !important;
}

#marketingView #marketingReviewSection #marketingReviewAskForm:focus-within {
  border-color: rgba(0, 122, 255, 0.2) !important;
  background: #ffffff !important;
  box-shadow: 0 12px 40px rgba(0, 122, 255, 0.08), 0 12px 40px rgba(0, 0, 0, 0.04) !important;
  transform: translateY(-1px) !important;
}

#marketingView #marketingReviewSection #marketingReviewQuestion,
#marketingView #marketingReviewSection #marketingReviewQuestion:focus,
#marketingView #marketingReviewSection #marketingReviewQuestion:focus-visible {
  width: 100% !important;
  height: 54px !important;
  min-height: 54px !important;
  max-height: 54px !important;
  padding: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--review-ink) !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  line-height: 1.6 !important;
  resize: none !important;
}

#marketingView #marketingReviewSection #marketingReviewQuestion::placeholder {
  color: #b8b8bd !important;
}

#marketingView #marketingReviewSection .marketing-review-composer-foot {
  min-height: 36px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 0 !important;
}

#marketingView #marketingReviewSection .marketing-review-composer-options,
#marketingView #marketingReviewSection .marketing-review-composer-options label {
  display: flex !important;
  align-items: center !important;
  gap: 0 !important;
}

#marketingView #marketingReviewSection #marketingReviewModel {
  max-width: 190px !important;
  min-height: 31px !important;
  padding: 6px 26px 6px 12px !important;
  border: 1px solid rgba(0, 0, 0, 0.04) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.5) !important;
  color: #66666a !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}

#marketingView #marketingReviewSection #marketingReviewSendBtn,
#marketingView #marketingReviewSection #marketingReviewSendBtn:disabled {
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  display: inline-grid !important;
  place-items: center !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: var(--review-black) !important;
  color: #fff !important;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12) !important;
  opacity: 1 !important;
  transition: transform 190ms cubic-bezier(0.2, 0, 0, 1), box-shadow 190ms ease, background-color 190ms ease !important;
}

#marketingView #marketingReviewSection #marketingReviewSendBtn:hover:not(:disabled) {
  transform: scale(1.06) !important;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.18) !important;
}

#marketingView #marketingReviewSection #marketingReviewSendBtn i {
  margin: 0 !important;
  transform: rotate(45deg) !important;
}

#marketingView #marketingReviewSection::after {
  content: "分析快照和底层审计日志将自动沉淀到您的 WebDAV 目录。" !important;
  width: min(840px, 100%) !important;
  margin: 0 auto !important;
  color: #a1a1aa !important;
  font-size: 11.5px !important;
  font-weight: 500 !important;
  line-height: 1.5 !important;
  text-align: center !important;
}

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

@keyframes reviewFileScaleIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 760px) {
  #marketingView #marketingReviewSection.marketing-review-screen {
    min-height: calc(100dvh - 96px) !important;
    justify-content: flex-start !important;
    padding: 32px 16px 42px !important;
  }

  #marketingView #marketingReviewSection .marketing-screen-head h3 {
    font-size: 24px !important;
  }

  #marketingView #marketingReviewSection #marketingReviewAskForm {
    min-height: 128px !important;
  }
}

/* Notes hierarchy final border kill: remove the remaining folder-row rectangles only. */
#todosView .notes-list,
#todosView #todoList,
#todosView .note-folder-group,
#todosView .note-folder-content,
#todosView .note-folder-children,
#todosView .note-folder-row,
#todosView .note-folder-row:hover,
#todosView .note-folder-group.selected > .note-folder-row,
#todosView .note-folder-toggle,
#todosView .note-folder-toggle:hover,
#todosView .note-folder-more,
#todosView .note-folder-more:hover {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

#todosView .note-folder-row {
  position: relative !important;
  background: transparent !important;
  padding-right: 34px !important;
}

#todosView .note-folder-toggle,
#todosView .note-folder-more {
  appearance: none !important;
  background: transparent !important;
}

/* Notes tree action hit-area: keep folder/note more menus clickable after all theme overrides. */
#todosView #todoList .note-folder-toggle {
  grid-column: 1 / 2 !important;
  max-width: 100% !important;
  padding-right: 0 !important;
  pointer-events: none !important;
}

#todosView #todoList .note-folder-more {
  position: absolute !important;
  right: 2px !important;
  top: 50% !important;
  z-index: 50 !important;
  width: 30px !important;
  min-width: 30px !important;
  height: 30px !important;
  min-height: 30px !important;
  transform: translateY(-50%) !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

#todosView #todoList .note-folder-more::before,
#todosView #todoList [data-note-menu]::before {
  content: "" !important;
  position: absolute !important;
  inset: -10px !important;
  display: block !important;
}

#todosView #todoList .note-item {
  cursor: pointer !important;
}

#todosView #todoList .note-open {
  pointer-events: none !important;
}

#todosView #todoList .note-inline-menu {
  position: absolute !important;
  right: 38px !important;
  top: 50% !important;
  z-index: 70 !important;
  display: none !important;
  align-items: center !important;
  gap: 4px !important;
  max-width: min(360px, calc(100% - 58px)) !important;
  padding: 5px !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.98) !important;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.12) !important;
  transform: translateY(-50%) !important;
  pointer-events: auto !important;
}

#todosView #todoList .note-folder-row.note-action-zone-hover .note-folder-inline-menu,
#todosView #todoList .note-folder-row:focus-within .note-folder-inline-menu,
#todosView #todoList .note-folder-inline-menu:hover,
#todosView #todoList .note-item.note-action-zone-hover .note-item-inline-menu,
#todosView #todoList .note-item:focus-within .note-item-inline-menu,
#todosView #todoList .note-item-inline-menu:hover {
  display: flex !important;
}

#todosView #todoList .note-inline-menu button {
  width: auto !important;
  min-width: 0 !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 8px !important;
  border: 0 !important;
  border-radius: 6px !important;
  background: transparent !important;
  color: #334155 !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  pointer-events: auto !important;
}

#todosView #todoList .note-inline-menu button:hover {
  background: rgba(0, 0, 0, 0.055) !important;
  color: #111827 !important;
}

#todosView #todoList .note-inline-menu button.danger {
  color: #dc2626 !important;
}

#todosView #todoList [data-note-folder-menu],
#todosView #todoList [data-note-menu] {
  position: relative !important;
  z-index: 50 !important;
  display: inline-grid !important;
  place-items: center !important;
  cursor: pointer !important;
  pointer-events: auto !important;
}

.note-action-menu {
  z-index: 10000 !important;
  pointer-events: auto !important;
}

/* Inbox: hide the native file input chrome while keeping the label upload trigger. */
#inboxView #inboxLocalSourceCard #inboxFileInput {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-width: 1px !important;
  min-height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  pointer-events: none !important;
}

/* Yesterday metrics: compact bold delta badges with triangle-only direction. */
.yesterday-analysis-wrapper .compare-badge {
  min-width: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  padding: 4px 8px !important;
  border: 0 !important;
  border-radius: 7px !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
  text-shadow: 0 0 0 currentColor !important;
}

.yesterday-analysis-wrapper .compare-badge.up.favorable,
.yesterday-analysis-wrapper .compare-badge.down.favorable {
  background: rgba(34, 197, 94, 0.1) !important;
  color: #16a34a !important;
}

.yesterday-analysis-wrapper .compare-badge.up.unfavorable,
.yesterday-analysis-wrapper .compare-badge.down.unfavorable {
  background: rgba(239, 68, 68, 0.1) !important;
  color: #ef4444 !important;
}

.yesterday-analysis-wrapper .compare-badge.flat {
  background: rgba(0, 0, 0, 0.04) !important;
  color: #9ca3af !important;
}

/* Yesterday controls and warning panel polish. */
.yesterday-analysis-wrapper .marketing-today-date,
.yesterday-analysis-wrapper .marketing-today-date:focus-within,
.yesterday-analysis-wrapper .marketing-today-date select,
.yesterday-analysis-wrapper .marketing-today-date select:focus,
.yesterday-analysis-wrapper .marketing-today-date select:focus-visible {
  outline: 0 !important;
  box-shadow: none !important;
}

.yesterday-analysis-wrapper .marketing-today-date:focus-within {
  border-color: rgba(0, 0, 0, 0.08) !important;
}

.yesterday-analysis-wrapper .marketing-today-date select {
  appearance: none !important;
}

.yesterday-analysis-wrapper .insights-header {
  color: #b45309 !important;
  font-size: 15px !important;
  font-weight: 850 !important;
}

.yesterday-analysis-wrapper .insights-header strong {
  font-weight: 850 !important;
}

.yesterday-analysis-wrapper .insights-header .warning-dot {
  display: none !important;
}

.yesterday-analysis-wrapper .warning-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 18px !important;
  min-width: 18px !important;
  color: #b45309 !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
}

/* Yesterday header: title matches the target surface, breadcrumb stays quiet. */
.yesterday-analysis-wrapper #marketingTodayTitle {
  color: #1c1c1e !important;
  font-size: 34px !important;
  font-weight: 850 !important;
  line-height: 1.18 !important;
  letter-spacing: -0.8px !important;
}

.yesterday-analysis-wrapper .dash-breadcrumb strong {
  font-weight: 500 !important;
}

/* Trend page final alignment: lower the surface and unify average badge text. */
.trend-analysis-wrapper {
  padding-top: 28px !important;
}

.trend-analysis-wrapper .trend-page-head {
  margin-bottom: 34px !important;
}

.trend-analysis-wrapper .filter-inline-row {
  margin-bottom: 28px !important;
}

.trend-analysis-wrapper .trend-avg-badge,
.trend-analysis-wrapper .trend-avg-badge span,
.trend-analysis-wrapper .trend-avg-badge strong {
  color: inherit !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  line-height: 1.15 !important;
}

.trend-analysis-wrapper .trend-avg-badge {
  gap: 5px !important;
  padding: 8px 12px !important;
  border-radius: 7px !important;
}

.trend-analysis-wrapper .trend-avg-badge.cost {
  color: #007aff !important;
}

.trend-analysis-wrapper .trend-avg-badge.expense {
  color: #e77d00 !important;
}

.trend-analysis-wrapper .trend-avg-badge.conversion {
  color: #22b95b !important;
}

.trend-analysis-wrapper .trend-avg-badge.danger {
  color: #ef2d33 !important;
}

.trend-analysis-wrapper .chart-avg-badge-dock.operation .trend-avg-badge.cost,
.trend-analysis-wrapper .chart-avg-badge-dock.operation .trend-avg-badge.cost span,
.trend-analysis-wrapper .chart-avg-badge-dock.operation .trend-avg-badge.cost strong {
  color: #1677ff !important;
}

.trend-analysis-wrapper .chart-avg-badge-dock.operation .trend-avg-badge.conversion,
.trend-analysis-wrapper .chart-avg-badge-dock.operation .trend-avg-badge.conversion span,
.trend-analysis-wrapper .chart-avg-badge-dock.operation .trend-avg-badge.conversion strong {
  color: #22b95b !important;
}

.trend-analysis-wrapper .chart-avg-badge-dock.operation .trend-avg-badge.danger,
.trend-analysis-wrapper .chart-avg-badge-dock.operation .trend-avg-badge.danger span,
.trend-analysis-wrapper .chart-avg-badge-dock.operation .trend-avg-badge.danger strong {
  color: #ef2d33 !important;
}

/* Marketing secondary nav final state: active item uses a black rail, not a white card. */
.marketing-subnav button {
  color: #8e939b !important;
  font-weight: 700 !important;
}

.marketing-subnav button::before {
  color: currentColor !important;
}

.marketing-subnav button:hover {
  background: transparent !important;
  color: #48484a !important;
  box-shadow: none !important;
}

.marketing-subnav button.active {
  border-color: transparent !important;
  background: transparent !important;
  color: #1a1a1c !important;
  font-weight: 900 !important;
  box-shadow: none !important;
}

.marketing-subnav button.active::after {
  content: "" !important;
  position: absolute !important;
  left: -14px !important;
  top: 50% !important;
  width: 5px !important;
  height: 28px !important;
  border-radius: 0 999px 999px 0 !important;
  background: #1a1a1c !important;
  transform: translateY(-50%) !important;
}

/* Home landing final override: keep the main search cluster one third larger. */
@media (min-width: 761px) {
  #dashboardView .home-ai-shell:not(.home-chat-active) .home-hero {
    width: min(1064px, 100%) !important;
    margin-bottom: 53px !important;
  }

  #dashboardView .home-ai-shell:not(.home-chat-active) .home-hero h1 {
    margin-bottom: 37px !important;
    font-size: 45px !important;
    line-height: 1.16 !important;
    letter-spacing: -0.7px !important;
  }

  #dashboardView .home-ai-shell:not(.home-chat-active) .home-examples {
    width: min(960px, 100%) !important;
    column-gap: 13px !important;
    row-gap: 16px !important;
  }

  #dashboardView .home-ai-shell:not(.home-chat-active) .home-examples button {
    padding: 12px 24px !important;
    border-radius: 27px !important;
    font-size: 18px !important;
    line-height: 1.2 !important;
  }

  #dashboardView .home-ai-shell:not(.home-chat-active) .home-chat-form {
    width: min(960px, 100%) !important;
    gap: 16px !important;
  }

  #dashboardView .home-ai-shell:not(.home-chat-active) .home-search-main {
    min-height: 80px !important;
    gap: 19px !important;
    padding: 18px 24px !important;
    border-radius: 24px !important;
  }

  #dashboardView .home-ai-shell:not(.home-chat-active) .home-attach-btn {
    width: 24px !important;
    min-width: 24px !important;
    height: 32px !important;
    font-size: 24px !important;
  }

  #dashboardView .home-ai-shell:not(.home-chat-active) .home-chat-form textarea {
    height: 43px !important;
    min-height: 43px !important;
    max-height: 43px !important;
    padding: 7px 0 !important;
    font-size: 20px !important;
    line-height: 29px !important;
  }

  #dashboardView .home-ai-shell:not(.home-chat-active) #homeChatSendBtn,
  #dashboardView .home-ai-shell:not(.home-chat-active) .home-search-submit {
    width: 43px !important;
    min-width: 43px !important;
    max-width: 43px !important;
    height: 43px !important;
    min-height: 43px !important;
    max-height: 43px !important;
    flex-basis: 43px !important;
  }

  #dashboardView .home-ai-shell:not(.home-chat-active) #homeChatSendBtn {
    font-size: 17px !important;
  }

  #dashboardView .home-ai-shell:not(.home-chat-active) .home-model-shell {
    border-radius: 11px !important;
  }

  #dashboardView .home-ai-shell:not(.home-chat-active) .home-model-shell select {
    max-width: 240px !important;
    min-height: 36px !important;
    padding: 7px 32px 7px 16px !important;
    font-size: 16.5px !important;
  }
}
