/* ===================== CSS VARIABLES ===================== */
:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  --success: #10b981;
  --success-light: #d1fae5;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --info: #3b82f6;
  --info-light: #dbeafe;
  --purple: #8b5cf6;
  --purple-light: #ede9fe;

  --sidebar-bg: #0f172a;
  --sidebar-hover: #1e293b;
  --sidebar-active: #1e293b;
  --sidebar-text: #94a3b8;
  --sidebar-text-active: #f1f5f9;
  --sidebar-border: #1e293b;

  --content-bg: #f8fafc;
  --card-bg: #ffffff;
  --topbar-bg: #ffffff;

  --text: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border: #e2e8f0;
  --border-focus: #4f46e5;

  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.08), 0 2px 4px -1px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);

  --sidebar-width: 250px;
  --topbar-height: 64px;
  --transition: 0.2s ease;
}

/* ===================== RESET ===================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: var(--text); background: var(--content-bg); line-height: 1.5; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; font-size: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }
ul { list-style: none; }
svg { display: block; flex-shrink: 0; }

/* ===================== UTILITIES ===================== */
.hidden { display: none !important; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.text-sm { font-size: .8rem; }
.text-muted { color: var(--text-muted); }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.w-full { width: 100%; }

/* ===================== LOGIN PAGE ===================== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #312e81 100%);
  padding: 24px;
}

.login-card {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.logo-icon {
  width: 56px;
  height: 56px;
  background: var(--primary);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  color: #fff;
}
.logo-icon svg { width: 28px; height: 28px; }
.logo-icon-sm { width: 36px; height: 36px; border-radius: 8px; }
.logo-icon-sm svg { width: 18px; height: 18px; }

.login-title { font-size: 1.75rem; font-weight: 700; color: var(--text); }
.login-subtitle { color: var(--text-muted); font-size: .9rem; margin-top: 4px; }

.login-form { display: flex; flex-direction: column; gap: 16px; }

.login-error {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--danger-light);
  color: var(--danger);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: .875rem;
}
.login-error svg { width: 16px; height: 16px; flex-shrink: 0; }

.quick-access {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.quick-access-title { font-size: .8rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 12px; }
.quick-access-buttons { display: flex; flex-wrap: wrap; gap: 8px; }

.quick-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: .8rem;
  color: var(--text);
  transition: all var(--transition);
}
.quick-btn:hover { border-color: var(--primary); background: var(--primary-light); }

.quick-badge {
  font-size: .7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  color: #fff;
}
.quick-btn-admin .quick-badge { background: var(--danger); }
.quick-btn-manager .quick-badge { background: var(--warning); color: #fff; }
.quick-btn-user .quick-badge { background: var(--info); }

/* ===================== APP LAYOUT ===================== */
.app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* SIDEBAR */
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.sidebar-header {
  padding: 20px 16px;
  border-bottom: 1px solid var(--sidebar-border);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}
.sidebar-title { font-size: 1.1rem; font-weight: 700; color: #f1f5f9; }

.sidebar-nav {
  flex: 1;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--sidebar-text);
  font-size: .9rem;
  font-weight: 500;
  transition: all var(--transition);
}
.nav-item:hover { background: var(--sidebar-hover); color: var(--sidebar-text-active); }
.nav-item.active { background: var(--primary); color: #fff; }

.nav-icon { width: 18px; height: 18px; }

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--sidebar-border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-user { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.sidebar-user-info { min-width: 0; }
.sidebar-user-name { display: block; font-size: .85rem; font-weight: 600; color: #f1f5f9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { display: block; font-size: .75rem; color: var(--sidebar-text); }

.btn-logout {
  padding: 6px;
  border-radius: var(--radius);
  color: var(--sidebar-text);
  transition: all var(--transition);
  flex-shrink: 0;
}
.btn-logout:hover { background: var(--sidebar-hover); color: #ef4444; }
.btn-logout svg { width: 18px; height: 18px; }

/* MAIN */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--content-bg);
}

/* TOPBAR */
.topbar {
  height: var(--topbar-height);
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  flex-shrink: 0;
  box-shadow: var(--shadow);
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.page-title { font-size: 1.2rem; font-weight: 700; color: var(--text); }

/* CONTENT */
.content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

/* ===================== BUTTONS ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }

.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }

.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }

.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: #dc2626; border-color: #dc2626; }

.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-success:hover { background: #059669; border-color: #059669; }

.btn-full { width: 100%; justify-content: center; padding: 11px 18px; }

.btn-sm { padding: 5px 10px; font-size: .8rem; }
.btn-sm svg { width: 14px; height: 14px; }

.btn-icon {
  padding: 6px;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  border: 1px solid transparent;
}
.btn-icon svg { width: 15px; height: 15px; }
.btn-icon-edit { color: var(--info); background: var(--info-light); }
.btn-icon-edit:hover { background: var(--info); color: #fff; }
.btn-icon-delete { color: var(--danger); background: var(--danger-light); }
.btn-icon-delete:hover { background: var(--danger); color: #fff; }
.btn-icon-view { color: var(--text-muted); background: #f1f5f9; }
.btn-icon-view:hover { background: var(--text-muted); color: #fff; }

/* ===================== FORMS ===================== */
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-label { font-size: .85rem; font-weight: 600; color: var(--text); }
.form-label-optional { font-size: .75rem; font-weight: 400; color: var(--text-muted); }

.form-input, .form-select, .form-textarea {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .875rem;
  color: var(--text);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(79,70,229,.12);
}
.form-textarea { resize: vertical; min-height: 80px; }

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

.form-hint { font-size: .78rem; color: var(--text-muted); margin-top: 2px; }

/* Slider */
.form-slider {
  width: 100%;
  height: 6px;
  appearance: none;
  border-radius: 3px;
  background: var(--border);
  outline: none;
  cursor: pointer;
  padding: 0;
  border: none;
}
.form-slider::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--primary);
}
.slider-wrapper { position: relative; padding: 8px 0; }
.slider-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 8px;
}

/* ===================== CARDS ===================== */
.card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-body { padding: 20px; }
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-title { font-size: .95rem; font-weight: 700; color: var(--text); }

/* STAT CARDS */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 16px;
}
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-icon svg { width: 22px; height: 22px; }
.stat-icon-primary { background: var(--primary-light); color: var(--primary); }
.stat-icon-success { background: var(--success-light); color: var(--success); }
.stat-icon-warning { background: var(--warning-light); color: var(--warning); }
.stat-icon-danger { background: var(--danger-light); color: var(--danger); }
.stat-icon-info { background: var(--info-light); color: var(--info); }
.stat-icon-purple { background: var(--purple-light); color: var(--purple); }

.stat-info {}
.stat-value { font-size: 1.6rem; font-weight: 800; color: var(--text); line-height: 1; }
.stat-label { font-size: .8rem; color: var(--text-muted); margin-top: 3px; }

/* ===================== BADGES ===================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-todo { background: #f1f5f9; color: var(--text-muted); }
.badge-en_cours { background: var(--info-light); color: var(--info); }
.badge-termine { background: var(--success-light); color: var(--success); }
.badge-annule { background: var(--danger-light); color: var(--danger); }

.badge-haute { background: var(--danger-light); color: var(--danger); }
.badge-moyenne { background: var(--warning-light); color: var(--warning); }
.badge-basse { background: var(--success-light); color: var(--success); }

.badge-admin { background: var(--danger-light); color: var(--danger); }
.badge-responsable { background: var(--warning-light); color: #b45309; }
.badge-utilisateur { background: var(--info-light); color: var(--info); }

/* ===================== AVATAR ===================== */
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  text-transform: uppercase;
}
.avatar-sm { width: 32px; height: 32px; font-size: .75rem; }
.avatar-lg { width: 44px; height: 44px; font-size: .95rem; }
.avatar-admin { background: var(--danger); }
.avatar-responsable { background: var(--warning); }
.avatar-utilisateur { background: var(--info); }

/* ===================== TABLE ===================== */
.table-wrapper {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
.table th {
  background: #f8fafc;
  padding: 12px 16px;
  text-align: left;
  font-size: .78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text);
}
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #f8fafc; }

.table-actions { display: flex; gap: 6px; align-items: center; }

/* ===================== SEARCH/FILTER BAR ===================== */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.search-input-wrapper {
  position: relative;
  flex: 1;
  min-width: 180px;
}
.search-input-wrapper svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}
.search-input {
  padding: 8px 12px 8px 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .875rem;
  background: #fff;
  width: 100%;
  transition: border-color var(--transition);
}
.search-input:focus { outline: none; border-color: var(--primary); }

.filter-select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .875rem;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  transition: border-color var(--transition);
}
.filter-select:focus { outline: none; border-color: var(--primary); }

/* ===================== PROGRESS BAR ===================== */
.progress-bar-wrapper { width: 100%; background: var(--border); border-radius: 100px; overflow: hidden; }
.progress-bar-fill {
  height: 8px;
  border-radius: 100px;
  transition: width .4s ease;
  background: var(--primary);
}
.progress-bar-fill.progress-low { background: var(--danger); }
.progress-bar-fill.progress-mid { background: var(--warning); }
.progress-bar-fill.progress-high { background: var(--success); }

.progress-label { font-size: .8rem; font-weight: 600; color: var(--text-muted); }

/* ===================== TASK/OBJECTIVE CARDS ===================== */
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.task-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 16px;
  transition: box-shadow var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.task-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

.task-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.task-card-title { font-size: .9rem; font-weight: 700; color: var(--text); line-height: 1.3; flex: 1; }
.task-card-desc { font-size: .82rem; color: var(--text-muted); line-height: 1.4; }
.task-card-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.task-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.task-card-assigned { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--text-muted); }

/* ===================== TEAM CARDS ===================== */
.team-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow var(--transition);
}
.team-card:hover { box-shadow: var(--shadow-md); }

.team-card-header {
  padding: 20px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: #fff;
  position: relative;
}
.team-card-name { font-size: 1.05rem; font-weight: 700; }
.team-card-desc { font-size: .82rem; opacity: .85; margin-top: 4px; }
.team-card-body { padding: 16px 20px; }
.team-card-manager { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.team-card-manager-label { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); display: block; margin-bottom: 6px; }
.team-card-members-label { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-bottom: 8px; }
.team-members-list { display: flex; flex-direction: column; gap: 6px; }
.team-member-item { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: var(--radius); transition: background var(--transition); }
.team-member-item:hover { background: #f8fafc; }
.team-member-name { font-size: .85rem; font-weight: 500; color: var(--text); }
.team-card-footer { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; }

/* ===================== MODAL ===================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  backdrop-filter: blur(2px);
}

.modal {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: modalIn .2s ease;
}
.modal-sm { max-width: 380px; }
.modal-lg { max-width: 680px; }

@keyframes modalIn {
  from { opacity: 0; transform: scale(.95) translateY(-10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.modal-title { font-size: 1.05rem; font-weight: 700; color: var(--text); }

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition);
  flex-shrink: 0;
}
.modal-close svg { width: 18px; height: 18px; }
.modal-close:hover { background: var(--danger-light); color: var(--danger); }

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

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

.confirm-message { font-size: .9rem; color: var(--text); line-height: 1.5; }

/* ===================== ROLE TABS ===================== */
.tabs {
  display: flex;
  gap: 4px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: var(--radius);
  width: fit-content;
  margin-bottom: 16px;
}
.tab {
  padding: 7px 16px;
  border-radius: 6px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}
.tab:hover { color: var(--text); }
.tab.active { background: #fff; color: var(--primary); box-shadow: var(--shadow); }

/* ===================== EMPTY STATE ===================== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  gap: 12px;
  color: var(--text-muted);
}
.empty-state svg { width: 48px; height: 48px; opacity: .35; }
.empty-state-title { font-size: 1rem; font-weight: 600; color: var(--text); }
.empty-state-sub { font-size: .85rem; color: var(--text-muted); }

/* ===================== DATE BADGE ===================== */
.date-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .78rem;
  color: var(--text-muted);
}
.date-badge svg { width: 12px; height: 12px; }
.date-badge.overdue { color: var(--danger); font-weight: 600; }
.date-badge.soon { color: var(--warning); font-weight: 600; }

/* ===================== SECTION HEADER ===================== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
}
.section-title { font-size: 1rem; font-weight: 700; color: var(--text); }

/* ===================== STATUS CHANGE BUTTONS ===================== */
.status-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.status-btn {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition);
}
.status-btn-next { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }
.status-btn-next:hover { background: var(--primary); color: #fff; }
.status-btn-cancel { background: var(--danger-light); color: var(--danger); border-color: var(--danger); }
.status-btn-cancel:hover { background: var(--danger); color: #fff; }

/* ===================== DASHBOARD CHARTS ===================== */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 8px;
}
@media (max-width: 900px) {
  .dashboard-grid { grid-template-columns: 1fr; }
}

.task-status-list { display: flex; flex-direction: column; gap: 12px; padding: 4px 0; }
.task-status-row { display: flex; flex-direction: column; gap: 4px; }
.task-status-label-row { display: flex; align-items: center; justify-content: space-between; }
.task-status-label { font-size: .85rem; font-weight: 500; color: var(--text); }
.task-status-count { font-size: .85rem; font-weight: 700; color: var(--text); }

.deadline-list { display: flex; flex-direction: column; gap: 8px; }
.deadline-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: #f8fafc;
  border: 1px solid var(--border);
}
.deadline-item-info { flex: 1; min-width: 0; }
.deadline-item-title { font-size: .85rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deadline-item-date { font-size: .78rem; color: var(--text-muted); }

/* ===================== SCROLLBAR ===================== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
  .sidebar { width: 60px; min-width: 60px; }
  .sidebar-title, .sidebar-user-info, .nav-item span { display: none; }
  .sidebar-header { padding: 12px; justify-content: center; }
  .sidebar-logo { justify-content: center; }
  .nav-item { justify-content: center; padding: 10px; }
  .sidebar-footer { padding: 10px; justify-content: center; }
  .sidebar-user { justify-content: center; }
  .form-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .content { padding: 16px; }
  .topbar { padding: 0 16px; }
}
