/* ═══════════════════════════════════════════════════════
   IT TEAM SCRUM BOARD STYLES
   AliceDashboard - Light Theme
   ═══════════════════════════════════════════════════════ */

/* ── Board Container ── */
.board-container {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 0 4px 16px 4px;
  min-height: 60vh;
  align-items: flex-start;
}

.board-container::-webkit-scrollbar {
  height: 8px;
}
.board-container::-webkit-scrollbar-track {
  background: transparent;
}
.board-container::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 4px;
}

/* ── Column ── */
.board-column {
  flex: 0 0 280px;
  min-width: 280px;
  max-width: 320px;
  background: #f9fafb;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 240px);
}

.board-column.wip-exceeded {
  border-color: #f59e0b;
  background: #fffbeb;
}

.column-header {
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  border-radius: 12px 12px 0 0;
  position: sticky;
  top: 0;
  z-index: 2;
}

.column-title {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  display: flex;
  align-items: center;
  gap: 8px;
}

.column-count {
  background: #e5e7eb;
  color: #6b7280;
  font-size: 12px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 10px;
}

.column-wip {
  font-size: 11px;
  color: #9ca3af;
  margin-left: auto;
}

.column-wip.exceeded {
  color: #f59e0b;
  font-weight: 600;
}

.column-body {
  padding: 8px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.column-body::-webkit-scrollbar {
  width: 6px;
}
.column-body::-webkit-scrollbar-track {
  background: transparent;
}
.column-body::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

.add-card-btn {
  padding: 8px 12px;
  border: 1px dashed #d1d5db;
  border-radius: 8px;
  color: #6b7280;
  font-size: 13px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  background: transparent;
  width: 100%;
}

.add-card-btn:hover {
  border-color: #6366f1;
  color: #6366f1;
  background: #eef2ff;
}

/* ── Card ── */
.board-card {
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.board-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border-color: #c7c7c7;
  transform: translateY(-1px);
}

.board-card.dragging {
  opacity: 0.5;
  transform: rotate(2deg);
}

/* Priority border colors */
.board-card.priority-urgent { border-left: 3px solid #ef4444; }
.board-card.priority-high { border-left: 3px solid #f59e0b; }
.board-card.priority-medium { border-left: 3px solid #3b82f6; }
.board-card.priority-low { border-left: 3px solid #10b981; }

.card-permission-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 600;
}

.card-permission-public { background: #d1fae5; color: #065f46; }
.card-permission-internal { background: #dbeafe; color: #1e40af; }
.card-permission-confidential { background: #fef3c7; color: #92400e; }
.card-permission-restricted { background: #fee2e2; color: #991b1b; }

.card-title {
  font-size: 13px;
  font-weight: 500;
  color: #1f2937;
  margin-bottom: 8px;
  line-height: 1.4;
  padding-right: 50px;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.card-tag {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  background: #f3f4f6;
  color: #6b7280;
}

.card-due {
  font-size: 11px;
  color: #9ca3af;
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-due.overdue {
  color: #ef4444;
  font-weight: 500;
}

.card-points {
  font-size: 11px;
  font-weight: 600;
  color: #6366f1;
  background: #eef2ff;
  padding: 2px 8px;
  border-radius: 10px;
}

.card-assignee {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #6366f1;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  margin-left: auto;
}

.card-importance {
  display: flex;
  gap: 2px;
}

.importance-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d1d5db;
}
.importance-dot.active {
  background: #6366f1;
}

.card-resource-icon {
  font-size: 16px;
  margin-right: 4px;
}

/* ── Card Detail Modal ── */
.card-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.card-modal {
  background: white;
  border-radius: 16px;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.card-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.card-modal-body {
  padding: 20px 24px;
}

.card-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* ── Thread ── */
.thread-list {
  max-height: 300px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.thread-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: #f9fafb;
  border-radius: 8px;
}

.thread-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #6366f1;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.thread-avatar.agent {
  background: #8b5cf6;
}

.thread-content {
  flex: 1;
}

.thread-author {
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
}

.thread-time {
  font-size: 11px;
  color: #9ca3af;
  margin-left: 8px;
}

.thread-text {
  font-size: 13px;
  color: #4b5563;
  margin-top: 4px;
  line-height: 1.5;
}

.thread-change {
  font-size: 11px;
  color: #6366f1;
  margin-top: 4px;
  font-style: italic;
}

.thread-input {
  display: flex;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
  margin-top: 12px;
}

.thread-input textarea {
  flex: 1;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  resize: vertical;
  min-height: 60px;
  font-family: inherit;
}

.thread-input textarea:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}

/* ── Project Selector ── */
.project-selector {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px 24px;
  background: white;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  margin-bottom: 16px;
}

.project-selector label {
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
}

.project-selector select {
  padding: 8px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  color: #1f2937;
  background: white;
  cursor: pointer;
  min-width: 200px;
}

.project-selector select:focus {
  outline: none;
  border-color: #6366f1;
}

/* ── Tabs ── */
.board-tabs {
  display: flex;
  gap: 4px;
  padding: 0 4px;
  margin-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.board-tab {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  border: none;
  background: transparent;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  position: relative;
  top: 1px;
}

.board-tab:hover {
  color: #4b5563;
}

.board-tab.active {
  color: #6366f1;
  border-bottom-color: #6366f1;
}

.board-tab .badge {
  margin-left: 6px;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 8px;
  background: #e5e7eb;
  color: #6b7280;
}

/* ── Supervisor Panel ── */
.supervisor-panel {
  position: fixed;
  right: 0;
  top: 64px;
  bottom: 0;
  width: 380px;
  background: white;
  border-left: 1px solid #e5e7eb;
  box-shadow: -4px 0 20px rgba(0,0,0,0.05);
  z-index: 100;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.supervisor-panel.open {
  transform: translateX(0);
}

.supervisor-panel-toggle {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #6366f1;
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(99,102,241,0.3);
  z-index: 101;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.supervisor-panel-toggle:hover {
  background: #4f46e5;
}

/* ── Resource Card Specifics ── */
.resource-card .card-url {
  font-size: 12px;
  color: #6366f1;
  text-decoration: none;
  word-break: break-all;
}

.resource-card .card-url:hover {
  text-decoration: underline;
}

.resource-card .card-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 12px;
  color: #6b7280;
}

/* ── Story Card (Roadmap) ── */
.story-card {
  border-left: 3px solid #8b5cf6;
}

.story-card .story-progress {
  height: 4px;
  background: #e5e7eb;
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}

.story-card .story-progress-bar {
  height: 100%;
  background: #8b5cf6;
  border-radius: 2px;
  transition: width 0.3s;
}

/* ── Drag & Drop ── */
.kanban-drop-zone {
  background: #eef2ff !important;
  border-color: #6366f1 !important;
}

.kanban-drop-zone .column-body {
  border: 2px dashed #6366f1;
  border-radius: 8px;
  margin: 4px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .board-container {
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
  }
  
  .board-column {
    flex: 1 1 auto;
    max-width: 100%;
    min-width: auto;
  }
  
  .supervisor-panel {
    width: 100%;
  }
  
  .project-selector {
    flex-direction: column;
    align-items: stretch;
  }
  
  .project-selector select {
    width: 100%;
  }
}

/* ── Animations ── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.board-card {
  animation: fadeIn 0.2s ease;
}

/* ── Stats Row ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.stat-card {
  background: white;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  padding: 16px;
  text-align: center;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
}

.stat-label {
  font-size: 12px;
  color: #6b7280;
  margin-top: 4px;
}

.stat-card .stat-icon {
  font-size: 20px;
  margin-bottom: 4px;
}

/* ── Sprint Header (Roadmap) ── */
.sprint-header {
  padding: 8px 12px;
  background: #f3f4f6;
  border-radius: 8px 8px 0 0;
  border-bottom: 1px solid #e5e7eb;
}

.sprint-header .sprint-dates {
  font-size: 11px;
  color: #9ca3af;
}

.sprint-header .sprint-goal {
  font-size: 12px;
  color: #4b5563;
  margin-top: 2px;
}

/* ── Empty State ── */
.empty-column {
  text-align: center;
  padding: 32px 16px;
  color: #9ca3af;
  font-size: 13px;
}

.empty-column .icon {
  font-size: 32px;
  margin-bottom: 8px;
  opacity: 0.5;
}

/* ── Form Elements in Modal ── */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  color: #1f2937;
  background: white;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 480px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ── Tag Input ── */
.tag-input-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  min-height: 42px;
  align-items: center;
}

.tag-input-container:focus-within {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: #eef2ff;
  color: #6366f1;
  border-radius: 12px;
  font-size: 12px;
}

.tag-chip .remove {
  cursor: pointer;
  font-weight: 600;
}

.tag-chip .remove:hover {
  color: #ef4444;
}

.tag-input-container input {
  border: none;
  outline: none;
  flex: 1;
  min-width: 80px;
  padding: 4px;
  font-size: 13px;
}

/* ── Activity Log ── */
.activity-log {
  max-height: 200px;
  overflow-y: auto;
}

.activity-item {
  display: flex;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 12px;
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d1d5db;
  margin-top: 4px;
  flex-shrink: 0;
}

.activity-dot.created { background: #10b981; }
.activity-dot.moved { background: #3b82f6; }
.activity-dot.assigned { background: #8b5cf6; }
.activity-dot.commented { background: #6366f1; }
.activity-dot.archived { background: #ef4444; }

.activity-text {
  color: #4b5563;
  flex: 1;
}

.activity-time {
  color: #9ca3af;
  font-size: 11px;
  flex-shrink: 0;
}
