/* ============================================================
   Styles Studio - Task Management System
   Main Stylesheet
   Color Palette: Forest Green, White, Steel Blue
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;1,400&display=swap');

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  --green-900: #0d2b1f;
  --green-800: #1a3d2b;
  --green-700: #1e5c3a;
  --green-600: #2d7a52;
  --green-500: #3a9e6a;
  --green-400: #4dbf80;
  --green-300: #7dd4a0;
  --green-100: #d6f0e3;
  --green-50:  #edf8f2;

  --blue-900:  #0d1f3c;
  --blue-700:  #1b3f7a;
  --blue-500:  #2563eb;
  --blue-400:  #3b82f6;
  --blue-300:  #93c5fd;
  --blue-100:  #dbeafe;
  --blue-50:   #eff6ff;

  --white:     #ffffff;
  --gray-50:   #f8fafc;
  --gray-100:  #f1f5f9;
  --gray-200:  #e2e8f0;
  --gray-300:  #cbd5e1;
  --gray-400:  #94a3b8;
  --gray-500:  #64748b;
  --gray-600:  #475569;
  --gray-700:  #334155;
  --gray-800:  #1e293b;
  --gray-900:  #0f172a;

  --red-500:   #ef4444;
  --red-100:   #fee2e2;
  --orange-500:#f97316;
  --orange-100:#ffedd5;
  --yellow-500:#eab308;
  --yellow-100:#fef9c3;

  /* Semantic tokens */
  --primary:        var(--green-600);
  --primary-dark:   var(--green-700);
  --primary-light:  var(--green-100);
  --accent:         var(--blue-500);
  --accent-light:   var(--blue-100);

  --sidebar-bg:     var(--green-900);
  --sidebar-text:   rgba(255,255,255,0.85);
  --sidebar-hover:  rgba(255,255,255,0.08);
  --sidebar-active: var(--green-700);
  --sidebar-width:  260px;

  --card-bg:        var(--white);
  --card-border:    var(--gray-200);
  --card-shadow:    0 1px 3px rgba(0,0,0,0.07), 0 4px 16px rgba(0,0,0,0.04);
  --card-shadow-lg: 0 4px 6px rgba(0,0,0,0.07), 0 12px 32px rgba(0,0,0,0.1);

  --body-bg:        var(--gray-50);
  --text-primary:   var(--gray-900);
  --text-secondary: var(--gray-500);
  --text-muted:     var(--gray-400);

  --radius-sm:  6px;
  --radius:     10px;
  --radius-lg:  16px;
  --radius-xl:  24px;

  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --font-main:  'DM Sans', sans-serif;
  --font-head:  'Sora', sans-serif;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  background: var(--body-bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

img { max-width: 100%; display: block; }

ul { list-style: none; }

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--gray-900);
  line-height: 1.2;
}

.page-title { font-size: 1.6rem; font-weight: 700; }
.section-title { font-size: 1.1rem; font-weight: 600; }
.text-sm  { font-size: 0.85rem; }
.text-xs  { font-size: 0.78rem; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-success { color: var(--green-600); }
.text-danger  { color: var(--red-500); }
.text-warning { color: var(--orange-500); }
.text-info    { color: var(--blue-500); }
.fw-600 { font-weight: 600; }

/* ── Layout ─────────────────────────────────────────────────── */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ─────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform var(--transition);
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-logo {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}

.sidebar-logo .brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  width: 38px; height: 38px;
  background: var(--green-500);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
  color: white;
  flex-shrink: 0;
}

.brand-text h2 {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 700;
  color: white;
  line-height: 1.1;
}

.brand-text span {
  font-size: 0.7rem;
  color: var(--green-300);
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sidebar-user {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.user-avatar {
  width: 36px; height: 36px;
  background: var(--green-600);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  color: white;
  flex-shrink: 0;
}

.user-info { flex: 1; min-width: 0; }
.user-info .name {
  font-weight: 600;
  font-size: 0.85rem;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-info .role {
  font-size: 0.72rem;
  color: var(--green-300);
  text-transform: capitalize;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
}

.nav-section-label {
  padding: 12px 20px 4px;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.35);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: var(--sidebar-text);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  border-radius: 0;
  font-size: 0.875rem;
  font-weight: 500;
  position: relative;
}

.nav-item:hover {
  background: var(--sidebar-hover);
  color: white;
}

.nav-item.active {
  background: var(--green-700);
  color: white;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--green-400);
  border-radius: 0 2px 2px 0;
}

.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.8; }
.nav-item.active svg, .nav-item:hover svg { opacity: 1; }

.nav-badge {
  margin-left: auto;
  background: var(--green-500);
  color: white;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}

.btn-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  font-size: 0.85rem;
  font-family: var(--font-main);
  transition: all var(--transition);
}
.btn-logout:hover { background: rgba(239,68,68,0.15); color: #fca5a5; border-color: rgba(239,68,68,0.3); }
.btn-logout svg { width: 16px; height: 16px; }

/* ── Main Content ────────────────────────────────────────────── */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Top Bar ─────────────────────────────────────────────────── */
.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--card-border);
  padding: 0 28px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  gap: 16px;
}

.topbar-left { display: flex; align-items: center; gap: 12px; }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--gray-600);
}
.menu-toggle svg { width: 22px; height: 22px; }

.topbar-title { font-size: 1.05rem; font-weight: 600; font-family: var(--font-head); }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.notif-btn {
  position: relative;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-600);
  transition: background var(--transition);
}
.notif-btn:hover { background: var(--gray-100); }
.notif-btn svg { width: 20px; height: 20px; }

.notif-dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 8px; height: 8px;
  background: var(--red-500);
  border-radius: 50%;
  border: 2px solid white;
}

/* ── Page Content ────────────────────────────────────────────── */
.page-content {
  flex: 1;
  padding: 28px;
}

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

.card-header {
  padding: 18px 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-body { padding: 20px 22px; }
.card-footer { padding: 14px 22px; border-top: 1px solid var(--card-border); }

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

.stat-card {
  background: var(--white);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  box-shadow: var(--card-shadow);
  transition: box-shadow var(--transition), transform var(--transition);
}
.stat-card:hover { box-shadow: var(--card-shadow-lg); transform: translateY(-1px); }

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

.stat-icon.green { background: var(--green-100); color: var(--green-700); }
.stat-icon.blue  { background: var(--blue-100);  color: var(--blue-700); }
.stat-icon.orange{ background: var(--orange-100);color: var(--orange-500); }
.stat-icon.red   { background: var(--red-100);   color: var(--red-500); }

.stat-info { flex: 1; }
.stat-value {
  font-family: var(--font-head);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1;
}
.stat-label { font-size: 0.8rem; color: var(--text-secondary); margin-top: 4px; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
  line-height: 1;
}
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

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

.btn-secondary {
  background: white;
  color: var(--gray-700);
  border-color: var(--gray-300);
}
.btn-secondary:hover:not(:disabled) { background: var(--gray-50); border-color: var(--gray-400); }

.btn-danger {
  background: var(--red-500);
  color: white;
  border-color: var(--red-500);
}
.btn-danger:hover:not(:disabled) { background: #dc2626; }

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

.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-lg { padding: 12px 24px; font-size: 0.95rem; }
.btn-block { width: 100%; justify-content: center; }

.btn-loading::after {
  content: '';
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

.form-label {
  display: block;
  font-size: 0.855rem;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 6px;
}
.form-label .required { color: var(--red-500); margin-left: 2px; }

.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 0.875rem;
  color: var(--text-primary);
  background: white;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  appearance: none;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(45,122,82,0.12);
}
.form-control::placeholder { color: var(--text-muted); }
.form-control.error { border-color: var(--red-500); }

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

select.form-control { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; }

.form-error { font-size: 0.78rem; color: var(--red-500); margin-top: 4px; }

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

.file-upload-area {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.file-upload-area:hover, .file-upload-area.dragover {
  border-color: var(--primary);
  background: var(--green-50);
}
.file-upload-area input { display: none; }
.file-upload-icon { width: 40px; height: 40px; color: var(--gray-400); margin: 0 auto 8px; }
.file-upload-text { font-size: 0.875rem; color: var(--text-secondary); }
.file-upload-text strong { color: var(--primary); }

/* ── Tables ───────────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table thead th {
  padding: 11px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  background: var(--gray-50);
  border-bottom: 1px solid var(--card-border);
  white-space: nowrap;
}

.data-table tbody tr {
  border-bottom: 1px solid var(--gray-100);
  transition: background var(--transition);
}
.data-table tbody tr:hover { background: var(--gray-50); }
.data-table tbody tr:last-child { border-bottom: none; }

.data-table tbody td {
  padding: 13px 16px;
  color: var(--text-primary);
  vertical-align: middle;
}

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

/* Status badges */
.badge-not-started { background: var(--gray-100); color: var(--gray-600); }
.badge-in-progress { background: var(--blue-100);  color: var(--blue-700); }
.badge-completed   { background: var(--yellow-100);color: #92400e; }
.badge-approved    { background: var(--green-100); color: var(--green-700); }
.badge-rejected    { background: var(--red-100);   color: var(--red-500); }

/* Priority badges */
.badge-low    { background: var(--gray-100);   color: var(--gray-600); }
.badge-medium { background: var(--orange-100); color: var(--orange-500); }
.badge-high   { background: var(--red-100);    color: var(--red-500); }

/* ── Modals ───────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.5);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity var(--transition);
}
.modal-overlay.open { opacity: 1; }

.modal {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--card-shadow-lg);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.96) translateY(8px);
  transition: transform var(--transition);
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }

.modal-header {
  padding: 22px 24px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.modal-title { font-size: 1.1rem; font-weight: 700; }
.modal-close {
  width: 32px; height: 32px;
  border: none; background: var(--gray-100);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-600);
  transition: background var(--transition);
  flex-shrink: 0;
}
.modal-close:hover { background: var(--gray-200); }
.modal-close svg { width: 16px; height: 16px; }

.modal-body { padding: 20px 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--gray-100);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ── Notifications Dropdown ──────────────────────────────────── */
.notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 340px;
  background: white;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow-lg);
  z-index: 150;
  display: none;
}
.notif-dropdown.open { display: block; }

.notif-dropdown-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.notif-dropdown-header h4 { font-size: 0.9rem; font-weight: 600; }

.notif-list { max-height: 320px; overflow-y: auto; }

.notif-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-50);
  cursor: pointer;
  transition: background var(--transition);
}
.notif-item:hover { background: var(--gray-50); }
.notif-item.unread { background: var(--green-50); }
.notif-item.unread:hover { background: var(--green-100); }
.notif-item p { font-size: 0.82rem; color: var(--text-primary); line-height: 1.4; }
.notif-item time { font-size: 0.74rem; color: var(--text-muted); margin-top: 3px; display: block; }

.notif-empty {
  padding: 28px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ── Filters ─────────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  align-items: center;
}
.filter-bar .form-control { width: auto; }
.filter-bar .search-input {
  flex: 1;
  min-width: 200px;
  position: relative;
}
.filter-bar .search-input input { padding-left: 36px; }
.filter-bar .search-input svg {
  position: absolute;
  left: 10px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--gray-400);
  pointer-events: none;
}

/* ── Task Cards (grid view) ──────────────────────────────────── */
.tasks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.task-card {
  background: white;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--card-shadow);
  transition: box-shadow var(--transition), transform var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.task-card:hover { box-shadow: var(--card-shadow-lg); transform: translateY(-2px); }

.task-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.task-card.priority-high::before   { background: var(--red-500); }
.task-card.priority-medium::before { background: var(--orange-500); }
.task-card.priority-low::before    { background: var(--green-500); }

.task-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.task-card-title { font-weight: 600; font-size: 0.95rem; line-height: 1.3; }
.task-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.task-card-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.task-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--gray-100);
  padding-top: 12px;
  margin-top: 4px;
}
.task-card-footer .deadline { display: flex; align-items: center; gap: 4px; }
.task-card-footer svg { width: 14px; height: 14px; }
.deadline.overdue { color: var(--red-500); font-weight: 600; }

/* ── Empty State ─────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 56px 24px;
  color: var(--text-secondary);
}
.empty-state svg {
  width: 52px; height: 52px;
  color: var(--gray-300);
  margin: 0 auto 14px;
}
.empty-state h3 { font-size: 1rem; color: var(--gray-700); margin-bottom: 6px; }
.empty-state p { font-size: 0.875rem; }

/* ── Alerts ───────────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 16px;
}
.alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.alert-success { background: var(--green-50); color: var(--green-700); border: 1px solid var(--green-100); }
.alert-danger   { background: var(--red-100);  color: var(--red-500);   border: 1px solid #fecaca; }
.alert-info     { background: var(--blue-50);  color: var(--blue-700);  border: 1px solid var(--blue-100); }
.alert-warning  { background: var(--orange-100); color: var(--orange-500); border: 1px solid #fed7aa; }

/* ── Toast Notifications ─────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: var(--radius);
  background: var(--gray-900);
  color: white;
  font-size: 0.875rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  animation: toastIn 0.3s ease;
  max-width: 320px;
}
.toast.success { background: var(--green-800); }
.toast.error   { background: #991b1b; }
.toast.info    { background: var(--blue-900); }
.toast svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ── Login Page ──────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--green-900) 0%, var(--green-800) 40%, var(--green-700) 100%);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.auth-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.auth-card {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 64px rgba(0,0,0,0.25);
  width: 100%;
  max-width: 420px;
  padding: 40px;
  position: relative;
}

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

.auth-logo .logo-mark {
  width: 44px; height: 44px;
  font-size: 1.2rem;
}

.auth-logo-text h1 {
  font-size: 1.25rem;
  font-family: var(--font-head);
}
.auth-logo-text span {
  font-size: 0.72rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.auth-card h2 {
  font-size: 1.4rem;
  text-align: center;
  margin-bottom: 6px;
}
.auth-card .subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 28px;
}

/* ── Tabs ────────────────────────────────────────────────────── */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 20px;
  gap: 0;
}

.tab-btn {
  padding: 10px 18px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-family: var(--font-main);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: -1px;
}
.tab-btn:hover { color: var(--primary); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Progress Bar ────────────────────────────────────────────── */
.progress-bar {
  height: 6px;
  background: var(--gray-100);
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green-500), var(--green-400));
  border-radius: 3px;
  transition: width 0.6s ease;
}

/* ── Animations ──────────────────────────────────────────────── */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-fade { animation: fadeIn 0.3s ease; }
.animate-slide { animation: slideUp 0.3s ease; }

/* ── Utilities ───────────────────────────────────────────────── */
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }
.mb-6 { margin-bottom: 24px; }
.mt-4 { margin-top: 16px; }
.hidden { display: none !important; }
.w-100 { width: 100%; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  :root { --sidebar-width: 240px; }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 300;
  }
  .sidebar.open { transform: translateX(0); }
  
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 290;
  }
  .sidebar-overlay.open { display: block; }

  .main-content { margin-left: 0; }
  .menu-toggle { display: flex; }

  .page-content { padding: 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .form-row { grid-template-columns: 1fr; }
  .tasks-grid { grid-template-columns: 1fr; }
  .filter-bar { flex-direction: column; }
  .filter-bar .search-input { width: 100%; }
  .filter-bar .form-control { width: 100%; }

  .modal { max-width: 100%; margin: 0; border-radius: var(--radius-xl) var(--radius-xl) 0 0; }
  .modal-overlay { align-items: flex-end; padding: 0; }

  .notif-dropdown { width: calc(100vw - 24px); right: -12px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 28px 20px; }
}

/* ── Scrollbar ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }
