
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");
.admin-shell h1,
.admin-shell h2,
.admin-shell h3,
.admin-shell th,
.admin-shell a {
  text-decoration: none;
}

/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
* vendor/assets/stylesheets directory can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
* compiled file so the styles you add here take precedence over styles defined in any other CSS
* files in this directory. Styles in this file should be added after the last require_* statement.
* It is generally better to create a new file per style scope.
*
*= require_tree .
*= require_self
*/
:root {
  --font-family-sans-serif: 'Inter', system-ui, -apple-system, sans-serif;
  --bs-body-font-family: var(--font-family-sans-serif);
  /* Attio-inspired Palette */
  --app-bg: #f5f7fa;
  --sidebar-bg: #ffffff;
  --sidebar-border: #e2e8f0;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --primary-color: var(--tw-color-brand-600);
  --primary-hover: var(--tw-color-brand-700);
  --border-color: #e2e8f0;
  --card-bg: #ffffff;
  --card-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

[data-bs-theme=dark] {
  --app-bg: #0f172a;
  --sidebar-bg: #1e293b;
  --sidebar-border: #334155;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --border-color: #334155;
  --card-bg: #1e293b;
  --card-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.5), 0 1px 2px -1px rgb(0 0 0 / 0.5);
}

body {
  background-color: var(--sidebar-bg);
  color: var(--text-primary);
  font-family: var(--font-family-sans-serif);
  -webkit-font-smoothing: antialiased;
}

.profile-photo-picker {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.profile-photo-picker__field {
  width: min(100%, 28rem);
}

.profile-photo-input {
  width: 100%;
  padding: 0.25rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--card-bg);
  color: var(--text-primary);
  font-size: 0.875rem;
}

.profile-photo-input::file-selector-button {
  margin-right: 0.75rem;
  padding: 0.5rem 0.75rem;
  border: 0;
  border-radius: 4px;
  background: var(--app-bg);
  color: var(--text-primary);
  font-weight: 600;
  cursor: pointer;
}

.profile-photo-input:hover::file-selector-button {
  color: var(--primary-color);
}

.profile-photo-input:focus-visible {
  border-color: var(--primary-color);
  outline: 3px solid color-mix(in srgb, var(--primary-color) 18%, transparent);
  outline-offset: 1px;
}

@media (max-width: 575px) {
  .profile-photo-picker {
    align-items: flex-start;
    flex-direction: column;
  }
}
.text-reset {
  color: inherit;
  text-decoration: none;
}

.link-plain {
  color: inherit;
  text-decoration: none;
}
.link-plain:hover {
  text-decoration: underline;
}

.link-muted {
  color: var(--text-secondary);
  text-decoration: none;
}
.link-muted:hover {
  color: var(--primary-color);
}

.app-logo {
  color: var(--primary-color);
}

.event-card {
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
  border-radius: 12px;
  overflow: hidden;
  background: white;
}

.event-sidebar {
  background-color: #fafafa;
  border-left: 1px solid #f0f0f0;
  height: 100%;
  min-height: 500px;
}

@media (max-width: 767px) {
  .event-sidebar {
    border-left: none;
    border-top: 1px solid #f0f0f0;
    min-height: auto;
  }
}
.avatar-circle {
  width: 36px;
  height: 36px;
  background-color: #e9ecef;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: #495057;
  font-size: 14px;
  flex-shrink: 0;
  overflow: hidden;
}
.avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.status-indicator {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid white;
  position: absolute;
  bottom: -4px;
  right: -4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
  overflow: hidden;
}
.status-indicator.status-accepted {
  background-color: #198754;
}
.status-indicator.status-tentative {
  background-color: #ffc107;
}
.status-indicator.status-declined {
  background-color: #dc3545;
}

.icon-box {
  width: 24px;
  display: flex;
  justify-content: center;
  color: #6c757d;
}

.border-dashed {
  border-style: dashed !important;
}

.hover-bg-light:hover {
  background-color: rgba(0, 0, 0, 0.03);
}

/* Layout */
.app-container {
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100vw;
}

.sidebar {
  width: 260px;
  background-color: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1rem;
  position: fixed;
  height: 100vh;
  z-index: 1000;
  transition: transform 0.3s ease;
}
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
}

.main-content {
  flex: 1;
  margin-left: 260px;
  padding: 2rem;
  max-width: 1200px;
}
.main-content.note-page {
  background: #fff;
  padding: 0;
  max-width: none;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.main-content.note-page > .alert {
  margin: 1rem 2rem 0;
}
.main-content.note-page .note-doc-layout {
  flex: 1;
}
.main-content.note-page .note-doc {
  padding-top: 2.5rem;
}
.main-content.note-page.note-edit-page {
  height: 100vh;
  overflow: hidden;
}
.main-content.note-page.note-edit-page .note-doc--edit {
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
@media (max-width: 768px) {
  .main-content {
    margin-left: 0;
    padding: 1rem;
    width: 100%;
    overflow-x: hidden;
  }
  .main-content.note-page {
    padding: 76px 0 0;
  }
  .main-content.note-page .note-doc {
    padding-top: 1.5rem;
  }
}

.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 999;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 0.375rem;
  padding: 0.5rem;
  width: 40px;
  height: 40px;
  cursor: pointer;
}
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* Sidebar Components */
.brand {
  margin-bottom: 2rem;
  padding: 0 0.75rem;
}
.brand a {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.nav-links a {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  color: var(--text-secondary);
  font-weight: 500;
  transition: all 0.2s;
}
.nav-links a:hover {
  background-color: var(--app-bg);
  color: var(--text-primary);
  text-decoration: none;
}
.nav-links a.active {
  background-color: #eff6ff;
  color: var(--primary-color);
}

.user-profile {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.user-profile .profile-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: background-color 0.2s ease;
}
.user-profile .profile-link:hover {
  background-color: #f0f4f8;
  text-decoration: none;
}
.user-profile .profile-link .avatar {
  width: 32px;
  height: 32px;
  background-color: #e0e7ff;
  color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
}
.user-profile .profile-link .info {
  display: flex;
  flex-direction: column;
}
.user-profile .profile-link .info .name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}
.user-profile .logout {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Components */
.card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  box-shadow: var(--card-shadow);
  margin-bottom: 1.5rem;
}
.card .card-header {
  background: transparent;
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
}
.card .card-body {
  padding: 1.5rem;
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
}
.btn-primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
}

.form-control {
  border-color: var(--border-color);
  padding: 0.6rem 1rem;
  border-radius: 0.375rem;
}
.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
}

.list-group-item {
  border-color: transparent !important;
}
.list-group-item:focus, .list-group-item:focus-within, .list-group-item:focus-visible {
  outline: none !important;
  box-shadow: none !important;
  border-color: transparent !important;
  z-index: auto !important;
}
.list-group-item form {
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
}
.list-group-item form:focus, .list-group-item form:focus-within, .list-group-item form:focus-visible {
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
}
.list-group-item input[type=checkbox]:focus,
.list-group-item input[type=radio]:focus {
  outline: 2px solid var(--primary-color) !important;
  outline-offset: 2px;
}

.list-group .list-group-item:focus {
  box-shadow: none !important;
  outline: none !important;
  border-color: transparent !important;
}

/* Timeline */
.timeline {
  margin-left: 0;
  padding-left: 1rem;
  border-left: 2px solid var(--border-color);
  list-style: none;
}

.timeline-item-icon {
  position: absolute;
  left: -1.75rem;
  top: 0;
  width: 1.375rem;
  height: 1.375rem;
  background: var(--app-bg);
  border: 1.5px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Link that shows underline only on hover */
.link-hover-underline {
  text-decoration: none;
}
.link-hover-underline:hover {
  text-decoration: underline;
}

.timeline-item {
  position: relative;
  padding-left: 0.5rem;
  margin-bottom: 1rem;
}
.timeline-item:before {
  display: none;
}
.timeline-item h6 {
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
  color: var(--text-secondary);
}
.timeline-item .content {
  color: var(--text-primary);
  font-size: 0.95rem;
  line-height: 1.6;
}
.timeline-item .content p {
  margin-bottom: 0.75rem;
}
.timeline-item .content p:last-child {
  margin-bottom: 0;
}
.timeline-item .content h1,
.timeline-item .content h2,
.timeline-item .content h3,
.timeline-item .content h4,
.timeline-item .content h5,
.timeline-item .content h6 {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}
.timeline-item .content h1 {
  font-size: 1.5rem;
}
.timeline-item .content h2 {
  font-size: 1.25rem;
}
.timeline-item .content h3 {
  font-size: 1.1rem;
}
.timeline-item .content h4 {
  font-size: 1rem;
}
.timeline-item .content ul,
.timeline-item .content ol {
  margin-bottom: 0.75rem;
  padding-left: 1.5rem;
}
.timeline-item .content ul li,
.timeline-item .content ol li {
  margin-bottom: 0.25rem;
}
.timeline-item .content blockquote {
  border-left: 3px solid var(--border-color);
  padding-left: 1rem;
  margin: 0.75rem 0;
  color: var(--text-secondary);
  font-style: italic;
}
.timeline-item .content code {
  background: var(--app-bg);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
  font-family: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace;
}
.timeline-item .content pre {
  background: var(--app-bg);
  padding: 0.75rem;
  border-radius: 0.375rem;
  overflow-x: auto;
  margin-bottom: 0.75rem;
}
.timeline-item .content pre code {
  background: transparent;
  padding: 0;
}
.timeline-item .content a:not(.link-plain):not(.link-muted):not(.item-note-badge):not(.note-delete-btn) {
  color: var(--primary-color);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.timeline-item .content a:not(.link-plain):not(.link-muted):not(.item-note-badge):not(.note-delete-btn):hover {
  color: var(--primary-hover);
}
.timeline-item .content strong {
  font-weight: 600;
}
.timeline-item .content em {
  font-style: italic;
}
.timeline-item .note-delete-btn {
  opacity: 0;
  transition: opacity 0.2s ease;
  font-size: 0.875rem;
  padding: 0.25rem;
}
.timeline-item .note-delete-btn:hover {
  opacity: 1 !important;
  color: #dc2626 !important;
}
.timeline-item:hover .note-delete-btn {
  opacity: 0.5;
}

/* Notes List (without timeline dots) */
.notes-list {
  margin-left: 0;
  padding-left: 0;
  list-style: none;
}
.notes-list .timeline-item {
  position: relative;
  padding-left: 0;
  margin-bottom: 2rem;
}
.notes-list .timeline-item:before {
  display: none;
}
.notes-list .timeline-item .content {
  color: var(--text-primary);
  font-size: 0.95rem;
  line-height: 1.6;
}
.notes-list .timeline-item .content p {
  margin-bottom: 0.75rem;
}
.notes-list .timeline-item .content p:last-child {
  margin-bottom: 0;
}
.notes-list .timeline-item .content h1,
.notes-list .timeline-item .content h2,
.notes-list .timeline-item .content h3,
.notes-list .timeline-item .content h4,
.notes-list .timeline-item .content h5,
.notes-list .timeline-item .content h6 {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}
.notes-list .timeline-item .content h1 {
  font-size: 1.5rem;
}
.notes-list .timeline-item .content h2 {
  font-size: 1.25rem;
}
.notes-list .timeline-item .content h3 {
  font-size: 1.1rem;
}
.notes-list .timeline-item .content h4 {
  font-size: 1rem;
}
.notes-list .timeline-item .content ul,
.notes-list .timeline-item .content ol {
  margin-bottom: 0.75rem;
  padding-left: 1.5rem;
}
.notes-list .timeline-item .content ul li,
.notes-list .timeline-item .content ol li {
  margin-bottom: 0.25rem;
}
.notes-list .timeline-item .content blockquote {
  border-left: 3px solid var(--border-color);
  padding-left: 1rem;
  margin: 0.75rem 0;
  color: var(--text-secondary);
  font-style: italic;
}
.notes-list .timeline-item .content code {
  background: var(--app-bg);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
  font-family: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace;
}
.notes-list .timeline-item .content pre {
  background: var(--app-bg);
  padding: 0.75rem;
  border-radius: 0.375rem;
  overflow-x: auto;
  margin-bottom: 0.75rem;
}
.notes-list .timeline-item .content pre code {
  background: transparent;
  padding: 0;
}
.notes-list .timeline-item .content a {
  color: var(--primary-color);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.notes-list .timeline-item .content a:hover {
  color: var(--primary-hover);
}
.notes-list .timeline-item .content strong {
  font-weight: 600;
}
.notes-list .timeline-item .content em {
  font-style: italic;
}

/* Note item hover effects */
.note-item {
  transition: background-color 0.2s ease;
}
.note-item:hover {
  background-color: rgba(0, 0, 0, 0.01);
}
.note-item .note-timestamp-link:hover {
  text-decoration: underline !important;
}
.note-item .note-delete-btn {
  opacity: 0;
  transition: opacity 0.2s ease;
  font-size: 0.875rem;
  padding: 0.25rem;
}
.note-item .note-delete-btn:hover {
  opacity: 1 !important;
  color: #dc2626 !important;
}
.note-item:hover .note-delete-btn {
  opacity: 0.5;
}

/* Reminder Items */
.reminder-clean-item {
  background-color: transparent !important;
  background: transparent !important;
  border-bottom: none !important;
  border-top: none !important;
  padding-block: 6px !important;
  transition: all 0.2s ease;
}
.reminder-clean-item:hover {
  background-color: var(--bg-secondary) !important;
  background: var(--bg-secondary) !important;
}
.reminder-clean-item:hover .trash-reveal-btn {
  opacity: 0.5 !important;
}

li.reminder-clean-item + li.reminder-clean-item {
  border-top: 1px solid rgba(0, 0, 0, 0.07) !important;
}

/* Reminder right-aligned due date */
.reminder-due-date {
  font-size: 0.8rem;
  color: var(--text-secondary);
  white-space: nowrap;
  padding-top: 2px;
}

.reminder-due-date--overdue {
  color: #dc2626;
  font-weight: 500;
}

.task-index-title-line {
  display: flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
}

.task-index-title {
  min-width: 0;
  overflow: hidden;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-index-title:hover {
  color: var(--primary-color);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.task-index-title-line.is-resolved .task-index-title {
  color: var(--text-muted);
  text-decoration-line: line-through;
}

.task-index-secondary {
  display: flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  margin-top: 2px;
}

.task-index-secondary-link {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 4px;
  padding: 0 5px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
}

.task-index-secondary-link:first-child {
  margin-left: -5px;
}

.task-index-secondary-link:hover {
  background: var(--bg-secondary);
  color: var(--primary-color);
  text-decoration: none;
}

.task-index-secondary-separator {
  color: var(--border-color);
}

.task-index-secondary-label-mobile {
  display: none;
}

.task-index-mobile-due-date, .task-index-mobile-due-separator {
  display: none;
}

.task-index-secondary--date-only {
  display: none;
}

.task-index-edit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s;
}
.task-index-edit-btn:hover {
  background: var(--border-color);
  color: var(--text-primary);
}

.tw-list-group-item:hover .task-index-edit-btn,
.reminder-clean-item:hover .task-index-edit-btn {
  opacity: 1;
}

.task-index-progress-track {
  width: 52px;
  height: 3px;
  overflow: hidden;
  flex: none;
  border-radius: 2px;
  background: var(--border-color);
}

.task-index-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: #059669;
}

.task-index-progress-ready {
  color: #047857;
}

.reminder-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.reminder-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-secondary);
  white-space: nowrap;
}

.reminder-section-rule {
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.reminder-section-count {
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-secondary, #f1f5f9);
  color: var(--text-muted, #94a3b8);
  border-radius: 9999px;
  padding: 1px 8px;
  line-height: 18px;
  flex-shrink: 0;
}

[data-bs-theme=dark] .reminder-section-count {
  background: #1e293b;
  color: #64748b;
}
[data-bs-theme=dark] .reminder-clean-item::before {
  background: rgba(255, 255, 255, 0.07);
}
[data-bs-theme=dark] li.reminder-clean-item + li.reminder-clean-item {
  border-top-color: rgba(255, 255, 255, 0.08) !important;
}
[data-bs-theme=dark] .task-index-progress-fill {
  background: #34d399;
}
[data-bs-theme=dark] .task-index-progress-ready {
  color: #6ee7b7;
}

@media (max-width: 768px) {
  .app-container:has(.tasks-index-page) {
    overflow-x: clip;
  }
  .main-content.tasks-index-page {
    padding-top: 72px;
    overflow-x: clip;
  }
  .tasks-index-header {
    margin-bottom: 10px !important;
  }
  .tasks-index-tabs-wrap {
    position: sticky;
    z-index: 30;
    top: 60px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
  }
  .tasks-index-tabs {
    gap: 20px;
    overflow: visible;
  }
  .tasks-index-tabs .filter-tab {
    padding: 9px 2px 10px;
    border-bottom-width: 2px;
  }
  .tasks-index-content {
    padding-top: 20px !important;
  }
  .reminder-group {
    margin-bottom: 1rem !important;
  }
  .reminder-clean-item {
    gap: 12px;
    padding-block: 10px !important;
  }
  .task-index-primary {
    gap: 12px;
  }
  .task-index-title-line {
    width: 100%;
  }
  .task-index-title {
    display: -webkit-box;
    width: 100%;
    overflow: hidden;
    margin-block: -2px;
    padding-block: 2px;
    line-height: 1.35;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  .task-index-trailing {
    display: none !important;
  }
  .task-index-edit-btn {
    display: none !important;
  }
  .task-index-secondary--date-only {
    display: flex;
    margin-top: 3px;
  }
  .task-index-secondary {
    gap: 4px;
    margin-top: 0;
  }
  .task-index-secondary-link {
    min-height: 20px;
    gap: 4px;
    padding-inline: 3px;
  }
  .task-index-secondary-link:first-child {
    margin-left: -3px;
  }
  .task-index-progress-track {
    width: 32px;
    height: 4px;
  }
  .task-index-secondary-link svg {
    width: 14px;
    height: 14px;
  }
  .task-index-secondary-label-desktop, .task-index-secondary-separator {
    display: none;
  }
  .task-index-secondary-label-mobile {
    display: inline;
  }
  .task-index-mobile-due-date {
    display: inline;
    padding: 0 3px 0 0;
    font-size: 11px;
    font-weight: 500;
  }
  .task-index-mobile-due-separator {
    display: inline;
    color: var(--border-color);
  }
}
.reminder-due-date--none {
  color: #cbd5e1;
  font-style: italic;
}

.timeline-row {
  position: relative;
}
.timeline-row:last-child {
  margin-bottom: 0 !important;
}

.timeline-time {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* Task detail workspace */
.main-content.task-detail-page {
  max-width: none;
  padding: 0;
}

.task-detail-shell {
  width: min(960px, 100% - 64px);
  margin: 0 auto;
  padding: 30px 0 72px;
}

.task-detail-shell .app-breadcrumb .task-detail-breadcrumb {
  margin-bottom: 29px;
}

.task-detail-breadcrumb .breadcrumb-item.active {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-detail-layout {
  display: block;
}

.task-detail-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.task-detail-title-wrap {
  min-width: 0;
  flex: 1;
}

.task-detail-title-wrap h1 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.task-detail-description {
  margin: 15px 0 0;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.68;
}

.task-detail-header-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px 20px;
  margin-top: 14px;
}

.task-detail-header-due, .task-detail-header-person {
  display: grid;
  grid-template-columns: 18px minmax(0, auto);
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 22px;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
}

.task-detail-header-due > svg {
  justify-self: center;
}

.task-detail-header-due.is-overdue {
  color: #dc2626;
}

.task-detail-header-person {
  color: var(--primary-color);
  text-decoration: none;
}

.task-detail-header-people {
  min-width: 0;
  display: grid;
  grid-template-columns: 18px minmax(0, auto);
  align-items: center;
  gap: 8px;
}

.task-detail-header-people-icon {
  justify-self: center;
  color: var(--text-muted);
}

.task-detail-header-people-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 14px;
}

.task-detail-person-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600 !important;
}

.task-detail-person-avatar {
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--border-color);
}

.task-detail-desktop-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: none;
  margin-left: auto;
}

.task-detail-desktop-actions form {
  margin: 0;
}

.task-detail-desktop-actions .tw-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  white-space: nowrap;
}

.task-detail-delete-button {
  width: 34px;
  justify-content: center;
  padding-inline: 0 !important;
  border-color: rgba(220, 38, 38, 0.35) !important;
  color: #dc2626 !important;
}

.task-detail-delete-button:hover {
  background: rgba(220, 38, 38, 0.08) !important;
  border-color: #dc2626 !important;
}

.task-detail-title-actions {
  display: none;
  flex: none;
  margin-left: auto;
}

.task-detail-title-actions-button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0;
  background: var(--card-bg);
  color: var(--text-secondary);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  line-height: 1;
}

.task-detail-title-actions-button:hover, .task-detail-title-actions-button[aria-expanded=true] {
  border-color: color-mix(in srgb, var(--primary-color) 45%, var(--border-color));
  background: var(--bg-secondary);
  color: var(--primary-color);
}

.task-detail-title-actions .dropdown-menu {
  min-width: 164px;
}

.task-detail-title-actions .dropdown-item {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.8rem;
}

.task-detail-mobile-delete {
  color: #dc2626;
}

.task-detail-eyebrow {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.task-steps-section {
  margin: 32px 0 0;
}

.task-steps-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 11px;
  margin-bottom: 9px;
}

.task-steps-progress {
  height: 3px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--border-color);
}

.task-steps-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: #047857;
}

.task-steps-count {
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.task-steps-list {
  margin-top: 10px;
  border-top: 1px solid var(--border-color);
}

.task-step-row {
  min-height: 43px;
  display: grid;
  grid-template-columns: 18px 18px minmax(0, 1fr) auto 28px;
  gap: 9px;
  align-items: center;
  border-bottom: 1px solid color-mix(in srgb, var(--border-color) 72%, transparent);
  transition: background-color 120ms ease, opacity 120ms ease;
}
.task-step-row.is-complete .task-step-title-button {
  color: var(--text-muted);
  text-decoration: line-through;
}
.task-step-row.is-complete .task-step-checkbox {
  border-color: #047857;
  background: #047857;
  color: #fff;
}
.task-step-row:hover .task-step-delete, .task-step-row:hover .task-step-drag-handle {
  opacity: 1;
}
.task-step-row.is-dragging {
  opacity: 0.45;
  background: var(--bg-secondary);
}

.task-step-toggle, .task-step-toggle div {
  display: contents;
}

.task-step-drag-handle {
  width: 18px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 4px;
  padding: 0;
  background: transparent;
  color: var(--text-muted);
  cursor: grab;
  opacity: 0.38;
  transition: opacity 120ms ease, color 120ms ease, background-color 120ms ease;
}

.task-step-drag-handle:hover, .task-step-drag-handle:focus-visible {
  opacity: 1;
  color: var(--text-secondary);
  background: var(--bg-secondary);
}

.task-step-drag-handle:active {
  cursor: grabbing;
}

.task-step-checkbox {
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--border-color);
  border-radius: 4px;
  padding: 0;
  background: var(--card-bg);
  color: transparent;
  cursor: pointer;
}

.task-step-checkbox:hover {
  border-color: var(--primary-color);
}

.task-step-title-wrap {
  min-width: 0;
  line-height: 1.4;
}

.task-step-title {
  min-width: 0;
  line-height: inherit;
}

.task-step-title-button {
  max-width: 100%;
  overflow: hidden;
  border: 0;
  border-radius: 4px;
  padding: 3px 4px;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: inherit;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: text;
}

.task-step-title-button:hover {
  background: var(--bg-secondary);
}

.task-step-title-button:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 1px;
}

.task-step-editor {
  width: 100%;
}

.task-step-edit-form {
  width: 100%;
  margin: 0;
}

.task-step-edit-input {
  width: 100%;
  height: 32px;
  border: 1px solid var(--primary-color) !important;
  border-radius: 5px !important;
  outline: 0;
  padding: 4px 7px !important;
  background: var(--card-bg) !important;
  color: var(--text-primary);
  font: inherit;
  line-height: 1.4;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1) !important;
}

.task-step-delete-form {
  grid-column: -2/-1;
  justify-self: end;
  width: 28px;
  margin: 0;
}

.task-step-delete {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 5px;
  padding: 0;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  opacity: 0;
}

.task-step-delete:hover {
  background: var(--bg-secondary);
  color: #dc2626;
}

.task-step-mobile-moves {
  display: none;
  align-items: center;
}

.task-step-mobile-actions {
  display: none;
}

.task-step-move {
  width: 26px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 4px;
  padding: 0;
  background: transparent;
  color: var(--text-muted);
}

.task-step-move:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.task-step-add-form {
  min-height: 43px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid transparent;
}
.task-step-add-form:focus-within {
  border-bottom-color: var(--primary-color);
}

.task-step-add-icon {
  display: grid;
  place-items: center;
  color: var(--text-muted);
}

.task-step-add-form input[type=text], .task-first-step-form input[type=text] {
  min-width: 0;
  height: 40px;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  padding: 7px 0 !important;
  background: transparent !important;
  color: var(--text-primary);
  box-shadow: none !important;
}

.task-step-add-form input::placeholder, .task-first-step-form input::placeholder {
  color: var(--text-muted);
}

.task-step-error, .task-comment-error {
  grid-column: 2;
  color: #dc2626;
  font-size: 0.75rem;
}

.task-steps-disclosure {
  margin: 15px 0 0;
}

.task-steps-disclosure summary {
  width: fit-content;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 5px 12px 5px 7px;
  background: var(--card-bg);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  list-style: none;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.task-steps-disclosure summary::-webkit-details-marker {
  display: none;
}

.task-steps-disclosure summary:hover, .task-steps-disclosure[open] summary {
  border-color: rgba(79, 70, 229, 0.45);
  background: rgba(79, 70, 229, 0.06);
  color: var(--primary-color);
}

.task-steps-disclosure summary:focus-visible {
  outline: 0;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.task-steps-disclosure-icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 5px;
  background: rgba(79, 70, 229, 0.1);
  color: var(--primary-color);
}

.task-first-step-form {
  margin: 8px 0 0;
  border-bottom-color: var(--border-color);
}

.task-detail-divider {
  height: 1px;
  margin: 38px 0 29px;
  background: var(--border-color);
}

.task-comment-composer {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 21px 0 34px;
}

.task-comment-avatar {
  width: 32px;
  height: 32px;
  display: block;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
}

.task-comment-box {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--card-bg);
}

.task-comment-box:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.task-comment-box textarea {
  width: 100%;
  min-height: 78px;
  display: block;
  resize: vertical;
  border: 0;
  outline: 0;
  padding: 13px 14px;
  background: transparent;
  color: var(--text-primary);
}

.task-comment-actions {
  min-height: 45px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 7px 8px 7px 12px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.task-comment-hint {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.task-activity-feed {
  position: relative;
}

.task-activity-feed::before {
  content: "";
  position: absolute;
  top: 16px;
  bottom: 16px;
  left: 15px;
  width: 1px;
  background: var(--border-color);
}

.task-activity-item {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 13px;
  margin-bottom: 25px;
}

.task-activity-item:last-child {
  margin-bottom: 0;
}

.task-activity-item > :first-child {
  z-index: 1;
  box-shadow: 0 0 0 4px var(--app-bg);
}

.task-activity-copy {
  min-width: 0;
  padding-top: 1px;
  line-height: 1.55;
}

.task-comment-meta {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.task-comment-meta time, .task-activity-system time {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.task-comment-body {
  margin-top: 6px;
}

.task-comment-body p {
  margin: 0;
}

.task-comment-body p + p {
  margin-top: 0.75em;
}

.task-comment-delete {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  margin-left: auto;
  border: 0;
  border-radius: 4px;
  padding: 0;
  background: transparent;
  color: var(--text-muted);
  opacity: 0;
}

.task-activity-item:hover .task-comment-delete {
  opacity: 1;
}

.task-comment-delete:hover {
  color: #dc2626;
  background: var(--bg-secondary);
}

.task-activity-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--bg-secondary);
  color: var(--text-muted);
}

.task-activity-system .task-activity-copy {
  padding-top: 6px;
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.task-detail-footer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 46px;
  padding-top: 17px;
  border-top: 1px solid var(--border-color);
}

.task-detail-footer-item {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.task-detail-footer-icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  background: var(--bg-secondary);
  color: var(--text-muted);
}

.task-detail-footer-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.task-detail-footer-label {
  color: var(--text-secondary);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
  opacity: 0.78;
  text-transform: uppercase;
}

.task-detail-footer time {
  overflow: hidden;
  color: var(--text-primary);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-edit-dialog {
  width: min(500px, 100% - 28px);
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: var(--card-bg);
  color: var(--text-primary);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.2);
}

.task-edit-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-color);
}

.task-edit-dialog-header h2 {
  margin: 0;
  font-size: 1rem;
}

.task-edit-dialog-body {
  padding: 20px;
}

.task-edit-dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

[data-bs-theme=dark] .task-step-checkbox, [data-bs-theme=dark] .task-comment-box, [data-bs-theme=dark] .task-edit-dialog {
  background: #1e293b;
}
[data-bs-theme=dark] .task-comment-box textarea {
  color: #f8fafc !important;
}
[data-bs-theme=dark] .task-comment-box textarea::placeholder {
  color: #94a3b8;
}
[data-bs-theme=dark] .task-step-row.is-complete .task-step-checkbox {
  background: #059669;
  border-color: #059669;
}
[data-bs-theme=dark] .task-steps-progress-fill {
  background: #34d399;
}
[data-bs-theme=dark] .task-detail-header-due.is-overdue, [data-bs-theme=dark] .task-step-error, [data-bs-theme=dark] .task-comment-error {
  color: #f87171;
}
[data-bs-theme=dark] .task-detail-delete-button {
  border-color: rgba(248, 113, 113, 0.45) !important;
  color: #f87171 !important;
}

@media (min-width: 769px) and (max-width: 1100px) {
  .task-detail-desktop-actions {
    display: none;
  }
  .task-detail-title-actions {
    display: block;
  }
}
@media (max-width: 768px) {
  .main-content.task-detail-page {
    padding-top: 60px;
  }
  .task-detail-shell {
    width: 100%;
    padding: 19px 17px 88px;
  }
  .task-detail-shell .app-breadcrumb .task-detail-breadcrumb {
    margin-bottom: 22px;
    flex-wrap: nowrap;
  }
  .task-detail-layout {
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .task-detail-main {
    display: contents;
  }
  .task-detail-header {
    order: 1;
    gap: 10px;
  }
  .task-detail-title-wrap h1 {
    font-size: 1.45rem;
  }
  .task-detail-description {
    margin-top: 12px;
    font-size: 0.94rem;
  }
  .task-detail-header-meta {
    margin-top: 11px;
  }
  .task-detail-desktop-actions {
    display: none;
  }
  .task-detail-title-actions {
    display: block;
  }
  .task-detail-title-actions-button {
    width: 34px;
    height: 34px;
  }
  .task-step-mobile-actions-button {
    width: 30px;
    height: 30px;
  }
  .task-step-mobile-actions .dropdown-menu {
    min-width: 156px;
  }
  .task-step-mobile-actions .dropdown-item {
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 0.8rem;
  }
  .task-step-mobile-delete {
    color: #dc2626;
  }
  #task-steps-region {
    display: contents;
  }
  .task-steps-section {
    order: 2;
    width: 100%;
    margin: 25px 0 0;
  }
  .task-steps-disclosure {
    order: 2;
    width: 100%;
    margin: 15px 0 0;
  }
  .task-step-row {
    min-height: 48px;
    grid-template-columns: 18px minmax(0, 1fr) 30px;
    gap: 10px;
  }
  .task-step-drag-handle {
    display: none;
  }
  .task-step-mobile-moves, .task-step-delete-form {
    display: none;
  }
  .task-step-mobile-actions {
    display: block;
  }
  .task-comment-delete {
    opacity: 1;
  }
  .task-activity-section {
    order: 3;
    width: 100%;
  }
  .task-detail-divider {
    margin: 29px 0 23px;
  }
  .task-comment-composer > .task-comment-avatar, .task-comment-hint {
    display: none;
  }
  .task-comment-composer {
    margin: 17px 0 30px;
  }
  .task-comment-box textarea {
    min-height: 64px;
    height: 64px;
    padding: 11px 12px;
  }
  .task-comment-actions {
    min-height: 40px;
    justify-content: flex-end;
    padding: 5px 7px;
  }
  .task-detail-footer {
    order: 4;
    gap: 14px;
    margin-top: 38px;
    padding-top: 15px;
  }
  .task-detail-footer-item {
    gap: 7px;
  }
  .task-detail-footer-icon {
    width: 24px;
    height: 24px;
  }
}
/* Contacts List */
.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.contact-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}
.contact-list li:first-child {
  padding-top: 0;
}
.contact-list li:last-child {
  border-bottom: none;
}

.contact-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.contact-item .details {
  display: flex;
  flex-direction: column;
}
.contact-item .details .name {
  font-weight: 500;
  color: var(--text-primary);
}
.contact-item .details .meta {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Contact Email Display */
.contact-email-item {
  word-break: break-word;
  overflow-wrap: break-word;
  min-width: 0;
  /* Allow flex item to shrink below content size */
}
.contact-email-item .suppress-btn {
  opacity: 0;
  transition: opacity 0.15s ease-in-out;
}
.contact-email-item:hover .suppress-btn {
  opacity: 1;
}

/* Utilities */
.w-5 {
  width: 1.25rem;
}

.h-5 {
  height: 1.25rem;
}

.w-4 {
  width: 1rem;
}

.h-4 {
  height: 1rem;
}

.w-3 {
  width: 0.75rem;
}

.h-3 {
  height: 0.75rem;
}

.w-8 {
  width: 2rem;
}

.h-8 {
  height: 2rem;
}

.w-12 {
  width: 3rem;
}

.h-12 {
  height: 3rem;
}

.me-2 {
  margin-right: 0.5rem;
}

.me-1 {
  margin-right: 0.25rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .row {
    margin: 0;
  }
  .col-md-8,
  .col-md-4 {
    max-width: 100%;
    padding: 0;
  }
  .card {
    margin-bottom: 1rem;
  }
  .main-content {
    padding-top: 4rem;
  }
  h1,
  .h1 {
    font-size: 1.5rem;
  }
  h2,
  .h2 {
    font-size: 1.25rem;
  }
}
dialog::backdrop {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
}

.note-editor-dialog {
  width: calc(100% - 2rem);
  max-width: 800px;
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 0;
  border-radius: 0.5rem;
  overflow: auto;
  box-shadow: 0 20px 50px -12px rgba(15, 23, 42, 0.35);
}

.contact-note-editor-dialog__surface {
  display: flex;
  flex-direction: column;
}

.contact-note-editor-dialog__body,
.contact-note-editor-form,
.contact-note-editor-form__field {
  display: flex;
  flex-direction: column;
}

.note-editor-textarea {
  resize: vertical;
}

.note-editor-textarea--create {
  min-height: 180px;
}

.note-editor-textarea--edit {
  min-height: 340px;
}

@media (max-width: 767.98px) {
  .note-editor-dialog {
    width: calc(100% - 1rem);
    max-height: calc(100dvh - 1rem);
  }
  .contact-note-editor-dialog__body {
    padding: 1rem;
  }
  .note-editor-textarea--edit {
    min-height: 300px;
  }
}
/* Manual dialog backdrop for browser extension compatibility (e.g., Grammarly) */
.dialog-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  z-index: 9998;
}
.dialog-backdrop.active {
  display: block;
}

/* Dialog using show() instead of showModal() for browser extension compatibility */
dialog[open]:not(:modal) {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  margin: 0;
}

dialog[open] {
  z-index: 9999;
  /* Ensure centering works even when Preflight or custom styles override the
     browser's UA centering for showModal(). The UA stylesheet sets margin: auto
     and a centered inset, but explicit 'margin: 0' from any rule kills that. */
  margin: auto;
}

/* Segmented Control */
.segmented-control {
  display: inline-flex;
  background: #f1f3f5;
  border-radius: 0.5rem;
  padding: 0.25rem;
  gap: 0.125rem;
}
@media (max-width: 768px) {
  .segmented-control {
    width: 100%;
    display: flex;
    padding: 0.125rem;
  }
}
.segmented-control .segment {
  padding: 0.5rem 1rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}
@media (max-width: 768px) {
  .segmented-control .segment {
    flex: 1;
    text-align: center;
    padding: 0.375rem 0.25rem;
    font-size: 0.75rem;
  }
}
.segmented-control .segment:hover {
  color: var(--text-primary);
  text-decoration: none;
}
.segmented-control .segment.active {
  background: white;
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Quick Actions */
.btn-quick-action {
  background-color: white;
  border: 1px solid #e2e8f0;
  /* Slate-200 */
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-weight: 500;
  color: #475569;
  /* Slate-600 */
  display: flex;
  align-items: center;
  justify-content: flex-start;
  transition: all 0.2s ease;
  width: 100%;
  margin-bottom: 0;
  text-align: left;
}
.btn-quick-action i {
  font-size: 1.1rem;
  margin-right: 0.75rem;
  color: #64748b;
  /* Slate-500 - Darker for better visibility */
  display: inline-block;
  vertical-align: middle;
  transition: color 0.2s ease;
}
.btn-quick-action:hover {
  background-color: #f8fafc;
  /* Slate-50 */
  border-color: #cbd5e1;
  /* Slate-300 */
  color: #1e293b;
  /* Slate-800 */
}
.btn-quick-action:hover i {
  color: #64748b;
}
.btn-quick-action:hover {
  /* Slate-500 */
}
.btn-quick-action:active {
  background-color: #f1f5f9;
  /* Slate-100 */
  transform: translateY(0);
}

/* Settings Page */
.settings-container {
  max-width: 720px;
}
.settings-container h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--text-primary);
}
.settings-container .settings-section {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 2rem;
  box-shadow: var(--card-shadow);
}
.settings-container .settings-section .form-group {
  margin-bottom: 1.5rem;
}
.settings-container .settings-section .form-group:last-child {
  margin-bottom: 2rem;
}
.settings-container .settings-section .form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  font-size: 0.95rem;
}
.settings-container .settings-section .form-group .form-control {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}
.settings-container .settings-section .form-group .form-control:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}
.settings-container .settings-section .form-group small {
  display: block;
  margin-top: 0.375rem;
  font-size: 0.85rem;
}
.settings-container .form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}
.settings-container .form-actions .btn-primary {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 0.625rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.settings-container .form-actions .btn-primary:hover {
  background-color: var(--primary-hover);
}
.settings-container #error_explanation {
  background-color: #fee2e2;
  border: 1px solid #fca5a5;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
}
.settings-container #error_explanation h2 {
  font-size: 0.95rem;
  color: #991b1b;
  margin-bottom: 0.5rem;
}
.settings-container #error_explanation ul {
  list-style: none;
  padding: 0;
}
.settings-container #error_explanation ul li {
  color: #7f1d1d;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}
.settings-container #error_explanation ul li:before {
  content: "• ";
  margin-right: 0.5rem;
}
.settings-container .btn-group[data-controller=theme] .btn {
  min-width: 90px;
  text-align: center;
  justify-content: center;
}

/* Animations */
.transition-base {
  transition: all 0.2s ease;
}

.hover-scale:hover {
  transform: scale(1.02);
}

/* Mobile Navigation - New Header + Full-width Menu */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: white;
  border-bottom: 1px solid var(--border-color);
  z-index: 1001;
  padding: 0 12px;
  align-items: center;
  justify-content: space-between;
}
@media (max-width: 768px) {
  .mobile-header {
    display: flex;
  }
}

.mobile-hamburger {
  width: 44px;
  height: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.mobile-hamburger .hamburger-line {
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: transform 0.2s ease;
}

.mobile-logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.mobile-logo a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text-primary);
  text-decoration: none;
}
.mobile-logo svg {
  height: 24px;
  width: auto;
}

.mobile-search-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.mobile-search-btn:hover {
  color: var(--text-primary);
}

.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1000;
}
.mobile-menu-overlay.open {
  display: block;
}

.mobile-menu-dropdown {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  background: white;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  z-index: 1002;
  max-height: calc(100vh - 60px);
  overflow-y: auto;
}
.mobile-menu-dropdown.open {
  display: block;
}

.mobile-nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  color: var(--text-secondary);
  font-size: 15px;
  text-decoration: none;
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.15s ease;
}
.mobile-nav-item:hover {
  background: #f8fafc;
  color: var(--text-primary);
  text-decoration: none;
}
.mobile-nav-item.active {
  background: #ede9fe;
  color: var(--primary-color);
  font-weight: 500;
}
.mobile-nav-item svg {
  flex-shrink: 0;
}

.mobile-nav-divider {
  height: 8px;
  background: #f1f5f9;
}

/* Sidebar Search Trigger */
.sidebar-search .search-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-subtle, #f8fafc);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 0.5rem;
  color: #64748b;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.15s ease;
}
.sidebar-search .search-trigger:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}
.sidebar-search .search-trigger svg {
  flex-shrink: 0;
  opacity: 0.6;
}
.sidebar-search .search-trigger .search-trigger-text {
  flex: 1;
  text-align: left;
}
.sidebar-search .search-trigger .search-trigger-shortcut {
  font-size: 0.75rem;
  padding: 0.125rem 0.375rem;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 0.25rem;
  color: #94a3b8;
}

/* Keyboard shortcut hints in dropdown menus */
.shortcut-hint {
  font-size: 0.7rem;
  padding: 0.1rem 0.35rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.25rem;
  color: #94a3b8;
  font-family: system-ui, -apple-system, sans-serif;
  letter-spacing: 0.02em;
}

/* Optional pill badge on form labels */
.form-label-optional {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  background: #f1f5f9;
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
}

/* Search Modal */
.search-modal {
  padding: 0;
  border: none;
  border-radius: 0.75rem;
  width: 90%;
  max-width: 560px;
  max-height: 70vh;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  background: white;
}
.search-modal::backdrop {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}
.search-modal[open] {
  display: flex;
  flex-direction: column;
}

.search-modal-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 70vh;
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.search-input-icon {
  color: #94a3b8;
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
  background: transparent;
  color: var(--text-primary);
}
.search-input::placeholder {
  color: #94a3b8;
}

.search-close-btn {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
}
.search-close-btn:hover {
  color: #64748b;
}

.search-results {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0;
  min-height: 200px;
  max-height: calc(70vh - 120px);
}

.search-section-title {
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}

.search-result {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1rem;
  cursor: pointer;
  transition: background 0.1s ease;
}
.search-result:hover, .search-result.selected {
  background: #f1f5f9;
}

.search-result-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  font-size: 1rem;
  flex-shrink: 0;
}
.search-result-icon.person {
  background: #dbeafe;
}
.search-result-icon.note {
  background: #fef3c7;
}
.search-result-icon.event {
  background: #dcfce7;
}
.search-result-icon.reminder {
  background: #fce7f3;
}
.search-result-icon.group {
  background: #e0e7ff;
}
.search-result-icon.organization {
  background: #eef2ff;
  color: var(--primary-color, #5046e5);
  font-weight: 800;
  font-size: 0.875rem;
}

.search-result-spacer {
  width: 32px;
  flex-shrink: 0;
}

.search-result-type-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
}

.search-result-avatar {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}
.search-result-avatar img {
  width: 32px;
  height: 32px;
  object-fit: cover;
}

.search-result-content {
  flex: 1;
  min-width: 0;
}

.search-result-title {
  font-size: 0.9375rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-result-title mark {
  background: #fef08a;
  color: inherit;
  padding: 0;
}

.search-result-title-suffix {
  margin-left: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 400;
  color: #94a3b8;
}

.search-result-subtitle {
  font-size: 0.8125rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-location {
  display: flex;
  align-items: center;
}

.search-result-formal {
  font-size: 0.8rem;
  font-weight: 400;
  color: #94a3b8;
  margin-left: 3px;
}

.result-formal {
  font-size: 0.8rem;
  font-weight: 400;
  color: #94a3b8;
  margin-left: 3px;
}

.search-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: #64748b;
}

.search-no-results strong {
  display: block;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}
.search-no-results p {
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.search-loading {
  padding: 2rem 1rem;
  text-align: center;
  color: #64748b;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.search-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid #e2e8f0;
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.search-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.search-section-title .search-section-count {
  font-weight: 400;
  color: #94a3b8;
  font-size: 0.6875rem;
}

.search-more-link {
  text-align: center;
  padding: 0.5rem 1rem;
  border-top: 1px solid #f1f5f9;
}
.search-more-link a {
  color: var(--primary-color);
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
}
.search-more-link a:hover {
  text-decoration: underline;
}

.search-see-all {
  text-align: center;
  padding: 0.875rem 1rem;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}
.search-see-all a {
  color: var(--primary-color);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}
.search-see-all a:hover {
  text-decoration: underline;
}

.search-create-person-cta {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0.75rem 1rem;
  border-top: 1px solid #e2e8f0;
}

.search-create-ctas {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.search-clear-recent {
  background: none;
  border: none;
  color: #6366f1;
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0;
}
.search-clear-recent:hover {
  text-decoration: underline;
}

.search-tips {
  text-align: left;
  max-width: 280px;
  margin: 0 auto;
}
.search-tips strong {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}
.search-tips ul {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.875rem;
}
.search-tips ul li {
  margin-bottom: 0.25rem;
}

.search-footer {
  display: flex;
  gap: 1rem;
  padding: 0.625rem 1rem;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: 0.75rem;
  color: #64748b;
}

.search-hint {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.search-hint kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  padding: 0.125rem 0.375rem;
  font-size: 0.6875rem;
  font-family: inherit;
  background: white;
  color: #374151;
  border: 1px solid #e2e8f0;
  border-radius: 0.25rem;
  box-shadow: 0 1px 0 #e2e8f0;
}

@media (max-width: 768px) {
  .search-modal {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    margin: 0;
  }
  .search-modal-content {
    max-height: 100vh;
  }
  .search-results {
    max-height: calc(100vh - 120px);
  }
  .search-footer {
    display: none;
  }
}
/* Legacy - keeping for compatibility, will be removed */
.mobile-top-bar {
  display: none;
}

/* Legacy bottom nav - hidden */
.bottom-nav {
  display: none !important;
}

@media (max-width: 768px) {
  .sidebar {
    display: none !important;
  }
  .mobile-menu-toggle {
    display: none !important;
  }
  .main-content {
    padding-top: 76px;
    /* Space for new mobile header */
    padding-bottom: 20px;
    /* No bottom nav anymore */
    margin-left: 0;
    width: 100%;
  }
}
/* Legal Pages Layout */
.legal-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: #ffffff;
}

.legal-header {
  padding: 2rem 1rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
}
.legal-header .logo-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.25rem;
}
.legal-header .logo-link:hover {
  text-decoration: none;
}
.legal-header .logo-link svg {
  width: 32px;
  height: 32px;
}

.legal-content {
  flex: 1;
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 2rem;
  width: 100%;
}
.legal-content h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}
.legal-content h2 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}
.legal-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}
.legal-content p {
  line-height: 1.6;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}
.legal-content ul {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}
.legal-content ul li {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.legal-content strong {
  color: var(--text-primary);
  font-weight: 600;
}
.legal-content .providers-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background-color: #f9fafb;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  overflow: hidden;
}
.legal-content .providers-table thead {
  background-color: #f3f4f6;
  border-bottom: 2px solid var(--border-color);
}
.legal-content .providers-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
}
.legal-content .providers-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}
.legal-content .providers-table td:first-child {
  font-weight: 500;
  color: var(--text-primary);
}
.legal-content .providers-table tbody tr:last-child td {
  border-bottom: none;
}

.legal-footer {
  padding: 2rem 1rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: #f9fafb;
}
.legal-footer .legal-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s ease;
}
.legal-footer .legal-link:hover {
  color: var(--primary-color);
  text-decoration: underline;
}
.legal-footer .separator {
  color: var(--border-color);
}

@media (max-width: 768px) {
  .legal-header {
    padding: 1.5rem 1rem;
  }
  .legal-content {
    padding: 1.5rem 1rem;
  }
  .legal-content h1 {
    font-size: 1.5rem;
  }
  .legal-content h2 {
    font-size: 1.1rem;
  }
  .legal-footer {
    padding: 1.5rem 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }
}
.form-control,
.form-select,
input[type=text],
input[type=email],
input[type=tel],
input[type=date],
textarea {
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  padding: 0.75rem 0.875rem;
  font-size: 1rem;
  transition: all 0.2s ease;
}
.form-control:focus,
.form-select:focus,
input[type=text]:focus,
input[type=email]:focus,
input[type=tel]:focus,
input[type=date]:focus,
textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
  outline: none;
}
.form-control::placeholder,
.form-select::placeholder,
input[type=text]::placeholder,
input[type=email]::placeholder,
input[type=tel]::placeholder,
input[type=date]::placeholder,
textarea::placeholder {
  color: #9ca3af;
  opacity: 0.7;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  text-transform: none;
}

#new_contact .mb-3,
.form-container .mb-3 {
  margin-bottom: 1rem;
}
#new_contact,
.form-container {
  max-width: 650px;
}

.form-section-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-color);
}

[data-bs-theme=dark] .form-section-label {
  color: #64748b;
  border-bottom-color: #1e293b;
}

/* Note body - markdown rendering matching timeline .content styling */
.note-body {
  color: var(--text-primary);
  font-size: 0.95rem;
  line-height: 1.5;
}
.note-body p {
  margin-bottom: 0.5rem;
}
.note-body p:last-child {
  margin-bottom: 0;
}
.note-body h1,
.note-body h2,
.note-body h3,
.note-body h4,
.note-body h5,
.note-body h6 {
  margin-top: 0.75rem;
  margin-bottom: 0.25rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
  font-size: 0.95rem;
}
.note-body h1:first-child,
.note-body h2:first-child,
.note-body h3:first-child,
.note-body h4:first-child,
.note-body h5:first-child,
.note-body h6:first-child {
  margin-top: 0;
}
.note-body ul,
.note-body ol {
  margin-bottom: 0.5rem;
  padding-left: 1.5rem;
}
.note-body ul li,
.note-body ol li {
  margin-bottom: 0.1rem;
}
.note-body ul:last-child,
.note-body ol:last-child {
  margin-bottom: 0;
}
.note-body ul {
  list-style-type: disc;
}
.note-body ol {
  list-style-type: decimal;
}
.note-body ul ul {
  list-style-type: circle;
}
.note-body blockquote {
  border-left: 3px solid var(--primary-color);
  padding-left: 1rem;
  margin: 0.75rem 0;
  color: var(--text-secondary);
  font-style: italic;
}
.note-body blockquote p {
  margin-bottom: 0;
}
.note-body blockquote:last-child {
  margin-bottom: 0;
}
.note-body code {
  background: var(--app-bg);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
  font-family: "Monaco", "Menlo", monospace;
}
.note-body pre {
  background: var(--app-bg);
  padding: 0.75rem;
  border-radius: 0.375rem;
  overflow-x: auto;
  margin-bottom: 0.75rem;
}
.note-body pre code {
  background: transparent;
  padding: 0;
}
.note-body pre:last-child {
  margin-bottom: 0;
}
.note-body a {
  color: var(--primary-color);
  text-decoration: none;
}
.note-body a:hover {
  text-decoration: underline;
}

/* Note wrapper - remove Bootstrap mt-2 */
.edit-note-trigger.mt-2 {
  margin-top: 0.25rem !important;
}

/* Note formatting styles */
.note-content, .timeline-note-content {
  font-size: 0.95rem !important;
  line-height: 1.5 !important;
  color: var(--text-primary);
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.note-content a, .timeline-note-content a {
  color: var(--primary-color);
  text-decoration: none;
  pointer-events: auto;
  cursor: pointer;
}
.note-content a:hover, .timeline-note-content a:hover {
  text-decoration: underline;
}
.note-content h1, .timeline-note-content h1,
.note-content h2,
.timeline-note-content h2,
.note-content h3,
.timeline-note-content h3,
.note-content h4,
.timeline-note-content h4,
.note-content h5,
.timeline-note-content h5,
.note-content h6,
.timeline-note-content h6 {
  font-weight: 600;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  line-height: 1.3;
  color: var(--text-primary);
}
.note-content h1:first-child, .timeline-note-content h1:first-child,
.note-content h2:first-child,
.timeline-note-content h2:first-child,
.note-content h3:first-child,
.timeline-note-content h3:first-child,
.note-content h4:first-child,
.timeline-note-content h4:first-child,
.note-content h5:first-child,
.timeline-note-content h5:first-child,
.note-content h6:first-child,
.timeline-note-content h6:first-child {
  margin-top: 0;
}
.note-content h1, .timeline-note-content h1 {
  font-size: 1.25rem;
}
.note-content h2, .timeline-note-content h2 {
  font-size: 1.15rem;
}
.note-content h3, .timeline-note-content h3 {
  font-size: 1.05rem;
}
.note-content h4, .timeline-note-content h4 {
  font-size: 1rem;
}

/* Timeline note content - smaller headings to stay below meeting title (1rem) */
.timeline-note-content {
  font-size: 0.875rem !important;
}
.timeline-note-content h1, .timeline-note-content h2, .timeline-note-content h3, .timeline-note-content h4, .timeline-note-content h5, .timeline-note-content h6 {
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  margin-top: 0.5rem !important;
  margin-bottom: 0.25rem !important;
}
.timeline-note-content p {
  margin-bottom: 0.75rem;
}
.timeline-note-content p:last-child {
  margin-bottom: 0;
}
.timeline-note-content ul, .timeline-note-content ol {
  margin-bottom: 0.75rem;
  padding-left: 1.5rem;
}
.timeline-note-content ul li, .timeline-note-content ol li {
  margin-bottom: 0.25rem;
}
.timeline-note-content ul:last-child, .timeline-note-content ol:last-child {
  margin-bottom: 0;
}
.timeline-note-content h5 {
  font-size: 0.96rem;
}
.timeline-note-content h6 {
  font-size: 0.9rem;
}
.timeline-note-content p {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}
.timeline-note-content br {
  display: block;
  content: "";
  margin: 0 !important;
}
.timeline-note-content ul,
.timeline-note-content ol {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-left: 1.5rem;
}
.timeline-note-content ul li,
.timeline-note-content ol li {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}
.timeline-note-content strong,
.timeline-note-content b {
  font-weight: 600;
  color: var(--text-primary);
}
.timeline-note-content em,
.timeline-note-content i {
  font-style: italic;
  color: var(--text-primary);
}
.timeline-note-content u {
  text-decoration: underline;
}
.timeline-note-content code {
  background-color: #f3f4f6;
  color: #d946ef;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
  font-size: 0.875rem;
}
.timeline-note-content pre {
  background-color: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  padding: 1rem;
  overflow-x: auto;
  margin: 0.75rem 0;
}
.timeline-note-content pre code {
  background-color: transparent;
  color: var(--text-primary);
  padding: 0;
  border-radius: 0;
}
.timeline-note-content blockquote {
  border-left: 3px solid var(--primary-color);
  margin: 0.75rem 0;
  padding-left: 1rem;
  color: var(--text-secondary);
  font-style: italic;
}
.timeline-note-content a {
  color: var(--primary-color);
  text-decoration: none;
}
.timeline-note-content a:hover {
  text-decoration: underline;
}
@media (max-width: 768px) {
  .timeline-note-content {
    font-size: 0.9rem;
  }
  .timeline-note-content h1 {
    font-size: 1.25rem;
  }
  .timeline-note-content h2 {
    font-size: 1.125rem;
  }
  .timeline-note-content h3 {
    font-size: 1rem;
  }
  .timeline-note-content h4 {
    font-size: 0.95rem;
  }
  .timeline-note-content h5 {
    font-size: 0.9rem;
  }
  .timeline-note-content h6 {
    font-size: 0.85rem;
  }
}

.note-content-compact {
  font-size: 1rem;
  line-height: 1.5;
}
.note-content-compact h1,
.note-content-compact h2,
.note-content-compact h3,
.note-content-compact h4,
.note-content-compact h5,
.note-content-compact h6 {
  font-size: inherit;
  margin: 0.5rem 0 0.25rem 0;
}
.note-content-compact p {
  margin: 0.25rem 0;
}
.note-content-compact ul,
.note-content-compact ol {
  margin: 0.5rem 0;
  padding-left: 1.25rem;
}
.note-content-compact ul li,
.note-content-compact ol li {
  margin: 0.125rem 0;
}
.note-content-compact pre {
  font-size: 0.875rem;
  padding: 0.5rem;
}

/* Trash Reveal Button - Appended Fix */
.trash-reveal-btn {
  transition: all 0.2s ease;
  opacity: 0 !important;
  color: #9ca3af !important;
  text-decoration: none !important;
}
.trash-reveal-btn:hover {
  color: #dc2626 !important;
  transform: scale(1.1);
  opacity: 1 !important;
}

.reminder-clean-item:hover .trash-reveal-btn {
  opacity: 0.5 !important;
}

/* Overdue Action Buttons */
.overdue-action-btn {
  background: none;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 2px 6px;
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.2s ease;
  opacity: 0;
  font-size: 0.75rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}
.overdue-action-btn:hover {
  color: #6366f1;
  border-color: #6366f1;
  background: rgba(99, 102, 241, 0.08);
  opacity: 1 !important;
}

.snooze-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.reminder-clean-item:hover .overdue-action-btn,
.overdue-item:hover .overdue-action-btn {
  opacity: 0.6;
}

/* Sidebar Badge */
.sidebar-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 0.65rem;
  font-weight: 600;
  line-height: 1;
  color: #fff;
  background-color: #6366f1;
  border-radius: 9px;
  margin-left: 6px;
}

[data-bs-theme=dark] .sidebar-badge {
  background-color: #818cf8;
  color: #0f172a;
}

[data-bs-theme=dark] .reminder-due-date {
  color: #94a3b8;
}

[data-bs-theme=dark] .reminder-due-date--overdue {
  color: #f87171;
}

[data-bs-theme=dark] .reminder-due-date--none {
  color: #475569;
}

/* Backlog Prose Link */
.backlog-prose-link {
  color: #64748b;
  font-size: 0.85rem;
}
.backlog-prose-link a {
  color: #6366f1;
  text-decoration: none;
  font-weight: 500;
}
.backlog-prose-link a:hover {
  text-decoration: underline;
}

[data-bs-theme=dark] .backlog-prose-link {
  color: #94a3b8;
}
[data-bs-theme=dark] .backlog-prose-link a {
  color: #818cf8;
}

/* Meeting Row Hover Actions */
.meeting-row .meeting-actions {
  opacity: 0;
  transition: opacity 0.15s ease;
}

.meeting-row:hover .meeting-actions {
  opacity: 1;
}

/* Next Meeting Highlight */
.meeting-row.next-meeting {
  background: linear-gradient(to right, rgba(13, 110, 253, 0.06), transparent);
  border-left: 3px solid #0d6efd;
  margin-left: -3px;
  padding-left: 3px;
  border-radius: 4px;
}

/* Schedule CTA Soft Pills */
.schedule-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  line-height: 1.5;
}
.schedule-cta:hover {
  text-decoration: none;
}

.schedule-cta-prep {
  background: #eef2ff;
  color: #4f46e5;
}
.schedule-cta-prep:hover {
  background: #e0e7ff;
  color: #4338ca;
}

.schedule-cta-note {
  background: #f0fdf4;
  color: #16a34a;
}
.schedule-cta-note:hover {
  background: #dcfce7;
  color: #15803d;
}

.schedule-cta-details {
  background: #f8fafc;
  color: #64748b;
}
.schedule-cta-details:hover {
  background: #f1f5f9;
  color: #475569;
}

/* Past meetings collapsed pill */
.past-timed-pill-row {
  margin-bottom: 0.5rem;
}

.past-timed-divider {
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.past-timed-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.past-timed-pill:hover {
  background: var(--border-color);
  color: var(--text-primary);
}

[data-bs-theme=dark] .past-timed-pill:hover {
  background: #334155;
}

[data-bs-theme=dark] .schedule-cta-prep {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
}
[data-bs-theme=dark] .schedule-cta-prep:hover {
  background: rgba(99, 102, 241, 0.25);
  color: #c7d2fe;
}
[data-bs-theme=dark] .schedule-cta-note {
  background: rgba(22, 163, 106, 0.12);
  color: #86efac;
}
[data-bs-theme=dark] .schedule-cta-note:hover {
  background: rgba(22, 163, 106, 0.2);
  color: #bbf7d0;
}
[data-bs-theme=dark] .schedule-cta-details {
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
}
[data-bs-theme=dark] .schedule-cta-details:hover {
  background: rgba(148, 163, 184, 0.18);
  color: #cbd5e1;
}

/* Smart Summary Header */
.summary-header-card .summary-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.summary-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
}
.summary-pill .count {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-primary);
}
.summary-pill.danger {
  border-color: #fecaca;
  background: #fef2f2;
  color: #dc2626;
}
.summary-pill.danger .count {
  color: #dc2626;
}

[data-bs-theme=dark] .summary-pill {
  background: #1e293b;
  border-color: #334155;
}
[data-bs-theme=dark] .summary-pill.danger {
  background: rgba(220, 38, 38, 0.1);
  border-color: rgba(220, 38, 38, 0.3);
}

/* Daily Briefing */
.daily-briefing {
  overflow: hidden;
  background: var(--sidebar-bg);
}

.daily-briefing-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.4rem 1.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.daily-briefing-eyebrow {
  color: var(--text-secondary);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.daily-briefing-greeting {
  margin: 0.15rem 0 0;
  color: var(--text-primary);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.65rem;
  font-weight: 500;
  letter-spacing: 0;
}

.daily-briefing-date {
  color: var(--text-secondary);
  font-size: 0.78rem;
}

.daily-briefing-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.75fr);
  min-height: 520px;
}

.daily-briefing-stage {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 1.8rem 2rem;
  border-right: 1px solid var(--border-color);
}

.daily-briefing-stage-heading,
.daily-briefing-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.daily-briefing-countdown,
.daily-briefing-in-progress-label,
.daily-briefing-birthday-label,
.daily-briefing-task-label,
.daily-briefing-open-label {
  color: var(--primary-color);
  font-size: 0.75rem;
  font-weight: 700;
}

.daily-briefing-in-progress-label {
  color: #047857;
}

.daily-briefing-birthday-label {
  color: #be123c;
}

.daily-briefing-task-label {
  color: #dc2626;
}

.daily-briefing-open-label {
  color: #047857;
}

.daily-briefing-hero-title {
  display: block;
  max-width: 42rem;
  margin: 1.35rem 0 0.55rem;
  color: var(--text-primary);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 3vw, 2.45rem);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.08;
  text-decoration: none;
}
.daily-briefing-hero-title:hover {
  color: var(--primary-color);
}

.daily-briefing-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.daily-briefing-meta-separator {
  color: var(--text-muted);
}

.daily-briefing-location-link {
  color: inherit;
  text-decoration: none;
}

.daily-briefing-location-link:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.daily-briefing-progress {
  max-width: 42rem;
  margin-top: 0.9rem;
}

.daily-briefing-progress-track {
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--border-color);
}
.daily-briefing-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #10b981;
  transition: width 0.3s ease;
}

.daily-briefing-progress-label {
  margin-top: 0.35rem;
  color: var(--text-secondary);
  font-size: 0.68rem;
}

.daily-briefing-attendees {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 1rem;
  max-width: 38rem;
}

.daily-briefing-attendee-heading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1.1rem 0 0.55rem;
}
.daily-briefing-attendee-heading strong {
  color: var(--text-secondary);
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.daily-briefing-attendee-heading span {
  color: var(--text-muted);
  font-size: 0.66rem;
}

.daily-briefing-attendee {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.daily-briefing-avatar {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 2px solid var(--sidebar-bg);
  border-radius: 50%;
  background: #e0e7ff;
  color: #3730a3;
  font-size: 0.65rem;
  font-weight: 700;
  text-decoration: none;
}
.daily-briefing-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.daily-briefing-attendee-name {
  overflow: hidden;
  color: var(--text-primary);
  font-size: 0.76rem;
  font-weight: 600;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.daily-briefing-attendee .daily-briefing-attendee-status {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
}

.daily-briefing-attendee-status[data-attendance-status=accepted] {
  color: #047857;
}

.daily-briefing-attendee-status[data-attendance-status=declined] {
  color: #b91c1c;
}

.daily-briefing-attendee-count {
  margin-left: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.daily-briefing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.2rem;
}

.daily-briefing-quick-note {
  max-width: 42rem;
  margin-top: 1rem;
}

.daily-briefing-quick-note-form {
  display: flex;
  align-items: stretch;
  overflow: hidden;
  border-bottom: 1.5px solid var(--border-color);
  background: transparent;
}
.daily-briefing-quick-note-form:focus-within {
  border-bottom-color: var(--primary-color);
}

.daily-briefing-quick-note-input {
  min-height: 44px;
  flex: 1;
  resize: none;
  border: 0;
  outline: 0;
  padding: 0.4rem 0;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.85rem;
  line-height: 1.45;
}
.daily-briefing-quick-note-input::placeholder {
  color: var(--text-muted);
}

.daily-briefing-quick-note-submit {
  align-self: center;
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 0.3rem 0.6rem;
  background: transparent;
  color: var(--primary-color);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.daily-briefing-quick-note-submit:hover {
  border-color: var(--primary-color);
  background: transparent;
}
.daily-briefing-quick-note-submit.saved {
  border-color: #059669;
  color: #059669;
}

.daily-briefing-context,
.daily-briefing-density {
  margin-top: 1.5rem;
  padding: 0.9rem 1rem;
  border-left: 3px solid #a5b4fc;
  background: rgba(99, 102, 241, 0.05);
}
.daily-briefing-context strong,
.daily-briefing-density strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.78rem;
}
.daily-briefing-context p,
.daily-briefing-density p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.78rem;
  line-height: 1.5;
}

.daily-briefing-context--birthday {
  border-left-color: #fda4af;
  background: rgba(244, 63, 94, 0.04);
}

.daily-briefing-meeting-notes {
  max-width: 42rem;
  margin-top: 1.5rem;
}

.daily-briefing-prep-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 42rem;
  margin-top: 1.5rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(79, 70, 229, 0.22);
  border-radius: 8px;
  background: #eef2ff;
  color: #312e81;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}
.daily-briefing-prep-banner:hover {
  border-color: rgba(79, 70, 229, 0.42);
  background: #e0e7ff;
  color: #312e81;
}

.daily-briefing-prep-banner-icon {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: var(--primary-color);
  color: white;
}

.daily-briefing-prep-banner-copy {
  flex: 1;
  min-width: 0;
}
.daily-briefing-prep-banner-copy strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
}
.daily-briefing-prep-banner-copy span {
  color: #6366f1;
  font-size: 0.72rem;
  font-weight: 600;
}

.daily-briefing-today-so-far {
  margin-top: 0.25rem;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.daily-briefing-today-sep {
  margin: 0 0.3rem;
}

.daily-briefing-tomorrow p {
  color: var(--text-secondary);
  font-size: 0.75rem;
  line-height: 1.5;
  margin: 0;
}

.daily-briefing-quiet-activity {
  display: grid;
  gap: 0;
}

.daily-briefing-quiet-row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border-color);
}
.daily-briefing-quiet-row:last-child {
  border-bottom: 0;
}

.daily-briefing-quiet-type-icon {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.daily-briefing-quiet-type-icon--email {
  background: #e0f2fe;
  color: #0284c7;
}
.daily-briefing-quiet-type-icon--note {
  background: #fef9c3;
  color: #d97706;
}
.daily-briefing-quiet-type-icon--task {
  background: #dcfce7;
  color: #16a34a;
}
.daily-briefing-quiet-type-icon--meeting {
  background: #ede9fe;
  color: #7c3aed;
}
.daily-briefing-quiet-type-icon--reminder {
  background: #f1f5f9;
  color: #64748b;
}
.daily-briefing-quiet-type-icon--default {
  background: #f1f5f9;
  color: #64748b;
}

[data-bs-theme=dark] .daily-briefing-quiet-type-icon--email {
  background: #082f49;
  color: #7dd3fc;
}
[data-bs-theme=dark] .daily-briefing-quiet-type-icon--note {
  background: #451a03;
  color: #fcd34d;
}
[data-bs-theme=dark] .daily-briefing-quiet-type-icon--task {
  background: #052e16;
  color: #86efac;
}
[data-bs-theme=dark] .daily-briefing-quiet-type-icon--meeting {
  background: #2e1065;
  color: #c4b5fd;
}
[data-bs-theme=dark] .daily-briefing-quiet-type-icon--reminder {
  background: #1e293b;
  color: #94a3b8;
}
[data-bs-theme=dark] .daily-briefing-quiet-type-icon--default {
  background: #1e293b;
  color: #94a3b8;
}

.daily-briefing-quiet-body {
  min-width: 0;
  flex: 1;
}

.daily-briefing-quiet-text {
  overflow: hidden;
  color: var(--text-primary);
  font-size: 0.72rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: none;
  line-height: 1.3;
  flex: 1;
  min-width: 0;
}
.daily-briefing-quiet-text:hover {
  color: var(--primary-color);
}

.daily-briefing-quiet-title-row {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  min-width: 0;
}

.daily-briefing-quiet-sub {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 3px;
  line-height: 1.3;
}

.daily-briefing-quiet-sub-av {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border-radius: 50%;
  object-fit: cover;
}

.daily-briefing-quiet-sub-name {
  font-size: 0.7rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.daily-briefing-quiet-sub-suffix {
  font-size: 0.7rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.daily-briefing-quiet-preview {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-secondary);
  font-size: 0.67rem;
  margin-top: 1px;
  line-height: 1.3;
}

.daily-briefing-quiet-dot::before {
  content: "·";
  color: var(--text-muted);
}

.daily-briefing-quiet-time {
  color: var(--text-muted);
  font-size: 0.64rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.daily-briefing-meeting-notes-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.45rem;
}
.daily-briefing-meeting-notes-heading strong {
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.daily-briefing-meeting-notes-heading span {
  color: var(--text-muted);
  font-size: 0.65rem;
}

.daily-briefing-meeting-note {
  position: relative;
  display: flex;
  align-items: flex-start;
  padding: 0.65rem 0;
}
.daily-briefing-meeting-note + .daily-briefing-meeting-note {
  border-top: 1px solid var(--border-color);
}
.daily-briefing-meeting-note:hover .daily-briefing-meeting-note-copy strong {
  color: var(--primary-color);
}
.daily-briefing-meeting-note:hover .daily-briefing-note-delete {
  opacity: 1;
}

.daily-briefing-meeting-note-inner {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  flex: 1;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.daily-briefing-note-delete {
  display: flex;
  flex: 0 0 28px;
  align-items: center;
  justify-content: center;
  height: 28px;
  margin-top: 0.1rem;
  border-radius: 5px;
  color: var(--text-muted);
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.12s, color 0.12s, background 0.12s;
}
.daily-briefing-note-delete:hover {
  color: #dc2626;
  background: #fef2f2;
}

.daily-briefing-meeting-note-icon {
  width: 28px;
  height: 28px;
  display: flex;
  flex: 0 0 28px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #eef2ff;
  color: var(--primary-color);
}

.daily-briefing-meeting-note-copy {
  min-width: 0;
}
.daily-briefing-meeting-note-copy strong {
  display: block;
  color: var(--text-primary);
  font-size: 0.82rem;
  transition: color 0.15s;
}
.daily-briefing-meeting-note-copy span {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 0.15rem;
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.daily-briefing-notes-link {
  display: inline-block;
  margin-top: 0.35rem;
  color: var(--primary-color);
  font-size: 0.7rem;
  font-weight: 650;
  text-decoration: none;
}

.daily-briefing-density {
  border-left-color: #f59e0b;
  background: rgba(245, 158, 11, 0.06);
}

.daily-briefing-density-list {
  display: grid;
  gap: 0.28rem;
  margin-top: 0.45rem;
}

.daily-briefing-density-row {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  font-size: 0.76rem;
}
.daily-briefing-density-row time {
  min-width: 4.2rem;
  flex-shrink: 0;
  color: var(--text-secondary);
}
.daily-briefing-density-row span {
  color: var(--text-primary);
  white-space: normal;
}

.daily-briefing-schedule {
  display: grid;
  gap: 0.8rem;
  width: 100%;
  max-width: 760px;
  margin-top: 1.6rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
}

.daily-briefing-schedule-section {
  display: grid;
  gap: 0.5rem;
}

.daily-briefing-schedule-link {
  color: var(--primary-color);
  font-size: 0.68rem;
  font-weight: 700;
  text-decoration: none;
}
.daily-briefing-schedule-link:hover {
  text-decoration: underline;
}

.daily-briefing-meeting-list {
  display: grid;
}

.daily-briefing-meeting-row {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.75rem;
  min-height: 2.4rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--border-color) 70%, transparent);
}
.daily-briefing-meeting-row:last-child {
  border-bottom: 0;
}
.daily-briefing-meeting-row time {
  padding-top: 0.08rem;
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

.daily-briefing-meeting-title {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 650;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.daily-briefing-meeting-title:hover {
  color: var(--primary-color);
}

.daily-briefing-meeting-copy {
  min-width: 0;
}

.daily-briefing-meeting-line {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  min-width: 0;
}

.daily-briefing-later-attendee-names {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  color: #64748b;
  font-size: 0.68rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.daily-briefing-attendee-separator {
  margin-right: 0.35rem;
  color: var(--text-muted);
}

.daily-briefing-response-status {
  flex: 0 0 auto;
  color: #b45309;
  font-size: 0.65rem;
  font-weight: 700;
  white-space: nowrap;
}

.daily-briefing-now {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0.1rem 0;
  color: var(--primary-color);
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.daily-briefing-now::before, .daily-briefing-now::after {
  content: "";
  height: 1px;
  flex: 1;
  background: #c7d2fe;
}

.daily-briefing-meeting-copy .daily-briefing-prep-cta {
  max-width: 360px;
  margin-top: 0.65rem;
}

.daily-briefing-meeting-row--past .daily-briefing-meeting-title,
.daily-briefing-meeting-row--past time {
  color: var(--text-secondary);
}

.daily-briefing-meeting-action {
  display: flex;
  justify-content: flex-end;
  min-width: 4.25rem;
}

.daily-briefing-rail {
  min-height: 0;
  overflow-y: auto;
  padding: 1.55rem 1.35rem;
  background: #f8fafc;
}

.daily-briefing-rail-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.25rem 0 1rem;
}
.daily-briefing-rail-heading h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
}
.daily-briefing-rail-heading span {
  color: var(--text-muted);
  font-size: 0.66rem;
  white-space: nowrap;
}

.daily-briefing-rail-section {
  padding: 1rem 0;
  border-top: 1px solid var(--border-color);
}
.daily-briefing-rail-section:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.daily-briefing-section-heading {
  margin-bottom: 0.65rem;
}
.daily-briefing-section-heading strong {
  color: var(--text-primary);
  font-size: 0.78rem;
}
.daily-briefing-section-heading span {
  color: var(--text-muted);
  font-size: 0.68rem;
}

.daily-briefing-tomorrow-group {
  margin: 0.85rem 0 0.55rem;
}

.daily-briefing-tomorrow-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.daily-briefing-tomorrow-label strong {
  color: var(--text-secondary);
  font-size: 0.67rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.daily-briefing-tomorrow-label span {
  color: var(--text-muted);
  font-size: 0.64rem;
}

.daily-briefing-tomorrow-link {
  display: inline-block;
  margin-top: 0.85rem;
  color: var(--primary-color);
  font-size: 0.7rem;
  font-weight: 700;
  text-decoration: none;
}
.daily-briefing-tomorrow-link:hover {
  text-decoration: underline;
}

.daily-briefing-tomorrow-tasks {
  display: grid;
  gap: 0.2rem;
  padding-left: 0.7rem;
  border-left: 2px solid #cbd5e1;
}
.daily-briefing-tomorrow-tasks > strong {
  color: var(--text-primary);
  font-size: 0.74rem;
}
.daily-briefing-tomorrow-tasks > span {
  color: var(--text-secondary);
  font-size: 0.68rem;
  line-height: 1.35;
}
.daily-briefing-tomorrow-tasks > a {
  width: fit-content;
  color: var(--primary-color);
  font-size: 0.68rem;
  font-weight: 700;
  text-decoration: none;
}
.daily-briefing-tomorrow-tasks > a:hover {
  text-decoration: underline;
}

.daily-briefing-task-section {
  padding-top: 0;
}

.daily-briefing-task-list {
  display: grid;
}

.daily-briefing-must-do {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 2.85rem;
  padding: 0.55rem 0.2rem;
  border: 0;
  border-bottom: 1px solid var(--border-color);
  border-radius: 0;
  background: transparent;
}
.daily-briefing-must-do:last-child {
  border-bottom: 0;
}

.daily-briefing-must-do--overdue {
  padding-left: 0.7rem;
}
.daily-briefing-must-do--overdue::before {
  content: "";
  position: absolute;
  inset: 0.55rem auto 0.55rem 0;
  width: 2px;
  border-radius: 2px;
  background: #ef4444;
}

.daily-briefing-checkbox {
  width: 1rem;
  height: 1rem;
  margin: 0.08rem 0 0;
  border: 1.5px solid #ef4444;
  border-radius: 4px;
  accent-color: var(--primary-color);
  cursor: pointer;
}

.daily-briefing-must-do-copy,
.daily-briefing-task-copy {
  min-width: 0;
  flex: 1;
  cursor: pointer;
}
.daily-briefing-must-do-copy strong,
.daily-briefing-task-copy strong {
  display: block;
  color: var(--text-primary);
  font-size: 0.76rem;
  line-height: 1.35;
}
.daily-briefing-must-do-copy span,
.daily-briefing-task-copy span {
  display: block;
  margin-top: 0.2rem;
  color: #dc2626;
  font-size: 0.68rem;
  font-weight: 600;
}

.daily-briefing-must-do--overdue .daily-briefing-must-do-copy strong {
  color: var(--text-primary);
}

.daily-briefing-task-list-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.55rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border-color);
  color: var(--primary-color);
  font-size: 0.7rem;
  font-weight: 700;
  text-decoration: none;
}
.daily-briefing-task-list-link:hover {
  text-decoration: underline;
}

.daily-briefing-birthday-list {
  display: grid;
  gap: 0.55rem;
}

.daily-briefing-birthday-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.daily-briefing-birthday-avatar {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 50%;
  object-fit: cover;
}

.daily-briefing-birthday-copy {
  min-width: 0;
  flex: 1;
}
.daily-briefing-birthday-copy a {
  display: block;
  color: var(--text-primary);
  font-size: 0.76rem;
  font-weight: 650;
  text-decoration: none;
}
.daily-briefing-birthday-copy span {
  display: block;
  color: var(--text-secondary);
  font-size: 0.68rem;
}

.daily-briefing-inline-action {
  color: var(--primary-color);
  font-size: 0.68rem;
  font-weight: 700;
  text-decoration: none;
}

.daily-briefing-agenda-row {
  display: grid;
  grid-template-columns: 52px 10px minmax(0, 1fr);
  align-items: start;
  gap: 0.5rem;
  min-height: 2.65rem;
}
.daily-briefing-agenda-row time {
  color: var(--text-secondary);
  font-size: 0.68rem;
  text-align: left;
}

.daily-briefing-agenda-track {
  position: relative;
  align-self: stretch;
  margin-top: 0.2rem;
}
.daily-briefing-agenda-track::after {
  content: "";
  position: absolute;
  top: 7px;
  bottom: -8px;
  left: 4px;
  width: 1px;
  background: var(--border-color);
}
.daily-briefing-agenda-track span {
  position: relative;
  z-index: 1;
  display: block;
  width: 9px;
  height: 9px;
  border: 2px solid #f8fafc;
  border-radius: 50%;
  background: #94a3b8;
  box-shadow: 0 0 0 1px #cbd5e1;
}

.daily-briefing-agenda-row:last-child .daily-briefing-agenda-track::after {
  display: none;
}

.daily-briefing-agenda-row--next {
  min-height: auto;
  padding-bottom: 0.7rem;
}

.daily-briefing-agenda-row--past .daily-briefing-agenda-track span {
  background: #94a3b8;
  box-shadow: none;
}
.daily-briefing-agenda-row--past .daily-briefing-agenda-copy > a {
  color: var(--text-secondary);
}

.daily-briefing-agenda-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.2rem;
}
.daily-briefing-agenda-meta > span {
  color: var(--text-muted);
  font-size: 0.66rem;
  font-weight: 650;
}

.daily-briefing-note-status,
.daily-briefing-add-note {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border: 0;
  padding: 0;
  background: transparent;
  font-size: 0.66rem;
  font-weight: 700;
  text-decoration: none;
}

.daily-briefing-agenda-copy .daily-briefing-note-status {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: #047857;
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 11px;
}
.daily-briefing-agenda-copy .daily-briefing-note-status svg {
  display: block;
  flex: 0 0 auto;
}
.daily-briefing-agenda-copy .daily-briefing-note-status:hover {
  color: #065f46;
}

.daily-briefing-meeting-action .daily-briefing-note-status > span {
  color: var(--text-muted);
  font-weight: 600;
}

.daily-briefing-add-note {
  color: var(--primary-color);
  cursor: pointer;
}
.daily-briefing-add-note:hover {
  text-decoration: underline;
}

.daily-briefing-add-note--hover {
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.daily-briefing-agenda-row:hover .daily-briefing-add-note--hover,
.daily-briefing-agenda-row:focus-within .daily-briefing-add-note--hover,
.daily-briefing-add-note--hover:focus-visible {
  opacity: 1;
  pointer-events: auto;
}

@media (hover: none) {
  .daily-briefing-add-note--hover {
    opacity: 1;
    pointer-events: auto;
  }
}
.daily-briefing-now-divider {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 0.5rem;
  margin: -0.1rem 0 0.85rem;
}
.daily-briefing-now-divider span {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-color);
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.daily-briefing-now-divider span::after {
  content: "";
  height: 1px;
  flex: 1;
  background: #c7d2fe;
}

.daily-briefing-agenda-attendees {
  margin-top: 0.35rem;
  color: var(--text-secondary);
  font-size: 0.66rem;
  line-height: 1.35;
}

.daily-briefing-agenda-copy .daily-briefing-prep-cta {
  margin-top: 0.65rem;
}

.daily-briefing-next-meeting {
  padding: 0.75rem 0 1.1rem;
  border-top: 1px solid var(--border-color);
}

.daily-briefing-next-meeting-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}
.daily-briefing-next-meeting-topline time {
  color: var(--text-secondary);
  font-size: 0.68rem;
  font-weight: 650;
}
.daily-briefing-next-meeting-topline span {
  color: #047857;
  font-size: 0.66rem;
  font-weight: 700;
}

.daily-briefing-next-title {
  display: block;
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
}
.daily-briefing-next-title:hover {
  color: var(--primary-color);
}

.daily-briefing-next-location {
  margin-top: 0.2rem;
  color: var(--text-secondary);
  font-size: 0.68rem;
}

.daily-briefing-agenda-copy a {
  display: block;
  color: var(--text-primary);
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1.3;
  text-decoration: none;
}
.daily-briefing-agenda-copy span {
  color: var(--text-secondary);
  font-size: 0.66rem;
}

.daily-briefing-next-attendees {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.75rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--border-color);
}

.daily-briefing-next-attendee {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-secondary);
  font-size: 0.69rem;
}
.daily-briefing-next-attendee img,
.daily-briefing-next-attendee > span:first-child {
  width: 24px;
  height: 24px;
  display: flex;
  flex: 0 0 24px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #e0e7ff;
  color: #3730a3;
  font-size: 0.55rem;
  font-weight: 700;
  object-fit: cover;
}

.daily-briefing-next-actions {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.75rem;
}

.daily-briefing-prep-cta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.7rem;
  border: 0;
  border-radius: 7px;
  background: #eef2ff;
  color: #312e81;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.daily-briefing-prep-cta:hover {
  background: #e0e7ff;
  color: #312e81;
  transform: translateY(-1px);
}

.daily-briefing-prep-icon {
  width: 30px;
  height: 30px;
  display: flex;
  flex: 0 0 30px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: var(--primary-color);
  color: white;
}

.daily-briefing-prep-copy {
  min-width: 0;
  flex: 1;
}
.daily-briefing-prep-copy strong {
  display: block;
  font-size: 0.72rem;
  line-height: 1.25;
}
.daily-briefing-prep-copy span {
  display: block;
  margin-top: 0.15rem;
  color: #6366f1;
  font-size: 0.62rem;
  line-height: 1.3;
}

.daily-briefing-prep-arrow {
  flex: 0 0 auto;
  color: #6366f1;
}

.daily-briefing-details-link {
  display: block;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.66rem;
  font-weight: 600;
  text-decoration: none;
}
.daily-briefing-details-link:hover {
  color: var(--primary-color);
}

.daily-briefing-person-hero {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.35rem;
}
.daily-briefing-person-hero .daily-briefing-hero-title {
  margin: 0 0 0.25rem;
}
.daily-briefing-person-hero p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.daily-briefing-person-avatar {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  border-radius: 50%;
  object-fit: cover;
}

.daily-briefing-task-hero {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  margin-top: 1.35rem;
  padding: 1.2rem;
  border: 1px solid #fecaca;
  border-radius: 7px;
  background: #fffafa;
}
.daily-briefing-task-hero .daily-briefing-checkbox {
  width: 1.25rem;
  height: 1.25rem;
}
.daily-briefing-task-hero .daily-briefing-hero-title {
  margin: 0 0 0.35rem;
  color: #7f1d1d;
  font-size: 1.75rem;
}
.daily-briefing-task-hero p {
  margin: 0;
  color: #991b1b;
  font-size: 0.8rem;
}

.daily-briefing-hero-copy {
  max-width: 38rem;
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.55;
}

.daily-briefing-quiet {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.78rem;
  line-height: 1.5;
}

.daily-briefing-reflection {
  margin-top: 1.25rem;
  max-width: 42rem;
}

.daily-briefing-reflection-heading {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.daily-briefing-reflection-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-color);
  border-radius: 0;
  padding: 0.5rem 0;
  font-size: 1rem;
  color: var(--text-primary);
  line-height: 1.65;
  resize: none;
  transition: border-color 0.15s;
}
.daily-briefing-reflection-input::placeholder {
  color: var(--text-muted);
  font-style: italic;
}
.daily-briefing-reflection-input:focus {
  outline: none;
  border-bottom-color: var(--primary-color);
}

.daily-briefing-reflection-footer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.daily-briefing-reflection-submit {
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 0.3rem 0.7rem;
  background: transparent;
  color: var(--primary-color);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.daily-briefing-reflection-submit:hover {
  border-color: var(--primary-color);
}

.daily-briefing-reflection-saved-at {
  font-size: 0.72rem;
  color: var(--text-muted);
}

[data-bs-theme=dark] .daily-briefing {
  background: #1e293b;
}
[data-bs-theme=dark] .daily-briefing-rail {
  background: #172033;
}
[data-bs-theme=dark] .daily-briefing-quick-note-form {
  border-bottom-color: #334155;
}
[data-bs-theme=dark] .daily-briefing-quick-note-form:focus-within {
  border-bottom-color: #818cf8;
}
[data-bs-theme=dark] .daily-briefing-avatar {
  border-color: #1e293b;
  background: #334155;
  color: #c7d2fe;
}
[data-bs-theme=dark] .daily-briefing-next-attendee > span:first-child {
  background: #334155;
  color: #c7d2fe;
}
[data-bs-theme=dark] .daily-briefing-agenda-track span {
  border-color: #172033;
  background: #64748b;
  box-shadow: 0 0 0 1px #475569;
}
[data-bs-theme=dark] .daily-briefing-agenda-copy .daily-briefing-note-status {
  color: #6ee7b7;
}
[data-bs-theme=dark] .daily-briefing-agenda-copy .daily-briefing-note-status:hover {
  color: #a7f3d0;
}
[data-bs-theme=dark] .daily-briefing-add-note {
  color: #a5b4fc;
}
[data-bs-theme=dark] .daily-briefing-later-attendee-names {
  color: #94a3b8;
}
[data-bs-theme=dark] .daily-briefing-response-status {
  color: #fbbf24;
}
[data-bs-theme=dark] .daily-briefing-attendee-status[data-attendance-status=accepted] {
  color: #6ee7b7;
}
[data-bs-theme=dark] .daily-briefing-attendee-status[data-attendance-status=declined] {
  color: #fca5a5;
}
[data-bs-theme=dark] .daily-briefing-now {
  color: #a5b4fc;
}
[data-bs-theme=dark] .daily-briefing-now::before, [data-bs-theme=dark] .daily-briefing-now::after {
  background: #3730a3;
}
[data-bs-theme=dark] .daily-briefing-meeting-row {
  border-bottom-color: rgba(51, 65, 85, 0.7);
}
[data-bs-theme=dark] .daily-briefing-meeting-action .daily-briefing-note-status {
  color: #6ee7b7;
}
[data-bs-theme=dark] .daily-briefing-now-divider span {
  color: #a5b4fc;
}
[data-bs-theme=dark] .daily-briefing-now-divider span::after {
  background: #3730a3;
}
[data-bs-theme=dark] .daily-briefing-must-do {
  border-bottom-color: var(--border-color);
  background: transparent;
}
[data-bs-theme=dark] .daily-briefing-must-do--overdue::before {
  background: #f87171;
}
[data-bs-theme=dark] .daily-briefing-tomorrow-tasks {
  border-left-color: #475569;
}
[data-bs-theme=dark] .daily-briefing-task-hero {
  border-color: rgba(248, 113, 113, 0.28);
  background: rgba(127, 29, 29, 0.18);
}
[data-bs-theme=dark] .daily-briefing-task-hero .daily-briefing-hero-title {
  color: #fecaca;
}
[data-bs-theme=dark] .daily-briefing-task-hero p {
  color: #fca5a5;
}
[data-bs-theme=dark] .daily-briefing-context,
[data-bs-theme=dark] .daily-briefing-density {
  background: rgba(99, 102, 241, 0.1);
}
[data-bs-theme=dark] .daily-briefing-context--birthday {
  background: rgba(244, 63, 94, 0.08);
}
[data-bs-theme=dark] .daily-briefing-in-progress-label {
  color: #6ee7b7;
}
[data-bs-theme=dark] .daily-briefing-prep-banner {
  border-color: rgba(129, 140, 248, 0.28);
  background: rgba(79, 70, 229, 0.16);
  color: #e0e7ff;
}
[data-bs-theme=dark] .daily-briefing-prep-banner:hover {
  border-color: rgba(129, 140, 248, 0.48);
  background: rgba(79, 70, 229, 0.25);
}
[data-bs-theme=dark] .daily-briefing-prep-banner-copy span {
  color: #a5b4fc;
}
[data-bs-theme=dark] .daily-briefing-meeting-note-icon {
  background: #312e81;
  color: #c7d2fe;
}
[data-bs-theme=dark] .daily-briefing-note-delete:hover {
  background: rgba(220, 38, 38, 0.15);
}
[data-bs-theme=dark] .daily-briefing-quick-note-submit {
  color: #c7d2fe;
}
[data-bs-theme=dark] .daily-briefing-quick-note-submit:hover {
  border-color: #818cf8;
}
[data-bs-theme=dark] .daily-briefing-quick-note-submit.saved {
  border-color: #6ee7b7;
  color: #6ee7b7;
}
[data-bs-theme=dark] .daily-briefing-next-meeting {
  border-top-color: #334155;
}
[data-bs-theme=dark] .daily-briefing-reflection-input {
  border-bottom-color: #334155;
}
[data-bs-theme=dark] .daily-briefing-reflection-input:focus {
  border-bottom-color: #818cf8;
}
[data-bs-theme=dark] .daily-briefing-reflection-submit {
  color: #c7d2fe;
}
[data-bs-theme=dark] .daily-briefing-reflection-submit:hover {
  border-color: #818cf8;
}
[data-bs-theme=dark] .daily-briefing-next-meeting-topline span {
  color: #6ee7b7;
}
[data-bs-theme=dark] .daily-briefing-prep-cta {
  border-color: rgba(129, 140, 248, 0.3);
  background: rgba(79, 70, 229, 0.16);
  color: #e0e7ff;
}
[data-bs-theme=dark] .daily-briefing-prep-cta:hover {
  border-color: rgba(129, 140, 248, 0.5);
  background: rgba(79, 70, 229, 0.24);
  color: #fff;
}
[data-bs-theme=dark] .daily-briefing-prep-copy span,
[data-bs-theme=dark] .daily-briefing-prep-arrow {
  color: #a5b4fc;
}

@media (max-width: 1100px) {
  .daily-briefing-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.85fr);
  }
  .daily-briefing-stage {
    padding: 1.5rem;
  }
  .daily-briefing-attendees {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  .daily-briefing-header {
    padding: 1rem 1rem 0.75rem;
  }
  .daily-briefing-greeting {
    font-size: 1.35rem;
  }
  .daily-briefing-grid {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .daily-briefing-stage {
    padding: 1.25rem 1rem;
    border-right: 0;
    border-bottom: 1px solid var(--border-color);
  }
  .daily-briefing-hero-title {
    font-size: 1.6rem;
  }
  .daily-briefing-rail {
    overflow: visible;
    padding: 1.25rem 1rem;
  }
  .daily-briefing-prep-banner {
    margin-top: 1.25rem;
  }
  .daily-briefing-quick-note {
    max-width: 100%;
  }
  .daily-briefing-meeting-notes {
    max-width: 100%;
  }
  .daily-briefing-context {
    max-width: 100%;
  }
  .daily-briefing-attendees {
    grid-template-columns: 1fr;
    max-width: 100%;
  }
  .daily-briefing-meeting-row {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 0.5rem;
  }
  .daily-briefing-meeting-title {
    white-space: normal;
  }
  .daily-briefing-meeting-line {
    flex-wrap: wrap;
    gap: 0.2rem 0.5rem;
  }
  .daily-briefing-meeting-action {
    grid-column: 2;
    justify-self: end;
  }
}
/* Mobile Up Next Hero Card */
.mobile-up-next {
  background: #5b5bd6;
  border-radius: 18px;
  padding: 18px 18px 16px;
  color: #fff;
}

.mobile-up-next-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.mobile-up-next-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.85);
}

.mobile-up-next-time {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}
.mobile-up-next-time svg {
  opacity: 0.8;
}

.mobile-up-next-title {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 6px;
}
.mobile-up-next-title:hover {
  color: rgba(255, 255, 255, 0.9);
}

.mobile-up-next-location {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 14px;
}
.mobile-up-next-location svg {
  opacity: 0.7;
}

.mobile-up-next-attendees {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.mobile-up-next-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 3px 10px 3px 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
}

.mobile-up-next-chip-avatar {
  width: 20px;
  min-width: 20px;
  height: 20px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  font-weight: 700;
  color: #fff;
}

.mobile-up-next-chip-overflow {
  padding: 3px 10px;
  color: rgba(255, 255, 255, 0.85);
}

.mobile-up-next-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-up-next-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
}
.mobile-up-next-btn:hover, .mobile-up-next-btn:focus {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  text-decoration: none;
}
.mobile-up-next-btn svg {
  flex-shrink: 0;
}

[data-bs-theme=dark] .mobile-up-next {
  background: #4338ca;
}

/* Meeting Prep Card */
.meeting-prep-card {
  border-left: 3px solid var(--primary-color);
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.03), transparent);
  border-radius: 8px;
  padding: 12px 16px;
}

.prep-badge {
  background: rgba(79, 70, 229, 0.1);
  color: var(--primary-color);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.prep-countdown {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.prep-title-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 2px;
}

.prep-time {
  font-size: 0.8rem;
  color: var(--primary-color);
  font-weight: 600;
  white-space: nowrap;
}

.prep-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.prep-meta {
  display: flex;
  gap: 12px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.prep-meta svg {
  opacity: 0.5;
}

.prep-attendees {
  margin-bottom: 2px;
}

.prep-attendee-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 5px 0;
}
.prep-attendee-row + .prep-attendee-row {
  border-top: 1px solid rgba(0, 0, 0, 0.04);
}

.prep-attendee-avatar {
  width: 28px;
  min-width: 28px;
  height: 28px;
  background: #e2e8f0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 700;
  color: #475569;
  margin-top: 1px;
}

.prep-attendee-name {
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--text-primary);
  line-height: 1.2;
}

.prep-attendee-unlinked {
  color: var(--text-secondary);
}

.prep-unlinked-label {
  font-size: 0.68rem;
  font-weight: 400;
  color: var(--text-muted);
}

.prep-attendee-signals {
  display: flex;
  gap: 10px;
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.2;
  margin-top: 1px;
}
.prep-attendee-signals svg {
  opacity: 0.4;
  margin-right: 2px;
  position: relative;
  top: 1px;
}

.prep-agenda {
  background: rgba(79, 70, 229, 0.04);
  border: 1px solid rgba(79, 70, 229, 0.1);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-top: 8px;
}

.prep-agenda-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--primary-color);
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.prep-note-snippet {
  background: #fefce8;
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.78rem;
  color: #713f12;
  line-height: 1.5;
  margin-top: 8px;
}

.prep-note-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #a16207;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.prep-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

[data-bs-theme=dark] .meeting-prep-card {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(99, 102, 241, 0.04));
}

[data-bs-theme=dark] .prep-badge {
  background: rgba(99, 102, 241, 0.2);
}

[data-bs-theme=dark] .prep-attendee-row + .prep-attendee-row {
  border-top-color: rgba(255, 255, 255, 0.06);
}

[data-bs-theme=dark] .prep-attendee-avatar {
  background: #334155;
  color: #94a3b8;
}

[data-bs-theme=dark] .prep-agenda {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.2);
  color: #94a3b8;
}

[data-bs-theme=dark] .prep-note-snippet {
  background: rgba(133, 77, 14, 0.15);
  border-color: rgba(253, 230, 138, 0.2);
  color: #fde68a;
}

[data-bs-theme=dark] .prep-note-label {
  color: #fde68a;
}

@media (max-width: 768px) {
  .summary-pill {
    font-size: 0.72rem;
    padding: 3px 9px;
  }
  .summary-pill .count {
    font-size: 0.82rem;
  }
  .meeting-prep-card {
    padding: 10px 12px;
  }
  .prep-attendee-signals {
    gap: 6px;
    font-size: 0.65rem;
  }
  .prep-title-row {
    flex-wrap: wrap;
  }
}
/* Bright Brief (Meeting Prep Page) */
.prep-page {
  min-height: 100%;
}

.prep-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 11px 24px;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.prep-eyebrow {
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.prep-nav-back {
  color: var(--primary-color);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.prep-nav-back:hover {
  color: #4338ca;
}

.prep-nav-title {
  flex: 1;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
}

.prep-nav-note {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s;
}
.prep-nav-note:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.prep-hero {
  padding: 20px 24px 16px;
}

.prep-header {
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--border-color);
}

.prep-header-with {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.prep-with-label {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  margin-right: 2px;
}

.prep-with-person {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px 4px 4px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  color: var(--text-primary);
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}
.prep-with-person:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.prep-with-avatar {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 50%;
  object-fit: cover;
}

.prep-with-init {
  background: #e0e7ff;
  color: #3730a3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  font-weight: 700;
}

.prep-meeting-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 500;
  color: var(--text-primary);
  margin: 0 0 8px;
  line-height: 1.15;
  letter-spacing: 0;
}

.prep-brief-meta {
  font-size: 0.82rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.prep-details-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
}

.prep-details-link:hover {
  color: #4338ca;
  text-decoration: underline;
}

.prep-location-link {
  color: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prep-location-link:hover {
  color: var(--primary-color);
}

.prep-brief-attendees {
  display: flex;
  gap: 8px;
  padding: 0 24px 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.prep-att {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: inherit;
  min-width: 44px;
}
.prep-att:hover .prep-att-name {
  color: var(--primary-color);
}
.prep-att:hover {
  color: inherit;
}

.prep-att-img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-color);
}

.prep-att-init {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: white;
}

.prep-att-name {
  font-size: 0.65rem;
  color: var(--text-secondary);
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  transition: color 0.15s;
}

.prep-desc {
  padding: 14px 24px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.55;
  background: rgba(99, 102, 241, 0.03);
  border-left: 3px solid #a5b4fc;
}

.prep-body {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.9fr);
  align-items: start;
  border-top: 0;
}

.prep-primary {
  padding: 20px 24px;
  border-right: 1px solid var(--border-color);
}

.prep-secondary {
  padding: 20px 20px;
}

.prep-ai-card {
  margin: 0 0 20px;
  background: linear-gradient(135deg, #faf5ff, #eef2ff);
  border: 1px solid #e9d5ff;
  border-radius: 10px;
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
}
.prep-ai-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #a78bfa, #6366f1, #3b82f6);
}

.prep-ai-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: #6366f1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.prep-ai-text {
  font-size: 0.875rem;
  line-height: 1.6;
  color: #1e293b;
}

.prep-ai-divider {
  height: 1px;
  background: repeating-linear-gradient(90deg, #d8b4fe 0, #d8b4fe 4px, transparent 4px, transparent 8px);
  margin: 14px 0;
}

.prep-ai-points-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: #6366f1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.prep-ai-point {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}
.prep-ai-point:last-child {
  margin-bottom: 0;
}

.prep-ai-dot {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: #ede9fe;
  color: #6366f1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 1px;
}

.prep-ai-point-text {
  font-size: 0.84rem;
  color: #334155;
  line-height: 1.45;
}

/* Prep AI loading skeleton */
@keyframes prep-shimmer {
  0% {
    background-position: -600px 0;
  }
  100% {
    background-position: 600px 0;
  }
}
.prep-ai-spinner {
  width: 13px;
  height: 13px;
  border: 2px solid #e9d5ff;
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  flex-shrink: 0;
}

.prep-ai-skeleton {
  height: 11px;
  border-radius: 6px;
  background: linear-gradient(90deg, #ede9fe 25%, #ddd6fe 50%, #ede9fe 75%);
  background-size: 600px 100%;
  animation: prep-shimmer 1.4s infinite linear;
  margin-bottom: 10px;
}
.prep-ai-skeleton.prep-ai-skeleton--full {
  width: 100%;
}
.prep-ai-skeleton.prep-ai-skeleton--med {
  width: 82%;
}
.prep-ai-skeleton.prep-ai-skeleton--short {
  width: 58%;
}

.prep-ai-skeleton-point {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.prep-ai-skeleton-point .prep-ai-skeleton {
  margin-bottom: 0;
  flex: 1;
}

.prep-ai-skeleton-dot {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: linear-gradient(90deg, #ede9fe 25%, #ddd6fe 50%, #ede9fe 75%);
  background-size: 600px 100%;
  animation: prep-shimmer 1.4s infinite linear;
  flex-shrink: 0;
}

.prep-section--compact .prep-card {
  border-radius: 6px;
}
.prep-section--compact .prep-row {
  padding: 8px 11px;
  gap: 8px;
}
.prep-section--compact .prep-icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  flex-shrink: 0;
}
.prep-section--compact .prep-row-title {
  font-size: 0.76rem;
}
.prep-section--compact .prep-row-desc {
  display: none;
}
.prep-section--compact .prep-row-participants {
  font-size: 0.68rem;
}
.prep-section--compact .prep-row-time {
  font-size: 0.66rem;
}

.prep-more-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 7px;
}

.prep-more-link {
  display: inline-block;
  margin-top: 7px;
  color: var(--text-muted);
  font-size: 0.7rem;
  text-decoration: none;
}
.prep-more-link:hover {
  color: var(--primary-color);
}

.prep-section {
  margin-bottom: 20px;
}

.prep-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
  padding-left: 4px;
}

.prep-card {
  background: var(--sidebar-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.prep-row {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  text-decoration: none;
  color: inherit;
  align-items: flex-start;
  transition: background 0.15s;
}
.prep-row:last-child {
  border-bottom: none;
}
.prep-row:hover {
  background: #fafafe;
  color: inherit;
}

a.prep-row:hover {
  color: inherit;
}

.prep-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.prep-icon-meeting {
  background: #eef2ff;
  color: #4f46e5;
}

.prep-icon-note {
  background: #e0f2fe;
  color: #0284c7;
}

.prep-icon-email {
  background: #fce7f3;
  color: #db2777;
}

.prep-icon-task {
  background: #fff7ed;
  color: #c2410c;
}

.prep-row-title {
  font-size: 0.84rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.3;
}

.prep-row-title-link {
  color: inherit;
  text-decoration: none;
}
.prep-row-title-link:hover {
  color: var(--primary-color);
}

.prep-row-desc {
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.4;
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.prep-row-participants {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px;
  margin-top: 2px;
  color: #64748b;
  font-size: 0.68rem;
  line-height: 1.35;
}

.prep-participant-chip {
  max-width: 100%;
  padding: 1px 5px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  background: #f8fafc;
  color: #475569;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: none;
}
.prep-participant-chip:hover {
  border-color: #c7d2fe;
  background: #eef2ff;
  color: #4338ca;
}

.prep-participant-avatar {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.prep-meeting-note-link {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  margin-top: 6px;
  padding: 6px 7px;
  border-left: 2px solid #7dd3fc;
  background: #f0f9ff;
  color: #475569;
  font-size: 0.68rem;
  line-height: 1.35;
  text-decoration: none;
}
.prep-meeting-note-link svg {
  margin-top: 1px;
  color: #0284c7;
  flex-shrink: 0;
}
.prep-meeting-note-link:hover {
  background: #e0f2fe;
  color: #0f172a;
}

.prep-meeting-note-label {
  color: #0284c7;
  font-weight: 700;
}

.prep-meeting-note-excerpt {
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prep-row-time {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 3px;
}

.prep-overdue {
  font-size: 0.72rem;
  color: #dc2626;
  font-weight: 700;
  margin-top: 2px;
}

.prep-due {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 2px;
}

.prep-empty {
  padding: 32px 16px;
  text-align: center;
  color: #94a3b8;
  font-size: 0.85rem;
}

.prep-fab {
  position: sticky;
  bottom: 0;
  z-index: 100;
  padding: 16px;
  background: linear-gradient(transparent, #f8fafc 40%);
  text-align: center;
}

.prep-fab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #0f172a;
  color: white;
  border-radius: 12px;
  padding: 14px 28px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.35);
  transition: all 0.2s;
}
.prep-fab-btn:hover {
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -4px rgba(15, 23, 42, 0.45);
}

/* Bright Brief – Dark Mode */
[data-bs-theme=dark] .prep-nav {
  background: rgba(15, 23, 42, 0.94);
  border-color: #334155;
}
[data-bs-theme=dark] .prep-nav-title {
  color: #f8fafc;
}
[data-bs-theme=dark] .prep-nav-note {
  border-color: #334155;
  color: #94a3b8;
}
[data-bs-theme=dark] .prep-nav-note:hover {
  border-color: #818cf8;
  color: #a5b4fc;
}
[data-bs-theme=dark] .prep-meeting-title {
  color: #f8fafc;
}
[data-bs-theme=dark] .prep-brief-meta {
  color: #94a3b8;
}
[data-bs-theme=dark] .prep-att-img {
  border-color: #334155;
}
[data-bs-theme=dark] .prep-att-name {
  color: #94a3b8;
}
[data-bs-theme=dark] .prep-desc {
  background: rgba(99, 102, 241, 0.07);
  color: #cbd5e1;
  border-color: #6366f1;
}
[data-bs-theme=dark] .prep-ai-card {
  background: linear-gradient(135deg, #1e1b4b, #172554);
  border-color: #4338ca;
}
[data-bs-theme=dark] .prep-ai-text {
  color: #e2e8f0;
}
[data-bs-theme=dark] .prep-ai-dot {
  background: #312e81;
  color: #a5b4fc;
}
[data-bs-theme=dark] .prep-ai-point-text {
  color: #cbd5e1;
}
[data-bs-theme=dark] .prep-ai-divider {
  background: repeating-linear-gradient(90deg, #4338ca 0, #4338ca 4px, transparent 4px, transparent 8px);
}
[data-bs-theme=dark] .prep-ai-spinner {
  border-color: #312e81;
  border-top-color: #818cf8;
}
[data-bs-theme=dark] .prep-ai-skeleton, [data-bs-theme=dark] .prep-ai-skeleton-dot {
  background: linear-gradient(90deg, #1e1b4b 25%, #312e81 50%, #1e1b4b 75%);
  background-size: 600px 100%;
}
[data-bs-theme=dark] .prep-section-label {
  color: #64748b;
}
[data-bs-theme=dark] .prep-card {
  background: #1e293b;
  border-color: #334155;
}
[data-bs-theme=dark] .prep-row {
  border-color: #334155;
}
[data-bs-theme=dark] .prep-row:hover {
  background: #334155;
}
[data-bs-theme=dark] .prep-row-title {
  color: #f1f5f9;
}
[data-bs-theme=dark] .prep-row-desc {
  color: #94a3b8;
}
[data-bs-theme=dark] .prep-participant-chip {
  background: #0f172a;
  border-color: #334155;
  color: #cbd5e1;
}
[data-bs-theme=dark] .prep-meeting-note-link {
  background: #0c4a6e;
  border-color: #38bdf8;
  color: #cbd5e1;
}
[data-bs-theme=dark] .prep-meeting-note-link:hover {
  background: #075985;
  color: #f8fafc;
}
[data-bs-theme=dark] .prep-meeting-note-label, [data-bs-theme=dark] .prep-meeting-note-link svg {
  color: #7dd3fc;
}
[data-bs-theme=dark] .prep-row-time {
  color: #64748b;
}
[data-bs-theme=dark] .prep-icon-meeting {
  background: #312e81;
  color: #a5b4fc;
}
[data-bs-theme=dark] .prep-icon-note {
  background: #0c4a6e;
  color: #7dd3fc;
}
[data-bs-theme=dark] .prep-icon-email {
  background: #831843;
  color: #f9a8d4;
}
[data-bs-theme=dark] .prep-icon-task {
  background: #7c2d12;
  color: #fdba74;
}
[data-bs-theme=dark] .prep-empty {
  color: #64748b;
}
[data-bs-theme=dark] .prep-fab {
  background: linear-gradient(transparent, #0f172a 40%);
}
[data-bs-theme=dark] .prep-fab-btn {
  background: #e2e8f0;
  color: #0f172a;
}
[data-bs-theme=dark] .prep-fab-btn:hover {
  color: #0f172a;
}

/* Bright Brief – Mobile */
@media (max-width: 860px) {
  .prep-body {
    grid-template-columns: 1fr;
  }
  .prep-primary {
    border-right: 0;
    border-bottom: 1px solid var(--border-color);
  }
  .prep-header {
    flex-wrap: wrap;
    gap: 1rem;
  }
  .prep-header-right {
    padding-top: 0;
  }
  .prep-meeting-title {
    font-size: 1.35rem;
  }
  .prep-ai-card {
    padding: 14px;
  }
  .prep-header, .prep-primary, .prep-secondary {
    padding-left: 16px;
    padding-right: 16px;
  }
  .prep-desc {
    padding-left: 16px;
    padding-right: 16px;
  }
}
/* Custom Tooltip */
.custom-tooltip {
  position: relative;
}
.custom-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-5px);
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  pointer-events: none;
  z-index: 1000;
}
.custom-tooltip:hover::after {
  opacity: 1;
  visibility: visible;
}

.category-mapping-help {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  cursor: help;
}
.category-mapping-help::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  width: max-content;
  max-width: min(320px, 100vw - 32px);
  padding: 8px 10px;
  border-radius: 6px;
  background: #0f172a;
  color: #f8fafc;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  text-align: left;
  white-space: normal;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s, visibility 0.15s;
  pointer-events: none;
  z-index: 1000;
}
.category-mapping-help:hover::after, .category-mapping-help:focus-visible::after {
  opacity: 1;
  visibility: visible;
}
.category-mapping-help:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Meeting Notes */
.note-item .note-delete-btn {
  opacity: 0;
  transition: opacity 0.2s;
}
.note-item:hover .note-delete-btn {
  opacity: 1;
}

/* Tighter spacing for note content to look like a memo */
.note-content p, .timeline-note-content p {
  margin-bottom: 0.5rem;
}
.note-content ul, .timeline-note-content ul, .note-content ol, .timeline-note-content ol {
  margin-bottom: 0.5rem;
}
.note-content li, .timeline-note-content li {
  margin-bottom: 0.1rem;
}
.note-content h1, .timeline-note-content h1, .note-content h2, .timeline-note-content h2, .note-content h3, .timeline-note-content h3, .note-content h4, .timeline-note-content h4, .note-content h5, .timeline-note-content h5, .note-content h6, .timeline-note-content h6 {
  margin-top: 0.75rem;
  margin-bottom: 0.25rem;
  font-weight: 600;
}
.note-content *:last-child, .timeline-note-content *:last-child {
  margin-bottom: 0;
}

/* Timeline title alignment */
.timeline-title-row h6 {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
}

/* Timeline add note action - show on hover */
.timeline-add-note-action,
.timeline-add-note-action-mobile {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.timeline-item:hover .timeline-add-note-action,
.timeline-item:hover .timeline-add-note-action-mobile {
  opacity: 1;
  pointer-events: auto;
}

/* Timeline event card enhancements */
.timeline-event-card {
  transition: background-color 0.2s ease;
  padding: 0.5rem;
  margin: -0.5rem;
}
.timeline-event-card:hover {
  background-color: rgba(0, 0, 0, 0.02);
  border-radius: 0.375rem;
}

/* Meeting Details Page */
.attendee-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px 6px 8px;
  border: 1px solid #dee2e6;
  border-radius: 20px;
  background-color: #fff;
  transition: background-color 0.2s;
}
.attendee-chip:hover {
  background-color: #f8f9fa;
}

/* Top relationship contact search dropdown */
.top-rel-search-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 50;
  margin-top: 2px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  max-height: 240px;
  overflow-y: auto;
}

.top-rel-search-result {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  font-size: 0.9375rem;
  color: #1e293b;
  transition: background-color 0.1s;
}
.top-rel-search-result:hover, .top-rel-search-result.is-highlighted {
  background-color: #f1f5f9;
}

.top-rel-search-result__meta {
  margin-left: auto;
  font-size: 0.75rem;
  color: #64748b;
  flex-shrink: 0;
}

.top-rel-search-result__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
}

.top-rel-search-result__swatch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
}

.top-rel-search-result__name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* @mention chips (note / task tagged contacts) */
.mention-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px 2px 10px;
  border: 1px solid #c7d2fe;
  border-radius: 14px;
  background-color: #eef2ff;
  color: #3730a3;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.4;
}

.mention-chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #6366f1;
  font-size: 0.875rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s;
}
.mention-chip-remove:hover {
  background-color: #c7d2fe;
  color: #3730a3;
}

/* Inline @mention links in rendered note body */
.mention-link {
  color: #4338ca;
  background: transparent;
  padding: 0;
  font-weight: 700;
  text-decoration: none;
}
.mention-link:hover {
  color: #6366f1;
  text-decoration: none;
}

.note-tagged-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 0;
}

/* ── Contact hover card ─────────────────────────────────────────────────────── */
.ccard {
  position: fixed;
  z-index: 9000;
  pointer-events: none;
  opacity: 0;
  transform: translateY(calc(-100% - 10px));
  transition: opacity 0.13s ease, transform 0.13s ease;
}
.ccard--visible {
  opacity: 1;
  pointer-events: auto;
}
.ccard[data-pos=below] {
  transform: translateY(calc(1.5em + 8px));
}
.ccard__link {
  display: block;
  padding: 10px 12px 9px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.1), 0 1px 4px rgba(15, 23, 42, 0.06);
  text-decoration: none;
  color: inherit;
  transition: background 0.1s;
}
.ccard__link:hover {
  background: #fafbff;
  text-decoration: none;
}
.ccard__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
}
.ccard__avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #eef2ff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.ccard__avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.ccard__initials {
  font-size: 0.72rem;
  font-weight: 700;
  color: #4338ca;
}
.ccard__intro {
  min-width: 0;
}
.ccard__name {
  font-size: 0.875rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.ccard__role {
  font-size: 0.78rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}
.ccard__title {
  font-size: 0.78rem;
  font-weight: 400;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}
.ccard__details {
  margin-top: 5px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-left: 48px;
}
.ccard__location {
  font-size: 0.73rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 4px;
}
.ccard__location::before {
  content: "📍";
  font-size: 0.65rem;
}
.ccard__bio {
  font-size: 0.73rem;
  color: #94a3b8;
  line-height: 1.45;
  font-style: italic;
}

[data-bs-theme=dark] .ccard__link {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
}
[data-bs-theme=dark] .ccard__link:hover {
  background: #243447;
}
[data-bs-theme=dark] .ccard__avatar {
  background: #1e1b4b;
}
[data-bs-theme=dark] .ccard__initials {
  color: #a5b4fc;
}
[data-bs-theme=dark] .ccard__name {
  color: #f1f5f9;
}
[data-bs-theme=dark] .ccard__title {
  color: #cbd5e1;
}
[data-bs-theme=dark] .ccard__role {
  color: #94a3b8;
}
[data-bs-theme=dark] .ccard__location {
  color: #94a3b8;
}
[data-bs-theme=dark] .ccard__bio {
  color: #64748b;
}

[data-bs-theme=dark] .top-rel-search-dropdown {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}
[data-bs-theme=dark] .top-rel-search-result {
  color: #f8fafc;
}
[data-bs-theme=dark] .top-rel-search-result:hover, [data-bs-theme=dark] .top-rel-search-result.is-highlighted {
  background-color: #334155;
}
[data-bs-theme=dark] .mention-chip {
  border-color: #4338ca;
  background-color: #1e1b4b;
  color: #a5b4fc;
}
[data-bs-theme=dark] .mention-chip-remove {
  color: #818cf8;
}
[data-bs-theme=dark] .mention-chip-remove:hover {
  background-color: #312e81;
  color: #c7d2fe;
}
[data-bs-theme=dark] .mention-link {
  color: #818cf8;
  background: transparent;
}
[data-bs-theme=dark] .mention-link:hover {
  color: #a5b4fc;
}

.description-content p, .description-content div {
  margin-bottom: 0.25rem;
}
.description-content p:last-child, .description-content div:last-child {
  margin-bottom: 0;
}
.description-content b, .description-content strong {
  color: var(--text-primary);
}

.description-truncated {
  max-height: 10em; /* Approx 6-7 lines */
  overflow: hidden;
  position: relative;
}
.description-truncated::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40px;
  background: linear-gradient(transparent, var(--card-bg, white));
}

.read-more-link {
  color: var(--primary-color);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  margin-top: 0.25rem;
  outline: none;
}
.read-more-link:hover {
  text-decoration: underline;
}

[data-bs-theme=dark] .description-truncated::after {
  background: linear-gradient(transparent, var(--sidebar-bg));
}
[data-bs-theme=dark] .card, [data-bs-theme=dark] .event-card {
  background-color: var(--sidebar-bg);
  border-color: var(--border-color);
}
[data-bs-theme=dark] .card-header {
  background-color: rgba(255, 255, 255, 0.03);
  border-bottom-color: var(--border-color);
  color: var(--text-primary);
}
[data-bs-theme=dark] .card-body {
  color: var(--text-primary);
}
[data-bs-theme=dark] .event-sidebar {
  background-color: var(--app-bg);
  border-color: var(--border-color);
}
[data-bs-theme=dark] .avatar-circle {
  background-color: var(--sidebar-bg);
  color: var(--text-primary);
}
[data-bs-theme=dark] .status-indicator {
  border-color: var(--app-bg);
}
[data-bs-theme=dark] .icon-box {
  color: var(--text-secondary);
}
[data-bs-theme=dark] .hover-bg-light:hover {
  background-color: rgba(255, 255, 255, 0.05);
}
[data-bs-theme=dark] .bg-white {
  background-color: var(--sidebar-bg) !important;
}
[data-bs-theme=dark] .text-dark {
  color: var(--text-primary) !important;
}
[data-bs-theme=dark] .text-muted {
  color: var(--text-secondary) !important;
}
[data-bs-theme=dark] .list-group-item {
  background-color: var(--sidebar-bg);
  border-color: var(--border-color);
  color: var(--text-primary);
}
[data-bs-theme=dark] .form-control, [data-bs-theme=dark] .form-select {
  background-color: var(--app-bg);
  border-color: var(--border-color);
  color: var(--text-primary);
}
[data-bs-theme=dark] .form-control:focus, [data-bs-theme=dark] .form-select:focus {
  background-color: var(--app-bg);
  color: var(--text-primary);
  border-color: var(--primary-color);
}
[data-bs-theme=dark] .segmented-control {
  background-color: var(--sidebar-bg);
  border: 1px solid var(--border-color);
}
[data-bs-theme=dark] .segmented-control .segment {
  color: var(--text-secondary);
}
[data-bs-theme=dark] .segmented-control .segment:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.05);
}
[data-bs-theme=dark] .segmented-control .segment.active {
  background-color: var(--primary-color);
  color: white;
}
[data-bs-theme=dark] .bg-light {
  background-color: rgba(255, 255, 255, 0.05) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
}
[data-bs-theme=dark] .settings-section {
  background-color: var(--sidebar-bg);
  border-color: var(--border-color);
}
[data-bs-theme=dark] .btn-quick-action {
  background-color: var(--sidebar-bg);
  border-color: var(--border-color);
  color: var(--text-primary);
}
[data-bs-theme=dark] .btn-quick-action:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: var(--primary-color);
  color: var(--text-primary);
}
[data-bs-theme=dark] .btn-quick-action:hover i {
  color: var(--text-primary);
}
[data-bs-theme=dark] .attendee-chip {
  background-color: var(--sidebar-bg);
  border-color: var(--border-color);
  color: var(--text-primary);
}
[data-bs-theme=dark] .attendee-chip:hover {
  background-color: rgba(255, 255, 255, 0.05);
}
[data-bs-theme=dark] .mobile-header {
  background-color: var(--sidebar-bg);
  border-color: var(--border-color);
}
[data-bs-theme=dark] .mobile-hamburger .hamburger-line {
  background: var(--text-primary);
}
[data-bs-theme=dark] .mobile-menu-dropdown {
  background-color: var(--sidebar-bg);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}
[data-bs-theme=dark] .mobile-nav-item {
  color: var(--text-secondary);
  border-bottom-color: var(--border-color);
}
[data-bs-theme=dark] .mobile-nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}
[data-bs-theme=dark] .mobile-nav-item.active {
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary-color);
}
[data-bs-theme=dark] .mobile-nav-divider {
  background: var(--border-color);
}
[data-bs-theme=dark] .mobile-menu-overlay {
  background: rgba(0, 0, 0, 0.5);
}
[data-bs-theme=dark] .sidebar-search .search-trigger {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-color);
  color: var(--text-secondary);
}
[data-bs-theme=dark] .sidebar-search .search-trigger:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-color);
}
[data-bs-theme=dark] .sidebar-search .search-trigger .search-trigger-shortcut {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-color);
  color: var(--text-secondary);
}
[data-bs-theme=dark] .shortcut-hint {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-color);
  color: var(--text-secondary);
}
[data-bs-theme=dark] .search-modal {
  background: var(--sidebar-bg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}
[data-bs-theme=dark] .search-input-wrapper {
  border-bottom-color: var(--border-color);
}
[data-bs-theme=dark] .search-input-icon {
  color: var(--text-secondary);
}
[data-bs-theme=dark] .search-input {
  color: var(--text-primary);
}
[data-bs-theme=dark] .search-input::placeholder {
  color: var(--text-secondary);
}
[data-bs-theme=dark] .search-close-btn {
  color: var(--text-secondary);
}
[data-bs-theme=dark] .search-close-btn:hover {
  color: var(--text-primary);
}
[data-bs-theme=dark] .search-section-title {
  color: var(--text-secondary);
}
[data-bs-theme=dark] .search-result:hover, [data-bs-theme=dark] .search-result.selected {
  background: rgba(255, 255, 255, 0.05);
}
[data-bs-theme=dark] .search-result-icon.person {
  background: rgba(59, 130, 246, 0.2);
}
[data-bs-theme=dark] .search-result-icon.note {
  background: rgba(245, 158, 11, 0.2);
}
[data-bs-theme=dark] .search-result-icon.event {
  background: rgba(34, 197, 94, 0.2);
}
[data-bs-theme=dark] .search-result-icon.reminder {
  background: rgba(236, 72, 153, 0.2);
}
[data-bs-theme=dark] .search-result-icon.group {
  background: rgba(99, 102, 241, 0.2);
}
[data-bs-theme=dark] .search-result-icon.recent {
  background: rgba(255, 255, 255, 0.1);
}
[data-bs-theme=dark] .search-result-title {
  color: var(--text-primary);
}
[data-bs-theme=dark] .search-result-title mark {
  background: rgba(250, 204, 21, 0.4);
  color: inherit;
}
[data-bs-theme=dark] .search-result-title-suffix {
  color: var(--text-secondary);
}
[data-bs-theme=dark] .search-result-subtitle {
  color: var(--text-secondary);
}
[data-bs-theme=dark] .search-empty {
  color: var(--text-secondary);
}
[data-bs-theme=dark] .search-no-results strong {
  color: var(--text-primary);
}
[data-bs-theme=dark] .search-create-person-cta {
  border-top-color: var(--border-color);
}
[data-bs-theme=dark] .search-loading {
  color: var(--text-secondary);
}
[data-bs-theme=dark] .search-spinner {
  border-color: rgba(255, 255, 255, 0.1);
  border-top-color: #6366f1;
}
[data-bs-theme=dark] .search-clear-recent {
  color: #818cf8;
}
[data-bs-theme=dark] .search-clear-recent:hover {
  color: #a5b4fc;
}
[data-bs-theme=dark] .search-footer {
  border-top-color: var(--border-color);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
}
[data-bs-theme=dark] .search-hint kbd {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-color);
  color: var(--text-primary);
  box-shadow: 0 1px 0 var(--border-color);
}

/* Google Sign In Button */
.google-btn-dark {
  display: none;
}

/* Pagination responsive styles */
.pagination-input {
  width: 3.5rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  text-align: center;
  font-size: 0.875rem;
  background: transparent;
  color: var(--text-primary);
}
.pagination-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.15);
}
.pagination-input {
  /* Hide number input spinners */
}
.pagination-input::-webkit-outer-spin-button, .pagination-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.pagination-input {
  -moz-appearance: textfield;
}

[data-bs-theme=dark] .google-btn-light {
  display: none;
}
[data-bs-theme=dark] .google-btn-dark {
  display: block;
}

[data-bs-theme=dark] .btn-outline-secondary {
  color: var(--text-secondary);
  border-color: var(--border-color);
}
[data-bs-theme=dark] .btn-outline-secondary:hover, [data-bs-theme=dark] .btn-outline-secondary:focus, [data-bs-theme=dark] .btn-outline-secondary:active {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.05);
  border-color: var(--text-secondary);
}

/* ===================================
   Notes Section Styles
   =================================== */
/* Filter Tabs + Sort Toolbar */
.notes-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
  gap: 12px;
}

.notes-sort {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding-bottom: 1px;
}

.notes-sort-label {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  margin: 0;
}

.notes-sort-select {
  font-size: 13px;
  color: var(--text-primary);
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 3px 24px 3px 8px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 7px center;
  cursor: pointer;
  transition: border-color 0.15s;
}
.notes-sort-select:hover {
  border-color: var(--primary-color);
}
.notes-sort-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

[data-bs-theme=dark] .notes-sort-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Coming Soon Badge */
.coming-soon-badge {
  font-size: 0.7rem;
  background: #e2e8f0;
  color: #64748b;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

[data-bs-theme=dark] .coming-soon-badge {
  background: #334155;
  color: #94a3b8;
}

/* Filter Tabs */
.filter-bar {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}

.contacts-filter-row {
  display: flex;
  align-items: center;
  position: relative;
}
.contacts-filter-row .dropdown {
  position: static;
}

.filter-tabs {
  display: flex;
  flex: 1;
  gap: 4px;
  margin-bottom: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.filter-tabs::-webkit-scrollbar {
  display: none;
}

.filter-tab {
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s;
  white-space: nowrap;
}
.filter-tab:hover {
  color: var(--text-primary);
  text-decoration: none;
}
.filter-tab.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
  font-weight: 500;
}

.filter-tab-btn {
  background: none;
  border: none;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.filter-tab-btn.filter-tab-btn--active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
  font-weight: 500;
}
.filter-tab-btn.filter-tab-btn--outlined {
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 5px 10px 5px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.filter-tab-btn.filter-tab-btn--outlined:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: rgba(79, 70, 229, 0.04);
}
.filter-tab-btn.filter-tab-btn--outlined[aria-expanded=true] {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: rgba(79, 70, 229, 0.05);
}
.filter-tab-btn.filter-tab-btn--outlined.filter-tab-btn--active {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: rgba(79, 70, 229, 0.06);
}
.filter-tab-btn.filter-tab-btn--outlined .filter-tab-btn__chevron {
  opacity: 0.4;
  transition: transform 0.15s, opacity 0.15s;
}
.filter-tab-btn.filter-tab-btn--outlined[aria-expanded=true] .filter-tab-btn__chevron, .filter-tab-btn.filter-tab-btn--outlined:hover .filter-tab-btn__chevron {
  transform: rotate(180deg);
  opacity: 0.8;
}
.filter-tab-btn.filter-tab-btn--outlined.filter-tab-btn--active .filter-tab-btn__chevron {
  opacity: 0.8;
}

/* ── Contact filter dropdown ─────────────────────────────────────────── */
.contact-filter-dropdown {
  min-width: 520px;
  padding: 24px 20px !important;
  border-radius: 12px;
  border: 1px solid var(--border-color) !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.16), 0 2px 8px rgba(0, 0, 0, 0.08);
  background: var(--card-bg);
  user-select: none;
}
.contact-filter-dropdown__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.contact-filter-dropdown__title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}
.contact-filter-dropdown__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
  user-select: auto;
}
.contact-filter-dropdown__footer {
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
}
.contact-filter-dropdown .tw-input,
.contact-filter-dropdown .tw-select,
.contact-filter-dropdown .form-control,
.contact-filter-dropdown .form-select {
  background-color: var(--app-bg);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 13px;
  padding: 6px 10px;
  height: 34px;
  box-shadow: none;
  transition: border-color 0.15s;
}
.contact-filter-dropdown .tw-input:focus,
.contact-filter-dropdown .tw-select:focus,
.contact-filter-dropdown .form-control:focus,
.contact-filter-dropdown .form-select:focus {
  background-color: var(--app-bg);
  color: var(--text-primary);
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
  outline: none;
}
.contact-filter-dropdown .tw-input::placeholder,
.contact-filter-dropdown .tw-select::placeholder,
.contact-filter-dropdown .form-control::placeholder,
.contact-filter-dropdown .form-select::placeholder {
  color: var(--text-secondary);
  opacity: 0.6;
}
.contact-filter-dropdown .tw-select,
.contact-filter-dropdown .form-select {
  padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.contact-filter-dropdown .tw-form-check,
.contact-filter-dropdown .form-check {
  gap: 8px;
  padding-bottom: 4px;
}
.contact-filter-dropdown .tw-checkbox,
.contact-filter-dropdown .form-check-input {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
.contact-filter-dropdown .tw-checkbox:checked,
.contact-filter-dropdown .form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.contact-filter-clear {
  font-size: 12px;
  color: var(--primary-color);
  text-decoration: none;
}
.contact-filter-clear:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.contact-filter-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  margin-bottom: 5px;
}

.filter-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  background: var(--primary-color);
  color: #fff;
}

.contacts-result-count {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ── Active filter chips (contacts index) ────────────────────────────── */
.contacts-filter-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.contacts-filter-row {
  padding: 4px 0 4px;
}
.contacts-filter-row__left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.contacts-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  background: rgba(79, 70, 229, 0.08);
  color: var(--primary-color);
  border: 1px solid rgba(79, 70, 229, 0.2);
  text-decoration: none;
  transition: background 0.15s;
}
.contacts-filter-chip:hover {
  background: rgba(79, 70, 229, 0.15);
  color: var(--primary-color);
  text-decoration: none;
}
.contacts-filter-chip svg {
  flex-shrink: 0;
  opacity: 0.6;
}

@media (max-width: 768px) {
  .contact-filter-dropdown {
    right: 0;
    left: 0;
    min-width: 0;
    max-height: 80vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .contact-filter-dropdown__grid {
    grid-template-columns: 1fr;
  }
}
[data-bs-theme=dark] .contact-filter-dropdown {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
[data-bs-theme=dark] .contacts-filter-chip {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.25);
}
[data-bs-theme=dark] .contacts-filter-chip:hover {
  background: rgba(99, 102, 241, 0.2);
}

/* Note Cards */
.note-card {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  background: var(--sidebar-bg);
  transition: border-color 0.2s, background-color 0.2s;
}

a.note-card:hover {
  border-color: var(--primary-color);
  background-color: var(--app-bg);
  cursor: pointer;
}

.note-list-item {
  position: relative;
  margin-bottom: 8px;
}
.note-list-item__delete {
  position: absolute;
  top: 12px;
  right: 12px;
  color: var(--text-muted, #94a3b8);
  opacity: 0;
  transition: opacity 0.15s;
  line-height: 1;
  text-decoration: none;
}
.note-list-item__delete:hover {
  color: #ef4444;
  opacity: 1;
}
.note-list-item:hover .note-list-item__delete {
  opacity: 1;
}

.note-preview {
  color: var(--text-secondary);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.note-meta {
  font-size: 12px;
  color: #adb5bd;
  white-space: nowrap;
}

.note-index-share-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary-color);
  background: rgba(99, 102, 241, 0.1);
  border-radius: 10px;
  padding: 2px 7px;
  white-space: nowrap;
}
.note-index-share-badge svg {
  opacity: 0.8;
}

.note-index-comment-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border-radius: 10px;
  padding: 2px 7px;
  background: rgba(100, 116, 139, 0.1);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.note-index-comment-badge svg {
  opacity: 0.8;
}

[data-bs-theme=dark] .note-index-share-badge {
  background: rgba(99, 102, 241, 0.18);
}

[data-bs-theme=dark] .note-index-comment-badge {
  background: rgba(148, 163, 184, 0.16);
}

.note-type-badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.badge-meeting {
  background: #e0f2fe;
  color: #0284c7;
}

.badge-contact {
  background: #dcfce7;
  color: #16a34a;
}

.badge-self {
  background: #f3e8ff;
  color: #9333ea;
}

[data-bs-theme=dark] .badge-meeting {
  background: rgba(2, 132, 199, 0.2);
  color: #7dd3fc;
}
[data-bs-theme=dark] .badge-contact {
  background: rgba(22, 163, 74, 0.2);
  color: #86efac;
}
[data-bs-theme=dark] .badge-self {
  background: rgba(147, 51, 234, 0.2);
  color: #d8b4fe;
}

/* Share Dialog */
.share-dialog {
  border: none;
  border-radius: 0.5rem;
  padding: 0;
  width: 95%;
  max-width: 520px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
.share-dialog .card-header {
  padding: 16px 20px;
}
.share-dialog .card-body {
  padding: 20px;
}

.share-url-box {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.share-url {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  font-size: 13px;
  color: var(--text-secondary);
  flex: 1;
  min-width: 0;
}

.share-link-banner {
  background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 100%);
  border: 1px solid #bae6fd;
  border-radius: 8px;
  padding: 10px 16px;
}
.share-link-banner .share-url {
  font-size: 12px;
}

[data-bs-theme=dark] .share-link-banner {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.15) 0%, rgba(37, 99, 235, 0.15) 100%);
  border-color: rgba(56, 189, 248, 0.3);
}

[data-bs-theme=dark] .share-url-box {
  background: rgba(0, 0, 0, 0.2);
}

/* Meeting Link Callout */
.meeting-link-callout {
  background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 100%);
  border: 1px solid #bae6fd;
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

[data-bs-theme=dark] .meeting-link-callout {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.15) 0%, rgba(37, 99, 235, 0.15) 100%);
  border-color: rgba(56, 189, 248, 0.3);
}

/* External Attendee Chip */
.attendee-chip.external-attendee {
  background: #f8f9fa;
  border-style: dashed;
}

[data-bs-theme=dark] .attendee-chip.external-attendee {
  background: rgba(255, 255, 255, 0.05);
}

/* ===================================
   Public Note Page Styles
   =================================== */
.public-note-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.public-note-page article {
  flex: 1;
}

.public-note-header {
  margin-bottom: 20px;
}

.public-note-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.public-note-meta-dot {
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1;
}

.public-note-checklist-inline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.public-note-ring-summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ring-track {
  fill: none;
  stroke: #e2e8f0;
  stroke-width: 3;
}

.ring-fill {
  fill: none;
  stroke: #6366f1;
  stroke-width: 3;
  stroke-dasharray: 56.55;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  transition: stroke-dashoffset 0.4s ease;
}

.ring-label {
  font-size: 13px;
  color: #64748b;
}

.ring-label strong {
  color: #1e293b;
  font-weight: 600;
}

[data-bs-theme=dark] .ring-track {
  stroke: #334155;
}
[data-bs-theme=dark] .ring-fill {
  stroke: #818cf8;
}
[data-bs-theme=dark] .ring-label {
  color: #94a3b8;
}
[data-bs-theme=dark] .ring-label strong {
  color: #f1f5f9;
}
[data-bs-theme=dark] .public-note-meta-dot {
  color: #334155;
}

.public-note-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 8px;
}

.public-note-date {
  color: #64748b;
  font-size: 14px;
}

.public-note-content {
  font-size: 16px;
  line-height: 1.7;
  color: #334155;
  overflow-wrap: break-word;
  word-break: break-word;
}
.public-note-content h1, .public-note-content h2, .public-note-content h3, .public-note-content h4, .public-note-content h5, .public-note-content h6 {
  color: #1e293b;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}
.public-note-content h1 {
  font-size: 1.5rem;
}
.public-note-content h2 {
  font-size: 1.25rem;
}
.public-note-content h3 {
  font-size: 1.1rem;
}
.public-note-content p {
  margin-bottom: 1em;
}
.public-note-content ul, .public-note-content ol {
  margin-bottom: 1em;
  padding-left: 1.5em;
}
.public-note-content ul {
  list-style-type: disc;
}
.public-note-content ol {
  list-style-type: decimal;
}
.public-note-content ul ul {
  list-style-type: circle;
}
.public-note-content li {
  margin-bottom: 0.5em;
}
.public-note-content code {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}
.public-note-content pre {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  overflow-x: auto;
}
.public-note-content blockquote {
  border-left: 3px solid #e2e8f0;
  padding-left: 16px;
  margin: 1em 0;
  color: #64748b;
}
.public-note-content img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  display: block;
}

.powered-by {
  text-align: center;
  padding: 24px;
  color: #94a3b8;
  font-size: 13px;
  border-top: 1px solid #e2e8f0;
  margin-top: 48px;
}

.powered-by-logo {
  width: 16px;
  height: 16px;
}

@media (max-width: 768px) {
  .public-note-page {
    padding: 24px 16px;
  }
  .public-note-title {
    font-size: 1.5rem;
  }
  .notes-toolbar {
    flex-wrap: wrap;
    gap: 0;
  }
  .notes-toolbar .filter-tabs {
    margin-left: -12px;
    margin-right: -12px;
    padding-left: 12px;
    padding-right: 12px;
    /* Fade hint for scrollable content */
    mask-image: linear-gradient(to right, black calc(100% - 24px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black calc(100% - 24px), transparent 100%);
    order: 1;
    width: calc(100% + 24px);
    padding-bottom: 0;
    margin-bottom: 10px;
  }
  .notes-toolbar .notes-sort {
    order: 2;
    padding: 0 0 12px;
  }
  .filter-tab {
    padding: 8px 12px;
    font-size: 13px;
  }
}
/* Mobile Floating Action Button */
.mobile-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  background: var(--primary-color);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
  cursor: pointer;
  z-index: 100;
  transition: transform 0.15s, box-shadow 0.15s;
}
.mobile-fab svg {
  width: 24px;
  height: 24px;
}
.mobile-fab:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.5);
}
.mobile-fab:active {
  transform: scale(0.95);
}

/* ==========================
   Search Page Styles
   ========================== */
.search-page-header {
  margin-bottom: 1.5rem;
}
.search-page-header h1 {
  margin-bottom: 1rem;
}

.search-input-large {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.875rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-input-large:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}
.search-input-large .search-input-icon-lg {
  color: #94a3b8;
  flex-shrink: 0;
}
.search-input-large .search-form {
  flex: 1;
  display: flex;
  align-items: center;
}
.search-input-large .search-page-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
  background: transparent;
  color: var(--text-primary);
}
.search-input-large .search-page-input::placeholder {
  color: #94a3b8;
}
.search-input-large .search-clear-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: #f1f5f9;
  border: none;
  border-radius: 50%;
  color: #64748b;
  cursor: pointer;
  transition: background 0.15s;
}
.search-input-large .search-clear-btn:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.search-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.filter-pills {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: 1.25rem;
  font-size: 0.8125rem;
  background: #f1f5f9;
  color: #64748b;
  text-decoration: none;
  transition: all 0.15s;
}
.filter-pill:hover {
  background: #e2e8f0;
  text-decoration: none;
  color: #475569;
}
.filter-pill.active {
  background: var(--primary-color);
  color: white;
}
.filter-pill.active .filter-count {
  background: rgba(255, 255, 255, 0.2);
}
.filter-pill .filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  padding: 0.125rem 0.5rem;
  border-radius: 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  background: #e2e8f0;
}

.search-sort {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.search-sort .sort-label {
  font-size: 0.875rem;
  color: #64748b;
  white-space: nowrap;
}
.search-sort .sort-form {
  display: inline-flex;
}
.search-sort .sort-select {
  padding: 0.375rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  color: var(--text-primary);
  background: white;
  cursor: pointer;
}
.search-sort .sort-select:focus {
  outline: none;
  border-color: var(--primary-color);
}

.search-results-summary {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: #64748b;
}
.search-results-summary strong {
  color: var(--text-primary);
}

.search-results-container {
  overflow: hidden;
}

.search-section {
  border-bottom: 1px solid #e2e8f0;
}
.search-section:last-child {
  border-bottom: none;
}

.search-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid #e2e8f0;
}
.search-section-header h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}
.search-section-header h2 .section-icon {
  color: #64748b;
}
.search-section-header .view-all-link {
  font-size: 0.8125rem;
  color: var(--primary-color);
  font-weight: 500;
  text-decoration: none;
}
.search-section-header .view-all-link:hover {
  text-decoration: underline;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: background 0.1s;
  text-decoration: none;
  color: inherit;
}
.search-result-item:last-child {
  border-bottom: none;
}
.search-result-item:hover {
  background: #f8fafc;
  text-decoration: none;
}
.search-result-item.resolved {
  opacity: 0.7;
}

.result-avatar {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}
.result-avatar img {
  width: 24px;
  height: 24px;
  object-fit: cover;
}

.result-content {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow: hidden;
}

.result-name {
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  flex-shrink: 0;
}
.result-name mark {
  background: #fef08a;
  color: inherit;
  padding: 0.0625rem 0.1875rem;
  border-radius: 0.1875rem;
}

.result-secondary {
  color: #94a3b8;
  font-size: 0.8125rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.result-spacer {
  width: 24px;
  flex-shrink: 0;
}

.result-type-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
}

.result-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.8125rem;
  color: #64748b;
}
.result-meta span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.result-date {
  font-size: 0.8125rem;
  color: #94a3b8;
  flex-shrink: 0;
  text-align: right;
  white-space: nowrap;
}

.search-pagination {
  display: flex;
  justify-content: center;
  padding: 1rem;
  border-top: 1px solid #e2e8f0;
}

.search-empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: #64748b;
}
.search-empty-state .search-empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}
.search-empty-state h3 {
  font-size: 1.125rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}
.search-empty-state p {
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

.search-tips-box {
  max-width: 400px;
  margin: 0 auto;
  text-align: left;
  padding: 2rem;
  background: white;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
}
.search-tips-box h3 {
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
}
.search-tips-box ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}
.search-tips-box ul li {
  padding: 0.5rem 0;
  font-size: 0.875rem;
  color: #64748b;
}
.search-tips-box ul li strong {
  color: var(--text-primary);
}
.search-tips-box .keyboard-hint {
  text-align: center;
  font-size: 0.875rem;
  color: #94a3b8;
  margin: 0;
}
.search-tips-box .keyboard-hint kbd {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 0.25rem;
  font-family: monospace;
  font-size: 0.8125rem;
  margin-right: 0.25rem;
}

/* Search Page Mobile Styles */
@media (max-width: 768px) {
  .search-page-header h1 {
    font-size: 1.25rem;
  }
  .search-input-large {
    padding: 0.75rem 1rem;
  }
  .search-filters {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .filter-pills {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.25rem;
    -webkit-overflow-scrolling: touch;
  }
  .filter-pills::-webkit-scrollbar {
    display: none;
  }
  .filter-pill {
    flex-shrink: 0;
    padding: 0.5rem 0.875rem;
    font-size: 0.8125rem;
  }
  .search-sort {
    justify-content: flex-end;
  }
  .search-result-item {
    padding: 0.75rem 1rem;
  }
  .result-avatar {
    width: 32px;
    height: 32px;
  }
  .result-date {
    display: none;
  }
}
/* Search Page Dark Mode */
[data-bs-theme=dark] .search-input-large {
  border-color: #334155;
}
[data-bs-theme=dark] .search-input-large:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}
[data-bs-theme=dark] .search-input-large .search-clear-btn {
  background: #334155;
  color: #94a3b8;
}
[data-bs-theme=dark] .search-input-large .search-clear-btn:hover {
  background: #475569;
  color: #f1f5f9;
}
[data-bs-theme=dark] .filter-pill {
  background: #334155;
  color: #94a3b8;
}
[data-bs-theme=dark] .filter-pill:hover {
  background: #475569;
  color: #cbd5e1;
}
[data-bs-theme=dark] .filter-pill.active {
  background: var(--primary-color);
  color: white;
}
[data-bs-theme=dark] .filter-pill .filter-count {
  background: #475569;
}
[data-bs-theme=dark] .sort-select {
  background: #1e293b;
  border-color: #334155;
  color: var(--text-primary);
}
[data-bs-theme=dark] .sort-select:focus {
  border-color: var(--primary-color);
}
[data-bs-theme=dark] .search-results-summary {
  color: #94a3b8;
}
[data-bs-theme=dark] .search-section {
  border-color: #334155;
}
[data-bs-theme=dark] .search-section-header {
  border-color: #334155;
}
[data-bs-theme=dark] .search-section-header h2 .section-icon {
  color: #94a3b8;
}
[data-bs-theme=dark] .search-result-item {
  border-color: #334155;
}
[data-bs-theme=dark] .search-result-item:hover {
  background: #334155;
}
[data-bs-theme=dark] .result-title mark,
[data-bs-theme=dark] .result-name mark {
  background: #854d0e;
  color: #fef08a;
}
[data-bs-theme=dark] .result-icon.note {
  background: rgba(254, 243, 199, 0.15);
}
[data-bs-theme=dark] .result-icon.event {
  background: rgba(220, 252, 231, 0.15);
}
[data-bs-theme=dark] .result-icon.reminder {
  background: rgba(252, 231, 243, 0.15);
}
[data-bs-theme=dark] .result-meta,
[data-bs-theme=dark] .result-secondary {
  color: #94a3b8;
}
[data-bs-theme=dark] .result-date {
  color: #64748b;
}
[data-bs-theme=dark] .search-pagination {
  border-color: #334155;
}
[data-bs-theme=dark] .search-empty-state {
  color: #94a3b8;
}
[data-bs-theme=dark] .search-empty-state h3 {
  color: var(--text-primary);
}
[data-bs-theme=dark] .search-tips-box {
  background: #1e293b;
  border-color: #334155;
}
[data-bs-theme=dark] .search-tips-box h3 {
  color: var(--text-primary);
}
[data-bs-theme=dark] .search-tips-box ul li {
  color: #94a3b8;
}
[data-bs-theme=dark] .search-tips-box ul li strong {
  color: var(--text-primary);
}
[data-bs-theme=dark] .search-tips-box .keyboard-hint {
  color: #64748b;
}
[data-bs-theme=dark] .search-tips-box .keyboard-hint kbd {
  background: #334155;
  border-color: #475569;
  color: #cbd5e1;
}

/* Groups Feature Styles */
.group-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.group-color-dot-lg {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* Group color options */
.group-color-blue {
  background-color: #3b82f6;
}

.group-color-green {
  background-color: #10b981;
}

.group-color-yellow {
  background-color: #f59e0b;
}

.group-color-purple {
  background-color: #8b5cf6;
}

.group-color-pink {
  background-color: #ec4899;
}

.group-color-orange {
  background-color: #f97316;
}

.group-color-red {
  background-color: #ef4444;
}

.group-color-teal {
  background-color: #14b8a6;
}

.group-color-custom { /* Inline style will be applied */ }

/* Group badge styles */
.group-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  gap: 0.35rem;
  text-decoration: none;
  transition: opacity 0.15s ease;
}
.group-badge:hover {
  opacity: 0.8;
  text-decoration: none;
}

.group-badge-blue {
  background-color: #dbeafe;
  color: #1e40af;
}

.group-badge-green {
  background-color: #d1fae5;
  color: #065f46;
}

.group-badge-yellow {
  background-color: #fef3c7;
  color: #92400e;
}

.group-badge-purple {
  background-color: #ede9fe;
  color: #5b21b6;
}

.group-badge-pink {
  background-color: #fce7f3;
  color: #9d174d;
}

.group-badge-orange {
  background-color: #ffedd5;
  color: #c2410c;
}

.group-badge-red {
  background-color: #fee2e2;
  color: #b91c1c;
}

.group-badge-teal {
  background-color: #ccfbf1;
  color: #0f766e;
}

.group-badge-custom { /* Inline styles applied for custom colors */ }

/* Group card hover */
.group-card {
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.group-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

/* Group color picker */
.group-color-picker {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.group-color-option {
  cursor: pointer;
}

.group-color-radio {
  display: none;
}
.group-color-radio:checked + .group-color-swatch {
  box-shadow: 0 0 0 2px white, 0 0 0 4px var(--primary-color);
}

.group-color-swatch {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  transition: box-shadow 0.15s ease;
}
.group-color-swatch:hover {
  box-shadow: 0 0 0 2px white, 0 0 0 4px #cbd5e1;
}

/* Groups section on contact page */
.contact-groups-section .group-badge {
  margin-right: 0.25rem;
  margin-bottom: 0.25rem;
}

/* Add member search results */
.add-member-results {
  max-height: 300px;
  overflow-y: auto;
}

.add-member-item {
  display: flex;
  align-items: center;
  padding: 0.5rem;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.add-member-item:hover {
  background-color: #f1f5f9;
}
.add-member-item.already-member {
  opacity: 0.5;
  cursor: default;
}
.add-member-item.already-member:hover {
  background-color: transparent;
}

/* Group member list with hover delete */
.group-member-item {
  position: relative;
}

.member-engagement {
  color: #94a3b8;
  font-size: 0.82rem;
  line-height: 1.3;
}

.member-rel-label {
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 400;
  white-space: nowrap;
}

[data-bs-theme=dark] .member-rel-label {
  color: #64748b;
}

.group-member-delete {
  opacity: 0;
  transition: opacity 0.15s ease;
}

.group-member-item:hover .group-member-delete {
  opacity: 1;
}

/* Group show header - responsive layout */
.group-show-header .group-color-dot-lg {
  margin-top: 0.6rem;
}

@media (min-width: 768px) {
  .group-show-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
  }
  .group-show-header > .d-flex:first-child {
    flex: 1;
    margin-bottom: 0 !important;
  }
}
/* Dark mode for groups */
[data-bs-theme=dark] .group-badge-blue {
  background-color: #1e3a5f;
  color: #93c5fd;
}
[data-bs-theme=dark] .group-badge-green {
  background-color: #064e3b;
  color: #6ee7b7;
}
[data-bs-theme=dark] .group-badge-yellow {
  background-color: #78350f;
  color: #fcd34d;
}
[data-bs-theme=dark] .group-badge-purple {
  background-color: #4c1d95;
  color: #c4b5fd;
}
[data-bs-theme=dark] .group-badge-pink {
  background-color: #831843;
  color: #f9a8d4;
}
[data-bs-theme=dark] .group-badge-orange {
  background-color: #7c2d12;
  color: #fdba74;
}
[data-bs-theme=dark] .group-badge-red {
  background-color: #7f1d1d;
  color: #fca5a5;
}
[data-bs-theme=dark] .group-badge-teal {
  background-color: #134e4a;
  color: #5eead4;
}
[data-bs-theme=dark] .group-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
[data-bs-theme=dark] .group-color-radio:checked + .group-color-swatch {
  box-shadow: 0 0 0 2px #1e293b, 0 0 0 4px var(--primary-color);
}
[data-bs-theme=dark] .group-color-swatch:hover {
  box-shadow: 0 0 0 2px #1e293b, 0 0 0 4px #475569;
}
[data-bs-theme=dark] .add-member-item:hover {
  background-color: #334155;
}
[data-bs-theme=dark] .add-member-item {
  background-color: transparent;
  color: #f8fafc;
}
[data-bs-theme=dark] .add-member-item:hover {
  background-color: #334155;
}
[data-bs-theme=dark] {
  /* Group member list with hover delete */
}
[data-bs-theme=dark] .group-member-item {
  position: relative;
  border-bottom-color: #334155;
}
[data-bs-theme=dark] .member-engagement {
  color: #64748b;
}
[data-bs-theme=dark] .group-member-delete {
  opacity: 0;
  transition: opacity 0.15s ease;
  color: #94a3b8;
}
[data-bs-theme=dark] .group-member-item:hover .group-member-delete {
  opacity: 1;
  color: #f87171;
}
[data-bs-theme=dark] .group-show-header {
  border-bottom-color: #334155;
}
[data-bs-theme=dark] .group-show-header h1, [data-bs-theme=dark] .group-show-header h2, [data-bs-theme=dark] .group-show-header h3 {
  color: #f8fafc;
}
[data-bs-theme=dark] .group-show-header p {
  color: #cbd5e1;
}
[data-bs-theme=dark] .custom-color-section p {
  color: #94a3b8;
}
[data-bs-theme=dark] .stat-card {
  background-color: #334155;
  color: #f8fafc;
}
[data-bs-theme=dark] .nav-tabs-custom {
  border-bottom-color: #334155;
}
[data-bs-theme=dark] .nav-tabs-custom .nav-link {
  color: #94a3b8;
}
[data-bs-theme=dark] .nav-tabs-custom .nav-link.active {
  color: #60a5fa;
  border-bottom-color: #60a5fa;
}
[data-bs-theme=dark] .reconnect-alert {
  background-color: #334155;
  border-left-color: #f59e0b;
  color: #f8fafc;
}
[data-bs-theme=dark] .reconnect-alert.reconnect-urgent {
  background-color: #7f1d1d;
  border-left-color: #ef4444;
}
[data-bs-theme=dark] .last-contact {
  color: #94a3b8;
}
[data-bs-theme=dark] .last-contact.overdue {
  color: #fca5a5;
}
[data-bs-theme=dark] .member-row:hover {
  background-color: #334155;
}
[data-bs-theme=dark] .filter-pill {
  background-color: #334155;
  color: #cbd5e1;
  border-color: #475569;
}
[data-bs-theme=dark] .filter-pill.active {
  background-color: #3b82f6;
  color: white;
}

.group-member-item {
  position: relative;
  border-bottom: 1px solid #f1f5f9;
}

.group-member-delete {
  opacity: 0;
  transition: opacity 0.15s ease;
  color: #94a3b8;
  cursor: pointer;
}

.group-member-item:hover .group-member-delete {
  opacity: 1;
}

[data-bs-theme=dark] .group-member-item {
  border-bottom-color: #334155;
}
[data-bs-theme=dark] .group-member-delete {
  color: #94a3b8;
}
[data-bs-theme=dark] .group-member-delete:hover {
  color: #ef4444;
}
[data-bs-theme=dark] {
  /* Groups form */
}
[data-bs-theme=dark] .group-form input[type=text],
[data-bs-theme=dark] .group-form input[type=email],
[data-bs-theme=dark] .group-form textarea {
  background-color: #1e293b;
  border-color: #475569;
  color: #f8fafc;
}
[data-bs-theme=dark] .group-form input[type=text]::placeholder,
[data-bs-theme=dark] .group-form input[type=email]::placeholder,
[data-bs-theme=dark] .group-form textarea::placeholder {
  color: #64748b;
}
[data-bs-theme=dark] .group-form input[type=text]:focus,
[data-bs-theme=dark] .group-form input[type=email]:focus,
[data-bs-theme=dark] .group-form textarea:focus {
  background-color: #1e293b;
  border-color: #3b82f6;
  color: #f8fafc;
}
[data-bs-theme=dark] .group-color-picker .group-color-option:has(input:checked) .group-color-swatch {
  box-shadow: 0 0 0 2px #1e293b, 0 0 0 4px #60a5fa;
}
[data-bs-theme=dark] .custom-color-section p {
  color: #94a3b8;
}
[data-bs-theme=dark] .custom-color-section input[type=text] {
  background-color: #1e293b;
  border-color: #475569;
  color: #f8fafc;
}
[data-bs-theme=dark] .custom-color-section input[type=text]::placeholder {
  color: #64748b;
}
[data-bs-theme=dark] .custom-color-section input[type=text]:focus {
  background-color: #1e293b;
  border-color: #3b82f6;
  color: #f8fafc;
}
[data-bs-theme=dark] .custom-color-section input[type=color] {
  background-color: #1e293b;
  border-color: #475569;
  cursor: pointer;
}
[data-bs-theme=dark] {
  /* Groups list view - consolidated */
}
[data-bs-theme=dark] .groups-list {
  background-color: #1e293b;
  border-color: #334155;
}
[data-bs-theme=dark] .group-list-item {
  background-color: #1e293b;
  border-bottom-color: #334155;
  color: #f8fafc;
}
[data-bs-theme=dark] .group-list-item:hover {
  background-color: #334155;
}
[data-bs-theme=dark] .group-name {
  color: #f8fafc;
}
[data-bs-theme=dark] .group-description {
  color: #94a3b8;
}
[data-bs-theme=dark] .group-members {
  color: #94a3b8;
}
[data-bs-theme=dark] .more-members {
  color: #94a3b8;
}
[data-bs-theme=dark] .avatar-circle {
  background-color: #334155;
  border-color: #475569;
  color: #cbd5e1;
  box-shadow: 0 0 0 0.5px #475569;
}
[data-bs-theme=dark] .count-badge {
  background-color: #334155;
  color: #cbd5e1;
}
[data-bs-theme=dark] .group-meta {
  color: #94a3b8;
}
[data-bs-theme=dark] {
  /* Group show page */
}
[data-bs-theme=dark] .group-show-header {
  border-bottom-color: #334155;
}
[data-bs-theme=dark] .stat-card {
  background-color: #334155;
  color: #f8fafc;
}
[data-bs-theme=dark] .nav-tabs-custom {
  border-bottom-color: #334155;
}
[data-bs-theme=dark] .nav-tabs-custom .nav-link {
  color: #94a3b8;
}
[data-bs-theme=dark] .nav-tabs-custom .nav-link.active {
  color: #60a5fa;
}
[data-bs-theme=dark] .nav-tabs-custom .nav-link.active::after {
  background-color: #60a5fa;
}
[data-bs-theme=dark] .activity-item {
  border-bottom-color: #334155;
}
[data-bs-theme=dark] .activity-icon {
  background-color: transparent;
}
[data-bs-theme=dark] {
  /* Add member modal and form */
}
[data-bs-theme=dark] dialog {
  background-color: #1e293b;
  color: #f8fafc;
}
[data-bs-theme=dark] .card {
  background-color: #1e293b;
  border-color: #334155;
  color: #f8fafc;
}
[data-bs-theme=dark] .card .card-header {
  background-color: #0f172a;
  border-bottom-color: #334155;
}
[data-bs-theme=dark] .card .card-body {
  background-color: #1e293b;
}
[data-bs-theme=dark] .add-member-results {
  background-color: #1e293b;
}
[data-bs-theme=dark] .add-member-item {
  color: #f8fafc;
}
[data-bs-theme=dark] .add-member-item:hover {
  background-color: #334155;
}
[data-bs-theme=dark] .form-control {
  background-color: #1e293b;
  border-color: #475569;
  color: #f8fafc;
}
[data-bs-theme=dark] .form-control::placeholder {
  color: #64748b;
}
[data-bs-theme=dark] .form-control:focus {
  background-color: #1e293b;
  border-color: #3b82f6;
  color: #f8fafc;
}
[data-bs-theme=dark] .btn-outline-secondary:hover,
[data-bs-theme=dark] .btn-outline-secondary:focus {
  background-color: #334155;
  border-color: #475569;
  color: #f8fafc;
}

/* Groups list view (light mode) */
.groups-list {
  overflow: hidden;
}

.group-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #f1f5f9;
  color: inherit;
  transition: background-color 0.15s ease;
}
.group-list-item:hover {
  background-color: #f8fafc;
}
.group-list-item:last-child {
  border-bottom: none;
}

[data-bs-theme=dark] .group-list-item {
  border-bottom-color: #334155;
}
[data-bs-theme=dark] .group-list-item:hover {
  background-color: #334155;
}
[data-bs-theme=dark] .group-name {
  color: #f8fafc;
}
[data-bs-theme=dark] .group-description {
  color: #94a3b8;
}
[data-bs-theme=dark] .group-members {
  color: #94a3b8;
}
[data-bs-theme=dark] .more-members {
  color: #94a3b8;
}
[data-bs-theme=dark] .avatar-circle {
  border-color: #1e293b;
  box-shadow: 0 0 0 0.5px #334155;
  background-color: #334155;
  color: #cbd5e1;
}
[data-bs-theme=dark] .count-badge {
  background-color: #334155;
  color: #cbd5e1;
}
[data-bs-theme=dark] .group-meta {
  color: #94a3b8;
}

.group-info {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  flex: 1;
  min-width: 0;
}
.group-info .group-color-dot {
  margin-top: 0.5rem;
}

.group-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.group-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.group-name {
  font-weight: 600;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.group-description {
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.4;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.group-members {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #64748b;
  flex-wrap: wrap;
}

.avatar-group {
  display: flex;
  align-items: center;
  gap: -0.35rem;
  margin-right: 0.25rem;
}

.avatar-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid white;
  background-color: #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: #495057;
  font-size: 0.7rem;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 0 0 0.5px #e2e8f0;
  margin-left: -10px;
}
.avatar-circle:first-child {
  margin-left: 0;
}
.avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.more-members {
  font-size: 0.75rem;
  color: #64748b;
  white-space: nowrap;
}

.group-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: #64748b;
  white-space: nowrap;
}

.count-badge {
  background-color: #f1f5f9;
  padding: 0.25rem 0.6rem;
  border-radius: 0.25rem;
  font-weight: 500;
}

/* Group Activity Tab Styles */
.group-timeline-item:last-child {
  border-bottom: none !important;
}

/* Cluster rows (details/summary) */
.group-timeline-cluster:last-child {
  border-bottom: none !important;
}
.group-timeline-cluster summary.group-timeline-item {
  cursor: pointer;
  list-style: none;
}
.group-timeline-cluster summary.group-timeline-item::-webkit-details-marker {
  display: none;
}
.group-timeline-cluster summary.group-timeline-item::after {
  content: "▸";
  float: right;
  font-size: 0.7rem;
  color: var(--text-secondary, #6c757d);
  margin-top: 2px;
}
.group-timeline-cluster[open] summary.group-timeline-item::after {
  content: "▾";
}

.group-timeline-cluster__item {
  background: var(--app-bg, #f8f9fa);
}

[data-bs-theme=dark] .group-timeline-cluster__item {
  background: rgba(255, 255, 255, 0.03);
}

/* Org contacts search + sort toolbar */
.org-contacts-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}
.org-contacts-toolbar__search {
  position: relative;
  flex: 1 1 0%;
  min-width: 0;
}
.org-contacts-toolbar__search svg {
  position: absolute;
  left: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary, #94a3b8);
  pointer-events: none;
}
.org-contacts-toolbar__search .tw-input, .org-contacts-toolbar__search .tw-select, .org-contacts-toolbar__search .form-control {
  width: 100%;
  padding: 0.375rem 0.625rem 0.375rem 2rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
}
.org-contacts-toolbar__sort {
  flex: 0 0 auto;
  width: auto !important;
  max-width: 11rem;
  /* Restore room for the dropdown arrow (global form-select override removes it) */
  padding: 0.375rem 2rem 0.375rem 0.75rem;
  background-position: right 0.6rem center;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary, #64748b);
}

[data-bs-theme=dark] .org-contacts-toolbar {
  border-bottom-color: var(--border-color, #334155);
}

.org-contacts-toolbar__add {
  flex-shrink: 0;
  white-space: nowrap;
}

/* Add person modal — search, results, chip, title */
.org-add-person-search-wrap {
  position: relative;
}
.org-add-person-search-wrap svg {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  pointer-events: none;
  z-index: 2;
}
.org-add-person-search-wrap .form-control,
.org-add-person-search-wrap .tw-input {
  padding: 0.5rem 0.75rem 0.5rem 2.25rem;
  border-radius: 0.5rem;
}
.org-add-person-search-wrap .form-control:focus,
.org-add-person-search-wrap .tw-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.org-add-person-results {
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  margin-top: 0.25rem;
  overflow: hidden;
}

.org-add-person-result-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
  cursor: pointer;
  color: var(--text-primary);
}
.org-add-person-result-item:last-child {
  border-bottom: none;
}
.org-add-person-result-item:hover, .org-add-person-result-item:focus-visible {
  background: #f8f7ff;
  outline: none;
}

.org-add-person-result-name {
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.org-add-person-result-sub {
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.org-add-person-no-results {
  padding: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: center;
}

.org-add-person-chip {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  background: #f8f7ff;
  border: 1px solid #c7d2fe;
  border-radius: 0.5rem;
}

.org-add-person-chip-avatar {
  flex-shrink: 0;
}

.org-add-person-chip-name {
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.org-add-person-chip-sub {
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.org-add-person-chip-remove {
  margin-left: auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: none;
  border: none;
  border-radius: 4px;
  color: var(--text-secondary);
  cursor: pointer;
}
.org-add-person-chip-remove:hover {
  background: #e0e7ff;
  color: var(--primary-color);
}

[data-bs-theme=dark] .org-add-person-result-item:hover,
[data-bs-theme=dark] .org-add-person-result-item:focus-visible {
  background: rgba(99, 102, 241, 0.12);
}
[data-bs-theme=dark] .org-add-person-chip {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.3);
}
[data-bs-theme=dark] .org-add-person-chip-remove:hover {
  background: rgba(99, 102, 241, 0.2);
  color: var(--primary-color);
}
[data-bs-theme=dark] .org-add-person-results {
  border-color: var(--border-color);
}
[data-bs-theme=dark] .org-add-person-result-item {
  border-bottom-color: var(--border-color);
  color: var(--text-primary);
}
[data-bs-theme=dark] #addPersonDialog .card-header,
[data-bs-theme=dark] #addPersonDialog .card-footer {
  background: var(--card-bg) !important;
  border-color: var(--border-color);
}

.avatar-group-mini {
  display: flex;
  flex-direction: row;
  padding-left: 8px;
}
.avatar-group-mini img:first-child {
  margin-left: 0 !important;
}

/* Tab styling for groups */
.nav-tabs {
  border-bottom-color: #dee2e6;
}
.nav-tabs .nav-link {
  color: #6c757d;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.75rem 1rem;
}
.nav-tabs .nav-link:hover {
  color: #495057;
  border-bottom-color: #dee2e6;
}
.nav-tabs .nav-link.active {
  color: #0d6efd;
  border-bottom-color: #0d6efd;
  background: transparent;
}

[data-bs-theme=dark] .nav-tabs {
  border-bottom-color: #334155;
}
[data-bs-theme=dark] .nav-tabs .nav-link {
  color: #94a3b8;
}
[data-bs-theme=dark] .nav-tabs .nav-link:hover {
  color: #f8fafc;
  border-bottom-color: #475569;
}
[data-bs-theme=dark] .nav-tabs .nav-link.active {
  color: #60a5fa;
  border-bottom-color: #60a5fa;
  background: transparent;
}
[data-bs-theme=dark] .group-timeline-item {
  border-bottom-color: #334155 !important;
}
[data-bs-theme=dark] .avatar-group-mini img {
  border-color: #1e293b !important;
}
[data-bs-theme=dark] .insights-bar {
  background: #334155;
}
[data-bs-theme=dark] .insights-bar.current {
  background: #3b82f6;
}
[data-bs-theme=dark] .member-engagement-list .border-bottom {
  border-color: #334155 !important;
}

.tw-input,
select.tw-input,
input[type=number].tw-input {
  display: block;
  width: 100%;
  height: 42px;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-primary);
  background-color: var(--app-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
  -webkit-appearance: none;
}
.tw-input:focus,
select.tw-input:focus,
input[type=number].tw-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}
.tw-input::placeholder,
select.tw-input::placeholder,
input[type=number].tw-input::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}

select.tw-input {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.625rem center;
  background-size: 14px;
  padding-right: 2rem;
}

[data-bs-theme=dark] select.tw-input {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
}

.contact-picker-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 50;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  max-height: 240px;
  overflow-y: auto;
  margin-top: 2px;
}

.contact-picker-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 0.875rem;
}
.contact-picker-option:hover, .contact-picker-option--active {
  background: #f1f5f9;
}

.contact-picker-selected {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}

.contact-picker-selected-name {
  font-size: 0.875rem;
  font-weight: 500;
  flex: 1;
}

.contact-picker-change {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.75rem;
  color: #6366f1;
  cursor: pointer;
  text-decoration: underline;
}
.contact-picker-change:hover {
  color: #4f46e5;
}

.contact-picker-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.contact-picker-avatar--initials {
  background: #6366f1;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
}

[data-bs-theme=dark] .contact-picker-results {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}
[data-bs-theme=dark] .contact-picker-option:hover, [data-bs-theme=dark] .contact-picker-option--active {
  background: #334155;
}
[data-bs-theme=dark] .contact-picker-change {
  color: #818cf8;
}
[data-bs-theme=dark] .contact-picker-change:hover {
  color: #a5b4fc;
}

.insights-bar {
  background: #e2e8f0;
  border-radius: 4px 4px 0 0;
  transition: background-color 0.2s;
}
.insights-bar.current {
  background: #3b82f6;
}

.insights-weekly-chart {
  overflow: visible;
}

.member-engagement-list .border-bottom:last-child {
  border-bottom: none !important;
}
.member-engagement-list .progress {
  background-color: #e2e8f0;
}
.member-engagement-list .progress-bar {
  background-color: #3b82f6;
}

.insights-bar {
  position: relative;
  cursor: pointer;
  overflow: visible;
}
.insights-bar:hover {
  background: #cbd5e1;
}
.insights-bar.current:hover {
  background: #60a5fa;
}

.bar-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  border: 1px solid #475569;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  color: #f8fafc;
}
.bar-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: #475569;
}
.bar-tooltip .tooltip-hours {
  font-weight: 600;
  color: #60a5fa;
}
.bar-tooltip .tooltip-meetings {
  color: #94a3b8;
}

.insights-bar.last-bars .bar-tooltip {
  left: auto;
  right: 0;
  transform: translateX(0);
}
.insights-bar.last-bars .bar-tooltip::after {
  left: auto;
  right: 10px;
  transform: translateX(0);
}

.insights-bar:hover .bar-tooltip {
  opacity: 1;
  visibility: visible;
}

.month-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.month-nav-btn {
  background: transparent;
  border: 1px solid #cbd5e1;
  color: #64748b;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.month-nav-btn:hover:not(.disabled) {
  background: #f1f5f9;
  color: #1e293b;
  border-color: #94a3b8;
}
.month-nav-btn.disabled {
  cursor: not-allowed;
}

.month-label {
  font-weight: 500;
  min-width: 110px;
  text-align: center;
  font-size: 0.875rem;
}

.zero-hours-section {
  background: #f1f5f9;
  border-radius: 8px;
  padding: 1rem;
}

.zero-member-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #e2e8f0;
  border-radius: 9999px;
  padding: 0.25rem 0.75rem 0.25rem 0.25rem;
  color: #475569;
  transition: background 0.2s;
}
.zero-member-pill:hover {
  background: #cbd5e1;
  color: #1e293b;
}

.engagement-touch-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  white-space: nowrap;
  line-height: 1.4;
}
.engagement-touch-pill--mtg {
  background: #ede9fe;
  color: #5b21b6;
}
.engagement-touch-pill--email {
  background: #dcfce7;
  color: #166534;
}
.engagement-touch-pill--email svg {
  flex-shrink: 0;
}

.engagement-email-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.7rem;
  font-weight: 500;
  color: #166534;
  background: #dcfce7;
  border-radius: 10px;
  padding: 2px 8px;
}
.engagement-email-pill svg {
  flex-shrink: 0;
}

[data-bs-theme=dark] .member-engagement-list .progress {
  background-color: #334155;
}
[data-bs-theme=dark] .member-engagement-list .progress-bar {
  background-color: #60a5fa;
}

[data-bs-theme=dark] .month-nav-btn {
  border-color: #475569;
  color: #94a3b8;
}
[data-bs-theme=dark] .month-nav-btn:hover:not(.disabled) {
  background: #334155;
  color: #f8fafc;
  border-color: #64748b;
}

[data-bs-theme=dark] .zero-hours-section {
  background: #1e293b;
}

[data-bs-theme=dark] .zero-member-pill {
  background: #334155;
  color: #94a3b8;
}
[data-bs-theme=dark] .zero-member-pill:hover {
  background: #475569;
  color: #f8fafc;
}

[data-bs-theme=dark] .engagement-touch-pill--mtg {
  background: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
}
[data-bs-theme=dark] .engagement-touch-pill--email {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
}
[data-bs-theme=dark] .engagement-email-pill {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
}

[data-bs-theme=dark] .insights-bar:hover {
  background: #475569;
}
[data-bs-theme=dark] .insights-bar.current:hover {
  background: #60a5fa;
}

.group-filter-section {
  padding: 1rem;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid #e2e8f0;
  background: white;
  color: #64748b;
  transition: all 0.15s ease;
}
.filter-chip:hover {
  border-color: #cbd5e1;
  background: #f1f5f9;
  color: #475569;
  text-decoration: none;
}
.filter-chip .group-color-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.5rem;
  flex-shrink: 0;
}
.filter-chip.included {
  background: #6366f1;
  border-color: #6366f1;
  color: white;
}
.filter-chip.included .group-color-dot {
  background: white !important;
}
.filter-chip.included:hover {
  background: #4f46e5;
  border-color: #4f46e5;
  color: white;
}
.filter-chip.excluded {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}
.filter-chip.excluded:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

.filter-description {
  padding-left: 0;
}

[data-bs-theme=dark] .group-filter-section {
  background: #1e293b;
  border-color: #334155;
}
[data-bs-theme=dark] .filter-chip {
  background: #334155;
  border-color: #475569;
  color: #94a3b8;
}
[data-bs-theme=dark] .filter-chip:hover {
  background: #475569;
  border-color: #64748b;
  color: #f8fafc;
}
[data-bs-theme=dark] .filter-chip.included {
  background: #6366f1;
  border-color: #6366f1;
  color: white;
}
[data-bs-theme=dark] .filter-chip.included:hover {
  background: #818cf8;
  border-color: #818cf8;
}
[data-bs-theme=dark] .filter-chip.excluded {
  background: #450a0a;
  border-color: #7f1d1d;
  color: #fca5a5;
}
[data-bs-theme=dark] .filter-chip.excluded:hover {
  background: #7f1d1d;
  border-color: #991b1b;
  color: #fecaca;
}

/* =================================
   Focus Tab Styles
   =================================== */
.time-breakdown {
  display: flex;
  height: 32px;
  border-radius: 8px;
  overflow: visible;
  background: var(--border-color);
}

.time-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
  transition: all 0.3s;
  position: relative;
}
.time-segment.solo {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}
.time-segment.meetings {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}
.time-segment:hover {
  filter: brightness(1.1);
}

.chart-bar {
  width: 100%;
  transition: all 0.2s;
  cursor: pointer;
  position: relative;
}
.chart-bar:hover {
  filter: brightness(1.2);
}

/* Tooltip styles for charts */
.bar-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  border: 1px solid #475569;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  margin-bottom: 8px;
  pointer-events: none;
}
.bar-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #475569;
}
.bar-tooltip .tooltip-hours {
  font-weight: 600;
  color: #60a5fa;
  font-size: 0.85rem;
}
.bar-tooltip .tooltip-label {
  color: #94a3b8;
  font-size: 0.7rem;
  margin-top: 2px;
}

.time-segment:hover .bar-tooltip,
.chart-bar:hover .bar-tooltip {
  opacity: 1;
  visibility: visible;
}

/* Week-ahead time allocation bar with per-segment tooltips */
.week-nav-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.375rem;
  font-size: 1.35rem;
  line-height: 1;
  font-weight: 300;
  color: #94a3b8;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.week-nav-arrow:hover {
  background: #f1f5f9;
  color: #334155;
}

[data-bs-theme=dark] .week-nav-arrow {
  color: #64748b;
}
[data-bs-theme=dark] .week-nav-arrow:hover {
  background: #1e293b;
  color: #e2e8f0;
}

.week-time-bar {
  display: flex;
  height: 2rem;
  border-radius: 0.5rem;
  overflow: visible;
  position: relative;
  z-index: 10;
}
.week-time-bar .week-bar-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
  position: relative;
  cursor: default;
  transition: filter 0.15s;
}
.week-time-bar .week-bar-segment:first-child {
  border-radius: 0.5rem 0 0 0.5rem;
}
.week-time-bar .week-bar-segment:last-child {
  border-radius: 0 0.5rem 0.5rem 0;
}
.week-time-bar .week-bar-segment:first-child:last-child {
  border-radius: 0.5rem;
}
.week-time-bar .week-bar-segment:hover {
  filter: brightness(1.1);
}
.week-time-bar .week-bar-segment:hover .week-bar-tooltip {
  opacity: 1;
  visibility: visible;
}
.week-time-bar .week-bar-segment--available {
  background: #e2e8f0;
  color: #64748b;
}
.week-time-bar .week-bar-tooltip {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  border: 1px solid #475569;
  border-radius: 8px;
  padding: 0.7rem 0.875rem;
  min-width: 230px;
  max-width: 320px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 200;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  white-space: normal;
}
.week-time-bar .week-bar-tooltip::after {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-bottom-color: #475569;
}
.week-time-bar .week-bar-segment:last-child .week-bar-tooltip {
  left: auto;
  right: 0;
  transform: none;
}
.week-time-bar .week-bar-segment:last-child .week-bar-tooltip::after {
  left: auto;
  right: 14px;
  transform: none;
}
.week-time-bar .week-bar-tooltip-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 0.5rem;
}
.week-time-bar .week-bar-tooltip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.week-time-bar .week-bar-tooltip-day {
  font-size: 0.66rem;
  font-weight: 500;
  color: #cbd5e1;
  margin-top: 0.45rem;
  margin-bottom: 0.1rem;
}
.week-time-bar .week-bar-day-event {
  display: grid;
  grid-template-columns: 3.4rem 1fr;
  gap: 0.25rem;
  align-items: start;
  padding: 0.08rem 0;
}
.week-time-bar .week-bar-day-event .day-tooltip-time {
  color: #94a3b8;
  font-size: 0.65rem;
  text-align: right;
  white-space: nowrap;
  padding-top: 0.1rem;
}
.week-time-bar .week-bar-day-event .day-tooltip-title {
  color: #cbd5e1;
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.week-time-bar .week-bar-day-event .week-bar-attendee-names {
  grid-column: 2;
  color: #64748b;
  font-size: 0.65rem;
  white-space: normal;
  margin-top: -0.05rem;
}

[data-bs-theme=light] .week-time-bar .week-bar-segment--available {
  background: #e2e8f0;
}
[data-bs-theme=light] .week-time-bar .week-bar-tooltip {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}
[data-bs-theme=light] .week-time-bar .week-bar-tooltip::after {
  border-bottom-color: #e2e8f0;
}
[data-bs-theme=light] .week-time-bar .week-bar-tooltip-header {
  color: #1e293b;
}
[data-bs-theme=light] .week-time-bar .week-bar-tooltip-day {
  color: #475569;
}
[data-bs-theme=light] .week-time-bar .week-bar-day-event .day-tooltip-time {
  color: #64748b;
}
[data-bs-theme=light] .week-time-bar .week-bar-day-event .day-tooltip-title {
  color: #334155;
}
[data-bs-theme=light] .week-time-bar .week-bar-day-event .week-bar-attendee-names {
  color: #94a3b8;
}

/* Day column schedule tooltip */
.day-col {
  position: relative;
  cursor: default;
}
.day-col .day-schedule-tooltip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  border: 1px solid #475569;
  border-radius: 8px;
  padding: 0.75rem 0.875rem;
  min-width: 270px;
  max-width: 360px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 20;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  white-space: normal;
}
.day-col .day-schedule-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #475569;
}
.day-col.day-col--left .day-schedule-tooltip {
  left: 0;
  right: auto;
  transform: none;
}
.day-col.day-col--left .day-schedule-tooltip::after {
  left: 12px;
  right: auto;
  transform: none;
}
.day-col.day-col--right .day-schedule-tooltip {
  left: auto;
  right: 0;
  transform: none;
}
.day-col.day-col--right .day-schedule-tooltip::after {
  left: auto;
  right: 12px;
  transform: none;
}
.day-col:hover .day-schedule-tooltip {
  opacity: 1;
  visibility: visible;
}
.day-col .day-tooltip-header {
  font-weight: 600;
  color: #e2e8f0;
  font-size: 0.75rem;
  margin-bottom: 0.4rem;
}
.day-col .day-tooltip-event {
  display: grid;
  grid-template-columns: 3.4rem 0.55rem 1fr;
  gap: 0.3rem;
  align-items: start;
  padding: 0.15rem 0;
}
.day-col .day-tooltip-attendee-names {
  grid-column: 3;
  color: #64748b;
  font-size: 0.65rem;
  padding-bottom: 0.1rem;
  white-space: normal;
}
.day-col .day-tooltip-time {
  color: #94a3b8;
  font-size: 0.72rem;
  white-space: nowrap;
  text-align: right;
}
.day-col .day-tooltip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  justify-self: center;
}
.day-col .day-tooltip-title {
  color: #cbd5e1;
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.day-col .day-tooltip-empty {
  color: #64748b;
  font-size: 0.7rem;
  font-style: italic;
}
.day-col .day-tooltip-category-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.75rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #334155;
}
.day-col .day-tooltip-category-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.65rem;
  color: #94a3b8;
  white-space: nowrap;
}

[data-bs-theme=light] .day-col .day-schedule-tooltip {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
[data-bs-theme=light] .day-col .day-schedule-tooltip::after {
  border-top-color: #e2e8f0;
}
[data-bs-theme=light] .day-col .day-tooltip-header {
  color: #1e293b;
}
[data-bs-theme=light] .day-col .day-tooltip-time {
  color: #64748b;
}
[data-bs-theme=light] .day-col .day-tooltip-title {
  color: #334155;
}
[data-bs-theme=light] .day-col .day-tooltip-category-summary {
  border-top-color: #e2e8f0;
}
[data-bs-theme=light] .day-col .day-tooltip-category-item {
  color: #64748b;
}
[data-bs-theme=light] .day-col .day-tooltip-empty {
  color: #94a3b8;
}

[data-bs-theme=dark] .time-breakdown {
  background: #334155;
}
[data-bs-theme=dark] .bar-tooltip {
  background: #1e293b;
  border-color: #475569;
}
[data-bs-theme=dark] .bar-tooltip::after {
  border-top-color: #475569;
}

/* Light mode tooltip adjustments */
[data-bs-theme=light] .bar-tooltip {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
[data-bs-theme=light] .bar-tooltip::after {
  border-top-color: #e2e8f0;
}
[data-bs-theme=light] .bar-tooltip .tooltip-hours {
  color: #3b82f6;
}
[data-bs-theme=light] .bar-tooltip .tooltip-label {
  color: #64748b;
}

/* YouTube embed styling */
.youtube-embed-wrapper {
  position: relative;
  width: 95%;
  max-width: 95%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  margin: 1.5rem auto;
  border-radius: 0.5rem;
  overflow: hidden;
  background: #000;
  pointer-events: auto;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}
.youtube-embed-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  pointer-events: auto;
}

/* Responsive YouTube embeds for mobile */
@media (max-width: 768px) {
  .youtube-embed-wrapper {
    width: 100%;
    max-width: 100%;
    padding-bottom: 56.25%;
  }
}
/* Activity Quick-Jump Date Pills */
.date-jump-pills {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.date-jump-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: 1.25rem;
  font-size: 0.8125rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  background: white;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
}
.date-jump-pill:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: rgba(79, 70, 229, 0.05);
  text-decoration: none;
}
.date-jump-pill.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}
.date-jump-pill svg {
  flex-shrink: 0;
}

.date-jump-pick {
  border-style: dashed;
}

.date-jump-picker {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  margin-left: 0.25rem;
}

.date-jump-input {
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-primary);
  background: white;
  outline: none;
  transition: border-color 0.15s;
}
.date-jump-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
}

.date-jump-go {
  padding: 0.25rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  border: none;
  background: var(--primary-color);
  color: white;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.date-jump-go:hover {
  background: #4338ca;
}

@media (max-width: 768px) {
  .date-jump-pills {
    position: relative;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.25rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .date-jump-pills::-webkit-scrollbar {
    display: none;
  }
  .date-jump-pills::after {
    content: "";
    position: sticky;
    right: 0;
    flex-shrink: 0;
    width: 2rem;
    margin-left: -2rem;
    background: linear-gradient(to right, transparent, white 70%);
    pointer-events: none;
  }
  .date-jump-pill {
    flex-shrink: 0;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
  }
  .date-jump-picker {
    margin-left: 0;
    margin-right: 0.5rem;
  }
  .date-jump-input {
    flex: 1;
    min-width: 0;
  }
  .date-jump-pick {
    order: -1;
  }
}
[data-bs-theme=dark] .date-jump-pill {
  background: #1e293b;
  color: #94a3b8;
  border-color: #334155;
}
[data-bs-theme=dark] .date-jump-pill:hover {
  background: #334155;
  color: #cbd5e1;
  border-color: var(--primary-color);
}
[data-bs-theme=dark] .date-jump-pill.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}
[data-bs-theme=dark] .date-jump-input {
  background: #1e293b;
  border-color: #475569;
  color: #f8fafc;
}
[data-bs-theme=dark] .date-jump-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}
[data-bs-theme=dark] .date-jump-go {
  background: var(--primary-color);
}
[data-bs-theme=dark] .date-jump-go:hover {
  background: #818cf8;
}
@media (max-width: 768px) {
  [data-bs-theme=dark] .date-jump-pills::after {
    background: linear-gradient(to right, transparent, #1e293b 70%);
  }
}

.expandable-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: none;
  padding: 0.25rem 0;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.15s;
}
.expandable-toggle:hover {
  color: var(--primary-color);
}
.expandable-toggle .expandable-toggle__icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--border-color);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.expandable-toggle.expandable-toggle--open {
  color: var(--text-primary);
}
.expandable-toggle.expandable-toggle--open .expandable-toggle__icon {
  background: #ede9fe;
  color: var(--primary-color);
}
[data-bs-theme=dark] .expandable-toggle.expandable-toggle--open .expandable-toggle__icon {
  background: #312e81;
  color: #a5b4fc;
}

[data-bs-theme=dark] .expandable-toggle.expandable-toggle--open .expandable-toggle__icon {
  background: #312e81;
  color: #a5b4fc;
}

.form-photo-zone {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border: 2px dashed var(--border-color);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.form-photo-zone:hover, .form-photo-zone.photo-drop--active {
  border-color: var(--primary-color);
  background: #f5f3ff;
}
.form-photo-zone .form-photo-zone__text {
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.form-photo-zone .form-photo-zone__text strong {
  display: block;
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 0.125rem;
}
.form-photo-zone .form-photo-zone__remove {
  font-size: 0.8rem;
  color: #dc2626;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  margin-top: 0.25rem;
}
.form-photo-zone .form-photo-zone__remove:hover {
  text-decoration: underline;
}

[data-bs-theme=dark] .form-photo-zone:hover,
[data-bs-theme=dark] .form-photo-zone.photo-drop--active {
  background: #1e1b4b;
}

.form-photo-zone .photo-drop-wrapper {
  flex-shrink: 0;
}

.deceased-card {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  padding: 0.75rem 1rem;
}
.deceased-card .form-check-label {
  color: #c2410c;
  font-weight: 600;
}

[data-bs-theme=dark] .deceased-card {
  background: #431407;
  border-color: #7c2d12;
}
[data-bs-theme=dark] .deceased-card .form-check-label {
  color: #fb923c;
}

.email-primary-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 99px;
  background: #ede9fe;
  color: #4f46e5;
  white-space: nowrap;
  flex-shrink: 0;
}

[data-bs-theme=dark] .email-primary-badge {
  background: #312e81;
  color: #a5b4fc;
}

.email-set-primary-btn {
  font-size: 0.7rem;
  color: var(--text-secondary);
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 99px;
  padding: 2px 8px;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.email-set-primary-btn:hover {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.photo-drop-wrapper {
  position: relative;
  display: inline-block;
  cursor: pointer;
  border-radius: 50%;
  flex-shrink: 0;
}
.photo-drop-wrapper img {
  display: block;
  transition: opacity 0.15s ease;
}
.photo-drop-wrapper:hover .photo-drop-overlay, .photo-drop-wrapper.photo-drop--active .photo-drop-overlay {
  opacity: 1;
}
.photo-drop-wrapper.photo-drop--active img {
  opacity: 0.6;
}
.photo-drop-wrapper.photo-drop--loading img {
  opacity: 0.4;
}

.photo-drop-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
  color: #fff;
  gap: 2px;
}
.photo-drop-overlay svg {
  width: 20px;
  height: 20px;
}

.photo-drop-overlay__text {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  text-align: center;
}

[data-bs-theme=dark] .photo-drop-overlay {
  background: rgba(0, 0, 0, 0.65);
}

.crop-modal {
  border: none;
  border-radius: 12px;
  padding: 0;
  width: min(92vw, 520px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}
.crop-modal::backdrop {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
}

.crop-modal__body {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.crop-modal__image-wrap {
  width: 100%;
  max-height: 70vh;
  overflow: hidden;
  background: #000;
}
.crop-modal__image-wrap img {
  display: block;
  max-width: 100%;
}

.crop-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.875rem 1rem;
  background: var(--app-bg, #fff);
  border-top: 1px solid var(--border-color, #e2e8f0);
}

[data-bs-theme=dark] .crop-modal {
  background: #1e293b;
}
[data-bs-theme=dark] .crop-modal .crop-modal__actions {
  background: #1e293b;
  border-top-color: #334155;
}

.avatar-stack {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.avatar-stack .avatar-stack-item {
  margin-left: -8px;
}
.avatar-stack .avatar-stack-item:first-child {
  margin-left: 0;
}
.avatar-stack .avatar-stack-item img {
  display: block;
  box-shadow: 0 0 0 2px #fff;
}
.avatar-stack .avatar-stack-overflow {
  margin-left: -8px;
  box-shadow: 0 0 0 2px #fff;
}

[data-bs-theme=dark] .avatar-stack .avatar-stack-item img,
[data-bs-theme=dark] .avatar-stack .avatar-stack-overflow,
[data-bs-theme=dark] .avatar-stack .avatar-circle--sm {
  box-shadow: 0 0 0 2px #1e293b;
}

.activity-feed .activity-main,
.activity-feed .activity-detail,
.activity-feed .text-truncate {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ── Note Document (show & edit pages) ─────────────────── */
.note-doc {
  flex: 1;
  min-width: 0;
  max-width: 760px;
  margin: 0;
  padding: 32px 48px 56px;
}
.note-doc.note-doc--edit {
  max-width: none;
  width: 100%;
  padding-bottom: 0;
}

/* Note controls — inside .note-doc, above the title */
.note-doc-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.note-doc-controls-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.note-doc-controls-right {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.note-header-share {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

/* Borderless ghost action buttons used in note controls */
.btn-doc-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border: none;
  background: none;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
  line-height: 1.4;
  transition: background 0.1s, color 0.1s;
}
.btn-doc-action svg {
  opacity: 0.7;
}
.btn-doc-action:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-primary);
  text-decoration: none;
}
.btn-doc-action:hover svg {
  opacity: 1;
}
.btn-doc-action.btn-doc-action--danger {
  color: #dc2626;
}
.btn-doc-action.btn-doc-action--danger svg {
  opacity: 0.75;
}
.btn-doc-action.btn-doc-action--danger:hover {
  background: rgba(220, 38, 38, 0.07);
  color: #b91c1c;
}

.note-header-url {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: var(--primary-color);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 280px;
  cursor: pointer;
  border-radius: 4px;
  padding: 2px 4px;
  transition: background 0.1s, color 0.1s;
}
.note-header-url:hover {
  background: rgba(99, 102, 241, 0.08);
  text-decoration: underline;
}
.note-header-url.note-header-url--copied {
  color: #16a34a;
  background: rgba(22, 163, 74, 0.08);
  text-decoration: none;
}

.btn-doc-action--shared {
  color: var(--primary-color);
  font-weight: 500;
}
.btn-doc-action--shared svg {
  opacity: 1;
}
.btn-doc-action--shared:hover {
  background: rgba(99, 102, 241, 0.08);
  color: var(--primary-color);
}

.share-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
}

.share-btn-count {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(99, 102, 241, 0.12);
  border-radius: 10px;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary-color);
}
.share-btn-count svg {
  opacity: 0.8;
}

.note-share-popover-anchor {
  position: relative;
}

.note-share-popover {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 320px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 4px 10px -5px rgba(0, 0, 0, 0.1);
  z-index: 50;
  overflow: hidden;
}
.note-share-popover.share-popover--open {
  display: block;
}

[data-bs-theme=dark] .note-share-popover {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6), 0 4px 10px -5px rgba(0, 0, 0, 0.4);
}

.note-share-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--border-color);
}

.note-share-popover-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.note-share-popover-title svg {
  opacity: 0.7;
}

.note-share-popover-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 16px;
  line-height: 1;
  transition: background 0.1s, color 0.1s;
}
.note-share-popover-close:hover {
  background: var(--app-bg);
  color: var(--text-primary);
}

.note-share-popover-body {
  padding: 14px;
}

.note-share-popover-url-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.note-share-popover-url {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: var(--primary-color);
  background: #eef2ff;
  border-radius: 6px;
  padding: 7px 10px;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  user-select: all;
}

[data-bs-theme=dark] .note-share-popover-url {
  background: rgba(99, 102, 241, 0.12);
}

.share-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  background: var(--primary-color);
  color: #fff;
  border: none;
  transition: background 0.1s;
}
.share-copy-btn:hover {
  background: #4338ca;
}
.share-copy-btn.share-copy-btn--success {
  background: #16a34a;
}
.share-copy-btn.share-copy-btn--success:hover {
  background: #15803d;
}

.note-share-popover-stats {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  background: var(--app-bg);
  border-radius: 8px;
  margin-bottom: 12px;
}

.note-share-popover-stat {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--text-secondary);
}
.note-share-popover-stat svg {
  opacity: 0.6;
  flex-shrink: 0;
}
.note-share-popover-stat--muted {
  font-style: italic;
  color: var(--text-muted);
}

.note-share-popover-stat-value {
  font-weight: 600;
  color: var(--text-primary);
}

.note-share-popover-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.note-share-popover-since {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-muted);
}
.note-share-popover-since svg {
  opacity: 0.6;
}

.share-revoke-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  background: none;
  color: #dc2626;
  border: 1px solid transparent;
  transition: background 0.1s, border-color 0.1s;
}
.share-revoke-btn:hover {
  background: rgba(220, 38, 38, 0.07);
  border-color: rgba(220, 38, 38, 0.2);
}

.note-doc-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.note-doc-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 0;
  flex-wrap: wrap;
}

.note-meta-sep {
  color: var(--border-color);
  font-size: 13px;
  flex-shrink: 0;
  user-select: none;
}

.note-meta-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--primary-color);
  text-decoration: none;
}
.note-meta-link svg {
  opacity: 0.8;
}
.note-meta-link:hover {
  text-decoration: underline;
}

.avatar-stack--sm .avatar-stack-item {
  margin-left: -5px;
}
.avatar-stack--sm .avatar-stack-item:first-child {
  margin-left: 0;
}
.avatar-stack--sm .avatar-stack-item img {
  box-shadow: 0 0 0 2px #fff;
}
.avatar-stack--sm .avatar-circle--sm {
  box-shadow: 0 0 0 2px #fff;
}

.avatar-circle--sm {
  width: 20px;
  height: 20px;
  background-color: #e0e7ff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #6366f1;
  font-size: 7px;
  flex-shrink: 0;
  overflow: hidden;
}

/* Inline share strip */
.note-doc-share-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 8px 12px;
  background: var(--app-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  min-width: 0;
}
.note-doc-share-strip .share-strip-url {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: var(--text-secondary);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.note-doc-share-strip .share-strip-stats {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}
.note-doc-share-strip .share-strip-stats svg {
  opacity: 0.6;
}
.note-doc-share-strip .btn {
  flex-shrink: 0;
}

.btn-ghost-danger {
  background: transparent;
  border: 1px solid transparent;
  color: #dc2626;
  font-size: 12px;
}
.btn-ghost-danger:hover {
  border-color: #dc2626;
  background: #fef2f2;
}

/* Meeting / contact context callout */
.note-doc-context-callout {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--app-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 24px;
}

.note-doc-context-label {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

/* Note body */
.note-doc-body {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.note-doc-body p {
  margin-bottom: 1.8em;
}
.note-doc-body p:last-child {
  margin-bottom: 0;
}
.note-doc-body img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  display: block;
}
.note-doc-body h2,
.note-doc-body h3,
.note-doc-body h4,
.note-doc-body h5,
.note-doc-body h6 {
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
  margin-top: 1.35em;
  margin-bottom: 0.45em;
}
.note-doc-body h2 {
  font-size: 1.65rem;
  letter-spacing: -0.01em;
}
.note-doc-body h3 {
  font-size: 1.35rem;
}
.note-doc-body h4 {
  font-size: 1.15rem;
}
.note-doc-body h5 {
  font-size: 1rem;
}
.note-doc-body h6 {
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
}
.note-doc-body ul,
.note-doc-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1.8em;
}
.note-doc-body ul {
  list-style-type: disc;
}
.note-doc-body ol {
  list-style-type: decimal;
}
.note-doc-body ul ul {
  list-style-type: circle;
}
.note-doc-body ul ul ul {
  list-style-type: square;
}
.note-doc-body li {
  margin-bottom: 0.15rem;
}

/* Fenced code blocks across note views */
.note-doc-body,
.note-doc-preview-pane,
.public-note-content,
.note-body,
.note-content,
.timeline-note-content {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.note-doc-body li > ul,
.note-doc-body li > ol,
.note-doc-preview-pane li > ul,
.note-doc-preview-pane li > ol,
.public-note-content li > ul,
.public-note-content li > ol,
.note-body li > ul,
.note-body li > ol,
.note-content li > ul,
.timeline-note-content li > ul,
.note-content li > ol,
.timeline-note-content li > ol {
  margin-bottom: 0;
}
.note-doc-body pre,
.note-doc-preview-pane pre,
.public-note-content pre,
.note-body pre,
.note-content pre,
.timeline-note-content pre {
  max-width: 100%;
  margin: 0.875rem 0;
  padding: 0.75rem 0.875rem;
  overflow-wrap: anywhere;
  background: var(--app-bg);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
  font-size: 0.875em;
  line-height: 1.55;
  white-space: pre-wrap;
}
.note-doc-body pre code,
.note-doc-preview-pane pre code,
.public-note-content pre code,
.note-body pre code,
.note-content pre code,
.timeline-note-content pre code {
  display: block;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: inherit;
  font: inherit;
  white-space: inherit;
}
.note-doc-body pre:last-child,
.note-doc-preview-pane pre:last-child,
.public-note-content pre:last-child,
.note-body pre:last-child,
.note-content pre:last-child,
.timeline-note-content pre:last-child {
  margin-bottom: 0;
}

.tagged-note-excerpt {
  border-left: 2px solid var(--border-color);
  padding-left: 0.625rem;
}

/* ── Checklist items inside note body ── */
.note-doc-body ul:has(li > .checklist-btn),
.note-doc-body ul:has(li > .checklist-box),
.note-doc-preview-pane ul:has(li > .checklist-btn),
.note-doc-preview-pane ul:has(li > .checklist-box),
.public-note-content ul:has(li > .checklist-btn),
.public-note-content ul:has(li > .checklist-box),
.note-body ul:has(li > .checklist-btn),
.note-body ul:has(li > .checklist-box) {
  padding-left: 0;
  list-style: none;
}
.note-doc-body li:has(> .checklist-btn),
.note-doc-body li:has(> .checklist-box),
.note-doc-preview-pane li:has(> .checklist-btn),
.note-doc-preview-pane li:has(> .checklist-box),
.public-note-content li:has(> .checklist-btn),
.public-note-content li:has(> .checklist-box),
.note-body li:has(> .checklist-btn),
.note-body li:has(> .checklist-box) {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 0;
}
.note-doc-body .checklist-content,
.note-doc-preview-pane .checklist-content,
.public-note-content .checklist-content,
.note-body .checklist-content {
  flex: 1;
  min-width: 0;
}
.note-doc-body .checklist-item--done > .checklist-content,
.note-doc-preview-pane .checklist-item--done > .checklist-content,
.public-note-content .checklist-item--done > .checklist-content,
.note-body .checklist-item--done > .checklist-content {
  color: var(--text-secondary);
  text-decoration: line-through;
  text-decoration-color: var(--text-secondary);
}

.checklist-btn {
  background: var(--card-bg);
  border: 1.5px solid var(--border-color);
  border-radius: 4px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
  transition: border-color 0.15s, background-color 0.15s;
  position: relative;
}
.checklist-btn:hover {
  border-color: var(--primary-color);
  background: #eef2ff;
}
.checklist-btn[data-checklist-checked=true] {
  background: var(--primary-color);
  border-color: var(--primary-color);
}
.checklist-btn[data-checklist-checked=true]::after {
  content: "";
  display: block;
  width: 9px;
  height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
}

[data-bs-theme=dark] .checklist-btn:hover {
  background: rgba(99, 102, 241, 0.15);
}

.checklist-box {
  display: inline-flex;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--border-color);
  border-radius: 3px;
  flex-shrink: 0;
  margin-top: 5px;
  align-items: center;
  justify-content: center;
}
.checklist-box.checklist-box--checked {
  background: var(--primary-color);
  border-color: var(--primary-color);
}
.checklist-box.checklist-box--checked::after {
  content: "";
  display: block;
  width: 8px;
  height: 4.5px;
  border-left: 1.5px solid #fff;
  border-bottom: 1.5px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
}

.note-checklist-summary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px;
  background: var(--app-bg);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 12px;
  margin-bottom: 16px;
}

.checklist-summary-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.checklist-summary-item--open {
  color: var(--text-secondary);
}

.checklist-summary-item--done {
  color: #16a34a;
}

.checklist-summary-icon {
  width: 13px;
  height: 13px;
}

.checklist-summary-sep {
  color: var(--border-color);
  user-select: none;
}

.checklist-progress {
  width: 56px;
  height: 5px;
  background: var(--border-color);
  border-radius: 99px;
  overflow: hidden;
}

.checklist-progress-fill {
  height: 100%;
  background: #16a34a;
  border-radius: 99px;
  transition: width 0.3s ease;
}

[data-bs-theme=dark] .checklist-summary-item--done {
  color: #86efac;
}
[data-bs-theme=dark] .checklist-progress-fill {
  background: #86efac;
}

.note-checklist-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text-secondary);
}

.note-checklist-badge-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.note-checklist-badge-item--done {
  color: #16a34a;
}

.checklist-badge-sep {
  color: var(--border-color);
  user-select: none;
}

.checklist-badge-icon {
  width: 11px;
  height: 11px;
}

.note-checklist-mini-progress {
  display: inline-block;
  width: 32px;
  height: 3px;
  background: var(--border-color);
  border-radius: 99px;
  overflow: hidden;
  vertical-align: middle;
}

.note-checklist-mini-progress-fill {
  height: 100%;
  background: #16a34a;
  border-radius: 99px;
}

[data-bs-theme=dark] .note-checklist-badge-item--done {
  color: #86efac;
}
[data-bs-theme=dark] .note-checklist-mini-progress-fill {
  background: #86efac;
}

/* AI Summary divider */
.note-doc-divider {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 28px 0 20px;
}

/* AI summary section */
.note-doc-meta-area {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  column-gap: 14px;
  margin-bottom: 28px;
}
.note-doc-meta-area:has(.note-doc-ai-box) .note-doc-ai-section {
  flex-basis: 100%;
  margin-top: 16px;
}
.note-doc-meta-area:not(:has(.note-doc-ai-box)) .note-doc-ai-section::before {
  content: "·";
  color: var(--text-secondary);
  opacity: 0.5;
  margin-right: 4px;
}

.note-doc-ai-section {
  margin-top: 0;
  margin-bottom: 0;
}

.note-doc-ai-generate {
  background: none;
  border: none;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
}
.note-doc-ai-generate:hover {
  color: var(--primary-color);
}
.note-doc-ai-generate svg {
  opacity: 0.7;
}

.note-doc-ai-box {
  background: var(--app-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 14px 16px;
}

.note-doc-ai-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-secondary);
  margin-bottom: 7px;
  opacity: 0.8;
}

.note-doc-ai-text {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.note-doc-ai-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-secondary);
  opacity: 0.75;
}

.note-doc-ai-regenerate {
  background: none;
  border: none;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
}
.note-doc-ai-regenerate:hover {
  color: var(--primary-color);
  opacity: 1;
}

/* Meta footer (tagged contacts / attendees) */
.note-doc-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
  margin-top: 28px;
}

.note-doc-footer-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-secondary);
  opacity: 0.7;
}

/* Edit page form fields */
.note-doc-edit-title {
  display: block;
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.3;
  color: var(--text-primary);
  font-family: inherit;
  padding: 4px 6px;
  margin-bottom: 16px;
  transition: border-color 0.15s, background 0.15s;
  outline: none;
}
.note-doc-edit-title::placeholder {
  color: var(--text-secondary);
  opacity: 0.5;
  font-weight: 400;
}
.note-doc-edit-title:hover {
  border-color: var(--border-color);
}
.note-doc-edit-title:focus {
  border-color: var(--primary-color);
  background: rgba(79, 70, 229, 0.04);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.08);
}

.note-doc-edit-body-wrap {
  position: relative;
  margin-bottom: 6px;
}

.note-doc-edit-body {
  display: block;
  width: 100%;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-primary);
  font-family: inherit;
  padding: 12px 14px;
  resize: vertical;
  min-height: 320px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.note-doc-edit-body::placeholder {
  color: var(--text-secondary);
  opacity: 0.5;
}
.note-doc-edit-body:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.08);
}

.note-doc-format-hint {
  font-size: 11px;
  color: var(--text-secondary);
  opacity: 0.65;
  margin-bottom: 24px;
  padding-left: 2px;
}

.note-doc-edit-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  margin-top: 8px;
  flex-shrink: 0;
}

/* ── Image drop zone (wraps body-wrap + toolbar) ── */
.note-doc-image-drop {
  position: relative;
}

.note-doc-edit-drop-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  border: 2px dashed var(--primary-color);
  background: rgba(79, 70, 229, 0.04);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
}

.image-drop--active .note-doc-edit-drop-overlay {
  opacity: 1;
}

.image-drop--active .note-doc-edit-body {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.08);
}

.note-doc-edit-drop-icon {
  width: 44px;
  height: 44px;
  background: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.note-doc-edit-drop-icon svg {
  width: 24px;
  height: 24px;
}

.note-doc-edit-drop-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--primary-color);
  margin: 0;
}

.note-doc-edit-drop-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0;
}

/* Format bar and footer sit outside the scrolling area — don't grow */
.note-doc-format-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 2px 4px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.note-hint-chip {
  display: inline;
  font-family: "Menlo", "Courier New", monospace;
  font-size: 11px;
  background: var(--app-bg);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--text-secondary);
}

/* ── Live preview split layout ── */
.note-doc--edit > form {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
  height: 100%;
}

.note-doc-image-drop {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.note-doc-body-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: stretch;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

.note-doc-editor-col,
.note-doc-preview-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.note-doc-edit-body-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

.note-doc-edit-body {
  flex: 1;
  width: 100%;
  min-height: 0;
  overflow-y: auto;
  resize: none;
}

.note-doc-preview-pane {
  flex: 1;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px 14px;
  min-height: 0;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-primary);
}
.note-doc-preview-pane p {
  margin-bottom: 1.8em;
}
.note-doc-preview-pane p:last-child {
  margin-bottom: 0;
}
.note-doc-preview-pane ul,
.note-doc-preview-pane ol {
  padding-left: 1.5rem;
  margin-bottom: 1.8em;
}
.note-doc-preview-pane ul {
  list-style-type: disc;
}
.note-doc-preview-pane ol {
  list-style-type: decimal;
}
.note-doc-preview-pane ul ul {
  list-style-type: circle;
}
.note-doc-preview-pane li {
  margin-bottom: 0.15rem;
}

/* Preview pane: column/section labels */
.note-doc-body-cols::before,
.note-doc-body-cols::after {
  display: none;
}

/* Preview images get same treatment as note show */
.note-doc-preview-pane img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  display: block;
}

.note-doc-preview-pane blockquote,
.note-doc-body blockquote {
  border-left: 3px solid var(--border-color);
  padding-left: 16px;
  margin: 1em 0;
  color: var(--text-secondary);
  font-style: normal;
}
.note-doc-preview-pane blockquote p,
.note-doc-body blockquote p {
  margin-bottom: 0;
}
.note-doc-preview-pane blockquote:last-child,
.note-doc-body blockquote:last-child {
  margin-bottom: 0;
}

.note-preview-empty {
  color: var(--text-secondary);
  opacity: 0.5;
  font-style: italic;
  font-size: 14px;
  margin: 0;
}

/* Editor/Preview column header labels */
.note-doc-col-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  opacity: 0.65;
  margin-bottom: 6px;
}

@media (max-width: 767px) {
  .note-doc-body-cols {
    grid-template-columns: 1fr;
    overflow: visible;
    flex: none;
  }
  .note-doc-image-drop {
    flex: none;
    overflow: visible;
  }
  .note-doc--edit > form {
    overflow: visible;
    height: auto;
  }
  .note-doc--edit {
    overflow: visible;
    height: auto !important;
  }
  .main-content.note-page.note-edit-page {
    height: auto;
    overflow: visible;
  }
  .note-doc-edit-body {
    resize: vertical;
    min-height: 240px;
    overflow-y: auto;
  }
  .note-doc-preview-pane {
    min-height: 220px;
  }
}
[data-bs-theme=dark] .note-doc-preview-pane {
  border-color: #334155;
}

/* ── Upload queue ── */
.note-doc-upload-queue {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 6px 0 2px;
}

.note-upload-item {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 10px;
  row-gap: 2px;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--card-bg);
  font-size: 12px;
}

.note-upload-item__name {
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  grid-column: 1;
  grid-row: 1;
}

.note-upload-item__meta {
  font-size: 11px;
  color: var(--text-secondary);
  grid-column: 1;
  grid-row: 2;
}

.note-upload-item__status {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 99px;
  grid-column: 2;
  grid-row: 1/3;
  white-space: nowrap;
}

.note-upload-item__status--uploading {
  background: rgba(79, 70, 229, 0.1);
  color: var(--primary-color);
}

.note-upload-item__status--done {
  background: rgba(22, 163, 74, 0.1);
  color: #16a34a;
}

.note-upload-item__status--error {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}

.note-upload-progress {
  grid-column: 1;
  grid-row: 3;
  width: 100%;
  height: 3px;
  background: var(--border-color);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 4px;
}

.note-upload-progress__fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.2s ease;
}

.note-upload-progress__fill--active {
  background: var(--primary-color);
}

.note-upload-progress__fill--done {
  background: #16a34a;
}

/* ── Inline images in note body (show view) ── */
.note-doc-body .note-image {
  display: block;
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  margin: 4px 0;
  cursor: zoom-in;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.note-doc-body .note-image:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-color);
}

/* ── Auto-gallery grid (2+ consecutive images) ── */
.note-image-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 12px 0;
}

.note-image-gallery__cell {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  aspect-ratio: 4/3;
  cursor: zoom-in;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.note-image-gallery__cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.note-image-gallery__cell:hover {
  border-color: var(--primary-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
  .note-image-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}
/* ── Image lightbox ── */
.image-lightbox {
  background: transparent;
  border: none;
  padding: 0;
  max-width: 100vw;
  max-height: 100vh;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}
.image-lightbox::backdrop {
  background: rgba(0, 0, 0, 0.88);
}
.image-lightbox[open] {
  display: grid;
  place-items: center;
}

.image-lightbox__img {
  max-width: min(92vw, 1200px);
  max-height: 90vh;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  display: block;
}

.image-lightbox__inner {
  display: contents;
}

.image-lightbox__close {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  backdrop-filter: blur(4px);
  z-index: 1;
}
.image-lightbox__close svg {
  width: 20px;
  height: 20px;
}
.image-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.28);
}

.image-lightbox__nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  backdrop-filter: blur(4px);
  z-index: 1;
}
.image-lightbox__nav svg {
  width: 22px;
  height: 22px;
}
.image-lightbox__nav:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.28);
}
.image-lightbox__nav:disabled {
  opacity: 0.25;
  cursor: default;
}
.image-lightbox__nav--prev {
  left: 16px;
}
.image-lightbox__nav--next {
  right: 16px;
}

.image-lightbox__counter {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  font-weight: 500;
  background: rgba(0, 0, 0, 0.35);
  padding: 4px 12px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
  pointer-events: none;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .note-doc {
    padding: 20px 16px 40px;
  }
  .note-doc-title {
    font-size: 22px;
  }
  .note-doc-edit-title {
    font-size: 22px;
  }
  .note-doc-share-strip {
    flex-wrap: wrap;
  }
  .note-doc-share-strip .share-strip-url {
    flex-basis: 100%;
  }
  .note-doc-body h2 {
    font-size: 1.45rem;
  }
  .note-doc-body h3 {
    font-size: 1.25rem;
  }
  .note-doc-body h4 {
    font-size: 1.08rem;
  }
}
/* Dark mode */
[data-bs-theme=dark] .main-content.note-page {
  background: #0f172a;
}
[data-bs-theme=dark] .note-header-bar {
  background: #1e293b;
  border-color: #334155;
}
[data-bs-theme=dark] .btn-doc-action {
  color: #94a3b8;
}
[data-bs-theme=dark] .btn-doc-action:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #f1f5f9;
}
[data-bs-theme=dark] .btn-doc-action.btn-doc-action--danger {
  color: #f87171;
}
[data-bs-theme=dark] .btn-doc-action.btn-doc-action--danger:hover {
  background: rgba(248, 113, 113, 0.1);
  color: #fca5a5;
}
[data-bs-theme=dark] .note-header-url {
  color: #818cf8;
}
[data-bs-theme=dark] .note-header-url:hover {
  background: rgba(129, 140, 248, 0.1);
}
[data-bs-theme=dark] .note-header-url.note-header-url--copied {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.08);
}
[data-bs-theme=dark] .note-header-divider {
  background: #334155;
}
[data-bs-theme=dark] .note-doc-shared-badge {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
}
[data-bs-theme=dark] .note-doc-ai-box {
  background: rgba(255, 255, 255, 0.03);
}
[data-bs-theme=dark] .note-doc-share-strip {
  background: rgba(255, 255, 255, 0.03);
}
[data-bs-theme=dark] .note-doc-context-callout {
  background: rgba(255, 255, 255, 0.03);
}
[data-bs-theme=dark] .btn-ghost-danger {
  color: #f87171;
}
[data-bs-theme=dark] .btn-ghost-danger:hover {
  border-color: #f87171;
  background: rgba(248, 113, 113, 0.1);
}
[data-bs-theme=dark] .note-doc-edit-title:focus {
  background: rgba(99, 102, 241, 0.08);
}
[data-bs-theme=dark] .note-doc-edit-body:focus {
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
[data-bs-theme=dark] .note-doc-edit-drop-overlay {
  background: rgba(99, 102, 241, 0.08);
}
[data-bs-theme=dark].image-drop--active .note-doc-edit-body,
[data-bs-theme=dark] .image-drop--active .note-doc-edit-body {
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
[data-bs-theme=dark] .note-upload-item__status--done {
  color: #86efac;
  background: rgba(134, 239, 172, 0.1);
}
[data-bs-theme=dark] .note-upload-item__status--error {
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.1);
}
[data-bs-theme=dark] .note-upload-progress__fill--done {
  background: #86efac;
}

/* ── Note TOC ─────────────────────────────────────────────────────── */
/* Layout wrapper: note + side rail */
.note-doc-layout {
  display: flex;
  align-items: flex-start;
  width: 100%;
  min-width: 0;
}

/* Desktop side rail */
.note-toc-rail {
  display: none;
  flex-shrink: 0;
  align-self: flex-start;
  width: 170px;
  position: sticky;
  top: 24px;
  padding-right: 24px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  scrollbar-width: none;
}
.note-toc-rail::-webkit-scrollbar {
  display: none;
}
@media (min-width: 1200px) {
  .note-toc-rail.toc-visible {
    display: block;
  }
}

.note-toc-rail-inner {
  border-left: 2px solid var(--border-color);
  padding-left: 14px;
}

.note-toc-rail-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  opacity: 0.7;
}

.note-toc-collapse-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 0;
  line-height: 1;
  font-family: inherit;
  opacity: 0.5;
  display: flex;
  align-items: center;
}
.note-toc-collapse-btn:hover {
  opacity: 1;
  color: var(--primary-color);
}

.note-toc-expand-pill {
  display: none;
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 11px;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
}
.note-toc-expand-pill:hover {
  background: var(--primary-light);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.note-toc-rail.collapsed .note-toc-rail-inner {
  display: none;
}
.note-toc-rail.collapsed .note-toc-expand-pill {
  display: inline-flex;
}

/* Shared TOC list + link styles */
.note-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.note-toc-link {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 3px 0;
  line-height: 1.4;
  transition: color 0.1s;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.note-toc-link:hover {
  color: var(--primary-color);
}
.note-toc-link.active {
  color: var(--primary-color);
  font-weight: 600;
}
.note-toc-link.note-toc-h3 {
  padding-left: 10px;
  font-size: 11.5px;
}
.note-toc-link.note-toc-h4 {
  padding-left: 20px;
  font-size: 11px;
}
.note-toc-link.note-toc-top {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  opacity: 0.75;
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-color);
  white-space: normal;
  overflow: visible;
  text-overflow: initial;
}
.note-toc-link.note-toc-top:hover {
  opacity: 1;
  color: var(--text-primary);
}

/* Mobile floating pill — hidden on desktop */
.note-toc-pill {
  display: none;
  position: fixed;
  bottom: 28px;
  right: 20px;
  z-index: 200;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 24px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  align-items: center;
  gap: 7px;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
  transition: box-shadow 0.15s, transform 0.15s;
}
.note-toc-pill:hover {
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
  transform: translateY(-1px);
}
@media (max-width: 1199px) {
  .note-toc-pill.toc-visible {
    display: inline-flex;
  }
}
.note-toc-pill.note-toc-pill--public.toc-visible {
  display: inline-flex;
}

.note-toc-pill-badge {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  font-size: 11px;
  padding: 1px 6px;
  font-weight: 700;
}

/* Click-outside backdrop */
.note-toc-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 199;
}
.note-toc-backdrop.open {
  display: block;
}

/* Animated popover */
.note-toc-popover {
  position: fixed;
  bottom: 76px;
  right: 20px;
  width: 260px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
  z-index: 200;
  overflow: hidden;
  transform-origin: bottom right;
  transform: scale(0.92) translateY(8px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.15s;
}
.note-toc-popover.open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: all;
}

.note-toc-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 8px;
  border-bottom: 1px solid var(--border-color);
}

.note-toc-popover-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
}

.note-toc-popover-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  opacity: 0.6;
  font-family: inherit;
}
.note-toc-popover-close:hover {
  opacity: 1;
  color: var(--text-primary);
}

.note-toc-progress {
  height: 2px;
  background: var(--border-color);
  margin: 8px 14px 0;
}

.note-toc-progress-fill {
  height: 100%;
  background: var(--primary-color);
  border-radius: 1px;
  width: 0%;
  transition: width 0.3s;
}

.note-toc-popover nav {
  max-height: 300px;
  overflow-y: auto;
  padding: 6px 0 8px;
  scrollbar-width: thin;
}
.note-toc-popover nav::-webkit-scrollbar {
  width: 4px;
}
.note-toc-popover nav::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 2px;
}

.note-toc-popover .note-toc-link {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  font-size: 13px;
  white-space: normal;
  overflow: visible;
  text-overflow: initial;
}
.note-toc-popover .note-toc-link:not(.note-toc-top)::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
  opacity: 0.4;
}
.note-toc-popover .note-toc-link:hover {
  background: var(--primary-light);
}
.note-toc-popover .note-toc-link.note-toc-h3 {
  padding-left: 22px;
  font-size: 12.5px;
}
.note-toc-popover .note-toc-link.note-toc-h3::before {
  width: 4px;
  height: 4px;
  opacity: 0.3;
}
.note-toc-popover .note-toc-link.note-toc-h4 {
  padding-left: 30px;
  font-size: 12px;
}
.note-toc-popover .note-toc-link.note-toc-h4::before {
  width: 3px;
  height: 3px;
  opacity: 0.2;
}

/* Dark mode overrides for TOC */
[data-bs-theme=dark] .note-toc-popover {
  background: #1e293b;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
[data-bs-theme=dark] .note-toc-expand-pill:hover {
  background: rgba(99, 102, 241, 0.15);
}
[data-bs-theme=dark] .note-toc-pill {
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.25);
}
[data-bs-theme=dark] .note-toc-pill:hover {
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
}

.reminder-modal-contact-banner {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  padding: 9px 12px;
  background: var(--app-bg, #f8fafc);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}
.reminder-modal-contact-banner__icon {
  color: var(--primary-color);
  opacity: 0.7;
  flex-shrink: 0;
  width: 13px;
  height: 13px;
}
.reminder-modal-contact-banner strong {
  color: var(--text-primary);
  font-weight: 600;
}

[data-bs-theme=dark] .reminder-modal-contact-banner {
  background: rgba(255, 255, 255, 0.04);
}

.app-breadcrumb .breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  font-size: 0.8rem;
}
.app-breadcrumb .breadcrumb-item {
  display: inline-flex;
  align-items: center;
}
.app-breadcrumb .breadcrumb-item + .breadcrumb-item {
  padding-left: 0.5rem;
}
.app-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  float: left;
  padding-right: 0.5rem;
  color: var(--text-secondary);
}
.app-breadcrumb .breadcrumb-item.active {
  color: var(--text-primary);
}
.app-breadcrumb .breadcrumb-item a {
  color: var(--text-secondary);
  text-decoration: none;
}
.app-breadcrumb .breadcrumb-item a:hover {
  color: var(--primary-color);
}

:root {
  --score-green: #10b981;
  --score-amber: #f59e0b;
  --score-red: #ef4444;
  --score-freq-blue: #3b82f6;
  --score-purple: #8b5cf6;
}

.contact-hero.card {
  border-radius: 14px 14px 0 0;
  border-bottom: none;
}

.contact-hero.card.contact-hero--birthday {
  position: relative;
}
.contact-hero.card.contact-hero--birthday::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #f59e0b, #ec4899, #8b5cf6);
  border-radius: 14px 14px 0 0;
  z-index: 1;
}

.birthday-inline-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 0.82rem;
  color: #b45309;
  font-weight: 500;
}

[data-bs-theme=dark] .birthday-inline-note {
  color: #fbbf24;
}

.contact-metrics-strip.card {
  border-top: none;
  border-bottom: none;
  border-radius: 0;
}

.contact-tabs.card {
  border-top: none;
  border-bottom: none;
  border-radius: 0;
}

.contact-tabs + .tab-content.card {
  border-top: none;
  border-radius: 0 0 14px 14px;
  margin-top: -1px;
}

.contact-hero .contact-hero__inner {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  padding: 26px 28px 22px;
  flex-wrap: wrap;
}
.contact-hero .contact-hero__inner .photo-drop-wrapper {
  flex-shrink: 0;
  position: relative;
}
.contact-hero .contact-hero__inner .photo-drop-wrapper img.rounded-circle, .contact-hero .contact-hero__inner .photo-drop-wrapper img.contact-hero-photo {
  width: 104px;
  height: 104px;
  object-fit: cover;
  border-radius: 9999px;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.25);
}
.contact-hero .contact-hero__info {
  flex: 1;
  min-width: 0;
}
.contact-hero .contact-roles {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.contact-hero .contact-role {
  font-size: 1rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  line-height: 1.4;
}
.contact-hero .contact-role__title {
  font-weight: 600;
}
.contact-hero .contact-role__sep {
  color: var(--text-muted, #94a3b8);
  margin: 0 8px;
}
.contact-hero .contact-role__company {
  color: var(--primary-color, #5046e5);
  text-decoration: none;
  font-weight: 600;
}
.contact-hero .contact-role__company:hover {
  text-decoration: underline;
}
.contact-hero .contact-role__company-text {
  color: var(--text-secondary);
}
.contact-hero .contact-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}
.contact-hero .contact-group {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.86rem;
  text-decoration: none;
}
.contact-hero .contact-group:hover {
  color: var(--text-primary);
}
.contact-hero .contact-hero__narrative {
  margin: 12px 0 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 60ch;
}
.contact-hero .contact-hero__narrative b {
  color: var(--text-primary);
  font-weight: 600;
}

.related-people-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}

.related-person-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
}

.related-person-row--derived {
  opacity: 0.65;
}

.related-person-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  font-size: 1rem;
  line-height: 1;
  color: var(--text-secondary);
  background: none;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.12s ease, color 0.12s ease;
  padding: 0;
}

.related-person-row form {
  margin-left: auto;
  display: flex;
  align-items: center;
}

.related-person-row:hover .related-person-remove {
  opacity: 1;
}

.related-person-remove:hover {
  color: #dc2626;
}

.related-person-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 0.88rem;
}

.related-person-link:hover {
  color: var(--primary-color);
}

.related-person-name {
  font-weight: 500;
}

.related-person-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.rel-suggestion-block {
  border: 1px dashed #c7d2fe;
  background: #f5f3ff;
  border-radius: 10px;
  padding: 10px 12px;
  margin-top: 6px;
}

.rel-suggestion-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.rel-suggestion-header-left {
  display: flex;
  align-items: flex-start;
  gap: 7px;
}

.rel-suggestion-icon {
  color: #7c3aed;
  flex-shrink: 0;
  margin-top: 2px;
}

.rel-suggestion-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #4c1d95;
  line-height: 1.3;
}

.rel-suggestion-subtitle {
  font-size: 0.75rem;
  color: #6d28d9;
  margin-top: 2px;
}

.rel-suggestion-skip-all {
  font-size: 0.7rem;
  color: var(--text-secondary);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.rel-suggestion-skip-all:hover {
  color: #dc2626;
  text-decoration: underline;
}

.rel-suggestion-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  border-top: 1px solid #ddd6fe;
}

.rel-suggestion-name {
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.rel-suggestion-label {
  font-size: 0.74rem;
  color: var(--text-secondary);
}

.rel-suggestion-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.rel-suggestion-actions form {
  display: contents;
}

.btn-add-suggestion {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--primary-color);
  background: none;
  border: 1px solid #c7d2fe;
  border-radius: 6px;
  padding: 2px 8px;
  cursor: pointer;
  white-space: nowrap;
}

.btn-add-suggestion:hover {
  background: #ede9fe;
  border-color: #a5b4fc;
}

.btn-skip-suggestion {
  font-size: 0.82rem;
  line-height: 1;
  color: #a5b4fc;
  background: none;
  border: none;
  padding: 2px 5px;
  cursor: pointer;
}

.btn-skip-suggestion:hover {
  color: #6d28d9;
}

[data-bs-theme=dark] .rel-suggestion-block {
  background: #1e1b4b;
  border-color: #4338ca;
}

[data-bs-theme=dark] .rel-suggestion-title {
  color: #c4b5fd;
}

[data-bs-theme=dark] .rel-suggestion-subtitle {
  color: #a5b4fc;
}

[data-bs-theme=dark] .rel-suggestion-row {
  border-color: #312e81;
}

[data-bs-theme=dark] .btn-add-suggestion {
  color: #a5b4fc;
  border-color: #4338ca;
}

[data-bs-theme=dark] .btn-add-suggestion:hover {
  background: #312e81;
}

.rel-add-form {
  margin-top: 4px;
}

.rel-add-fields {
  background: var(--app-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px 12px;
}

.rel-add-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.rel-add-search {
  position: relative;
  flex: 2 1 120px;
  min-width: 0;
}

.rel-add-search .rel-edit-input {
  width: 100%;
}

.rel-add-suggestions {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  background: var(--app-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
  z-index: 50;
  overflow: hidden;
  min-width: 180px;
}

.rel-add-suggestion {
  display: flex;
  align-items: center;
  padding: 7px 10px;
  font-size: 0.875rem;
  cursor: pointer;
}

.rel-add-suggestion:hover {
  background: var(--border-color);
}

.rel-add-suggestion--new {
  display: block;
  color: var(--primary-color);
  font-style: normal;
}
.rel-add-suggestion--new strong {
  white-space: nowrap;
}
.rel-add-suggestion--new .rel-add-new-label {
  color: var(--text-secondary);
  font-size: 0.78rem;
  margin-right: 2px;
}

.rel-add-row .rel-edit-input {
  flex: 1 1 90px;
  min-width: 0;
}

.rel-well-display {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.rel-well-display .rel-well-value {
  color: var(--text-primary);
}
.rel-well-display .rel-well-edit {
  display: inline-flex;
  align-items: center;
  color: var(--text-secondary);
  opacity: 0;
  transition: opacity 0.12s ease, color 0.12s ease;
}
.rel-well-display:hover .rel-well-edit {
  opacity: 1;
}
.rel-well-display .rel-well-edit:hover {
  color: var(--primary-color);
}

.rel-well-set {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-secondary);
  font-size: 0.86rem;
  text-decoration: none;
  background: none;
  border: none;
  padding: 2px 0;
  cursor: pointer;
}

.rel-well-set:hover {
  color: var(--primary-color);
}

.rel-edit-form .rel-edit-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.rel-edit-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 4px 8px;
  font-size: 0.9rem;
  color: var(--text-primary);
  background: var(--app-bg);
  border: 1px solid var(--border-color);
  border-radius: 6px;
}

.rel-edit-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.rel-edit-save {
  padding: 4px 10px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  background: var(--primary-color);
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.rel-edit-cancel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--text-secondary);
  background: none;
  border: none;
  text-decoration: none;
  border-radius: 6px;
  cursor: pointer;
}

.rel-edit-cancel:hover {
  color: var(--text-primary);
}

.rel-edit-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.rel-chip {
  padding: 2px 9px;
  font-size: 0.76rem;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.12s ease, border-color 0.12s ease;
}

.rel-chip:hover {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.contact-score-badge {
  position: absolute;
  right: -4px;
  bottom: -2px;
  z-index: 3;
}
.contact-score-badge__trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--card-bg, #fff);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.14);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.contact-score-badge__trigger:hover {
  border-color: var(--score-color);
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.18);
}
.contact-score-badge__swatch {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--score-color);
  flex-shrink: 0;
}
.contact-score-badge__value {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}
.contact-score-badge .score-breakdown-panel {
  top: calc(100% + 10px);
  right: auto;
  left: 0;
}

@media (max-width: 576px) {
  .contact-hero .contact-hero__inner {
    gap: 16px;
    padding: 16px;
  }
  .contact-hero .contact-hero__inner img.rounded-circle, .contact-hero .contact-hero__inner img.contact-hero-photo {
    width: 76px;
    height: 76px;
  }
  .contact-hero .contact-score-badge__trigger {
    padding: 3px 8px;
  }
  .contact-hero .contact-score-badge__value {
    font-size: 0.78rem;
  }
}
.contact-hero__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.btn-hero-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.4;
}
.btn-hero-action svg {
  flex-shrink: 0;
}
.btn-hero-action:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: rgba(79, 70, 229, 0.06);
  text-decoration: none;
}
.btn-hero-action--primary {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
}
.btn-hero-action--primary:hover {
  background: #4338ca;
  border-color: #4338ca;
  color: #fff;
}
.btn-hero-action--icon {
  padding: 5px 8px;
}

.contact-hero__settings {
  display: inline-flex;
}
.contact-hero__settings .dropdown-item {
  display: flex;
  align-items: center;
  font-size: 0.85rem;
}
.contact-hero__settings .dropdown-item svg {
  flex-shrink: 0;
}

[data-bs-theme=dark] .btn-hero-action {
  background: transparent;
  border-color: var(--border-color);
  color: var(--text-secondary);
}
[data-bs-theme=dark] .btn-hero-action:hover {
  border-color: var(--primary-color);
  color: #c7d2fe;
  background: rgba(79, 70, 229, 0.12);
}
[data-bs-theme=dark] .btn-hero-action--primary {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
}
[data-bs-theme=dark] .btn-hero-action--primary:hover {
  background: #4338ca;
  border-color: #4338ca;
  color: #fff;
}

.btn-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e2e8f0;
  color: #475569;
  border-radius: 4px;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 5px;
  letter-spacing: 0.02em;
  margin-left: 2px;
  line-height: 1.4;
}
.btn-hero-action--primary .btn-kbd, .tw-btn-primary .btn-kbd {
  background: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.9);
}
.tw-btn-outline .btn-kbd {
  background: #f1f5f9;
  color: #64748b;
}

@media (hover: none) {
  .btn-kbd {
    display: none;
  }
  .task-index-edit-btn {
    display: none;
  }
}
.quick-note-compose {
  background: #fafbff;
  border: 1px solid #e0e7ff;
  border-radius: 10px;
  padding: 14px 16px;
}

.quick-note-compose__actions {
  margin-top: 10px;
}

.quick-note-textarea {
  resize: none;
  font-size: 0.875rem;
}
.quick-note-textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

[data-bs-theme=dark] .quick-note-compose {
  background: #1a2234;
  border-color: #334155;
}

.score-chip {
  position: relative;
  display: inline-block;
}
.score-chip__trigger {
  display: flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: 1px solid var(--border-color);
  padding: 4px 12px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: border-color 0.15s, background 0.15s;
}
.score-chip__trigger:hover {
  border-color: var(--score-color);
  background: color-mix(in srgb, var(--score-color) 6%, transparent);
}
.score-chip__swatch {
  width: 8px;
  height: 8px;
  background: var(--score-color);
  border-radius: 50%;
  flex-shrink: 0;
}
.score-chip__value {
  font-size: 1rem;
  font-weight: 800;
  color: var(--score-color);
  line-height: 1;
}
.score-chip__sep {
  width: 1px;
  height: 12px;
  background: var(--border-color);
  flex-shrink: 0;
}
.score-chip__label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-secondary);
  font-weight: 700;
}
.score-chip__strength {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--score-color);
}

.score-breakdown-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 292px;
  background: var(--card-bg, #fff);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.13);
  padding: 18px;
  z-index: 500;
}
.score-breakdown-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-secondary);
}
.score-breakdown-panel__avg {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}
.score-breakdown-panel__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
  margin-top: 4px;
}
.score-breakdown-panel__footer-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.score-breakdown-panel__footer-value {
  font-size: 1.2rem;
  font-weight: 900;
}
.score-breakdown-panel__footer-denom {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-secondary);
}

.score-breakdown-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 3px;
}
.score-breakdown-row__label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  width: 84px;
  flex-shrink: 0;
}
.score-breakdown-row__track {
  flex: 1;
  height: 6px;
  background: var(--border-color);
  border-radius: 99px;
  overflow: hidden;
}
.score-breakdown-row__fill {
  height: 100%;
  border-radius: 99px;
}
.score-breakdown-row__value {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-primary);
  width: 24px;
  text-align: right;
  flex-shrink: 0;
}
.score-breakdown-row__weight {
  font-size: 0.62rem;
  color: var(--text-secondary);
  width: 30px;
  text-align: right;
  flex-shrink: 0;
}
.score-breakdown-row__note {
  font-size: 0.65rem;
  color: var(--text-secondary);
  margin: 1px 0 10px 91px;
}

[data-bs-theme=dark] .score-chip__trigger {
  background: none;
}
[data-bs-theme=dark] .score-breakdown-panel {
  background: var(--card-bg);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

.score-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.score-history-trend {
  font-size: 0.72rem;
  font-weight: 600;
}

.contact-metrics-strip .contact-metrics-strip__grid {
  display: flex;
  flex-wrap: wrap;
}
.contact-metrics-strip .contact-metrics-strip__cell {
  flex: 1;
  min-width: 100px;
  padding: 14px 18px;
  text-align: center;
  border-right: 1px solid var(--border-color);
}
.contact-metrics-strip .contact-metrics-strip__cell:last-child {
  border-right: none;
}
.contact-metrics-strip .contact-metrics-strip__value {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.contact-metrics-strip .contact-metrics-strip__value--text {
  font-size: 1rem;
  font-weight: 700;
}
.contact-metrics-strip .contact-metrics-strip__label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-top: 2px;
}
.contact-metrics-strip .contact-metrics-strip__sub {
  font-size: 0.65rem;
  margin-top: 2px;
  white-space: nowrap;
}

@media (max-width: 576px) {
  .contact-metrics-strip .contact-metrics-strip__cell {
    min-width: 80px;
    padding: 10px 12px;
  }
  .contact-metrics-strip .contact-metrics-strip__value {
    font-size: 1.1rem;
  }
}
.contact-stats-inline {
  display: flex;
  align-items: center;
  padding: 7px 22px;
  flex-wrap: wrap;
  background: var(--app-bg);
}

.contact-stats-pill {
  display: flex;
  align-items: baseline;
  gap: 4px;
  padding: 3px 14px 3px 0;
}
.contact-stats-pill + .contact-stats-pill {
  border-left: 1px solid var(--border-color);
  padding-left: 14px;
}

.contact-stats-val {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

.contact-stats-lbl {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.contact-stats-sub {
  font-size: 0.65rem;
  color: var(--score-green);
  font-weight: 600;
}

.quick-note-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fafbff;
  border: 1px solid #e0e7ff;
  border-radius: 8px;
  padding: 9px 14px;
  cursor: text;
  margin-bottom: 14px;
  transition: border-color 0.15s;
}
.quick-note-pill:hover {
  border-color: var(--primary-color);
}
.quick-note-pill__placeholder {
  color: var(--text-secondary);
  font-size: 0.875rem;
  flex: 1;
}
.quick-note-pill__hint {
  font-size: 0.65rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.06);
  border-radius: 4px;
  padding: 1px 6px;
  font-weight: 700;
}

.btn-chart-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 0;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  cursor: pointer;
  margin-top: 16px;
}
.btn-chart-toggle:hover {
  color: var(--text-secondary);
}

.chart-toggle-chevron {
  display: inline-flex;
  transition: transform 0.2s;
}
.chart-toggle-chevron svg {
  width: 12px;
  height: 12px;
}

[data-bs-theme=dark] .contact-stats-inline {
  background: #0f172a;
}

[data-bs-theme=dark] .quick-note-pill {
  background: #1a2234;
  border-color: #334155;
}
[data-bs-theme=dark] .quick-note-pill__hint {
  background: rgba(255, 255, 255, 0.08);
}

.contact-tabs .contact-tabs__nav {
  border-bottom: 1px solid var(--border-color);
  padding: 0 16px;
  overflow: hidden;
}

.contact-tab-list {
  display: flex;
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
  gap: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.contact-tab-list::-webkit-scrollbar {
  display: none;
}

.contact-tab-btn {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 12px 16px;
  border: none;
  background: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.12s, border-color 0.12s;
}
.contact-tab-btn.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}
.contact-tab-btn:hover {
  text-decoration: none;
}
.contact-tab-btn:hover:not(.active) {
  color: var(--text-primary);
}

.contact-tab-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  background: var(--border-color);
  color: var(--text-secondary);
}
.contact-tab-btn.active .contact-tab-badge {
  background: rgba(79, 70, 229, 0.12);
  color: var(--primary-color);
}

.tab-pane {
  display: none;
}
.tab-pane.active, .tab-pane.show {
  display: block;
}

.tab-pane__body {
  padding: 24px;
}
@media (max-width: 576px) {
  .tab-pane__body {
    padding: 16px;
  }
}

.interaction-chart__bars {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 64px;
}
.interaction-chart__col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  justify-content: flex-end;
  height: 64px;
}
.interaction-chart__bar {
  width: 100%;
  border-radius: 2px 2px 0 0;
  min-height: 1px;
  transition: opacity 0.15s;
}
.interaction-chart__bar:hover {
  opacity: 0.8;
}
.interaction-chart__bar--email {
  background: #3b82f6;
}
.interaction-chart__bar--meeting {
  background: #8b5cf6;
  border-radius: 0;
}
.interaction-chart__labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.6rem;
  color: var(--text-secondary);
  margin-top: 4px;
}
.interaction-chart__labels span {
  flex: 1;
  text-align: center;
}
.interaction-chart__legend {
  display: flex;
  gap: 14px;
  margin-top: 8px;
}
.interaction-chart__legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  color: var(--text-secondary);
}
.interaction-chart__legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}
.interaction-chart__legend-swatch--email {
  background: #3b82f6;
}
.interaction-chart__legend-swatch--meeting {
  background: #8b5cf6;
}

.contact-bio {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-primary);
  white-space: pre-wrap;
  margin-bottom: 1.5rem;
}

.email-row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--card-bg);
}
.email-row__icon {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--app-bg);
  color: var(--text-muted, #94a3b8);
}
.email-row__icon--sent {
  color: var(--primary-color);
}
.email-row__icon--received {
  color: var(--score-freq-blue, #3b82f6);
}
.email-row__main {
  flex: 1;
  min-width: 0;
}
.email-row__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.email-row__subject {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.email-row__subject, .email-row__subject:hover {
  color: var(--text-primary);
  text-decoration: none;
}
.email-row__subject:hover {
  text-decoration: underline;
}
.email-row__date {
  flex-shrink: 0;
  font-size: 0.75rem;
  color: var(--text-muted, #94a3b8);
}
.email-row__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 8px;
  margin-top: 2px;
  font-size: 0.75rem;
  color: var(--text-muted, #94a3b8);
}
.email-row__dir {
  font-weight: 500;
  color: var(--text-secondary);
}
.email-row__dir--sent {
  color: var(--primary-color);
}
.email-row__recipient {
  color: var(--text-secondary);
  text-decoration: none;
}
.email-row__recipient:hover {
  text-decoration: underline;
}

.note-card {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}
.note-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  background: var(--app-bg);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.note-card__date {
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.note-card__title {
  font-weight: 500;
  font-size: 0.875rem;
  padding: 10px 14px 0;
}
.note-card__body {
  padding: 10px 14px;
  font-size: 0.875rem;
  color: var(--text-primary);
}

.meeting-card-next {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--card-bg);
}
.meeting-card-next__date {
  flex-shrink: 0;
  text-align: right;
  min-width: 68px;
}
.meeting-card-next__date-main {
  font-size: 1rem;
  line-height: 1.25;
}
.meeting-card-next__month {
  color: #ef4444;
  font-weight: 600;
}
.meeting-card-next__day {
  font-weight: 700;
  color: var(--text-primary);
}
.meeting-card-next__dow {
  font-size: 0.75rem;
  color: var(--text-muted, #94a3b8);
  line-height: 1.3;
}
.meeting-card-next__year {
  font-size: 0.72rem;
  color: var(--text-muted, #94a3b8);
}
.meeting-card-next__divider {
  width: 1px;
  height: 36px;
  background: var(--border-color);
  flex-shrink: 0;
}
.meeting-card-next__info {
  flex: 1;
  min-width: 0;
}
.meeting-card-next__title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}
.meeting-card-next__title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.meeting-card-next__title:hover {
  color: var(--primary-color);
}
.meeting-card-next__time {
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.meeting-card-next__ext {
  color: var(--text-muted, #94a3b8);
  flex-shrink: 0;
  text-decoration: none;
  line-height: 1;
}
.meeting-card-next__ext:hover {
  color: var(--text-secondary);
}

[data-bs-theme=dark] .meeting-card-next__month {
  color: #f87171;
}

.detail-well {
  border: 1px solid var(--border-color);
  border-radius: 10px;
}
.detail-well__row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
}
.detail-well__row:last-child {
  border-bottom: none;
}
.detail-well__label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  font-weight: 600;
}
.detail-well__value {
  font-size: 0.875rem;
  color: var(--text-primary);
}

/* ── Print styles ────────────────────────────────────────────────── */
@media print {
  /* Hide chrome */
  .sidebar,
  .mobile-header,
  .note-doc-controls,
  .note-doc-ai-section,
  .note-toc-rail,
  .note-toc-pill,
  .note-toc-backdrop,
  .note-toc-popover,
  .search-modal,
  dialog {
    display: none !important;
  }
  /* Extra breathing room before the note title */
  .note-doc-title {
    margin-top: 2rem !important;
  }
  /* Remove sidebar offset so content fills the page */
  .main-content {
    margin-left: 0 !important;
    padding: 0 !important;
    max-width: none !important;
  }
  /* Ensure note document uses full width */
  .note-doc-layout {
    display: block !important;
  }
  .note-doc {
    max-width: 100% !important;
    padding: 0 !important;
  }
  /* Clean up backgrounds and shadows for print */
  body,
  .main-content,
  .note-doc {
    background: #fff !important;
    color: #000 !important;
  }
}
.browser-frame {
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
}
.browser-frame img {
  display: block;
  width: 100%;
}

.browser-frame-body {
  height: 320px;
  overflow: hidden;
}
.browser-frame-body img {
  display: block;
  width: 100%;
  object-fit: cover;
  object-position: top left;
}

.browser-bar {
  background: #e8eaed;
  padding: 8px 12px;
  display: flex;
  align-items: center;
}

.browser-dots {
  display: flex;
  gap: 5px;
}
.browser-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.browser-dots span:nth-child(1) {
  background: #ff5f57;
}
.browser-dots span:nth-child(2) {
  background: #febc2e;
}
.browser-dots span:nth-child(3) {
  background: #28c840;
}

[data-bs-theme=dark] .browser-frame {
  border-color: rgba(255, 255, 255, 0.1);
  background: #1e293b;
}
[data-bs-theme=dark] .browser-bar {
  background: #334155;
}

/* ─────────────────────────────────────────────────────────────────────────
   Organizations
   ───────────────────────────────────────────────────────────────────────── */
/* Utility: allow a flex child to shrink below its content size (enables
   text-truncate inside flex rows). Bootstrap 5.3 ships no such class. */
.min-width-0 {
  min-width: 0;
}

/* Org logo placeholder */
.org-logo-lg,
.org-logo-md,
.org-logo-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef2ff;
  color: var(--primary-color, #5046e5);
  font-weight: 800;
  flex-shrink: 0;
  border: 1px solid var(--border-color, #e2e8f0);
}

.org-logo-lg {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  font-size: 1.5rem;
}

.org-logo-md {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  font-size: 1.05rem;
}

.org-logo-sm {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  font-size: 0.8rem;
}

img.org-logo-lg,
img.org-logo-md,
img.org-logo-sm {
  object-fit: cover;
  background: #fff;
}

/* Org picker (contact form) — role cards + inline editor */
.roles-field {
  position: relative;
}

/* Selected roles: one card per role (title over company) */
.role-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.role-list:has(.role-card) {
  margin-bottom: 12px;
}

.role-hint-sep {
  color: var(--border-color);
  margin-right: 2px;
}

.role-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  background: var(--app-bg, #f8fafc);
}

.role-body {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  min-width: 0;
}

.role-body[role=button] {
  cursor: pointer;
  border-radius: 6px;
}

.role-body[role=button]:hover .role-company,
.role-body[role=button]:hover .role-title {
  color: var(--primary-color, #4f46e5);
}

.role-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.role-title-empty {
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--primary-color, #4f46e5);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.role-company {
  color: var(--text-secondary, #64748b);
  font-size: 0.85rem;
}

.role-x {
  margin-left: auto;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary, #94a3b8);
  font-size: 1.2rem;
  line-height: 1;
  padding: 0;
}

.role-x:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

/* "Add role" trigger */
.role-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px dashed var(--primary-color, #5046e5);
  background: transparent;
  color: var(--primary-color, #5046e5);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.role-add-btn:hover {
  background: rgba(80, 70, 229, 0.06);
}

.role-add-plus {
  font-size: 1.15em;
  line-height: 1;
}

/* Inline role editor */
.role-editor {
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  padding: 16px;
  background: var(--card-bg, #fff);
}

.role-editor-field {
  margin-bottom: 12px;
}

.role-editor-field:last-of-type {
  margin-bottom: 0;
}

.role-editor-field > label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
  margin-bottom: 5px;
}

.role-editor-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
}

/* Company search box */
.org-add {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 0.5rem;
  padding: 9px 12px;
  background: var(--card-bg, #fff);
}

.org-add:focus-within {
  border-color: var(--primary-color, #5046e5);
  box-shadow: 0 0 0 3px rgba(80, 70, 229, 0.12);
}

.org-add-icon {
  color: var(--text-secondary, #94a3b8);
  flex-shrink: 0;
}

.org-add-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  font-size: 0.9rem;
  background: transparent;
  color: inherit;
}

.org-add-input::placeholder {
  color: var(--text-secondary, #94a3b8);
}

/* Org type-ahead menu */
.org-ta-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  background: var(--card-bg, #fff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  z-index: 30;
  overflow: hidden;
}

.org-ta-item {
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  font-size: 0.88rem;
}

.org-ta-item:hover,
.org-ta-item.active {
  background: rgba(80, 70, 229, 0.06);
}

.org-ta-name {
  font-weight: 600;
}

.org-ta-sub {
  font-size: 0.76rem;
  color: var(--text-secondary, #94a3b8);
}

.org-ta-text {
  display: flex;
  flex-direction: column;
}

.org-ta-count {
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--text-secondary, #64748b);
  background: rgba(148, 163, 184, 0.15);
  border-radius: 20px;
  padding: 2px 9px;
}

.org-ta-create {
  border-top: 1px dashed var(--border-color, #e2e8f0);
  color: var(--primary-color, #5046e5);
  font-weight: 600;
}

.org-ta-plus {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: #eef2ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--primary-color, #5046e5);
}

.org-ta-create mark {
  background: #fef9c3;
  padding: 0 2px;
  border-radius: 3px;
}

/* Org profile */
.org-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.org-hero-info {
  min-width: 0;
}

.org-domain-link {
  font-size: 0.85rem;
  color: var(--text-secondary, #64748b);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Org logo drop zone */
.org-logo-drop-wrapper {
  position: relative;
  display: inline-block;
  cursor: pointer;
  border-radius: 14px;
  flex-shrink: 0;
}
.org-logo-drop-wrapper .org-logo-lg {
  transition: opacity 0.15s ease;
}
.org-logo-drop-wrapper:hover .org-logo-drop-overlay, .org-logo-drop-wrapper.org-logo-drop--active .org-logo-drop-overlay {
  opacity: 1;
}
.org-logo-drop-wrapper.org-logo-drop--active .org-logo-lg, .org-logo-drop-wrapper.org-logo-drop--loading .org-logo-lg {
  opacity: 0.5;
}

.org-logo-drop-overlay {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
  color: #fff;
}
.org-logo-drop-overlay svg {
  width: 20px;
  height: 20px;
}

[data-bs-theme=dark] .org-logo-drop-overlay {
  background: rgba(0, 0, 0, 0.65);
}

.org-domain-link a {
  color: var(--primary-color, #5046e5);
  text-decoration: none;
}

/* Suggested-contacts CTA + review modal */
.suggested-cta {
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 10px;
  padding: 10px 14px;
}

.suggested-row {
  border-top: 1px solid var(--border-color, #e2e8f0);
  display: flex;
  align-items: center;
  margin: 0;
}

.suggested-row:first-child {
  border-top: none;
}

.suggested-row:hover {
  background: rgba(80, 70, 229, 0.04);
}

.suggested-row label {
  cursor: pointer;
  flex: 1;
  min-width: 0;
  margin: 0;
}

.remove-ignore-btn {
  font-size: 0.72rem;
  color: #f87171;
  background: none;
  border: 1px solid #fca5a5;
  border-radius: 20px;
  padding: 2px 9px 2px 7px;
  margin-right: 12px;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  line-height: 1.4;
}

.remove-ignore-btn:hover {
  color: #dc2626;
  border-color: #f87171;
  background: #fff1f2;
}

/* Hide the remove button while the row's checkbox is checked */
.suggested-row:has(input[type=checkbox]:checked) .remove-ignore-btn {
  visibility: hidden;
}

.remove-confirm-panel {
  border-top: 1px solid #fca5a5;
  background: #fff1f2;
}

.reason-chip {
  font-size: 0.68rem;
  font-weight: 600;
  border-radius: 5px;
  padding: 2px 7px;
  white-space: nowrap;
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-secondary, #64748b);
}

.reason-chip.strong {
  background: #dcfce7;
  color: #166534;
}

.reason-chip.role {
  background: #fef3c7;
  color: #92400e;
}

@media (max-width: 768px) {
  .suggested-cta {
    flex-wrap: wrap;
  }
}
/* Org link pill (contact profile) */
.org-link-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary-color, #5046e5);
  text-decoration: none;
  font-weight: 600;
  background: #eef2ff;
  border-radius: 20px;
  padding: 3px 11px 3px 6px;
  font-size: 0.85rem;
}

.org-link-pill:hover {
  background: #e0e7ff;
  color: #4338ca;
}

/* Org index */
.org-index-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  text-decoration: none;
  color: inherit;
}

.org-index-row:last-child {
  border-bottom: none;
}

.org-index-row:hover {
  background: rgba(80, 70, 229, 0.04);
}

.org-index-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.org-index-sub {
  font-size: 0.78rem;
  color: var(--text-secondary, #64748b);
}

.org-index-count {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--text-secondary, #64748b);
  background: rgba(148, 163, 184, 0.15);
  border-radius: 20px;
  padding: 4px 12px;
  font-weight: 600;
}

[data-bs-theme=dark] .org-logo-lg,
[data-bs-theme=dark] .org-logo-md,
[data-bs-theme=dark] .org-logo-sm {
  background: #312e81;
  color: #c7d2fe;
  border-color: #3730a3;
}
[data-bs-theme=dark] img.org-logo-lg,
[data-bs-theme=dark] img.org-logo-md,
[data-bs-theme=dark] img.org-logo-sm {
  background: #1e293b;
}
[data-bs-theme=dark] .org-chip {
  background: #312e81;
  color: #c7d2fe;
}
[data-bs-theme=dark] .org-chip-role {
  background: rgba(199, 210, 254, 0.12);
  color: #c7d2fe;
}
[data-bs-theme=dark] .org-chip-x {
  color: #a5b4fc;
}
[data-bs-theme=dark] .role-card {
  background: #1e293b;
  border-color: #334155;
}
[data-bs-theme=dark] .role-editor {
  background: #1e293b;
  border-color: #334155;
}
[data-bs-theme=dark] .role-add-btn:hover {
  background: rgba(199, 210, 254, 0.08);
}
[data-bs-theme=dark] .org-ta-plus {
  background: #312e81;
  color: #c7d2fe;
}
[data-bs-theme=dark] .org-ta-create mark {
  background: #854d0e;
  color: #fef9c3;
}
[data-bs-theme=dark] .org-link-pill {
  background: #312e81;
  color: #c7d2fe;
}
[data-bs-theme=dark] .org-link-pill:hover {
  background: #3730a3;
  color: #e0e7ff;
}
[data-bs-theme=dark] .suggested-cta {
  background: #1e293b;
  border-color: #3730a3;
}
[data-bs-theme=dark] .suggested-row {
  border-color: #334155;
}
[data-bs-theme=dark] .suggested-row:hover {
  background: rgba(199, 210, 254, 0.06);
}
[data-bs-theme=dark] .remove-confirm-panel {
  background: #1e1313;
  border-color: #7f1d1d;
}
[data-bs-theme=dark] .reason-chip {
  background: rgba(148, 163, 184, 0.16);
  color: #94a3b8;
}
[data-bs-theme=dark] .reason-chip.strong {
  background: #14532d;
  color: #bbf7d0;
}
[data-bs-theme=dark] .reason-chip.role {
  background: #854d0e;
  color: #fef9c3;
}

.due-chip-group-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
  margin-right: 0.1rem;
}

.due-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}

.due-chip-hint {
  font-size: 0.7rem;
  font-weight: 400;
  color: #94a3b8;
}

.due-chip:hover .due-chip-hint {
  color: inherit;
  opacity: 0.75;
}

.due-chip--clear {
  color: #94a3b8;
}
.due-chip--clear:hover {
  color: #ef4444;
  border-color: #ef4444;
}

[data-bs-theme=dark] .due-chip-group-label {
  color: #64748b;
}
[data-bs-theme=dark] .due-chip-hint {
  color: #64748b;
}
[data-bs-theme=dark] .due-chip--clear {
  color: #64748b;
}

.agenda-day-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 6px;
}
.agenda-day-header:first-child {
  margin-top: 0;
}
.agenda-day-header__label {
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}
.agenda-day-header__dow {
  color: var(--text-secondary);
  font-weight: 500;
  margin-right: 3px;
}
.agenda-day-header__num {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-right: 3px;
}
.agenda-day-header__mon {
  color: #ef4444;
  font-weight: 600;
}
.agenda-day-header__year {
  color: var(--text-muted, #94a3b8);
  font-weight: 400;
  margin-left: 2px;
}
.agenda-day-header__line {
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.agenda-meeting-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 4px;
  background: var(--card-bg);
}
.agenda-meeting-row__time {
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 128px;
}
.agenda-meeting-row__title {
  flex: 1;
  min-width: 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.agenda-meeting-row__title:hover {
  color: var(--primary-color);
}
.agenda-meeting-row__note-badge {
  font-size: 0.68rem;
  padding: 2px 7px;
  border-radius: 9px;
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary-color);
  white-space: nowrap;
  flex-shrink: 0;
  font-weight: 500;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 3px;
}
.agenda-meeting-row__ext {
  color: var(--text-muted, #94a3b8);
  flex-shrink: 0;
  text-decoration: none;
  line-height: 1;
}
.agenda-meeting-row__ext:hover {
  color: var(--text-secondary);
}

@media (max-width: 480px) {
  .agenda-meeting-row {
    flex-wrap: wrap;
  }
  .agenda-meeting-row__time {
    min-width: unset;
  }
}
[data-bs-theme=dark] .agenda-day-header__mon {
  color: #f87171;
}
[data-bs-theme=dark] .agenda-meeting-row__note-badge {
  background: rgba(129, 140, 248, 0.15);
}

.item-note-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.68rem;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 9px;
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary-color);
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
}
.item-note-badge:hover {
  opacity: 0.85;
}

[data-bs-theme=dark] .item-note-badge {
  background: rgba(129, 140, 248, 0.15);
}

.relationship-tiers {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.relationship-segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.relationship-seg {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: 99px;
  border: 1px solid var(--border-color);
  background: var(--card-bg, #fff);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
}
.relationship-seg__swatch {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tier-color);
  flex-shrink: 0;
}
.relationship-seg__count {
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--hover-bg, rgba(0, 0, 0, 0.05));
  color: var(--text-secondary);
  border-radius: 99px;
  padding: 0 7px;
}
.relationship-seg:hover {
  border-color: var(--tier-color);
  color: var(--text-primary);
}
.relationship-seg.active {
  background: var(--tier-color);
  border-color: var(--tier-color);
  color: #fff;
}
.relationship-seg.active .relationship-seg__count {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.relationship-loadmore {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px;
  border-top: 1px solid var(--border-color);
}
.relationship-loadmore__count {
  font-size: 0.72rem;
  color: var(--text-secondary);
}
.relationship-loadmore__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: default;
}
.relationship-loadmore__btn::before {
  content: "";
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  border-top-color: var(--primary-color, #6366f1);
  animation: relationship-spin 0.7s linear infinite;
}

@keyframes relationship-spin {
  to {
    transform: rotate(360deg);
  }
}
.relationship-tier {
  border: 1px solid var(--border-color);
  border-radius: 14px;
  overflow: hidden;
  background: var(--card-bg, #fff);
}
.relationship-tier__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  border-left: 4px solid var(--tier-color);
  flex-wrap: wrap;
}
.relationship-tier__swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--tier-color);
  flex-shrink: 0;
}
.relationship-tier__label {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-primary);
}
.relationship-tier__count {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--tier-color);
  background: color-mix(in srgb, var(--tier-color) 14%, transparent);
  border-radius: 99px;
  padding: 1px 9px;
}
.relationship-tier__blurb {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-left: auto;
}
.relationship-tier__empty {
  padding: 14px 16px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.relationship-tier__list {
  display: flex;
  flex-direction: column;
}

.relationship-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-color);
}
.relationship-row:last-child {
  border-bottom: none;
}
.relationship-row:hover {
  background: var(--hover-bg, rgba(0, 0, 0, 0.02));
}
.relationship-row__avatar {
  flex-shrink: 0;
}
.relationship-row__name {
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  flex: 0 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.relationship-row__name:hover {
  color: var(--primary-color, #6366f1);
  text-decoration: underline;
}
.relationship-row__score {
  flex-shrink: 0;
  font-weight: 800;
  font-size: 0.82rem;
  color: var(--score-color);
  background: color-mix(in srgb, var(--score-color) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--score-color) 32%, transparent);
  border-radius: 99px;
  padding: 1px 11px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.relationship-row__score:hover {
  background: var(--score-color);
  color: #fff;
}

.relationship-detail-dialog {
  width: min(440px, 100vw - 32px);
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 20px;
  background: var(--card-bg, #fff);
  color: var(--text-primary);
}

.relationship-detail__top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.relationship-detail__id {
  min-width: 0;
  flex: 1;
}
.relationship-detail__name {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.relationship-detail__score {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.1;
}
.relationship-detail__total {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--tier-color);
}
.relationship-detail__tier {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--tier-color);
}
.relationship-detail__close {
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 4px;
  cursor: pointer;
  line-height: 0;
  align-self: flex-start;
}
.relationship-detail__close:hover {
  color: var(--text-primary);
}
.relationship-detail__narrative {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 14px 0;
  line-height: 1.5;
}
.relationship-detail__section {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
}
.relationship-detail__section-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 10px;
}
.relationship-detail__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}
.relationship-detail__link {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-top: 18px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary-color, #6366f1);
  text-decoration: none;
}
.relationship-detail__link:hover {
  text-decoration: underline;
}

.detail-chip {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--app-bg, rgba(0, 0, 0, 0.04));
  border: 1px solid var(--border-color);
  border-radius: 99px;
  padding: 3px 10px;
}

.relationship-chart-wrap {
  position: relative;
  cursor: crosshair;
}

.relationship-chart {
  width: 100%;
  height: 80px;
  display: block;
}

.relationship-chart__guide {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: color-mix(in srgb, var(--tier-color) 50%, transparent);
  transform: translateX(-0.5px);
  opacity: 0;
  pointer-events: none;
}

.relationship-chart__dot {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--tier-color);
  border: 2px solid var(--card-bg, #fff);
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
}

.relationship-chart__tooltip {
  position: absolute;
  transform: translate(-50%, calc(-100% - 10px));
  background: var(--text-primary);
  color: var(--card-bg, #fff);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  z-index: 5;
}

.relationship-chart-wrap.is-active .relationship-chart__guide,
.relationship-chart-wrap.is-active .relationship-chart__dot,
.relationship-chart-wrap.is-active .relationship-chart__tooltip {
  opacity: 1;
}

.relationship-chart__axis {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  font-size: 0.68rem;
  color: var(--text-secondary);
}
.relationship-chart__axis .relationship-chart__delta {
  font-weight: 700;
  color: var(--score-green);
}

[data-bs-theme=dark] .relationship-detail-dialog {
  background: var(--card-bg);
}
[data-bs-theme=dark] .detail-chip {
  background: rgba(255, 255, 255, 0.05);
}

[data-bs-theme=dark] .relationship-tier {
  background: var(--card-bg);
}
[data-bs-theme=dark] .relationship-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

@media (max-width: 576px) {
  .relationship-tier__blurb {
    display: none;
  }
  .relationship-row {
    padding: 10px 12px;
    gap: 10px;
  }
}
.org-show-tabs {
  margin-bottom: -1px !important;
}
.org-show-tabs .nav-link {
  display: inline-flex;
  align-items: center;
  font-size: 0.875rem;
}

.org-show-pane > .card {
  border-radius: 0 0 0.375rem 0.375rem;
}

.org-hero-stats {
  font-size: 0.8125rem;
  color: var(--text-secondary, #64748b);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.org-hero-stats__sep {
  opacity: 0.5;
}

.org-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  padding: 1px 5px;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.4;
  border-radius: 9px;
  background: #e9ecef;
  color: var(--text-secondary, #6c757d);
  margin-left: 4px;
}

.org-score-ring {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
}
.org-score-ring svg {
  position: absolute;
  inset: 0;
  width: 44px;
  height: 44px;
  transform: rotate(-90deg);
}
.org-score-ring__bg {
  fill: none;
  stroke: #e9ecef;
  stroke-width: 3;
}
.org-score-ring__fill {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  transition: stroke-dasharray 0.3s ease;
}
.org-score-ring__avatar {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}

.org-contacts-list .org-tier-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.org-contacts-list .org-tier-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.org-contacts-list .org-tier-blurb {
  font-size: 0.75rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-secondary, #6b7280);
  margin-left: auto;
}

.org-contact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}
.org-contact-row:last-child {
  border-bottom: none;
}
.org-contact-row:hover {
  background: var(--hover-bg, rgba(0, 0, 0, 0.02));
}
.org-contact-row__main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}
.org-contact-row__main:hover .org-contact-row__name {
  color: var(--primary-color, #6366f1);
}
.org-contact-row__name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.12s;
}
.org-contact-row__sub {
  font-size: 0.78rem;
  color: var(--text-secondary, #64748b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.org-score-badge {
  flex-shrink: 0;
  font-weight: 800;
  font-size: 0.82rem;
  color: var(--score-color);
  background: color-mix(in srgb, var(--score-color) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--score-color) 32%, transparent);
  border-radius: 99px;
  padding: 2px 10px;
  cursor: default;
  white-space: nowrap;
}
.org-score-badge:hover {
  background: var(--score-color);
  color: #fff;
}
.org-score-badge--unscored {
  --score-color: #94a3b8;
  font-weight: 400;
}

.org-activity-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.org-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 20px;
  border: 1px solid var(--border-color, #e2e8f0);
  background: transparent;
  color: var(--text-secondary, #6b7280);
  cursor: pointer;
  transition: all 0.12s;
}
.org-filter-pill:hover:not(.active) {
  border-color: var(--primary-color, #6366f1);
  color: var(--primary-color, #6366f1);
}
.org-filter-pill.active {
  background: var(--primary-color, #6366f1);
  border-color: var(--primary-color, #6366f1);
  color: #fff;
}

.org-timeline {
  padding: 0 0 8px;
}

.org-timeline__group {
  margin-bottom: 0;
}

.org-timeline__date-header {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-secondary, #94a3b8);
  padding: 10px 16px 4px;
  border-bottom: 1px solid var(--border-color, #f3f4f6);
}

.org-timeline-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 16px;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: background 0.1s;
}
.org-timeline-item:last-child {
  border-bottom: none;
}
.org-timeline-item:hover {
  background: var(--hover-bg, rgba(0, 0, 0, 0.02));
}
.org-timeline-item__type-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.org-timeline-item__type-icon svg {
  opacity: 0.8;
}
.org-timeline-item__body {
  flex: 1;
  min-width: 0;
}
.org-timeline-item__title {
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
}
.org-timeline-item__title-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.org-timeline-item__meta {
  font-size: 0.75rem;
  color: var(--text-secondary, #6b7280);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}
.org-timeline-item__time {
  font-size: 0.75rem;
  color: var(--text-secondary, #94a3b8);
  flex-shrink: 0;
  white-space: nowrap;
}

.org-type-meeting {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-secondary, #64748b);
}

.org-type-email {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-secondary, #64748b);
}

.org-type-note {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-secondary, #64748b);
}

.org-note-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.68rem;
  font-weight: 500;
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  padding: 1px 6px;
  border-radius: 4px;
  flex-shrink: 0;
  white-space: nowrap;
}

.org-timeline-avatars {
  display: flex;
  flex-direction: row;
  flex-shrink: 0;
  width: 60px;
}
.org-timeline-avatars img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--card-bg, #fff);
  margin-left: -8px;
  object-fit: cover;
}
.org-timeline-avatars img:first-child {
  margin-left: 0;
}

.org-timeline-avatar-overflow {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--card-bg, #fff);
  margin-left: -8px;
  background: #dee2e6;
  color: var(--text-secondary, #6b7280);
  font-size: 0.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-bs-theme=dark] .org-score-ring__bg {
  stroke: #334155;
}
[data-bs-theme=dark] .org-contact-row:hover {
  background: rgba(255, 255, 255, 0.04);
}
[data-bs-theme=dark] .org-timeline-item:hover {
  background: rgba(255, 255, 255, 0.04);
}
[data-bs-theme=dark] .org-timeline__date-header {
  border-color: #334155;
  color: #64748b;
}
[data-bs-theme=dark] .org-timeline-item {
  border-color: #334155;
}
[data-bs-theme=dark] .org-type-meeting,
[data-bs-theme=dark] .org-type-email,
[data-bs-theme=dark] .org-type-note {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-secondary, #94a3b8);
}
[data-bs-theme=dark] .org-timeline-avatars img,
[data-bs-theme=dark] .org-timeline-avatar-overflow {
  border-color: var(--card-bg, #1e293b);
}
[data-bs-theme=dark] .org-filter-pill {
  border-color: #334155;
}
[data-bs-theme=dark] .org-tab-count {
  background: #334155;
  color: #94a3b8;
}

@media (max-width: 768px) {
  .org-tier-blurb {
    display: none;
  }
  .org-timeline-item {
    padding: 8px 12px;
    gap: 8px;
  }
  .org-contact-row {
    padding: 9px 12px;
  }
  .org-timeline-avatars {
    width: 36px;
  }
}
.org-overview-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
}

.org-overview-primary {
  min-width: 0;
  padding: 22px 24px;
  border-right: 1px solid var(--border-color, #e2e8f0);
  background: var(--sidebar-bg, #fff);
}

.org-overview-rail {
  min-width: 0;
  padding: 20px 20px;
  background: #f8fafc;
}

[data-bs-theme=dark] .org-overview-rail {
  background: var(--app-bg);
}

.org-overview-section + .org-overview-section {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color, #e2e8f0);
}

.org-overview-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.org-overview-section-header h2 {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary, #64748b);
}

.org-overview-section-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary-color, #5046e5);
  text-decoration: none;
  white-space: nowrap;
}
.org-overview-section-link:hover {
  text-decoration: underline;
}

.org-rail-section + .org-rail-section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border-color, #e2e8f0);
}

.org-rail-section-heading {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.055em;
  color: var(--text-secondary, #64748b);
  margin-bottom: 10px;
}

.org-rail-subheading {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.055em;
  color: #94a3b8;
  margin: 10px 0 8px;
}

.org-rail-description {
  font-size: 0.82rem;
  color: var(--text-secondary, #64748b);
  line-height: 1.6;
  margin: 0 0 10px;
}

.org-rail-facts {
  margin: 0;
  border-top: 1px solid var(--border-color, #e2e8f0);
}

.org-rail-fact {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  font-size: 0.8rem;
}

.org-rail-fact-label {
  color: var(--text-secondary, #64748b);
}

.org-rail-fact-value {
  color: var(--text-primary);
}
.org-rail-fact-value a {
  color: var(--primary-color, #5046e5);
  text-decoration: none;
}
.org-rail-fact-value a:hover {
  text-decoration: underline;
}

.org-rail-website {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary-color, #5046e5);
  text-decoration: none;
  margin-bottom: 12px;
}
.org-rail-website svg {
  flex-shrink: 0;
}
.org-rail-website:hover span {
  text-decoration: underline;
}

.org-rhythm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.org-rhythm-header .org-rail-section-heading {
  margin-bottom: 0;
}

.org-rhythm-toggle {
  display: inline-flex;
  gap: 2px;
  background: var(--border-color, #e3e8ef);
  border-radius: 7px;
  padding: 2px;
  flex-shrink: 0;
}

.org-rhythm-toggle__btn {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted, #94a3b8);
  padding: 2px 8px;
  border-radius: 5px;
  line-height: 1.4;
  transition: background 0.1s, color 0.1s, box-shadow 0.1s;
}
.org-rhythm-toggle__btn.active {
  background: var(--card-bg, #fff);
  color: var(--text-primary);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.org-sparkline {
  position: relative;
  margin: 0 0 12px;
}

.org-sparkline__bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 36px;
  margin-bottom: 4px;
}

.org-sparkline__bar {
  flex: 1;
  border-radius: 2px 2px 0 0;
  background: color-mix(in srgb, var(--primary-color, #5046e5) 28%, transparent);
  min-height: 2px;
  cursor: pointer;
  transition: background 0.1s;
}
.org-sparkline__bar:hover {
  background: var(--primary-color, #5046e5);
}

.org-sparkline__axis {
  display: flex;
  justify-content: space-between;
  font-size: 0.62rem;
  color: var(--text-muted, #94a3b8);
}

.org-sparkline__tooltip {
  display: none;
  position: absolute;
  background: var(--text-primary, #172033);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1.5;
  padding: 5px 9px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  transform: translateX(-50%);
  z-index: 20;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.org-sparkline__tip-month {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.65;
  margin-bottom: 1px;
}

.org-sparkline__tip-detail {
  opacity: 0.65;
  font-size: 0.67rem;
}

[data-bs-theme=dark] .org-rhythm-toggle {
  background: rgba(255, 255, 255, 0.08);
}
[data-bs-theme=dark] .org-rhythm-toggle__btn.active {
  background: rgba(255, 255, 255, 0.14);
}
[data-bs-theme=dark] .org-sparkline__bar {
  background: color-mix(in srgb, var(--primary-color, #a5b4fc) 28%, transparent);
}
[data-bs-theme=dark] .org-sparkline__bar:hover {
  background: var(--primary-color, #a5b4fc);
}
[data-bs-theme=dark] .org-sparkline__tooltip {
  background: #334155;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.org-rhythm-count {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--text-primary);
}

.org-rhythm-label {
  font-size: 0.8rem;
  color: var(--text-secondary, #64748b);
}

.org-rhythm-detail {
  font-size: 0.78rem;
  color: var(--text-secondary, #64748b);
  line-height: 1.55;
  margin: 6px 0 0;
}

.org-upcoming {
  padding: 12px 14px;
  border: 1px solid #c7d2fe;
  border-radius: 10px;
  background: #eef2ff;
}

.org-upcoming__eyebrow {
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary-color, #5046e5);
  margin-bottom: 5px;
}

.org-upcoming__title {
  font-size: 0.85rem;
  font-weight: 650;
}

.org-upcoming__meta {
  font-size: 0.78rem;
  color: var(--text-secondary, #64748b);
  margin-top: 2px;
}

.org-upcoming__attendees {
  display: flex;
  margin-top: 9px;
}

.org-upcoming__avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #eef2ff;
  margin-left: -5px;
  overflow: hidden;
}
.org-upcoming__avatar:first-child {
  margin-left: 0;
}
.org-upcoming__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 768px) {
  .org-overview-body {
    grid-template-columns: 1fr;
  }
  .org-overview-primary {
    border-right: none;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
  }
}
[data-bs-theme=dark] .org-overview-rail {
  background: rgba(255, 255, 255, 0.02);
}
[data-bs-theme=dark] .org-upcoming {
  background: rgba(80, 70, 229, 0.12);
  border-color: rgba(165, 180, 252, 0.25);
}
[data-bs-theme=dark] .org-upcoming__eyebrow {
  color: #a5b4fc;
}
[data-bs-theme=dark] .org-upcoming__avatar {
  border-color: rgba(15, 23, 42, 0.6);
}

/*# sourceMappingURL=application.css.map */
