/* ═══════════════════════════════════════════════════════════════
   Tendo Tasks — Executive Intelligence Platform
   Tendo Brand System · FY27
   Primary: Tendo Rose #ed0b6f | Dark: #40403e | Blue: #0471ac
═══════════════════════════════════════════════════════════════ */

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

:root {
  /* Tendo Brand Colors */
  --rose:          #ed0b6f;
  --rose-dark:     #c0085a;
  --rose-light:    #f9d0e5;
  --rose-xlight:   #fdf0f7;
  --blue:          #0471ac;
  --blue-dark:     #035a89;
  --blue-light:    #d0e8f5;
  --gray-900:      #40403e;
  --gray-800:      #5a5a57;
  --gray-700:      #737370;
  --gray-600:      #8e8e8b;
  --gray-400:      #b8b8b5;
  --gray-300:      #d4d4d1;
  --gray-200:      #e8e8e5;
  --gray-100:      #f4f4f2;
  --gray-50:       #fafaf8;
  --white:         #ffffff;
  /* Status Colors */
  --status-not-started: #8e8e8b;
  --status-in-progress: #0471ac;
  --status-at-risk:     #f59e0b;
  --status-blocked:     #ed0b6f;
  --status-completed:   #15cc58;
  --status-cancelled:   #b8b8b5;
  /* Priority Colors */
  --priority-critical:  #ed0b6f;
  --priority-high:      #f59e0b;
  --priority-medium:    #0471ac;
  --priority-low:       #8e8e8b;
  /* Goal Colors */
  --goal-bookings:  #ed0b6f;
  --goal-nrr:       #0471ac;
  --goal-margin:    #15cc58;
  --goal-cashflow:  #f59e0b;
  /* Layout */
  --sidebar-w:     260px;
  --topbar-h:      64px;
  --radius-sm:     6px;
  --radius-md:     10px;
  --radius-lg:     16px;
  --radius-xl:     24px;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:     0 4px 12px rgba(0,0,0,.1);
  --shadow-lg:     0 10px 30px rgba(0,0,0,.12);
  --transition:    0.2s ease;
}

html { font-size: 14px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--gray-100);
  color: var(--gray-900);
  display: flex;
  height: 100vh;
  overflow: hidden;
  line-height: 1.5;
}

/* ── 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); }

/* ══════════════════════════════════════════════════════════
   SIDEBAR
══════════════════════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--gray-900);
  height: 100vh;
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0;
  z-index: 100;
  transition: transform var(--transition), width var(--transition);
  overflow-y: auto;
  overflow-x: hidden;
}

/* Logo */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.logo-mark {
  width: 40px; height: 40px;
  background: var(--rose);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.logo-text { display: flex; flex-direction: column; }
.logo-apex {
  font-size: .95rem; font-weight: 800;
  color: var(--white); letter-spacing: .5px;
  line-height: 1;
}
.logo-sub {
  font-size: .65rem; font-weight: 400;
  color: rgba(255,255,255,.45);
  letter-spacing: .5px; margin-top: 2px;
}

/* Nav */
.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
}
.nav-section-label {
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255,255,255,.3);
  padding: 14px 20px 6px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  color: rgba(255,255,255,.65);
  text-decoration: none;
  border-radius: 0;
  transition: all var(--transition);
  font-size: .85rem;
  font-weight: 400;
  position: relative;
  cursor: pointer;
  white-space: nowrap;
}
.nav-item i {
  width: 16px;
  text-align: center;
  font-size: .85rem;
  flex-shrink: 0;
}
.nav-item span:first-of-type { flex: 1; }
.nav-item:hover {
  background: rgba(255,255,255,.06);
  color: var(--white);
}
.nav-item.active {
  background: rgba(237,11,111,.15);
  color: var(--white);
  font-weight: 600;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--rose);
  border-radius: 0 2px 2px 0;
}
.nav-badge {
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.7);
  font-size: .6rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  flex-shrink: 0;
}
.nav-badge.alert { background: var(--rose); color: white; }
.nav-badge.pulse {
  background: var(--rose);
  color: white;
  animation: badge-pulse 2s infinite;
}
@keyframes badge-pulse {
  0%,100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Sidebar User */
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid rgba(255,255,255,.08);
  margin-top: auto;
}
.user-avatar {
  width: 34px; height: 34px;
  background: var(--rose);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .65rem; font-weight: 700; color: white;
  flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name {
  font-size: .8rem; font-weight: 600;
  color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-role {
  font-size: .65rem; color: rgba(255,255,255,.4);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-settings {
  color: rgba(255,255,255,.3);
  cursor: pointer;
  font-size: .85rem;
  flex-shrink: 0;
  transition: color var(--transition);
}
.user-settings:hover { color: rgba(255,255,255,.7); }

/* Logout icon alongside settings cog */
.sidebar-user-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.user-logout {
  color: rgba(255,255,255,.3);
  cursor: pointer;
  font-size: .85rem;
  transition: color var(--transition);
}
.user-logout:hover { color: var(--rose-light); }

/* ══════════════════════════════════════════════════════════
   MAIN CONTENT
══════════════════════════════════════════════════════════ */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: var(--gray-100);
}

/* ── TOP BAR ───────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  gap: 16px;
  flex-shrink: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.sidebar-toggle {
  background: none; border: none; cursor: pointer;
  color: var(--gray-600); font-size: 1rem;
  padding: 6px; border-radius: var(--radius-sm);
  transition: all var(--transition);
  display: none;
}
.sidebar-toggle:hover { background: var(--gray-100); color: var(--gray-900); }
.breadcrumb {
  font-size: .8rem;
  font-weight: 600;
  color: var(--gray-800);
  letter-spacing: .2px;
}
.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-search {
  display: flex; align-items: center;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 6px 12px;
  gap: 8px;
  min-width: 260px;
}
.topbar-search i { color: var(--gray-500); font-size: .8rem; }
.topbar-search input {
  background: none; border: none; outline: none;
  font-family: inherit; font-size: .8rem;
  color: var(--gray-900); width: 100%;
}
.topbar-search input::placeholder { color: var(--gray-400); }
.topbar-goals { display: flex; gap: 6px; flex-wrap: wrap; }
.goal-chip {
  display: flex; align-items: center; gap: 4px;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: .65rem;
  font-weight: 600;
  color: var(--gray-700);
  cursor: default;
  white-space: nowrap;
}
.goal-chip i { font-size: .6rem; color: var(--rose); }
.btn-notif {
  position: relative;
  background: none; border: none; cursor: pointer;
  color: var(--gray-600); font-size: 1.1rem;
  padding: 6px; border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.btn-notif:hover { color: var(--rose); }
.notif-dot {
  position: absolute;
  top: 3px; right: 3px;
  width: 8px; height: 8px;
  background: var(--rose);
  border-radius: 50%;
  border: 2px solid white;
  display: none;
}
.notif-dot.visible { display: block; }

/* ── VIEW SYSTEM ───────────────────────────────────────── */
.view {
  display: none;
  flex: 1;
  overflow-y: auto;
  padding: 28px 32px;
  flex-direction: column;
  gap: 24px;
}
.view.active { display: flex; }
.view-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-shrink: 0;
  gap: 16px;
}
.view-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.2;
}
.view-title i { color: var(--rose); margin-right: 8px; }
.view-subtitle {
  font-size: .8rem;
  color: var(--gray-600);
  margin-top: 4px;
}
.view-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ── BUTTONS ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--rose);
  color: white;
}
.btn-primary:hover { background: var(--rose-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(237,11,111,.3); }
.btn-secondary {
  background: var(--gray-100);
  color: var(--gray-800);
  border: 1px solid var(--gray-200);
}
.btn-secondary:hover { background: var(--gray-200); }
.btn-ghost {
  background: none;
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
}
.btn-ghost:hover { background: var(--gray-100); }
.btn-danger {
  background: var(--rose);
  color: white;
}
.btn-danger:hover { background: var(--rose-dark); }
.btn-sm { padding: 5px 10px; font-size: .75rem; }

/* ══════════════════════════════════════════════════════════
   DASHBOARD
══════════════════════════════════════════════════════════ */

/* KPI Goal Cards */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  flex-shrink: 0;
}
.kpi-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  border-top: 4px solid transparent;
  transition: box-shadow var(--transition);
}
.kpi-card:hover { box-shadow: var(--shadow-md); }
.kpi-card.goal-bookings { border-color: var(--goal-bookings); }
.kpi-card.goal-nrr      { border-color: var(--goal-nrr); }
.kpi-card.goal-margin   { border-color: var(--goal-margin); }
.kpi-card.goal-cashflow { border-color: var(--goal-cashflow); }
.kpi-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.goal-bookings .kpi-icon { background: var(--rose-xlight); color: var(--rose); }
.goal-nrr      .kpi-icon { background: var(--blue-light); color: var(--blue); }
.goal-margin   .kpi-icon { background: #e8faf0; color: #15cc58; }
.goal-cashflow .kpi-icon { background: #fef3c7; color: #f59e0b; }
.kpi-body { flex: 1; min-width: 0; }
.kpi-label { font-size: .7rem; font-weight: 600; color: var(--gray-600); text-transform: uppercase; letter-spacing: .5px; }
.kpi-value { font-size: 1.4rem; font-weight: 800; color: var(--gray-900); line-height: 1.2; margin: 4px 0; }
.kpi-target { font-size: .85rem; font-weight: 400; color: var(--gray-400); }
.kpi-progress-bar {
  height: 4px;
  background: var(--gray-200);
  border-radius: 2px;
  overflow: hidden;
  margin: 8px 0 4px;
}
.kpi-progress-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--gray-400);
  transition: width 1s ease;
}
.goal-bookings .kpi-progress-fill { background: var(--rose); }
.goal-nrr      .kpi-progress-fill { background: var(--blue); }
.goal-margin   .kpi-progress-fill { background: #15cc58; }
.goal-cashflow .kpi-progress-fill { background: #f59e0b; }
.kpi-meta { font-size: .68rem; color: var(--gray-500); margin-top: 2px; }
.kpi-updated {
  font-size: .62rem;
  color: var(--gray-400);
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.kpi-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.kpi-edit-btn {
  background: none;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  color: var(--gray-400);
  cursor: pointer;
  font-size: .65rem;
  padding: 2px 6px;
  line-height: 1.4;
  transition: all var(--transition);
  flex-shrink: 0;
  opacity: 0;
}
.kpi-card:hover .kpi-edit-btn { opacity: 1; }
.kpi-edit-btn:hover {
  background: var(--rose-xlight);
  border-color: var(--rose-light);
  color: var(--rose);
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 16px;
}
.dash-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}
.dash-card:hover { box-shadow: var(--shadow-md); }
.wide-card { grid-column: span 3; }
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 8px;
}
.card-header h3 {
  font-size: .9rem;
  font-weight: 700;
  color: var(--gray-900);
}
.card-badge {
  background: var(--gray-100);
  color: var(--gray-700);
  font-size: .65rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
}
.card-link {
  font-size: .75rem;
  color: var(--rose);
  text-decoration: none;
  font-weight: 600;
}
.card-link:hover { text-decoration: underline; }
.text-muted { color: var(--gray-500); }
.text-sm { font-size: .75rem; }
.text-warning { color: #f59e0b; }

/* Status Donut */
.status-ring-container {
  position: relative;
  display: flex;
  justify-content: center;
  margin: 8px 0;
}
.ring-center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}
.ring-num { font-size: 1.6rem; font-weight: 800; color: var(--gray-900); line-height: 1; }
.ring-label { font-size: .65rem; color: var(--gray-500); font-weight: 500; }

.status-legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}
.legend-item {
  display: flex; align-items: center; gap: 8px;
  font-size: .75rem; color: var(--gray-700);
}
.legend-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.legend-count {
  margin-left: auto;
  font-weight: 700;
  color: var(--gray-900);
}

/* Dept Bars */
.dept-bars { display: flex; flex-direction: column; gap: 10px; }
.dept-bar-item { display: flex; flex-direction: column; gap: 4px; }
.dept-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .75rem;
}
.dept-bar-name { font-weight: 600; color: var(--gray-800); }
.dept-bar-pct { font-weight: 700; color: var(--rose); }
.dept-bar-track {
  height: 6px; background: var(--gray-200);
  border-radius: 3px; overflow: hidden;
}
.dept-bar-fill {
  height: 100%; border-radius: 3px;
  background: var(--rose);
  transition: width 1s ease;
}

/* At-Risk Task Mini List */
.task-mini-list { display: flex; flex-direction: column; gap: 8px; }
.task-mini-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  cursor: pointer;
  transition: all var(--transition);
}
.task-mini-item:hover { border-color: var(--rose); background: var(--rose-xlight); }
.task-mini-status { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.task-mini-title { flex: 1; font-size: .8rem; font-weight: 600; color: var(--gray-900); }
.task-mini-dept { font-size: .7rem; color: var(--gray-500); }
.task-mini-due { font-size: .7rem; font-weight: 600; }
.due-overdue { color: var(--rose); }
.due-soon { color: #f59e0b; }

/* Activity Feed */
.activity-feed { display: flex; flex-direction: column; gap: 10px; }
.activity-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.activity-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--rose);
  margin-top: 5px;
  flex-shrink: 0;
}
.activity-text { font-size: .75rem; color: var(--gray-700); flex: 1; line-height: 1.4; }
.activity-time { font-size: .65rem; color: var(--gray-400); white-space: nowrap; }

/* ══════════════════════════════════════════════════════════
   TASK TABLE
══════════════════════════════════════════════════════════ */
.filters-bar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--white);
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}
.filter-group { display: flex; flex-direction: column; gap: 4px; }
.filter-group label { font-size: .65rem; font-weight: 700; color: var(--gray-600); text-transform: uppercase; letter-spacing: .5px; }
.filter-group select,
.filter-group input {
  padding: 6px 10px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: .78rem;
  color: var(--gray-900);
  background: var(--white);
  outline: none;
  transition: border-color var(--transition);
  min-width: 120px;
}
.filter-group select:focus,
.filter-group input:focus { border-color: var(--rose); }
.filter-search input { min-width: 200px; }
.filter-view-toggle {
  display: flex;
  gap: 4px;
  align-items: center;
  margin-left: auto;
}
.toggle-btn {
  background: none;
  border: 1px solid var(--gray-200);
  color: var(--gray-600);
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
  font-size: .8rem;
}
.toggle-btn.active { background: var(--rose); border-color: var(--rose); color: white; }
.toggle-btn:hover:not(.active) { background: var(--gray-100); }

.task-table-wrapper {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.task-table {
  width: 100%;
  border-collapse: collapse;
}
.task-table thead th {
  background: var(--gray-50);
  padding: 10px 14px;
  text-align: left;
  font-size: .7rem;
  font-weight: 700;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: .5px;
  border-bottom: 2px solid var(--gray-200);
  white-space: nowrap;
}
.task-table thead th.sortable { cursor: pointer; user-select: none; }
.task-table thead th.sortable:hover { color: var(--rose); }
.task-table tbody tr {
  border-bottom: 1px solid var(--gray-100);
  transition: background var(--transition);
}
.task-table tbody tr:last-child { border-bottom: none; }
.task-table tbody tr:hover { background: var(--gray-50); }
.task-table tbody td { padding: 12px 14px; font-size: .8rem; vertical-align: middle; }

/* Task Title Cell */
.task-title-cell { display: flex; flex-direction: column; gap: 2px; }
.task-title-link {
  font-weight: 600;
  color: var(--gray-900);
  cursor: pointer;
  text-decoration: none;
  line-height: 1.3;
}
.task-title-link:hover { color: var(--rose); }
.task-title-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; }
.tag-chip {
  background: var(--gray-100);
  color: var(--gray-600);
  font-size: .6rem;
  padding: 1px 6px;
  border-radius: 10px;
}

/* Dept Badge */
.dept-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: .68rem;
  font-weight: 600;
  white-space: nowrap;
}

/* Status Badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: .7rem;
  font-weight: 600;
  white-space: nowrap;
}
.status-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.status-not-started  { background: #f4f4f2; color: var(--status-not-started); }
.status-in-progress  { background: var(--blue-light); color: var(--blue); }
.status-at-risk      { background: #fef3c7; color: #b45309; }
.status-blocked      { background: var(--rose-light); color: var(--rose-dark); }
.status-completed    { background: #e8faf0; color: #0e8c3a; }
.status-cancelled    { background: var(--gray-200); color: var(--gray-600); }

/* Priority Badge */
.priority-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: .68rem;
  font-weight: 700;
}
.priority-critical { background: var(--rose-light); color: var(--rose-dark); }
.priority-high     { background: #fef3c7; color: #92400e; }
.priority-medium   { background: var(--blue-light); color: var(--blue-dark); }
.priority-low      { background: var(--gray-100); color: var(--gray-600); }

/* Progress Cell */
.progress-cell { display: flex; flex-direction: column; gap: 4px; min-width: 90px; }
.progress-bar-sm {
  height: 5px; background: var(--gray-200);
  border-radius: 2.5px; overflow: hidden;
}
.progress-fill-sm {
  height: 100%; border-radius: 2.5px;
  background: var(--rose);
  transition: width .5s ease;
}
.progress-label { font-size: .68rem; font-weight: 700; color: var(--gray-700); text-align: right; }

/* Action Buttons */
.action-btns { display: flex; gap: 4px; }
.btn-icon {
  background: none; border: none;
  width: 28px; height: 28px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-500);
  font-size: .8rem;
  transition: all var(--transition);
}
.btn-icon:hover { background: var(--gray-100); color: var(--gray-900); }
.btn-icon.edit:hover  { color: var(--blue); background: var(--blue-light); }
.btn-icon.delete:hover { color: var(--rose); background: var(--rose-light); }
.btn-icon.view:hover  { color: var(--rose); background: var(--rose-xlight); }

/* ══════════════════════════════════════════════════════════
   KANBAN BOARD
══════════════════════════════════════════════════════════ */
.kanban-board {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 16px;
  min-height: 500px;
  align-items: flex-start;
}
.kanban-col {
  min-width: 280px;
  max-width: 280px;
  background: var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 14px;
  flex-shrink: 0;
}
.kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 8px;
}
.kanban-col-title {
  font-size: .8rem;
  font-weight: 700;
  color: var(--gray-800);
  display: flex;
  align-items: center;
  gap: 6px;
}
.kanban-col-count {
  background: var(--gray-300);
  color: var(--gray-700);
  font-size: .65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
}
.kanban-cards { display: flex; flex-direction: column; gap: 8px; }
.kanban-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all var(--transition);
  border-left: 3px solid transparent;
}
.kanban-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.kanban-card-title { font-size: .8rem; font-weight: 600; color: var(--gray-900); line-height: 1.3; margin-bottom: 8px; }
.kanban-card-meta { display: flex; flex-direction: column; gap: 6px; }
.kanban-card-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.kanban-card-dept { font-size: .65rem; color: var(--gray-500); }
.kanban-card-assignee {
  font-size: .68rem; font-weight: 500; color: var(--gray-600);
  display: flex; align-items: center; gap: 4px;
}
.mini-avatar {
  width: 18px; height: 18px;
  background: var(--rose);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .5rem; font-weight: 700; color: white;
}

/* ══════════════════════════════════════════════════════════
   TASK FORM
══════════════════════════════════════════════════════════ */
.form-container {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.form-section {
  padding: 24px 28px;
  border-bottom: 1px solid var(--gray-100);
}
.form-section:last-of-type { border-bottom: none; }
.form-section-title {
  font-size: .7rem;
  font-weight: 700;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.form-section-title::before {
  content: '';
  width: 3px; height: 14px;
  background: var(--rose);
  border-radius: 2px;
}
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 0;
}
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.full-width { grid-column: 1 / -1; }
.form-group label {
  font-size: .72rem;
  font-weight: 600;
  color: var(--gray-700);
}
.required { color: var(--rose); }
.form-group input,
.form-group select,
.form-group textarea {
  padding: 9px 12px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: .82rem;
  color: var(--gray-900);
  background: var(--white);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  resize: vertical;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(237,11,111,.08);
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 18px 28px;
  background: var(--gray-50);
  border-top: 1px solid var(--gray-200);
  position: sticky;
  bottom: 0;
  z-index: 10;
}

/* ══════════════════════════════════════════════════════════
   TASK DETAIL
══════════════════════════════════════════════════════════ */
.task-detail-wrapper {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 20px;
  align-items: start;
}
.task-detail-main, .task-detail-aside {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.task-detail-hero {
  padding: 28px;
  border-bottom: 1px solid var(--gray-100);
}
.task-detail-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.3;
  margin-bottom: 10px;
}
.task-detail-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.task-detail-desc {
  font-size: .85rem;
  color: var(--gray-700);
  line-height: 1.6;
}
.task-detail-section {
  padding: 20px 28px;
  border-bottom: 1px solid var(--gray-100);
}
.task-detail-section:last-child { border-bottom: none; }
.task-detail-section-title {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--gray-500);
  margin-bottom: 12px;
}
.detail-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.detail-meta-item { display: flex; flex-direction: column; gap: 3px; }
.detail-meta-label { font-size: .68rem; font-weight: 600; color: var(--gray-500); text-transform: uppercase; letter-spacing: .5px; }
.detail-meta-value { font-size: .82rem; font-weight: 600; color: var(--gray-900); }

/* Blocker Box */
.blocker-box {
  background: var(--rose-xlight);
  border: 1px solid var(--rose-light);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.blocker-box i { color: var(--rose); margin-top: 2px; }
.blocker-text { font-size: .8rem; color: var(--gray-800); line-height: 1.5; }

/* Progress Detail */
.progress-detail-bar {
  height: 10px;
  background: var(--gray-200);
  border-radius: 5px;
  overflow: hidden;
  margin-top: 6px;
}
.progress-detail-fill {
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--rose), var(--rose-dark));
  transition: width 1s ease;
}

/* Comments */
.comments-section { display: flex; flex-direction: column; gap: 12px; }
.comment-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.comment-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--rose);
  display: flex; align-items: center; justify-content: center;
  font-size: .6rem; font-weight: 700; color: white;
  flex-shrink: 0;
}
.comment-body {
  flex: 1;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 10px 14px;
}
.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}
.comment-author { font-size: .75rem; font-weight: 700; color: var(--gray-900); }
.comment-time { font-size: .65rem; color: var(--gray-400); }
.comment-type-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 8px;
  font-size: .6rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.comment-text { font-size: .78rem; color: var(--gray-700); line-height: 1.5; }
.comment-input-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  align-items: flex-end;
}
.comment-input-row textarea {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: .8rem;
  resize: none;
  outline: none;
  transition: border-color var(--transition);
}
.comment-input-row textarea:focus { border-color: var(--rose); }

/* ── Inline Edit Panel ──────────────────────────────────── */
.inline-edit-panel {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
}
.inline-edit-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.inline-edit-fields { display: flex; flex-direction: column; gap: 14px; }
.inline-edit-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.inline-edit-label {
  min-width: 130px;
  font-size: .72rem;
  font-weight: 700;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: .5px;
  padding-top: 6px;
  flex-shrink: 0;
}
.inline-edit-control { flex: 1; }
.inline-number-input {
  width: 60px;
  padding: 4px 8px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: .82rem;
  font-family: inherit;
  text-align: center;
}
.inline-number-input:focus { outline: none; border-color: var(--rose); }
.inline-pct-label { font-size: .78rem; color: var(--gray-600); }
.inline-pct-btn { padding: 4px 8px !important; min-width: unset !important; }
.progress-control { display: flex; align-items: center; gap: 6px; }
.inline-progress-bar-wrap { flex: 1; min-width: 80px; padding-top: 9px; }
.inline-textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: .82rem;
  resize: vertical;
  outline: none;
  transition: border-color var(--transition);
  box-sizing: border-box;
}
.inline-textarea:focus { border-color: var(--rose); }
.inline-text-input {
  width: 100%;
  padding: 7px 12px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: .82rem;
  outline: none;
  transition: border-color var(--transition);
  box-sizing: border-box;
}
.inline-text-input:focus { border-color: var(--rose); }
.inline-status-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.inline-status-pill {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 600;
  border: 1.5px solid var(--pill-color, #ccc);
  background: transparent;
  color: var(--pill-color, #888);
  cursor: pointer;
  transition: all var(--transition);
}
.inline-status-pill:hover { opacity: .8; }
.inline-status-pill.active {
  background: var(--pill-color, #888);
  color: white;
}
.inline-edit-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--gray-200);
}
.inline-edit-hint {
  font-size: .72rem;
  color: var(--rose);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}
.inline-edit-dirty-indicator {
  font-size: .72rem;
  color: var(--rose);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ── Comment Compose ────────────────────────────────────── */
.comment-compose { margin-top: 14px; }
.comment-compose-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.comment-compose-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--rose);
  display: flex; align-items: center; justify-content: center;
  font-size: .6rem; font-weight: 700; color: white;
  flex-shrink: 0;
  margin-top: 4px;
}
.comment-compose-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: .82rem;
  resize: none;
  outline: none;
  transition: border-color var(--transition);
}
.comment-compose-input:focus { border-color: var(--rose); }
.comment-compose-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  margin-left: 38px;
  gap: 8px;
}
.comment-type-select {
  padding: 5px 10px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: .75rem;
  font-family: inherit;
  outline: none;
  cursor: pointer;
}

/* ══════════════════════════════════════════════════════════
   AI INSIGHTS
══════════════════════════════════════════════════════════ */
.insights-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.insights-header-card {
  background: linear-gradient(135deg, var(--gray-900) 0%, #2a2a28 100%);
  border-radius: var(--radius-xl);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
  overflow: hidden;
}
.insights-header-card::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(237,11,111,.12);
  pointer-events: none;
}
.insights-header-left {}
.insights-header-label {
  font-size: .7rem;
  font-weight: 700;
  color: rgba(255,255,255,.4);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 6px;
}
.insights-header-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
  margin-bottom: 6px;
}
.insights-header-sub {
  font-size: .82rem;
  color: rgba(255,255,255,.55);
}
.insights-header-right {}
.insights-score-ring {
  width: 90px; height: 90px;
  border-radius: 50%;
  border: 6px solid rgba(255,255,255,.1);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  position: relative;
}
.insights-score-ring.good { border-color: rgba(21,204,88,.4); }
.insights-score-ring.warning { border-color: rgba(245,158,11,.4); }
.insights-score-ring.danger { border-color: rgba(237,11,111,.4); }
.insights-score-num {
  font-size: 1.6rem;
  font-weight: 800;
  color: white;
  line-height: 1;
}
.insights-score-label {
  font-size: .55rem;
  color: rgba(255,255,255,.4);
  text-align: center;
  line-height: 1.2;
}

.insights-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.insight-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--gray-200);
  transition: box-shadow var(--transition);
}
.insight-card:hover { box-shadow: var(--shadow-md); }
.insight-card.critical { border-color: var(--rose); }
.insight-card.warning  { border-color: #f59e0b; }
.insight-card.positive { border-color: #15cc58; }
.insight-card.info     { border-color: var(--blue); }
.insight-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem;
  margin-bottom: 12px;
}
.insight-card.critical .insight-icon { background: var(--rose-xlight); color: var(--rose); }
.insight-card.warning  .insight-icon { background: #fef3c7; color: #d97706; }
.insight-card.positive .insight-icon { background: #e8faf0; color: #15cc58; }
.insight-card.info     .insight-icon { background: var(--blue-light); color: var(--blue); }
.insight-type {
  font-size: .62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.insight-card.critical .insight-type { color: var(--rose); }
.insight-card.warning  .insight-type { color: #d97706; }
.insight-card.positive .insight-type { color: #0e8c3a; }
.insight-card.info     .insight-type { color: var(--blue); }
.insight-title { font-size: .9rem; font-weight: 700; color: var(--gray-900); margin-bottom: 8px; }
.insight-body  { font-size: .8rem; color: var(--gray-700); line-height: 1.6; }
.insight-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.insight-action-btn {
  background: none;
  border: 1px solid var(--gray-200);
  border-radius: 20px;
  padding: 4px 12px;
  font-family: inherit;
  font-size: .7rem;
  font-weight: 600;
  color: var(--gray-700);
  cursor: pointer;
  transition: all var(--transition);
}
.insight-action-btn:hover { border-color: var(--rose); color: var(--rose); background: var(--rose-xlight); }

/* Dept Insights Full Width */
.insights-dept-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.dept-insight-chip {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dept-insight-name {
  font-size: .75rem;
  font-weight: 700;
  color: var(--gray-900);
  display: flex;
  align-items: center;
  gap: 6px;
}
.dept-insight-name i { color: var(--rose); font-size: .7rem; }
.dept-insight-status { display: flex; align-items: center; gap: 6px; }
.dept-insight-pill {
  padding: 2px 8px;
  border-radius: 12px;
  font-size: .65rem;
  font-weight: 700;
}
.dept-insight-pill.on-track { background: #e8faf0; color: #0e8c3a; }
.dept-insight-pill.at-risk  { background: #fef3c7; color: #92400e; }
.dept-insight-pill.behind   { background: var(--rose-light); color: var(--rose-dark); }
.dept-insight-tasks { font-size: .7rem; color: var(--gray-600); }

/* ══════════════════════════════════════════════════════════
   REPORTS
══════════════════════════════════════════════════════════ */
.reports-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.report-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.report-card.full-span { grid-column: span 2; }
.report-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.report-card-header h3 { font-size: .9rem; font-weight: 700; color: var(--gray-900); }
.report-card-body { padding: 20px; }

/* Exec Summary Table */
.exec-summary-table {
  width: 100%;
  border-collapse: collapse;
}
.exec-summary-table th {
  text-align: left;
  padding: 8px 10px;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--gray-600);
  border-bottom: 2px solid var(--gray-200);
}
.exec-summary-table td {
  padding: 10px;
  font-size: .8rem;
  border-bottom: 1px solid var(--gray-100);
}
.exec-summary-table tr:last-child td { border-bottom: none; }
.exec-summary-table tr:hover td { background: var(--gray-50); }

/* ══════════════════════════════════════════════════════════
   NOTIFICATIONS
══════════════════════════════════════════════════════════ */
.notifications-list { display: flex; flex-direction: column; gap: 10px; }
.notif-item {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: flex-start;
  gap: 14px;
  cursor: pointer;
  transition: all var(--transition);
  border-left: 4px solid transparent;
}
.notif-item:hover { box-shadow: var(--shadow-md); }
.notif-item.unread { border-left-color: var(--rose); background: var(--rose-xlight); }
.notif-item.type-overdue     { border-left-color: var(--rose); }
.notif-item.type-due-soon    { border-left-color: #f59e0b; }
.notif-item.type-blocked     { border-left-color: var(--rose-dark); }
.notif-item.type-completed   { border-left-color: #15cc58; }
.notif-item.type-status-change { border-left-color: var(--blue); }
.notif-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem;
  flex-shrink: 0;
}
.notif-item.type-overdue   .notif-icon { background: var(--rose-light); color: var(--rose); }
.notif-item.type-due-soon  .notif-icon { background: #fef3c7; color: #d97706; }
.notif-item.type-blocked   .notif-icon { background: var(--rose-xlight); color: var(--rose-dark); }
.notif-item.type-completed .notif-icon { background: #e8faf0; color: #15cc58; }
.notif-item.type-status-change .notif-icon { background: var(--blue-light); color: var(--blue); }
.notif-body { flex: 1; }
.notif-title { font-size: .82rem; font-weight: 700; color: var(--gray-900); margin-bottom: 3px; }
.notif-message { font-size: .77rem; color: var(--gray-700); line-height: 1.4; }
.notif-time { font-size: .65rem; color: var(--gray-400); margin-top: 4px; }
.notif-unread-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--rose);
  flex-shrink: 0;
  margin-top: 6px;
}

/* Notification Drawer */
.notif-drawer {
  position: fixed;
  top: var(--topbar-h);
  right: 0;
  width: 360px;
  height: calc(100vh - var(--topbar-h));
  background: var(--white);
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  transition: transform .3s ease;
  z-index: 200;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--gray-200);
}
.notif-drawer.open { transform: translateX(0); }
.notif-drawer-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}
.notif-drawer-header h3 { font-size: .95rem; font-weight: 700; }
#notif-drawer-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.drawer-notif-item {
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--gray-50);
  cursor: pointer;
  transition: background var(--transition);
  border-left: 3px solid transparent;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.drawer-notif-item.unread { background: var(--rose-xlight); border-left-color: var(--rose); }
.drawer-notif-item:hover { background: var(--gray-100); }
.drawer-notif-title { font-size: .78rem; font-weight: 600; color: var(--gray-900); }
.drawer-notif-msg { font-size: .72rem; color: var(--gray-600); margin-top: 2px; }
.drawer-notif-time { font-size: .63rem; color: var(--gray-400); margin-top: 3px; }

/* ══════════════════════════════════════════════════════════
   MODAL
══════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -48%);
  width: 90vw;
  max-width: 720px;
  max-height: 85vh;
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  z-index: 310;
  opacity: 0;
  pointer-events: none;
  transition: all .3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal.active {
  opacity: 1;
  pointer-events: all;
  transform: translate(-50%, -50%);
}
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}
.modal-header h2 { font-size: 1.05rem; font-weight: 700; color: var(--gray-900); }
.modal-close {
  background: none; border: none; cursor: pointer;
  color: var(--gray-500); font-size: 1rem;
  padding: 4px; border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.modal-close:hover { background: var(--gray-100); color: var(--rose); }
.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

/* ══════════════════════════════════════════════════════════
   TOAST
══════════════════════════════════════════════════════════ */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 500;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--gray-900);
  color: white;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: .82rem;
  font-weight: 500;
  min-width: 280px;
  max-width: 380px;
  animation: toast-in .3s ease;
  border-left: 4px solid var(--rose);
}
.toast.success { border-color: #15cc58; }
.toast.warning { border-color: #f59e0b; }
.toast.error   { border-color: var(--rose); }
.toast i { font-size: .9rem; flex-shrink: 0; }
.toast.success i { color: #15cc58; }
.toast.warning i { color: #f59e0b; }
.toast.error   i { color: var(--rose); }
@keyframes toast-in {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
.toast-out {
  animation: toast-out .3s ease forwards;
}
@keyframes toast-out {
  from { transform: translateX(0); opacity: 1; }
  to   { transform: translateX(100%); opacity: 0; }
}

/* ══════════════════════════════════════════════════════════
   DEPT ICONS & COLORS
══════════════════════════════════════════════════════════ */
.dept-sales           { background: #fde8f1; color: #c00057; }
.dept-marketing       { background: #fef3c7; color: #92400e; }
.dept-customer-success { background: #e8faf0; color: #0e8c3a; }
.dept-support         { background: var(--blue-light); color: var(--blue-dark); }
.dept-finance         { background: #f0fdf4; color: #166534; }
.dept-legal           { background: #f5f3ff; color: #6d28d9; }
.dept-product         { background: #fff7ed; color: #c2410c; }
.dept-engineering     { background: #eff6ff; color: #1d4ed8; }
.dept-strategy        { background: var(--gray-200); color: var(--gray-800); }

/* ══════════════════════════════════════════════════════════
   DEPT VIEW
══════════════════════════════════════════════════════════ */
.dept-overview-header {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 20px;
}
.dept-overview-icon {
  width: 56px; height: 56px;
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.dept-overview-info { flex: 1; }
.dept-overview-name { font-size: 1.3rem; font-weight: 800; color: var(--gray-900); }
.dept-overview-owner { font-size: .82rem; color: var(--gray-600); margin-top: 2px; }
.dept-overview-stats {
  display: flex;
  gap: 24px;
}
.dept-stat { text-align: center; }
.dept-stat-num { font-size: 1.4rem; font-weight: 800; color: var(--rose); }
.dept-stat-label { font-size: .65rem; color: var(--gray-500); text-transform: uppercase; letter-spacing: .5px; }

/* ══════════════════════════════════════════════════════════
   EMPTY STATE
══════════════════════════════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--gray-500);
}
.empty-state i { font-size: 2.5rem; color: var(--gray-300); margin-bottom: 12px; display: block; }
.empty-state h3 { font-size: 1rem; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }
.empty-state p { font-size: .8rem; line-height: 1.5; }

/* ══════════════════════════════════════════════════════════
   UTILITY
══════════════════════════════════════════════════════════ */
.divider { height: 1px; background: var(--gray-200); margin: 8px 0; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.fw-700 { font-weight: 700; }
.text-rose { color: var(--rose); }
.text-blue { color: var(--blue); }
.text-green { color: #15cc58; }

/* ══════════════════════════════════════════════════════════
   LOADING SHIMMER
══════════════════════════════════════════════════════════ */
.shimmer {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════ */
@media (max-width: 1200px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr 1fr; }
  .wide-card { grid-column: span 2; }
  .topbar-goals { display: none; }
}
@media (max-width: 900px) {
  :root { --sidebar-w: 0px; }
  .sidebar { transform: translateX(-260px); width: 260px; }
  .sidebar.mobile-open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .sidebar-toggle { display: flex; }
  .view { padding: 20px 16px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .wide-card { grid-column: span 1; }
  .task-detail-wrapper { grid-template-columns: 1fr; }
  .insights-grid { grid-template-columns: 1fr; }
  .reports-grid { grid-template-columns: 1fr; }
  .report-card.full-span { grid-column: span 1; }
  .insights-dept-grid { grid-template-columns: repeat(2, 1fr); }
  .topbar-search { display: none; }
}
@media (max-width: 600px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .view-header { flex-direction: column; align-items: flex-start; }
  .filters-bar { gap: 8px; }
  .filter-group { width: 100%; }
  .filter-group select,
  .filter-group input { width: 100%; min-width: unset; }
  .task-table-wrapper { overflow-x: auto; }
  .task-table { min-width: 700px; }
  .insights-dept-grid { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════════
   USER MANAGEMENT — ADMIN PANEL
══════════════════════════════════════════════════════════ */

/* Stats row */
.admin-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.admin-stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 14px;
  border-left: 4px solid var(--rose);
  transition: box-shadow var(--transition);
}
.admin-stat-card:hover { box-shadow: var(--shadow-md); }
.admin-stat-card.blue  { border-color: var(--blue); }
.admin-stat-card.green { border-color: #15cc58; }
.admin-stat-card.amber { border-color: #f59e0b; }
.admin-stat-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem;
  flex-shrink: 0;
}
.admin-stat-card .admin-stat-icon     { background: var(--rose-xlight); color: var(--rose); }
.admin-stat-card.blue .admin-stat-icon  { background: var(--blue-light);  color: var(--blue); }
.admin-stat-card.green .admin-stat-icon { background: #e8faf0; color: #0e8c3a; }
.admin-stat-card.amber .admin-stat-icon { background: #fef3c7; color: #d97706; }
.admin-stat-num  { font-size: 1.6rem; font-weight: 800; color: var(--gray-900); line-height: 1; }
.admin-stat-label { font-size: .68rem; color: var(--gray-500); text-transform: uppercase; letter-spacing: .5px; margin-top: 3px; }

/* User Cards Grid */
.user-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.user-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
  border: 1px solid var(--gray-200);
}
.user-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.user-card.inactive { opacity: .65; }

.user-card-header {
  padding: 18px 20px 14px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  border-bottom: 1px solid var(--gray-100);
}
.user-card-avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; font-weight: 800;
  color: white;
  flex-shrink: 0;
  position: relative;
}
.user-card-avatar.role-admin     { background: linear-gradient(135deg, var(--rose), var(--rose-dark)); }
.user-card-avatar.role-executive  { background: linear-gradient(135deg, var(--blue), var(--blue-dark)); }
.user-card-avatar.role-viewer     { background: linear-gradient(135deg, var(--gray-600), var(--gray-800)); }
.user-status-dot {
  position: absolute;
  bottom: 1px; right: 1px;
  width: 11px; height: 11px;
  border-radius: 50%;
  border: 2px solid white;
}
.user-status-dot.active  { background: #15cc58; }
.user-status-dot.inactive { background: var(--gray-400); }
.user-status-dot.pending  { background: #f59e0b; }

.user-card-info { flex: 1; min-width: 0; }
.user-card-name {
  font-size: .95rem; font-weight: 700;
  color: var(--gray-900);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-card-title {
  font-size: .73rem; color: var(--gray-600);
  margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-card-actions {
  display: flex; gap: 4px; flex-shrink: 0;
}

.user-card-body {
  padding: 12px 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.user-card-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  color: var(--gray-700);
}
.user-card-row i {
  width: 14px; text-align: center;
  color: var(--gray-400); font-size: .72rem;
  flex-shrink: 0;
}
.user-card-row a {
  color: var(--blue); text-decoration: none;
}
.user-card-row a:hover { text-decoration: underline; }

.user-card-footer {
  padding: 10px 20px;
  background: var(--gray-50);
  border-top: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.user-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.user-role-badge.role-admin     { background: var(--rose-xlight); color: var(--rose-dark); }
.user-role-badge.role-executive  { background: var(--blue-light);  color: var(--blue-dark); }
.user-role-badge.role-viewer     { background: var(--gray-200);    color: var(--gray-700); }
.user-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .67rem;
  font-weight: 600;
  color: var(--gray-500);
}
.user-status-badge::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.user-status-badge.active  { color: #0e8c3a; }
.user-status-badge.inactive { color: var(--gray-400); }
.user-status-badge.pending  { color: #d97706; }

/* User table (list view) */
.user-table-wrapper {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.user-table {
  width: 100%;
  border-collapse: collapse;
}
.user-table thead th {
  background: var(--gray-50);
  padding: 10px 16px;
  text-align: left;
  font-size: .68rem; font-weight: 700;
  color: var(--gray-600);
  text-transform: uppercase; letter-spacing: .5px;
  border-bottom: 2px solid var(--gray-200);
  white-space: nowrap;
}
.user-table tbody tr {
  border-bottom: 1px solid var(--gray-100);
  transition: background var(--transition);
}
.user-table tbody tr:last-child { border-bottom: none; }
.user-table tbody tr:hover { background: var(--gray-50); }
.user-table tbody td { padding: 12px 16px; font-size: .8rem; vertical-align: middle; }

.user-inline-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .65rem; font-weight: 800; color: white;
  flex-shrink: 0;
}
.user-inline-avatar.role-admin    { background: linear-gradient(135deg, var(--rose), var(--rose-dark)); }
.user-inline-avatar.role-executive { background: linear-gradient(135deg, var(--blue), var(--blue-dark)); }
.user-inline-avatar.role-viewer    { background: linear-gradient(135deg, var(--gray-600), var(--gray-800)); }

/* Permissions legend */
.permissions-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .8rem;
}
.permissions-table th {
  padding: 8px 12px;
  text-align: left;
  font-size: .68rem; font-weight: 700;
  color: var(--gray-600); text-transform: uppercase; letter-spacing: .5px;
  border-bottom: 2px solid var(--gray-200);
}
.permissions-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
}
.permissions-table tr:last-child td { border-bottom: none; }
.perm-check   { color: #15cc58; font-size: .9rem; }
.perm-cross   { color: var(--gray-300); font-size: .9rem; }
.perm-partial { color: #f59e0b; font-size: .9rem; }

/* Admin view toggle */
.admin-view-toggle {
  display: flex;
  gap: 4px;
  background: var(--gray-100);
  padding: 4px;
  border-radius: var(--radius-md);
}
.admin-toggle-btn {
  background: none;
  border: none;
  padding: 5px 14px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: .75rem;
  font-weight: 600;
  color: var(--gray-600);
  cursor: pointer;
  transition: all var(--transition);
}
.admin-toggle-btn.active {
  background: var(--white);
  color: var(--gray-900);
  box-shadow: var(--shadow-sm);
}

/* Delete confirm button */
.btn-danger-outline {
  background: none;
  border: 1px solid var(--rose-light);
  color: var(--rose);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  font-family: inherit;
  font-size: .75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-danger-outline:hover {
  background: var(--rose);
  border-color: var(--rose);
  color: white;
}

@media (max-width: 900px) {
  .admin-stats-row { grid-template-columns: repeat(2, 1fr); }
  .user-cards-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .admin-stats-row { grid-template-columns: 1fr 1fr; }
}

/* ═══════════════════════════════════════════════════════════════
   BULK ACTION BAR
═══════════════════════════════════════════════════════════════ */
.bulk-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(90deg, var(--gray-900), #5a5a57);
  color: white;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  font-size: .82rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  animation: slideDown .2s ease;
}
.bulk-bar #bulk-count {
  white-space: nowrap;
  color: rgba(255,255,255,.9);
  font-weight: 700;
}

/* ── SELECTED TASK ROW ──────────────────────────────────────── */
tr.row-selected td {
  background: var(--rose-xlight) !important;
}
.task-table input[type="checkbox"] {
  width: 15px;
  height: 15px;
  cursor: pointer;
  accent-color: var(--rose);
}
#select-all-tasks {
  accent-color: var(--rose);
}

/* ═══════════════════════════════════════════════════════════════
   CONFIRMATION MODAL
═══════════════════════════════════════════════════════════════ */
#confirm-modal {
  z-index: 10001;
}
#confirm-modal-overlay {
  z-index: 10000;
}
.btn-danger {
  background: var(--rose);
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background var(--transition);
}
.btn-danger:hover { background: var(--rose-dark); }

/* ═══════════════════════════════════════════════════════════════
   DEPARTMENT FILTER (TASKS VIEW)
═══════════════════════════════════════════════════════════════ */
#filter-dept {
  min-width: 140px;
}

/* ═══════════════════════════════════════════════════════════════
   ENHANCED TOPBAR — shrink goal chips on smaller screens
═══════════════════════════════════════════════════════════════ */
@media (max-width: 1200px) {
  .topbar-goals { display: none; }
}
@media (max-width: 768px) {
  .topbar-search { display: none; }
}

/* ═══════════════════════════════════════════════════════════════
   FILTERS BAR OVERFLOW FIX
═══════════════════════════════════════════════════════════════ */
.filters-bar {
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════════════
   SIDEBAR DEPARTMENT NAV — condensed spacing
═══════════════════════════════════════════════════════════════ */
.sidebar-nav .dept-nav {
  padding-top: 5px;
  padding-bottom: 5px;
}

/* ═══════════════════════════════════════════════════════════════
   INSIGHTS GRID — max 2 cols on medium screens
═══════════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .insights-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .insights-grid { grid-template-columns: 1fr; }
  .insights-header-card { flex-direction: column; }
  .insights-header-right { justify-content: center; margin-top: 16px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════
   GOAL PROGRESS SECTION IN INSIGHTS — responsive 2 cols
═══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .insights-dept-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .insights-dept-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════
   TASK DETAIL WRAPPER — single column on narrow screens
═══════════════════════════════════════════════════════════════ */
@media (max-width: 860px) {
  .task-detail-wrapper { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════
   USER MANAGEMENT — RESPONSIVE TABLES
═══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .user-table-wrapper { overflow-x: auto; }
  .user-table { min-width: 900px; }
}

/* ═══════════════════════════════════════════════════════════════
   REPORTS GRID — single column on small screens
═══════════════════════════════════════════════════════════════ */
@media (max-width: 800px) {
  .reports-grid { grid-template-columns: 1fr; }
  .report-card.full-span { grid-column: 1; }
}

/* ═══════════════════════════════════════════════════════════════
   KPI CARDS — tighter on mobile
═══════════════════════════════════════════════════════════════ */
@media (max-width: 520px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .kpi-card { padding: 16px; }
  .kpi-value { font-size: 1.4rem; }
}

/* ═══════════════════════════════════════════════════════════════
   FILTER DEPT/SEARCH WIDTHS
═══════════════════════════════════════════════════════════════ */
.filter-group.filter-search { flex: 1; min-width: 160px; }
.filter-group select,
.filter-group input {
  max-width: 100%;
}

/* ═══════════════════════════════════════════════════════════════
   SIDEBAR MOBILE — smoother open/close
═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    height: 100%;
    z-index: 500;
    transition: left .3s ease;
    box-shadow: none;
  }
  .sidebar.mobile-open {
    left: 0;
    box-shadow: 4px 0 24px rgba(0,0,0,.3);
  }
  .main-content {
    margin-left: 0 !important;
    width: 100% !important;
  }
}

/* ═══════════════════════════════════════════════════════════════
   SLIDE DOWN ANIMATION
═══════════════════════════════════════════════════════════════ */
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════════
   QUICK STATS BAR (DASHBOARD)
═══════════════════════════════════════════════════════════════ */
.quick-stats-bar {
  display: flex;
  align-items: center;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  padding: 14px 24px;
  gap: 0;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.qs-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 80px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.qs-item:hover { background: var(--gray-50); }
.qs-num {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1;
}
.qs-num.blue  { color: var(--blue); }
.qs-num.green { color: #15cc58; }
.qs-num.amber { color: #f59e0b; }
.qs-num.rose  { color: var(--rose); }
.qs-label {
  font-size: .65rem;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-top: 4px;
  white-space: nowrap;
}
.qs-divider {
  width: 1px;
  height: 36px;
  background: var(--gray-200);
  margin: 0 4px;
  flex-shrink: 0;
}
@media (max-width: 600px) {
  .quick-stats-bar { gap: 12px; padding: 12px 16px; }
  .qs-divider { display: none; }
  .qs-item { min-width: 60px; }
  .qs-num { font-size: 1.3rem; }
}

/* ═══════════════════════════════════════════════════════════════
   LOGIN SCREEN
═══════════════════════════════════════════════════════════════ */
.login-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, var(--gray-900) 0%, #2a2a28 50%, #1a1a18 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20000;
  padding: 20px;
}
.login-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 40px 44px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 32px 80px rgba(0,0,0,.4);
  animation: loginSlideUp .35s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes loginSlideUp {
  from { opacity: 0; transform: translateY(32px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.login-logo {
  display: flex;
  align-items: center;
  margin-bottom: 28px;
}
.login-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 6px;
}
.login-subtitle {
  font-size: .82rem;
  color: var(--gray-500);
  margin-bottom: 28px;
}
.login-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: .88rem;
  color: var(--gray-900);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  background: var(--white);
}
.login-input:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(237,11,111,.1);
}
.login-pw-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  cursor: pointer;
  font-size: .85rem;
  transition: color var(--transition);
}
.login-pw-toggle:hover { color: var(--rose); }
.login-btn {
  width: 100%;
  padding: 11px;
  font-size: .9rem;
  font-weight: 700;
  justify-content: center;
}

/* ═══════════════════════════════════════════════════════════════
   DEPARTMENT MANAGEMENT VIEW
═══════════════════════════════════════════════════════════════ */
.dept-mgmt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.dept-mgmt-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 16px;
  transition: box-shadow var(--transition), transform var(--transition);
}

.dept-mgmt-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.dept-mgmt-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dept-mgmt-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.dept-mgmt-name {
  font-weight: 700;
  font-size: .9rem;
  color: var(--gray-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dept-mgmt-meta {
  font-size: .72rem;
  color: var(--gray-500);
  margin-top: 2px;
}

/* ═══════════════════════════════════════════════════════════════
   GOALS MANAGEMENT VIEW
═══════════════════════════════════════════════════════════════ */
.goal-mgmt-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.goal-mgmt-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  transition: box-shadow var(--transition), transform var(--transition);
}

.goal-mgmt-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.goal-mgmt-card-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.goal-mgmt-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.goal-mgmt-label {
  font-weight: 700;
  font-size: .95rem;
  color: var(--gray-900);
}

.goal-mgmt-values {
  margin-top: 3px;
}






