/* ===========================
   Modern Kanban Board Styles
   =========================== */

/* ===========================
   Variables & Base Styles
   =========================== */
:root {
  --primary-color: #0969da;
  --primary-hover: #0860ca;
  --secondary-color: #6c757d;
  --danger-color: #dc3545;
  --danger-hover: #cf222e;
  
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #f6f8fa;
  
  --text-primary: #212529;
  --text-secondary: #6c757d;
  --text-muted: #8b949e;
  
  --border-color: #e1e4e8;
  --border-color-light: #f1f3f5;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.12);
  
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  
  --transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ===========================
   Boards Index Page
   =========================== */
.boards-index,
.boards-new,
.boards-edit {
  padding: 30px 40px;
  background: var(--bg-secondary);
  min-height: calc(100vh - 76px);
}

/* Flash messages on boards pages */
body:has(.boards-index) .container-fluid:has(.alert),
body:has(.boards-new) .container-fluid:has(.alert),
body:has(.boards-edit) .container-fluid:has(.alert),
body:has(.board-show) .container-fluid:has(.alert) {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 1000;
}

body:has(.boards-index) .alert,
body:has(.boards-new) .alert,
body:has(.boards-edit) .alert,
body:has(.board-show) .alert {
  margin: 1rem 0;
}

/* Navbar styles for boards pages */
body:has(.boards-index) .navbar,
body:has(.boards-new) .navbar,
body:has(.boards-edit) .navbar,
body:has(.board-show) .navbar {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  border-bottom: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

body:has(.boards-index) .navbar-brand,
body:has(.boards-new) .navbar-brand,
body:has(.boards-edit) .navbar-brand,
body:has(.board-show) .navbar-brand {
  color: white !important;
}

body:has(.boards-index) .navbar-brand:hover,
body:has(.boards-new) .navbar-brand:hover,
body:has(.boards-edit) .navbar-brand:hover,
body:has(.board-show) .navbar-brand:hover {
  color: rgba(255, 255, 255, 0.8) !important;
}

body:has(.boards-index) .navbar-text,
body:has(.boards-new) .navbar-text,
body:has(.boards-edit) .navbar-text,
body:has(.board-show) .navbar-text {
  color: rgba(255, 255, 255, 0.9) !important;
}

body:has(.boards-index) .nav-link,
body:has(.boards-new) .nav-link,
body:has(.boards-edit) .nav-link,
body:has(.board-show) .nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
}

body:has(.boards-index) .nav-link:hover,
body:has(.boards-new) .nav-link:hover,
body:has(.boards-edit) .nav-link:hover,
body:has(.board-show) .nav-link:hover {
  color: white !important;
}

body:has(.boards-index) .btn-outline-secondary,
body:has(.boards-new) .btn-outline-secondary,
body:has(.boards-edit) .btn-outline-secondary,
body:has(.board-show) .btn-outline-secondary {
  color: white;
  border-color: rgba(255, 255, 255, 0.7);
  background-color: transparent;
}

body:has(.boards-index) .btn-outline-secondary:hover,
body:has(.boards-new) .btn-outline-secondary:hover,
body:has(.boards-edit) .btn-outline-secondary:hover,
body:has(.board-show) .btn-outline-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: white;
  color: white;
}

body:has(.boards-index) .navbar .btn-primary,
body:has(.boards-new) .navbar .btn-primary,
body:has(.boards-edit) .navbar .btn-primary,
body:has(.board-show) .navbar .btn-primary {
  background-color: rgba(255, 255, 255, 0.2);
  border: 1px solid white;
  color: white;
}

body:has(.boards-index) .navbar .btn-primary:hover,
body:has(.boards-new) .navbar .btn-primary:hover,
body:has(.boards-edit) .navbar .btn-primary:hover,
body:has(.board-show) .navbar .btn-primary:hover {
  background-color: white;
  color: #667eea;
}

.boards-index .header,
.boards-new .header,
.boards-edit .header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  background: var(--bg-primary);
  padding: 24px 40px;
  margin: -30px -40px 30px -40px;
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.boards-index h1,
.boards-new h1,
.boards-edit h1 {
  color: var(--text-primary);
  font-size: 1.875rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.5px;
}

.boards-index .header p,
.boards-new .header p,
.boards-edit .header p {
  color: var(--text-secondary);
  font-size: 1rem;
  margin: 8px 0 0 0;
}

.boards-index .header .btn-primary,
.boards-new .header .btn-primary,
.boards-edit .header .btn-primary {
  background-color: var(--primary-color);
  color: white;
  border: none;
  font-weight: 600;
}

.boards-index .header .btn-primary:hover,
.boards-new .header .btn-primary:hover,
.boards-edit .header .btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Secondary button in header */
.boards-new .header .btn-secondary,
.boards-edit .header .btn-secondary {
  background-color: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  font-weight: 500;
  font-size: 0.938rem;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.boards-new .header .btn-secondary:hover,
.boards-edit .header .btn-secondary:hover {
  background-color: var(--bg-secondary);
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

/* Form Container */
.boards-new .form-container,
.boards-edit .form-container {
  max-width: 800px;
  margin: 0 auto;
  background: var(--bg-primary);
  padding: 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

/* Top gradient bar like board-card */
.boards-new .form-container::before,
.boards-edit .form-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  opacity: 1;
}

/* Hover effect */
.boards-new .form-container:hover,
.boards-edit .form-container:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #d1d5da;
}

/* Form Elements */
.board-form-content .form-group {
  margin-bottom: 24px;
}

.board-form-content .form-label {
  display: block;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  font-size: 0.938rem;
}

.board-form-content .form-control {
  width: 100%;
  padding: 10px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  transition: var(--transition);
}

.board-form-content .form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.1);
}

.board-form-content textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

.board-form-content .form-actions {
  display: flex;
  gap: 12px;
  margin-top: 32px;
}

.board-form-content .btn {
  padding: 10px 24px;
  font-weight: 600;
  font-size: 0.938rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
}

.board-form-content .btn-primary {
  background-color: var(--primary-color);
  color: white;
  border: none;
}

.board-form-content .btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}

.board-form-content .btn-secondary {
  background-color: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.board-form-content .btn-secondary:hover {
  background-color: var(--bg-secondary);
  border-color: var(--text-secondary);
}

/* Board Grid */
.boards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 24px;
}

.board-card {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding-left: 24px;
  padding-top: 24px;
  padding-right: 24px;
  padding-bottom: 32px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
  height: 190px;
  display: flex;
  flex-direction: column;
}

.board-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  opacity: 1;
}

.board-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #d1d5da;
}

.board-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.board-card h3 {
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 8px 0;
  letter-spacing: -0.3px;
}

.board-card .description {
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 20px 0;
  font-size: 0.938rem;
}

.board-meta {
  display: flex;
  gap: 20px;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border-color-light);
}

.board-meta .meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.board-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  align-items: center;
}

.board-actions form {
  margin: 0;
  display: inline-block;
}

.board-actions button[type="submit"] {
  margin: 0;
}

/* Empty State */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.empty-state h3 {
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.empty-state p {
  color: var(--text-secondary);
  font-size: 1.063rem;
  margin-bottom: 24px;
}

/* ===========================
   Board Show Page (Kanban View)
   =========================== */
.board-show {
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
  overflow: hidden;
}

.board-header {
  background: var(--bg-primary);
  padding: 10px 40px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
}

.board-info {
  display: flex;
  align-items: flex-end;
  gap: 20px;
}

.board-info h1 {
  margin: 0;
  font-size: 1.875rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.board-description {
  margin: 0;
  color: var(--text-secondary);
  font-size: 1rem;
}

.board-actions {
  display: flex;
  gap: 12px;
}

.board-show .board-actions form {
  margin: 0;
  display: inline-block;
}

.board-show .board-actions button[type="submit"] {
  margin: 0;
}

/* ===========================
   Lists Container
   =========================== */
.lists-container {
  display: flex;
  gap: 20px;
  padding: 30px 40px;
  overflow-x: auto;
  overflow-y: hidden;
  flex: 1;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
}

/* ===========================
   List Styles
   =========================== */
.list {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  width: 380px;
  min-width: 380px;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 140px);
  transition: var(--transition);
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

.list:hover {
  box-shadow: var(--shadow-md);
}

.list.dragging {
  opacity: 0.4;
  transform: rotate(3deg) scale(0.98);
  cursor: grabbing;
  box-shadow: var(--shadow-lg);
}

/* List Header */
.list-header {
  padding: 16px 20px;
  border-bottom: 2px solid var(--border-color-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-primary);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.list-drag-handle {
  color: var(--text-muted);
  cursor: move;
  margin-right: 8px;
  font-size: 1rem;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.list:hover .list-drag-handle {
  opacity: 1;
}

.list-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  letter-spacing: -0.2px;
}

.list-name {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-count {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 0.813rem;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 500;
}

.list-actions {
  display: flex;
  gap: 8px;
}

.list-actions .btn {
  padding: 4px 8px;
  font-size: 0.813rem;
}

/* List Content */
.list-content {
  padding: 16px;
  flex: 1;
  overflow-y: auto;
  min-height: 100px;
  max-height: calc(100vh - 280px);
}

/* ===========================
   Card Styles
   =========================== */
.card-item {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.card-item:last-child {
  margin-bottom: 0;
}

.card-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: #d1d5da;
}

.card-item.dragging {
  opacity: 0.4;
  transform: rotate(3deg) scale(0.95);
  cursor: grabbing;
  box-shadow: var(--shadow-lg);
}

.card-delete-btn {
  position: absolute;
  right: 8px;
  top: 8px;
  background: transparent;
  border: none;
  color: #6c757d;
  font-size: 1.5rem;
  line-height: 1;
  width: 28px;
  height: 28px;
  padding: 0;
  cursor: pointer;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

.card-item:hover .card-delete-btn {
  opacity: 0.7;
}

.card-delete-btn:hover {
  opacity: 1 !important;
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
}

.card-drag-handle {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.875rem;
  cursor: move;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.card-item:hover .card-drag-handle {
  opacity: 0.7;
}

.card-content {
  padding-left: 24px;
}

.card-title {
  font-size: 0.938rem;
  color: var(--text-primary);
  margin: 0 0 8px 0;
  font-weight: 500;
  word-wrap: break-word;
  line-height: 1.4;
  letter-spacing: -0.1px;
}

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

/* Priority Badges */
.priority-badge {
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.priority-low {
  background-color: #d1f4dd;
  color: #1a7f37;
}

.priority-medium {
  background-color: #fff8c5;
  color: #9a6700;
}

.priority-high {
  background-color: #ffebe9;
  color: #cf222e;
}

/* Color Labels */
.color-label {
  width: 40px;
  height: 6px;
  border-radius: 3px;
  margin-right: 4px;
}

.color-label.red { background-color: #dc3545; }
.color-label.yellow { background-color: #ffc107; }
.color-label.green { background-color: #28a745; }
.color-label.blue { background-color: #007bff; }
.color-label.purple { background-color: #6f42c1; }

/* Due Date */
.due-date {
  font-size: 0.813rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.due-date.overdue {
  color: var(--danger-color);
  font-weight: 600;
}

.due-date.due-soon {
  color: #9a6700;
  font-weight: 600;
}

/* ===========================
   Add Card Section
   =========================== */
.add-card-section {
  padding: 12px;
}

.add-card-button button.btn-primary {
  width: 100%;
  text-align: center;
  padding: 10px 16px;
  background-color: var(--primary-color) !important;
  border: none !important;
  color: white !important;
  font-size: 0.938rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border-radius: var(--radius-sm);
}

.add-card-button button.btn-primary:hover {
  background-color: var(--primary-hover) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  color: white !important;
}

.add-card-form {
  background: var(--bg-tertiary);
  padding: 12px;
  border-radius: var(--radius-md);
  margin-top: 8px;
}

.new-card-form .form-group {
  margin-bottom: 12px;
}

.new-card-form textarea {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.938rem;
  resize: vertical;
  transition: var(--transition);
}

.new-card-form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.1);
}

.form-actions {
  display: flex;
  gap: 8px;
}

/* ===========================
   Add List Form
   =========================== */
.add-list-form {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  width: 380px;
  min-width: 380px;
  max-width: 380px;
  padding: 20px;
  border: 1px solid var(--border-color);
  transition: var(--transition);
  flex-shrink: 0;
}

.add-list-form:hover {
  box-shadow: var(--shadow-md);
}

.add-list-form .list-header {
  padding: 0 0 16px 0;
  border-bottom: 2px solid var(--border-color-light);
  background: transparent;
}

.add-list-form h3 {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 0;
  font-weight: 600;
}

.new-list-form .form-group {
  margin-bottom: 16px;
}

.new-list-form input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.938rem;
  transition: var(--transition);
}

.new-list-form input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.1);
}

/* ===========================
   Button Styles
   =========================== */
.btn {
  border-radius: var(--radius-sm);
  font-weight: 500;
  transition: var(--transition);
  border: none;
  padding: 8px 16px;
  font-size: 0.938rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.2);
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(9, 105, 218, 0.25);
}

.btn-secondary {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid #d1d9e0;
}

.btn-secondary:hover {
  background-color: #f3f4f6;
  border-color: #c5ccd5;
  transform: translateY(-1px);
}

.btn-danger {
  background-color: var(--danger-color);
  color: white;
}

.btn-danger:hover {
  background-color: var(--danger-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(220, 53, 69, 0.25);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.875rem;
}

/* ===========================
   Modal Styles
   =========================== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  padding: 20px;
  overflow-y: auto;
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-dialog {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* ===========================
   Form Elements
   =========================== */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.938rem;
}

.form-control {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.938rem;
  transition: var(--transition);
  background: var(--bg-primary);
  color: var(--text-primary);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.1);
}

select.form-control {
  cursor: pointer;
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

/* ===========================
   Drag & Drop Visual Feedback
   =========================== */
.drag-placeholder {
  background: var(--bg-tertiary);
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  height: 60px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.list.drag-over {
  background: rgba(9, 105, 218, 0.05);
  border-color: var(--primary-color);
}

.list-placeholder {
  background: var(--bg-tertiary);
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  min-width: 320px;
  max-width: 320px;
  height: 200px;
  opacity: 0.5;
}

/* ===========================
   Inline Edit Styles
   =========================== */
.inline-edit-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.inline-edit-form input {
  padding: 6px 10px;
  border: 1px solid var(--primary-color);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
}

.inline-edit-actions {
  display: flex;
  gap: 6px;
}

/* ===========================
   Scrollbar Styles
   =========================== */
.lists-container::-webkit-scrollbar {
  height: 10px;
}

.lists-container::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
  border-radius: 10px;
}

.lists-container::-webkit-scrollbar-thumb {
  background: #d1d5da;
  border-radius: 10px;
  border: 2px solid var(--bg-tertiary);
}

.lists-container::-webkit-scrollbar-thumb:hover {
  background: #afb8c1;
}

.list-content::-webkit-scrollbar {
  width: 8px;
}

.list-content::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
  border-radius: 8px;
}

.list-content::-webkit-scrollbar-thumb {
  background: #d1d5da;
  border-radius: 8px;
  border: 2px solid var(--bg-tertiary);
}

.list-content::-webkit-scrollbar-thumb:hover {
  background: #afb8c1;
}

/* ===========================
   Special List Styles
   =========================== */
.list[data-list-name="TODO"] .list-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.list[data-list-name="TODO"] .list-title,
.list[data-list-name="TODO"] .card-count {
  color: white;
}

.list[data-list-name="TODO"] .list-drag-handle {
  color: rgba(255, 255, 255, 0.8);
}

.list[data-list-name="In Progress"] .list-header {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
}

.list[data-list-name="In Progress"] .list-title,
.list[data-list-name="In Progress"] .card-count {
  color: white;
}

.list[data-list-name="In Progress"] .list-drag-handle {
  color: rgba(255, 255, 255, 0.8);
}

.list[data-list-name="Done"] .list-header {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
}

.list[data-list-name="Done"] .list-title,
.list[data-list-name="Done"] .card-count {
  color: white;
}

.list[data-list-name="Done"] .list-drag-handle {
  color: rgba(255, 255, 255, 0.8);
}

/* ===========================
   Loading States
   =========================== */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ===========================
   Accessibility
   =========================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus styles */
*:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* ===========================
   Responsive Design
   =========================== */
@media (max-width: 1280px) {
  .lists-container {
    justify-content: flex-start;
    padding: 20px;
  }
  
  .list,
  .add-list-form {
    width: 340px;
    min-width: 340px;
    max-width: 340px;
  }
}

@media (max-width: 1080px) {
  .list,
  .add-list-form {
    width: 300px;
    min-width: 300px;
    max-width: 300px;
  }
}

@media (max-width: 768px) {
  .boards-index {
    padding: 20px;
  }
  
  .boards-index .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    margin: -20px -20px 20px -20px;
  }
  
  .boards-index h1 {
    font-size: 1.5rem;
  }
  
  .boards-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .board-header {
    padding: 16px;
    flex-direction: column;
    align-items: flex-start;
  }
  
  .board-info {
    margin-bottom: 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .board-description {
    margin-top: 4px;
  }
  
  .lists-container {
    padding: 16px;
    gap: 16px;
    justify-content: flex-start;
  }
  
  .list,
  .add-list-form {
    width: 280px;
    min-width: 280px;
    max-width: 280px;
  }
  
  .modal-dialog {
    margin: 10px;
  }
}

@media (max-width: 480px) {
  .boards-index h1 {
    font-size: 1.5rem;
  }
  
  .board-info h1 {
    font-size: 1.5rem;
  }
  
  .lists-container {
    padding: 12px;
    gap: 12px;
  }
  
  .list,
  .add-list-form {
    width: calc(100vw - 40px);
    min-width: calc(100vw - 40px);
    max-width: calc(100vw - 40px);
  }
}

/* ===========================
   Animations & Transitions
   =========================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===========================
   High Contrast Mode Support
   =========================== */
@media (prefers-contrast: high) {
  .card-item,
  .list {
    border-width: 2px;
  }
  
  .btn {
    border: 2px solid currentColor;
  }
}

/* ===========================
   Dark Mode Support (Future)
   =========================== */
@media (prefers-color-scheme: dark) {
  /* Dark mode styles can be added here */
}

/* ===========================
   Print Styles
   =========================== */
@media print {
  .board-actions,
  .list-actions,
  .add-card-section,
  .add-list-form {
    display: none !important;
  }
  
  .lists-container {
    flex-wrap: wrap;
    overflow: visible;
  }
  
  .list {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}