/* Unified Board Page Styles - Trello Pro Clone */

.board-container.unified-board {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 60px);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.board-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background: rgba(0,0,0,0.15);
  backdrop-filter: blur(10px);
  flex-shrink: 0;
}

.board-header-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.board-header-left h1 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: white;
}

.board-stats {
  display: flex;
  gap: 1rem;
}

.board-stats .stat {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.1);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.board-stats .stat.overdue {
  background: rgba(239, 68, 68, 0.3);
  color: #fecaca;
}

.board-header-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.quick-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.quick-filter-btn {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border: none;
  border-radius: 12px;
  background: rgba(255,255,255,0.2);
  color: white;
  cursor: pointer;
  transition: all 0.2s;
  border-left: 3px solid var(--client-color, #fff);
}

.quick-filter-btn:hover {
  background: rgba(255,255,255,0.3);
}

.quick-filter-btn.active {
  background: var(--client-color, #fff);
  color: white;
}

.quick-filter-btn.more {
  background: rgba(255,255,255,0.1);
  border-left: none;
}

.board-header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.board-header-right .form-control,
.board-header-right .form-select {
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  font-size: 0.875rem;
  padding: 0.375rem 0.75rem;
}

.board-header-right .form-control option {
  background: #1e293b;
  color: white;
}

.view-toggles {
  display: flex;
  background: rgba(255,255,255,0.1);
  border-radius: 6px;
  overflow: hidden;
}

.view-btn {
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  transition: all 0.2s;
}

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

.view-btn.active {
  background: rgba(255,255,255,0.2);
  color: white;
}

.board-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1.5rem;
  background: rgba(0,0,0,0.1);
}

.board-toolbar .form-control {
  background: rgba(255,255,255,0.9);
  border: none;
}

.active-filters {
  display: flex;
  gap: 0.5rem;
}

.active-filter {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  background: rgba(255,255,255,0.9);
  border-radius: 4px;
  cursor: pointer;
  color: #334155;
}

.active-filter:hover {
  background: white;
}

.board-wrapper {
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 1rem;
}

.board {
  display: flex;
  gap: 1rem;
  height: 100%;
  min-height: 0;
}

/* List Columns */
.board-list {
  flex-shrink: 0;
  width: 290px;
  background: rgba(255,255,255,0.95);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  max-height: 100%;
  transition: all 0.2s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  backdrop-filter: blur(10px);
}

.board-list.over-wip {
  box-shadow: 0 0 0 3px #ef4444, 0 4px 20px rgba(0,0,0,0.08);
}

.board-list-header {
  padding: 0.875rem 1rem;
  background: transparent;
  border-radius: 16px 16px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: #1e293b;
  font-size: 0.9rem;
}

.list-count {
  background: rgba(0,0,0,0.06);
  color: #64748b;
  font-size: 0.75rem;
  padding: 0.25rem 0.625rem;
  border-radius: 20px;
  font-weight: 500;
}

.list-count.over-wip {
  background: #ef4444;
  color: white;
}

.board-list-cards {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
  min-height: 50px;
  transition: background 0.2s;
}

.board-list-cards.drag-over {
  background: #d5d8dc;
}

.add-card-btn {
  padding: 0.75rem 1rem;
  margin: 0.5rem;
  background: rgba(0,0,0,0.03);
  border: none;
  color: #64748b;
  text-align: left;
  cursor: pointer;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.add-card-btn:hover {
  background: rgba(0,0,0,0.06);
  color: #334155;
}

/* Task Cards */
.board-card {
  background: white;
  border-radius: 12px;
  margin-bottom: 0.5rem;
  box-shadow: 0 2px 8px rgba(9,30,66,.1);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.board-card:hover {
  background: #fafbfc;
  box-shadow: 0 4px 12px rgba(9,30,66,.15);
  transform: translateY(-1px);
}

.board-card.dragging {
  opacity: 0.5;
  transform: rotate(2deg);
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.board-card.overdue {
  border-left: 3px solid #eb5a46;
}

.board-card.completed {
  opacity: 0.6;
}

.board-card.completed .card-title {
  text-decoration: line-through;
  color: #5e6c84;
}

.board-card.stale {
  opacity: 0.7;
  background: #fafafa;
}

.board-card.compact {
  padding: 0.375rem;
}

.board-card.compact .card-title {
  font-size: 0.75rem;
}

.board-card.compact .card-meta {
  font-size: 0.625rem;
}

.card-client-bar {
  height: 4px;
  width: 100%;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.5rem 0.5rem 0;
  gap: 0.5rem;
}

.card-client-label {
  font-size: 0.65rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.01em;
}

.card-client-label:hover {
  opacity: 0.85;
  transform: scale(1.02);
}

.priority-badge {
  font-size: 0.65rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-weight: 700;
  color: white;
}

.priority-badge.urgent {
  background: #eb5a46;
}

.priority-badge.high {
  background: #ff9f1a;
}

.priority-badge.medium {
  background: #f2d600;
  color: #172b4d;
}

.card-title {
  font-size: 0.875rem;
  color: #172b4d;
  padding: 0.25rem 0.5rem;
  line-height: 1.4;
  word-break: break-word;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.375rem 0.5rem;
  font-size: 0.75rem;
  color: #5e6c84;
}

.card-due {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

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

.checklist-badge {
  background: #dfe1e6;
  padding: 0.125rem 0.375rem;
  border-radius: 3px;
}

.checklist-badge.complete {
  background: #61bd4f;
  color: white;
}

.card-footer {
  padding: 0.375rem 0.5rem;
  display: flex;
  justify-content: flex-end;
}

.assignee-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #dfe1e6;
  color: #5e6c84;
  font-size: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

/* Swimlanes */
.swimlanes {
  display: flex;
  flex-direction: column;
  min-width: fit-content;
}

.swimlane-header-row {
  display: flex;
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(0,0,0,0.1);
}

.swimlane-label-cell {
  width: 180px;
  flex-shrink: 0;
}

.swimlane-column-header {
  width: 250px;
  flex-shrink: 0;
  padding: 0.5rem;
  text-align: center;
  font-weight: 600;
  color: white;
  font-size: 0.875rem;
}

.swimlane-row {
  display: flex;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.swimlane-label {
  width: 180px;
  flex-shrink: 0;
  padding: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-weight: 500;
  color: #172b4d;
  background: #ebecf0;
  position: sticky;
  left: 0;
  z-index: 5;
}

.swimlane-count {
  font-size: 0.75rem;
  background: rgba(0,0,0,0.1);
  padding: 0.125rem 0.5rem;
  border-radius: 10px;
}

.swimlane-cell {
  width: 250px;
  flex-shrink: 0;
  min-height: 80px;
  padding: 0.5rem;
  background: rgba(255,255,255,0.1);
  border-right: 1px solid rgba(255,255,255,0.05);
  transition: background 0.2s;
}

.swimlane-cell.drag-over {
  background: rgba(255,255,255,0.2);
}

/* Calendar View */
.calendar-view {
  padding: 1rem;
  overflow: auto;
}

.calendar-header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.calendar-header h2 {
  margin: 0;
  color: white;
  font-weight: 500;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.2);
  border-radius: 8px;
  overflow: hidden;
}

.calendar-day-header {
  padding: 0.5rem;
  text-align: center;
  font-weight: 600;
  color: white;
  background: rgba(0,0,0,0.2);
  font-size: 0.75rem;
}

.calendar-cell {
  background: white;
  min-height: 100px;
  padding: 0.25rem;
}

.calendar-cell.empty {
  background: #f1f5f9;
}

.calendar-cell.today {
  background: #eff6ff;
}

.calendar-cell.has-tasks {
  background: #f0fdf4;
}

.calendar-date {
  font-weight: 600;
  color: #64748b;
  font-size: 0.875rem;
  padding: 0.25rem;
}

.calendar-cell.today .calendar-date {
  background: #3b82f6;
  color: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calendar-tasks {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.calendar-task {
  font-size: 0.625rem;
  padding: 0.25rem;
  background: #f1f5f9;
  border-radius: 2px;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-task:hover {
  background: #e2e8f0;
}

.calendar-more {
  font-size: 0.625rem;
  color: #64748b;
  text-align: center;
}

/* Task Detail Modal */
.modal-large .modal-content {
  max-width: 900px;
  max-height: 90vh;
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.task-detail {
  display: flex;
  flex-direction: column;
}

.task-detail .modal-header {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(to bottom, #f8fafc, #fff);
}

.task-detail .modal-title {
  font-size: 1.25rem;
  font-weight: 600;
}

.task-detail-body {
  display: flex;
  gap: 1.5rem;
  overflow: hidden;
  flex: 1;
  padding: 1rem 0;
}

.task-detail-main {
  flex: 1;
  overflow-y: auto;
  padding-right: 1rem;
}

.task-detail-sidebar {
  width: 220px;
  flex-shrink: 0;
  border-left: 1px solid #e2e8f0;
  padding-left: 1.5rem;
  overflow-y: auto;
}

.task-section {
  margin-bottom: 1.5rem;
}

.task-section h4 {
  font-size: 0.75rem;
  font-weight: 600;
  color: #5e6c84;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.task-description-container {
  position: relative;
}

.task-description {
  color: #172b4d;
  line-height: 1.6;
  min-height: 60px;
  padding: 0.75rem;
  border-radius: 6px;
  background: #f8f9fa;
  cursor: pointer;
  transition: background 0.15s;
}

.task-description:hover {
  background: #f1f3f4;
}

.task-description.rendered-markdown {
  overflow-wrap: break-word;
}

/* Markdown rendered content styles */
.task-description.rendered-markdown h1,
.task-description.rendered-markdown h2,
.task-description.rendered-markdown h3,
.task-description.rendered-markdown h4 {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #172b4d;
}

.task-description.rendered-markdown h2 {
  font-size: 1.25rem;
  border-bottom: 1px solid #dfe1e6;
  padding-bottom: 0.375rem;
}

.task-description.rendered-markdown h3 {
  font-size: 1.1rem;
}

.task-description.rendered-markdown h4 {
  font-size: 0.95rem;
  color: #5e6c84;
}

.task-description.rendered-markdown p {
  margin-bottom: 0.75rem;
}

.task-description.rendered-markdown ul,
.task-description.rendered-markdown ol {
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
}

.task-description.rendered-markdown li {
  margin-bottom: 0.25rem;
}

.task-description.rendered-markdown strong {
  font-weight: 600;
}

.task-description.rendered-markdown em {
  font-style: italic;
}

.task-description.rendered-markdown code {
  background: #e4e6eb;
  padding: 0.125rem 0.375rem;
  border-radius: 3px;
  font-size: 0.875em;
  font-family: 'Monaco', 'Consolas', monospace;
}

.task-description.rendered-markdown pre {
  background: #263238;
  color: #eeffff;
  padding: 0.75rem;
  border-radius: 6px;
  overflow-x: auto;
  margin-bottom: 0.75rem;
}

.task-description.rendered-markdown pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

.task-description.rendered-markdown blockquote {
  border-left: 3px solid #0079bf;
  padding-left: 0.75rem;
  margin: 0.75rem 0;
  color: #5e6c84;
}

.task-description.rendered-markdown hr {
  border: none;
  border-top: 1px solid #dfe1e6;
  margin: 1rem 0;
}

.task-description.rendered-markdown a {
  color: #0079bf;
  text-decoration: none;
}

.task-description.rendered-markdown a:hover {
  text-decoration: underline;
}

/* Edit mode */
.task-description-edit textarea {
  width: 100%;
  font-family: 'Monaco', 'Consolas', monospace;
  font-size: 0.875rem;
  line-height: 1.5;
  resize: vertical;
}

.desc-edit-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* Checklist */
.checklist-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0;
  cursor: pointer;
}

.checklist-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.checklist-item input:checked + span {
  text-decoration: line-through;
  color: #5e6c84;
}

.add-checklist-item {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.add-checklist-item input {
  flex: 1;
}

/* Time entries */
.task-time-actions {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.task-time-entries {
  max-height: 150px;
  overflow-y: auto;
  font-size: 0.875rem;
}

.time-entry-row {
  display: flex;
  gap: 0.75rem;
  padding: 0.375rem 0;
  border-bottom: 1px solid #f1f5f9;
}

.te-date { color: #5e6c84; min-width: 70px; }
.te-hours { font-weight: 500; min-width: 40px; }
.te-user { color: #0079bf; min-width: 80px; }
.te-desc { color: #5e6c84; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Comments */
.task-comments {
  max-height: 250px;
  overflow-y: auto;
}

.comment {
  padding: 0.75rem;
  background: #f4f5f7;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.comment strong { color: #172b4d; }
.comment-date { font-size: 0.75rem; color: #5e6c84; margin-left: 0.5rem; }
.comment p { margin: 0.5rem 0 0; color: #172b4d; }

.comment-form {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.comment-form textarea { flex: 1; }

/* Sidebar */
.sidebar-section {
  margin-bottom: 1rem;
}

.sidebar-section label {
  display: block;
  font-size: 0.625rem;
  font-weight: 600;
  color: #5e6c84;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sidebar-section p {
  margin: 0;
  color: #172b4d;
  font-size: 0.875rem;
}

.sidebar-section .form-control {
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
  background: #f8fafc;
}

.sidebar-section .form-control:hover {
  border-color: #cbd5e1;
  background: #fff;
}

.sidebar-section .form-control:focus {
  border-color: #3b82f6;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  outline: none;
}

.sidebar-section.actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

.sidebar-section.actions .btn {
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.sidebar-section.actions .btn-outline {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
}

.sidebar-section.actions .btn-outline:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.sidebar-section.actions .btn-danger {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
}

.sidebar-section.actions .btn-danger:hover {
  background: #fee2e2;
  border-color: #fca5a5;
}

/* Manage Lists */
.manage-lists {
  max-height: 400px;
  overflow-y: auto;
}

.manage-list-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border-bottom: 1px solid #f1f5f9;
}

.manage-list-item input[type="color"] {
  width: 32px;
  height: 32px;
  border: none;
  cursor: pointer;
  border-radius: 4px;
}

.manage-list-item input[type="text"] {
  flex: 1;
}

/* Checkbox label */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

/* Utility */
.text-muted { color: #5e6c84; }

/* Pull to Refresh */
.pull-to-refresh-indicator {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateY(-100%);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 1rem 2rem;
  border-radius: 0 0 20px 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 9999;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: #334155;
  font-weight: 500;
  font-size: 0.875rem;
}

.pull-to-refresh-indicator.visible {
  transform: translateX(-50%) translateY(0);
}

.pull-to-refresh-indicator.refreshing {
  transform: translateX(-50%) translateY(0);
}

.ptr-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #e2e8f0;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: ptr-spin 0.8s linear infinite;
}

.ptr-arrow {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
  color: #3b82f6;
}

.ptr-arrow.rotate {
  transform: rotate(180deg);
}

@keyframes ptr-spin {
  to { transform: rotate(360deg); }
}

/* Responsive Styles */

/* Tablet: 768px - 1024px */
@media (max-width: 1024px) and (min-width: 769px) {
  .board-header {
    padding: 0.75rem 1rem;
  }

  .board-header-left h1 {
    font-size: 1.1rem;
  }

  .board-stats {
    gap: 0.75rem;
  }

  .board-list {
    width: 270px;
  }

  .swimlane-label-cell {
    width: 150px;
  }

  .swimlane-column-header,
  .swimlane-cell {
    width: 220px;
  }

  .modal-large .modal-content {
    max-width: 700px;
  }

  .task-detail-sidebar {
    width: 200px;
  }
}

/* Mobile: Under 768px */
@media (max-width: 768px) {
  /* Prevent iOS zoom on inputs - 16px minimum */
  .form-control,
  .form-select,
  input,
  textarea,
  select {
    font-size: 16px !important;
  }

  /* Touch targets - 44px minimum height */
  .btn,
  .quick-filter-btn,
  .view-btn,
  .add-card-btn,
  .modal-close,
  button {
    min-height: 44px;
    padding: 0.625rem 1rem;
  }

  .board-card {
    min-height: 44px;
    padding: 0.5rem;
  }

  /* Header stacks vertically */
  .board-header {
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.75rem;
  }

  .board-header-left {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .board-header-left h1 {
    font-size: 1.125rem;
  }

  .board-stats {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .board-header-center {
    order: 3;
    width: 100%;
  }

  .board-header-right {
    width: 100%;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .quick-filters {
    justify-content: flex-start;
    overflow-x: auto;
    width: 100%;
    -webkit-overflow-scrolling: touch;
  }

  .quick-filter-btn {
    flex-shrink: 0;
    white-space: nowrap;
  }

  .board-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding: 0.75rem;
  }

  .board-toolbar .form-control {
    max-width: 100% !important;
    width: 100%;
  }

  .active-filters {
    flex-wrap: wrap;
  }

  /* Stack columns vertically on mobile */
  .board-wrapper {
    overflow-x: visible;
    overflow-y: auto;
  }

  .board {
    flex-direction: column;
    gap: 1rem;
    padding: 0.5rem;
  }

  .board-list {
    width: 100%;
    max-width: none;
  }

  .board-list-header {
    min-height: 44px;
    padding: 0.75rem 1rem;
  }

  .board-list-cards {
    max-height: 400px;
    overflow-y: auto;
  }

  /* Card improvements for mobile */
  .card-header {
    padding: 0.5rem;
  }

  .card-title {
    font-size: 0.9375rem;
    padding: 0.5rem;
  }

  .card-meta {
    padding: 0.5rem;
    font-size: 0.8125rem;
  }

  .card-client-label {
    font-size: 0.75rem;
    padding: 0.375rem 0.625rem;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
  }

  .priority-badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.625rem;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
  }

  /* Swimlanes on mobile */
  .swimlane-header-row {
    flex-direction: column;
  }

  .swimlane-label-cell {
    width: 100%;
  }

  .swimlane-column-header {
    width: 100%;
  }

  .swimlane-row {
    flex-direction: column;
  }

  .swimlane-label {
    width: 100%;
    position: static;
  }

  .swimlane-cell {
    width: 100%;
  }

  /* Calendar view mobile */
  .calendar-grid {
    gap: 2px;
  }

  .calendar-cell {
    min-height: 80px;
    padding: 0.25rem;
  }

  .calendar-task {
    font-size: 0.6875rem;
  }

  .calendar-day-header {
    font-size: 0.6875rem;
    padding: 0.375rem;
  }

  /* Modal improvements */
  .modal-content {
    width: calc(100vw - 1rem);
    max-width: calc(100vw - 1rem);
    margin: 0.5rem;
    max-height: calc(100vh - 1rem);
  }

  .modal-large .modal-content {
    max-width: calc(100vw - 1rem);
  }

  .modal-header {
    padding: 1rem;
  }

  .modal-title {
    font-size: 1.125rem;
  }

  .modal-close {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .task-detail-body {
    flex-direction: column;
    padding: 0.75rem;
  }

  .task-detail-main {
    padding-right: 0;
  }

  .task-detail-sidebar {
    width: 100%;
    border-left: none;
    border-top: 1px solid #e2e8f0;
    padding-left: 0;
    padding-top: 1rem;
    margin-top: 1rem;
  }

  /* Form improvements */
  .form-row {
    flex-direction: column;
  }

  .form-group {
    width: 100%;
  }

  .modal-actions {
    flex-direction: column-reverse;
    gap: 0.5rem;
  }

  .modal-actions .btn {
    width: 100%;
  }

  /* Checklist */
  .checklist-item {
    min-height: 44px;
    padding: 0.5rem 0;
  }

  .checklist-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
  }

  /* View toggles */
  .view-toggles {
    width: 100%;
  }

  .view-btn {
    flex: 1;
    min-height: 44px;
  }

  /* Settings */
  .manage-list-item {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .manage-list-item input[type="text"] {
    flex: 1 1 100%;
  }

  .manage-list-item input[type="color"] {
    width: 44px;
    height: 44px;
  }

  .manage-list-item input[type="number"] {
    width: 80px !important;
  }
}

/* Small mobile: Under 480px */
@media (max-width: 480px) {
  .board-header-left h1 {
    font-size: 1rem;
  }

  .board-stats .stat {
    font-size: 0.6875rem;
    padding: 0.25rem 0.375rem;
  }

  .quick-filter-btn {
    font-size: 0.6875rem;
    padding: 0.375rem 0.625rem;
  }

  .card-title {
    font-size: 0.875rem;
  }

  .card-meta {
    font-size: 0.75rem;
  }

  .assignee-avatar {
    width: 28px;
    height: 28px;
  }
}
