/* Gropro AI task assistant modal — www-preview/inhouse only */
#groproAiTaskModal.gropro-ai-task-modal {
  --gropro-ai-accent: #ed2047;
  --gropro-ai-accent-mid: #c41845;
  --gropro-ai-glow: rgba(237, 32, 71, 0.22);
}

@keyframes groproAiBackdropIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes groproAiShellIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

@keyframes groproAiShimmerBar {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}


@keyframes groproAiLogoFlip {
  0% {
    transform: perspective(520px) rotateY(0deg) rotateX(0deg);
  }
  25% {
    transform: perspective(520px) rotateY(180deg) rotateX(10deg);
  }
  50% {
    transform: perspective(520px) rotateY(360deg) rotateX(0deg);
  }
  75% {
    transform: perspective(520px) rotateY(540deg) rotateX(-10deg);
  }
  100% {
    transform: perspective(520px) rotateY(720deg) rotateX(0deg);
  }
}

@keyframes groproAiLoaderSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes groproAiPulseGlow {
  0%,
  100% {
    box-shadow: 0 0 0 0 var(--gropro-ai-glow), 0 12px 28px rgba(15, 23, 42, 0.08);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(237, 32, 71, 0.06), 0 16px 34px rgba(15, 23, 42, 0.12);
  }
}

@keyframes groproAiLiveDot {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 0 3px rgba(237, 32, 71, 0.2);
  }
  50% {
    opacity: 0.88;
    transform: scale(1.15);
    box-shadow: 0 0 0 6px rgba(237, 32, 71, 0.12);
  }
}

.gropro-ai-task-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2300 !important;
  background: radial-gradient(120% 80% at 50% 0%, rgba(30, 41, 59, 0.62) 0%, rgba(15, 23, 42, 0.72) 45%, rgba(15, 23, 42, 0.78) 100%);
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}
.gropro-ai-task-modal.gropro-ai-open {
  display: flex;
  animation: groproAiBackdropIn 0.38s ease forwards;
}
.gropro-ai-modal-shell {
  position: relative;
  width: 95%;
  height: 95vh;
  max-height: 92vh;
  background: linear-gradient(165deg, #ffffff 0%, #f8fafc 42%, #f1f5f9 100%);
  border-radius: 20px;
  box-shadow:
    0 28px 90px rgba(15, 23, 42, 0.34),
    0 0 0 1px rgba(15, 23, 42, 0.05) inset,
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#groproAiTaskModal.gropro-ai-open .gropro-ai-modal-shell {
  animation: groproAiShellIn 0.52s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.gropro-ai-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 14px 22px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.28);
  background: linear-gradient(105deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 252, 0.92) 55%, rgba(241, 245, 249, 0.88) 100%);
  backdrop-filter: blur(12px);
}
.gropro-ai-modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.gropro-ai-header-logo {
  position: relative;
  width: 35px;
  height: 35px;
  display: inline-block;
  transform-style: preserve-3d;
}
.gropro-ai-header-logo-face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: cover;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: none;
}
.gropro-ai-header-logo-face--front {
  transform: rotateY(0deg);
}
.gropro-ai-header-logo-face--back {
  transform: rotateY(180deg);
}



.gropro-ai-logo-intro {
  position: absolute;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  display: none;
  background: #fff;
  opacity: 0;
  transition: opacity 0.55s ease;
}
.gropro-ai-logo-intro--visible {
  display: block;
  opacity: 1;
}
.gropro-ai-logo-intro-video-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #000;
}
.gropro-ai-logo-intro-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gropro-ai-logo-intro.gropro-ai-logo-intro--video-active .gropro-ai-logo-intro-chip {
  opacity: 0;
}
.gropro-ai-logo-intro.gropro-ai-logo-intro--fading {
  opacity: 0 !important;
}
.gropro-ai-logo-intro-chip {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 120px;
  height: 120px;
  transform: translate(-50%, -50%);
  transform-style: preserve-3d;
}
.gropro-ai-logo-intro-fav {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  transform: translate(-50%, -50%);
  transform-style: preserve-3d;
  z-index: 2;
}
.gropro-ai-logo-intro-fav-face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.gropro-ai-logo-intro-fav-face--front {
  transform: rotateY(0deg);
}
.gropro-ai-logo-intro-fav-face--back {
  transform: rotateY(180deg);
}
.gropro-ai-logo-intro-ai {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) translateX(-8px) scale(0.75);
  font-size: 40px;
  font-weight: 500;
  color: #111827;
  opacity: 0;
  letter-spacing: 0.02em;
  white-space: nowrap;
  line-height: 1;
  transition: opacity 0.45s ease, transform 0.45s ease;
  z-index: 1;
}

.gropro-ai-header-ai-label {
  color: #111827;
  font-size: 25px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.1;
  display: inline-block;
  padding: 0;
  margin: 0;
}
.gropro-ai-modal-sub {
  font-size: 12px;
  color: #6b7280;
  width: 100%;
  margin-left: 0;
}
@media (min-width: 520px) {
  .gropro-ai-modal-sub {
    width: auto;
    margin-left: 8px;
  }
}
.gropro-ai-icon-close {
  border: none;
  background: rgba(241, 245, 249, 0.95);
  width: 38px;
  height: 38px;
  border-radius: 12px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #475569;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.gropro-ai-icon-close:hover {
  background: rgba(237, 32, 71, 0.12);
  color: #ed2047;
  transform: scale(1.05);
}

/* Gropro popup only: hide inline task creation shortcuts */
#groproAiTaskModal .task-card-subtask-btn,
#groproAiTaskModal .add-task-btn,
#groproAiTaskModal .task-row.add-row {
  display: none !important;
}

.gropro-ai-modal-body {
  display: flex;
  gap: 0;
  flex: 1;
  min-height: 0;
  min-width: 0;
}
.gropro-ai-mobile-panes {
  display: flex;
  gap: 0;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
}
.gropro-ai-mobile-tabs {
  display: none;
}
@media (max-width: 900px) {
  .gropro-ai-task-modal {
    padding: 0;
  }
  .gropro-ai-modal-shell {
    width: 98%;
    height: 90vh;
    max-height: 90vh;
  }
  .gropro-ai-modal-header {
    padding: 9px 12px 9px 14px;
  }
  .gropro-ai-modal-title-wrap {
    gap: 8px;
  }
  .gropro-ai-header-logo {
    width: 29px;
    height: 29px;
  }
  .gropro-ai-header-ai-label {
    font-size: 20px;
    line-height: 1;
  }
  .gropro-ai-modal-sub {
    font-size: 11px;
    margin-top: -1px;
  }
  .gropro-ai-icon-close {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    font-size: 20px;
  }
  .gropro-ai-modal-body {
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
  }
  .gropro-ai-mobile-tabs {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0 0 1px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.32);
    background: #fff;
    flex: 0 0 auto;
  }
  .gropro-ai-mobile-tab-btn {
    flex: 1 1 0;
    height: 42px;
    border: none;
    border-radius: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    line-height: 1;
  }
  .gropro-ai-mobile-tab-btn.is-active {
    border-bottom-color: #ed2047;
    background: transparent;
    color: #ed2047;
  }
  #groproAiTaskModal .gropro-ai-mobile-panes {
    overflow: hidden;
    width: 200%;
    flex: 1 1 auto;
    min-height: 0;
    transform: translateX(0);
    transition: transform 0.28s cubic-bezier(0.22, 0.7, 0.2, 1);
    will-change: transform;
  }
  #groproAiTaskModal .gropro-ai-chat-pane,
  #groproAiTaskModal .gropro-ai-preview-pane {
    flex: 0 0 50%;
    width: 50%;
    max-width: 50%;
    min-height: 0;
    box-shadow: none;
  }
  #groproAiTaskModal .gropro-ai-chat-pane {
    order: 1;
  }
  #groproAiTaskModal .gropro-ai-preview-pane {
    order: 2;
    border-left: none;
  }
  #groproAiTaskModal.gropro-ai-mobile-tab-preview .gropro-ai-mobile-panes {
    transform: translateX(-50%);
  }
  #groproAiTaskModal .gropro-ai-chat-scroll {
    flex: 1 1 auto;
    min-height: 0;
  }
  #groproAiTaskModal .gropro-ai-chat-compose {
    margin-top: 12px;
    flex: 0 0 auto;
  }
}
@media (max-width: 768px) {
  /* In AI popup mobile preview, keep Task/Subtask toggle visible */
  #groproAiTaskModal #gpClone_taskViewToggle,
  #groproAiTaskModal .gpClone-task-view-toggle {
    display: inline-flex !important;
  }
}
.gropro-ai-preview-pane {
  position: relative;
  border-left: 1px solid rgba(148, 163, 184, 0.35);
  border-right: none;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background:
    radial-gradient(120% 80% at 10% 0%, rgba(237, 32, 71, 0.06) 0%, transparent 55%),
    radial-gradient(90% 60% at 100% 100%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
    linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
  width: 70%;
  overflow: hidden;
}
.gropro-ai-preview-pane.gropro-ai-preview-loading .gropro-ai-live-preview-host {
  filter: saturate(0.92);
  opacity: 0.86;
  transition: opacity 0.35s ease, filter 0.35s ease;
}
.gropro-ai-live-preview-host {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}
.gropro-ai-preview-thinking-video-wrap {
  position: absolute;
  inset: 0;
  z-index: 19;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
.gropro-ai-preview-thinking-video-wrap.gropro-ai-preview-thinking-video-wrap--visible {
  visibility: visible;
  opacity: 1;
}
.gropro-ai-preview-thinking-video {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}
.gropro-ai-preview-pane.gropro-ai-preview-thinking-active .gropro-ai-live-preview-host {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.gropro-ai-preview-pane.gropro-ai-preview-thinking-active:not(.gropro-ai-preview-loading) .gropro-ai-live-preview-host {
  visibility: hidden;
}
.gropro-ai-preview-loader {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  background: rgba(241, 245, 249, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.gropro-ai-preview-loader--visible {
  opacity: 1;
  pointer-events: auto;
}
.gropro-ai-preview-loader-card {
  text-align: center;
  padding: 28px 32px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    0 20px 50px rgba(15, 23, 42, 0.14),
    0 0 0 1px rgba(15, 23, 42, 0.04) inset;
  max-width: 280px;
}
.gropro-ai-preview-loader-ring {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 3px solid rgba(237, 32, 71, 0.18);
  border-top-color: var(--gropro-ai-accent, #ed2047);
  animation: groproAiLoaderSpin 0.82s cubic-bezier(0.55, 0.15, 0.35, 0.85) infinite;
}
.gropro-ai-preview-loader-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
}
.gropro-ai-preview-loader-sub {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: #64748b;
}

/* Keep clone layout sized to popup height, not viewport height */
#groproAiTaskModal #groproAiCloneMount,
#groproAiTaskModal #gpClone_officeInterface,
#groproAiTaskModal #gpClone_officeInterface .gpClone-main-content-area,
#groproAiTaskModal #gpClone_officeInterface .gpClone-task-interface,
#groproAiTaskModal #gpClone_officeInterface .gpClone-task-content,
#groproAiTaskModal #gpClone_officeInterface #gpClone_taskViewContainer {
  height: 100%;
  max-height: 100%;
  min-height: 0;
}

#groproAiTaskModal #gpClone_officeInterface .gpClone-main-content-area,
#groproAiTaskModal #gpClone_officeInterface .gpClone-task-interface,
#groproAiTaskModal #gpClone_officeInterface .gpClone-task-content,
#groproAiTaskModal #gpClone_officeInterface #gpClone_taskViewContainer {
  overflow: hidden;
}

/* Clone uses #gpClone_taskSections (not #groproAiTaskSections) — mirror project.html section header / toggle */
#groproAiTaskModal #gpClone_officeInterface .task-section .section-header,
#groproAiTaskModal #gpClone_officeInterface .gpClone-task-section .section-header {
  cursor: default;
}
#groproAiTaskModal #gpClone_officeInterface .task-section .section-header button,
#groproAiTaskModal #gpClone_officeInterface .task-section .section-header .section-add-btn,
#groproAiTaskModal #gpClone_officeInterface .gpClone-task-section .section-header button,
#groproAiTaskModal #gpClone_officeInterface .gpClone-task-section .section-header .section-add-btn {
  cursor: pointer;
}
#groproAiTaskModal #gpClone_officeInterface .task-section .section-header .section-header-left,
#groproAiTaskModal #gpClone_officeInterface .gpClone-task-section .section-header .section-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
#groproAiTaskModal #gpClone_officeInterface .task-section .section-header .section-header-toggle,
#groproAiTaskModal #gpClone_officeInterface .gpClone-task-section .section-header .section-header-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--gray-500, #6b7280);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
#groproAiTaskModal #gpClone_officeInterface .task-section .section-header .section-header-toggle:hover,
#groproAiTaskModal #gpClone_officeInterface .gpClone-task-section .section-header .section-header-toggle:hover {
  background: rgba(148, 163, 184, 0.16);
  color: var(--gray-700, #374151);
}

/* Hard fallback: ensure popup clone list styles always match project list view */
#groproAiTaskModal #gpClone_officeInterface #gpClone_listView,
#groproAiTaskModal #gpClone_officeInterface #gpClone_explorerView,
#groproAiTaskModal #gpClone_officeInterface #gpClone_excelView,
#groproAiTaskModal #gpClone_officeInterface #googleSheetView {
  min-height: 0;
}
#groproAiTaskModal #gpClone_officeInterface .task-section,
#groproAiTaskModal #gpClone_officeInterface .gpClone-task-section {
  background: #fff;
  border-radius: 16px;
  margin-bottom: 24px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}
#groproAiTaskModal #gpClone_officeInterface .task-section-scroll,
#groproAiTaskModal #gpClone_officeInterface .gpClone-task-section-scroll {
  overflow-x: auto;
  overflow-y: visible;
}
#groproAiTaskModal #gpClone_officeInterface .task-table,
#groproAiTaskModal #gpClone_officeInterface .gpClone-task-table {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  width: fit-content;
  min-width: 100%;
  background: #fff;
}
#groproAiTaskModal #gpClone_officeInterface .task-table-header,
#groproAiTaskModal #gpClone_officeInterface .gpClone-task-table-header {
  display: grid;
  grid-template-columns: minmax(320px, 400px) 150px 150px 150px 150px 150px 72px;
  gap: 12px;
  align-items: center;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-600, #6b7280);
  border-bottom: 1px solid var(--gray-200, #e5e7eb);
  background: #fff;
  padding: 0 10px;
}
#groproAiTaskModal #gpClone_officeInterface .task-table-body,
#groproAiTaskModal #gpClone_officeInterface .gpClone-task-table-body {
  display: flex;
  flex-direction: column;
}
#groproAiTaskModal #gpClone_officeInterface .task-section .section-header,
#groproAiTaskModal #gpClone_officeInterface .gpClone-task-section .section-header {
  padding: 18px 24px;
  background: linear-gradient(135deg, rgba(237, 32, 71, 0.08), rgba(237, 32, 71, 0));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: default;
}
#groproAiTaskModal #gpClone_officeInterface .task-section .section-header-main,
#groproAiTaskModal #gpClone_officeInterface .gpClone-task-section .section-header-main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 auto;
  min-width: 0;
  cursor: pointer;
}
#groproAiTaskModal #gpClone_officeInterface .task-section .section-header .section-header-left,
#groproAiTaskModal #gpClone_officeInterface .gpClone-task-section .section-header .section-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
#groproAiTaskModal #gpClone_officeInterface .table-collapse-toggle {
  border: none;
  background: transparent;
  color: var(--gray-500, #6b7280);
  cursor: pointer;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
  margin-right: 6px;
}
#groproAiTaskModal #gpClone_officeInterface .table-collapse-toggle:hover {
  color: var(--gray-700, #374151);
}
#groproAiTaskModal #gpClone_officeInterface .task-section.collapsed .task-table-body,
#groproAiTaskModal #gpClone_officeInterface .gpClone-task-section.collapsed .task-table-body {
  display: none !important;
}
#groproAiTaskModal #gpClone_officeInterface .task-section.collapsed .section-header i,
#groproAiTaskModal #gpClone_officeInterface .task-section.collapsed .table-collapse-toggle i,
#groproAiTaskModal #gpClone_officeInterface .gpClone-task-section.collapsed .section-header i,
#groproAiTaskModal #gpClone_officeInterface .gpClone-task-section.collapsed .table-collapse-toggle i {
  transform: rotate(-90deg);
}
@media (max-width: 900px) {
  .gropro-ai-preview-pane {
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
  }
}
/* —— Preview = same chrome as project #taskViewContainer (scoped to modal) —— */
#groproAiTaskModal {
  --gropro-gray-100: #f3f4f6;
  --gropro-gray-200: #e5e7eb;
  --gropro-gray-300: #d1d5db;
  --gropro-gray-600: #4b5563;
  --gropro-gray-700: #374151;
  --gropro-gray-800: #1f2937;
  --gropro-primary: #ed2047;
  --gropro-primary-dark: #c0183a;
  --gropro-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --gropro-transition: 0.2s ease;
}
/* Clone of #taskViewContainer layout (project.html) — IDs differ to avoid getElementById clashes */
#groproAiTaskModal #groproAiTaskViewRoot.list-view {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0 10px 10px;
  box-sizing: border-box;
  background: transparent;
}
#groproAiTaskModal #groproAiTaskViewRoot {
  min-height: 0;
}
#groproAiTaskModal #groproAiListView {
  flex: 1;
  overflow: auto;
  min-height: 0;
  scrollbar-width: thin;
}
#groproAiTaskModal #groproAiKanbanView.kanban-view {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
#groproAiTaskModal #groproAiExcelView.excel-view {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* AI popup preview: List + Canvas only — hide Excel view tab */
#groproAiTaskModal .gpClone-view-tab[data-view="excel"] {
  display: none !important;
}
/* AI popup preview: hide Filters controls entirely */
#groproAiTaskModal #gpClone_filterToggleBtn,
#groproAiTaskModal #groproAiFilterToggleBtn,
#groproAiTaskModal #gpClone_taskFilters,
#groproAiTaskModal #groproAiTaskFilters {
  display: none !important;
}
#groproAiTaskModal .view-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  align-items: center;
  flex-wrap: wrap;
}
#groproAiTaskModal .view-tabs-spacer {
  flex: 1 1 auto;
  min-width: 8px;
}
#groproAiTaskModal .view-tab {
  padding: 12px 20px;
  border: 1px solid var(--gray-300, var(--gropro-gray-300));
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-700, var(--gropro-gray-700));
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition, var(--gropro-transition));
  user-select: none;
}
#groproAiTaskModal .view-tab:hover {
  border-color: rgba(237, 32, 71, 0.45);
  color: var(--primary-color, var(--gropro-primary));
}
#groproAiTaskModal .view-tab.active {
  background: linear-gradient(135deg, var(--primary-color, var(--gropro-primary)), var(--primary-dark, var(--gropro-primary-dark)));
  color: #fff;
  border-color: transparent;
}
#groproAiTaskModal .task-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--gray-300, var(--gropro-gray-300));
  background: #fff;
  border-radius: 999px;
  user-select: none;
  color: var(--gray-700, var(--gropro-gray-700));
  font-size: 13px;
  font-weight: 600;
}
#groproAiTaskModal .task-view-toggle .toggle-label {
  opacity: 0.65;
  transition: var(--transition, var(--gropro-transition));
  white-space: nowrap;
}
#groproAiTaskModal .task-view-toggle .toggle-label.active {
  opacity: 1;
  color: var(--gray-900, #111827);
}
#groproAiTaskModal .task-view-toggle .switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex: 0 0 auto;
}
#groproAiTaskModal .task-view-toggle .switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
#groproAiTaskModal .task-view-toggle .slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--gray-200, var(--gropro-gray-200));
  transition: var(--transition, var(--gropro-transition));
  border-radius: 999px;
  border: 1px solid var(--gray-300, var(--gropro-gray-300));
}
#groproAiTaskModal .task-view-toggle .slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  top: 2px;
  background-color: white;
  transition: var(--transition, var(--gropro-transition));
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.15);
}
#groproAiTaskModal .task-view-toggle .switch input:not(:checked) + .slider {
  background-color: rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.35);
}
#groproAiTaskModal .task-view-toggle .switch input:not(:checked) + .slider:before {
  background-color: #2563eb;
}
#groproAiTaskModal .task-view-toggle .switch input:checked + .slider {
  background-color: rgba(237, 32, 71, 0.15);
  border-color: rgba(237, 32, 71, 0.35);
}
#groproAiTaskModal .task-view-toggle .switch input:checked + .slider:before {
  transform: translateX(20px);
  background-color: var(--primary-color, var(--gropro-primary));
}
#groproAiTaskModal .filter-toggle-btn {
  margin-left: 0;
  padding: 12px 20px;
  border: 1px solid var(--gray-300, var(--gropro-gray-300));
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-700, var(--gropro-gray-700));
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition, var(--gropro-transition));
  font-family: inherit;
}
#groproAiTaskModal .filter-toggle-btn.active,
#groproAiTaskModal .filter-toggle-btn:hover {
  background: var(--primary-color, var(--gropro-primary));
  color: #fff;
  border-color: var(--primary-color, var(--gropro-primary));
}
#groproAiTaskModal .task-filters {
  background: #fff;
  border: 1px solid var(--gray-200, var(--gropro-gray-200));
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm, var(--gropro-shadow-sm));
}
#groproAiTaskModal .filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
}
#groproAiTaskModal .filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
#groproAiTaskModal .filter-checkbox,
#groproAiTaskModal .filter-radio {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 14px;
  color: var(--gray-700, var(--gropro-gray-700));
  user-select: none;
}
#groproAiTaskModal .filter-checkbox input,
#groproAiTaskModal .filter-radio input {
  cursor: pointer;
  width: 16px;
  height: 16px;
}
#groproAiTaskModal .deadline-date-range {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 12px;
}
#groproAiTaskModal .deadline-date-range input[type="date"] {
  padding: 6px 10px;
  border: 1px solid var(--gray-300, var(--gropro-gray-300));
  border-radius: 6px;
  font-size: 13px;
}
#groproAiTaskModal .filter-group label:not(.filter-checkbox):not(.filter-radio) {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-700, var(--gropro-gray-700));
  margin-right: 8px;
}
#groproAiTaskModal .filter-group select {
  padding: 6px 12px;
  border: 1px solid var(--gray-300, var(--gropro-gray-300));
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
  cursor: pointer;
}
#groproAiTaskModal .filter-clear-btn {
  padding: 6px 12px;
  background: var(--gray-100, var(--gropro-gray-100));
  border: 1px solid var(--gray-300, var(--gropro-gray-300));
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-700, var(--gropro-gray-700));
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
}
#groproAiTaskModal .filter-clear-btn:hover {
  background: var(--gray-200, var(--gropro-gray-200));
  color: var(--gray-900, #111827);
}
#groproAiTaskModal #groproAiKanbanBoard.kanban-board {
  flex: 1;
  min-height: 0;
  padding-bottom: 12px;
}
#groproAiTaskModal .excel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 4px;
  flex-shrink: 0;
}
#groproAiTaskModal .excel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--gray-800, var(--gropro-gray-800));
  font-size: 14px;
}
#groproAiExcelGrid.excel-grid {
  flex: 1;
  min-height: 0;
  border: 1px solid var(--gray-200, var(--gropro-gray-200));
  overflow: auto;
  background: #fff;
  max-height: calc(95vh - 320px);
}
#groproAiTaskModal .empty-excel-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  color: var(--gray-500, #6b7280);
  gap: 12px;
}
#groproAiTaskModal .empty-excel-state i {
  font-size: 40px;
  opacity: 0.5;
}
/* Preview cards: use project .task-card styles */
#groproAiTaskModal .task-card[data-gropro-preview='1'],
#groproAiTaskModal .subtask-card[data-gropro-preview='1'] {
  cursor: grab;
}
#groproAiTaskModal .task-card[data-gropro-preview='1']:active,
#groproAiTaskModal .subtask-card[data-gropro-preview='1']:active {
  cursor: grabbing;
}
/* Proposed task card chrome matches project page (see project-gropro-preview-cards.css) */
#groproAiTaskModal .task-card.gropro-ai-proposed-task,
#groproAiTaskModal .subtask-card.gropro-ai-proposed-task {
  border: 1px solid #e5e7eb;
  border-style: solid;
  background: #fff;
  box-shadow: none;
}
#groproAiTaskModal .gropro-ai-proposed-task.gropro-ai-dragging {
  cursor: grabbing !important;
}
#groproAiTaskModal .task-card-action-btn.gropro-ai-preview-stop {
  cursor: pointer;
}
.gropro-ai-preview-action-menu {
  position: fixed;
  z-index: 100003;
  min-width: 140px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 10px;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.18);
  padding: 6px;
}
.gropro-ai-preview-action-menu button {
  width: 100%;
  border: 0;
  background: transparent;
  color: #dc2626;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
}
.gropro-ai-preview-action-menu button:hover {
  background: rgba(220, 38, 38, 0.08);
}
.gropro-ai-preview-action-menu button i {
  margin-right: 8px;
}
#groproAiTaskModal .add-task-btn.permission-locked:disabled {
  opacity: 0.85;
  cursor: not-allowed;
}
/* ===== Exact taskViewContainer visual clone (scoped to modal) ===== */
#groproAiTaskModal .kanban-view {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}
#groproAiTaskModal .kanban-board {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding-bottom: 20px;
  flex: 1;
  min-height: 0;
}
#groproAiTaskModal .kanban-column {
  min-width: 400px;
  max-width: 420px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  border: 1px solid var(--gray-200, #e5e7eb);
  display: flex;
  flex-direction: column;
  flex: 0 0 320px;
  height: 100%;
  max-height: none;
  min-height: 0;
}
@media (max-width: 900px) {
  #groproAiTaskModal .kanban-column {
    min-width: 280px;
    max-width: 300px;
    flex: 0 0 280px;
  }
}
#groproAiTaskModal .column-header {
  padding: 20px;
  border-bottom: 1px solid var(--gray-200, #e5e7eb);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
#groproAiTaskModal .column-title {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
#groproAiTaskModal .column-count {
  background: var(--gray-100, #f3f4f6);
  color: var(--gray-600, #4b5563);
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}
#groproAiTaskModal .column-body {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  min-height: 0;
}
#groproAiTaskModal .task-card {
  cursor: default;
  background: #fff;
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  transition: 0.2s ease;
  position: relative;
}
#groproAiTaskModal .task-card:hover {
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}
#groproAiTaskModal .task-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
#groproAiTaskModal .task-card .task-name-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
#groproAiTaskModal .task-card .task-name {
  font-weight: 500;
  color: var(--gray-800, #1f2937);
  margin-bottom: 0;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1 1 0;
  text-align: left;
}
#groproAiTaskModal .task-card-action-btn {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #9ca3af;
  cursor: default;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
#groproAiTaskModal .task-card-subtask-btn {
  height: 22px;
  padding: 0 6px;
  flex-shrink: 0;
}
#groproAiTaskModal .task-card .task-meta,
#groproAiTaskModal .subtask-card .task-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}
#groproAiTaskModal .task-card .task-meta-row,
#groproAiTaskModal .subtask-card .task-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}
/* Clone kanban lives under #gpClone_kanbanBoard — ensure meta pickers receive clicks above card chrome */
#groproAiTaskModal #gpClone_kanbanBoard .task-card .task-meta-row .task-assignee,
#groproAiTaskModal #gpClone_kanbanBoard .task-card .task-meta-row .task-assignee-empty,
#groproAiTaskModal #gpClone_kanbanBoard .task-card .task-meta-row .task-due-date,
#groproAiTaskModal #gpClone_kanbanBoard .task-card .task-meta-row .task-meta-status,
#groproAiTaskModal #gpClone_kanbanBoard .task-card .task-meta-row .task-level-tag,
#groproAiTaskModal #gpClone_kanbanBoard .task-card .task-meta-row .task-priority,
#groproAiTaskModal #gpClone_kanbanBoard .task-card .task-meta-row .priority-flag {
  cursor: pointer;
  pointer-events: auto;
  position: relative;
  z-index: 2;
}
#groproAiTaskModal #gpClone_kanbanBoard .subtask-card .task-meta .task-assignee,
#groproAiTaskModal #gpClone_kanbanBoard .subtask-card .task-meta .task-assignee-empty,
#groproAiTaskModal #gpClone_kanbanBoard .subtask-card .task-meta .task-due-date,
#groproAiTaskModal #gpClone_kanbanBoard .subtask-card .task-meta .subtask-meta-status,
#groproAiTaskModal #gpClone_kanbanBoard .subtask-card .task-meta .task-level-tag,
#groproAiTaskModal #gpClone_kanbanBoard .subtask-card .task-meta .task-priority {
  cursor: pointer;
  pointer-events: auto;
  position: relative;
  z-index: 2;
}
#groproAiTaskModal .task-card > .task-meta .task-meta-row .task-assignee:not(.task-assignee-empty),
#groproAiTaskModal .task-card > .task-meta > .task-meta-row > .assignee-avatars-group .task-assignee:not(.task-assignee-empty) {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary-color, #ed2047);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}
#groproAiTaskModal .task-card .subtask-card .task-meta .task-assignee:not(.task-assignee-empty),
#groproAiTaskModal .task-card .subtask-card .task-meta .assignee-avatars-group .task-assignee:not(.task-assignee-empty) {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary-color, #ed2047);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}
#groproAiTaskModal .task-card > .task-meta .task-meta-row .task-assignee-empty,
#groproAiTaskModal .task-card .subtask-card .task-meta .task-assignee-empty,
#groproAiTaskModal .task-card .subtask-card .task-meta .assignee-avatars-group .task-assignee-empty {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gray-200, #e5e7eb) !important;
  color: var(--gray-500, #6b7280) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
}
#groproAiTaskModal .task-card .task-due-date {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--gray-600, #4b5563);
}
#groproAiTaskModal .task-card .task-due-date-empty {
  color: #9ca3af;
}
#groproAiTaskModal .task-meta-status,
#groproAiTaskModal .subtask-meta-status {
  position: relative;
  display: inline-flex;
  align-items: center;
}
#groproAiTaskModal .status-dot-only {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}
#groproAiTaskModal .status-tooltip {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
#groproAiTaskModal .task-level-tag {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
#groproAiTaskModal .task-priority {
  margin-left: auto;
}
#groproAiTaskModal .priority-flag {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
}
#groproAiTaskModal .priority-flag.priority-normal {
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
}
#groproAiTaskModal .priority-flag.priority-high {
  background: rgba(248, 113, 113, 0.14);
  color: #dc2626;
}
#groproAiTaskModal .priority-flag.priority-urgent {
  background: rgba(217, 70, 239, 0.18);
  color: #a21caf;
}
#groproAiTaskModal .priority-flag.priority-low {
  background: rgba(16, 185, 129, 0.14);
  color: #047857;
}
#groproAiTaskModal .priority-flag.priority-custom {
  background: rgba(251, 191, 36, 0.18);
  color: #92400e;
}
#groproAiTaskModal .priority-flag.priority-none {
  background: rgba(148, 163, 184, 0.16);
  color: #475569;
}
#groproAiTaskModal .task-subtasks {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: #f9fafb;
  border-radius: 6px;
  font-size: 12px;
  color: #4b5563;
  cursor: pointer;
  margin-top: 8px;
}
#groproAiTaskModal .subtask-container {
  margin-top: 8px;
  display: none;
}
#groproAiTaskModal .subtask-container.expanded {
  display: block;
  animation: slideDown 0.2s ease;
}
#groproAiTaskModal .subtask-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 8px;
}
#groproAiTaskModal .subtask-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
#groproAiTaskModal .subtask-card .task-name {
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
}
#groproAiTaskModal .subtask-card .task-name.subtask-link {
  cursor: grab !important;
  text-decoration: none !important;
}
#groproAiTaskModal .subtask-card .task-name.subtask-link:hover,
#groproAiTaskModal .subtask-card .task-name.subtask-link:focus {
  text-decoration: none !important;
}
#groproAiTaskModal .subtask-card.gropro-ai-dragging .task-name.subtask-link,
#groproAiTaskModal .subtask-card .task-name.subtask-link:active {
  cursor: grabbing !important;
}
#groproAiTaskModal .add-task-btn {
  width: 100%;
  padding: 12px;
  border: 2px dashed #d1d5db;
  background: none;
  border-radius: 8px;
  color: #6b7280;
  font-size: 14px;
}
#groproAiTaskModal #groproAiTaskSections .task-section {
  background: #fff;
  border-radius: 16px;
  margin-bottom: 24px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}
#groproAiTaskModal #groproAiTaskSections .section-header {
  padding: 18px 24px;
  background: linear-gradient(135deg, rgba(237, 32, 71, 0.08), rgba(237, 32, 71, 0));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
#groproAiTaskModal #groproAiTaskSections .section-header-main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 auto;
  min-width: 0;
}
#groproAiTaskModal #groproAiTaskSections .section-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
#groproAiTaskModal .section-title {
  font-weight: 600;
  color: #1f2937;
  font-size: 15px;
}
#groproAiTaskModal .section-count {
  background: #fff;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-color, #ed2047);
  border: 1px solid rgba(237, 32, 71, 0.2);
}
#groproAiTaskModal #groproAiTaskSections .task-section-scroll {
  overflow-x: auto;
  overflow-y: visible;
  padding: 8px 12px 12px;
}
#groproAiTaskModal #groproAiTaskSections .task-table {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  width: fit-content;
  min-width: 100%;
  background: #fff;
}
#groproAiTaskModal #groproAiTaskSections .task-table-header {
  display: grid;
  grid-template-columns: minmax(320px, 400px) 150px 150px 150px 150px 150px 72px;
  gap: 12px;
  align-items: center;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7280;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
  padding: 0 10px;
}
#groproAiTaskModal #groproAiTaskSections .task-table-body {
  display: flex;
  flex-direction: column;
}
#groproAiTaskModal .task-row {
  display: grid;
  grid-template-columns: minmax(320px, 400px) 150px 150px 150px 150px 150px 72px;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid #f3f4f6;
  transition: 0.2s ease;
  cursor: default;
  background: #fff;
  padding: 0 10px;
  min-height: 54px;
}
@media (max-width: 900px) {
  #groproAiTaskModal .task-row {
    grid-template-columns: minmax(190px, 280px) 150px 150px 150px 150px 150px 72px;
  }
  #groproAiTaskModal .task-table.has-list-column .task-table-header,
  #groproAiTaskModal .task-table.has-list-column .task-row {
    grid-template-columns: minmax(190px, 280px) 150px 150px 150px 150px 150px 150px 72px;
  }
  #groproAiTaskModal #gpClone_officeInterface .task-table-header,
  #groproAiTaskModal #gpClone_officeInterface .gpClone-task-table-header {
    grid-template-columns: minmax(190px, 280px) 150px 150px 150px 150px 150px 72px;
  }
  #groproAiTaskModal #groproAiTaskSections .task-table-header {
    grid-template-columns: minmax(190px, 280px) 150px 150px 150px 150px 150px 72px;
  }
}
#groproAiTaskModal .task-row:hover {
  background: rgba(237, 32, 71, 0.04);
}
#groproAiTaskModal .task-row.add-row {
  color: var(--primary-color, #ed2047);
  background: rgba(237, 32, 71, 0.03);
  font-weight: 600;
}
#groproAiTaskModal .task-row.add-row .task-cell.name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}
#groproAiTaskModal .task-cell {
  min-width: 0;
  display: flex;
  align-items: center;
  font-size: 13px;
  color: #374151;
}
#groproAiTaskModal .task-cell.name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#groproAiTaskModal .gropro-ai-cloned-project-view {
  pointer-events: none;
}
/* Excel table inside modal (project .excel-table look) */
#groproAiTaskModal .gropro-ai-excel-table.excel-table {
  width: max(100%, 960px);
  border-collapse: collapse;
  min-width: 720px;
  font-size: 13px;
}
#groproAiTaskModal .gropro-ai-excel-table.excel-table thead {
  position: sticky;
  top: 0;
  background: #fef2f4;
  z-index: 1;
}
#groproAiTaskModal .gropro-ai-excel-table.excel-table th,
#groproAiTaskModal .gropro-ai-excel-table.excel-table td {
  border: 1px solid var(--gray-200, #e5e7eb);
  padding: 10px 12px;
  text-align: left;
  color: var(--gray-800, #1f2937);
}
#groproAiTaskModal .gropro-ai-excel-table.excel-table th {
  font-weight: 600;
  color: var(--gray-700, #374151);
}
#groproAiTaskModal .gropro-ai-excel-table .excel-corner-cell {
  background: #f8f9fa;
  border: 1px solid var(--gray-300, #d1d5db);
  width: 50px;
  min-width: 50px;
  max-width: 50px;
  position: sticky;
  left: 0;
  top: 0;
  z-index: 3;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-600, #6b7280);
}
#groproAiTaskModal .gropro-ai-excel-table thead tr:first-child th {
  background: #f8f9fa;
  border: 1px solid var(--gray-300, #d1d5db);
}
#groproAiTaskModal .gropro-ai-excel-table thead tr:first-child .excel-corner-cell {
  z-index: 4;
}
#groproAiTaskModal .gropro-ai-excel-table .excel-column-header {
  background: #f8f9fa;
  text-align: center;
  font-weight: 600;
  color: var(--gray-600, #6b7280);
  font-size: 12px;
  padding: 6px 8px;
  min-width: 50px;
}
#groproAiTaskModal .gropro-ai-excel-table .excel-header-row th {
  background: #fef2f4;
}
#groproAiTaskModal .gropro-ai-excel-row-number {
  background: #f8f9fa;
  border: 1px solid var(--gray-300, #d1d5db);
  text-align: center;
  font-weight: 600;
  color: var(--gray-600, #6b7280);
  font-size: 12px;
  width: 48px;
  min-width: 48px;
  max-width: 48px;
  position: sticky;
  left: 0;
  z-index: 2;
}
#groproAiTaskModal .gropro-ai-excel-table tbody tr:hover .gropro-ai-excel-row-number {
  background: #e9ecef;
}
.gropro-ai-excel-row--ai td {
  background: #fffafb;
}
.gropro-ai-excel-row--db td {
  background: #fff;
}
.gropro-ai-excel-empty-row td {
  color: #9ca3af;
  text-align: center;
  padding: 24px;
}
.gropro-ai-preview-empty {
  padding: 10px 10px;
  text-align: center;
  color: #6b7280;
  font-size: 14px;
}
.gropro-ai-canvas-card {
  position: relative;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px 14px 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.gropro-ai-canvas-card:hover {
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
}
.gropro-ai-canvas-card--ai {
  border-style: dashed;
  border-color: rgba(237, 32, 71, 0.55);
  background: linear-gradient(180deg, #fffafb 0%, #fff 100%);
}
.gropro-ai-canvas-card--compact {
  padding: 10px 12px;
}
.gropro-ai-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.gropro-ai-card-title-row {
  flex: 1;
  min-width: 0;
}
.gropro-ai-task-name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gropro-ai-canvas-card--compact .gropro-ai-task-name {
  font-size: 13px;
  white-space: normal;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.gropro-ai-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.gropro-ai-faux-btn {
  font-size: 11px;
  font-weight: 600;
  color: #ed2047;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(237, 32, 71, 0.08);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}
.gropro-ai-faux-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 16px;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}
.gropro-ai-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  margin-bottom: 4px;
}
.gropro-ai-assignee {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ed2047;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.gropro-ai-assignee--ai {
  background: #d1d5db;
  color: #6b7280;
  font-size: 10px;
}
.gropro-ai-due {
  font-size: 12px;
  color: #4b5563;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.gropro-ai-due .fa-calendar {
  font-size: 11px;
  opacity: 0.75;
}
.gropro-ai-muted {
  color: #9ca3af;
}
.gropro-ai-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.gropro-ai-level-tag {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 800;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.gropro-ai-level-tag--empty {
  background: #e5e7eb;
  opacity: 0.6;
}
.gropro-ai-priority-flag {
  margin-left: auto;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.gropro-ai-priority-none {
  background: rgba(148, 163, 184, 0.2);
  color: #475569;
}
.gropro-ai-priority-normal {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}
.gropro-ai-priority-high {
  background: rgba(248, 113, 113, 0.18);
  color: #dc2626;
}
.gropro-ai-priority-urgent {
  background: rgba(217, 70, 239, 0.2);
  color: #a21caf;
}
.gropro-ai-priority-low {
  background: rgba(16, 185, 129, 0.16);
  color: #047857;
}
.gropro-ai-priority-custom {
  background: rgba(251, 191, 36, 0.22);
  color: #92400e;
}
.gropro-ai-source-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 2px 6px;
  border-radius: 4px;
  pointer-events: none;
}
.gropro-ai-source-badge--db {
  background: #f3f4f6;
  color: #6b7280;
}
.gropro-ai-ai-chip {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(237, 32, 71, 0.15);
  color: #ed2047;
  flex-shrink: 0;
}
.gropro-ai-ai-chip--inline {
  vertical-align: middle;
}
.gropro-ai-subtasks-toggle,
.gropro-ai-subtasks-toggle--ai {
  margin-top: 10px;
  width: 100%;
  text-align: left;
  border: none;
  background: #f9fafb;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #4b5563;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}
.gropro-ai-subtasks-toggle:hover,
.gropro-ai-subtasks-toggle--ai:hover {
  background: #f3f4f6;
  color: #ed2047;
}
.gropro-ai-subtasks-toggle--ai {
  background: #fff5f5;
}
.gropro-ai-chev {
  font-size: 10px;
  width: 14px;
  display: inline-block;
}
.gropro-ai-subpanel {
  display: none;
  margin-top: 8px;
  padding-top: 4px;
  border-top: 1px dashed #e5e7eb;
}
.gropro-ai-subpanel.gropro-ai-subpanel-open {
  display: block;
  animation: gropro-ai-expand 0.2s ease;
}
@keyframes gropro-ai-expand {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.gropro-ai-subtask-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 8px;
}
.gropro-ai-subtask-card--ai {
  background: #fff7f7;
  border-style: dashed;
  border-color: rgba(237, 32, 71, 0.35);
}
.gropro-ai-subtask-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.gropro-ai-subtask-head .gropro-ai-task-name {
  font-size: 13px;
  font-weight: 600;
  white-space: normal;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.gropro-ai-subtasks-hint {
  margin-top: 8px;
  font-size: 11px;
  color: #9ca3af;
  display: flex;
  align-items: center;
  gap: 6px;
}
.gropro-ai-chat-pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  background: linear-gradient(180deg, #ffffff 0%, #fafbfc 38%, #f4f6f8 100%);
  width: 30%;
  position: relative;
  box-shadow: 12px 0 40px rgba(15, 23, 42, 0.06);
  order: 1;
}
.gropro-ai-preview-pane {
  order: 2;
}
.gropro-ai-chat-topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.28);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.92) 100%);
}
.gropro-ai-chat-topbar-title {
  order: 2;
  margin-left: auto;
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.gropro-ai-chat-topbar-title::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gropro-ai-accent, #ed2047), #f472b6);
  flex-shrink: 0;
  animation: groproAiLiveDot 2.2s ease-in-out infinite;
}
.gropro-ai-chat-sections-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(255, 255, 255, 0.9);
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.gropro-ai-chat-topbar-actions {
  order: 1;
  margin-left: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.gropro-ai-chat-sections-btn:hover {
  background: rgba(237, 32, 71, 0.08);
  border-color: rgba(237, 32, 71, 0.35);
  color: #ed2047;
  transform: translateY(-1px);
}
.gropro-ai-chat-sessions-drawer {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(320px, 95%);
  background: #fff;
  border-right: 1px solid #e5e7eb;
  box-shadow: 16px 0 28px rgba(15, 23, 42, 0.12);
  z-index: 20;
  transform: translateX(-100%);
  transition: transform 0.22s ease;
  display: flex;
  flex-direction: column;
}
.gropro-ai-chat-sessions-drawer.open {
  transform: translateX(0);
}
.gropro-ai-chat-sessions-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
}
.gropro-ai-chat-sessions-title {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
}
.gropro-ai-chat-sessions-close {
  width: 30px;
  height: 30px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #374151;
  cursor: pointer;
}
.gropro-ai-chat-sessions-close:hover {
  background: #f3f4f6;
}
.gropro-ai-chat-sessions-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}
.gropro-ai-chat-section-item {
  width: 100%;
  border: 1px solid #e5e7eb;
  background: #fff;
  text-align: left;
  font-size: 12px;
  color: #374151;
  border-radius: 7px;
  padding: 7px 8px;
  cursor: pointer;
  margin-bottom: 8px;
}
.gropro-ai-chat-section-item:hover {
  background: #f3f4f6;
}
.gropro-ai-chat-session-card {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-bottom: 8px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  overflow: visible;
}
.gropro-ai-chat-session-open {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  text-align: left;
  padding: 8px 10px;
  cursor: pointer;
  border-radius: 10px 0 0 10px;
}
.gropro-ai-chat-session-open:hover {
  background: #f9fafb;
}
.gropro-ai-chat-session-title {
  font-weight: 600;
  color: #111827;
  margin-bottom: 4px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gropro-ai-chat-session-preview {
  font-size: 12px;
  color: #4b5563;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.gropro-ai-chat-session-meta {
  font-size: 11px;
  color: #6b7280;
}
.gropro-ai-chat-session-more {
  flex: 0 0 36px;
  width: 36px;
  border: none;
  border-left: 1px solid #e5e7eb;
  background: #fff;
  color: #6b7280;
  cursor: pointer;
  border-radius: 0 10px 10px 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.gropro-ai-chat-session-more:hover {
  background: #f3f4f6;
  color: #111827;
}
.gropro-ai-chat-session-menu {
  position: absolute;
  right: 6px;
  top: 100%;
  margin-top: 4px;
  min-width: 140px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
  z-index: 40;
  padding: 4px;
}
.gropro-ai-chat-session-menu button {
  display: block;
  width: 100%;
  border: none;
  background: #fff;
  text-align: left;
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  color: #374151;
}
.gropro-ai-chat-session-menu button:hover {
  background: #f3f4f6;
}
.gropro-ai-chat-session-menu .gropro-ai-session-action-delete {
  color: #b91c1c;
}
.gropro-ai-chat-section-empty {
  font-size: 12px;
  color: #9ca3af;
  padding: 8px;
}
.gropro-ai-chat-scroll {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 14px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
  scroll-behavior: auto;
  overscroll-behavior: contain;
  scrollbar-width: auto;
  scrollbar-color: auto;
  scrollbar-gutter: auto;
}
.gropro-ai-chat-progress-dock {
  display: none;
  flex: 0 0 auto;
  padding: 0 14px 6px;
  margin-top: 2px;
}
.gropro-ai-chat-progress-dock.gropro-ai-chat-progress-dock--visible {
  display: block;
}
.gropro-ai-chat-scroll::-webkit-scrollbar {
  width: 10px;
}
.gropro-ai-chat-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.gropro-ai-chat-scroll::-webkit-scrollbar-thumb {
  background: rgba(107, 114, 128, 0.45);
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.gropro-ai-msg {
  max-width: 92%;
  min-width: 0;
  padding: 11px 14px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  word-break: break-word;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  transition: box-shadow 0.22s ease, transform 0.22s ease;
}
.gropro-ai-msg:hover {
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.1);
}
.gropro-ai-msg-user {
  align-self: flex-end;
  margin-left: auto;
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
  color: #fff;
  border-bottom-right-radius: 6px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25);
}
.gropro-ai-msg-ai {
  align-self: flex-start;
  margin-right: auto;
  background: linear-gradient(165deg, #ffffff 0%, #f8fafc 100%);
  color: #1e293b;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-bottom-left-radius: 6px;
}
.gropro-ai-msg-error {
  background: linear-gradient(165deg, #fff1f2 0%, #ffe4e6 100%);
  border: 1px solid rgba(244, 63, 94, 0.45);
  color: #881337;
  box-shadow: 0 6px 20px rgba(225, 29, 72, 0.12);
}
.gropro-ai-msg-error:hover {
  box-shadow: 0 10px 28px rgba(225, 29, 72, 0.16);
}
/* Live model reasoning (streamed via /ai/chat-progress; removed when the reply arrives) */
.gropro-ai-msg-thinking-stream {
  margin-top: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  color: #6b7280;
  min-height: 0;
  max-height: 150px;
  overflow-y: auto;
  overflow-x: hidden;
  font-family: inherit;
  scrollbar-width: auto;
  scrollbar-color: auto;
  scrollbar-gutter: auto;
}
.gropro-ai-msg-thinking-stream::-webkit-scrollbar {
  width: 10px;
}
.gropro-ai-msg-thinking-stream::-webkit-scrollbar-track {
  background: transparent;
}
.gropro-ai-msg-thinking-stream::-webkit-scrollbar-thumb {
  background: rgba(107, 114, 128, 0.45);
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.gropro-ai-msg-system {
  align-self: center;
  max-width: 96%;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  color: #92400e;
  font-size: 12px;
  border-radius: 999px;
  padding: 8px 16px;
  border: 1px solid rgba(251, 191, 36, 0.45);
  box-shadow: 0 4px 14px rgba(180, 83, 9, 0.1);
}
.gropro-ai-msg-has-proposal {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
}
.gropro-ai-msg-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
  min-width: 0;
}
.gropro-ai-msg-proposal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}
.gropro-ai-msg-proposal-actions .gropro-ai-btn {
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
}
.gropro-ai-msg-proposal-actions .gropro-ai-btn-primary {
  background: linear-gradient(135deg, #ed2047, #c0183a);
  color: #fff;
  border-color: transparent;
}
.gropro-ai-msg-proposal-actions .gropro-ai-btn-secondary:hover {
  border-color: #ed2047;
  color: #ed2047;
}
.gropro-ai-msg-thinking {
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 50%, #f1f5f9 100%);
  position: relative;
  overflow: hidden;
  padding-left: 16px;
}
.gropro-ai-msg-thinking::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--gropro-ai-accent, #ed2047), #f472b6, var(--gropro-ai-accent, #ed2047));
  background-size: 100% 200%;
  animation: groproAiShimmerBar 2.2s ease-in-out infinite alternate;
}
.gropro-ai-msg-ai-progress {
  border-left: none;
  animation: groproAiPulseGlow 2.6s ease-in-out infinite;
}
.gropro-ai-msg.gropro-ai-msg-ai.gropro-ai-msg-thinking.gropro-ai-msg-ai-progress {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 2px 0 !important;
  border-radius: 0 !important;
  max-width: 96%;
  animation: none !important;
  display: flex !important;
  flex-direction: column;
  gap: 2px;
  color: #111827 !important;
  position: static !important;
  bottom: auto !important;
  z-index: 1;
  visibility: visible !important;
  opacity: 1 !important;
  align-self: flex-start !important;
  margin-right: auto;
  margin-top: 2px;
  margin-bottom: 2px;
  min-height: fit-content;
}
.gropro-ai-msg.gropro-ai-msg-ai.gropro-ai-msg-thinking.gropro-ai-msg-ai-progress::before {
  display: none !important;
}
.gropro-ai-msg.gropro-ai-msg-ai.gropro-ai-msg-thinking.gropro-ai-msg-ai-progress:hover {
  box-shadow: none !important;
}
.gropro-ai-msg-thinking-title {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #111827 !important;
  visibility: visible !important;
  opacity: 1 !important;
  line-height: 1.35;
  min-height: 18px;
}

/* While AI is thinking, keep long request bubble scrollable so stage stays visible */
.gropro-ai-chat-scroll--awaiting .gropro-ai-msg-user-with-job-actions .gropro-ai-msg-text {
  max-height: none;
  overflow: visible;
  padding-right: 0;
  scrollbar-width: none;
  scrollbar-color: auto;
}
.gropro-ai-msg-thinking-sub {
  margin-top: 4px;
  font-size: 12px;
  color: #6b7280;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.gropro-ai-thinking-dots {
  display: inline-flex;
  gap: 4px;
}
.gropro-ai-thinking-dots span {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #6b7280;
  animation: groproAiThinkingDot 1.1s infinite ease-in-out;
}
.gropro-ai-thinking-dots span:nth-child(2) {
  animation-delay: 0.15s;
}
.gropro-ai-thinking-dots span:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes groproAiThinkingDot {
  0%, 80%, 100% {
    opacity: 0.3;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-2px);
  }
}
.gropro-ai-link-status-card {
  align-self: stretch;
  max-width: 100%;
  background: #f8fafc;
  color: #0f172a;
  border: 1px solid #dbe3ef;
}
.gropro-ai-link-status-title {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}
.gropro-ai-link-status-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.gropro-ai-link-status-row {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px;
  background: #fff;
}
.gropro-ai-link-status-row.tone-ok {
  border-color: #86efac;
  background: #f0fdf4;
}
.gropro-ai-link-status-row.tone-warning {
  border-color: #fcd34d;
  background: #fffbeb;
}
.gropro-ai-link-status-row.tone-error {
  border-color: #fca5a5;
  background: #fef2f2;
}
.gropro-ai-link-status-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.gropro-ai-link-status-source {
  font-size: 12px;
  font-weight: 600;
  color: #111827;
}
.gropro-ai-link-status-badge {
  font-size: 11px;
  border-radius: 999px;
  padding: 2px 8px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
}
.gropro-ai-link-status-row.tone-ok .gropro-ai-link-status-badge {
  border-color: #4ade80;
  color: #166534;
  background: #dcfce7;
}
.gropro-ai-link-status-row.tone-warning .gropro-ai-link-status-badge {
  border-color: #f59e0b;
  color: #92400e;
  background: #fef3c7;
}
.gropro-ai-link-status-row.tone-error .gropro-ai-link-status-badge {
  border-color: #ef4444;
  color: #991b1b;
  background: #fee2e2;
}
.gropro-ai-link-status-meta {
  margin-top: 5px;
  font-size: 11px;
  color: #4b5563;
  word-break: break-word;
}
.gropro-ai-link-status-url {
  margin-top: 5px;
  display: block;
  font-size: 11px;
  color: #1d4ed8;
  word-break: break-all;
  text-decoration: none;
}
.gropro-ai-link-status-url:hover {
  text-decoration: underline;
}
.gropro-ai-implement-confirm {
  position: fixed;
  inset: 0;
  z-index: 100002;
  background: rgba(15, 23, 42, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}
.gropro-ai-implement-confirm-dialog {
  background: #fff;
  border-radius: 14px;
  padding: 22px 24px;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
}
.gropro-ai-implement-confirm-title {
  margin: 0 0 18px;
  font-size: 15px;
  font-weight: 600;
  color: #111827;
  line-height: 1.45;
}
.gropro-ai-implement-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.gropro-ai-chat-attachment-preview {
  position: fixed;
  inset: 0;
  z-index: 100005;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  box-sizing: border-box;
}
.gropro-ai-chat-attachment-preview-backdrop {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border: none;
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
  z-index: 0;
}
.gropro-ai-chat-attachment-preview-dialog {
  position: relative;
  z-index: 1;
  max-width: min(920px, 96vw);
  max-height: min(88vh, 900px);
  width: 100%;
  background: #0f172a;
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.gropro-ai-chat-attachment-preview-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gropro-ai-chat-attachment-preview-close:hover {
  background: rgba(255, 255, 255, 0.22);
}
.gropro-ai-chat-attachment-preview-body {
  flex: 0 1 auto;
  min-height: 0;
  max-height: min(90vh, 820px);
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 16px 16px;
  box-sizing: border-box;
}
.gropro-ai-chat-attachment-preview-img {
  max-width: 100%;
  max-height: min(calc(88vh - 96px), 720px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
}
.gropro-ai-chat-attachment-preview-video {
  max-width: 100%;
  max-height: min(calc(88vh - 96px), 720px);
  width: auto;
  border-radius: 8px;
  background: #000;
}
.gropro-ai-chat-attachment-preview-iframe {
  width: min(880px, 92vw);
  height: min(calc(88vh - 96px), 720px);
  border: none;
  border-radius: 8px;
  background: #fff;
}
.gropro-ai-chat-attachment-preview-generic {
  text-align: center;
  color: #e2e8f0;
  padding: 24px 16px;
}
.gropro-ai-chat-attachment-preview-generic .fa-file {
  opacity: 0.65;
  margin-bottom: 12px;
}
.gropro-ai-chat-attachment-preview-name {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  word-break: break-all;
}
.gropro-ai-chat-attachment-preview-footer {
  flex: 0 0 auto;
  padding: 0 16px 16px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.gropro-ai-chat-compose {
  flex: 0 0 auto;
  padding: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 16px;
  margin: 12px;
  background: linear-gradient(165deg, #ffffff 0%, #f8fafc 100%);
  box-shadow:
    0 10px 32px rgba(15, 23, 42, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.8) inset;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.gropro-ai-chat-compose:focus-within {
  border-color: rgba(237, 32, 71, 0.42);
  box-shadow:
    0 0 0 3px rgba(237, 32, 71, 0.14),
    0 14px 40px rgba(15, 23, 42, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.85) inset;
}
.gropro-ai-chat-compose textarea {
  width: 100%;
  box-sizing: border-box;
  border: none;
  border-radius: 0;
  padding: 12px;
  font-family: inherit;
  font-size: 13px;
  resize: none;
  min-height: 50px;
  max-height: 140px;
  overflow-y: auto;
  background: transparent;
  color: #111827 !important;
  caret-color: #111827;
  -webkit-text-fill-color: #111827;
  scrollbar-width: none;
}
.gropro-ai-chat-compose textarea::placeholder {
  color: #9ca3af;
  opacity: 1;
}
.gropro-ai-chat-compose textarea::-webkit-scrollbar {
  width: 0;
  height: 0;
}
.gropro-ai-chat-compose textarea:focus {
  outline: none;
}
.gropro-ai-chat-input-editable {
  width: 100%;
  box-sizing: border-box;
  border: none;
  border-radius: 0;
  padding: 12px;
  font-family: inherit;
  font-size: 13px;
  min-height: 50px;
  max-height: 140px;
  overflow-y: auto;
  background: transparent;
  color: #111827 !important;
  caret-color: #111827;
  -webkit-text-fill-color: #111827;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.45;
  scrollbar-width: none;
}
.gropro-ai-chat-input-editable::-webkit-scrollbar {
  width: 0;
  height: 0;
}
.gropro-ai-chat-input-editable:focus {
  outline: none;
}
.gropro-ai-chat-input-editable.gropro-ai-chat-input--empty:not(:focus):before {
  content: attr(data-placeholder);
  color: #9ca3af;
  pointer-events: none;
}
.gropro-ai-composer-mention {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  margin: 0 1px;
  border-radius: 5px;
  background: rgba(237, 32, 71, 0.12);
  color: #c41845;
  font-weight: 600;
  font-size: 12px;
  border: 1px solid rgba(237, 32, 71, 0.35);
  vertical-align: baseline;
  user-select: none;
  cursor: default;
  white-space: nowrap;
  max-width: 100%;
}
.gropro-ai-composer-mention:focus {
  outline: none;
}
.gropro-ai-chat-input-wrap {
  position: relative;
}
.gropro-ai-mention-dropdown {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 100%;
  margin-bottom: 4px;
  max-height: 200px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 50;
}
.gropro-ai-mention-dropdown[hidden] {
  display: none !important;
}
.gropro-ai-mention-item {
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  border-bottom: 1px solid #f3f4f6;
}
.gropro-ai-mention-item:last-child {
  border-bottom: none;
}
.gropro-ai-mention-item:hover,
.gropro-ai-mention-item[aria-selected='true'] {
  background: #f3f4f6;
}
.gropro-ai-mention-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  margin: 0 4px 2px 0;
  border-radius: 6px;
  background: rgba(237, 32, 71, 0.1);
  color: #ed2047;
  font-size: 12px;
  font-weight: 600;
  vertical-align: middle;
}
.gropro-ai-msg-user .gropro-ai-msg-text {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}
.gropro-ai-user-msg-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.gropro-ai-user-msg-mention-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.gropro-ai-msg-user .gropro-ai-mention-chip--footer {
  margin: 0;
  background: rgba(237, 32, 71, 0.22);
  color: #fecdd3;
  border: 1px solid rgba(253, 164, 175, 0.45);
}
.gropro-ai-msg-user .gropro-ai-mention-inline {
  display: inline;
  padding: 1px 5px;
  margin: 0 1px;
  border-radius: 5px;
  background: rgba(237, 32, 71, 0.28);
  color: #fecdd3;
  font-weight: 600;
  font-size: 12px;
  border: 1px solid rgba(253, 164, 175, 0.4);
  white-space: nowrap;
  vertical-align: baseline;
}
.gropro-ai-live-root-lock {
  opacity: 0.92;
}
.gropro-ai-live-root-lock .task-meta-row {
  pointer-events: none;
  opacity: 0.65;
}
.gropro-ai-chat-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
  width: 100%;
}
.gropro-ai-chat-upload-speed {
  margin-right: auto;
  min-height: 1.2em;
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  max-width: 42%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gropro-ai-chat-upload-speed.gropro-ai-chat-upload-speed--active {
  color: #111827;
}

.gropro-ai-chat-attachments-queue {
  display: none;
  padding: 0 4px 8px;
  max-height: 200px;
  overflow-y: auto;
}
.gropro-ai-chat-attachments-queue.gropro-ai-chat-attachments-queue--visible {
  display: block;
}
.gropro-ai-chat-attachments-queue-inner {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
}
.gropro-ai-chat-queue-upload-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(17, 24, 39, 0.42);
  border-radius: 9px;
  pointer-events: none;
  z-index: 1;
}
.gropro-ai-chat-tile-upload-ring {
  width: 30px;
  height: 30px;
}
.gropro-ai-chat-tile-upload-ring-bg {
  stroke: rgba(255, 255, 255, 0.35);
}
.gropro-ai-chat-tile-upload-ring-fill {
  stroke: #fff;
}
.gropro-ai-chat-queue-tile {
  position: relative;
  flex: 0 0 auto;
}
.gropro-ai-chat-queue-row-preview--tile {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  overflow: hidden;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border: 1px solid #e5e7eb;
  cursor: pointer;
}
.gropro-ai-chat-queue-row-preview--tile:focus {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}
.gropro-ai-chat-queue-row-preview--tile:focus:not(:focus-visible) {
  outline: none;
}
.gropro-ai-chat-queue-row-preview--tile.gropro-ai-chat-queue-row-preview--error {
  box-shadow: inset 0 0 0 2px rgba(185, 28, 28, 0.45);
}
.gropro-ai-chat-queue-row-preview {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  overflow: hidden;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gropro-ai-chat-queue-row-preview img,
.gropro-ai-chat-queue-row-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gropro-ai-chat-queue-remove--corner {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #fff;
  color: #4b5563;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  z-index: 3;
}
.gropro-ai-chat-queue-remove--corner:hover {
  background: #fee2e2;
  color: #991b1b;
}
.gropro-ai-chat-queue-remove {
  flex: 0 0 auto;
  border: none;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 16px;
  line-height: 1;
}
.gropro-ai-chat-queue-remove:hover {
  background: #fee2e2;
  color: #991b1b;
}
.gropro-ai-msg-user-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
  width: 100%;
}
.gropro-ai-msg-user-has-files {
  align-items: stretch;
}
.gropro-ai-msg-user-has-files .gropro-ai-msg-user-inner {
  align-items: stretch;
}
.gropro-ai-msg-user.gropro-ai-msg-user-with-job-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
  /* Full width of the chat column so the action row can pin Stop to the true right edge */
  width: 100%;
  max-width: 92%;
  box-sizing: border-box;
}
/* Legacy single footer bar (older rendered messages) */
.gropro-ai-msg-user-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 12px;
  row-gap: 8px;
  width: 100%;
  min-width: 0;
  margin-top: 2px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.gropro-ai-msg-user-job-text-stop-row {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 12px;
  width: 100%;
  min-width: 0;
}
.gropro-ai-msg-user-job-text-stop-row .gropro-ai-msg-text {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
  align-self: flex-end;
}
.gropro-ai-msg-user-job-stop-wrap {
  flex: 0 0 auto;
  align-self: flex-end;
  line-height: 0;
  margin-left: auto;
}
.gropro-ai-chat-job-stop-btn {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border-radius: 50%;
  border: 1px solid rgba(248, 113, 113, 0.85);
  background: #b91c1c;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  font-size: 11px;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}
.gropro-ai-chat-job-stop-btn:hover {
  background: #dc2626;
  border-color: #fecaca;
}
.gropro-ai-chat-job-stop-btn i {
  transform: scale(0.62);
}
.gropro-ai-chat-attachments-strip {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 100%;
}
.gropro-ai-chat-attachments-strip--thumbs {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 10px;
}
/* Thumbnail(s) left of comment: flex row beats any stray width:100% on the strip */
.gropro-ai-msg-user-inner > .gropro-ai-msg-user-attach-body {
  align-items: flex-start !important;
  gap: 12px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.gropro-ai-msg-user-inner > .gropro-ai-msg-user-attach-body > .gropro-ai-chat-attachments-strip.gropro-ai-chat-attachments-strip--thumbs {
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0;
  justify-content: flex-start !important;
  flex-wrap: wrap;
  align-content: flex-start;
}
.gropro-ai-msg-user-inner > .gropro-ai-msg-user-attach-body > .gropro-ai-msg-user-job-text-stop-row {
  flex: 1 1 0% !important;
  min-width: 0 !important;
  width: auto !important;
  max-width: none;
}
.gropro-ai-msg-user-inner > .gropro-ai-msg-user-attach-body > .gropro-ai-msg-text {
  flex: 1 1 0% !important;
  min-width: 0 !important;
  width: auto !important;
  max-width: none;
  text-align: left;
}
.gropro-ai-msg-user-inner .gropro-ai-chat-attachment-tile {
  position: relative;
  flex: 0 0 auto;
  padding: 0;
  margin: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
}
.gropro-ai-msg-user-inner .gropro-ai-chat-attachment-tile:focus {
  outline: none;
}
.gropro-ai-msg-user-inner .gropro-ai-chat-attachment-tile:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: 3px;
  border-radius: 12px;
}
.gropro-ai-msg-user-inner .gropro-ai-chat-attachment-tile .gropro-ai-chat-queue-row-preview--tile {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}
.gropro-ai-msg-user-inner .gropro-ai-chat-attachment-tile .gropro-ai-chat-queue-row-preview--tile .fa-file {
  color: rgba(255, 255, 255, 0.75);
}
.gropro-ai-chat-attachment-tile {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  background: #f3f4f6;
}
.gropro-ai-chat-attachment-label {
  font-size: 11px;
  font-weight: 700;
  padding: 6px 8px;
  background: #111827;
  color: #fff;
}
.gropro-ai-chat-attachment-thumb {
  display: block;
  width: 100%;
  max-height: 180px;
  object-fit: contain;
  background: #000;
}
.gropro-ai-chat-attachment-link {
  display: block;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #2563eb;
}
.gropro-ai-btn-attach:hover {
  background: #f3f4f6;
}
.gropro-ai-btn {
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.gropro-ai-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.gropro-ai-btn-primary {
  background: #ed2047;
  color: #fff;
}
.gropro-ai-icon-btn {
  width: 30px;
  height: 30px;
  min-width: 30px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid #111827;
  background: #fff;
  color: #111827;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.gropro-ai-btn-mic:hover,
.gropro-ai-btn-send:hover {
  background: #f3f4f6;
}
.gropro-ai-btn-send i {
  margin-left: 1px;
  font-size: 12px;
}
.gropro-ai-btn-stop {
  border-color: #b91c1c;
  color: #b91c1c;
}
.gropro-ai-btn-stop:hover {
  background: #fef2f2;
}
.gropro-ai-chat-queue-badge {
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  margin-right: 4px;
  white-space: nowrap;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gropro-ai-btn-mic.gropro-ai-mic-listening {
  background: #ed2047;
  border-color: #ed2047;
  color: #fff;
}
#createTaskModal .btn-gropro-ai-header {
  border: 1px solid rgba(237, 32, 71, 0.35);
  background: rgba(237, 32, 71, 0.08);
  color: #ed2047;
  font-weight: 600;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}
#createTaskModal .btn-gropro-ai-header:hover {
  background: rgba(237, 32, 71, 0.15);
}
#createTaskModal .modal-header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Clone pickers are appended to document.body; keep them above .gropro-ai-task-modal (2300) */
body > .assignee-picker.show,
body > .due-date-picker.show,
body > .priority-picker.show,
body > .level-picker.show,
body > .task-action-menu.show {
  position: fixed !important;
  z-index: 100050 !important;
}

/* Multi-assignee avatars in AI preview (canvas + list) — match project board */
#groproAiTaskModal .assignee-avatars-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
#groproAiTaskModal .task-card .task-meta-row .assignee-avatars-group,
#groproAiTaskModal .subtask-card .task-meta-row .assignee-avatars-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
/* Multi-assignee chips: project-assignee-picker.css (load after preview-cards) */
#groproAiTaskModal .gropro-ai-excel-table .assignee-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.08);
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600, #4b5563);
  cursor: pointer;
}
#groproAiTaskModal .gropro-ai-excel-table .assignee-avatar.empty {
  color: var(--gray-400, #9ca3af);
}

/* Final override: Gropro popup is preview-only, hide add task/subtask triggers. */
#groproAiTaskModal .add-task-btn,
#groproAiTaskModal .section-add-btn,
#groproAiTaskModal .subtask-create-btn,
#groproAiTaskModal .task-card-subtask-btn,
#groproAiTaskModal #taskDetailSubtaskCreateBtn,
#groproAiTaskModal .task-row.add-row {
  display: none !important;
}
