/* ==========================================================================
   ASANA UI DESIGN SYSTEM - STYLESHEET
   Inspiré par Asana & SaaS UI (https://www.saasui.design/application/asana)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS & CSS VARIABLES (Dark & Light Mode)
   -------------------------------------------------------------------------- */
:root {
  /* Police & Typographie */
  --font-family: 'Plus Jakarta Sans', 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Couleurs Mode Sombre (Défaut) */
  --bg-app: #0f141c;
  --bg-sidebar: #151c28;
  --bg-header: rgba(21, 28, 40, 0.85);
  --bg-card: #1e2738;
  --bg-card-hover: #263248;
  --bg-hover: rgba(255, 255, 255, 0.06);
  --bg-active: rgba(99, 102, 241, 0.15);
  --bg-input: #151c28;
  --bg-drawer: #18202f;

  /* Bordures */
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-light: rgba(255, 255, 255, 0.04);
  --border-color-hover: rgba(255, 255, 255, 0.18);
  --border-radius-sm: 6px;
  --border-radius-md: 10px;
  --border-radius-lg: 14px;
  --border-radius-xl: 20px;

  /* Couleurs Texte */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #0f172a;

  /* Marque & Accents */
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.35);
  --accent-magenta: #f43f5e;
  --accent-cyan: #06b6d4;

  /* Statuts Tâches */
  --status-todo-bg: rgba(59, 130, 246, 0.12);
  --status-todo-text: #60a5fa;
  --status-todo-border: rgba(96, 165, 250, 0.3);

  --status-in-progress-bg: rgba(245, 158, 11, 0.12);
  --status-in-progress-text: #fbbf24;
  --status-in-progress-border: rgba(251, 191, 36, 0.3);

  --status-done-bg: rgba(16, 185, 129, 0.12);
  --status-done-text: #34d399;
  --status-done-border: rgba(52, 211, 153, 0.3);

  /* Priorités */
  --priority-high-bg: rgba(239, 68, 68, 0.15);
  --priority-high-text: #f87171;
  --priority-medium-bg: rgba(245, 158, 11, 0.15);
  --priority-medium-text: #fbbf24;
  --priority-low-bg: rgba(148, 163, 184, 0.15);
  --priority-low-text: #cbd5e1;

  /* Ombres & Effets */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 35px -10px rgba(0, 0, 0, 0.6);
  --shadow-primary: 0 8px 20px -4px var(--primary-glow);
  --glass-backdrop: blur(16px) saturate(180%);

  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-drawer: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Theme Light Switch Override */
[data-theme="light"] {
  --bg-app: #f8fafc;
  --bg-sidebar: #ffffff;
  --bg-header: rgba(255, 255, 255, 0.95);
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-hover: rgba(0, 0, 0, 0.04);
  --bg-active: rgba(99, 102, 241, 0.08);
  --bg-input: #f1f5f9;
  --bg-drawer: #ffffff;

  --border-color: #e2e8f0;
  --border-color-light: #f1f5f9;
  --border-color-hover: #cbd5e1;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverse: #ffffff;

  /* Statuts Tâches Mode Clair */
  --status-todo-bg: #eff6ff;
  --status-todo-text: #2563eb;
  --status-todo-border: #bfdbfe;

  --status-in-progress-bg: #fffbeb;
  --status-in-progress-text: #d97706;
  --status-in-progress-border: #fde68a;

  --status-done-bg: #ecfdf5;
  --status-done-text: #059669;
  --status-done-border: #a7f3d0;

  /* Priorités Mode Clair */
  --priority-high-bg: #fef2f2;
  --priority-high-text: #dc2626;
  --priority-medium-bg: #fffbeb;
  --priority-medium-text: #d97706;
  --priority-low-bg: #f1f5f9;
  --priority-low-text: #475569;

  --kanban-col-bg: #f1f5f9;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* --------------------------------------------------------------------------
   2. RE-SET & BASE STYLES
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  font-family: var(--font-family);
  background-color: var(--bg-app);
  color: var(--text-primary);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  background: none;
  outline: none;
}

button {
  cursor: pointer;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.2);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.4);
}

/* --------------------------------------------------------------------------
   3. APP SHELL LAYOUT (Sidebar, Header, Main Content, Drawer)
   -------------------------------------------------------------------------- */
.asana-app {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  position: relative;
}

/* --- SIDEBAR --- */
.asana-sidebar {
  width: 260px;
  height: 100%;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: width var(--transition-normal);
  z-index: 30;
}

.asana-sidebar.collapsed {
  width: 72px;
}

.sidebar-header {
  height: 64px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.logo-icon {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #f43f5e, #6366f1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 12px rgba(244, 63, 94, 0.35);
}

.sidebar-toggle-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: background var(--transition-fast), color var(--transition-fast);
}
.sidebar-toggle-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* Sidebar Nav Scroll Area */
.sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.nav-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.section-title {
  font-size: 0.725rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 6px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--border-radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: background var(--transition-fast), color var(--transition-fast);
  position: relative;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--bg-active);
  color: var(--primary);
  font-weight: 600;
}

.nav-item .nav-badge {
  margin-left: auto;
  background: rgba(99, 102, 241, 0.2);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
}

.project-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Quick Create Button in Sidebar */
.sidebar-create-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #ffffff;
  border-radius: var(--border-radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: var(--shadow-primary);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  margin-bottom: 8px;
}

.sidebar-create-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -4px rgba(99, 102, 241, 0.5);
}

/* User Footer Profile */
.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
  background: #3b82f6;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.user-role {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* --- MAIN CONTAINER & HEADER --- */
.asana-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  position: relative;
  background-color: var(--bg-app);
}

.top-bar {
  height: 64px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-header);
  backdrop-filter: var(--glass-backdrop);
  border-bottom: 1px solid var(--border-color);
  z-index: 20;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 8px 16px;
  width: 340px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.search-box input {
  width: 100%;
  font-size: 0.875rem;
  color: var(--text-primary);
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.search-shortcut {
  font-size: 0.7rem;
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 2px 6px;
  color: var(--text-muted);
  font-weight: 600;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  background: var(--bg-hover);
  border: 1px solid var(--border-color-light);
  transition: all var(--transition-fast);
}

.icon-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-color);
}

/* PROJECT VIEW HEADER & TABS */
.project-header {
  padding: 20px 24px 0 24px;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.project-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.project-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}

.project-title-text {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.project-star {
  color: var(--text-muted);
  transition: color var(--transition-fast);
}
.project-star:hover, .project-star.active {
  color: #f59e0b;
}

.view-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid transparent;
  margin-bottom: -1px;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.view-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: var(--bg-app);
  border-bottom: 1px solid var(--border-color);
}

.control-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  border-color: var(--border-color-hover);
  color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   4. CONTENT VIEWS (LIST, KANBAN BOARD, TIMELINE)
   -------------------------------------------------------------------------- */
.views-container {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.view-panel {
  display: none;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: 24px;
}

.view-panel.active {
  display: block;
}

/* --- VUE LISTE --- */
.task-list-section {
  margin-bottom: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.section-header-bar {
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.section-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.count-badge {
  font-size: 0.75rem;
  background: var(--bg-hover);
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 99px;
}

/* Table Design */
.asana-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.asana-table th {
  padding: 10px 16px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}

.asana-table td {
  padding: 14px 16px;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border-color-light);
  color: var(--text-primary);
  vertical-align: middle;
}

.asana-table tr {
  transition: background var(--transition-fast);
  cursor: pointer;
}

.asana-table tr:hover {
  background: var(--bg-hover);
}

/* Custom Checkbox */
.custom-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.custom-checkbox:hover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
}

.custom-checkbox.completed {
  background: var(--status-done-text);
  border-color: var(--status-done-text);
  color: #ffffff;
}

.task-title-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
}

.task-title-cell.completed {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* Status & Priority Pills */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-pill.todo {
  background: var(--status-todo-bg);
  color: var(--status-todo-text);
  border: 1px solid var(--status-todo-border);
}

.status-pill.in-progress {
  background: var(--status-in-progress-bg);
  color: var(--status-in-progress-text);
  border: 1px solid var(--status-in-progress-border);
}

.status-pill.done {
  background: var(--status-done-bg);
  color: var(--status-done-text);
  border: 1px solid var(--status-done-border);
}

.priority-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: var(--border-radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
}

.priority-badge.high {
  background: var(--priority-high-bg);
  color: var(--priority-high-text);
}
.priority-badge.medium {
  background: var(--priority-medium-bg);
  color: var(--priority-medium-text);
}
.priority-badge.low {
  background: var(--priority-low-bg);
  color: var(--priority-low-text);
}

/* Avatar Stack */
.avatar-stack {
  display: flex;
  align-items: center;
}

.avatar-stack .avatar {
  width: 28px;
  height: 28px;
  font-size: 0.7rem;
  margin-left: -8px;
  border: 2px solid var(--bg-card);
}

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

/* --- VUE KANBAN BOARD --- */
.kanban-board {
  display: flex;
  gap: 20px;
  height: 100%;
  overflow-x: auto;
  align-items: flex-start;
  padding-bottom: 24px;
}

.kanban-column {
  width: 320px;
  min-width: 320px;
  background: rgba(30, 39, 56, 0.4);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  display: flex;
  flex-direction: column;
  max-height: 100%;
}

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

.column-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.95rem;
}

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

.kanban-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
  cursor: pointer;
}

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

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card-tag {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--bg-hover);
  color: var(--text-secondary);
}

.card-title {
  font-size: 0.925rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid var(--border-color-light);
}

.card-metrics {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.metric-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* --- VUE CHRONOLOGIE TIMELINE (Gantt) --- */
.timeline-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.timeline-header {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.1);
}

.timeline-sidebar-col {
  width: 240px;
  min-width: 240px;
  padding: 14px 16px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  border-right: 1px solid var(--border-color);
}

.timeline-days-grid {
  flex: 1;
  display: flex;
  overflow-x: auto;
}

.timeline-day {
  flex: 1;
  min-width: 80px;
  padding: 12px 8px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-right: 1px solid var(--border-color-light);
}

.timeline-day.today {
  background: rgba(99, 102, 241, 0.08);
  color: var(--primary);
  font-weight: 700;
}

.timeline-rows {
  flex: 1;
  overflow-y: auto;
}

.timeline-row {
  display: flex;
  border-bottom: 1px solid var(--border-color-light);
  height: 52px;
  align-items: center;
}

.timeline-task-name {
  width: 240px;
  min-width: 240px;
  padding: 0 16px;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-right: 1px solid var(--border-color);
}

.timeline-bar-area {
  flex: 1;
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.gantt-bar {
  position: absolute;
  height: 28px;
  border-radius: var(--border-radius-sm);
  background: linear-gradient(90deg, var(--primary), #818cf8);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  padding: 0 10px;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.gantt-bar:hover {
  transform: scaleY(1.08);
}

.gantt-bar.done {
  background: linear-gradient(90deg, #10b981, #34d399);
}

/* --------------------------------------------------------------------------
   5. TASK DETAIL SLIDE-OVER DRAWER
   -------------------------------------------------------------------------- */
.task-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.task-drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.task-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 580px;
  max-width: 90vw;
  height: 100vh;
  background: var(--bg-drawer);
  border-left: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  z-index: 101;
  transform: translateX(100%);
  transition: transform var(--transition-drawer);
  display: flex;
  flex-direction: column;
}

.task-drawer.open {
  transform: translateX(0);
}

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

.drawer-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: background var(--transition-fast);
}

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

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

.drawer-task-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  width: 100%;
  border: none;
  background: transparent;
  outline: none;
}

.fields-grid {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  font-size: 0.875rem;
}

.field-label {
  color: var(--text-muted);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.subtasks-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.subtasks-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.subtask-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg-hover);
  border-radius: var(--border-radius-sm);
}

/* Activity & Comments */
.comments-section {
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.comment-input-box {
  display: flex;
  gap: 12px;
}

.comment-input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 10px 14px;
  font-size: 0.875rem;
  color: var(--text-primary);
  resize: vertical;
  min-height: 70px;
}

/* --------------------------------------------------------------------------
   6. RESPONSIVE MEDIA QUERIES
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .asana-sidebar {
    position: absolute;
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
  }
  .asana-sidebar.open-mobile {
    transform: translateX(0);
  }
  .search-box {
    width: 200px;
  }
}
