/* Thruster Planner - Optimized CSS */

/* === ROOT VARIABLES === */
:root {
  /* === BRAND COLORS (Updated to Xophia.ai) === */
  --primary: #00d9ff;
  --primary-hover: #00b8d4;
  --primary-light: #33e3ff;
  --bg: #0a0e1a;
  --surface: #0f1624;
  --surface-hover: #1a2332;
  --border: #1e2938;
  --text: #ffffff;
  --text-muted: #8b9aa8;
  --success: #10b981;
  --warning: #d29922;
  --danger: #f85149;
  --info: #00d9ff;
  --mention-bg: rgba(0,217,255,0.15);
  --mention-fg: #33e3ff;

  /* Priority Colors */
  --critical: #f85149;
  --high: #ff8e00;
  --medium: #00d9ff;
  --low: #56d364;

  /* Context Badge Colors */
  --client-primary: #00d9ff;
  --client-secondary: #1a2332;
  --client-accent: #00b8d4;
  --project-primary: #10b981;
  --project-secondary: #1a2332;
  --project-accent: #047857;

  /* Layout */
  --radius: 0.5rem;
  --shadow: 0 4px 12px rgba(0,0,0,0.3);
  --transition: all 0.3s ease;

  /* Glass effect (Updated) */
  --glass-bg: rgba(15,22,36,0.95);
  --glass-border: rgba(0,217,255,0.1);

  /* Removed glow effects */
}

/* === RESET & BASE === */
* {
  box-sizing: border-box;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  margin: 0;
  overflow-x: hidden;
}

/* === ANIMATIONS === */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast-notification {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transform: translateX(100%);
    opacity: 0;
  transition: all 0.3s ease;
  pointer-events: auto;
  min-width: 300px;
  max-width: 500px;
}

.toast-notification.show {
  transform: translateX(0);
  opacity: 1;
}

.toast-content {
  display: flex;
  align-items: center;
  color: var(--text);
  font-size: 14px;
}

.toast-success {
  border-left: 4px solid var(--success);
}

.toast-error {
  border-left: 4px solid var(--danger);
}

.toast-warning {
  border-left: 4px solid var(--warning);
}

.toast-info {
  border-left: 4px solid var(--info);
}

/* ============================================
   UNIFIED TIMER STATUS BAR - Always Visible
   Color States:
   - idle (red): No activity, prompt to start
   - working (green): Task timer active
   - break (yellow): On break
   - quick (blue): Quick timer active
   ============================================ */

.timer-status-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1050;
  backdrop-filter: blur(12px);
  transition: all 0.3s ease;
  min-height: 56px;
}

/* Hide status bar when not logged in (controlled by body class) */
body:not(.user-logged-in) .timer-status-bar {
  display: none;
}

/* Status Bar State Colors */
.timer-status-bar.status-idle {
  background: rgba(248, 81, 73, 0.15);
  border-top: 3px solid var(--danger);
  box-shadow: 0 -4px 20px rgba(248, 81, 73, 0.2);
}

.timer-status-bar.status-working {
  background: rgba(16, 185, 129, 0.15);
  border-top: 3px solid var(--success);
  box-shadow: 0 -4px 20px rgba(16, 185, 129, 0.2);
}

.timer-status-bar.status-break {
  background: rgba(210, 153, 34, 0.18);
  border-top: 3px solid var(--warning);
  box-shadow: 0 -4px 20px rgba(210, 153, 34, 0.25);
}

.timer-status-bar.status-quick {
  background: rgba(0, 217, 255, 0.15);
  border-top: 3px solid var(--info);
  box-shadow: 0 -4px 20px rgba(0, 217, 255, 0.2);
}

/* Status Indicator Dot */
.timer-status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 12px;
  flex-shrink: 0;
  animation: statusPulse 2s ease-in-out infinite;
}

.status-idle .timer-status-indicator {
  background: var(--danger);
  box-shadow: 0 0 8px var(--danger);
}

.status-working .timer-status-indicator {
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}

.status-break .timer-status-indicator {
  background: var(--warning);
  box-shadow: 0 0 8px var(--warning);
}

.status-quick .timer-status-indicator {
  background: var(--info);
  box-shadow: 0 0 8px var(--info);
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.1); }
}

/* Status Info Section */
.timer-status-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.timer-status-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.status-idle .timer-status-icon { color: var(--danger); }
.status-working .timer-status-icon { color: var(--success); }
.status-break .timer-status-icon { color: var(--warning); }
.status-quick .timer-status-icon { color: var(--info); }

.timer-status-label {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.timer-status-type {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.7;
  font-weight: 600;
}

.status-idle .timer-status-type { color: var(--danger); }
.status-working .timer-status-type { color: var(--success); }
.status-break .timer-status-type { color: var(--warning); }
.status-quick .timer-status-type { color: var(--info); }

.timer-status-task {
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}

/* Timer Time Display */
.timer-status-time {
  font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
  font-size: 24px;
  font-weight: 700;
  min-width: 100px;
  text-align: center;
  padding: 0 20px;
}

.status-idle .timer-status-time { color: var(--danger); }
.status-working .timer-status-time { color: var(--success); }
.status-break .timer-status-time { color: var(--warning); }
.status-quick .timer-status-time { color: var(--info); }

/* Timer Control Buttons */
.timer-status-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.timer-status-actions .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s ease;
}

.timer-status-actions .btn-icon {
  width: 40px;
  padding: 0;
}

.timer-status-actions .btn i {
  font-size: 16px;
}

/* Play Button (for starting/resuming) */
.timer-status-actions .btn-play {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.timer-status-actions .btn-play:hover {
  background: #059669;
  transform: scale(1.05);
}

/* Pause Button */
.timer-status-actions .btn-pause {
  background: var(--warning);
  border-color: var(--warning);
  color: white;
}

.timer-status-actions .btn-pause:hover {
  background: #b45309;
  transform: scale(1.05);
}

/* Stop Button */
.timer-status-actions .btn-stop {
  background: var(--danger);
  border-color: var(--danger);
  color: white;
}

.timer-status-actions .btn-stop:hover {
  background: #dc2626;
  transform: scale(1.05);
}

/* Quick Actions Dropdown */
.timer-status-actions .btn-quick-action {
  background: var(--surface-light);
  border: 1px solid var(--border);
  color: var(--text);
}

.timer-status-actions .btn-quick-action:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* Idle State - Prominent Start Button */
.status-idle .timer-status-actions .btn-start-work {
  background: var(--success);
  border: none;
  color: white;
  padding: 8px 20px;
  font-weight: 600;
  animation: gentlePulse 2s ease-in-out infinite;
}

@keyframes gentlePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
}

/* Timer sync indicator */
.timer-sync-indicator {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.timer-sync-indicator.syncing {
  opacity: 1;
  animation: pulse 1s infinite;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .timer-status-bar {
    padding: 10px 12px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .timer-status-info {
    order: 1;
    flex: 1;
  }

  .timer-status-time {
    order: 2;
    font-size: 20px;
    min-width: auto;
    padding: 0 10px;
  }

  .timer-status-actions {
    order: 3;
  }

  .timer-status-task {
    max-width: 150px;
  }

  .timer-status-actions .btn:not(.btn-icon) span {
    display: none;
  }
}

.timer-sync-indicator.offline {
  background: var(--warning);
  opacity: 1;
}

.animate-fade-up {
  animation: fadeInUp 0.6s ease-out;
}

.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
  margin: 0 0 1rem 0;
}

a {
  color: var(--primary);
    text-decoration: none;
  transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

/* === BUTTONS === */
.btn {
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  border: none;
  font-weight: 600;
    font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

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

.btn-primary:hover {
  background: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-outline-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.btn-outline-secondary:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.btn-outline-danger {
  background: transparent;
  border: 1px solid var(--danger);
  color: var(--danger);
}

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

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
}

/* === FORMS === */
.form-control, .form-select {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 0.75rem;
  font-size: 0.9rem;
  transition: var(--transition);
  width: 100%;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary);
    outline: none;
  box-shadow: 0 0 0 3px rgba(0,217,255,0.2);
}

.form-control::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.form-label {
  color: var(--text-muted);
    font-weight: 600;
    font-size: 0.875rem;
  margin-bottom: 0.5rem;
  display: block;
}

.form-check-input {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
}

.form-check-input:checked {
  background: var(--primary);
  border-color: var(--primary);
}

/* === CARDS === */
.card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.card:hover {
    transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.card-header {
  background: rgba(0,217,255,0.1);
  border-bottom: 1px solid var(--glass-border);
  padding: 1rem;
  border-radius: var(--radius) var(--radius) 0 0;
}

.card-body {
  padding: 1rem;
}

.card-footer {
  background: rgba(255,255,255,0.05);
  border-top: 1px solid var(--glass-border);
  padding: 1rem;
  border-radius: 0 0 var(--radius) var(--radius);
}

/* === STATS CARDS === */
.card.bg-primary {
  background: var(--primary);
    color: white;
    border: none;
}

.card.bg-success {
  background: var(--success);
  color: white;
  border: none;
}

.card.bg-warning {
  background: var(--warning);
  color: white;
  border: none;
}

.card.bg-info {
  background: var(--info);
    color: white;
  border: none;
}

.stats-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 32px rgba(0,0,0,0.5);
}

/* === NAVBAR === */
.navbar {
  background: var(--surface) !important;
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 0;
  box-shadow: var(--shadow);
  min-height: 56px;
}

.navbar-brand img {
  transition: opacity 0.2s ease;
}

.navbar-brand:hover img {
  opacity: 0.85;
}

/* Nav Links */
.navbar .nav-link {
  color: var(--text-muted) !important;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.navbar .nav-link:hover {
  color: var(--text) !important;
  background: rgba(255, 255, 255, 0.05);
}

.navbar .nav-link.active {
  color: var(--primary) !important;
  background: rgba(0, 217, 255, 0.1);
}

.navbar .nav-link i {
  font-size: 0.9rem;
  width: 18px;
  text-align: center;
}

.nav-label {
  display: inline;
}

/* Nav Divider */
.nav-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
  margin: 0 0.5rem;
  opacity: 0.5;
}

/* Icon Button Style */
.nav-icon-btn {
  position: relative;
  padding: 0.5rem 0.6rem !important;
}

.nav-icon-btn i {
  font-size: 1rem;
}

.nav-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
  min-width: 16px;
}

/* Admin Button */
.nav-admin-btn {
  color: #ffc107 !important;
}

.nav-admin-btn:hover {
  color: #ffca2c !important;
  background: rgba(255, 193, 7, 0.1) !important;
}

/* User Button */
.nav-user-btn {
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem !important;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
}

.nav-user-btn:hover {
  background: rgba(255, 255, 255, 0.1) !important;
}

.nav-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-user-avatar i {
  font-size: 0.75rem;
  color: #fff;
}

.nav-user-name {
  font-weight: 500;
  font-size: 0.875rem;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Search */
.nav-search {
  margin-right: 0.5rem;
}

.nav-search .form-control {
  width: 160px;
  transition: width 0.3s ease;
}

.nav-search .form-control:focus {
  width: 200px;
  box-shadow: 0 0 0 2px rgba(0, 217, 255, 0.2);
}

.nav-search .btn {
  color: var(--text-muted);
}

.nav-search .btn:hover {
  color: var(--primary);
}

/* Dropdown Menus */
.navbar .dropdown-menu {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  padding: 0.5rem;
  min-width: 200px;
}

.navbar .dropdown-item {
  color: var(--text-muted);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.875rem;
  transition: all 0.15s ease;
}

.navbar .dropdown-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.navbar .dropdown-item.active {
  background: rgba(0, 217, 255, 0.15);
  color: var(--primary);
}

.navbar .dropdown-item i {
  width: 20px;
  text-align: center;
  opacity: 0.7;
}

.navbar .dropdown-header {
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.5rem 0.75rem 0.25rem;
}

.navbar .dropdown-divider {
  border-color: var(--border);
  margin: 0.35rem 0;
  opacity: 0.3;
}

.navbar-toggler {
  border-color: var(--border);
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
  .nav-label {
    display: inline;
  }

  .nav-divider {
    display: none;
  }

  .nav-search {
    width: 100%;
    margin: 0.5rem 0;
  }

  .nav-search .form-control {
    width: 100%;
  }

  .nav-user-name {
    display: inline;
  }

  .navbar .nav-link {
    padding: 0.75rem 1rem;
  }

  .navbar .dropdown-menu {
    border: none;
    box-shadow: none;
    background: transparent;
    padding-left: 1rem;
  }
}

@media (min-width: 992px) and (max-width: 1200px) {
  .nav-label {
    display: none;
  }

  .nav-user-name {
    display: none;
  }

  .nav-search .form-control {
    width: 120px;
  }
}

/* === KANBAN BOARD === */
.kanban-board-wrapper {
  width: calc(100vw - 4%);
  margin: 0 2%;
  padding: 1rem;
  background: rgba(16,16,17,0.5);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  animation: fadeInUp 0.6s ease-out;
}

.kanban-board-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  padding: 1rem;
  min-height: 500px;
}

.kanban-column-container {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  min-height: 400px;
  max-height: calc(100vh - 200px);
  animation: fadeInUp 0.6s ease-out;
}

.kanban-column-container:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
}

.kanban-column-header {
  padding: 1rem;
  background: rgba(0,217,255,0.1);
  border-bottom: 1px solid var(--glass-border);
  border-radius: var(--radius) var(--radius) 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kanban-column-header h5 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

.kanban-column {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
}

.kanban-column::-webkit-scrollbar {
  width: 4px;
}

.kanban-column::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 2px;
}

/* === TASK CARDS === */
.task-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  transition: var(--transition);
  cursor: pointer;
    position: relative;
  animation: fadeInUp 0.6s ease-out;
  overflow: hidden;
}

.task-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  border-color: var(--primary);
}

/* Compact Card Specific */
.task-card.compact-card {
    padding: 0;
  min-height: 50px;
  display: flex;
  flex-direction: column;
}

/* Priority Strip */
.priority-strip {
    position: absolute;
    left: 0;
  top: 0;
    width: 4px;
    height: 100%;
    transition: width 0.3s ease;
}

.priority-strip.priority-critical { background: var(--critical); }
.priority-strip.priority-high { background: var(--high); }
.priority-strip.priority-medium { background: var(--medium); }
.priority-strip.priority-low { background: var(--low); }

.task-card:hover .priority-strip {
  width: 6px;
}

/* Health Dot */
.health-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
  z-index: 2;
}

.health-dot.on-track { background: var(--success); }
.health-dot.due-today { 
  background: var(--warning); 
  animation: pulse 2s infinite;
}
.health-dot.overdue {
  background: var(--danger);
  animation: pulse 1.5s infinite;
}

/* Developer Mode Indicator */
.dev-mode-indicator {
    position: absolute;
    top: 8px;
    right: 24px;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    background: #8b5cf6;
    color: white;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    box-shadow: 0 2px 4px rgba(139, 92, 246, 0.3);
}

.dev-mode-indicator i {
    font-size: 0.6rem;
}

/* No Primary Assignee Indicator */
.no-assignee-indicator {
    position: absolute;
    top: 8px;
    right: 48px;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    background: #ef4444;
    color: white;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
    animation: pulse 2s infinite;
}

.no-assignee-indicator i {
    font-size: 0.6rem;
}

/* Blocked Task Indicator */
.blocked-indicator {
    position: absolute;
    top: 8px;
    right: 72px;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    background: #f59e0b;
    color: white;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

.blocked-indicator i {
    font-size: 0.6rem;
}

/* Sub-task Indicator */
.subtask-indicator {
    position: absolute;
    top: 8px;
    right: 96px;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    background: #3b82f6;
    color: white;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.subtask-indicator i {
    font-size: 0.6rem;
}

/* Epic Badge styling */
.context-badge.epic-badge {
    font-size: 0.7rem;
}

/* Adjust indicator positions when multiple are present */
.task-card:has(.blocked-indicator) .no-assignee-indicator {
    right: 96px;
}

.task-card:has(.blocked-indicator) .dev-mode-indicator {
    right: 48px;
}

.task-card:has(.subtask-indicator) .blocked-indicator {
    right: 120px;
}

.task-card:has(.subtask-indicator) .no-assignee-indicator {
    right: 120px;
}

/* Adjust health dot position when indicators are present */
.task-card:has(.dev-mode-indicator) .health-dot {
    right: 48px;
}

.task-card:has(.no-assignee-indicator) .health-dot {
    right: 72px;
}

.task-card:has(.dev-mode-indicator):has(.no-assignee-indicator) .health-dot {
    right: 72px;
}

.task-card:has(.dev-mode-indicator):has(.no-assignee-indicator) .dev-mode-indicator {
    right: 48px;
}

/* Collapsed View */
.card-collapsed {
  padding: 0.75rem 1rem 0.75rem 1.25rem;
  min-height: 50px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.25rem;
}

.card-main-row {
    display: flex;
    align-items: center;
    width: 100%;
  gap: 0.75rem;
}

/* Two-row compact layout */
.collapsed-top-row {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 0.75rem;
}

.collapsed-bottom-row {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 0.5rem;
  min-height: 22px; /* keep two-row height even if empty */
}

.collapsed-bottom-row .context-badges {
  margin-top: 0; /* override default spacing when used in bottom row */
}

.collapsed-bottom-row .due-indicator {
  margin-left: auto; /* push due + following avatars to the right */
}

/* Task Title Section */
.task-title {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
  gap: 0.5rem;
}

.task-title h6 {
    margin: 0;
  font-size: 0.9rem;
    font-weight: 600;
  color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Timer Dot */
.timer-dot {
    width: 8px;
    height: 8px;
  background: var(--success);
    border-radius: 50%;
    flex-shrink: 0;
}

.timer-dot.pulsing {
  animation: pulse 1.5s infinite;
}

/* Compact Indicators */
.compact-indicators {
    display: flex;
    align-items: center;
  gap: 0.5rem;
    flex-shrink: 0;
}

/* Due Date Indicator */
.due-indicator {
  font-size: 0.75rem;
    font-weight: 600;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
    white-space: nowrap;
}

.due-indicator.overdue {
  background: rgba(248,81,73,0.15);
  color: #fca5a5;
  border: 1px solid rgba(248,81,73,0.3);
}

.due-indicator.today {
  background: rgba(210,153,34,0.15);
  color: #fbbf24;
  border: 1px solid rgba(210,153,34,0.3);
}

.due-indicator.soon {
  background: rgba(0,217,255,0.15);
  color: #33e3ff;
  border: 1px solid rgba(0,217,255,0.3);
}

/* Mini Avatars */
.mini-avatars {
    display: flex;
  margin-left: 0.25rem;
}

.mini-avatar {
  width: 22px;
  height: 22px;
    border-radius: 50%;
  background: var(--primary);
    color: white;
  font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
  border: 2px solid var(--bg);
  margin-left: -6px;
    position: relative;
}

.mini-avatar:first-child {
  margin-left: 0;
}

.mini-avatar.more {
  background: var(--text-muted);
  font-size: 0.6rem;
}

/* Expand Toggle */
.expand-toggle {
  background: transparent;
    border: none;
    color: var(--text-muted);
  font-size: 0.75rem;
  padding: 0.25rem;
  border-radius: 0.25rem;
    cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.expand-toggle:hover {
  background: rgba(0,217,255,0.1);
  color: var(--primary);
}

.expand-toggle i {
  transition: transform 0.3s ease;
}

.task-card[aria-expanded="true"] .expand-toggle i {
    transform: rotate(180deg);
}

/* Quick Actions */
.card-quick-actions {
    position: absolute;
    top: 50%;
    right: 40px;
    transform: translateY(-50%);
    display: flex;
  gap: 0.25rem;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    z-index: 10;
}

.task-card:hover .card-quick-actions {
    opacity: 1;
    pointer-events: all;
}

/* Hide quick actions when card is expanded */
.task-card[aria-expanded="true"] .card-quick-actions {
  display: none;
}

/* Timer active state */
.task-card.timer-active {
  border-color: var(--success);
  background: rgba(16,185,129,0.05);
}

.task-card.timer-active .priority-strip {
  animation: pulse 2s infinite;
}

.quick-btn {
  width: 28px;
  height: 28px;
    border: none;
  border-radius: 0.375rem;
  background: rgba(30,41,59,0.9);
  color: var(--text-muted);
  font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.quick-btn:hover {
  background: var(--primary);
    color: white;
    transform: scale(1.1);
}

/* Compact Timer Buttons */
.timer-btn-compact {
  display: flex !important;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
}

.timer-btn-compact.start-btn {
  background: rgba(16,185,129,0.2) !important;
  color: #6ee7b7 !important;
  border: 1px solid rgba(16,185,129,0.3);
}

.timer-btn-compact.stop-btn {
  background: rgba(248,81,73,0.2) !important;
  color: #fca5a5 !important;
  border: 1px solid rgba(248,81,73,0.3);
}

.timer-btn-compact:not(:disabled):hover {
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Disabled state for timer buttons */
.timer-btn-compact:disabled,
.timer-btn-compact.disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  background: rgba(100,116,139,0.1) !important;
  color: #64748b !important;
  border: 1px solid rgba(100,116,139,0.2) !important;
  position: relative;
  pointer-events: auto !important; /* Allow hover for tooltip */
}

/* Tooltip for disabled timer buttons */
.timer-btn-compact:disabled::after,
.timer-btn-compact.disabled::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.5rem 0.75rem;
  background: rgba(15,23,42,0.95);
  color: #f1f5f9;
  font-size: 0.75rem;
  white-space: nowrap;
  border-radius: 0.375rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  margin-bottom: 0.25rem;
  z-index: 1000;
}

.timer-btn-compact:disabled:hover::after,
.timer-btn-compact.disabled:hover::after {
  opacity: 1;
}

.timer-btn-compact:disabled:hover,
.timer-btn-compact.disabled:hover {
  transform: none;
  box-shadow: none;
}

/* Timer buttons in action bar */
.action-btn.timer-btn {
  min-width: auto;
  padding: 0.5rem 1rem;
  transition: all 0.2s ease;
}

.action-btn.timer-btn.start-btn {
  background: rgba(16,185,129,0.2);
  color: #10b981;
  border: 1px solid rgba(16,185,129,0.3);
}

.action-btn.timer-btn.start-btn:not(:disabled):hover {
  background: rgba(16,185,129,0.3);
  transform: translateY(-1px);
}

/* Disabled state for action timer buttons */
.action-btn.timer-btn:disabled,
.action-btn.timer-btn.disabled {
  opacity: 0.4 !important;
  cursor: not-allowed !important;
  background: rgba(100,116,139,0.1) !important;
  color: #64748b !important;
  border: 1px solid rgba(100,116,139,0.2) !important;
}

.action-btn.timer-btn:disabled:hover,
.action-btn.timer-btn.disabled:hover {
  transform: none !important;
}

.action-btn.timer-btn.stop-btn {
  background: rgba(248,81,73,0.2);
  color: #f85149;
  border: 1px solid rgba(248,81,73,0.3);
}

.action-btn.timer-btn.stop-btn:hover {
  background: rgba(248,81,73,0.3);
  transform: translateY(-1px);
}

/* Inline timer display */
.active-timer-display.inline-timer {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(0,217,255,0.1);
  border: 1px solid rgba(0,217,255,0.2);
  border-radius: 6px;
  color: #00d9ff;
  font-size: 0.875rem;
  font-weight: 500;
}

.active-timer-display.inline-timer .timer-icon {
  font-size: 1rem;
}

/* Hide d-none elements */
.d-none {
  display: none !important;
}

/* Ensure timer buttons are always visible */
.task-card .card-quick-actions {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.task-card:hover .card-quick-actions,
.task-card.timer-active .card-quick-actions {
  opacity: 1;
}

/* Expanded View */
.card-expanded {
  padding: 1rem;
  border-top: 1px solid var(--glass-border);
  background: rgba(15,23,42,0.3);
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.task-card[aria-expanded="true"] {
  height: auto;
  min-height: auto;
}

.task-card[aria-expanded="true"] .card-expanded {
    opacity: 1;
    transform: translateY(0);
}

/* === CONTEXT BADGE SYSTEM === */
.context-badges {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.5rem;
  opacity: 1;
  transform: translateY(0);
  transition: all 0.3s ease;
}

.task-card[aria-expanded="true"] .context-badges[data-visibility="collapsed"] {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}

/* Keep two-row header visible even when expanded */
.task-card[aria-expanded="true"] .collapsed-bottom-row {
  display: flex;
}
.task-card[aria-expanded="true"] .collapsed-bottom-row .context-badges[data-visibility="collapsed"] {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* In Done status, never show Start buttons */
.task-card[data-status-name="done"] .timer-btn-compact.start-btn,
.task-card[data-status-name="done"] .action-btn.timer-btn.start-btn {
  display: none !important;
}

.context-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: help;
  position: relative;
}

.client-badge {
  background: var(--client-secondary);
  color: var(--client-accent);
  border: 1px solid var(--client-primary);
}

.client-badge:hover {
  background: var(--client-primary);
  color: white;
  transform: scale(1.05);
}

.project-badge {
  background: var(--project-secondary);
  color: var(--project-accent);
  border: 1px solid var(--project-primary);
}

.project-badge:hover {
  background: var(--project-primary);
  color: white;
  transform: scale(1.05);
}

.context-badge i {
  font-size: 0.6rem;
}

/* Expanded Context */
.context-details {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  margin-bottom: 0;
}

.task-card[aria-expanded="true"] .context-details[data-visibility="expanded"] {
  opacity: 1;
  max-height: 100px;
  transform: translateY(0);
  margin-bottom: 1rem;
}

.context-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(248, 250, 252, 0.05);
  border-radius: 6px;
  border-left: 3px solid var(--client-primary);
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 500;
}

.breadcrumb-item.client {
  color: var(--client-primary);
}

.breadcrumb-item.project {
  color: var(--project-primary);
}

.breadcrumb-separator {
  color: var(--text-muted);
  font-size: 0.6rem;
}

/* Expanded Header */
.expanded-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
  margin-bottom: 0.75rem;
  gap: 0.75rem;
}

.full-title {
    margin: 0;
  font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
  color: var(--text);
    flex: 1;
}

/* Task Description */
.task-description {
  margin-bottom: 0.75rem;
}

.task-description p {
    margin: 0;
  font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-muted);
}

/* Task Meta Information */
.task-meta {
    display: flex;
    align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
  gap: 0.375rem;
  font-size: 0.8rem;
    color: var(--text-muted);
}

.meta-item i {
  font-size: 0.75rem;
  width: 14px;
    text-align: center;
}

.meta-item.due-date.overdue { color: #fca5a5; }
.meta-item.due-date.today { color: #fbbf24; }
.meta-item.due-date.soon { color: #93c5fd; }

/* Progress Ring */
.progress-ring {
    position: relative;
  display: inline-flex;
    align-items: center;
  gap: 0.375rem;
}

.progress-ring svg {
  width: 20px;
  height: 20px;
}

.progress-ring span {
  font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* Task Labels */
.task-labels {
    display: flex;
    flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}

.label-chip {
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.7rem;
    font-weight: 600;
    color: white;
  background: var(--primary);
}

.label-chip.more-labels {
  background: var(--text-muted);
  color: var(--bg);
}

/* Timer Controls in Expanded View */
.timer-controls {
    display: flex;
    align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: rgba(15,23,42,0.5);
  border-radius: var(--radius);
}

.timer-btn {
    display: flex;
    align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
    border: none;
  border-radius: 0.375rem;
  font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.timer-btn.start-btn {
  background: rgba(16,185,129,0.2);
    color: #6ee7b7;
  border: 1px solid rgba(16,185,129,0.3);
}

.timer-btn.stop-btn {
  background: rgba(248,81,73,0.2);
    color: #fca5a5;
  border: 1px solid rgba(248,81,73,0.3);
}

.timer-btn:hover {
    transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.active-timer-display {
    display: flex;
    align-items: center;
  gap: 0.375rem;
    color: #6ee7b7;
    font-weight: 600;
  font-size: 0.8rem;
}

.timer-icon {
  animation: pulse 2s infinite;
}

/* Expanded Actions */
.expanded-actions {
    display: flex;
  gap: 0.5rem;
    justify-content: flex-start;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--glass-border);
  flex-wrap: wrap;
  align-items: center;
}

.action-btn {
    display: flex;
    align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(30,41,59,0.8);
  color: var(--text-muted);
}

.action-btn:hover {
    transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.action-btn.primary {
  background: rgba(0,217,255,0.2);
    color: #33e3ff;
  border-color: rgba(0,217,255,0.4);
}

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

.action-btn.secondary {
  background: rgba(107,114,128,0.2);
  color: #d1d5db;
  border-color: rgba(107,114,128,0.4);
}

.action-btn.secondary:hover {
  background: var(--text-muted);
    color: white;
  border-color: var(--text-muted);
}

.action-btn.danger {
  background: rgba(248,81,73,0.2);
  color: #fca5a5;
  border-color: rgba(248,81,73,0.4);
}

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

.action-btn i {
  font-size: 0.75rem;
}

/* Priority badges */
.priority-badge {
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius);
  font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.priority-badge.priority-critical {
  background: rgba(248,81,73,0.2);
    color: #fca5a5;
  border: 1px solid rgba(248,81,73,0.3);
}

.priority-badge.priority-high {
  background: rgba(255,142,0,0.2);
    color: #fdba74;
  border: 1px solid rgba(255,142,0,0.3);
}

.priority-badge.priority-medium {
  background: rgba(0,217,255,0.2);
    color: #33e3ff;
  border: 1px solid rgba(0,217,255,0.3);
}

.priority-badge.priority-low {
  background: rgba(86,211,100,0.2);
  color: #6ee7b7;
  border: 1px solid rgba(86,211,100,0.3);
}

/* === BADGES === */
.badge {
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius);
  font-size: 0.75rem;
    font-weight: 600;
  display: inline-block;
}

.badge.bg-primary { background: var(--primary); color: white; }
.badge.bg-success { background: var(--success); color: white; }
.badge.bg-warning { background: var(--warning); color: white; }
.badge.bg-danger { background: var(--danger); color: white; }
.badge.bg-info { background: var(--info); color: white; }
.badge.bg-secondary { background: var(--text-muted); color: white; }

/* Mentions styling */
.mention {
  background: var(--mention-bg);
  color: var(--mention-fg);
  padding: 0.05rem 0.35rem;
  border-radius: 0.35rem;
  font-weight: 700;
}

.mention-at {
  color: var(--mention-fg);
  font-weight: 800;
}

/* === MEMBER AVATARS === */
.member-avatar {
  width: 32px;
  height: 32px;
    border-radius: 50%;
  background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
  font-size: 0.75rem;
    font-weight: 600;
  margin-left: -8px;
  border: 2px solid var(--bg);
  transition: var(--transition);
}

.member-avatar:first-child {
    margin-left: 0;
}

.member-avatar:hover {
  transform: scale(1.1);
    z-index: 10;
}



/* === DRAG & DROP === */
.task-card.dragging {
  opacity: 0.8;
  transform: rotate(5deg) scale(1.05);
  z-index: 1000;
  box-shadow: 0 12px 32px rgba(0,0,0,0.5);
}

.kanban-column.drag-over {
  background: rgba(59,130,246,0.1);
  border-color: var(--primary);
}

.kanban-column.drag-over::after {
  content: 'Drop here';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--primary);
    color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
  z-index: 10;
}

/* === FILTER PILLS === */
.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(0,217,255,0.1);
  border: 1px solid var(--primary);
  border-radius: 20px;
  color: var(--primary);
  font-size: 0.8rem;
  text-decoration: none;
  transition: var(--transition);
}

.filter-pill:hover {
  background: var(--primary);
    color: white;
  transform: translateY(-1px);
}

.filter-pill .badge {
  background: var(--primary);
    color: white;
  margin-left: 0.25rem;
}

/* === BREADCRUMBS === */
.breadcrumb {
  background: transparent;
  padding: 0;
  margin: 0 0 1rem 0;
}

.breadcrumb-item {
  color: var(--text-muted);
}

.breadcrumb-item a {
  color: var(--text-muted);
  text-decoration: none;
}

.breadcrumb-item a:hover {
  color: var(--primary);
}

.breadcrumb-item.active {
  color: var(--text);
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  color: var(--text-muted);
  margin: 0 0.5rem;
}

/* === MODALS === */
.modal-content {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.modal-header {
  border-bottom: 1px solid var(--glass-border);
  padding: 1rem;
}

.modal-body {
  padding: 1rem;
}

.modal-footer {
  border-top: 1px solid var(--glass-border);
  padding: 1rem;
}

.modal-title {
  color: var(--text);
  font-weight: 600;
}

.btn-close {
    background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
    cursor: pointer;
}

/* === DROPDOWNS === */
.dropdown-menu {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.dropdown-item {
  color: var(--text);
  padding: 0.5rem 1rem;
  text-decoration: none;
  display: block;
  transition: var(--transition);
}

.dropdown-item:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.dropdown-item.active {
  background: var(--primary);
  color: white;
}

.dropdown-divider {
  border-top: 1px solid var(--glass-border);
  margin: 0.5rem 0;
}

/* === ALERTS === */
.alert {
  border-radius: var(--radius);
  border: none;
  margin-bottom: 1rem;
  padding: 1rem;
}

.alert-info {
  background: rgba(88,166,255,0.1);
  color: var(--info);
  border-left: 4px solid var(--info);
}

.alert-success {
  background: rgba(16,185,129,0.1);
  color: var(--success);
  border-left: 4px solid var(--success);
}

.alert-warning {
  background: rgba(210,153,34,0.1);
  color: var(--warning);
  border-left: 4px solid var(--warning);
}

.alert-danger {
  background: rgba(248,81,73,0.1);
  color: var(--danger);
  border-left: 4px solid var(--danger);
}

.alert-link {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
}

/* === TABLES === */
.table {
  color: var(--text);
  background: transparent;
    width: 100%;
  border-collapse: collapse;
}

.table th {
  border-top: none;
  border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-weight: 600;
  padding: 0.75rem;
  text-align: left;
}

.table td {
  border-top: 1px solid var(--border);
  padding: 0.75rem;
}

.table-striped tbody tr:nth-of-type(odd) {
  background: rgba(255,255,255,0.02);
}

.table-hover tbody tr:hover {
  background: rgba(255,255,255,0.05);
}

/* === PROGRESS BARS === */
.progress {
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius);
  height: 0.5rem;
    overflow: hidden;
}

.progress-bar {
  background: var(--primary);
  border-radius: var(--radius);
  transition: width 0.6s ease;
    height: 100%;
}

.progress-bar.bg-success { background: var(--success); }
.progress-bar.bg-warning { background: var(--warning); }
.progress-bar.bg-danger { background: var(--danger); }
.progress-bar.bg-info { background: var(--info); }

/* === LIST GROUPS === */
.list-group-item {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text);
  padding: 0.75rem 1rem;
  text-decoration: none;
  display: block;
  transition: var(--transition);
}

.list-group-item:hover {
  background: var(--surface-hover);
  text-decoration: none;
  color: var(--text);
}

.list-group-item.active {
  background: var(--primary);
  border-color: var(--primary);
    color: white;
}

/* === PAGINATION === */
.page-link {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text);
  padding: 0.5rem 0.75rem;
  text-decoration: none;
  transition: var(--transition);
}

.page-link:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.page-item.active .page-link {
  background: var(--primary);
  border-color: var(--primary);
    color: white;
}

.page-item.disabled .page-link {
  background: var(--surface);
    color: var(--text-muted);
  cursor: not-allowed;
}

/* === SEARCH & LABELS === */
.search-results .card {
  margin-bottom: 1rem;
}

.label-badge {
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 600;
  color: white;
  background: var(--primary);
  display: inline-block;
  margin: 0.125rem;
}

.label-badge:hover {
  opacity: 0.8;
}

.selected-label {
  background: var(--success);
}

.remove-label-btn {
  background: none;
  border: none;
  color: white;
  margin-left: 0.25rem;
    cursor: pointer;
  opacity: 0.7;
}

.remove-label-btn:hover {
  opacity: 1;
}

/* === FORM ENHANCEMENTS === */
.form-control-color {
  width: 50px;
  height: 38px;
  padding: 0.375rem;
}

.form-floating > .form-control {
  padding-top: 1.625rem;
  padding-bottom: 0.625rem;
}

.form-floating > label {
    position: absolute;
    top: 0;
    left: 0;
  height: 100%;
  padding: 1rem 0.75rem;
  pointer-events: none;
  border: 1px solid transparent;
  transform-origin: 0 0;
  transition: opacity 0.1s ease-in-out, transform 0.1s ease-in-out;
}

/* === TASK FORM STYLES === */
.task-form-header {
  margin-bottom: 2rem;
}

.section-header[data-toggle="collapse"] {
  cursor: pointer;
  user-select: none;
  transition: all 0.3s ease;
}

.section-header[data-toggle="collapse"]:hover {
  color: var(--primary);
}

.collapse-icon {
  transition: transform 0.3s ease;
  font-size: 0.875rem;
}

.collapsible-section[data-collapsed="false"] .collapse-icon {
  transform: rotate(180deg);
}

.section-content {
  overflow: hidden;
  transition: all 0.3s ease;
}

.form-section[data-required="true"] .section-header {
  border-left: 4px solid var(--primary);
  padding-left: 1rem;
}

.cursor-pointer {
  cursor: pointer;
}

/* Advanced Options Inline Toggle Bar */
.advanced-options-bar {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-top: 1.5rem;
}

.inline-section-toggles {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.inline-toggle-btn {
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  transition: all 0.3s ease;
  border: 1px solid var(--primary);
  color: var(--primary);
  background: transparent;
}

.inline-toggle-btn:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,217,255,0.3);
}

.inline-toggle-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(0,217,255,0.4);
}

.inline-toggle-btn i {
  font-size: 0.75rem;
}

/* Hide collapsible section headers when using inline toggles */
.collapsible-section[data-collapsed="true"] .section-header[data-toggle="collapse"] {
  display: none;
}

.collapsible-section[data-collapsed="false"] .section-header[data-toggle="collapse"] {
  display: flex;
}

/* === TASK FORM RESPONSIVE STYLES === */
@media (max-width: 991px) {
  /* Stack form sections on tablets */
  .task-form-header {
    margin-bottom: 1.5rem;
  }

  .form-section {
    margin-bottom: 1.5rem !important;
  }

  .section-header {
    margin-bottom: 1rem !important;
  }
}

@media (max-width: 768px) {
  /* Mobile-specific task form improvements */
  .task-form-header h2 {
    font-size: 1.5rem;
  }

  .task-form-header .task-form-icon {
    display: none;
  }

  /* Advanced options bar - mobile optimized */
  .advanced-options-bar {
    padding: 0.75rem 1rem;
  }

  .advanced-options-bar .d-flex {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 0.75rem;
  }

  .inline-section-toggles {
    width: 100%;
    justify-content: flex-start;
  }

  .inline-toggle-btn {
    flex: 0 0 auto;
    font-size: 0.8125rem;
    padding: 0.4rem 0.875rem;
  }

  /* Tighter spacing for mobile */
  .form-section {
    margin-bottom: 1rem !important;
  }

  .section-header {
    margin-bottom: 0.75rem !important;
  }

  .section-title {
    font-size: 1rem;
  }

  .section-title i {
    font-size: 0.875rem;
  }

  /* Make cards more compact */
  .card-body {
    padding: 1rem !important;
  }

  /* Form inputs more mobile-friendly */
  .form-control-lg {
    font-size: 1rem !important;
    padding: 0.75rem !important;
  }

  .form-select {
    padding: 0.75rem !important;
  }

  /* Team assignment section */
  .assignment-controls .row {
    gap: 0.75rem;
  }

  .assignment-controls .col-md-5,
  .assignment-controls .col-md-4,
  .assignment-controls .col-md-3 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .member-pill {
    padding: 0.75rem !important;
    font-size: 0.875rem;
  }

  /* Collapsible sections - auto-expand on mobile for better UX */
  .collapsible-section[data-collapsed="true"] .section-content {
    display: none;
  }

  .collapsible-section[data-collapsed="false"] .section-content {
    display: block;
  }

  /* Sticky footer adjustments */
  .task-form-footer {
    padding: 0.75rem 1rem;
  }

  .task-form-footer .footer-actions {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .task-form-footer .btn {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
  }

  /* Labels dropdown */
  #labels-dropdown .dropdown-menu {
    max-height: 250px !important;
  }
}

@media (max-width: 576px) {
  /* Extra small devices - ultra compact */
  .task-form-header h2 {
    font-size: 1.25rem;
  }

  .form-section {
    margin-bottom: 0.75rem !important;
  }

  /* Inline toggle buttons - compact mobile view */
  .inline-toggle-btn {
    font-size: 0.75rem;
    padding: 0.35rem 0.75rem;
  }

  .inline-toggle-btn i {
    font-size: 0.7rem;
  }

  .card {
    border-radius: 0.375rem;
  }

  .card-body {
    padding: 0.75rem !important;
  }

  /* Single column layout for all form fields */
  .row.g-3 > * {
    flex: 0 0 100%;
    max-width: 100%;
    margin-bottom: 0.75rem;
  }

  /* Make buttons full width on mobile */
  .task-form-footer .footer-actions .btn {
    width: 100%;
    justify-content: center;
  }

  /* Compact member pills */
  .member-pill {
    padding: 0.5rem !important;
    font-size: 0.8125rem;
  }

  .member-pill .badge {
    font-size: 0.7rem;
  }

  /* Checklist items */
  .checklist-item-row {
    padding: 0.5rem !important;
  }
}

/* === EXISTING RESPONSIVE STYLES === */
@media (max-width: 768px) {
    .kanban-board-wrapper {
        width: 100vw;
    margin: 0;
        padding: 0.5rem;
        border-radius: 0;
    }
    
    .kanban-board-container {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1rem;
    padding: 0.5rem;
  }
  
    .kanban-column-container {
    min-height: 300px;
    max-height: calc(100vh - 150px);
  }
  
    .task-card {
    margin-bottom: 0.5rem;
  }
  
  .task-card.compact-card {
    min-height: 55px;
  }
  
  .card-collapsed {
    padding: 0.75rem 0.75rem 0.75rem 1rem;
    min-height: 55px;
  }
  
  .task-title h6 {
    font-size: 0.875rem;
  }
  
  .compact-indicators {
    gap: 0.375rem;
  }
  
  .mini-avatar {
    width: 20px;
    height: 20px;
    font-size: 0.6rem;
    margin-left: -4px;
  }
  
  .card-quick-actions {
    position: static;
    opacity: 1;
    pointer-events: all;
    transform: none;
    margin-left: auto;
  }
  
  .quick-btn {
    width: 26px;
    height: 26px;
    font-size: 0.7rem;
  }
  
  .card-header, .card-body {
    padding: 0.75rem;
  }
  
  .btn {
    padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .navbar {
    padding: 0.5rem 0;
  }
  
  .member-avatar {
    width: 24px;
    height: 24px;
    font-size: 0.6rem;
    margin-left: -4px;
    }
    
    .kanban-column-header {
    padding: 0.75rem;
    }
    
    .kanban-column-header h5 {
    font-size: 1rem;
  }
  
  .expanded-header {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .task-meta {
    gap: 0.5rem;
  }
  
  .meta-item {
    font-size: 0.75rem;
  }
  
  .expanded-actions {
    flex-wrap: wrap;
    gap: 0.375rem;
  }
  
  .action-btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
  }
}

@media (max-width: 576px) {
    .kanban-board-container {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 0.25rem;
  }
  
  .container-fluid {
    padding: 0 0.5rem;
  }
  
  .card-header, .card-body, .card-footer {
    padding: 0.5rem;
  }
  
  .btn {
    padding: 0.5rem;
        font-size: 0.75rem;
    }
    
  .modal-dialog {
    margin: 0.5rem;
  }
}

/* === MOBILE TASK CARD OPTIMIZATION === */
@media (max-width: 767.98px) {
    /* Remove Bootstrap container/row/col margins for full-width */
    .container-fluid,
    .row.mb-4,
    .col-12 {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Force single column vertical layout on mobile - FULL WIDTH */
    .kanban-board-wrapper {
        width: 100vw !important;
        max-width: 100vw !important;
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 0 !important;
        overflow-x: hidden !important;
        background: transparent !important;
    }

    .kanban-board-container {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        padding: 0 !important;
        width: 100% !important;
    }

    .kanban-column-container {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        border-radius: 0 !important;
        min-height: auto !important;
        max-height: none !important;
        border-left: none !important;
        border-right: none !important;
    }

    /* Reduce column padding for more card space */
    .kanban-column {
        padding: 8px !important;
        max-height: none !important;
        overflow-y: visible !important;
    }

    /* Column header on mobile - full width edge to edge */
    .kanban-column-header {
        padding: 12px 16px !important;
        border-radius: 0 !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }

    .kanban-column-header h5 {
        font-size: 1rem !important;
        font-weight: 600 !important;
        color: #ffffff !important;
        margin: 0 !important;
    }

    .kanban-column-header .badge {
        font-size: 0.75rem !important;
        padding: 4px 10px !important;
        border-radius: 12px !important;
        background: rgba(255, 255, 255, 0.2) !important;
    }

    /* Task cards - full width with minimal margins */
    .task-card {
        margin: 0 0 0.5rem 0 !important;
        width: 100% !important;
        border-radius: 10px !important;
    }

    .task-card.compact-card {
        min-height: 50px !important;
    }

    /* Compact card internal layout */
    .card-collapsed {
        padding: 0.625rem 0.625rem 0.625rem 0 !important;
        min-height: 50px !important;
    }

    /* Priority strip width on mobile */
    .priority-strip {
        width: 4px !important;
        min-width: 4px !important;
    }

    /* Task title optimization - ENSURE VISIBILITY */
    .task-title h6 {
        font-size: 0.8125rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.25rem !important;
        color: #ffffff !important;
        -webkit-text-fill-color: #ffffff !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    /* Column header - ENSURE STATUS NAME VISIBILITY */
    .kanban-column-header h5 {
        color: #ffffff !important;
        -webkit-text-fill-color: #ffffff !important;
        display: inline-block !important;
        visibility: visible !important;
        opacity: 1 !important;
        font-size: 0.9rem !important;
    }

    /* Collapsed row layout - ensure proper display on mobile */
    .collapsed-top-row {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 0.5rem !important;
        width: 100% !important;
    }

    .collapsed-bottom-row {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 4px !important;
        width: 100% !important;
    }

    /* Task title container on mobile */
    .task-title {
        flex: 1 !important;
        min-width: 0 !important;
        display: flex !important;
        align-items: center !important;
        gap: 0.25rem !important;
        overflow: hidden !important;
    }

    /* Card collapsed container - proper layout */
    .card-collapsed {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
    }

    /* Expand toggle button on mobile */
    .expand-toggle {
        flex-shrink: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 24px !important;
        height: 24px !important;
        color: #8b9aa8 !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .expand-toggle i {
        font-size: 0.75rem !important;
        color: #8b9aa8 !important;
    }

    /* Optimize context badges container */
    .context-badges {
        flex-wrap: wrap !important;
        gap: 4px !important;
        display: flex !important;
    }

    /* Context badge items (client, project, epic badges) */
    .context-badge {
        font-size: 0.65rem !important;
        padding: 3px 6px !important;
        max-width: 90px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 3px !important;
        border-radius: 4px !important;
    }

    .context-badge .badge-text {
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        max-width: 60px !important;
    }

    .context-badge i {
        font-size: 0.55rem !important;
        flex-shrink: 0 !important;
    }

    /* Legacy badge support */
    .context-badges .badge {
        font-size: 0.65rem !important;
        padding: 3px 6px !important;
        max-width: 90px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    /* Compact indicators */
    .compact-indicators {
        gap: 0.25rem !important;
    }

    /* Mini avatars */
    .mini-avatar {
        width: 18px !important;
        height: 18px !important;
        font-size: 0.55rem !important;
        margin-left: -5px !important;
    }

    /* Quick action buttons */
    .card-quick-actions .btn {
        padding: 4px 6px !important;
        font-size: 0.7rem !important;
    }

    /* Timer badge */
    .timer-badge {
        font-size: 0.65rem !important;
        padding: 2px 5px !important;
    }
}

/* Extra small mobile optimization (375px and below) */
@media (max-width: 400px) {
    .kanban-board-wrapper {
        padding: 0.25rem !important;
    }

    .kanban-board-container {
        padding: 0.125rem !important;
        gap: 0.375rem !important;
    }

    .kanban-column {
        padding: 0.375rem !important;
    }

    .kanban-column-header {
        padding: 0.5rem 0.75rem !important;
    }

    .kanban-column-header h5 {
        font-size: 0.875rem !important;
        color: #ffffff !important;
        -webkit-text-fill-color: #ffffff !important;
        display: inline-block !important;
        visibility: visible !important;
    }

    .task-card {
        margin-bottom: 0.375rem !important;
    }

    .card-collapsed {
        padding: 0.5rem 0.5rem 0.5rem 0 !important;
    }

    .task-title h6 {
        font-size: 0.75rem !important;
        color: #ffffff !important;
        -webkit-text-fill-color: #ffffff !important;
        display: block !important;
        visibility: visible !important;
    }

    /* Context badge items for extra small screens */
    .context-badge {
        font-size: 0.6rem !important;
        padding: 2px 5px !important;
        max-width: 75px !important;
    }

    .context-badge .badge-text {
        max-width: 45px !important;
    }

    .context-badges .badge {
        font-size: 0.6rem !important;
        padding: 2px 5px !important;
        max-width: 75px !important;
    }
}

/* === UTILITIES === */
.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--danger) !important; }
.text-info { color: var(--info) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-secondary { color: var(--text-muted) !important; }

.bg-primary { background: var(--primary) !important; }
.bg-success { background: var(--success) !important; }
.bg-warning { background: var(--warning) !important; }
.bg-danger { background: var(--danger) !important; }
.bg-info { background: var(--info) !important; }
.bg-secondary { background: var(--surface-hover) !important; }
.bg-light { background: var(--surface-hover) !important; }
.bg-dark { background: var(--bg) !important; }

/* Dev Mode Stage Textareas */
.dev-textarea-readonly {
  background-color: #f8f9fa !important;
  color: #212529 !important;
}

.dev-textarea-readonly::placeholder {
  color: #6c757d !important;
}

.dev-textarea-editable {
  background-color: #1a2332 !important;
  color: #e9ecef !important;
}

.dev-textarea-editable::placeholder {
  color: #8b9aa8 !important;
}

.d-flex { display: flex !important; }
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-inline-block { display: inline-block !important; }
.d-inline-flex { display: inline-flex !important; }

.justify-content-between { justify-content: space-between !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-start { justify-content: flex-start !important; }
.justify-content-end { justify-content: flex-end !important; }

.align-items-center { align-items: center !important; }
.align-items-start { align-items: flex-start !important; }
.align-items-end { align-items: flex-end !important; }

.flex-wrap { flex-wrap: wrap !important; }
.flex-nowrap { flex-wrap: nowrap !important; }
.flex-grow-1 { flex-grow: 1 !important; }
.flex-shrink-0 { flex-shrink: 0 !important; }

.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }
.gap-4 { gap: 1.5rem !important; }

.m-0 { margin: 0 !important; }
.m-1 { margin: 0.25rem !important; }
.m-2 { margin: 0.5rem !important; }
.m-3 { margin: 1rem !important; }
.m-4 { margin: 1.5rem !important; }
.m-auto { margin: auto !important; }

.mx-auto { margin-left: auto !important; margin-right: auto !important; }
.my-auto { margin-top: auto !important; margin-bottom: auto !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }

.ms-1 { margin-left: 0.25rem !important; }
.ms-2 { margin-left: 0.5rem !important; }
.ms-auto { margin-left: auto !important; }

.me-1 { margin-right: 0.25rem !important; }
.me-2 { margin-right: 0.5rem !important; }
.me-auto { margin-right: auto !important; }

.p-0 { padding: 0 !important; }
.p-1 { padding: 0.25rem !important; }
.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 1rem !important; }
.p-4 { padding: 1.5rem !important; }

.px-0 { padding-left: 0 !important; padding-right: 0 !important; }
.px-1 { padding-left: 0.25rem !important; padding-right: 0.25rem !important; }
.px-2 { padding-left: 0.5rem !important; padding-right: 0.5rem !important; }
.px-3 { padding-left: 1rem !important; padding-right: 1rem !important; }

.py-0 { padding-top: 0 !important; padding-bottom: 0 !important; }
.py-1 { padding-top: 0.25rem !important; padding-bottom: 0.25rem !important; }
.py-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
.py-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
.py-4 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }

.w-25 { width: 25% !important; }
.w-50 { width: 50% !important; }
.w-75 { width: 75% !important; }
.w-100 { width: 100% !important; }
.w-auto { width: auto !important; }

.h-25 { height: 25% !important; }
.h-50 { height: 50% !important; }
.h-75 { height: 75% !important; }
.h-100 { height: 100% !important; }
.h-auto { height: auto !important; }

.text-center { text-align: center !important; }
.text-start { text-align: left !important; }
.text-end { text-align: right !important; }

.fw-bold { font-weight: bold !important; }
.fw-semibold { font-weight: 600 !important; }
.fw-normal { font-weight: normal !important; }

.fst-italic { font-style: italic !important; }

.text-uppercase { text-transform: uppercase !important; }
.text-lowercase { text-transform: lowercase !important; }
.text-capitalize { text-transform: capitalize !important; }

.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }
.position-fixed { position: fixed !important; }
.position-sticky { position: sticky !important; }

.top-0 { top: 0 !important; }
.bottom-0 { bottom: 0 !important; }
.start-0 { left: 0 !important; }
.end-0 { right: 0 !important; }

.border { border: 1px solid var(--border) !important; }
.border-0 { border: 0 !important; }
.border-top { border-top: 1px solid var(--border) !important; }
.border-bottom { border-bottom: 1px solid var(--border) !important; }

.rounded { border-radius: var(--radius) !important; }
.rounded-circle { border-radius: 50% !important; }
.rounded-0 { border-radius: 0 !important; }

.shadow { box-shadow: var(--shadow) !important; }
.shadow-none { box-shadow: none !important; }

.overflow-hidden { overflow: hidden !important; }
.overflow-auto { overflow: auto !important; }

.z-index-1 { z-index: 1 !important; }
.z-index-2 { z-index: 2 !important; }
.z-index-3 { z-index: 3 !important; }

/* === PAGE LAYOUT === */
.page-content {
  margin: 1.5rem 0;
  animation: fadeInUp 0.6s ease-out;
}

/* Add bottom padding when user is logged in to account for fixed status bar */
body.user-logged-in .page-content {
  padding-bottom: 70px;
}

.container-fluid {
  padding: 0 1rem;
        width: 100%;
    }
    
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.row {
    display: flex;
    flex-wrap: wrap;
  margin: 0 -0.75rem;
}

.col, .col-1, .col-2, .col-3, .col-4, .col-5, .col-6,
.col-7, .col-8, .col-9, .col-10, .col-11, .col-12,
.col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6,
.col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12,
.col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6,
.col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12,
.col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6,
.col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {
  padding: 0 0.75rem;
    flex: 1;
}

.col-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
.col-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }
.col-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
.col-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
.col-9 { flex: 0 0 75%; max-width: 75%; }
.col-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
.col-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
.col-12 { flex: 0 0 100%; max-width: 100%; }

@media (min-width: 576px) {
  .col-sm-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
  .col-sm-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
  .col-sm-3 { flex: 0 0 25%; max-width: 25%; }
  .col-sm-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
  .col-sm-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
  .col-sm-6 { flex: 0 0 50%; max-width: 50%; }
  .col-sm-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
  .col-sm-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
  .col-sm-9 { flex: 0 0 75%; max-width: 75%; }
  .col-sm-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
  .col-sm-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
  .col-sm-12 { flex: 0 0 100%; max-width: 100%; }
}

@media (min-width: 768px) {
  .col-md-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
  .col-md-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
  .col-md-3 { flex: 0 0 25%; max-width: 25%; }
  .col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
  .col-md-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
  .col-md-6 { flex: 0 0 50%; max-width: 50%; }
  .col-md-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
  .col-md-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
  .col-md-9 { flex: 0 0 75%; max-width: 75%; }
  .col-md-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
  .col-md-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
  .col-md-12 { flex: 0 0 100%; max-width: 100%; }
  
  .container-fluid {
    padding: 0 2rem;
  }
}

@media (min-width: 992px) {
  .col-lg-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
  .col-lg-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
  .col-lg-3 { flex: 0 0 25%; max-width: 25%; }
  .col-lg-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
  .col-lg-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
  .col-lg-6 { flex: 0 0 50%; max-width: 50%; }
  .col-lg-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
  .col-lg-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
  .col-lg-9 { flex: 0 0 75%; max-width: 75%; }
  .col-lg-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
  .col-lg-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
  .col-lg-12 { flex: 0 0 100%; max-width: 100%; }
}

/* === ACCESSIBILITY === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .task-card, .kanban-column-container, .card {
    transform: none !important;
  }
}

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

.sr-only:focus {
    position: static !important;
    width: auto !important;
    height: auto !important;
    padding: inherit !important;
    margin: inherit !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: normal !important;
}

:focus {
  outline: 2px solid var(--primary);
    outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* === PRINT STYLES === */
@media print {
  * {
    background: white !important;
    color: black !important;
    box-shadow: none !important;
  }
  
  .navbar, .btn, .modal, .dropdown-menu {
    display: none !important;
}

    .task-card {
    break-inside: avoid;
    margin-bottom: 1rem;
    border: 1px solid #000;
  }
}

/* ===================================
   DEVELOPMENT NOTE MODULE
   =================================== */

#dev-note-module-section {
  animation: fadeIn 0.3s ease-in-out;
}

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

#dev-note-module-section .card-header {
  background: #667eea;
  border: none;
  padding: 1rem 1.5rem;
}

#dev-note-module-section .card-header h5 {
  margin: 0;
  font-weight: 600;
  color: white;
}

#dev_note_current {
  background-color: #f8f9fa;
  border: 2px solid #e9ecef;
  transition: all 0.2s ease;
  font-family: 'Courier New', Courier, monospace;
  line-height: 1.6;
}

#dev_note_current:focus {
  background-color: white;
  border-color: #667eea;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
}

.version-item {
  transition: all 0.2s ease;
  background: #f8f9fa;
}

.version-item:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  background: #e9ecef;
}

.version-item .btn-group {
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.version-item:hover .btn-group {
  opacity: 1;
}

.version-preview {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.85rem;
  line-height: 1.4;
}

#save-dev-version-btn {
  background: #667eea;
  border: none;
  transition: all 0.3s ease;
}

#save-dev-version-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

#enrich-with-agent-btn {
  border: 2px solid #6c757d;
  color: #6c757d;
  background: white;
  transition: all 0.3s ease;
}

#enrich-with-agent-btn:hover {
  background: #6c757d;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108, 117, 125, 0.3);
}

#enrich-with-agent-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.view-version-btn {
  border-color: #17a2b8;
  color: #17a2b8;
}

.view-version-btn:hover {
  background-color: #17a2b8;
  color: white;
}

.restore-version-btn {
  border-color: #28a745;
  color: #28a745;
}

.restore-version-btn:hover {
  background-color: #28a745;
  color: white;
}

/* Development Mode Toggle Styling */
#dev_mode {
  width: 3rem;
  height: 1.5rem;
  cursor: pointer;
}

#dev_mode:checked {
  background-color: #764ba2;
  border-color: #764ba2;
}

#dev_mode:focus {
  box-shadow: 0 0 0 0.2rem rgba(118, 75, 162, 0.25);
}

/* Version History Styling */
.version-history {
  max-height: 600px;
  overflow-y: auto;
}

.version-history::-webkit-scrollbar {
  width: 8px;
}

.version-history::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.version-history::-webkit-scrollbar-thumb {
  background: #667eea;
  border-radius: 10px;
}

.version-history::-webkit-scrollbar-thumb:hover {
  background: #764ba2;
}

#version-count {
  background: #667eea;
  border: none;
  padding: 0.35rem 0.75rem;
  font-weight: 600;
}

/* Modal Enhancements for Dev Notes */
.modal-content pre {
  background: #f8f9fa;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #212529;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  #dev-note-module-section {
    margin-left: -15px;
    margin-right: -15px;
  }

  #dev-note-module-section .card-body {
    padding: 1rem;
  }

  #dev_note_current {
    font-size: 0.85rem;
  }

  .version-item {
    padding: 0.75rem !important;
  }

  .btn-group-sm .btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
  }
}

/* ==================== FILE ATTACHMENTS REFACTORED ==================== */

/* File Item Cards */
.file-item {
  transition: all 0.2s ease;
  background: #f8f9fa;
}

.file-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

.file-icon-wrapper {
  min-width: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-details {
  flex-grow: 1;
}

.file-actions {
  min-width: fit-content;
}

/* Existing Attachments List */
.existing-attachments-list .alert {
  background: #d1ecf1;
}

/* File Count Badge */
#file-attachments-section .badge {
  font-size: 0.8rem;
  padding: 0.35rem 0.6rem;
  vertical-align: middle;
}

/* Mobile Responsive - File Items */
@media (max-width: 768px) {
  .file-item .card-body {
    padding: 1rem !important;
  }

  .file-item .d-flex {
    flex-direction: column;
    align-items: flex-start !important;
  }

  .file-actions {
    width: 100%;
    margin-top: 1rem;
    margin-left: 0 !important;
  }

  .file-actions .btn {
    flex: 1;
  }

  .file-icon-wrapper {
    margin-bottom: 0.5rem;
  }
}