/**
 * Teams Tab Styles
 * Styling for the teams overview and team items, similar to people-overview
 */

/* Teams Overview Container (Left Sidebar) */
#teams-overview {
  width: 20vw; /* 20% of the viewport width */
  background:
    radial-gradient(900px 700px at 15% 4%,
      rgba(255,255,255,0.04) 0%,
      rgba(255,255,255,0.03) 35%,
      rgba(255,255,255,0.00) 60%),
    linear-gradient(140deg,
      var(--sb-1) 0%,
      var(--sb-2) 28%,
      var(--sb-3) 58%,
      var(--sb-4) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    inset 0 -40px 60px rgba(0,0,0,0.18),
    6px 0 14px rgba(0, 0, 0, 0.35);
  color: #ffffff;
  overflow-y: auto;
  overflow-x: hidden;
  height: 100vh;
  border-top-left-radius: 15px;
  border-bottom-left-radius: 15px;
  position: relative;
}

#teams-overview header {
  padding: 15px;
  padding-top: 7px; 
  padding-bottom: 0px;
  background-color: transparent;
  color: white;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 1;
}

#teams-overview header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
  color: #ffffff;
}

#teams-overview header .add-task-btn {
  margin-left: 20px;
  font-size: 24px;
  width: 50px;
  height: 50px;
  border-radius: 5px;
  border: none;
  background-color: transparent;
  color: #f0f0f0;
  cursor: pointer;
  transition: background-color 0.1s, transform 0.1s;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

#teams-overview header .add-task-btn .lucide-icon {
  width: 24px;
  height: 24px;
  stroke-width: 1.5;
  stroke: #f0f0f0;
}

#teams-overview header .add-task-btn:hover {
  background-color: #f0f0f0;
  color: var(--sidebar-color);
}

#teams-overview header .add-task-btn:hover .lucide-icon {
  stroke: var(--sidebar-color);
}

/* Teams List */
#teams-list {
  list-style-type: none;
  padding: 0;
  margin: 0;
  overflow: visible;
}

/* Team Header (Collapsible Item) */
.team-header {
  padding: 12px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: left;
  transition: background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
              color 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
              box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 6px;
  margin: 0 8px;
  margin-top: 10px;
  color: #CBD0E4;
  background-color: transparent;
  border-bottom: none;
  position: relative;
  will-change: background-color;
}

.team-header:hover {
  background-color: #37468C;
}

.team-header.expanded {
  background-color: #37468C;
}

/* Team Header Content */
.team-header-content {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0; /* Allow text truncation */
}

/* Expand Arrow */
.team-expand-arrow {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  transition: transform 0.2s ease;
}

.team-expand-arrow.rotated {
  transform: rotate(90deg);
}

.team-expand-arrow svg,
.team-expand-arrow i {
  transition: inherit;
}

.team-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  margin-right: 8px;
}

.team-icon .lucide-icon {
  width: 28px;
  height: 28px;
  stroke: #ffffff;
  stroke-width: 1.5;
}

.team-header:hover .team-icon .lucide-icon {
  stroke: #ffffff;
}

.team-header.expanded .team-icon .lucide-icon {
  stroke: #ffffff;
}

.team-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.team-header {
  display: flex;
  align-items: center;
  gap: 6px;
}

.team-name {
  font-weight: 600;
  color: #ffffff;
  font-size: 1.0rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Team Title Row */
.team-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Team Role Badge */
.team-role-badge {
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(255, 193, 7, 0.15);
  color: #ffc107;
  margin-left: 6px;
}

.team-header.expanded .team-role-badge {
  background: rgba(255, 193, 7, 0.2);
}

/* Team Meta Information */
.team-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

.team-item.active .team-meta {
  color: rgba(44, 62, 80, 0.6);
}

.team-stat-sidebar {
  display: flex;
  align-items: center;
  gap: 4px;
}

.team-stat-sidebar .lucide-icon {
  width: 12px;
  height: 12px;
  opacity: 0.7;
}

.team-stat-separator {
  opacity: 0.4;
}

/* Team Members List (Nested) - matches person-item style */
.team-members-list {
  list-style-type: none;
  padding: 0;
  margin: 0 0 8px 0;
  margin-left: 8px;
  border-radius: 0 0 6px 6px;
}

.team-member-item {
  padding: 14px 20px 14px 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
              color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  color: #CBD0E4;
  position: relative;
  border-radius: 6px;
  margin: 4px 8px;
  will-change: background-color;
}

.team-member-item:hover {
  background-color: rgba(55, 70, 140, 0.6);
}

.team-member-item.active {
  background-color: #f2f3f4;
  color: #2c3e50;
}

.team-member-item.active .member-name {
  color: #2c3e50;
}

.team-member-item.active .member-avatar {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

/* Member Avatar */
.member-avatar {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: white;
  text-transform: uppercase;
}

/* Member Info */
.member-info {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.member-name {
  font-size: 15px;
  font-weight: 500;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.member-role-badge {
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(255, 193, 7, 0.15);
  color: #ffc107;
  margin-left: 4px;
  flex-shrink: 0;
}

.team-member-item:hover .member-role-badge {
  background: rgba(255, 193, 7, 0.2);
}

.team-member-item.active .member-role-badge {
  background: rgba(255, 193, 7, 0.15);
  color: #f57c00;
}

/* Pending Member Badge */
.member-pending-badge {
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(74, 144, 226, 0.15);
  color: #4a90e2;
  margin-left: 4px;
  flex-shrink: 0;
  white-space: nowrap;
}

.team-member-item:hover .member-pending-badge {
  background: rgba(74, 144, 226, 0.2);
}

.team-member-item.active .member-pending-badge {
  background: rgba(74, 144, 226, 0.15);
  color: #3a7bc8;
}

/* Pending members look normal - just have a badge */
.team-member-item[data-status="pending"]:hover {
  background-color: rgba(55, 70, 140, 0.6);
}

.team-member-item[data-status="pending"].active {
  background-color: #f2f3f4;
  color: #2c3e50;
}

/* Member Unread Badge */
.member-unread-badge {
  flex-shrink: 0;
  background: #4CAF50;
  color: white;
  border-radius: 10px;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 600;
  min-width: 18px;
  text-align: center;
}

/* Team Overflow Menu Styles (matching contact-overflow styles) */
.team-overflow-container {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 10;
}

.team-header:hover .team-overflow-container {
  opacity: 1;
}

.team-overflow-btn {
  background: transparent;
  border: none;
  border-radius: 4px;
  padding: 6px 8px;
  cursor: pointer;
  color: #ffffff;
  font-size: 14px;
  transition: background 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.team-overflow-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.team-overflow-btn i {
  pointer-events: none;
}


.team-overflow-menu {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 4px;
  background: #ffffff;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 160px;
  overflow: hidden;
  z-index: 1000;
}

/* Position menu above button when near bottom */
.team-overflow-menu.menu-above {
  top: auto;
  bottom: 100%;
  margin-top: 0;
  margin-bottom: 4px;
}

.team-menu-item {
  padding: 10px 16px;
  cursor: pointer;
  color: #323338;
  font-size: 14px;
  transition: background 0.15s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.team-menu-item:hover {
  background: #f0f0f1;
}

.team-menu-item.delete-item {
  color: #d83a52;
}

.team-menu-item.delete-item:hover {
  background: #fff0f1;
}

.team-menu-item i {
  width: 16px;
  font-size: 14px;
}

/* Empty State */
.teams-empty-state,
.teams-loading-state,
.teams-error-state {
  padding: 20px;
  text-align: center;
}

.teams-empty-state i,
.teams-loading-state i,
.teams-error-state i {
  display: block;
  margin: 0 auto 10px;
}

/* Spinner Animation */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Permanent white container - always visible, prevents blue background flickering */
.view-container {
  width: 76vw;
  background-color: #ffffff; /* Changed from #FAFAFC to pure white */
  height: 95.2vh;
  border-top-right-radius: 15px;
  border-bottom-right-radius: 15px;
  position: relative;
  display: flex;
  flex-direction: column;
  /* This container is NEVER hidden - it provides the permanent white background */
}

/* Team Details Panel - now child of view-container */
#team-details {
    width: 100%; /* Changed from 76vw */
    height: 100%; /* Changed from 95.2vh */
    background-color: transparent; /* Changed from #FAFAFC - let parent provide background */
    padding-right: 0;
    overflow-y: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden !important;
    /* Remove border-radius since parent has it */
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

#team-details .empty-state {
  text-align: center;
  padding: 40px;
}

#team-details .empty-state i {
  display: block;
  margin: 0 auto 20px;
}

/* Team Modal Specific Styles */
#create-team-modal .modal-textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  resize: vertical;
  min-height: 100px;
  transition: border-color 0.2s ease;
}

#create-team-modal .modal-textarea:focus {
  outline: none;
  border-color: #4a90e2;
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

#create-team-modal .input-helper-text {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
  font-size: 12px;
  color: #666;
}

#create-team-modal .char-counter {
  font-size: 11px;
  color: #999;
}

#create-team-modal .modal-add-btn {
  display: flex;
  align-items: center;
  gap: 8px;
}

#create-team-modal .modal-add-btn i {
  font-size: 14px;
}

#create-team-modal .modal-add-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Loading spinner */
.fa-spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  #teams-overview {
    width: 25vw;
  }
  
  #team-details {
    width: 71vw;
  }
}

/* Member Actions Menu (matching contact-overflow style) */
.member-actions {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 10;
}

.team-member-item:hover .member-actions {
  opacity: 1;
}

.team-member-item.active .member-actions {
  opacity: 1;
}

.member-action-btn {
  background: transparent;
  border: none;
  border-radius: 4px;
  padding: 6px 8px;
  cursor: pointer;
  color: #ffffff;
  font-size: 14px;
  transition: background 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.member-action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.member-action-btn i {
  pointer-events: none;
}

.team-member-item.active .member-action-btn {
  color: var(--sidebar-color);
  background: rgba(56, 70, 140, 0.1);
}

.team-member-item.active .member-action-btn:hover {
  background: rgba(56, 70, 140, 0.2);
}

.member-action-menu {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 4px;
  background: #ffffff;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 160px;
  overflow: hidden;
  z-index: 1000;
}

/* Position menu above button when near bottom */
.member-action-menu.menu-above {
  top: auto;
  bottom: 100%;
  margin-top: 0;
  margin-bottom: 4px;
}

.member-action-item {
  padding: 10px 16px;
  cursor: pointer;
  color: #323338;
  font-size: 14px;
  transition: background 0.15s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.member-action-item:hover {
  background: #f0f0f1;
}

.member-action-item.danger {
  color: #d83a52;
}

.member-action-item.danger:hover {
  background: #fff0f1;
}

.member-action-item i {
  width: 16px;
  font-size: 14px;
}

/* Add Member Modal */
.team-member-modal {
  max-width: 500px;
  width: 90%;
}

.modal-subtitle {
  color: #666;
  margin: -10px 0 20px 0;
  font-size: 14px;
  text-align: center;
}

/* Project modal specific styling */
.project-modal-content {
  min-height: 500px;
}

.project-modal-subtitle {
  text-align: left !important;
}

/* Create team modal specific styling */
.create-team-modal-content {
  min-height: 500px;
}

/* Folder modal specific styling */
.folder-modal-content {
  min-height: 300px;
}

.folder-modal-subtitle {
  text-align: left !important;
}

/* Folder modal error message */
.folder-name-error {
  display: none;
  margin: 6px 0 0;
  font-size: 13px;
  color: #E53E3E;
  font-weight: 400;
}

.team-member-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-textarea {
  background: white !important;
  padding: 12px 16px !important;
  width: 100% !important;
  border-radius: 4px !important;
  border: 1.5px solid !important;
  border-color: #c3c6d4 !important;
  font-size: 1rem !important;
  font-weight: 500 !important;
  margin-bottom: 24px;
  font-family: 'Inter', sans-serif;
  resize: vertical;
  min-height: 80px;
  transition: border-color 0.2s ease;
}

.modal-textarea:focus {
  outline: none !important;
  border-color: #4169E1 !important;
  border-width: 1.5px !important;
}

.modal-textarea::placeholder {
  font-size: 1rem !important;
  font-weight: 500 !important;
  color: #757575 !important;
}

.input-helper-text {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

.char-counter {
  font-size: 11px;
  color: #999;
}

/* Confirmation Modal */
/* Size definitions moved to modal-elements.css */

.confirmation-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 24px;
}

.confirmation-icon.danger {
  background: rgba(216, 58, 82, 0.1);
  color: #d83a52;
}

.confirmation-icon.primary {
  background: rgba(74, 144, 226, 0.1);
  color: #4a90e2;
}

.confirmation-message {
  color: #333;
  font-size: 15px;
  margin-bottom: 10px;
  line-height: 1.5;
  text-align: left;
}

.confirmation-subtitle {
  color: #666;
  font-size: 13px;
  margin-bottom: 20px;
  text-align: left;
}

.confirm-action-btn.danger {
  background: #d83a52;
}

.confirm-action-btn.danger:hover {
  background: #c02d43;
}

.confirm-action-btn.primary {
  background: #4a90e2;
}

.confirm-action-btn.primary:hover {
  background: #3a7bc8;
}

/* Modal Animations */
#add-team-member-modal.modal,
.confirmation-modal.modal {
  display: flex !important;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#add-team-member-modal.modal.show,
.confirmation-modal.modal.show {
  opacity: 1;
}

.modal.show .modal-content {
  transform: translateY(0);
  animation: modalSlideIn 0.3s ease;
}

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

/* Team Content Container (Board + People) */
.team-content {
  display: none;
  margin-left: 36px;
  margin-top: 4px;
  margin-bottom: 8px;
}

/* Board Item */
.team-board-item {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  border-radius: 6px;
  margin: 0 8px 4px 8px;
  background-color: transparent;
  color: #CBD0E4;
  position: relative;
}

.team-board-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.team-board-item.active {
  background-color: #f2f3f4;
  color: #2c3e50;
}

.team-board-item.active .board-label,
.team-board-item.active .board-icon {
  color: #2c3e50;
}

.board-item-content {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.board-icon {
  font-size: 16px;
  color: inherit;
}

.board-label {
  font-size: 15px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  color: inherit;
}

/* Documents Item */
.team-documents-item {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  border-radius: 6px;
  margin: 0 8px 4px 8px;
  background-color: transparent;
  color: #CBD0E4;
  position: relative;
}

.team-documents-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.team-documents-item.active {
  background-color: #f2f3f4;
  color: #2c3e50;
}

.team-documents-item.active .documents-label,
.team-documents-item.active .documents-icon {
  color: #2c3e50;
}

.documents-item-content {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.documents-icon {
  font-size: 16px;
  color: inherit;
}

.documents-label {
  font-size: 15px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  color: inherit;
}

/* Team Documents Container */
.team-documents-wrapper {
  flex: 1;
  height: 100%;
  overflow: hidden;
}

/* People Section */
.team-people-section {
  margin-top: 4px;
}

.people-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  border-radius: 6px;
  margin: 0 8px;
  color: #CBD0E4;
}

.people-section-header:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.people-section-arrow {
  font-size: 12px;
  transition: transform 0.3s ease;
  color: inherit;
}

.people-section-arrow.fa-chevron-down {
  transform: rotate(0deg);
}

.people-section-label {
  font-size: 15px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  flex: 1;
  color: inherit;
}

.people-count {
  font-size: 0.8rem;
  background-color: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 10px;
  color: inherit;
}

/* Team members list within people section */
.team-people-section .team-members-list {
  margin-left: 0px;
  margin-top: 4px;
}

/* ==========================================
   PROJECTS SECTION STYLING
   ========================================== */

.team-projects-section {
  margin-top: 4px;
}

.projects-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  border-radius: 6px;
  margin: 0 8px;
  color: #CBD0E4;
  position: relative;
}

.projects-section-header:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.projects-section-arrow {
  font-size: 12px;
  transition: transform 0.3s ease;
  color: inherit;
}

.projects-section-label {
  flex: 1;
  font-size: 15px;
  font-weight: 500;
}

.projects-count {
  background: rgba(255, 255, 255, 0.1);
  color: #CBD0E4;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.add-project-btn {
  background: transparent;
  border: none;
  color: #CBD0E4;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
}

.add-project-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.add-project-btn i {
  font-size: 12px;
}

.add-member-btn {
  background: transparent;
  border: none;
  color: #CBD0E4;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
}

.add-member-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.add-member-btn i {
  font-size: 12px;
}

/* Projects List */
.team-projects-list {
  list-style-type: none;
  padding: 0;
  margin: 0 0 8px 0;
  margin-left: 8px;
  margin-top: 4px;
}

.team-projects-section .team-projects-list {
  margin-left: 0;
}

/* Project Item */
.project-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 14px 32px;
  cursor: pointer;
  transition: background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 6px;
  margin: 4px 8px;
  color: #CBD0E4;
  gap: 12px;
  position: relative;
}

.project-item:hover {
  background-color: rgba(55, 70, 140, 0.6);
  color: #ffffff;
}

.project-item.active {
  background-color: #f2f3f4;
  color: #2c3e50;
}

.project-item.active .project-name {
  color: #2c3e50;
}

.project-item-content {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.project-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
}

.project-item.active .project-icon {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.project-name {
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: inherit;
}

/* Project Actions (Edit/Delete) */
.project-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.project-item:hover .project-actions {
  opacity: 1;
}

.project-action-btn {
  background: transparent;
  border: none;
  color: #CBD0E4;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.project-action-btn.edit-project:hover {
  background: rgba(66, 153, 225, 0.2);
  color: #4299e1;
}

.project-action-btn.delete-project:hover {
  background: rgba(245, 101, 101, 0.2);
  color: #f56565;
}

.project-action-btn i {
  font-size: 12px;
}

/* Empty/Loading/Error States */
.projects-loading,
.projects-empty,
.projects-error {
  list-style: none;
}

.projects-loading div,
.projects-empty div,
.projects-error div {
  padding: 12px 20px;
  text-align: center;
  font-size: 13px;
}

.projects-loading div {
  color: #888;
}

.projects-empty div {
  color: #999;
}

.projects-error div {
  color: #e74c3c;
}

/* Team Kanban Wrapper */
.team-kanban-wrapper {
  width: 100%;
  height: 100%;
  display: none;
  background: #FAFAFC;
  overflow: hidden;
  box-sizing: border-box;
}

/* Team Task Container - matches task-details styling */
.team-task-wrapper {
  width: 100%;
  height: 100%;
  background-color: #FAFAFC;
  padding-top: 15px;
  padding-right: 0;
  overflow-y: hidden;
  display: none; /* Hidden by default, shown when team member is selected */
  flex-direction: column;
  position: relative;
}

.team-kanban-wrapper .kanban-container {
  height: 100%;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

/* Trello-style Kanban in Team Context */
#team-details .kanban-container {
  padding: 16px 20px;
  background: #FAFAFC;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}

#team-details .kanban-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #dfe1e6;
  flex-shrink: 0;
  padding: 0 0 12px 0;
  background: #FAFAFC;
}

#team-details .kanban-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

#team-details .kanban-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 0 4px;
}

#team-details .kanban-board {
  flex: 1;
  overflow-x: auto;
  overflow-y: visible;
  max-width: 100%;
  display: flex;
  gap: 12px;
  align-items: stretch;
  padding: 16px 0;
  box-sizing: border-box;
}

#team-details .kanban-column {
  flex: 0 0 calc(20% - 10px);
  max-width: calc(20% - 10px);
  min-width: 200px;
  height: calc(100% - 6px);
  box-sizing: border-box;
  background: #ebecf0;
  border-radius: 3px;
  display: flex;
  flex-direction: column;
}

/* Kanban Input Wrapper in Team Context */
#team-details .kanban-input-wrapper {
  position: relative;
  width: 100%;
  background-color: #FAFAFC;
  display: flex;
  justify-content: flex-start; /* Match My Tasks alignment */
  padding: 0; /* Remove padding - container handles it */
  border-top: 1px solid #dfe1e6;
  flex-shrink: 0;
  z-index: 10;
}

#team-details .kanban-input-container {
  position: relative; /* Ensure this is set for absolute positioning to work */
  display: flex;
  align-items: center;
  padding: 45px 300px; /* Match My Tasks input padding */
  font-family: 'Arial', sans-serif; /* Match My Tasks input font */
  width: 76vw; /* Match My Tasks input width */
  height: 8vh; /* Match My Tasks input height */
  border-radius: 0 0 10px 10px; /* Match My Tasks input border-radius */
  transition: border 0.2s, box-shadow 0.2s; /* Match My Tasks input transition */
  z-index: 10;
  background-color: #FAFAFC; /* Match My Tasks input background */
}

#team-details .column-content {
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 8px 4px 8px;
  flex: 1;
  min-height: 0;
}

/* Trello-style Scrollbars */
#team-details .kanban-board::-webkit-scrollbar {
  height: 8px;
}

#team-details .kanban-board::-webkit-scrollbar-track {
  background: transparent;
}

#team-details .kanban-board::-webkit-scrollbar-thumb {
  background-color: rgba(9, 30, 66, 0.13);
  border-radius: 4px;
}

#team-details .kanban-board::-webkit-scrollbar-thumb:hover {
  background-color: rgba(9, 30, 66, 0.25);
}

/* Column scrollbars */
#team-details .column-content::-webkit-scrollbar {
  width: 8px;
}

#team-details .column-content::-webkit-scrollbar-track {
  background: transparent;
}

#team-details .column-content::-webkit-scrollbar-thumb {
  background-color: rgba(9, 30, 66, 0.13);
  border-radius: 4px;
  border: 2px solid #ebecf0;
}

#team-details .column-content::-webkit-scrollbar-thumb:hover {
  background-color: rgba(9, 30, 66, 0.25);
}

/* Responsive Styles */
@media (max-width: 768px) {
  #teams-overview {
    width: 30vw;
  }
  
  #team-details {
    width: 66vw;
  }
  
  .team-name {
    font-size: 0.9rem;
  }
  
  .team-meta {
    font-size: 11px;
  }
  
  #create-team-modal .modal-content {
    width: 90%;
    max-width: none;
  }
  
  .team-member-modal,
  .confirmation-modal-content {
    width: 95%;
  }
  
  .team-kanban-btn {
    padding: 4px 8px;
    font-size: 12px;
  }
}

/* Team Placeholder Styles */
.team-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  height: 100%;
  text-align: center;
}

.team-placeholder .placeholder-icon {
  width: 64px;
  height: 64px;
  color: #676879;
  margin-bottom: 24px;
  stroke-width: 1.5;
}

.team-placeholder h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #2c3e50;
  margin: 0 0 20px 0;
}

.team-placeholder p {
  font-size: 1rem;
  color: #676879;
  margin: 0 0 16px 0;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 20px auto;
  display: inline-block;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1rem;
  color: #676879;
  margin-bottom: 12px;
  justify-content: flex-start;
}

.feature-list li i {
  width: 20px;
  height: 20px;
  color: #4a90e2;
  stroke-width: 2;
  flex-shrink: 0;
}

.team-placeholder .placeholder-hint {
  font-size: 0.9rem;
  color: #999;
  font-style: italic;
  margin-top: 24px;
}

