/* ============================================
   TRANSFORM-IN — Design System v2
   Enterprise SaaS, Clean, Premium, Executive-ready
   Fully Responsive | Mobile-first
   ============================================ */

/* --- Google Fonts (Inter) --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* --- CSS Variables --- */
:root {
  /* Brand Colors — Green Emerald (ngajikolektif) */
  --primary: #2d6a4f;
  --primary-light: #40916c;
  --primary-lighter: #52b788;
  --primary-dark: #1b4332;
  --primary-darker: #0d281c;
  --primary-rgb: 45, 106, 79;

  --secondary: #40916c;
  --secondary-light: #52b788;
  --secondary-dark: #2d6a4f;

  --accent: #d4a843;
  --accent-light: #e9c46a;
  --accent-dark: #b8922f;

  --warning: #e9c46a;
  --warning-light: #f0d68a;
  --danger: #E74C3C;
  --danger-light: #F1948A;
  --info: #40916c;

  /* Neutrals — Warm Green Tint */
  --neutral-50: #f4f9f6;
  --neutral-100: #eaf4ef;
  --neutral-200: #d4e2d8;
  --neutral-300: #c8ddd0;
  --neutral-400: #a8c0b0;
  --neutral-500: #7da08a;
  --neutral-600: #5a7a6a;
  --neutral-700: #2d6a4f;
  --neutral-800: #1b4332;
  --neutral-900: #0d281c;

  /* Semantic */
  --body-bg: #dce8e0;
  --card-bg: #f4faf7;
  --text-primary: #1b4332;
  --text-secondary: #2d6a4f;
  --text-muted: #5a7a6a;
  --border: #c8ddd0;
  --border-light: #d4e2d8;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(27, 67, 50, 0.05);
  --shadow-sm: 0 1px 3px rgba(27, 67, 50, 0.06), 0 1px 2px rgba(27, 67, 50, 0.04);
  --shadow-md: 0 4px 6px rgba(27, 67, 50, 0.08), 0 2px 4px rgba(27, 67, 50, 0.04);
  --shadow-lg: 0 10px 25px rgba(27, 67, 50, 0.12), 0 4px 10px rgba(27, 67, 50, 0.06);
  --shadow-xl: 0 20px 40px rgba(27, 67, 50, 0.15), 0 8px 20px rgba(27, 67, 50, 0.08);
  --shadow-glow: 0 0 20px rgba(var(--primary-rgb), 0.2);

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-2xl: 24px;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-primary);
  background: var(--body-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}
a { color: var(--primary); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--primary-light); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

/* --- Selection --- */
::selection { background: rgba(var(--primary-rgb), 0.15); color: var(--primary-dark); }

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 { font-weight: 600; line-height: 1.3; color: var(--text-primary); letter-spacing: -0.02em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }

/* --- Text Utilities --- */
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-accent { color: var(--accent); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-dark { color: var(--text-primary); }
.text-muted { color: var(--text-muted); }
.text-light { color: #fff; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.leading-tight { line-height: 1.25; }
.leading-relaxed { line-height: 1.7; }
.tracking-wide { letter-spacing: 0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.break-word { word-break: break-word; }
.capitalize { text-transform: capitalize; }
.uppercase { text-transform: uppercase; }

/* --- Backgrounds --- */
.bg-primary { background-color: var(--primary); }
.bg-secondary { background-color: var(--secondary); }
.bg-accent { background-color: var(--accent); }
.bg-warning { background-color: var(--warning); }
.bg-danger { background-color: var(--danger); }
.bg-neutral { background-color: var(--body-bg); }
.bg-white { background-color: var(--card-bg); }
.bg-primary-10 { background-color: rgba(var(--primary-rgb), 0.08); }
.bg-primary-20 { background-color: rgba(var(--primary-rgb), 0.15); }
.bg-success-50 { background-color: #eaf4ef; }

/* --- Layout Helpers --- */
.min-h-screen { min-height: 100vh; }
.flex { display: flex; }
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.flex-wrap { flex-wrap: wrap; }
.flex-col { flex-direction: column; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

.p-2 { padding: var(--space-2); }
.p-3 { padding: var(--space-3); }
.p-4 { padding: var(--space-4); }
.p-5 { padding: var(--space-5); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }
.px-2 { padding-left: var(--space-2); padding-right: var(--space-2); }
.px-3 { padding-left: var(--space-3); padding-right: var(--space-3); }
.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }
.px-5 { padding-left: var(--space-5); padding-right: var(--space-5); }
.px-6 { padding-left: var(--space-6); padding-right: var(--space-6); }
.px-8 { padding-left: var(--space-8); padding-right: var(--space-8); }
.py-1 { padding-top: var(--space-1); padding-bottom: var(--space-1); }
.py-2 { padding-top: var(--space-2); padding-bottom: var(--space-2); }
.py-3 { padding-top: var(--space-3); padding-bottom: var(--space-3); }
.py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }
.py-5 { padding-top: var(--space-5); padding-bottom: var(--space-5); }
.py-6 { padding-top: var(--space-6); padding-bottom: var(--space-6); }
.py-8 { padding-top: var(--space-8); padding-bottom: var(--space-8); }

.m-0 { margin: 0; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-10 { margin-bottom: var(--space-10); }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mt-10 { margin-top: var(--space-10); }
.ml-auto { margin-left: auto; }
.mr-2 { margin-right: var(--space-2); }
.mr-3 { margin-right: var(--space-3); }

.max-w-xs { max-width: 20rem; }
.max-w-sm { max-width: 24rem; }
.max-w-md { max-width: 28rem; }
.max-w-lg { max-width: 32rem; }
.max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-6xl { max-width: 72rem; }
.max-w-7xl { max-width: 80rem; }
.w-full { width: 100%; }
.w-auto { width: auto; }
.h-full { height: 100%; }
.h-auto { height: auto; }

.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.relative { position: relative; }
.fixed { position: fixed; }
.absolute { position: absolute; }
.sticky { position: sticky; }
.top-0 { top: 0; }
.left-0 { left: 0; }
.right-0 { right: 0; }
.bottom-0 { bottom: 0; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-30 { z-index: 30; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }
.z-100 { z-index: 100; }

.border-b { border-bottom: 1px solid var(--border); }
.border-t { border-top: 1px solid var(--border); }
.border-r { border-right: 1px solid var(--border); }
.border-l { border-left: 1px solid var(--border); }
.border { border: 1px solid var(--border); }
.border-0 { border: 0; }
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid-cols-5 { grid-template-columns: repeat(5, 1fr); }
.grid-cols-6 { grid-template-columns: repeat(6, 1fr); }
.space-y-1 > * + * { margin-top: var(--space-1); }
.space-y-2 > * + * { margin-top: var(--space-2); }
.space-y-3 > * + * { margin-top: var(--space-3); }
.space-y-4 > * + * { margin-top: var(--space-4); }
.space-y-6 > * + * { margin-top: var(--space-6); }

/* ============================================
   PAGE TRANSITIONS
   ============================================ */
.page-enter {
  animation: pageEnter 0.35s ease-out;
}
@keyframes pageEnter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   SKELETON LOADING
   ============================================ */
.skeleton {
  background: linear-gradient(90deg, var(--neutral-200) 25%, var(--neutral-100) 50%, var(--neutral-200) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-text { height: 14px; margin-bottom: 8px; width: 80%; }
.skeleton-title { height: 20px; margin-bottom: 12px; width: 60%; }
.skeleton-card { height: 120px; border-radius: var(--radius-lg); }
.skeleton-avatar { width: 40px; height: 40px; border-radius: 50%; }

/* ============================================
   CARDS — Premium
   ============================================ */
.card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}
.card:hover { box-shadow: var(--shadow-md); }
.card-header {
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.card-body { padding: var(--space-6); }
.card-footer {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border);
  background: #eaf4ef;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* Premium Card with Hover Lift */
.card-premium {
  transition: all var(--transition-base);
}
.card-premium:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

/* Card with left accent border */
.card-accent-left {
  border-left: 4px solid var(--primary);
}
.card-accent-left.success {
  border-left-color: var(--primary-light);
}
.card-accent-left.warning {
  border-left-color: var(--warning);
}

/* ============================================
   BUTTONS — Modern & Accessible
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
  line-height: 1.5;
  white-space: nowrap;
  user-select: none;
  position: relative;
  overflow: hidden;
}
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.3);
}
.btn:active { transform: scale(0.97); }

/* Primary */
.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}

/* Secondary */
.btn-secondary {
  background: var(--secondary);
  color: white;
}
.btn-secondary:hover {
  background: var(--secondary-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
}

/* Outline */
.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text-primary);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.04);
}

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover {
  background: var(--neutral-100);
  color: var(--text-primary);
}

/* Danger */
.btn-danger {
  background: var(--danger);
  color: white;
}
.btn-danger:hover {
  background: #C0392B;
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

/* Sizes */
.btn-sm { padding: 6px 14px; font-size: 0.8125rem; border-radius: var(--radius-sm); }
.btn-lg { padding: 14px 32px; font-size: 1rem; border-radius: var(--radius-md); }
.btn-xl { padding: 16px 36px; font-size: 1.125rem; border-radius: var(--radius-lg); }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.btn-icon { padding: 8px; width: 36px; height: 36px; border-radius: var(--radius-md); }
.btn-icon.btn-sm { width: 32px; height: 32px; padding: 6px; }

/* Ripple effect */
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.1);
  opacity: 0;
  transition: opacity 0.3s;
}
.btn:active::after { opacity: 1; }

/* ============================================
   FORMS — Enterprise
   ============================================ */
.form-group { margin-bottom: var(--space-5); }
.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
  letter-spacing: 0.01em;
}
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 11px 16px;
  font-size: 0.875rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  color: var(--text-primary);
  font-family: inherit;
  transition: all var(--transition-fast);
  appearance: none;
}
.form-input:hover,
.form-select:hover,
.form-textarea:hover {
  border-color: var(--neutral-400);
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(45, 106, 79, 0.12);
}
.form-input::placeholder { color: var(--neutral-500); }
.form-textarea { min-height: 110px; resize: vertical; line-height: 1.6; }
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236C757D' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}
.form-error { font-size: 0.8125rem; color: var(--danger); margin-top: var(--space-1); display: flex; align-items: center; gap: 4px; }
.form-hint { font-size: 0.8125rem; color: var(--text-muted); margin-top: var(--space-1); }

/* Floating label variant */
.floating-group {
  position: relative;
  margin-bottom: var(--space-5);
}
.floating-group .form-input,
.floating-group .form-textarea {
  padding-top: 22px;
  padding-bottom: 8px;
}
.floating-group .form-label {
  position: absolute;
  top: 12px;
  left: 16px;
  font-size: 0.75rem;
  color: var(--text-muted);
  pointer-events: none;
  transition: all var(--transition-fast);
  font-weight: 400;
}
.floating-group .form-input:focus ~ .form-label,
.floating-group .form-input:not(:placeholder-shown) ~ .form-label,
.floating-group .form-textarea:focus ~ .form-label,
.floating-group .form-textarea:not(:placeholder-shown) ~ .form-label {
  top: 6px;
  font-size: 0.6875rem;
  color: var(--accent);
  font-weight: 600;
}

/* Input with icon */
.input-icon-wrapper {
  position: relative;
}
.input-icon-wrapper .form-input {
  padding-left: 42px;
}
.input-icon-wrapper .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--neutral-500);
  pointer-events: none;
  width: 18px;
  height: 18px;
}

/* Checkbox / Radio custom */
.checkbox-group,
.radio-group {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.checkbox-group:hover,
.radio-group:hover {
  border-color: var(--primary);
  background: rgba(45, 106, 79, 0.03);
}
.checkbox-group input[type="checkbox"],
.radio-group input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ============================================
   ALERTS & TOASTS
   ============================================ */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  border: 1px solid transparent;
  animation: slideIn 0.3s ease-out;
}
.alert-success { background: #d4edda; border-color: #a8d5b8; color: #1b4332; }
.alert-warning { background: #fef9e7; border-color: #f9e79f; color: #7d6608; }
.alert-danger { background: #FDEDEC; border-color: #F5B7B1; color: var(--danger); }
.alert-info { background: #d4e2d8; border-color: #a8c0b0; color: #1b4332; }

/* Toast Notification System */
.toast-container {
  position: fixed;
  top: var(--space-5);
  right: var(--space-5);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 400px;
  width: 100%;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem;
  line-height: 1.5;
  pointer-events: auto;
  animation: toastIn 0.35s ease-out;
  border: 1px solid var(--border);
}
.toast.toast-leaving {
  animation: toastOut 0.3s ease-in forwards;
}
.toast-success { background: #d4edda; border-color: #a8d5b8; color: #1b4332; }
.toast-error { background: #FDEDEC; border-color: #F5B7B1; color: var(--danger); }
.toast-warning { background: #fef9e7; border-color: #f9e79f; color: #7d6608; }
.toast-info { background: #d4e2d8; border-color: #a8c0b0; color: #1b4332; }
.toast-icon { flex-shrink: 0; width: 20px; height: 20px; margin-top: 1px; }
.toast-content { flex: 1; }
.toast-title { font-weight: 600; margin-bottom: 2px; }
.toast-close {
  background: none; border: none; cursor: pointer;
  color: inherit; opacity: 0.5; padding: 2px;
  transition: opacity var(--transition-fast);
  flex-shrink: 0;
}
.toast-close:hover { opacity: 1; }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(100%); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(100%); }
}

/* ============================================
   BADGES & TAGS
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  line-height: 1.4;
  white-space: nowrap;
}
.badge-primary { background: rgba(45, 106, 79, 0.12); color: var(--primary); }
.badge-secondary { background: rgba(64, 145, 108, 0.12); color: #1b4332; }
.badge-success { background: rgba(45, 106, 79, 0.12); color: #1b4332; }
.badge-warning { background: rgba(233, 196, 106, 0.2); color: #8a6d1a; }
.badge-danger { background: rgba(231,76,60,0.1); color: var(--danger); }
.badge-info { background: rgba(64, 145, 108, 0.12); color: #1b4332; }

/* Dot badge */
.badge-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.badge-dot.success { background: var(--secondary); }
.badge-dot.warning { background: var(--warning); }
.badge-dot.danger { background: var(--danger); }
.badge-dot.info { background: var(--accent); }

/* ============================================
   TABLES — Modern Data Display
   ============================================ */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius-md);
  -webkit-overflow-scrolling: touch;
}
table { width: 100%; border-collapse: separate; border-spacing: 0; }
thead { position: sticky; top: 0; z-index: 5; }
th {
  text-align: left;
  padding: 14px 18px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #5a7a6a;
  background: #eaf4ef;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
td {
  padding: 14px 18px;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
  vertical-align: middle;
}
tr:last-child td { border-bottom: 0; }
tbody tr {
  transition: background var(--transition-fast);
}
tbody tr:hover td {
  background: rgba(45, 106, 79, 0.04);
}
tbody tr:active td {
  background: rgba(45, 106, 79, 0.08);
}

/* ============================================
   STATS CARDS
   ============================================ */
.stat-card {
  padding: var(--space-6);
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  transition: all var(--transition-base);
}
.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.stat-value {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.stat-label { font-size: 0.875rem; color: var(--text-muted); margin-top: var(--space-1); font-weight: 500; }
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.stat-trend {
  font-size: 0.8125rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.stat-trend.up { color: var(--secondary); }
.stat-trend.down { color: var(--danger); }

/* ============================================
   PROGRESS BAR
   ============================================ */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--neutral-200);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  position: relative;
}
.progress-fill::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  animation: progressShine 2s ease-in-out infinite;
}
@keyframes progressShine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.progress-sm { height: 4px; }
.progress-lg { height: 12px; }

/* ============================================
   JOURNEY TIMELINE — Premium
   ============================================ */
.journey-timeline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
  padding: var(--space-8) 0;
  gap: var(--space-2);
}
.journey-timeline::before {
  content: '';
  position: absolute;
  top: 40px;
  left: 40px;
  right: 40px;
  height: 3px;
  background: var(--neutral-200);
  z-index: 0;
  border-radius: 2px;
}
.journey-timeline::after {
  content: '';
  position: absolute;
  top: 40px;
  left: 40px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  z-index: 1;
  border-radius: 2px;
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.journey-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
  flex: 1;
  min-width: 0;
}
.journey-dot {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  margin-bottom: var(--space-3);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 3px solid var(--neutral-300);
  background: var(--card-bg);
  color: var(--text-muted);
  position: relative;
}
.journey-dot.active {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
  box-shadow: 0 0 0 6px rgba(45,106,79,0.15), 0 0 20px rgba(45,106,79,0.1);
  transform: scale(1.1);
}
.journey-dot.completed {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}
.journey-dot.completed::after {
  content: '✓';
  font-size: 0.75rem;
}
.journey-dot.completed:not(.active) {
  font-size: 0;
}
.journey-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  text-align: center;
  max-width: 90px;
  line-height: 1.3;
  transition: all var(--transition-base);
}
.journey-label.active { color: var(--text-primary); font-weight: 600; }
.journey-label.completed { color: var(--secondary); }

/* ============================================
   MODALS — Premium
   ============================================ */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  animation: fadeIn 0.2s ease-out;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.modal-content {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  max-width: 540px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: modalEnter 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes modalEnter {
  from { opacity: 0; transform: scale(0.95) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
  padding: var(--space-6) var(--space-6) var(--space-4);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-body { padding: var(--space-6); }
.modal-footer {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  background: #eaf4ef;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

/* ============================================
   LOGIN PAGE — Premium (ngajikolektif style)
   ============================================ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0d281c 0%, #1b4332 50%, #2d6a4f 100%);
  position: relative;
  overflow: hidden;
  padding: 2rem 1rem;
}

/* Islamic Geometric Pattern Overlay */
.islamic-pattern {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.04;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23000000' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.login-container {
  width: 100%;
  max-width: 1000px;
  position: relative;
  z-index: 1;
}

.login-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

/* --- Left: Guide Section --- */
.login-guide {
  color: #fff;
}
.guide-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.guide-brand-icon {
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  backdrop-filter: blur(4px);
}
.guide-brand h2 {
  font-weight: 700;
  margin: 0;
  font-size: 1.5rem;
  color: #ffffff;
  text-shadow: 0 0 20px rgba(255,255,255,0.25);
}
.guide-brand p {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.8);
}
.guide-tagline {
  font-size: 1rem;
  font-weight: 400;
  margin-bottom: 1.5rem;
  opacity: 0.9;
  line-height: 1.6;
  color: rgba(255,255,255,0.9);
}
.guide-features {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.guide-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.08);
  border-radius: 0.75rem;
  backdrop-filter: blur(4px);
  transition: background 0.2s;
}
.guide-feature-item:hover {
  background: rgba(255,255,255,0.15);
}
.guide-feature-icon {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.12);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #d4edda;
}
.guide-feature-text h6 {
  margin: 0 0 0.1rem;
  font-weight: 600;
  font-size: 0.85rem;
  color: #fff;
}
.guide-feature-text small {
  font-size: 0.75rem;
  opacity: 0.75;
  color: rgba(255,255,255,0.85);
  display: block;
  line-height: 1.35;
}
.guide-cta {
  margin-top: 1.5rem;
  font-size: 0.8rem;
  opacity: 0.6;
  text-align: center;
  color: rgba(255,255,255,0.8);
}

/* --- Right: Login Card --- */
.login-card-wrapper {
  width: 100%;
}
.login-card {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  border: none;
  animation: cardFloat 0.6s ease-out;
}
@keyframes cardFloat {
  from { opacity: 0; transform: translateY(30px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.login-card-header {
  text-align: center;
  padding: 2rem 1.5rem 0;
}
.login-card-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #2d6a4f, #40916c);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  box-shadow: 0 4px 12px rgba(45, 106, 79, 0.3);
}
.login-card-header h3 {
  color: #1b4332;
  font-weight: 700;
  font-size: 1.35rem;
  margin: 0 0 0.3rem;
}
.login-card-header p {
  color: #5a7a6a;
  font-size: 0.85rem;
  margin: 0;
}
.login-card-body {
  padding: 1.5rem;
}
.login-card-body .form-label {
  color: #2d6a4f;
  font-size: 0.8rem;
  font-weight: 600;
}
.login-card-body .form-input {
  border-color: #d4e2d8;
  background: #fafcfb;
}
.login-card-body .form-input:focus {
  border-color: #2d6a4f;
  box-shadow: 0 0 0 4px rgba(45, 106, 79, 0.12);
}
.login-card-footer {
  text-align: center;
  padding: 0 1.5rem 1.5rem;
}

/* ============================================
   EMPTY STATES
   ============================================ */
.empty-state {
  text-align: center;
  padding: var(--space-12) var(--space-6);
  color: var(--text-muted);
}
.empty-state svg {
  width: 72px;
  height: 72px;
  margin: 0 auto var(--space-5);
  opacity: 0.2;
  color: var(--neutral-500);
}
.empty-state h3 {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}
.empty-state p {
  font-size: 0.875rem;
  max-width: 320px;
  margin: 0 auto;
}

/* ============================================
   PULSE CHECK-IN — Stepper
   ============================================ */
.pulse-stepper {
  max-width: 680px;
  margin: 0 auto;
}
.pulse-progress {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-8);
  padding: 0 var(--space-2);
}
.pulse-step-indicator {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--neutral-200);
  transition: all 0.4s ease;
}
.pulse-step-indicator.active { background: var(--primary); }
.pulse-step-indicator.completed { background: var(--primary-light); }
.pulse-question-card {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  padding: var(--space-8) var(--space-8);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  animation: fadeIn 0.35s ease-out;
}
.pulse-question-number {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(45, 106, 79, 0.1);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: var(--space-4);
}

/* ============================================
   RATING SCALE — Enhanced
   ============================================ */
.rating-scale {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  padding: var(--space-6) 0;
  flex-wrap: wrap;
}
.rating-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--card-bg);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 1.125rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.rating-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: scale(1.1);
}
.rating-btn.selected {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 12px rgba(212,168,67,0.3);
  transform: scale(1.1);
}
.rating-label {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: var(--space-1);
}

/* ============================================
   PAGE HEADER
   ============================================ */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
  gap: var(--space-4);
  animation: pageEnter 0.35s ease-out;
}
.page-header h1 { font-size: 1.625rem; font-weight: 700; letter-spacing: -0.03em; }
.page-header p { font-size: 0.875rem; color: var(--text-muted); margin-top: 2px; }

/* ============================================
   FILTER BAR
   ============================================ */
.filter-bar {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
  padding: var(--space-4);
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.search-input {
  max-width: 320px;
  min-width: 200px;
}

/* ============================================
   RESOURCE CARDS
   ============================================ */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-5);
}
.resource-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  border: 1px solid var(--border);
  transition: all var(--transition-base);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.resource-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary);
  opacity: 0;
  transition: opacity var(--transition-base);
}
.resource-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
  transform: translateY(-4px);
}
.resource-card:hover::before {
  opacity: 1;
}
.resource-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
  font-size: 1.375rem;
}
.resource-card h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--space-1);
  color: var(--text-primary);
}
.resource-card p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ============================================
   DASHBOARD GRID
   ============================================ */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-5);
}

/* ============================================
   AVATAR
   ============================================ */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  color: white;
  flex-shrink: 0;
  background: var(--primary);
}
.avatar-sm { width: 32px; height: 32px; font-size: 0.75rem; }
.avatar-lg { width: 48px; height: 48px; font-size: 1rem; }
.avatar-xl { width: 64px; height: 64px; font-size: 1.25rem; }

/* ============================================
   DIVIDER
   ============================================ */
.divider {
  height: 1px;
  background: var(--border);
  margin: var(--space-6) 0;
}
.divider-light {
  height: 1px;
  background: var(--border-light);
  margin: var(--space-4) 0;
}

/* ============================================
   TOOLTIP
   ============================================ */
[data-tooltip] {
  position: relative;
}
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  background: var(--neutral-800);
  color: white;
  font-size: 0.75rem;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition-fast);
}
[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* ============================================
   LOADING SPINNER
   ============================================ */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.spinner-sm { width: 16px; height: 16px; border-width: 2px; }
.spinner-lg { width: 36px; height: 36px; border-width: 4px; }
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================
   APP LAYOUT — Core Structure
   ============================================ */
.app-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.app-body {
  display: grid;
  grid-template-columns: 220px 1fr;
  flex: 1;
  padding-top: 60px; /* navbar height */
  transition: grid-template-columns 0.25s ease;
}
.app-body.sidebar-collapsed {
  grid-template-columns: 0 1fr;
}

/* ============================================
   TOP NAVBAR
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  z-index: 50;
}
.navbar-inner {
  height: 100%;
  padding: 0 var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.navbar-left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.navbar-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.navbar-toggle:hover {
  background: var(--neutral-100);
  color: var(--text-primary);
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.navbar-logo {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.navbar-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.navbar-right {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.navbar-action {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}
.navbar-action:hover {
  background: var(--neutral-100);
  color: var(--primary);
}
.navbar-user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.navbar-user-btn:hover {
  background: var(--neutral-100);
}
.navbar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.8125rem;
  font-weight: 600;
  flex-shrink: 0;
}
.navbar-user-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  display: none;
}
.navbar-chevron {
  color: var(--text-muted);
  display: none;
}

/* ============================================
   SIDEBAR — Toggleable, Push Content
   ============================================ */
.sidebar {
  background: #e4eee8;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 40;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-4);
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-icon-sm {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}
.sidebar-brand {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.sidebar-close-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.sidebar-close-btn:hover {
  background: var(--neutral-100);
  color: var(--text-primary);
}

/* Sidebar Navigation */
.sidebar-nav {
  padding: var(--space-3);
  flex: 1;
}
.sidebar-section-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #5a7a6a;
  padding: var(--space-4) var(--space-3) var(--space-2);
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 9px 12px;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 500;
  color: #2d6a4f;
  transition: all var(--transition-fast);
  position: relative;
  margin-bottom: 1px;
}
.sidebar-link:hover {
  background: rgba(45, 106, 79, 0.12);
  color: #1b4332;
}
.sidebar-link.active {
  background: #2d6a4f;
  color: #fff;
  font-weight: 600;
}
.sidebar-link.active::before {
  display: none;
}
.sidebar-link-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.7;
}
.sidebar-link:hover .sidebar-link-icon,
.sidebar-link.active .sidebar-link-icon {
  opacity: 1;
}
.sidebar-link-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sidebar Overlay (mobile) */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 39;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
  flex: 1;
  padding: var(--space-6);
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

/* ============================================
   DROPDOWN MENU (Navbar)
   ============================================ */
.dropdown-container {
  position: relative;
}
.dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 220px;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  z-index: 60;
  animation: dropdownIn 0.15s ease-out;
}
@keyframes dropdownIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.dropdown-header {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-light);
}
.dropdown-user-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
}
.dropdown-user-email {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.dropdown-item {
  display: block;
  padding: 10px var(--space-4);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}
.dropdown-item:hover {
  background: var(--neutral-50);
  color: var(--primary);
}
.dropdown-divider {
  height: 1px;
  background: var(--border-light);
  margin: 4px 0;
}

/* ============================================
   SIDEBAR RESPONSIVE
   ============================================ */
@media (min-width: 1025px) {
  .navbar-toggle {
    display: flex;
  }
  .navbar-user-name {
    display: inline;
  }
  .navbar-chevron {
    display: inline;
  }
}

/* Mobile/Tablet: sidebar as overlay */
@media (max-width: 1024px) {
  .sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    width: 260px;
    height: calc(100vh - 60px);
    z-index: 40;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    border-right: 1px solid var(--border);
    box-shadow: var(--shadow-xl);
  }
  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 39;
  }
  .sidebar-overlay.open {
    display: block;
  }
  .sidebar-close-btn {
    display: flex;
  }
  .main-content {
    padding: var(--space-4);
  }
  .navbar-title {
    font-size: 0.875rem;
  }
  .hidden-sm {
    display: none;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding: var(--space-3);
  }
  .navbar-inner {
    padding: 0 var(--space-3);
  }
}

/* ============================================
   RESPONSIVE — Mobile-first
   ============================================ */
@media (max-width: 768px) {
  .login-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .login-guide { text-align: center; }
  .guide-brand { justify-content: center; }
  .guide-tagline { text-align: center; }
  .guide-cta { display: none; }
  .login-page { padding: 1.5rem 0.75rem; }
  .login-card { margin: 0; }
  .login-card-header { padding: 1.5rem 1.25rem 0; }
  .login-card-body { padding: 1.25rem; }
  .login-card-footer { padding: 0 1.25rem 1.25rem; }

  .dashboard-grid { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .page-header h1 { font-size: 1.375rem; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .search-input { max-width: 100%; min-width: 0; }

  .journey-timeline { overflow-x: auto; gap: var(--space-1); padding: var(--space-4) 0; }
  .journey-timeline::before,
  .journey-timeline::after { left: 30px; right: 30px; top: 32px; }
  .journey-dot { width: 36px; height: 36px; font-size: 0.75rem; }
  .journey-label { font-size: 0.6875rem; max-width: 65px; }

  .stat-value { font-size: 1.75rem; }
  .rating-scale { gap: var(--space-2); }
  .rating-btn { width: 44px; height: 44px; font-size: 1rem; }
  .resource-grid { grid-template-columns: 1fr; }
  .pulse-question-card { padding: var(--space-5); }
  .grid-cols-2, .grid-cols-3, .grid-cols-4, .grid-cols-5, .grid-cols-6 { grid-template-columns: 1fr; }

  .card-body { padding: var(--space-4); }
  .card-header { padding: var(--space-4); }
  .card-footer { padding: var(--space-3) var(--space-4); }
  .modal-content { margin: var(--space-3); border-radius: var(--radius-lg); }

  .toast-container { top: var(--space-3); right: var(--space-3); left: var(--space-3); max-width: none; }
  th, td { padding: 10px 12px; }

  .sidebar-nav a { padding: 12px 16px; }
  .sidebar-section { padding: var(--space-3) var(--space-4) var(--space-1); }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .login-grid { gap: 1.5rem; }
  .login-guide { padding-right: 0; }
  .guide-features .guide-feature-item { padding: 0.65rem 0.85rem; }
  .grid-cols-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-cols-5 { grid-template-columns: repeat(3, 1fr); }
  .grid-cols-6 { grid-template-columns: repeat(3, 1fr); }
  .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================
   PRINT
   ============================================ */
@media print {
  .sidebar, .navbar, .btn, .filter-bar { display: none !important; }
  .card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
  body { font-size: 12pt; }
}

/* ============================================
   UTILITY HELPERS
   ============================================ */
.hidden { display: none !important; }
.block { display: block; }
.inline { display: inline; }
.inline-block { display: inline-block; }
.whitespace-nowrap { white-space: nowrap; }
.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }
.select-none { user-select: none; }
.pointer-events-none { pointer-events: none; }
.opacity-0 { opacity: 0; }
.opacity-50 { opacity: 0.5; }
.opacity-60 { opacity: 0.6; }
.opacity-80 { opacity: 0.8; }
.transition { transition: all var(--transition-base); }
.transition-fast { transition: all var(--transition-fast); }
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-2xl { border-radius: var(--radius-2xl); }
.rounded-full { border-radius: 9999px; }

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

/* Focus visible for keyboard nav */
:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.25);
  border-radius: var(--radius-sm);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
