/* ═══════════════════════════════════════════════════════
   CiviTrack Campus — Main Stylesheet
   Modern Dark Theme | Bootstrap 5 Extension
═══════════════════════════════════════════════════════ */

/* ── CSS Variables ──────────────────────────────────── */
:root {
  --primary:        #6366f1;
  --primary-dark:   #4f46e5;
  --primary-glow:   rgba(99, 102, 241, 0.25);
  --secondary:      #06b6d4;
  --success:        #10b981;
  --warning:        #f59e0b;
  --danger:         #ef4444;
  --info:           #3b82f6;

  --bg-dark:        #0b0f1a;
  --bg-card:        #131929;
  --bg-card-hover:  #1a2235;
  --sidebar-bg:     #0d1117;
  --sidebar-width:  260px;
  --topbar-height:  64px;
  --border-color:   rgba(255,255,255,0.07);

  --text-primary:   #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted:     #64748b;

  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  28px;

  --shadow-sm:  0 2px 8px rgba(0,0,0,0.3);
  --shadow-md:  0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg:  0 8px 40px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 30px var(--primary-glow);

  --transition: all 0.25s cubic-bezier(.4,0,.2,1);
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Scrollbar ──────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ═══════════════════════════════════════════════════════
   LAYOUT — Wrapper, Sidebar, Main
═══════════════════════════════════════════════════════ */
.wrapper {
  display: flex;
  min-height: 100vh;
}

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

.sidebar.collapsed {
  width: 68px;
}

/* Brand */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 18px;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(135deg, rgba(99,102,241,.15), rgba(6,182,212,.08));
  min-height: 70px;
  text-decoration: none;
}

.brand-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.brand-text {
  display: flex; flex-direction: column;
  overflow: hidden;
  transition: var(--transition);
}
.brand-name {
  font-size: 16px; font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.brand-sub {
  font-size: 10px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 1.5px;
  white-space: nowrap;
}

.sidebar.collapsed .brand-text,
.sidebar.collapsed .user-info,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .nav-section,
.sidebar.collapsed .clock-widget,
.sidebar.collapsed .btn-logout span { display: none; }

/* Sidebar User */
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(255,255,255,0.02);
}

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

.user-name {
  font-size: 13px; font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 150px;
}
.user-role {
  font-size: 11px; color: var(--text-muted);
  white-space: nowrap;
}

/* Nav */
.sidebar-nav {
  list-style: none;
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
}

.nav-section {
  font-size: 10px; font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 12px 20px 6px;
  white-space: nowrap;
}

.nav-item .nav-link {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 18px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  margin: 2px 8px;
  transition: var(--transition);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  position: relative;
}

.nav-item .nav-link:hover {
  background: rgba(99,102,241,0.1);
  color: var(--text-primary);
}

.nav-item .nav-link.active {
  background: linear-gradient(135deg, rgba(99,102,241,0.2), rgba(6,182,212,0.1));
  color: var(--primary);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--primary);
}

.nav-icon {
  width: 18px; text-align: center;
  font-size: 14px; flex-shrink: 0;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 14px 18px;
  border-top: 1px solid var(--border-color);
  background: rgba(0,0,0,.2);
}

.clock-widget {
  text-align: center; margin-bottom: 10px;
}
.clock-time {
  font-size: 22px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  letter-spacing: 1px;
}
.clock-date { font-size: 11px; color: var(--text-muted); }

.btn-logout {
  display: flex; align-items: center; justify-content: center;
  width: 100%; padding: 9px 16px;
  background: rgba(239,68,68,0.1);
  color: #ef4444; border: 1px solid rgba(239,68,68,0.2);
  border-radius: var(--radius-sm);
  text-decoration: none; font-size: 13px; font-weight: 500;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-logout:hover {
  background: rgba(239,68,68,0.2); color: #ef4444;
}

/* ── Main Content ──────────────────────────────────── */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex; flex-direction: column;
  min-height: 100vh;
  transition: margin-left 0.25s ease;
}
.sidebar.collapsed ~ .main-content { margin-left: 68px; }

/* ── Top Navbar ──────────────────────────────────── */
.top-navbar {
  height: var(--topbar-height);
  background: rgba(11,15,26,.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  display: flex; align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky; top: 0; z-index: 900;
}

.sidebar-toggle-btn {
  background: none; border: none;
  color: var(--text-secondary);
  font-size: 18px; cursor: pointer;
  padding: 8px; border-radius: var(--radius-sm);
  transition: var(--transition);
  flex-shrink: 0;
}
.sidebar-toggle-btn:hover { background: rgba(255,255,255,.06); color: var(--text-primary); }

.navbar-breadcrumb {
  flex: 1; font-size: 14px; color: var(--text-secondary);
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}

.navbar-right {
  display: flex; align-items: center; gap: 12px; flex-shrink: 0;
}

.live-time, .hari-badge {
  display: flex; align-items: center;
  font-size: 13px; color: var(--text-secondary);
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border-color);
  padding: 5px 12px; border-radius: 99px;
  white-space: nowrap;
}

.user-avatar-btn {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border-color);
  border-radius: 99px; padding: 5px 14px 5px 6px;
  color: var(--text-primary); cursor: pointer;
  transition: var(--transition); font-size: 13px; font-weight: 500;
}
.user-avatar-btn:hover { background: rgba(255,255,255,.08); }

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

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

/* ── Page Header ──────────────────────────────────── */
.page-header {
  margin-bottom: 28px;
}
.page-title {
  font-size: 24px; font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}
.page-subtitle {
  font-size: 14px; color: var(--text-muted); margin-top: 4px;
}

/* ═══════════════════════════════════════════════════════
   COMPONENTS — Cards
═══════════════════════════════════════════════════════ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  overflow: hidden;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.card-header {
  background: rgba(255,255,255,.03);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 22px;
  font-weight: 600; font-size: 15px;
  color: var(--text-primary);
  display: flex; align-items: center; gap: 10px;
}

.card-body { padding: 22px; }

/* ── Stat Cards ──────────────────────────────────── */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex; align-items: center; gap: 18px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
}

.stat-card.primary::before   { background: linear-gradient(90deg, var(--primary), var(--secondary)); }
.stat-card.success::before   { background: linear-gradient(90deg, var(--success), #34d399); }
.stat-card.warning::before   { background: linear-gradient(90deg, var(--warning), #fcd34d); }
.stat-card.danger::before    { background: linear-gradient(90deg, var(--danger),  #f87171); }
.stat-card.info::before      { background: linear-gradient(90deg, var(--info),    #60a5fa); }
.stat-card.secondary::before { background: linear-gradient(90deg, #8b5cf6,       #a78bfa); }

.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: rgba(99,102,241,.3); }

.stat-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.stat-card.primary   .stat-icon { background: rgba(99,102,241,.15); color: var(--primary); }
.stat-card.success   .stat-icon { background: rgba(16,185,129,.15); color: var(--success); }
.stat-card.warning   .stat-icon { background: rgba(245,158,11,.15); color: var(--warning); }
.stat-card.danger    .stat-icon { background: rgba(239,68,68,.15);  color: var(--danger); }
.stat-card.info      .stat-icon { background: rgba(59,130,246,.15); color: var(--info); }
.stat-card.secondary .stat-icon { background: rgba(139,92,246,.15); color: #8b5cf6; }

.stat-value {
  font-size: 30px; font-weight: 800;
  line-height: 1; color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.stat-label {
  font-size: 12.5px; color: var(--text-muted);
  font-weight: 500; margin-top: 3px;
  text-transform: uppercase; letter-spacing: 0.5px;
}

/* ═══════════════════════════════════════════════════════
   COMPONENTS — Tables
═══════════════════════════════════════════════════════ */
.table-wrapper {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.table {
  color: var(--text-primary);
  margin-bottom: 0;
  font-size: 13.5px;
}
.table thead th {
  background: rgba(99,102,241,.08);
  border-bottom: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.8px;
  padding: 12px 16px; white-space: nowrap;
}
.table tbody tr {
  border-bottom: 1px solid var(--border-color);
  transition: background 0.15s;
}
.table tbody tr:last-child { border-bottom: none; }
.table tbody tr:hover { background: rgba(255,255,255,.03); }
.table tbody td { padding: 13px 16px; vertical-align: middle; }

/* ═══════════════════════════════════════════════════════
   COMPONENTS — Status Badges
═══════════════════════════════════════════════════════ */
.status-badge {
  font-size: 12px; padding: 5px 12px;
  border-radius: 99px; font-weight: 600;
  letter-spacing: 0.3px;
}

/* Animated pulse for "di_kelas" */
.pulse-dot { position: relative; }
.pulse-dot::before {
  content: '';
  position: absolute; top: 50%; right: -6px;
  transform: translateY(-50%);
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #10b981;
  animation: pulse-ring 1.5s infinite;
}

@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(16,185,129,.6); }
  70%  { box-shadow: 0 0 0 8px rgba(16,185,129,.0); }
  100% { box-shadow: 0 0 0 0 rgba(16,185,129,.0); }
}

/* ═══════════════════════════════════════════════════════
   COMPONENTS — Forms
═══════════════════════════════════════════════════════ */
.form-control, .form-select {
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  transition: var(--transition);
}
.form-control:focus, .form-select:focus {
  background: rgba(99,102,241,.08);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  color: var(--text-primary);
}
.form-control::placeholder { color: var(--text-muted); }
.form-select option { background: var(--bg-card); color: var(--text-primary); }
.form-label { font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }

/* ═══════════════════════════════════════════════════════
   COMPONENTS — Buttons
═══════════════════════════════════════════════════════ */
.btn {
  border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 600;
  padding: 9px 20px;
  transition: var(--transition);
  letter-spacing: 0.2px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none;
  box-shadow: 0 4px 15px var(--primary-glow);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px var(--primary-glow); }

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

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

/* ═══════════════════════════════════════════════════════
   COMPONENTS — Quick Status Buttons
═══════════════════════════════════════════════════════ */
.status-btn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.status-quick-btn {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 20px 16px;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  cursor: pointer; transition: var(--transition);
  text-align: center;
}
.status-quick-btn:hover {
  border-color: var(--primary);
  background: rgba(99,102,241,.08);
  color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}
.status-quick-btn.active {
  border-color: currentColor;
  background: rgba(99,102,241,.12);
}
.status-quick-btn i { font-size: 28px; }
.status-quick-btn span { font-size: 12px; font-weight: 600; }

/* ═══════════════════════════════════════════════════════
   COMPONENTS — Dosen Card (Mahasiswa view)
═══════════════════════════════════════════════════════ */
.dosen-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.dosen-card:hover {
  border-color: rgba(99,102,241,.4);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

.dosen-card .dosen-name { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.dosen-card .dosen-prodi { font-size: 12px; color: var(--text-muted); }

.dosen-location-chip {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border-color);
  border-radius: 99px;
  padding: 6px 14px;
  font-size: 12.5px; color: var(--text-secondary);
  margin-top: 12px;
}

/* ═══════════════════════════════════════════════════════
   LOGIN PAGE
═══════════════════════════════════════════════════════ */
.login-page {
  min-height: 100vh;
  display: flex;
  background: var(--bg-dark);
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(99,102,241,.12) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(6,182,212,.08) 0%, transparent 50%),
              radial-gradient(ellipse at 60% 80%, rgba(139,92,246,.06) 0%, transparent 40%);
  pointer-events: none;
}

/* Grid pattern */
.login-page::after {
  content: '';
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(99,102,241,.04) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(99,102,241,.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.login-left {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 24px;
  padding: 60px;
  position: relative; z-index: 1;
}

.login-brand {
  text-align: center;
}
.login-brand-icon {
  width: 80px; height: 80px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 22px;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; color: white;
  margin: 0 auto 20px;
  box-shadow: 0 10px 40px var(--primary-glow);
  animation: float 3s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}

.login-brand h1 {
  font-size: 36px; font-weight: 800;
  background: linear-gradient(135deg, #fff, var(--secondary));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}
.login-brand p { font-size: 15px; color: var(--text-muted); max-width: 320px; margin: 0 auto; }

.login-features {
  display: flex; flex-direction: column; gap: 14px;
  width: 100%; max-width: 340px;
}
.feature-item {
  display: flex; align-items: center; gap: 14px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 18px;
}
.feature-item i { font-size: 20px; color: var(--primary); width: 24px; text-align: center; }
.feature-item span { font-size: 13.5px; color: var(--text-secondary); }

.login-right {
  width: 420px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.02);
  border-left: 1px solid var(--border-color);
  padding: 40px;
  position: relative; z-index: 1;
}

.login-card {
  width: 100%; max-width: 360px;
}
.login-card h2 {
  font-size: 22px; font-weight: 700;
  color: var(--text-primary); margin-bottom: 6px;
}
.login-card p { font-size: 13px; color: var(--text-muted); margin-bottom: 28px; }

.btn-login {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none; width: 100%;
  padding: 12px; font-size: 15px; font-weight: 600;
  border-radius: var(--radius-sm);
  color: white; cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 20px var(--primary-glow);
}
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 8px 30px var(--primary-glow); }

/* ═══════════════════════════════════════════════════════
   QR SCANNER
═══════════════════════════════════════════════════════ */
.scanner-container {
  max-width: 480px; margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

#qr-reader {
  border-radius: var(--radius-md);
  overflow: hidden;
}
#qr-reader video { border-radius: var(--radius-md); }
#qr-reader__scan_region { border-radius: var(--radius-md); }

.scan-result-box {
  background: rgba(16,185,129,.1);
  border: 1px solid rgba(16,185,129,.3);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex; align-items: center; gap: 12px;
}

/* ═══════════════════════════════════════════════════════
   QR CODE DISPLAY
═══════════════════════════════════════════════════════ */
.qr-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  transition: var(--transition);
}
.qr-card:hover { border-color: rgba(99,102,241,.4); box-shadow: var(--shadow-md); }

.qr-code-box {
  display: inline-block;
  background: white;
  padding: 16px;
  border-radius: var(--radius-md);
  margin: 16px auto;
}

/* ═══════════════════════════════════════════════════════
   SCHEDULE TIMELINE
═══════════════════════════════════════════════════════ */
.timeline {
  position: relative; padding-left: 28px;
}
.timeline::before {
  content: '';
  position: absolute; left: 11px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), transparent);
}
.timeline-item { position: relative; margin-bottom: 24px; }
.timeline-item::before {
  content: '';
  position: absolute; left: -21px; top: 6px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--bg-dark);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.timeline-item.active::before { background: var(--success); box-shadow: 0 0 0 3px rgba(16,185,129,.3); }
.timeline-item.past::before   { background: var(--text-muted); box-shadow: none; }

.timeline-time { font-size: 11px; color: var(--text-muted); font-weight: 600; margin-bottom: 4px; }
.timeline-content {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}
.timeline-item.active .timeline-content {
  border-color: rgba(16,185,129,.3);
  background: rgba(16,185,129,.05);
}

/* ═══════════════════════════════════════════════════════
   UPLOAD AREA
═══════════════════════════════════════════════════════ */
.upload-zone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  padding: 50px 30px;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--primary);
  background: rgba(99,102,241,.05);
}
.upload-zone i { font-size: 48px; color: var(--primary); margin-bottom: 16px; }
.upload-zone h5 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.upload-zone p { font-size: 13px; color: var(--text-muted); }

/* ═══════════════════════════════════════════════════════
   ACTIVITY LOG
═══════════════════════════════════════════════════════ */
.activity-item {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-color);
}
.activity-item:last-child { border-bottom: none; }
.activity-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(99,102,241,.1);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.activity-text { font-size: 13.5px; color: var(--text-primary); }
.activity-time { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }

/* ═══════════════════════════════════════════════════════
   MONITORING TABLE — Live Indicator
═══════════════════════════════════════════════════════ */
.live-indicator {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600;
  color: var(--success);
}
.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--success);
  animation: live-pulse 2s infinite;
}
@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(1.3); }
}

/* ═══════════════════════════════════════════════════════
   ALERTS & MISC
═══════════════════════════════════════════════════════ */
.alert {
  border-radius: var(--radius-md);
  border: none;
  font-size: 13.5px;
  padding: 14px 18px;
}
.alert-success { background: rgba(16,185,129,.12); color: #6ee7b7; }
.alert-danger   { background: rgba(239,68,68,.12);  color: #fca5a5; }
.alert-warning  { background: rgba(245,158,11,.12); color: #fcd34d; }
.alert-info     { background: rgba(59,130,246,.12); color: #93c5fd; }

/* Dropdown menus */
.dropdown-menu {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 8px;
}
.dropdown-item { color: var(--text-secondary); border-radius: var(--radius-sm); font-size: 13.5px; padding: 8px 14px; }
.dropdown-item:hover { background: rgba(99,102,241,.1); color: var(--text-primary); }
.dropdown-divider { border-color: var(--border-color); }
.dropdown-header { color: var(--text-muted); font-size: 12px; }

/* Modal */
.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
}
.modal-header { border-bottom: 1px solid var(--border-color); padding: 20px 24px; }
.modal-footer { border-top:  1px solid var(--border-color); padding: 16px 24px; }

/* Pagination */
.page-link { background: var(--bg-card); border-color: var(--border-color); color: var(--text-secondary); }
.page-link:hover { background: rgba(99,102,241,.1); color: var(--primary); border-color: var(--primary); }
.page-item.active .page-link { background: var(--primary); border-color: var(--primary); }

/* Empty state */
.empty-state {
  text-align: center; padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state i { font-size: 56px; margin-bottom: 16px; opacity: 0.4; }
.empty-state h5 { font-size: 16px; font-weight: 600; margin-bottom: 8px; color: var(--text-secondary); }

/* ── Search Box ─────────────────────────────────────── */
.search-box {
  position: relative;
}
.search-box .form-control { padding-left: 44px; }
.search-box .search-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); pointer-events: none;
}

/* ── Role badges ─────────────────────────────────────── */
.role-badge {
  font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 99px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.role-admin     { background: rgba(239,68,68,.15);  color: #f87171; }
.role-dosen     { background: rgba(99,102,241,.15); color: #a5b4fc; }
.role-mahasiswa { background: rgba(16,185,129,.15); color: #6ee7b7; }

/* ── Progress Ring ─────────────────────────────────── */
.progress-thin {
  height: 6px; border-radius: 99px;
  background: rgba(255,255,255,.06);
}
.progress-thin .progress-bar { border-radius: 99px; }

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .login-left { display: none; }
  .login-right { width: 100%; border-left: none; }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    position: fixed; z-index: 1050;
    box-shadow: var(--shadow-lg);
  }
  .sidebar.mobile-open { transform: translateX(0); }
  .main-content { margin-left: 0 !important; }
  .page-content { padding: 16px; }
  .stat-card { padding: 16px; }
  .stat-value { font-size: 24px; }
  .top-navbar { padding: 0 16px; }
  .status-btn-grid { grid-template-columns: repeat(2, 1fr); }

  /* Mobile overlay */
  .sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 1049;
  }
  .sidebar-overlay.show { display: block; }
}

@media (max-width: 480px) {
  .login-right { padding: 24px 20px; }
  .status-btn-grid { grid-template-columns: repeat(2, 1fr); }
}
