/* ===================================================
   TASKFLOW PRO - Premium Todo List App
   =================================================== */

:root {
  --bg-primary:    #0a0c12;
  --bg-secondary:  #0f121d;
  --bg-card:       #161a29;
  --bg-card-hover: #1c223a;
  --bg-input:      #1e253d;
  --bg-sidebar:    #0c0f1a;
  --sidebar-width: 260px;
  --sidebar-collapsed: 70px;
  --topbar-height: 60px;

  --accent:        #006241; /* Deep Green Wonomerto */
  --accent-light:  #10b981;
  --accent-glow:   rgba(16, 185, 129, 0.15);
  --accent-gradient: linear-gradient(135deg, #006241, #10b981);
  --green:         #10b981;
  --orange:        #f59e0b; /* Gold/Orange Wonomerto */
  --red:           #ef4444;
  --blue:          #3b82f6;
  --purple:        #8b5cf6;

  --text-primary:  #f8fafc;
  --text-secondary:#cbd5e1;
  --text-muted:    #64748b;
  --border:        rgba(255, 255, 255, 0.06);
  --border-light:  rgba(255, 255, 255, 0.1);

  --radius-sm:     10px;
  --radius:        14px;
  --radius-lg:     20px;
  --radius-xl:     28px;

  --shadow-sm:     0 2px 8px rgba(0,0,0,0.2);
  --shadow:        0 8px 30px rgba(0,0,0,0.3);
  --shadow-lg:     0 20px 50px rgba(0,0,0,0.5);
  --shadow-glow:   0 0 20px var(--accent-glow);

  --glass:         rgba(22, 26, 41, 0.7);
  --glass-border:  rgba(255, 255, 255, 0.08);
  --glass-blur:    blur(12px);

  --transition:    all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.2s ease;
}

.light-theme {
  --bg-primary:    #f0f2fa;
  --bg-secondary:  #e8ecf7;
  --bg-card:       #ffffff;
  --bg-card-hover: #f8f9ff;
  --bg-input:      #f1f3fc;
  --bg-sidebar:    #ffffff;

  --text-primary:  #0f172a;
  --text-secondary:#475569;
  --text-muted:    #94a3b8;
  --border:        rgba(0,0,0,0.07);
  --border-light:  rgba(0,0,0,0.12);
  --shadow:        0 4px 24px rgba(0,0,0,0.08);
  --shadow-lg:     0 12px 48px rgba(0,0,0,0.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Plus Jakarta Sans', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  transition: background 0.3s, color 0.3s;
}

#appContainer {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 99px; }

/* ==================== SIDEBAR ==================== */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: fixed;
  left: 0; top: 0;
  z-index: 1000;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 10px 0 30px rgba(0,0,0,0.2);
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  white-space: nowrap;
}

.brand-logo {
  width: 40px; height: 40px;
  background: white;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,98,65,0.3);
  overflow: hidden;
  border: 1px solid var(--border);
  position: relative;
}
.brand-logo img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.brand-logo.mini {
  width: 42px; height: 42px;
  border-radius: 10px;
}

.brand-text {
  display: flex; flex-direction: column; line-height: 1.1;
}
.brand-name { font-weight: 800; font-size: 1.15rem; color: var(--text-primary); letter-spacing: -0.5px; }
.brand-sub { font-size: 0.75rem; font-weight: 700; color: var(--orange); letter-spacing: 1.2px; text-transform: uppercase; }

.sidebar-toggle-btn {
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-secondary); cursor: pointer;
  border-radius: 10px; padding: 6px 8px;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition-fast);
  flex-shrink: 0;
}
.sidebar-toggle-btn:hover { background: var(--accent-gradient); color: white; border-color: transparent; transform: scale(1.05); }

.sidebar.collapsed .sidebar-toggle-btn svg {
  transform: rotate(180deg);
}

.sidebar-search {
  padding: 12px 12px 8px;
  flex-shrink: 0;
}
.search-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  transition: var(--transition-fast);
}
.search-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.search-box svg { color: var(--text-muted); flex-shrink: 0; }
.search-box input { background: none; border: none; outline: none; color: var(--text-primary); font-size: 0.85rem; width: 100%; }
.search-box input::placeholder { color: var(--text-muted); }

.sidebar.collapsed .sidebar-search { display: none; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 8px 10px; }

.nav-section { margin-bottom: 4px; }

.nav-label {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  padding: 10px 6px 6px;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity 0.2s;
}
.sidebar.collapsed .nav-label { opacity: 0; }

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.87rem;
  font-weight: 500;
  transition: var(--transition-fast);
  position: relative;
  white-space: nowrap;
  overflow: hidden;
  margin-bottom: 2px;
}
.nav-item:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.nav-item.active { background: linear-gradient(90deg, var(--accent-glow), transparent); color: var(--accent-light); font-weight: 600; }
.nav-item.active::before {
  content: '';
  position: absolute; left: 0; top: 20%; height: 60%;
  width: 3px; border-radius: 0 3px 3px 0;
  background: var(--accent);
}
.nav-icon {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: 8px; flex-shrink: 0;
  transition: background 0.2s;
}
.nav-item.active .nav-icon { background: var(--accent-glow); color: var(--accent-light); }
.nav-text { flex: 1; }
.nav-badge {
  min-width: 20px; height: 20px;
  border-radius: 99px;
  background: var(--accent);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  display: none; align-items: center; justify-content: center;
  padding: 0 5px;
}
.nav-badge.show { display: flex; }

.sidebar.collapsed .nav-text,
.sidebar.collapsed .nav-badge { opacity: 0; width: 0; overflow: hidden; }

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.user-card {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 6px; border-radius: var(--radius-sm);
  cursor: pointer; transition: var(--transition-fast);
  white-space: nowrap; overflow: hidden;
}
.user-card:hover { background: var(--bg-card-hover); }
.user-avatar {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.8rem; color: white;
  flex-shrink: 0;
}
.user-info { flex: 1; overflow: hidden; }
.user-name { display: block; font-weight: 600; font-size: 0.85rem; color: var(--text-primary); }
.user-role { display: block; font-size: 0.72rem; color: var(--text-muted); }
.user-status {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  flex-shrink: 0;
}

.sidebar-overlay {
  display: none;
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  z-index: 999; backdrop-filter: blur(2px);
}
.sidebar-overlay.active { display: block; }

/* ==================== MAIN CONTENT ==================== */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  transition: margin-left 0.4s cubic-bezier(0.4, 0, 0.2, 1), width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.collapsed ~ .main-content {
  margin-left: var(--sidebar-collapsed);
  width: calc(100% - var(--sidebar-collapsed));
}

/* ==================== TOPBAR ==================== */
.topbar {
  height: var(--topbar-height);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(12px);
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }

.menu-toggle {
  background: none; border: 1px solid var(--border);
  color: var(--text-secondary); cursor: pointer;
  border-radius: 8px; padding: 8px;
  display: flex; align-items: center;
  transition: var(--transition-fast);
}
.menu-toggle:hover { background: var(--bg-card); color: var(--text-primary); }

.breadcrumb {
  font-size: 0.9rem; font-weight: 600;
  color: var(--text-primary);
  display: flex; align-items: center; gap: 6px;
}

.topbar-date {
  font-size: 0.8rem; color: var(--text-muted);
  background: var(--bg-card);
  padding: 5px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.icon-btn {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 10px; padding: 9px;
  display: flex; align-items: center;
  transition: var(--transition-fast);
}
.icon-btn:hover { background: var(--bg-card-hover); color: var(--text-primary); border-color: var(--border-light); }

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

.icon-btn.pulse {
  animation: iconPulse 2s infinite;
  border-color: var(--red);
}
@keyframes iconPulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* ==================== PAGE WRAPPER ==================== */
.page-wrapper {
  flex: 1; padding: 20px 24px;
  overflow-y: auto; height: calc(100vh - var(--topbar-height));
  width: 100%;
}
.page { display: none; animation: pageIn 0.3s ease; }
.page.active { display: block; }

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

.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; gap: 16px;
  padding-top: 0; margin-top: 0;
}
.page-title { font-size: 1.5rem; font-weight: 800; color: var(--text-primary); letter-spacing: -0.5px; }
.page-subtitle { font-size: 0.85rem; color: var(--text-muted); margin-top: 2px; }

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 8px 18px; border-radius: 10px;
  font-size: 0.85rem; font-weight: 600;
  border: none; cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent-gradient);
  color: white; box-shadow: 0 4px 12px rgba(0, 98, 65, 0.2);
}
.btn-primary:hover { transform: translateY(-1.5px); box-shadow: 0 6px 20px rgba(0, 98, 65, 0.35); }

.btn-secondary { background: var(--bg-input); color: var(--text-secondary); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg-card-hover); color: var(--text-primary); border-color: var(--border-light); }

.btn-danger { background: rgba(239, 68, 68, 0.1); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.2); }
.btn-danger:hover { background: rgba(239, 68, 68, 0.2); color: #ef4444; }

.btn-sm { padding: 5px 12px; font-size: 0.75rem; border-radius: 8px; }

/* ==================== DATA TABLE ==================== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  transition: var(--transition);
}
.card:hover { border-color: var(--border-light); }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.card-title { font-size: 0.95rem; font-weight: 700; color: var(--text-primary); }
.card-link { font-size: 0.78rem; color: var(--accent-light); text-decoration: none; font-weight: 500; transition: color 0.2s; cursor: pointer; }
.card-link:hover { color: var(--accent); }

.table-container { width: 100%; overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-card); }
.data-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 0.85rem; }
.data-table th { background: rgba(0,0,0,0.2); padding: 12px 16px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; font-size: 0.7rem; border-bottom: 1px solid var(--border); }
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--text-secondary); vertical-align: middle; }
.data-table tr:hover td { background: var(--bg-card-hover); color: var(--text-primary); }
.data-table tr:last-child td { border-bottom: none; }

/* ==================== BADGES ==================== */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 6px;
  font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.badge-pending { background: rgba(100, 116, 139, 0.15); color: #94a3b8; }
.badge-progress { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.badge-done { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.badge-tag { background: var(--accent-glow); color: var(--accent-light); border: 1px solid var(--border); }

/* ==================== STATS GRID ==================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px; margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex; align-items: center; gap: 18px;
  cursor: default;
  transition: var(--transition);
  position: relative; overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute; top: 0; right: 0;
  width: 80px; height: 80px;
  border-radius: 50%;
  opacity: 0.08;
  transition: opacity 0.2s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.stat-card:hover::before { opacity: 0.12; }

.stat-blue .stat-icon { color: var(--blue); background: rgba(59,130,246,0.12); }
.stat-blue::before { background: var(--blue); }
.stat-green .stat-icon { color: var(--green); background: rgba(16,185,129,0.12); }
.stat-green::before { background: var(--green); }
.stat-orange .stat-icon { color: var(--orange); background: rgba(245,158,11,0.12); }
.stat-orange::before { background: var(--orange); }
.stat-red .stat-icon { color: var(--red); background: rgba(239,68,68,0.12); }
.stat-red::before { background: var(--red); }

.stat-icon {
  width: 54px; height: 54px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.stat-info { display: flex; flex-direction: column; }
.stat-label { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; }
.stat-value { font-size: 2.2rem; font-weight: 800; color: var(--text-primary); line-height: 1.1; margin: 2px 0; }
.stat-change { font-size: 0.72rem; font-weight: 600; }
.stat-change.positive { color: var(--green); }
.stat-change.negative { color: var(--red); }
.stat-change.neutral { color: var(--text-muted); }

/* ==================== DASHBOARD GRID ==================== */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  width: 100%;
}
@media(max-width:900px) { .dashboard-grid { grid-template-columns: 1fr; } }

.task-list-mini { display: flex; flex-direction: column; gap: 8px; min-height: 100px; }
.empty-state-mini {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 24px;
  color: var(--text-muted); font-size: 0.85rem;
  opacity: 0.7; text-align: center;
}

.mini-task-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition-fast);
}
.mini-task-item:hover { border-color: var(--accent); background: var(--bg-card-hover); }
.mini-task-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot-done { background: var(--green); }
.dot-progress { background: var(--orange); }
.dot-pending { background: var(--text-muted); }
.dot-approved { background: var(--green); }
.dot-rejected { background: var(--red); }
.mini-task-title { flex: 1; font-size: 0.83rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-task-date { font-size: 0.72rem; color: var(--text-muted); flex-shrink: 0; }

/* Progress Ring */
.progress-card { grid-column: span 1; }
.progress-ring-container {
  position: relative; display: flex;
  align-items: center; justify-content: center;
  margin: 8px 0;
}
.progress-ring { transform: rotate(-90deg); }
.progress-ring-track { fill: none; stroke: var(--bg-input); stroke-width: 12; }
.progress-ring-fill {
  fill: none; stroke: url(#gradient); stroke-width: 12;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s cubic-bezier(0.25,0.46,0.45,0.94);
}
.progress-ring-text {
  position: absolute; display: flex; flex-direction: column; align-items: center;
}
.progress-pct { font-size: 2rem; font-weight: 800; color: var(--text-primary); }
.progress-label { font-size: 0.75rem; color: var(--text-muted); }
.progress-legend { display: flex; gap: 16px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--text-secondary); }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; }

/* ==================== FILTER BAR ==================== */
.filter-bar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
  margin-bottom: 20px;
}
.filter-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-tab {
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-secondary); padding: 7px 16px;
  border-radius: 99px; font-size: 0.83rem; font-weight: 500;
  cursor: pointer; transition: var(--transition-fast);
}
.filter-tab:hover { border-color: var(--accent); color: var(--accent-light); }
.filter-tab.active { background: var(--accent); border-color: var(--accent); color: white; box-shadow: 0 2px 10px rgba(99,102,241,0.35); }
.filter-right { display: flex; gap: 10px; align-items: center; }
.search-input-wrap {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 7px 12px;
  transition: var(--transition-fast);
}
.search-input-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.search-input-wrap svg { color: var(--text-muted); flex-shrink: 0; }
.search-input { background: none; border: none; outline: none; color: var(--text-primary); font-size: 0.85rem; width: 180px; }
.search-input::placeholder { color: var(--text-muted); }
.select-input {
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-secondary); padding: 7px 12px;
  border-radius: var(--radius-sm); font-size: 0.83rem;
  cursor: pointer; outline: none;
  transition: var(--transition-fast);
}
.select-input:focus { border-color: var(--accent); }

/* ==================== TASK CARDS ==================== */
.tasks-container, .requests-container {
  display: flex; flex-direction: column; gap: 10px;
}
.empty-state {
  text-align: center; padding: 60px 20px;
  color: var(--text-muted);
}
.empty-icon { font-size: 3.5rem; margin-bottom: 16px; }
.empty-state h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; color: var(--text-secondary); }
.empty-state p { font-size: 0.88rem; }

.task-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: var(--transition);
  cursor: pointer;
  animation: taskIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

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

.task-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 4px; height: 100%;
  background: var(--accent-gradient);
  opacity: 0.6;
}

.task-card:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.task-card.done {
  opacity: 0.6;
}

.task-card.done::after {
  background: var(--text-muted);
}

.task-checkbox {
  width: 24px; height: 24px; border-radius: 8px;
  border: 2px solid var(--border-light);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; cursor: pointer;
  transition: var(--transition-fast);
  margin-top: 3px;
  background: var(--bg-input);
}
.task-checkbox:hover { border-color: var(--accent-light); }
.task-checkbox.checked { background: var(--green); border-color: var(--green); box-shadow: 0 0 10px rgba(16,185,129,0.4); }
.task-checkbox.checked svg { display: block; filter: drop-shadow(0 0 2px rgba(255,255,255,0.5)); }
.task-checkbox svg { display: none; }

.task-body { flex: 1; min-width: 0; }
.task-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 5px; }
.task-title { font-weight: 600; font-size: 0.95rem; color: var(--text-primary); }
.task-title.strike { text-decoration: line-through; color: var(--text-muted); }
.task-desc { font-size: 0.83rem; color: var(--text-muted); margin-bottom: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 0.75rem; color: var(--text-muted); }
.task-meta-item { display: flex; align-items: center; gap: 4px; }

.badge-approved { background: rgba(16,185,129,0.15); color: var(--green); }
.badge-rejected { background: rgba(239,68,68,0.15); color: var(--red); }
.priority-tinggi { background: rgba(239,68,68,0.12); color: var(--red); }
.priority-sedang { background: rgba(245,158,11,0.12); color: var(--orange); }
.priority-rendah { background: rgba(59,130,246,0.12); color: var(--blue); }
.priority-kritis { background: rgba(239,68,68,0.2); color: #ff6b6b; border: 1px solid rgba(239,68,68,0.4); }
/* Tag badge */
.badge-tag { background: rgba(0,98,65,0.12); color: var(--accent-light); border: 1px solid rgba(0,98,65,0.2); }
/* Status badge (tabel laporan) */
.status-badge { padding: 3px 10px; border-radius: 99px; font-size: 0.72rem; font-weight: 600; }
.status-badge.done, .status-badge.completed { background: rgba(16,185,129,0.15); color: var(--green); }
.status-badge.progress, .status-badge.in-progress { background: rgba(242,139,26,0.15); color: var(--orange); }
.status-badge.pending { background: rgba(100,116,139,0.15); color: var(--text-muted); }
/* Priority badge (tabel laporan) */
.priority-badge { padding: 3px 10px; border-radius: 99px; font-size: 0.72rem; font-weight: 600; }
.priority-badge.tinggi { background: rgba(239,68,68,0.12); color: var(--red); }
.priority-badge.sedang { background: rgba(242,139,26,0.12); color: var(--orange); }
.priority-badge.rendah { background: rgba(59,130,246,0.12); color: var(--blue); }

.task-group-label {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 10px 4px 5px;
  margin-top: 15px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
 
 .task-actions { display: flex; gap: 4px; align-items: flex-start; }

/* Attachment pills on task/request cards */
.card-attach-row {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: 8px 0 4px;
}
.card-attach-pill {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(99,102,241,0.09);
  border: 1px solid rgba(99,102,241,0.2);
  color: var(--accent-light);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.75rem; font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
  max-width: 180px;
  overflow: hidden; text-overflow: ellipsis;
}
.card-attach-pill:hover {
  background: rgba(99,102,241,0.2);
  border-color: var(--accent);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}

/* ==================== UPLOAD ZONE ==================== */
.upload-zone {
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-lg);
  padding: 50px 30px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg-card);
  margin-bottom: 24px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--accent);
  background: rgba(99,102,241,0.05);
  box-shadow: 0 0 40px rgba(99,102,241,0.1);
}
.upload-icon { color: var(--accent-light); opacity: 0.8; }
.upload-text h3 { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); }
.upload-text p { color: var(--text-muted); font-size: 0.88rem; }
.upload-types { font-size: 0.75rem; color: var(--text-muted); background: var(--bg-input); padding: 5px 14px; border-radius: 99px; border: 1px solid var(--border); }

/* ==================== FILES GRID ==================== */
.files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.file-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  cursor: pointer;
  transition: var(--transition);
  animation: fadeIn 0.3s ease;
  text-align: center;
  position: relative;
}
.file-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow); background: var(--bg-card-hover); }
.file-icon { font-size: 2.8rem; line-height: 1; }
.file-name { font-size: 0.83rem; font-weight: 600; color: var(--text-primary); word-break: break-word; }
.file-size { font-size: 0.72rem; color: var(--text-muted); }
.file-date { font-size: 0.7rem; color: var(--text-muted); }
.file-card-actions {
  position: absolute; top: 8px; right: 8px;
  display: flex; gap: 4px; opacity: 0;
  transition: opacity 0.2s;
}
.file-card:hover .file-card-actions { opacity: 1; }

/* ==================== CALENDAR ==================== */
.calendar-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.btn-icon { background: var(--bg-input); border: 1px solid var(--border); color: var(--text-secondary); cursor: pointer; border-radius: 8px; padding: 8px 14px; font-size: 1.3rem; transition: var(--transition-fast); }
.btn-icon:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.calendar-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-day-header { text-align: center; font-size: 0.72rem; font-weight: 700; color: var(--text-muted); padding: 8px 0; text-transform: uppercase; letter-spacing: 0.8px; }
.cal-day {
  min-height: 72px; background: var(--bg-input);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 6px; cursor: pointer; transition: var(--transition-fast);
}
.cal-day:hover { background: var(--bg-card-hover); border-color: var(--border-light); }
.cal-day.today { border-color: var(--accent); background: rgba(99,102,241,0.08); }
.cal-day.other-month { opacity: 0.35; }
.cal-day-num { font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 4px; }
.cal-day.today .cal-day-num { color: var(--accent-light); }
.cal-events { display: flex; flex-direction: column; gap: 2px; }
.cal-event { font-size: 0.65rem; padding: 2px 5px; border-radius: 4px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-event.done { background: rgba(16,185,129,0.2); color: var(--green); }
.cal-event.progress { background: rgba(245,158,11,0.2); color: var(--orange); }
.cal-event.pending { background: rgba(100,116,139,0.2); color: var(--text-muted); }
.calendar-legend { display: flex; gap: 16px; margin-top: 16px; justify-content: center; }

/* ==================== ANALYTICS ==================== */
.analytics-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.analytics-grid .full-width { grid-column: 1 / -1; }
@media(max-width:700px) { .analytics-grid { grid-template-columns: 1fr; } }

.bar-chart, .priority-chart { min-height: 200px; padding: 12px; }
.bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.bar-label { font-size: 0.8rem; color: var(--text-secondary); width: 100px; flex-shrink: 0; text-align: right; }
.bar-track { flex: 1; height: 10px; background: var(--bg-input); border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 99px; transition: width 1s cubic-bezier(0.25,0.46,0.45,0.94); }
.bar-count { font-size: 0.8rem; font-weight: 700; color: var(--text-primary); width: 30px; }
.bar-fill.done-bar { background: linear-gradient(90deg, var(--green), #34d399); }
.bar-fill.progress-bar { background: linear-gradient(90deg, var(--orange), #fbbf24); }
.bar-fill.pending-bar { background: linear-gradient(90deg, var(--text-muted), #94a3b8); }

.priority-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.priority-color { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }

.activity-chart { padding: 12px; }
.activity-bars { display: flex; align-items: flex-end; gap: 8px; height: 120px; }
.activity-col { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; }
.activity-bar { width: 100%; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, var(--accent), #8b5cf6); transition: height 0.8s ease; min-height: 4px; }
.activity-day { font-size: 0.7rem; color: var(--text-muted); }

/* ==================== SETTINGS ==================== */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.theme-options { display: flex; gap: 12px; }
.theme-opt {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  cursor: pointer; padding: 10px; border-radius: var(--radius-sm);
  border: 2px solid var(--border); transition: var(--transition-fast); font-size: 0.82rem;
}
.theme-opt:hover { border-color: var(--border-light); }
.theme-opt.active { border-color: var(--accent); background: var(--accent-glow); }
.theme-preview { width: 80px; height: 48px; border-radius: 8px; }
.dark-preview { background: linear-gradient(135deg, #0d0f17, #1a1d2e); border: 1px solid rgba(255,255,255,0.1); }
.light-preview { background: linear-gradient(135deg, #f0f2fa, #ffffff); border: 1px solid rgba(0,0,0,0.1); }
.action-list { display: flex; flex-direction: column; gap: 10px; }

/* ==================== FORMS ==================== */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.83rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 7px; }
.form-control {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.87rem;
  font-family: inherit;
  outline: none;
  transition: var(--transition-fast);
}
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media(max-width:500px) { .form-row { grid-template-columns: 1fr; } }
.required { color: var(--red); }

/* File attach zone */
.file-attach-zone {
  border: 1.5px dashed var(--border-light);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; color: var(--text-muted);
  font-size: 0.85rem; transition: var(--transition-fast);
}
.file-attach-zone:hover { border-color: var(--accent); color: var(--accent-light); background: rgba(99,102,241,0.05); }

.attachments-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.attach-chip {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: 6px; padding: 4px 6px 4px 10px;
  font-size: 0.78rem; color: var(--text-secondary);
  transition: var(--transition-fast);
}
.attach-chip:hover { border-color: var(--accent); background: rgba(99,102,241,0.06); }
/* Name part is a clickable button to preview */
.attach-chip-name {
  background: none; border: none; cursor: pointer;
  color: var(--accent-light); font-size: 0.78rem; font-weight: 500;
  padding: 0; max-width: 160px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-decoration: underline; text-decoration-color: transparent;
  transition: text-decoration-color 0.2s, color 0.2s;
}
.attach-chip-name:hover { color: var(--accent); text-decoration-color: var(--accent); }
/* Delete (X) button */
.attach-chip-del {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); display: flex; align-items: center;
  padding: 2px 4px; border-radius: 4px; font-size: 0.8rem;
  transition: var(--transition-fast); flex-shrink: 0;
  margin-left: 2px;
}
.attach-chip-del:hover { color: var(--red); background: rgba(239,68,68,0.12); }

/* ==================== MODALS ==================== */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(6px);
  z-index: 2000; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  width: 100%; max-width: 540px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.modal-large { max-width: 820px; }
.modal-sm { max-width: 380px; }
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 700; font-size: 1.05rem;
}
.modal-close {
  background: var(--bg-input); border: 1px solid var(--border);
  color: var(--text-muted); cursor: pointer;
  border-radius: 8px; padding: 6px 10px;
  font-size: 0.85rem; transition: var(--transition-fast);
  line-height: 1;
}
.modal-close:hover { background: rgba(239,68,68,0.15); color: var(--red); border-color: rgba(239,68,68,0.3); }
.modal-body { padding: 20px 22px; }
.modal-footer {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 16px 22px;
  border-top: 1px solid var(--border);
}

/* File Viewer */
.file-viewer-body {
  min-height: 400px;
  display: flex; align-items: center; justify-content: center;
  width: 100%; padding: 8px;
}
.file-viewer-body img { max-width: 100%; max-height: 70vh; border-radius: var(--radius); }
.file-viewer-body embed, .file-viewer-body iframe { width: 100%; height: 65vh; border: none; border-radius: var(--radius); }
.file-no-preview {
  text-align: center; color: var(--text-muted);
  display: flex; flex-direction: column; align-items: center; padding: 20px;
}
.file-no-preview .big-icon { font-size: 5rem; margin-bottom: 8px; }
.file-no-preview p { font-size: 0.88rem; line-height: 1.6; }

/* ==================== TOAST ==================== */
.toast-container {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 9999; display: flex; flex-direction: column; gap: 8px;
}
.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 12px 18px;
  display: flex; align-items: center; gap: 10px;
  min-width: 260px; max-width: 360px;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease;
  font-size: 0.87rem;
}
@keyframes toastIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px); } }
.toast-icon { width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 0.75rem; }
.toast-success .toast-icon { background: rgba(16,185,129,0.2); color: var(--green); }
.toast-error .toast-icon { background: rgba(239,68,68,0.2); color: var(--red); }
.toast-info .toast-icon { background: rgba(99,102,241,0.2); color: var(--accent-light); }
.toast-text { flex: 1; color: var(--text-primary); }

/* ==================== KANBAN BOARD ==================== */
.view-toggle {
  display: flex; background: var(--bg-input); border-radius: 10px; padding: 4px; border: 1px solid var(--border);
}
.view-toggle .btn { padding: 6px 12px; border: none; border-radius: 6px; box-shadow: none; font-size: 1rem; }
.view-toggle .btn.active { background: var(--bg-card); color: var(--accent-light); box-shadow: var(--shadow-sm); }

.kanban-view {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  align-items: flex-start; min-height: 500px;
}
@media(max-width: 1024px) { .kanban-view { grid-template-columns: 1fr; } }

.kanban-column {
  background: rgba(0,0,0,0.15); border-radius: var(--radius-lg);
  padding: 16px; display: flex; flex-direction: column; gap: 12px;
  border: 1px solid var(--border); min-height: 200px;
}
.kanban-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.kanban-dot { width: 10px; height: 10px; border-radius: 50%; }
.kanban-header h4 { font-size: 0.8rem; font-weight: 800; letter-spacing: 1px; color: var(--text-secondary); flex: 1; }
.kanban-count { background: var(--bg-input); color: var(--text-muted); font-size: 0.75rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; }

.kanban-list { display: flex; flex-direction: column; gap: 12px; min-height: 100px; }

/* Kanban Card (Compact version of task-card) */
.kanban-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; cursor: pointer; transition: var(--transition);
  position: relative; border-left: 3px solid var(--accent);
}
.kanban-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.kb-title { font-weight: 600; font-size: 0.88rem; margin-bottom: 6px; display: block; }
.kb-meta { display: flex; justify-content: space-between; align-items: center; font-size: 0.7rem; color: var(--text-muted); }
.kb-priority { padding: 2px 6px; border-radius: 4px; font-weight: 700; text-transform: uppercase; font-size: 0.6rem; }

/* ==================== DASHBOARD ACTIVITY FEED ==================== */
.activity-feed-card { grid-column: span 1; display: flex; flex-direction: column; }
.activity-feed-list { flex: 1; display: flex; flex-direction: column; gap: 10px; max-height: 320px; overflow-y: auto; padding-right: 5px; }

.feed-item {
  display: flex; gap: 12px; padding: 10px; border-radius: var(--radius-sm);
  background: var(--bg-input); border: 1px solid var(--border);
  transition: var(--transition-fast);
}
.feed-item:hover { background: var(--bg-card-hover); border-color: var(--border-light); }
.feed-icon { width: 32px; height: 32px; border-radius: 8px; background: var(--bg-card); display: flex; align-items: center; justify-content: center; font-size: 0.9rem; flex-shrink: 0; }
.feed-content { flex: 1; min-width: 0; }
.feed-user { font-weight: 700; font-size: 0.78rem; color: var(--text-primary); }
.feed-action { font-size: 0.78rem; color: var(--text-secondary); margin: 0 4px; }
.feed-target { font-weight: 600; font-size: 0.78rem; color: var(--accent-light); }
.feed-time { display: block; font-size: 0.68rem; color: var(--text-muted); margin-top: 2px; }

/* Scrollbar for feed */
.activity-feed-list::-webkit-scrollbar { width: 3px; }

/* Dashboard Responsive fix */
@media(max-width: 1200px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .activity-feed-card, .progress-card { grid-column: span 1; }
}

/* ==================== CHECKLIST & PROGRESS IN MODALS ==================== */
.checklist-input-row {
  display: flex; gap: 8px; align-items: center;
  margin-bottom: 10px;
}
.checklist-input-row .form-control { flex: 1; }
.checklist-input-row .btn { flex-shrink: 0; white-space: nowrap; }

.checklist-preview {
  list-style: none;
  display: flex; flex-direction: column; gap: 6px;
  max-height: 220px; overflow-y: auto;
  padding: 0;
  margin-top: 4px;
}
.cl-empty-hint {
  font-size: 0.78rem; color: var(--text-muted);
  padding: 8px 12px;
  background: var(--bg-input); border-radius: 6px;
  border: 1px dashed var(--border);
  font-style: italic; text-align: center;
}
.cl-preview-item {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 12px;
  cursor: pointer;
  transition: var(--transition-fast);
  user-select: none;
}
.cl-preview-item:hover { border-color: var(--accent); background: rgba(99,102,241,0.05); }
.cl-preview-item.cl-done {
  background: rgba(16,185,129,0.06);
  border-color: rgba(16,185,129,0.25);
}
.cl-preview-check {
  width: 18px; height: 18px;
  border-radius: 5px;
  border: 2px solid var(--border-light);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: var(--bg-card);
  transition: var(--transition-fast);
}
.cl-preview-item.cl-done .cl-preview-check {
  background: var(--green);
  border-color: var(--green);
}
.cl-preview-num {
  font-size: 0.75rem; font-weight: 700;
  color: var(--text-muted); flex-shrink: 0; min-width: 18px;
}
.cl-preview-text {
  flex: 1; font-size: 0.85rem; color: var(--text-primary);
  transition: color 0.2s;
}
.cl-preview-item.cl-done .cl-preview-text {
  text-decoration: line-through;
  color: var(--text-muted);
}
.cl-preview-del {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); padding: 2px 5px;
  border-radius: 4px; font-size: 0.78rem; flex-shrink: 0;
  transition: var(--transition-fast);
  opacity: 0;
}
.cl-preview-item:hover .cl-preview-del { opacity: 1; }
.cl-preview-del:hover { color: var(--red); background: rgba(239,68,68,0.12); }

/* Card-level checklist */
.card-checklist {
  margin: 10px 0 8px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
}
.card-checklist-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.card-checklist-label {
  font-size: 0.75rem; font-weight: 700;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px;
}
.card-checklist-count {
  font-size: 0.75rem; font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-card);
  padding: 2px 8px; border-radius: 99px;
  border: 1px solid var(--border);
}
.card-checklist-count.all-done {
  color: var(--green);
  background: rgba(16,185,129,0.1);
  border-color: rgba(16,185,129,0.3);
}

/* Progress bar */
.card-cl-progress {
  height: 4px; background: var(--border);
  border-radius: 99px; overflow: hidden;
  margin-bottom: 10px;
}
.card-cl-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green), #34d399);
  border-radius: 99px;
  transition: width 0.5s cubic-bezier(0.25,0.46,0.45,0.94);
}

/* Checklist items in card */
.card-cl-list {
  list-style: none; padding: 0;
  display: flex; flex-direction: column; gap: 4px;
}
.card-cl-item {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 6px; border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-fast);
  user-select: none;
}
.card-cl-item:hover { background: var(--bg-card-hover); }
.card-cl-item.cl-done { opacity: 0.75; }
.card-cl-check {
  width: 16px; height: 16px; flex-shrink: 0;
  border-radius: 4px;
  border: 2px solid var(--border-light);
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-card);
  transition: var(--transition-fast);
}
.card-cl-item.cl-done .card-cl-check {
  background: var(--green);
  border-color: var(--green);
  box-shadow: 0 0 6px rgba(16,185,129,0.4);
}
.card-cl-text {
  font-size: 0.82rem; color: var(--text-secondary);
  flex: 1; line-height: 1.4;
}
.card-cl-item.cl-done .card-cl-text {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* ==================== LOGIN SCREEN ==================== */
.login-screen {
  position: fixed; inset: 0; 
  background: var(--bg-primary);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999; padding: 20px;
}
.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%; max-width: 420px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
  text-align: center;
}
.login-card h2 { margin: 24px 0 8px; font-size: 1.5rem; color: var(--text-primary); }
.login-card p { color: var(--text-muted); margin-bottom: 32px; font-size: 0.9rem; }
.login-card .brand.large { justify-content: center; margin-bottom: 0; }
.login-card .brand-icon { width: 50px; height: 50px; }
.login-card .brand-name { font-size: 1.4rem; }
.login-card form { text-align: left; }
.login-card .btn-block { width: 100%; margin-top: 24px; padding: 12px; }
.login-footer { margin-top: 32px; font-size: 0.75rem; color: var(--text-muted); }

/* ==================== GLOBAL SEARCH ==================== */
.global-search-container {
  margin-left: 24px;
  position: relative;
  flex: 1;
  max-width: 400px;
}
.global-search-container .search-box { width: 100%; height: 38px; }
.search-results-overlay {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  max-height: 400px; overflow-y: auto;
  z-index: 100;
  display: none;
}
.search-results-overlay.active { display: block; animation: slideDown 0.2s ease; }
.search-result-group { padding: 8px 0; border-bottom: 1px solid var(--border-light); }
.search-result-group:last-child { border-bottom: none; }
.search-result-header {
  padding: 4px 16px; font-size: 0.7rem; font-weight: 700;
  color: var(--text-muted); text-transform: uppercase;
}
.search-result-item {
  padding: 10px 16px; display: flex; align-items: center; gap: 12px;
  cursor: pointer; transition: 0.2s;
}
.search-result-item:hover { background: var(--bg-card-hover); }
.search-result-icon { color: var(--accent-light); }
.search-result-info { flex: 1; }
.search-result-title { font-size: 0.88rem; color: var(--text-primary); margin-bottom: 2px; }
.search-result-meta { font-size: 0.75rem; color: var(--text-muted); }

/* ==================== ACTIVITY LOG ==================== */
.activity-timeline {
  display: flex; flex-direction: column; gap: 0;
  padding: 20px;
}
.activity-item {
  position: relative; padding-left: 32px; padding-bottom: 24px;
}
.activity-item::before {
  content: ''; position: absolute; left: 11px; top: 22px; bottom: 0;
  width: 2px; background: var(--border-light);
}
.activity-item:last-child::before { display: none; }
.activity-dot {
  position: absolute; left: 0; top: 0;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--bg-card); border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); z-index: 1;
}
.activity-content { background: var(--bg-input); padding: 12px 16px; border-radius: 10px; border: 1px solid var(--border-light); }
.activity-user { font-weight: 700; color: var(--text-primary); font-size: 0.88rem; }
.activity-action { color: var(--text-secondary); font-size: 0.88rem; }
.activity-target { font-weight: 600; color: var(--accent-light); }
.activity-time { display: block; margin-top: 4px; font-size: 0.75rem; color: var(--text-muted); }

/* Logout Button */
.logout-btn {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); transition: 0.2s;
  padding: 8px; border-radius: 8px;
}
.logout-btn:hover { color: var(--red); background: rgba(239, 68, 68, 0.1); }

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==================== REPORTS PAGE ==================== */
.reports-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 10px;
}
.stat-block {
  padding: 16px; border-radius: var(--radius); background: var(--bg-input);
  border: 1px solid var(--border-light); text-align: center;
}
.stat-val { display: block; font-size: 1.5rem; font-weight: 800; color: var(--accent-light); margin-bottom: 4px; }
.stat-lab { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; font-weight: 600; }

.priority-chart {
  display: flex; align-items: flex-end; gap: 12px; height: 180px; padding: 20px;
  justify-content: space-around;
}
.chart-bar-wrapper { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; height: 100%; justify-content: flex-end; }
.chart-bar { width: 40px; border-radius: 6px 6px 0 0; transition: height 1s ease; position: relative; }
.chart-bar:hover::after {
  content: attr(data-value); position: absolute; top: -25px; left: 50%; transform: translateX(-50%);
  background: var(--bg-primary); color: #fff; padding: 2px 6px; border-radius: 4px; font-size: 0.7rem;
}
.chart-label { font-size: 0.7rem; color: var(--text-muted); font-weight: 600; }

/* ==================== PRINT STYLES ==================== */
@media print {
  body { background: white !important; color: black !important; }
  .sidebar, .topbar, .btn, .icon-btn, .filter-bar, .nav-badge, .breadcrumb, .modal-overlay { display: none !important; }
  .page-wrapper { padding: 0 !important; margin: 0 !important; width: 100% !important; }
  .page { display: none !important; }
  .main-content { margin-left: 0 !important; width: 100% !important; }
  
  /* Laporan List Printing */
  body:not(.print-mode-task) #pageReports { display: block !important; }
  
  /* Task BAP Printing */
  body.print-mode-task #taskPrintArea { display: block !important; }

  .card { box-shadow: none !important; border: 1px solid #ddd !important; border-radius: 0 !important; margin-bottom: 20px !important; color: black !important; background: white !important; }
  .stat-block { border: 1px solid #eee !important; color: black !important; background: white !important; }
  .stat-val { color: #333 !important; }
  .chart-bar { border: 1px solid #333 !important; }
  .page-title { color: black !important; font-size: 24pt !important; }
  .page-subtitle { color: #666 !important; }
}

/* Kop Surat Styling */
.task-print-area {
  font-family: 'Times New Roman', Times, serif;
  color: black;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  background: white;
}
.kop-surat {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-bottom: 10px;
}
.kop-text h2 { margin: 0; font-size: 1.4rem; font-weight: bold; text-transform: uppercase; }
.kop-text h3 { margin: 4px 0; font-size: 1.6rem; font-weight: bold; text-transform: uppercase; }
.kop-text p { margin: 4px 0 0 0; font-size: 1rem; }
.kop-line { border: 0; border-bottom: 3px solid black; margin: 0 0 2px 0; }
.kop-line-double { border: 0; border-bottom: 1px solid black; margin-bottom: 20px; }
.bap-title { text-align: center; font-size: 1.3rem; font-weight: bold; text-decoration: underline; margin-bottom: 20px; text-transform: uppercase; }
.bap-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; font-size: 1.1rem; }
.bap-table td { padding: 8px 4px; vertical-align: top; }
.bap-table td:first-child { width: 180px; font-weight: bold; }
.bap-table td:nth-child(2) { width: 10px; }
.bap-images { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 20px; justify-content: center; }
.bap-image-item { text-align: center; border: 1px solid #ccc; padding: 10px; width: 45%; }
.bap-image-item img { max-width: 100%; max-height: 300px; object-fit: contain; }
.bap-image-title { margin-top: 8px; font-weight: bold; font-family: sans-serif; font-size: 0.9rem; }
.bap-sign { margin-top: 50px; display: flex; justify-content: flex-end; text-align: center; font-size: 1.1rem; }
.bap-sign-box { width: 250px; }
.bap-sign-name { margin-top: 80px; font-weight: bold; text-decoration: underline; }

/* ==================== PHASE 3 UX = : COMMENTS ==================== */
.comments-list {
  display: flex; flex-direction: column; gap: 8px;
  max-height: 150px; overflow-y: auto; margin: 10px 0;
  padding-right: 5px;
}
.comment-bubble {
  background: var(--bg-card-hover); border: 1px solid var(--border-light);
  padding: 8px 12px; border-radius: 12px 12px 12px 2px;
  font-size: 0.82rem; position: relative;
}
.comment-user { font-weight: 700; color: var(--accent-light); margin-right: 6px; }
.comment-text { color: var(--text-primary); }
.comment-time { display: block; font-size: 0.65rem; color: var(--text-muted); margin-top: 4px; }

/* Tags / Labels */
.tag-container { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag-badge {
  font-size: 0.65rem; font-weight: 700; text-transform: uppercase;
  padding: 2px 8px; border-radius: 4px;
  background: rgba(99,102,241,0.1); color: var(--accent-light);
  border: 1px solid rgba(99,102,241,0.2);
}

/* Checkbox Container */
.checkbox-container {
  display: block; position: relative; padding-left: 28px; cursor: pointer;
  user-select: none;
}
.checkbox-container input { position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0; }
.checkmark {
  position: absolute; top: 0; left: 0; height: 18px; width: 18px;
  background: var(--bg-input); border: 1.5px solid var(--border); border-radius: 4px;
}
.checkbox-container:hover input ~ .checkmark { background: var(--bg-card-hover); }
.checkbox-container input:checked ~ .checkmark { background: var(--accent); border-color: var(--accent); }
.checkmark:after {
  content: ""; position: absolute; display: none;
  left: 5px; top: 2px; width: 5px; height: 10px;
  border: solid white; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.checkbox-container input:checked ~ .checkmark:after { display: block; }

/* ==================== NOTIFICATION DROPDOWN ==================== */
.notification-wrapper {
  position: relative;
}
.notif-dropdown {
  position: absolute;
  top: calc(100% + 15px);
  right: -10px; /* Aligned slightly better */
  width: 320px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: var(--transition);
  z-index: 1000;
  overflow: hidden; /* For border radius clip */
}
.notif-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.notif-header {
  padding: 16px 20px;
  font-weight: 600;
  font-size: 1rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.2);
}
.notif-list {
  max-height: 350px;
  overflow-y: auto;
}
.notif-item {
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition-fast);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.notif-item:hover {
  background: var(--bg-card-hover);
}
.notif-item:last-child {
  border-bottom: none;
}
.notif-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}
.notif-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.empty-state-mini {
  padding: 30px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-style: italic;
}
.notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--red);
  border: 2px solid var(--bg-primary);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); width: 260px; z-index: 1100; }
  .sidebar.active { transform: translateX(0); }
  .topbar { padding: 0 15px; }
  .global-search-container { max-width: 150px; }
  .page-header { flex-direction: column; align-items: flex-start; gap: 15px; }
  .page-header .btn-primary, .page-header .btn-secondary { width: 100%; }
}

/* Login logo size */
.login-card .brand-logo { width: 72px; height: 72px; border-radius: 16px; }
.login-card .brand-logo img { width: 100%; height: 100%; object-fit: contain; }
