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

/* ==========================================
   CSS DESIGN TOKENS
   ========================================== */
:root {
  --primary:       #4f46e5;
  --primary-dark:  #4338ca;
  --primary-light: #818cf8;
  --primary-50:    #eef2ff;
  --primary-100:   #e0e7ff;

  --accent:        #06b6d4;
  --accent-dark:   #0284c7;

  --success:       #10b981;
  --success-light: #d1fae5;
  --warning:       #f59e0b;
  --warning-light: #fef9c3;
  --danger:        #ef4444;
  --danger-light:  #fee2e2;
  --info:          #3b82f6;
  --info-light:    #dbeafe;

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

  --bg:      #f0f4ff;
  --surface: #ffffff;
  --border:  rgba(226, 232, 240, 0.9);
  --text:    #1e293b;
  --muted:   #64748b;

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

  --shadow-xs: 0 1px 2px rgb(0 0 0 / 0.04);
  --shadow-sm: 0 2px 8px rgb(0 0 0 / 0.06), 0 1px 3px rgb(0 0 0 / 0.04);
  --shadow:    0 4px 20px -4px rgb(79 70 229 / 0.12), 0 2px 6px rgb(0 0 0 / 0.04);
  --shadow-lg: 0 16px 48px -8px rgb(79 70 229 / 0.20), 0 6px 16px rgb(0 0 0 / 0.06);
  --shadow-hover: 0 24px 56px -8px rgb(79 70 229 / 0.28);
}

/* ==========================================
   BASE
   ========================================== */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================
   NAVBAR
   ========================================== */
.navbar-custom {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(226, 232, 240, 0.7);
  box-shadow: 0 1px 16px rgb(0 0 0 / 0.05);
}

.navbar-brand {
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--primary) 30%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar-brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.nav-link {
  font-weight: 500;
  color: var(--gray-600) !important;
  padding: 0.38rem 0.72rem !important;
  border-radius: var(--radius-xs);
  transition: all 0.18s ease;
  font-size: 0.875rem;
  display: flex !important;
  align-items: center;
  gap: 5px;
}

.nav-link:hover {
  color: var(--primary) !important;
  background: var(--primary-50);
}

.nav-link.nav-active {
  color: var(--primary) !important;
  background: var(--primary-100);
  font-weight: 600;
}

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gray-100);
  border-radius: 50px;
  padding: 5px 14px 5px 5px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray-700);
  text-decoration: none;
  transition: background 0.2s;
  border: 1px solid var(--gray-200);
}

.user-pill:hover { background: var(--gray-200); color: var(--gray-800); }

.user-avatar-sm {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.68rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* ==========================================
   HERO SECTION
   ========================================== */
.hero-section {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #4338ca 0%, #6d28d9 45%, #0e7490 100%);
  border-radius: var(--radius-xl);
  padding: 64px 48px;
  margin-bottom: 40px;
  color: white;
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hero-blob-1 {
  top: -80px; right: -60px;
  width: 380px; height: 380px;
  background: rgba(255,255,255,0.07);
}

.hero-blob-2 {
  bottom: -60px; left: -40px;
  width: 240px; height: 240px;
  background: rgba(255,255,255,0.04);
}

.hero-blob-3 {
  top: 40%; right: 22%;
  width: 120px; height: 120px;
  background: rgba(255,255,255,0.035);
}

.hero-content { position: relative; z-index: 2; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 30px;
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  color: white;
  margin-bottom: 20px;
}

.hero-search-wrap {
  background: rgba(255,255,255,0.14);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.24);
  border-radius: 50px;
  padding: 6px 6px 6px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 540px;
}

.hero-search-wrap input {
  background: transparent;
  border: none;
  color: white;
  font-size: 0.875rem;
  font-family: inherit;
  flex: 1;
  outline: none;
  padding: 8px 0;
}

.hero-search-wrap input::placeholder { color: rgba(255,255,255,0.6); }

.hero-search-btn {
  background: white;
  color: var(--primary);
  border: none;
  border-radius: 40px;
  padding: 10px 22px;
  font-weight: 700;
  font-size: 0.875rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.hero-search-btn:hover {
  background: var(--primary-50);
  transform: scale(1.02);
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.13);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 30px;
  padding: 5px 13px;
  font-size: 0.775rem;
  font-weight: 600;
  color: white;
}

/* ==========================================
   SECTION HEADERS
   ========================================== */
.section-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.section-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.3px;
  margin-bottom: 4px;
}

/* ==========================================
   CARD BASE
   ========================================== */
.card-custom {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-custom:hover {
  box-shadow: var(--shadow-hover);
  border-color: rgba(79, 70, 229, 0.18);
  transform: translateY(-4px);
}

/* ==========================================
   JOB CARDS
   ========================================== */
.job-card {
  position: relative;
  overflow: hidden;
}

.job-card::before {
  content: '';
  position: absolute;
  left: 0; top: 18px; bottom: 18px;
  width: 3px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 0 3px 3px 0;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.job-card:hover::before { opacity: 1; }

.company-initial {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-50), var(--primary-100));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  color: var(--primary);
  flex-shrink: 0;
  letter-spacing: -0.5px;
  border: 1px solid rgba(79, 70, 229, 0.12);
}

.job-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--gray-100);
  color: var(--gray-600);
}

.job-tag-success { background: var(--success-light); color: #065f46; }
.job-tag-primary { background: var(--primary-50); color: var(--primary); }
.job-tag-danger  { background: var(--danger-light); color: #991b1b; }
.job-tag-warning { background: var(--warning-light); color: #92400e; }

/* ==========================================
   ADMIN STAT CARDS
   ========================================== */
.stat-card {
  border-radius: var(--radius);
  padding: 24px;
  color: white;
  position: relative;
  overflow: hidden;
  border: none;
  box-shadow: var(--shadow);
}

.stat-card-glow {
  position: absolute;
  right: -24px; top: -24px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
}

.stat-card-icon {
  width: 46px; height: 46px;
  border-radius: 11px;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

.stat-card-num {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -1.5px;
  margin-bottom: 4px;
  position: relative;
  z-index: 1;
}

.stat-card-label {
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0.82;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
}

.stat-card-footer {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.15);
  position: relative;
  z-index: 1;
}

.stat-card-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255,255,255,0.82);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s;
}

.stat-card-link:hover { color: white; }

.sc-indigo  { background: linear-gradient(135deg, #4f46e5, #7c3aed); }
.sc-emerald { background: linear-gradient(135deg, #10b981, #059669); }
.sc-cyan    { background: linear-gradient(135deg, #06b6d4, #0284c7); }
.sc-amber   { background: linear-gradient(135deg, #f59e0b, #d97706); }

/* ==========================================
   PROGRESS STEPS (status tracker)
   ========================================== */
.progress-steps {
  display: flex;
  align-items: flex-start;
}

.progress-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.progress-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 15px;
  left: calc(50% + 16px);
  right: calc(-50% + 16px);
  height: 2px;
  background: var(--gray-200);
  z-index: 0;
}

.progress-step.ps-done:not(:last-child)::after { background: var(--primary); }

.step-dot {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 2px solid var(--gray-200);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--gray-400);
  position: relative;
  z-index: 1;
  transition: all 0.2s;
}

.progress-step.ps-done .step-dot {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.progress-step.ps-active .step-dot {
  background: white;
  border-color: var(--primary);
  border-width: 2px;
  color: var(--primary);
  box-shadow: 0 0 0 5px var(--primary-100);
}

.step-label {
  font-size: 0.65rem;
  font-weight: 600;
  margin-top: 7px;
  text-align: center;
  color: var(--gray-400);
  line-height: 1.25;
  max-width: 72px;
}

.progress-step.ps-done  .step-label { color: var(--primary); }
.progress-step.ps-active .step-label { color: var(--gray-700); font-weight: 700; }

/* ==========================================
   AUTH LAYOUT (split-panel)
   ========================================== */
.auth-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 200px);
  padding: 16px 0;
}

.auth-card {
  display: flex;
  overflow: hidden;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  max-width: 880px;
  width: 100%;
  background: white;
}

.auth-left {
  background: linear-gradient(148deg, #4338ca 0%, #6d28d9 55%, #0e7490 100%);
  padding: 48px 36px;
  flex: 0 0 42%;
  color: white;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.auth-blob-1 {
  width: 260px; height: 260px;
  bottom: -80px; left: -60px;
  background: rgba(255,255,255,0.07);
}

.auth-blob-2 {
  width: 160px; height: 160px;
  top: -40px; right: -40px;
  background: rgba(255,255,255,0.05);
}

.auth-left-content { position: relative; z-index: 2; }

.auth-right {
  flex: 1;
  padding: 48px 40px;
  background: white;
}

.auth-feature {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
}

.auth-feature-icon {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: rgba(255,255,255,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
  color: white;
}

/* ==========================================
   FORM CONTROLS
   ========================================== */
.form-control, .form-select, textarea.form-control {
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--gray-200);
  padding: 10px 14px;
  font-size: 0.875rem;
  color: var(--text);
  font-family: inherit;
  transition: border-color 0.18s, box-shadow 0.18s;
  background: white;
}

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

.form-label {
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--gray-700);
  margin-bottom: 5px;
  display: block;
}

/* ==========================================
   BUTTONS
   ========================================== */
.btn-primary, .btn-primary-custom {
  background: linear-gradient(135deg, var(--primary), #7c3aed) !important;
  border: none !important;
  color: white !important;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-primary:hover, .btn-primary-custom:hover {
  background: linear-gradient(135deg, var(--primary-dark), #6d28d9) !important;
  color: white !important;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgb(79 70 229 / 0.32) !important;
}

.btn-primary:active { transform: translateY(0) !important; }

.btn-outline-primary {
  color: var(--primary) !important;
  border: 1.5px solid var(--primary) !important;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  background: transparent !important;
  transition: all 0.2s ease;
}

.btn-outline-primary:hover {
  background: var(--primary) !important;
  color: white !important;
  transform: translateY(-1px);
}

.btn-outline-danger {
  border-width: 1.5px !important;
  font-weight: 600;
  font-size: 0.875rem;
}

.btn-outline-secondary {
  border-width: 1.5px !important;
  font-weight: 600;
  font-size: 0.875rem;
}

/* ==========================================
   UPLOAD ZONES
   ========================================== */
.upload-zone {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--gray-50);
  transition: all 0.2s ease;
}

.upload-zone:hover {
  border-color: var(--primary-light);
  background: var(--primary-50);
}

.upload-zone-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: var(--primary-100);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.doc-badge-ok      { background: var(--success-light); color: #065f46; }
.doc-badge-missing { background: var(--warning-light); color: #92400e; }

/* ==========================================
   APPLICATION CARDS (riwayat)
   ========================================== */
.app-card {
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  background: white;
  transition: box-shadow 0.25s, transform 0.25s;
}

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

/* ==========================================
   ALERTS
   ========================================== */
.alert {
  border-radius: var(--radius-sm);
  border-left: 4px solid transparent !important;
  font-size: 0.875rem;
  font-weight: 500;
  border-top: none; border-right: none; border-bottom: none;
}

.alert-danger  { background: var(--danger-light);  color: #991b1b; border-left-color: var(--danger) !important; }
.alert-success { background: var(--success-light); color: #065f46; border-left-color: var(--success) !important; }
.alert-info    { background: var(--info-light);    color: #1e40af; border-left-color: var(--info) !important; }
.alert-warning { background: var(--warning-light); color: #92400e; border-left-color: var(--warning) !important; }

/* ==========================================
   TABLES
   ========================================== */
.table thead th {
  background: var(--gray-50);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--gray-500);
  border-bottom: 2px solid var(--border);
  padding: 12px 16px;
  white-space: nowrap;
}

.table td {
  padding: 13px 16px;
  vertical-align: middle;
  font-size: 0.875rem;
  border-color: var(--border);
}

.table tbody tr:hover { background: var(--gray-50); }

/* ==========================================
   BREADCRUMB
   ========================================== */
.breadcrumb { font-size: 0.8rem; }
.breadcrumb-item a { color: var(--primary); text-decoration: none; }
.breadcrumb-item a:hover { text-decoration: underline; }

/* ==========================================
   LAYOUT
   ========================================== */
.main-content {
  flex: 1 0 auto;
  padding-top: 32px;
  padding-bottom: 56px;
}

/* ==========================================
   FOOTER
   ========================================== */
.footer-custom {
  flex-shrink: 0;
  background: var(--gray-900);
  color: var(--gray-400);
  padding: 52px 0 24px;
}

.footer-brand-text {
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.4px;
  background: linear-gradient(135deg, #a5b4fc, #67e8f9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-link {
  color: var(--gray-500);
  text-decoration: none;
  font-size: 0.875rem;
  line-height: 2.1;
  display: block;
  transition: color 0.2s;
}

.footer-link:hover { color: white; }

.footer-heading {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gray-300);
  margin-bottom: 14px;
}

.footer-divider { border-color: rgba(255,255,255,0.07); margin: 32px 0 24px; }

/* ==========================================
   MISC
   ========================================== */
.text-gradient {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ==========================================
   ANIMATIONS
   ========================================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.anim-up   { animation: fadeInUp 0.48s ease both; }
.anim-up-1 { animation-delay: 0.06s; }
.anim-up-2 { animation-delay: 0.12s; }
.anim-up-3 { animation-delay: 0.18s; }
.anim-up-4 { animation-delay: 0.24s; }

/* ==========================================
   PRINT
   ========================================== */
@media print {
  body { background-color: #fff !important; color: #000 !important; font-size: 12pt; }
  .no-print, nav, footer, .btn, .alert, .breadcrumb, .navbar { display: none !important; }
  .print-only { display: block !important; }
  .card, .card-custom { border: none !important; box-shadow: none !important; }
  .card-body { padding: 0 !important; }
  table { width: 100% !important; border-collapse: collapse !important; margin-top: 20px; }
  table, th, td { border: 1px solid #333 !important; padding: 8px !important; }
  th { background-color: #f1f5f9 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
  .auth-left { display: none; }
  .hero-section { padding: 36px 20px; }
  .hero-search-wrap { max-width: 100%; }
  .stat-card { margin-bottom: 0; }
  .section-title { font-size: 1.2rem; }
}

@media (max-width: 576px) {
  .main-content { padding-top: 20px; }
  .hero-section { padding: 28px 16px; }
}

/* ==========================================
   SIDEBAR LAYOUT
   ========================================== */
body.has-sidebar { overflow-x: hidden; }
.layout-sidebar { display: flex; min-height: 100vh; }

/* ---- Sidebar panel ---- */
.sidebar {
  width: 256px; min-height: 100vh;
  background: #0f172a;
  display: flex; flex-direction: column;
  position: fixed; left: 0; top: 0; bottom: 0;
  z-index: 300; overflow-y: auto; overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.07) transparent;
  transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
}
.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }

.sidebar-brand {
  padding: 18px 16px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0; text-decoration: none;
}
.sidebar-brand-icon {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 0.85rem; flex-shrink: 0;
}
.sidebar-brand-name {
  font-weight: 800; font-size: 1.15rem; letter-spacing: -0.3px;
  background: linear-gradient(135deg, #a5b4fc, #67e8f9);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.sidebar-nav { flex: 1; padding: 14px 10px; }

.sidebar-section-label {
  display: block; font-size: 0.6rem; font-weight: 700;
  letter-spacing: 1.2px; text-transform: uppercase;
  color: rgba(255,255,255,0.25); padding: 10px 10px 5px;
}

.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 9px;
  color: rgba(255,255,255,0.58); text-decoration: none;
  font-size: 0.845rem; font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
  margin-bottom: 2px; line-height: 1.3;
}
.sidebar-link i {
  font-size: 0.95rem; width: 17px; text-align: center;
  flex-shrink: 0; opacity: 0.75; transition: opacity 0.15s;
}
.sidebar-link:hover { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.88); }
.sidebar-link:hover i { opacity: 1; }
.sidebar-link.sidebar-active {
  background: linear-gradient(135deg, rgba(79,70,229,0.9), rgba(124,58,237,0.85));
  color: #fff; font-weight: 600;
  box-shadow: 0 3px 12px rgba(79,70,229,0.3);
}
.sidebar-link.sidebar-active i { opacity: 1; }
.sidebar-link.sidebar-danger { color: rgba(252,165,165,0.68); }
.sidebar-link.sidebar-danger:hover { background: rgba(239,68,68,0.1); color: rgba(252,165,165,0.92); }

.sidebar-divider { border: none; border-top: 1px solid rgba(255,255,255,0.06); margin: 6px 10px; }

.sidebar-footer-area {
  padding: 10px 10px 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.sidebar-user-card {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 9px;
  background: rgba(255,255,255,0.05); margin-bottom: 6px;
}
.sidebar-user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 0.72rem; font-weight: 700; flex-shrink: 0;
}
.sidebar-user-name {
  font-size: 0.81rem; font-weight: 600; color: rgba(255,255,255,0.82);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.25;
}
.sidebar-user-role-badge { font-size: 0.65rem; color: rgba(255,255,255,0.33); line-height: 1; margin-top: 2px; }

/* ---- Main content wrapper ---- */
.sidebar-main {
  margin-left: 256px; flex: 1; min-height: 100vh;
  display: flex; flex-direction: column; background: #f0f4ff;
}

/* ---- Topbar ---- */
.topbar {
  background: #fff; border-bottom: 1px solid rgba(226,232,240,0.9);
  padding: 0 28px; height: 58px;
  display: flex; align-items: center; gap: 12px;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05); flex-shrink: 0;
}
.topbar-toggle {
  display: none; background: none; border: none;
  padding: 6px 8px; border-radius: 8px; cursor: pointer;
  color: var(--gray-500); font-size: 1.25rem; line-height: 1;
  transition: background 0.15s; flex-shrink: 0;
}
.topbar-toggle:hover { background: var(--gray-100); }
.topbar-title-wrap { flex: 1; min-width: 0; }
.topbar-page-title {
  font-size: 0.875rem; font-weight: 700; color: var(--gray-800);
  line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.topbar-subtitle { font-size: 0.69rem; color: var(--gray-400); line-height: 1; margin-top: 2px; }
.topbar-user { font-size: 0.815rem; font-weight: 600; color: var(--gray-600); gap: 8px; }
.topbar-user-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 0.7rem; font-weight: 700; flex-shrink: 0;
}

/* ---- Scrollable content ---- */
.sidebar-content { padding: 28px; flex: 1; }

/* ---- Mobile overlay ---- */
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.45); z-index: 250;
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
}
.sidebar-overlay.active { display: block; }

/* ---- Responsive: sidebar collapses on mobile ---- */
@media (max-width: 992px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.sidebar-open { transform: translateX(0); }
  .sidebar-main { margin-left: 0; }
  .topbar-toggle { display: flex; align-items: center; justify-content: center; }
  .topbar { padding: 0 16px; }
  .sidebar-content { padding: 20px 16px; }
}
@media (max-width: 576px) {
  .sidebar-content { padding: 16px 12px; }
}
