body {
  margin: 0 !important;
  padding: 0 !important;
  font-size: 0.875rem !important;
  font-family: 'Google Sans',Roboto,RobotoDraft,Helvetica,Arial,sans-serif !important;
  background-color: #fff !important;
  width: 100% !important;
  max-width: 100% !important;
  line-height: 150% !important;
}

button {
  cursor: pointer;
}
.body-zero {
  background-color: #808080 !important;
}
.count-box {
  font-size: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  padding: 0.25rem 0.5rem;
  border-radius: 0.1rem;
  font-weight: bold;
  background-color: #808080;
  height: 1.3rem;
  margin: auto 0;
}
.count-box-label {
  font-size: 66%;
  color: #ccc;
  margin-right: 0.15rem
}
.queue-count-box { 
  cursor: pointer;
}
.task-box {
  font-size: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  padding: 0.25rem;
  margin: 0 0.5rem 0 0;
  border-radius: 0.1rem;
  font-weight: bold;
  background-color: #808080;
  cursor: pointer;
}
.task-box-label {
  font-size: 66%;
  color: #fff;
  margin: 0 0.25rem;
  white-space: nowrap;
}
.task-summary-box {
  font-size: 0.50rem;
  font-weight: bold;
  text-align: center;
  border-radius: 50%;
  padding: 0 0.15rem;
  min-width: 1rem;
  color: #fff;
}
.task-assignee-box {
  font-size: 0.50rem;
  font-weight: bold;
  text-align: center;
  border-radius: 50%;
  padding: 0 0.15rem;
  min-width: 1rem;
  color: #fff;
}
.task-assignee-dropdown-parent {
  position: relative;
  display: inline-block;
}
.task-assignee-trigger {
  cursor: pointer;
}
.task-assignee-display {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
}
.task-assignee-display .task-assignee-box {
  flex-shrink: 0;
  width: 1.1rem;
  height: 1.1rem;
  line-height: 1.1rem;
  padding: 0;
}
.task-assignee-name {
  font-size: inherit;
  white-space: nowrap;
}
.task-assignee-dropdown {
  left: 0;
  right: auto;
  margin-top: 0.25rem;
  min-width: 200px;
  max-height: 320px;
  overflow-y: auto;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  padding: 0.25rem 0;
  z-index: 100;
}
.dropdown-item.task-assignee-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
  color: #333;
}
.task-assignee-item:hover {
  background-color: #e8eaed;
}
.task-assignee-item-selected {
  background-color: #e8f0fe;
}
.task-assignee-item .task-assignee-box {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  line-height: 24px;
  font-size: 0.65rem;
  padding: 0;
}
.task-assignee-item-name {
  flex: 1;
  font-size: 0.85rem;
}
.subject-box {
  padding: 0.25rem 0.25rem 0 0;
  font-size: 10pt;
  font-weight: normal !important;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.subject-box.subject-box-verified {
  font-weight: bold !important;
}
.dropdown-show {
  display: block !important;
}
.app-user-dropdown-parent {
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  display: flex;
  align-items: center;
}
.app-user-profile-picture {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  display: inline-block;
  vertical-align: middle;
}
.dropdown-box {
  display: none;
  position: absolute;
  right: 0;
  background-color: #f1f1f1;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 1;
}
.dropdown-box a {
  color: black;
  padding: 0.5rem 1rem;
  text-decoration: none;
  display: block;
}
.dropdown-box a:hover {
  background-color: #ddd;
}
.app-title {
  width: 100%;
  background-color: #000;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  color: #eee;
  top: 0;
  flex-shrink: 0; /* Prevents the header from shrinking */
  position: -webkit-sticky; /* Required for Safari */
  position: sticky;
  z-index: 1000; /* Ensure it stays above content */
}
.app-title-left {
  display: flex;
  padding: 0.5rem;
  font-size: 12pt;
}
.app-title-mid {
  display: flex;
  align-items: center;
  flex-grow: 1;
  padding: 0.5rem 0;
}
.app-user-dropdown {
  margin-top: 1rem;
  margin-right: 0.5rem;
  z-index: 200;
}
/* Multi-account dropdown styles */
.dropdown-item {
  color: black;
  padding: 0.5rem 1rem;
  text-decoration: none;
  display: block;
  cursor: pointer;
}
.dropdown-item:hover {
  background-color: #ddd;
}
.dropdown-section-label {
  color: #666;
  font-size: 0.75rem;
  padding: 0.5rem 1rem 0.25rem;
  text-transform: uppercase;
  font-weight: bold;
}
.dropdown-divider {
  border-top: 1px solid #ddd;
  margin: 0.25rem 0;
}
.dropdown-shortcut {
  display: inline-block;
  background: #eee;
  border-radius: 3px;
  padding: 0 0.4rem;
  margin-right: 0.5rem;
  font-size: 0.75rem;
  font-weight: bold;
  color: #666;
}
.app-title-right {
  padding: 0.5rem;
  font-size: 0.8rem;
  color: #hhh;
  display: flex;
}
.count-box-highlight {
  background-color: #C60000 !important;
}
.app-count-box {
  font-size: 1rem;
  cursor: pointer;
  margin-right: 0.25rem;
}
.count-box-active {
  background-color: #4A90D9 !important;
}
.email-count-box, .task-count-box {
  transition: background-color 0.2s ease;
}
.task-count-box {
  background-color: #6B7280;
}

/* Email Inbox View Styles */
.email-inbox-view {
  padding: 0;
}

.inbox-section {
  /* No margin - sections flow together */
}

.inbox-section-header {
  display: flex;
  align-items: center;
  padding: 10px;
  gap: 8px;
  background: #f3f4f6;
  border-bottom: 1px solid #e5e7eb;
  cursor: pointer;
  user-select: none;
  line-height: 100%;
  font-size: 9pt;
  min-height: 36px; /* Consistent header height */
  box-sizing: border-box;
}

.inbox-section-checkbox {
  flex-shrink: 0;
  width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.inbox-section-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  margin: 0;
  accent-color: #3b82f6;
}

.inbox-section-checkbox input[type="checkbox"]:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.inbox-section-header:hover {
  background: #e5e7eb;
}

.inbox-section-active .inbox-section-header {
  background: #dbeafe;
  border-color: #93c5fd;
}

/* Section header highlighted state (when j/k is on the header row itself) */
.inbox-section-header-active {
  background: #dbeafe !important;
  border-left: 3px solid #2563eb !important;
  padding-left: 7px !important;
}

.inbox-section-header-active .inbox-section-title {
  color: #1d4ed8;
}

.inbox-section-header-active .inbox-section-count {
  background: #3b82f6;
}

.inbox-section-title {
  font-weight: 600;
  font-size: 10pt;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #374151;
}

.inbox-section-active .inbox-section-title {
  color: #1d4ed8;
}

.inbox-section-count {
  background: #6b7280;
  color: white;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.inbox-section-active .inbox-section-count {
  background: #3b82f6;
}

.inbox-section-list {
  background: white;
}

.inbox-section-empty {
  padding: 1rem;
  text-align: center;
  color: #9ca3af;
  font-style: italic;
}

.inbox-section-divider {
  height: 1px;
  background: #e5e7eb;
  margin: 0;
}

/* Task-Related Emails Section (Collapsible) - Same styling as other sections */
.inbox-section-task-related {
  /* No margin - sections flow together */
}

.inbox-section-task-related .task-related-header {
  display: flex;
  align-items: center;
  padding: 10px;
  gap: 8px;
  background: #f3f4f6;
  border-bottom: 1px solid #e5e7eb;
  cursor: pointer;
  user-select: none;
  line-height: 100%;
  font-size: 9pt;
  min-height: 36px; /* Match other section headers */
  box-sizing: border-box;
}

.inbox-section-task-related .task-related-header:hover {
  background: #e5e7eb;
}

.inbox-section-task-related.inbox-section-active .task-related-header {
  background: #dbeafe;
  border-color: #93c5fd;
}

.inbox-section-task-related .inbox-section-title {
  font-weight: 600;
  font-size: 10pt;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #374151;
  flex-shrink: 0;
}

.inbox-section-task-related.inbox-section-active .inbox-section-title {
  color: #1d4ed8;
}

.inbox-section-task-related .inbox-section-count {
  background: #6b7280;
  color: white;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
}

.inbox-section-task-related.inbox-section-active .inbox-section-count {
  background: #3b82f6;
}

.inbox-section-task-related .task-inbox-btn {
  background: #1d4ed8;
  color: white;
  border: none;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 9pt;
  font-weight: 500;
  cursor: pointer;
  margin-left: auto;
  transition: background 0.15s;
  line-height: 1.2;
}

.inbox-section-task-related .task-inbox-btn:hover {
  background: #1e40af;
}

.inbox-section-task-related .task-related-toggle {
  background: transparent;
  border: 1px solid #d1d5db;
  color: #374151;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8pt;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.15s;
}

.inbox-section-task-related .task-related-toggle:hover {
  background: #e5e7eb;
}

.inbox-section-task-related.expanded .inbox-section-list {
  background: white;
}

/* Incoming Emails Section (Collapsible) - Same styling as other sections */
.inbox-section-incoming {
  /* No margin - sections flow together */
}

.inbox-section-incoming .incoming-header {
  display: flex;
  align-items: center;
  padding: 10px;
  gap: 8px;
  background: #f3f4f6;
  border-bottom: 1px solid #e5e7eb;
  cursor: pointer;
  user-select: none;
  line-height: 100%;
  font-size: 9pt;
}

.inbox-section-incoming .incoming-header:hover {
  background: #e5e7eb;
}

.inbox-section-incoming.inbox-section-active .incoming-header {
  background: #dbeafe;
  border-color: #93c5fd;
}

.inbox-section-incoming .inbox-section-title {
  font-weight: 600;
  font-size: 10pt;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #374151;
  flex-shrink: 0;
}

.inbox-section-incoming.inbox-section-active .inbox-section-title {
  color: #1d4ed8;
}

.inbox-section-incoming .inbox-section-count {
  background: #6b7280;
  color: white;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
}

.inbox-section-incoming.inbox-section-active .inbox-section-count {
  background: #3b82f6;
}

.inbox-section-incoming .inbox-section-processing {
  color: #6b7280;
  font-size: 9pt;
  font-style: italic;
  margin-left: auto;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.inbox-section-incoming .incoming-toggle {
  background: transparent;
  border: 1px solid #d1d5db;
  color: #374151;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10pt;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.15s;
}

.inbox-section-incoming .incoming-toggle:hover {
  background: #e5e7eb;
}

.inbox-section-incoming.expanded .inbox-section-list {
  background: white;
}

.inbox-thread-row {
  display: flex;
  align-items: center;
  padding: 6px 8px;
  gap: 8px;
  border-bottom: 1px solid #e5e7eb;
  cursor: pointer;
  transition: background 0.15s;
}

.inbox-thread-checkbox {
  flex-shrink: 0;
  width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.inbox-thread-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  margin: 0;
}

.inbox-thread-row:hover {
  background: #f9fafb;
}

.inbox-thread-row.inbox-thread-active {
  background: #eff6ff;
  border-left: 3px solid #3b82f6;
  padding-left: 5px;
}

.inbox-thread-row.inbox-thread-selected {
  background: #fef3c7;
}

.inbox-thread-row.inbox-thread-selected.inbox-thread-active {
  background: #fde68a;
  border-left: 3px solid #f59e0b;
}

.inbox-thread-row.inbox-thread-unread {
  font-weight: 600;
}

.inbox-thread-row.inbox-thread-unread .inbox-thread-sender {
  font-weight: 700;
}

.inbox-thread-index {
  width: 24px;
  flex-shrink: 0;
  color: #9ca3af;
  font-size: 0.75rem;
  text-align: right;
  margin: 2px 0 2px 2px;
}

.inbox-thread-content {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.inbox-thread-sender {
  flex: 0 0 180px;
  font-size: 9pt;
  color: #374151;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inbox-thread-subject {
  font-size: 9pt;
  color: #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inbox-thread-snippet {
  flex: 1;
  font-size: 9pt;
  color: #5f6368;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inbox-thread-snippet::before {
  content: " — ";
  color: #5f6368;
}

.inbox-thread-date {
  flex: 0 0 70px;
  font-size: 9pt;
  color: #666;
  text-align: right;
}

/* Task ID badge for task-related emails */
.inbox-thread-taskid {
  flex: 0 0 auto;
  font-size: 0.6rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  padding: 0.15rem 0.4rem;
  margin-right: 8px;
  color: #fff;
  background-color: #87909e;
  border-radius: 0.2rem;
  text-transform: lowercase;
}

.inbox-thread-taskid:hover {
  background-color: #6b7280;
}

/* Author badges container for Email Inbox rows */
.inbox-thread-authors {
  flex: 0 0 150px;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
}

/* Individual author badge */
.inbox-author-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 8pt;
  white-space: nowrap;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inbox-author-badge-unread {
  background-color: #dbeafe;
  color: #1e40af;
  font-weight: 600;
}

.inbox-author-badge-read {
  background-color: #f3f4f6;
  color: #6b7280;
}

/* Overflow indicator (+N more) */
.inbox-author-overflow {
  font-size: 8pt;
  color: #9ca3af;
  white-space: nowrap;
}

/* Task Inbox View Styles */
.task-inbox-view {
  display: none;
  padding: 0;
}

.task-inbox-loading {
  text-align: center;
  padding: 4rem 2rem;
  color: #6b7280;
}
.task-inbox-loading .loading-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.task-inbox-not-linked {
  text-align: center;
  padding: 4rem 2rem;
  color: #6b7280;
}

.task-inbox-not-linked .not-linked-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.task-inbox-not-linked h3 {
  margin: 0 0 0.5rem 0;
  color: #374151;
}

.task-inbox-not-linked p {
  margin: 0 0 1.5rem 0;
}

.link-clickup-btn {
  padding: 0.75rem 1.5rem;
  background: #7b68ee;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.link-clickup-btn:hover {
  background: #6c5ce7;
}

/* Task sections use same styles as email inbox sections */
.task-section {
  /* No margin - sections flow together */
}

.task-section-header {
  display: flex;
  align-items: center;
  padding: 10px;
  gap: 8px;
  background: #f3f4f6;
  border-bottom: 1px solid #e5e7eb;
  cursor: pointer;
  user-select: none;
  line-height: 100%;
  font-size: 9pt;
}

.task-section-checkbox {
  flex-shrink: 0;
  width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.task-section-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  margin: 0;
  accent-color: #3b82f6;
}

.task-section-checkbox input[type="checkbox"]:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.task-section-header:hover {
  background: #e5e7eb;
}

.task-section-active .task-section-header {
  background: #dbeafe;
  border-color: #93c5fd;
}

/* Task section header highlighted state (when j/k is on the header row itself) */
.task-section-header-active {
  background: #dbeafe !important;
  border-left: 3px solid #2563eb !important;
  padding-left: 7px !important;
}

.task-section-header-active .task-section-title {
  color: #1d4ed8;
}

.task-section-header-active .task-section-count {
  background: #3b82f6;
}

.task-section-title {
  font-weight: 600;
  font-size: 10pt;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #374151;
}

.task-section-active .task-section-title {
  color: #1d4ed8;
}

.task-section-count {
  background: #6b7280;
  color: white;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.task-section-active .task-section-count {
  background: #3b82f6;
}

.task-section-list {
  background: white;
}

.task-section-empty {
  padding: 1rem;
  text-align: center;
  color: #9ca3af;
  font-style: italic;
}

.task-section-divider {
  height: 1px;
  background: #e5e7eb;
  margin: 0;
}

/* Task rows use same compact style as email inbox rows */
.task-row {
  display: block;
  padding: 6px 8px;
  border-bottom: 1px solid #e5e7eb;
  cursor: pointer;
  transition: background 0.15s;
  background: white;
}

.task-row-line1 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.task-row-comment {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 8px 2px 28px;
  min-height: 0;
  cursor: pointer;
}

.task-comment-author-badge {
  flex-shrink: 0;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 8pt;
  cursor: pointer;
  white-space: nowrap;
}

.task-comment-author-unread {
  background-color: #dbeafe;
  color: #1e40af;
  font-weight: 600;
}

.task-comment-author-read {
  background-color: #f3f4f6;
  color: #6b7280;
}

.task-comment-author-none {
  background: white;
  border: 1px solid #d1d5db;
  color: #6b7280;
}

.task-comment-snippet {
  flex: 1;
  font-size: 9pt;
  color: #5f6368;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.task-row-checkbox {
  flex-shrink: 0;
  width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.task-row-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  margin: 0;
}

.task-row-assignee {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  color: #fff;
}

.task-row:hover {
  background: #f9fafb;
}

.task-row.task-row-active {
  background: #eff6ff;
  border-left: 3px solid #3b82f6;
  padding-left: 5px;
}

.task-row.task-row-selected {
  background: #fef3c7;
}

.task-row.task-row-selected.task-row-active {
  background: #fde68a;
  border-left: 3px solid #f59e0b;
}

.task-row-index {
  width: 24px;
  flex-shrink: 0;
  color: #9ca3af;
  font-size: 0.75rem;
  text-align: right;
  margin: 2px 0 2px 2px;
}

.task-priority {
  width: 1.5rem;
  flex-shrink: 0;
  font-size: 0.75rem;
  text-align: center;
}

.task-row-name {
  flex: 0 0 400px;
  max-width: 400px;
  font-size: 9pt;
  color: #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-row-preview {
  flex: 1;
  font-size: 9pt;
  color: #5f6368;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Dash separator removed for cleaner task row layout */

.task-row-status {
  flex-shrink: 0;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 3px;
  color: white;
  font-weight: 600;
  text-transform: uppercase;
  min-width: 24px;
  text-align: center;
}

.task-list-name {
  font-size: 0.75rem;
  color: #6b7280;
}

.task-status {
  font-size: 0.625rem;
  padding: 0.125rem 0.375rem;
  border-radius: 3px;
  color: white;
  text-transform: uppercase;
  font-weight: 600;
}

.task-row-due {
  flex: 0 0 40px;
  font-size: 9pt;
  color: #666;
  text-align: right;
  cursor: pointer;
}

.task-row-due.task-due-overdue {
  color: #8b0000;
  font-weight: 600;
}

/* Author badges container for Task Inbox rows */
.task-row-authors {
  flex: 0 0 150px;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
}

/* Individual author badge for tasks */
.task-author-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 8pt;
  white-space: nowrap;
  max-width: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-author-badge-unread {
  background-color: #dbeafe;
  color: #1e40af;
  font-weight: 600;
}

.task-author-badge-read {
  background-color: #f3f4f6;
  color: #6b7280;
}

/* Linked email badges container */
.task-linked-emails {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  margin-right: 4px;
}

/* Individual linked email badge */
.task-linked-email-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 8pt;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s;
}

.task-linked-email-badge:hover {
  opacity: 0.8;
}

.task-linked-email-badge-unread {
  background-color: #dbeafe;
  color: #1e40af;
  font-weight: 600;
}

.task-linked-email-badge-read {
  background-color: #f3f4f6;
  color: #6b7280;
}

/* Overflow indicator (+N more) for task linked emails */
.task-linked-overflow {
  font-size: 8pt;
  color: #9ca3af;
  white-space: nowrap;
}

/* Task comment badge */
.task-comment-badge {
  flex-shrink: 0;
  background: #ef4444;
  color: white;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: 6px;
  min-width: 16px;
  text-align: center;
}

/* Gmail thread indicator */
.task-gmail-indicator {
  flex-shrink: 0;
  color: #6b7280;
  font-size: 0.85rem;
  margin-left: 6px;
  opacity: 0.7;
}

/* Email notification badge for My Tasks (rightmost position) */
.task-email-badge {
  flex-shrink: 0;
  background: #6366f1;
  color: white;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s;
}

.task-email-badge:hover {
  background: #4f46e5;
  color: white;
}

/* Email link icon in task header */
.task-email-link {
  color: #6366f1;
  text-decoration: none;
  font-size: 1rem;
  cursor: pointer;
  transition: color 0.15s;
}

.task-email-link:hover {
  color: #4f46e5;
}

/* ClickUp Email Update View (interleaved with comments) */
/* Styled to match ClickUpCommentView - no special background */
.clickup-email-update {
  /* No special background - matches comment style */
}

.clickup-email-update .comment-title {
  background: transparent;
}

.email-update-icon {
  color: #6366f1;
  margin-right: 4px;
}

.email-update-summary {
  color: inherit;
  font-size: 0.85rem;
}

/* Email countbox [E N] in update view */
.email-count-box {
  background-color: #6B7280;
  cursor: pointer;
}

.email-count-box:hover {
  background-color: #4B5563;
}
.email-count-box.count-box-active {
  background-color: #4A90D9 !important;
}

/* Task filter dropdown */
.task-filter-dropdown {
  position: relative;
  display: inline-block;
  margin-left: auto;
}

.task-filter-trigger {
  display: flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.75rem;
  color: #4b5563;
  cursor: pointer;
  transition: all 0.15s;
}

.task-filter-trigger:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.task-section-active .task-filter-trigger {
  border-color: #93c5fd;
  color: #1d4ed8;
}

.filter-arrow {
  font-size: 0.6rem;
  transition: transform 0.15s;
}

.task-filter-dropdown.open .filter-arrow {
  transform: rotate(180deg);
}

.task-filter-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 180px;
  z-index: 100;
  overflow: hidden;
}

.task-filter-option {
  display: flex;
  flex-direction: column;
  padding: 8px 12px;
  cursor: pointer;
  transition: background 0.1s;
  position: relative;
}

.task-filter-option:hover {
  background: #f9fafb;
}

.task-filter-option.selected {
  background: #eff6ff;
}

.filter-option-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: #374151;
}

.task-filter-option.selected .filter-option-label {
  color: #1d4ed8;
}

.filter-option-desc {
  font-size: 0.7rem;
  color: #9ca3af;
  margin-top: 2px;
}

.filter-check {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #3b82f6;
  font-size: 0.9rem;
}

/* Task Detail View */
.task-detail-view {
  padding: 1rem;
  background: #fff;
}

.task-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.task-detail-back {
  background: none;
  border: 1px solid #d1d5db;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
  color: #374151;
}

.task-detail-back:hover {
  background: #f3f4f6;
}

.task-detail-external {
  font-size: 0.8rem;
  color: #6366f1;
  text-decoration: none;
}

.task-detail-external:hover {
  text-decoration: underline;
}

.task-detail-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.75rem;
}

.task-detail-meta {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.task-detail-status {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  color: white;
  font-weight: 600;
}

.task-detail-due {
  font-size: 0.8rem;
  color: #6b7280;
}

.task-detail-location {
  font-size: 0.8rem;
  color: #9ca3af;
}

.task-detail-section {
  margin-bottom: 1rem;
}

.task-detail-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.task-detail-description {
  font-size: 0.875rem;
  color: #374151;
  line-height: 1.5;
  white-space: pre-wrap;
}

.task-detail-assignees {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.task-detail-assignee {
  font-size: 0.8rem;
  background: #e5e7eb;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  color: #374151;
}

.task-detail-id {
  font-size: 0.75rem;
  color: #9ca3af;
}
.task-queue-dropdown {
  top: 3rem;
  margin-right: 0.5rem;
  z-index: 200;
  color: #000;
}
.app {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.threads {
  width: 100%;
  flex-grow: 1; /* Allows the content to grow and fill remaining space */
}
.threadlist {
  position: absolute;
  top: 3rem;
  left: 0.25rem;
  width: calc(100vw - 3rem);
  max-height: calc(100vh - 6.5rem);
  background-color: #fff;
  border: 1px solid #888;
  border-radius: 0.2rem;
  padding: 0.25rem;
  overflow-y: auto;
  z-index: 100;
}
.threadlist-thread {
  display: flex;
  align-items: center;
  padding: 0.25rem 0;
  cursor: pointer;
  background-color: #fff;
  border: 1px solid #eee;
}
.threadlist-thread-active {
  background-color: #BFDDF5;
}
.threadlist-thread:hover {
  border: 1px solid #888;
}
.threadlist-thread-count-box {
  margin: 0 0.25rem;
  min-width: 1.6rem;
  padding: 0.2rem;
  font-size: 75%;
}
.threadlist-thread-unread .threadlist-thread-count-box {
  background-color: #000;
}
.threadlist-thread-sender {
  display: inline-block;
  font-weight: bold;
  padding: 0.25rem 0;
  margin: 0 0.25rem;
  white-space: nowrap;
  max-width: 15rem;
  overflow: hidden;
}
.threadlist-thread-subject {
  margin: 0 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  flex-grow: 1;
}
.threadlist-thread-date {
  color: #808080;
  padding: 0 0.25rem;
}
.thread {
}
.thread-title {
  -webkit-font-smoothing: antialiased;
  font-family: 'Google Sans',Roboto,RobotoDraft,Helvetica,Arial,sans-serif;
  font-size: 1.25rem;;
  font-variant-ligatures: no-contextual;
  color: #202124;
  padding: 0.5rem;
  display: flex;
  align-items: center;
}
.thread-count-box {
  font-size: 1rem;
  margin-left: 0;
  white-space: nowrap;
  cursor: pointer;
}
.thread-messages {
  padding-top: 0.5rem;
}
.task {
  border: 0.15rem solid #eee;
  margin: 0 0.5rem 0.5rem 0.5rem;
  border-radius: 0.1rem;
}
.task-body {
  padding: 0.5rem;
  line-height: 150% !important;
  font-size: 10pt;
  color: #000 !important;
}
.task-title {
  background: #fff;
  font-size: 0.8rem;
  padding: 0;
  border-spacing: 0;
  border-bottom: 1px dotted #eee;
}
.task-title-left-leftblock {
  display: inline-block;
  float: left;
  line-height: 150% !important;
  margin: 0 0.5rem 0 0;
  height: 
}
.task-taskid-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.50rem;
  font-weight: bold;
  white-space: nowrap;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  margin: 0 0.5rem 0 0;
  color: #fff;
  background-color: #ccc;
  border-radius: 0.2rem;
}
.task-title-duedate {
  padding: 0.15rem;
  width: 58px;
}
.task-status-select {
  margin-bottom: -0.3rem;
}
.comment-assignee-box {
  font-size: 0.50rem;
  font-weight: bold;
  color: #fff;
  text-align: center;
  border-radius: 50%;
  padding: 0 0.15rem;
  float: left;
  margin: 0 0.15rem 0 0;
  min-width: 1rem;
}
.comment {
  border: 0.15rem solid #eee;
  margin: 0 0.5rem 0.5rem 0.5rem;
  border-radius: 0.1rem;
}
/* Unread comment styling - blue border surrounding the comment */
.comment.comment-unread {
  border-color: #93c5fd;
  background-color: #f0f7ff;
}
.comment.comment-unread .comment-title {
  background-color: #e8f0fe;
}
.comment-title {
  background: #fff;
  font-size: 0.8rem;
  padding: 0;
  border-spacing: 0;
  border-bottom: 1px dotted #eee;
}
.comment-assignee-box {
  font-size: 0.50rem;
  font-weight: bold;
  color: #fff;
  text-align: center;
  border-radius: 50%;
  padding: 0 0.15rem;
  float: left;
  margin: 0 0.15rem 0 0;
  min-width: 1rem;
}
.comment-title-username {
  margin: 0 0.15rem;
  float: left;
  font-size: 0.75rem;
  font-weight: bold;
}
.comment-title-left {
  position: relative;
  vertical-align: top;
  color: #444;
  padding: 0.5rem;
}
.comment-title-left-leftblock {
  display: inline-block;
  float: left;
  clear: left;
  line-height: 150% !important;
}
.comment-title-right {
  position: relative;
  vertical-align: top;
  color: #444;
  padding: 0.5rem;
  white-space: nowrap;
  text-align: right;
}
.draftcomment-title-left {
  position: relative;
  vertical-align: middle;
  color: #444;
  padding: 0.5rem;
}
.commentdraft-title-left-leftblock {
  display: inline-block;
  float: left;
  clear: left;
  line-height: 150% !important;
  font-size: 0.75rem;
  font-weight: bold;
}
.comment-title-date {
  vertical-align: top;
  width: 1%;
  padding: 0.5rem;
  color: #808080;
  text-align: right;
  line-height: 150% !important;
  white-space: nowrap;
}
.comment-body {
  padding: 0.5rem;
  line-height: 150% !important;
  font-size: 10pt;
  color: #000 !important;
  font-family: arial;
}
.comment-body li {
  color: #000 !important;
}
.comment-body p {
  margin: 0;
}
.comment-body table {
  border-collapse: collapse;
  border: 1px solid gray;
}
.comment-body th, .comment-body td {
  border: 1px solid gray;
  padding: 5px;
}
.comment-body ul, .comment-body ol, .comment-body h1, .comment-body h2, .comment-body h3, .comment-body h4, .comment-body h5{
  margin: 0;
}
.comment-body blockquote {
  border-inline-start: 4px solid #ddd;
  margin-left: 0;
  margin-bottom: 0;
  margin-top: 0;
  padding-left: 12px;
  font-style: italic;
}
.comment-tag {
 color: #3db88b;
}
.comment-tag-me {
 font-weight: bold;
}
/* Auto-linked URLs in comment text */
.auto-link {
  color: #2563eb;
  text-decoration: none;
  word-break: break-all;
}
.auto-link:hover {
  text-decoration: underline;
}
.link-preview-box {
  display: inline-block;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 4px 8px;
  margin: 2px 0;
  color: #333;
  text-decoration: none;
  font-size: 0.9em;
}
a.link-preview-box {
  color: #2563eb;
  cursor: pointer;
}
a.link-preview-box:hover {
  background: #e8f0fe;
  border-color: #2563eb;
  text-decoration: none;
}
.view-mention-box {
  display: inline-block;
  background: linear-gradient(135deg, #7b68ee15, #9370db15);
  border: 1px solid #9370db;
  border-radius: 4px;
  padding: 4px 10px;
  margin: 2px 0;
  color: #6b5b95;
  text-decoration: none;
  font-size: 0.9em;
  font-weight: 500;
}
a.view-mention-box {
  color: #7b68ee;
  cursor: pointer;
}
a.view-mention-box:hover {
  background: linear-gradient(135deg, #7b68ee25, #9370db25);
  border-color: #7b68ee;
  text-decoration: none;
}
.message {
  border: 0.15rem solid #eee;
  margin: 0 0.5rem 0.5rem 0.5rem;
  border-radius: 0.1rem;
}
/* Unread message styling - light-blue border */
.message.message-unread {
  border-color: #93c5fd;
  background-color: #f0f7ff;
}
.message.message-unread .message-title {
  background-color: #e8f0fe;
}
.message-count-box {
  font-size: 0.9rem;
  white-space: nowrap;
  cursor: pointer;
  margin: 0;
}
.message-title {
  background: #fff;
  font-size: 0.9rem;
  padding: 0;
  border-spacing: 0;
  border-bottom: 1px dotted #eee;
}
.message-title-left {
  position: relative;
  vertical-align: top;
  color: #444;
  padding: 0.5rem;
}
.message-title-left-leftblock {
  display: inline-block;
  float: left;
  clear: left;
  line-height: 150% !important;
}
.message-title-date {
  vertical-align: top;
  max-width: 8rem;
  width: 1%;
  padding: 0.5rem;
  color: #808080;
  text-align: right;
  line-height: 150% !important;
  white-space: nowrap;
}
/* Classification badge shown before date in message title */
.message-classification-badge {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 600;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  margin-right: 0.4rem;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.message-classification-priority {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.message-classification-update {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}
.message-classification-task_related {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}
.message-title-more {
  vertical-align: top;
  width: 1%;
  padding: 0.25rem;
  color: #808080;
  text-align: right;
}
.message-title-more-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 1.5rem;
  height: 1.5rem;
  background-color: #eee;
  color: #000;
  border-radius: 0.1rem;
  cursor: pointer;
}
.message-attachments {
  background: #fff;
  font-size: 0.9rem;
  padding: 0;
  border-spacing: 0;
  border-bottom: 1px dotted #eee;
}
.message-attachments > a {
  float: right;
  display: inline-block;
  color: #000;
  background-color: #eee;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  padding: 0.5rem;
  margin: 0.25rem;
  border-radius: 0.1rem;
  font-size: 0.75rem;
  cursor: pointer;
}
.message-attachments:after {
   content: " ";
   visibility: hidden;
   display: block;
   height: 0;
   clear: both;
}
.message-body {
  padding: 0.5rem;
  line-height: 150% !important;
  font-size: 10pt;
  font-family: arial;
  color: #000;
}
.message-body-iframe {
  margin: 0.5rem;
  box-sizing: border-box;
  width: calc(100% - 1rem);
  height: 50rem;
  max-height: 100rem;
  overflow-y: auto;
  border: 0;
}
.message-label {
  position: relative;
  float: right;
  display: inline-block;
  padding: 0.15rem 0.3rem;
  margin: 0 0.25rem 0.25rem 0.25rem;
  font-size: 0.75rem;
  border-radius: 0.2rem;
}
.filter {
  border: 0.15rem solid #eee;
  margin: 0 0.5rem 0.5rem 0.5rem;
  border-radius: 0.1rem;
  padding: 0.25rem;
}
.filter-title {
  background: #fff;
  font-size: 0.9rem;
  font-weight: bold;
  padding: 0.25rem;
  border-spacing: 0;
  vertical-align: middle;
}
.filter-actions-block {
  float: right;
}
.filter-action-button {
  padding: 0.25rem 0.50rem;
  margin: 0 0.25rem 0.25rem;
  background-color: #f8f8f8;
  border: 1px solid #ccc;
}
.filter-save-button:hover {
  background-color: #eee;
  border: 1px solid #000;
}
.filter-title-block {
  clear: both;
  position: relative;
  display: flex;
  align-items: center;
  padding: 0.1rem;
}
.filter-title-block > input {
  float: left;
  flex-grow: 1;
  padding: 0.25rem 0.50rem !important;
  width: 100%;
}
.filter-title-block .selectize-input {
  padding: 0.25rem 0.50rem !important;
  line-height: 1.35rem !important;
  margin-right: 1rem !important;
}
.filter-block-multicol .selectize-control {
  margin-right: 1rem !important;
  line-height: 100% !important;
}
.filter-task-instructions-textarea {
  width: 100%;
  padding: 0.25rem;
  margin-bottom: 0.25rem;
}
.filter-title-block-label {
  display: flex;
  align-items: center;
  text-align: right;
  z-index: 100;
  left: 0.1rem;
  padding: 0.25rem;
  color: #888;
  min-width: 6rem;
  justify-content: right
}
.filter-task-list-input {
  width: 10rem !important;
}
.filter-assignees-block .filter-selectize-item {
  margin: 0 0.25rem 0 0 !important;
  padding: 0 0.25rem !important;
}
.filter-watchers-block .filter-selectize-item {
  margin: 0 0.25rem 0 0 !important;
  padding: 0 0.25rem !important;
}
.filter-save-results {
  padding: 0.5rem;
  background: #f8f8f8;
  margin: 0.25rem 0.75rem 0.25rem 0.25rem;
  border: 1px solid #ccc;
}
.draft {
  border: 0.15rem solid #eee;
  margin: 0 0.5rem 0.5rem 0.5rem;
  border-radius: 0.1rem;
}
.draft-title {
  background: #fff;
  font-size: 0.9rem;
  padding: 0.25rem;
  border-spacing: 0;
}
.draft-title-block {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0.1rem;
}
.draft-title-block > input {
  flex-grow: 1;
  padding: 0.1rem;
  width: 100%;
}
.draft-title-block > input.draft-disabled {
  opacity: 0.5;
  background-color: #fafafa;
  color: #888;
}
.draft-title-block-label {
  display: flex;
  align-items: center;
  z-index: 100;
  top: 0rem;
  left: 0.1rem;
  position: absolute;
  padding: 0.5rem;
  color: #888;
}
.draft-attachments {
  background: #fff;
  font-size: 0.9rem;
  padding: 0.25rem;
  border-spacing: 0;
  border-bottom: 1px dotted #eee;
}
.draft-attachment-entry {
  float: right;
  display: inline-block;
  color: #000;
  background-color: #eee;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  margin: 0.25rem;
  border: 1px solid #aaa;
  border-radius: 0.1rem;
  cursor: pointer;
}
.draft-attachment-entry > a {
  display: inline-block;
  color: #000;
  background-color: #eee;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
}

.draft-attachment-entry > a:hover {
  background-color: #fff;
}

a.draft-attachment-x {
  color: #000;
  background-color: #ccc;
  border-left: 0;
}

a.draft-attachment-x:hover {
  color: #fff;
  background-color: #000;
}

.draft-attachments:after {
   content: " ";
   visibility: hidden;
   display: block;
   height: 0;
   clear: both;
}
.draft-body {
  padding: 0.1rem 0.35rem 0.35rem 0.35rem;
  font-family: arial;
  font-size: 10pt;
}
.draft-body-textbox {
  
}
.draft-button {
  display: inline-block;
  margin: 0.5rem;
  padding: 0.5rem;
  background-color: #eee;
  border-radius: 0.1rem;
  pointer: cursor;
}
.threadsubview-active {
  border: 0.15rem solid #888 !important;
}
.contact-from-name {
  color: #000;
  font-weight: 700;
}
.contact-from-email {
  color: #808080;
}
.contact-to-name {
  color: #000;
  font-weight: 500;
}
.contact-to-email {
  color: #808080;
}

.help {
  padding: 1rem;
}

/* ClickUp Thread View uses existing .thread and .thread-messages classes */