
/* ── Reset & Base ───────────────────────────── */
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    body {
      font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
      background-color: #f0f2f5;
      color: #333333;
      font-size: 16px;
    }

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

    /* ── Navbar ─────────────────────────────────── */
    .navbar {
      background-color: #1a1a2e;
      color: white;
      padding: 14px 24px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      position: sticky;
      top: 0;
      z-index: 100;
    }

    .navbar .logo {
      font-size: 20px;
      font-weight: bold;
      color: #7c8cff;
    }

    .navbar .nav-links a {
      color: white;
      margin-left: 20px;
      font-size: 14px;
      transition: color 0.2s;
    }

    .navbar .nav-links a:hover { color: #7c8cff; }

    .navbar .user-info {
      font-size: 13px;
      color: #aaaaaa;
    }

    /* ── Page Container ──────────────────────────── */
    .container {
      max-width: 1200px;
      margin: 30px auto;
      padding: 0 20px;
    }

    .page-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 24px;
    }

    .page-title {
      font-size: 24px;
      font-weight: 700;
      color: #1a1a2e;
    }

    /* ── Cards ───────────────────────────────────── */
    .card {
      background: white;
      border-radius: 10px;
      padding: 20px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.08);
      margin-bottom: 16px;
    }

    /* ── Forms ───────────────────────────────────── */
    .form-group {
      margin-bottom: 18px;
    }

    .form-group label {
      display: block;
      font-size: 14px;
      font-weight: 600;
      margin-bottom: 6px;
      color: #555555;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
      width: 100%;
      padding: 10px 14px;
      border: 1px solid #dddddd;
      border-radius: 6px;
      font-size: 14px;
      transition: border-color 0.2s;
      outline: none;
    }

    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus {
      border-color: #7c8cff;
    }

    .error-message {
      color: #e53e3e;
      font-size: 12px;
      margin-top: 4px;
      display: none;
    }

    .error-message.show { display: block; }

    /* ── Alerts ──────────────────────────────────── */
    .alert {
      padding: 12px 16px;
      border-radius: 6px;
      margin-bottom: 16px;
      font-size: 14px;
      display: none;
    }

    .alert.show    { display: block; }
    .alert.success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
    .alert.error   { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
    .alert.info    { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }

    /* ── Notification Bell ───────────────────────── */
    .notification-bell {
      position: relative;
      cursor: pointer;
      font-size: 20px;
      margin-left: 20px;
    }

    .notification-badge {
      position: absolute;
      top: -6px;
      right: -8px;
      background: #e53e3e;
      color: white;
      border-radius: 50%;
      width: 18px;
      height: 18px;
      font-size: 11px;
      display: flex;
      align-items: center;
      justify-content: center;
      display: none;
    }

    .notification-badge.show { display: flex; }

    /* ── Loading Spinner ─────────────────────────── */
    .spinner {
      display: inline-block;
      width: 20px;
      height: 20px;
      border: 3px solid #f3f3f3;
      border-top: 3px solid #7c8cff;
      border-radius: 50%;
      animation: spin 0.8s linear infinite;
    }

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

/* ============================================================
   TMS DESIGN SYSTEM
   Primary: #4F46E5 | Background: #F8FAFC | Text: #1F2937
   ============================================================ */

/* ── Google Font ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600;700&display=swap');

/* ── CSS Variables ───────────────────────────────────────── */
:root {
  --primary:        #4F46E5;
  --primary-hover:  #4338CA;
  --primary-light:  #EEF2FF;
  --secondary:      #6366F1;
  --success:        #10B981;
  --success-light:  #D1FAE5;
  --warning:        #F59E0B;
  --warning-light:  #FEF3C7;
  --danger:         #EF4444;
  --danger-light:   #FEE2E2;
  --bg:             #F8FAFC;
  --card:           #FFFFFF;
  --text:           #1F2937;
  --text-secondary: #6B7280;
  --text-muted:     #9CA3AF;
  --border:         #E5E7EB;
  --border-light:   #F3F4F6;
  --shadow-sm:      0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow:         0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-md:      0 10px 15px rgba(0,0,0,0.08), 0 4px 6px rgba(0,0,0,0.04);
  --shadow-lg:      0 20px 25px rgba(0,0,0,0.1), 0 10px 10px rgba(0,0,0,0.04);
  --radius-sm:      6px;
  --radius:         10px;
  --radius-lg:      16px;
  --radius-xl:      24px;
  --sidebar-width:  260px;
  --transition:     all 0.2s ease;
}

/* ── Reset & Base ────────────────────────────────────────── */
*, *::before, *::after {
  margin: 0; padding: 0;
  box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* ── Layout: Sidebar + Main ──────────────────────────────── */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 32px;
  max-width: calc(100vw - var(--sidebar-width));
}

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--card);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: var(--transition);
}

.sidebar-logo {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-logo-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 18px;
  box-shadow: 0 4px 12px rgba(79,70,229,0.3);
}

.sidebar-logo-text {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}

.sidebar-logo-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.sidebar-section-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 8px 8px 6px;
  margin-top: 8px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 2px;
  text-decoration: none;
}

.sidebar-link:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.sidebar-link.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.sidebar-link .nav-icon {
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}

.sidebar-link .nav-badge {
  margin-left: auto;
  background: var(--primary);
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 20px;
  min-width: 20px;
  text-align: center;
}

.sidebar-user {
  padding: 16px;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: capitalize;
}

.sidebar-logout {
  width: 28px; height: 28px;
  border: none;
  background: var(--border-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition);
  flex-shrink: 0;
  font-size: 14px;
}

.sidebar-logout:hover {
  background: var(--danger-light);
  color: var(--danger);
}

/* ── Top Bar ─────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;

   z-index: 100;

}

.topbar-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.4px;
}

.topbar-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── Notification Bell ───────────────────────────────────── */
.notif-btn {
  position: relative;
  width: 38px; height: 38px;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  color: var(--text-secondary);
  transition: var(--transition);
}

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

.notif-badge {
  position: absolute;
  top: -5px; right: -5px;
  background: var(--danger);
  color: white;
  border-radius: 50%;
  width: 18px; height: 18px;
  font-size: 10px;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg);
}

.notif-badge.show { display: flex; }

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

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

/* ── Stat Cards ──────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
}

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

.stat-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.stat-icon.indigo  { background: var(--primary-light); }
.stat-icon.blue    { background: #EFF6FF; }
.stat-icon.emerald { background: var(--success-light); }
.stat-icon.amber   { background: var(--warning-light); }

.stat-info {}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  letter-spacing: -0.5px;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 500;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn:active   { transform: scale(0.97); }

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 8px rgba(79,70,229,0.25);
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 14px rgba(79,70,229,0.35);
  transform: translateY(-1px);
}

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

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

.btn-danger {
  background: var(--danger);
  color: white;
  box-shadow: 0 2px 8px rgba(239,68,68,0.2);
}

.btn-danger:hover {
  background: #DC2626;
  box-shadow: 0 4px 14px rgba(239,68,68,0.3);
}

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

.btn-success:hover { background: #059669; }

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

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

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

.btn-lg {
  padding: 12px 24px;
  font-size: 15px;
}

/* ── Badges ──────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.badge-high    { background: var(--danger-light);  color: #B91C1C; }
.badge-medium  { background: var(--warning-light); color: #92400E; }
.badge-low     { background: var(--success-light); color: #065F46; }

.badge-todo        { background: var(--border-light); color: var(--text-secondary); }
.badge-in_progress { background: #DBEAFE; color: #1D4ED8; }
.badge-completed   { background: var(--success-light); color: #065F46; }

.badge-admin          { background: #F3E8FF; color: #7E22CE; }
.badge-project_manager { background: #DBEAFE; color: #1D4ED8; }
.badge-collaborator   { background: var(--border-light); color: var(--text-secondary); }

/* ── Forms ───────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 7px;
}

.form-label span {
  color: var(--danger);
  margin-left: 2px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--card);
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}

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

.form-control.is-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(239,68,68,0.1);
}

.form-error {
  font-size: 12px;
  color: var(--danger);
  margin-top: 5px;
  display: none;
}

.form-error.show { display: block; }

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 5px;
}

/* ── Alerts ──────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  display: none;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  border: 1px solid transparent;
}

.alert.show     { display: flex; }
.alert-success  { background: var(--success-light); color: #065F46; border-color: #A7F3D0; }
.alert-error    { background: var(--danger-light);  color: #991B1B; border-color: #FECACA; }
.alert-warning  { background: var(--warning-light); color: #92400E; border-color: #FDE68A; }
.alert-info     { background: #EFF6FF; color: #1D4ED8; border-color: #BFDBFE; }

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

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead th {
  background: var(--bg);
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

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

.data-table tbody tr:last-child td { border-bottom: none; }

.data-table tbody tr {
  transition: var(--transition);
  cursor: pointer;
}

.data-table tbody tr:hover td { background: #FAFBFF; }

/* ── Kanban Board ────────────────────────────────────────── */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: start;
}

.kanban-column {
  background: var(--border-light);
  border-radius: var(--radius-lg);
  padding: 16px;
  min-height: 500px;
}

.kanban-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}

.kanban-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.kanban-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}

.col-todo      .kanban-dot { background: var(--text-muted); }
.col-progress  .kanban-dot { background: var(--primary); }
.col-done      .kanban-dot { background: var(--success); }

.kanban-col-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.kanban-count {
  background: var(--border);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
}

.kanban-cards { min-height: 100px; }

.kanban-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  cursor: grab;
  transition: var(--transition);
  position: relative;
  border-left: 4px solid transparent;
}

.kanban-card.priority-high    { border-left-color: var(--danger); }
.kanban-card.priority-medium  { border-left-color: var(--warning); }
.kanban-card.priority-low     { border-left-color: var(--success); }

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

.kanban-card.dragging {
  opacity: 0.5;
  cursor: grabbing;
  transform: rotate(2deg);
}

.kanban-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.4;
}

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

.kanban-card-date {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 3px;
}

/* ── Modal ───────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.show { display: flex; }

.modal {
  background: var(--card);
  border-radius: var(--radius-xl);
  padding: 28px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.modal-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.modal-close {
  width: 30px; height: 30px;
  border: none; background: var(--border-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: 16px;
  transition: var(--transition);
}

.modal-close:hover { background: var(--danger-light); color: var(--danger); }

/* ── Empty State ─────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.4;
}

.empty-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.empty-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* ── Loading Skeleton ────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg,
    var(--border-light) 25%,
    var(--border) 50%,
    var(--border-light) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-text  { height: 14px; margin-bottom: 8px; }
.skeleton-title { height: 20px; width: 60%; margin-bottom: 12px; }
.skeleton-card  { height: 100px; border-radius: var(--radius-lg); }

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

.toast {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 340px;
  min-width: 280px;
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.toast-icon   { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.toast-title  { font-size: 13px; font-weight: 700; color: var(--text); }
.toast-msg    { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ── View Toggle ─────────────────────────────────────────── */
.view-toggle {
  display: flex;
  background: var(--border-light);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 2px;
}

.view-toggle-btn {
  padding: 6px 14px;
  border: none;
  background: transparent;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.view-toggle-btn.active {
  background: var(--card);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* ── Filter Bar ──────────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-select {
  padding: 8px 32px 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  background: var(--card);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: var(--transition);
  outline: none;
}

.filter-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}

/* ── Page Section ────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

/* ── Divider ─────────────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--border-light);
  margin: 20px 0;
}

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
    padding: 16px;
    max-width: 100vw;
  }
  .kanban-board {
    grid-template-columns: 1fr;
  }
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* ── Notification Panel ──────────────────────── */
.notif-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.4);
}
.notif-overlay.open { display: block; }

.notif-panel {
  position: fixed;
  top: 0; right: -380px;
  width: 360px;
  height: 100vh;
  background: var(--card);
  border-left: 1px solid var(--border);
  box-shadow: -4px 0 24px rgba(0,0,0,0.2);
  z-index: 2001;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}
.notif-panel.open { right: 0; }

.notif-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  min-height: 60px;
}
.notif-panel-title {
  font-weight: 600;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.notif-mark-all {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 12px;
  cursor: pointer;
}
.notif-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  cursor: default;
  transition: background 0.2s;
}
.notif-item:hover { 
  background: var(--border-light); /* was var(--surface-hover) — not defined */
}

.notif-item.unread { 
  background: var(--primary-light); /* was rgba hardcode — use your token */
}
.notif-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--primary);
  margin-top: 5px;
  flex-shrink: 0;
  opacity: 0;
}
.notif-item.unread .notif-dot { opacity: 1; }
.notif-item-msg {
  font-size: 13px;
  color: var(--text);
  line-height: 1.4;
}
.notif-item-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}
.notif-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
  font-size: 13px;
}

.notif-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 6px;
  line-height: 1;
  flex-shrink: 0; /* prevent it from being squished */
  transition: background 0.2s;
}

.notif-close-btn:hover {
  background: var(--border-light); /* was var(--surface-hover) — not defined */
  color: var(--text);
}
.notif-panel-actions {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  flex-shrink: 0;
}

/* ── Auth Pages ──────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-container {
  width: 100%;
  max-width: 440px;  /* ← controls card width */
}

.auth-card {
  background: var(--card);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.auth-logo-text {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.4px;
}

.auth-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}

.auth-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 28px;
}
#confirmOverlay {
  z-index: 3000;
}

