@charset "UTF-8";

/* ============================================
   SIMPKH Design System - Professional Blue
   Based on UI/UX Pro Max recommendations
   ============================================ */

/* --- Design Tokens --- */
:root {
  /* Primary Palette */
  --primary: #1E40AF;
  --primary-light: #3B82F6;
  --primary-dark: #1E3A8A;
  --primary-50: #EFF6FF;
  --primary-100: #DBEAFE;
  --primary-200: #BFDBFE;
  --primary-500: #3B82F6;
  --primary-600: #2563EB;
  --primary-700: #1D4ED8;
  --primary-800: #1E40AF;
  --primary-900: #1E3A8A;

  /* Accent / Service Green */
  --accent: #16A34A;
  --accent-light: #22C55E;
  --accent-dark: #15803D;
  --accent-50: #F0FDF4;

  /* Sidebar Dark */
  --sidebar-bg: #0F172A;
  --sidebar-hover: #1E293B;
  --sidebar-active: #1E40AF;
  --sidebar-text: #94A3B8;
  --sidebar-text-active: #FFFFFF;
  --sidebar-width: 280px;
  --sidebar-collapsed-width: 80px;

  /* Surfaces */
  --navbar-bg: #FFFFFF;
  --surface: #FFFFFF;
  --background: #F8FAFC;
  --background-alt: #F1F5F9;

  /* Text */
  --text-primary: #0F172A;
  --text-secondary: #64748B;
  --text-muted: #94A3B8;
  --text-inverse: #FFFFFF;

  /* Borders */
  --border: #E2E8F0;
  --border-light: #F1F5F9;

  /* Semantic */
  --destructive: #DC2626;
  --destructive-light: #FEE2E2;
  --warning: #F59E0B;
  --warning-light: #FEF3C7;
  --success: #16A34A;
  --success-light: #DCFCE7;
  --info: #0EA5E9;
  --info-light: #E0F2FE;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
  --shadow-glow: 0 0 20px rgba(30, 64, 175, 0.15);
  --shadow-card-hover: 0 20px 40px rgba(0,0,0,0.12);

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;

  /* Z-Index */
  --z-sidebar: 990;
  --z-navbar: 995;
  --z-dropdown: 1000;
  --z-modal-backdrop: 1050;
  --z-modal: 1060;
}

/* --- Global Overrides --- */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Fira Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary);
  transition: color var(--duration-fast) var(--ease-out);
}
a:hover {
  color: var(--primary-dark);
}

/* --- Scrollbar Styling --- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* ============================================
   ANIMATIONS
   ============================================ */

/* --- Keyframes --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.8;
  }
}

@keyframes shake {
  0%, 100% { transform: rotate(0deg); }
  15% { transform: rotate(8deg); }
  30% { transform: rotate(-6deg); }
  45% { transform: rotate(4deg); }
  60% { transform: rotate(-2deg); }
  75% { transform: rotate(1deg); }
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 5px rgba(30, 64, 175, 0.2); }
  50% { box-shadow: 0 0 20px rgba(30, 64, 175, 0.4); }
}

@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 0.5;
  }
  100% {
    transform: scale(4);
    opacity: 0;
  }
}

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

@keyframes dotPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.5);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 0 0 6px rgba(22, 163, 74, 0);
  }
}

@keyframes borderGlow {
  0%, 100% {
    border-color: rgba(30, 64, 175, 0.3);
  }
  50% {
    border-color: rgba(30, 64, 175, 0.6);
  }
}

/* --- Animation Utility Classes --- */
.animate-fade-in-up {
  animation: fadeInUp 0.5s var(--ease-out) forwards;
  opacity: 0;
}

.animate-fade-in-down {
  animation: fadeInDown 0.4s var(--ease-out) forwards;
  opacity: 0;
}

.animate-fade-in-left {
  animation: fadeInLeft 0.5s var(--ease-out) forwards;
  opacity: 0;
}

.animate-fade-in-scale {
  animation: fadeInScale 0.4s var(--ease-out) forwards;
  opacity: 0;
}

.animate-slide-in-right {
  animation: slideInRight 0.5s var(--ease-out) forwards;
  opacity: 0;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-glow {
  animation: glow 2s ease-in-out infinite;
}

.animate-pulse-dot {
  animation: dotPulse 2s ease-in-out infinite;
}

/* Stagger delays */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }
.delay-600 { animation-delay: 600ms; }

/* Scroll reveal (JS toggles .revealed) */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Reduced motion respect */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal-on-scroll {
    opacity: 1;
    transform: none;
  }
}

/* ============================================
   SIDEBAR
   ============================================ */
.main-sidebar {
  background: var(--sidebar-bg) !important;
  box-shadow: 4px 0 24px rgba(0,0,0,0.15);
  z-index: var(--z-sidebar);
  transition: width var(--duration-normal) var(--ease-out);
}

.main-sidebar .sidebar-brand {
  padding: 18px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 8px;
}

/* Sidebar Logo Container */
.sidebar-logo-wrap {
  position: relative;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-logo-img {
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 2px 8px rgba(255,255,255,0.2));
  transition: transform var(--duration-normal) var(--ease-out),
              filter var(--duration-normal) var(--ease-out);
}

.sidebar-logo-wrap:hover .sidebar-logo-img {
  transform: scale(1.1);
  filter: drop-shadow(0 2px 12px rgba(255,255,255,0.35));
}

/* Sidebar Rings */
.sidebar-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  border: 1.5px solid transparent;
  animation: sidebarRingSpin 6s linear infinite;
  pointer-events: none;
}

.sidebar-ring.ring-1 {
  width: 48px;
  height: 48px;
  margin-top: -24px;
  margin-left: -24px;
  border-color: rgba(255,255,255,0.05);
  border-top-color: rgba(255,255,255,0.4);
  border-right-color: rgba(255,255,255,0.15);
  animation-duration: 8s;
}

.sidebar-ring.ring-2 {
  width: 40px;
  height: 40px;
  margin-top: -20px;
  margin-left: -20px;
  border-color: rgba(255,255,255,0.03);
  border-bottom-color: rgba(16,185,129,0.4);
  border-left-color: rgba(16,185,129,0.15);
  animation-duration: 5s;
  animation-direction: reverse;
}

@keyframes sidebarRingSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.sidebar-brand-text {
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.5px;
  font-family: 'Fira Sans', sans-serif;
  text-shadow: 0 1px 4px rgba(0,0,0,0.2);
  transition: all var(--duration-normal) var(--ease-out);
}

.sidebar-brand:hover .sidebar-brand-text {
  text-shadow: 0 1px 8px rgba(255,255,255,0.2);
}

#sidebar-wrapper {
  padding: 8px;
}

/* Sidebar menu items */
.sidebar-menu .nav-item {
  margin-bottom: 2px;
}

.sidebar-menu li a {
  color: #CBD5E1 !important;
  border-radius: var(--radius-md) !important;
  padding: 10px 14px !important;
  font-size: 13.5px;
  font-weight: 500;
  transition: all var(--duration-fast) var(--ease-out) !important;
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.sidebar-menu li a .fas,
.sidebar-menu li a .far,
.sidebar-menu li a .fab {
  width: 20px;
  text-align: center;
  font-size: 14px;
  transition: transform var(--duration-fast) var(--ease-out);
}

.sidebar-menu li a:hover {
  background: var(--sidebar-hover) !important;
  color: var(--sidebar-text-active) !important;
  padding-left: 18px !important;
}

.sidebar-menu li a:hover .fas,
.sidebar-menu li a:hover .far,
.sidebar-menu li a:hover .fab {
  transform: scale(1.1);
}

/* Active state - Blue pill with glow */
.sidebar-menu li.active > a,
.sidebar-menu li > a.active {
  background: var(--sidebar-active) !important;
  color: var(--sidebar-text-active) !important;
  box-shadow: 0 4px 12px var(--sidebar-active-glow, rgba(30, 64, 175, 0.4));
  font-weight: 600;
}

.sidebar-menu li.active > a::before,
.sidebar-menu li > a.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--accent-light);
  border-radius: 0 4px 4px 0;
}

/* Dropdown - Stisla uses slideToggle, so we only style appearance */
.sidebar-menu .dropdown-menu {
  background: var(--sidebar-dropdown-bg, rgba(15, 23, 42, 0.95)) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  border-radius: var(--radius-md) !important;
  padding: 6px 8px !important;
  margin: 4px 0 4px 12px !important;
  backdrop-filter: blur(16px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3) !important;
}

.sidebar-menu .dropdown-menu li a {
  padding: 9px 14px 9px 16px !important;
  font-size: 13px;
  color: var(--sidebar-text, #CBD5E1) !important;
  border-left: 3px solid transparent !important;
  transition: all var(--duration-fast) var(--ease-out) !important;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-menu .dropdown-menu li a:hover {
  background: var(--sidebar-dropdown-hover, rgba(59, 130, 246, 0.25)) !important;
  color: var(--sidebar-text-active, #FFFFFF) !important;
  padding-left: 20px !important;
  border-left-color: var(--sidebar-accent, #60A5FA) !important;
}

.sidebar-menu .dropdown-menu li.active > a {
  background: var(--sidebar-dropdown-hover, rgba(59, 130, 246, 0.25)) !important;
  color: var(--sidebar-text-active, #FFFFFF) !important;
  border-left-color: #34D399 !important;
  font-weight: 600;
}

.sidebar-menu .dropdown-menu li.active > a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #34D399;
  border-radius: 0 2px 2px 0;
}

/* Nested dropdown (Master submenu) */
.sidebar-menu .dropdown-menu .dropdown-menu {
  margin-left: 8px !important;
  padding: 4px 6px !important;
}

.sidebar-menu .dropdown-menu .dropdown-menu li a {
  padding: 7px 12px 7px 14px !important;
  font-size: 12.5px !important;
  color: #94A3B8 !important;
}

.sidebar-menu .dropdown-menu .dropdown-menu li a:hover {
  color: #E2E8F0 !important;
}

/* Dropdown parent toggle (has-dropdown) */
.sidebar-menu .dropdown > .nav-link.has-dropdown {
  color: #E2E8F0 !important;
  font-weight: 600;
}

.sidebar-menu .dropdown > .nav-link.has-dropdown:hover {
  background: rgba(59, 130, 246, 0.15) !important;
  color: #FFFFFF !important;
}

.sidebar-menu .dropdown.open > .nav-link.has-dropdown {
  color: #FFFFFF !important;
  background: rgba(59, 130, 246, 0.2) !important;
}

/* Nested dropdown parent (e.g., Master inside Manajemen) */
.sidebar-menu .dropdown-menu .dropdown > .nav-link.has-dropdown {
  color: #CBD5E1 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}

.sidebar-menu .dropdown-menu .dropdown > .nav-link.has-dropdown:hover {
  color: #FFFFFF !important;
  background: rgba(59, 130, 246, 0.2) !important;
}

.sidebar-menu .dropdown-menu .dropdown.open > .nav-link.has-dropdown {
  color: #FFFFFF !important;
  background: rgba(59, 130, 246, 0.3) !important;
}

/* Force dark on ALL sidebar dropdown states */
.sidebar-menu .dropdown-menu.show,
.sidebar-menu .dropdown-menu.collapsing,
.sidebar-menu .nav-item.open .dropdown-menu {
  background: rgba(30, 41, 59, 0.95) !important;
}

.sidebar-menu .dropdown-menu li {
  background: transparent !important;
}

.sidebar-menu .dropdown-menu li a {
  background: transparent !important;
}

.sidebar-menu .dropdown-menu li a:hover,
.sidebar-menu .dropdown-menu li a:focus {
  background: rgba(59, 130, 246, 0.25) !important;
}

/* Override any Stisla white on sidebar nav items */
.sidebar-menu .nav-item .dropdown-menu .dropdown-item,
.sidebar-menu .nav-item .dropdown-menu .nav-link {
  background: transparent !important;
  color: #CBD5E1 !important;
}

.sidebar-menu .nav-item .dropdown-menu .dropdown-item:hover,
.sidebar-menu .nav-item .dropdown-menu .nav-link:hover {
  background: rgba(59, 130, 246, 0.25) !important;
  color: #FFFFFF !important;
}

/* Dropdown toggle - let Stisla handle the arrow */

/* Sidebar badge */
.sidebar-menu .badge {
  font-size: 10px;
  padding: 3px 7px;
  border-radius: var(--radius-full);
  font-weight: 600;
  animation: pulse 2s infinite;
}

/* Sidebar footer */
.sidebar-footer {
  padding: 16px;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 16px;
}

.sidebar-footer small {
  color: var(--sidebar-text);
  font-size: 11px;
  opacity: 0.6;
}

/* Sidebar Theme Picker */
.sidebar-theme-picker {
  padding: 12px 16px;
  text-align: center;
}

.sidebar-theme-picker .theme-label {
  display: block;
  font-size: 11px;
  color: var(--sidebar-text);
  opacity: 0.7;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.sidebar-theme-picker .theme-options {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.sidebar-theme-picker .theme-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.15);
  background: transparent;
  padding: 3px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-theme-picker .theme-btn span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.sidebar-theme-picker .theme-btn:hover {
  border-color: rgba(255,255,255,0.4);
  transform: scale(1.15);
}

.sidebar-theme-picker .theme-btn.active {
  border-color: #fff;
  box-shadow: 0 0 12px rgba(255,255,255,0.3);
}

.sidebar-theme-picker .theme-btn.active::after {
  content: '✓';
  position: absolute;
  font-size: 10px;
  color: #fff;
  font-weight: 700;
}

.sidebar-theme-picker .theme-btn {
  position: relative;
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar-bg {
  background: var(--navbar-bg) !important;
}

.main-navbar {
  background: var(--navbar-bg);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  padding: 0 20px;
  height: 64px;
  z-index: var(--z-navbar);
  transition: box-shadow var(--duration-fast) var(--ease-out);
}

.main-navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.main-navbar .nav-link {
  color: var(--text-secondary) !important;
  font-weight: 500;
  transition: color var(--duration-fast) var(--ease-out);
  position: relative;
}

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

/* Notification bell animation */
.notification-toggle {
  position: relative;
}
.notification-toggle::after {
  content: '';
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: var(--destructive);
  border-radius: 50%;
  border: 2px solid var(--navbar-bg);
  display: none;
}
.notification-toggle.beep::after {
  display: block;
  animation: dotPulse 2s infinite;
}

.notification-toggle.shake {
  animation: shake 0.6s var(--ease-out);
}

/* User dropdown */
.nav-link-user img {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--border);
  transition: border-color var(--duration-fast) var(--ease-out);
}
.nav-link-user:hover img {
  border-color: var(--primary);
}

/* Dropdown styling */
.dropdown-menu {
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-xl) !important;
  padding: 8px !important;
  animation: fadeInDown 0.2s var(--ease-out);
  margin-top: 8px !important;
}

.dropdown-item {
  border-radius: var(--radius-sm) !important;
  padding: 8px 14px !important;
  font-size: 13.5px;
  font-weight: 500;
  transition: all var(--duration-fast) var(--ease-out) !important;
}

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

.dropdown-item-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

/* ============================================
   CARDS
   ============================================ */
.card {
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-sm) !important;
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out),
              border-color var(--duration-normal) var(--ease-out);
  overflow: hidden;
  background: linear-gradient(145deg, #FFFFFF 0%, #FAFBFC 100%) !important;
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-light), var(--accent));
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.card:hover {
  box-shadow: var(--shadow-md) !important;
  border-color: var(--primary-200) !important;
}

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

.card-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover) !important;
}

.card-header {
  border-bottom: 1px solid var(--border-light) !important;
  background: transparent !important;
  padding: 16px 20px !important;
}

.card-body {
  padding: 20px !important;
}

/* ============================================
   STAT CARDS (Dashboard)
   ============================================ */
.stat-card {
  border: none !important;
  border-radius: var(--radius-lg) !important;
  overflow: hidden;
  position: relative;
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
  cursor: default;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--card-accent, var(--primary)), var(--card-accent-end, var(--primary-light)));
  background-size: 200% 100%;
  animation: gradientShift 3s ease infinite;
}

.stat-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover) !important;
}

.stat-card .stat-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
  transition: transform var(--duration-normal) var(--ease-out);
}

.stat-card:hover .stat-icon {
  transform: scale(1.1) rotate(-3deg);
}

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  font-family: 'Fira Code', monospace;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 4px;
}

.stat-card .stat-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-card .stat-trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-top: 8px;
}

.stat-trend.up {
  color: var(--accent);
  background: var(--accent-50);
}

.stat-trend.down {
  color: var(--destructive);
  background: var(--destructive-light);
}

.stat-trend.neutral {
  color: var(--text-muted);
  background: var(--background-alt);
}

/* Stat card color variants */
.stat-card.primary {
  --card-accent: #1E40AF;
  --card-accent-end: #3B82F6;
}
.stat-card.primary .stat-icon {
  background: var(--primary-50);
  color: var(--primary);
}

.stat-card.warning {
  --card-accent: #F59E0B;
  --card-accent-end: #FBBF24;
}
.stat-card.warning .stat-icon {
  background: var(--warning-light);
  color: var(--warning);
}

.stat-card.success {
  --card-accent: #16A34A;
  --card-accent-end: #22C55E;
}
.stat-card.success .stat-icon {
  background: var(--success-light);
  color: var(--success);
}

.stat-card.dark {
  --card-accent: #0F172A;
  --card-accent-end: #334155;
}
.stat-card.dark .stat-icon {
  background: var(--text-primary);
  color: var(--text-inverse);
}

/* ============================================
   SECTION HEADER
   ============================================ */
.section-header h1 {
  font-family: 'Fira Sans', sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--text-primary);
  margin: 0;
}

.section-header-breadcrumb {
  font-size: 13px;
  color: var(--text-secondary);
}

.section-header-breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}
.section-header-breadcrumb a:hover {
  color: var(--primary);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  border-radius: var(--radius-md) !important;
  font-weight: 600;
  font-size: 13.5px;
  padding: 8px 18px;
  transition: all var(--duration-fast) var(--ease-out) !important;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  box-shadow: 0 2px 8px rgba(30, 64, 175, 0.3);
}

.btn-primary:hover {
  background: var(--primary-600) !important;
  border-color: var(--primary-600) !important;
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.4);
  transform: translateY(-1px);
}

.btn-success {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
}

.btn-success:hover {
  background: var(--accent-dark) !important;
  border-color: var(--accent-dark) !important;
  transform: translateY(-1px);
}

/* Ripple effect */
.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255,255,255,0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.4s, height 0.4s;
}
.btn:active::after {
  width: 300px;
  height: 300px;
  opacity: 0;
}

/* ============================================
   FORMS
   ============================================ */
.form-control {
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-md) !important;
  font-size: 13.5px;
  padding: 8px 14px;
  transition: border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out) !important;
}

.form-control:focus {
  border-color: var(--primary-light) !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
}

.form-control-sm {
  font-size: 12.5px;
  padding: 6px 10px;
}

/* Select2 override */
.select2-container--default .select2-selection--single {
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-md) !important;
  height: 38px !important;
  padding: 4px 8px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 28px !important;
  font-size: 13.5px;
  color: var(--text-primary);
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 36px !important;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
  border-color: var(--primary-light) !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
}

/* ============================================
   TABLES
   ============================================ */
.table {
  font-size: 13.5px;
}

.table thead th {
  background: var(--background-alt);
  border-bottom: 2px solid var(--border) !important;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-size: 11.5px;
  letter-spacing: 0.5px;
  padding: 12px 16px;
}

.table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light) !important;
  vertical-align: middle;
}

.table tbody tr {
  transition: background var(--duration-fast) var(--ease-out);
}

.table tbody tr:hover {
  background: var(--primary-50) !important;
}

/* DataTables override */
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: white !important;
  border-radius: var(--radius-sm) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: var(--primary-100) !important;
  border-color: var(--primary-light) !important;
  color: var(--primary) !important;
}

/* ============================================
   CHART CARDS
   ============================================ */
.chart-card {
  border: none !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-sm) !important;
}

.chart-card .card-header {
  background: transparent !important;
  border-bottom: 1px solid var(--border-light) !important;
}

.chart-card .card-header strong {
  font-weight: 600;
  color: var(--text-primary);
}

/* ============================================
   BADGES
   ============================================ */
.badge {
  font-weight: 600;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: var(--radius-full);
  letter-spacing: 0.3px;
}

.badge-primary {
  background: var(--primary) !important;
}

.badge-success {
  background: var(--accent) !important;
}

.badge-warning {
  background: var(--warning) !important;
  color: #000 !important;
}

.badge-danger {
  background: var(--destructive) !important;
}

/* ============================================
   MODALS
   ============================================ */
.modal-content {
  border: none !important;
  border-radius: var(--radius-xl) !important;
  box-shadow: var(--shadow-xl) !important;
}

.modal-header {
  border-bottom: 1px solid var(--border-light) !important;
  padding: 20px 24px !important;
}

.modal-body {
  padding: 24px !important;
}

.modal-footer {
  border-top: 1px solid var(--border-light) !important;
  padding: 16px 24px !important;
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
  border-radius: var(--radius-md) !important;
  border: none !important;
  font-size: 13.5px;
  padding: 14px 18px;
}

.alert-success {
  background: var(--success-light) !important;
  color: var(--accent-dark) !important;
}

.alert-danger {
  background: var(--destructive-light) !important;
  color: var(--destructive) !important;
}

.alert-warning {
  background: var(--warning-light) !important;
  color: #92400E !important;
}

.alert-info {
  background: var(--info-light) !important;
  color: #0369A1 !important;
}

/* ============================================
   BREADCRUMBS
   ============================================ */
.breadcrumb {
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  font-size: 13px;
}

.breadcrumb-item a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}
.breadcrumb-item a:hover {
  color: var(--primary);
}
.breadcrumb-item.active {
  color: var(--text-muted);
}
.breadcrumb-item + .breadcrumb-item::before {
  content: '/';
  color: var(--text-muted);
}

/* ============================================
   LOADING & SKELETON
   ============================================ */
.skeleton {
  background: linear-gradient(90deg, var(--background-alt) 25%, var(--border-light) 50%, var(--background-alt) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================
   MISC UTILITIES
   ============================================ */

/* Online indicator */
.is-online {
  width: 10px;
  height: 10px;
  background-color: var(--accent);
  border-radius: 50%;
  display: inline-block;
  animation: dotPulse 2s infinite;
}

/* Title action colors */
.bg-titleaction {
  background-color: var(--primary) !important;
}

.text-titleaction,
.text-titleaction-all *,
.text-titleaction-all *:before,
.text-titleaction-all *:after {
  color: var(--primary) !important;
}

.btn-titleaction,
.btn-titleaction.disabled {
  box-shadow: 0 2px 8px rgba(30, 64, 175, 0.3);
  background-color: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.btn-titleaction:hover,
.btn-titleaction:focus,
.btn-titleaction:active,
.btn-titleaction.disabled:hover,
.btn-titleaction.disabled:focus,
.btn-titleaction.disabled:active {
  background-color: var(--primary-600) !important;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.4);
}

.btn-outline-titleaction:hover,
.btn-outline-titleaction:focus,
.btn-outline-titleaction:active {
  background-color: var(--primary) !important;
  color: #fff !important;
}

.text-secondary-dark {
  color: var(--text-secondary);
}

.select2-container {
  width: 100% !important;
}

.required:after {
  content: "*";
  color: var(--destructive);
}

/* Text utilities */
.text-primary-custom { color: var(--primary) !important; }
.text-accent-custom { color: var(--accent) !important; }
.bg-primary-custom { background-color: var(--primary-50) !important; }
.bg-accent-custom { background-color: var(--accent-50) !important; }

/* Border chart */
.border-chart {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  transition: box-shadow var(--duration-normal) var(--ease-out);
}
.border-chart:hover {
  box-shadow: var(--shadow-md);
}

/* Filter bar */
.filter-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .main-sidebar {
    position: fixed !important;
    left: -280px !important;
    width: 280px !important;
    height: 100vh;
    transition: left 0.3s ease-out !important;
    z-index: 891;
  }
  body.sidebar-show .main-sidebar {
    left: 0 !important;
  }
  .main-content {
    padding-left: 0 !important;
  }
}

@media (max-width: 576px) {
  .stat-card .stat-value {
    font-size: 22px;
  }
  .stat-card .stat-icon {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }
}

/* ============================================
   DASHBOARD BANNER
   ============================================ */
.dashboard-banner {
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
  margin-bottom: 24px;
  box-shadow: var(--shadow-lg);
}

.dashboard-banner img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s var(--ease-out);
}

.dashboard-banner:hover img {
  transform: scale(1.02);
}

.dashboard-banner::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(transparent, rgba(0,0,0,0.15));
  pointer-events: none;
}

/* ============================================
   PAGE TRANSITION
   ============================================ */
.section {
  animation: fadeInUp 0.4s var(--ease-out);
}

/* ============================================
   NOTIFICATION DROPDOWN ENHANCED
   ============================================ */
.dropdown-list-content .dropdown-item {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 4px;
}

.dropdown-list-content .dropdown-item:hover {
  background: var(--primary-50);
}

.dropdown-list-content .dropdown-item-desc strong {
  font-size: 13px;
  color: var(--text-primary);
}

.dropdown-list-content .dropdown-item-desc .time {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* ============================================
   STISLA OVERRIDES
   ============================================ */
/* Override Stisla primary color */
.bg-primary {
  background-color: var(--primary) !important;
}

.text-primary {
  color: var(--primary) !important;
}

a {
  color: var(--primary);
}

/* Override Stisla sidebar style-2 active border */
.sidebar-style-2 .nav-item.active > a {
  border-left: none !important;
}

/* Override Stisla card shadows */
.card {
  box-shadow: var(--shadow-sm) !important;
}

/* Override Stisla dropdown animation */
.dropdown-menu {
  animation: fadeInDown 0.2s var(--ease-out);
}

/* ============================================
   PROFILE PAGE
   ============================================ */
.profile-card {
  text-align: center;
  padding: 32px;
}

.profile-card .profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 3px solid var(--primary-100);
  margin-bottom: 16px;
}

/* ============================================
   FORM CARD
   ============================================ */
.form-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  background: var(--surface);
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.3;
}

.empty-state p {
  font-size: 14px;
}

/* ============================================
   DASHBOARD: HERO WELCOME
   ============================================ */
.hero-welcome {
  background: linear-gradient(135deg, var(--hero-start, #1E3A8A) 0%, var(--hero-mid, #1E40AF) 30%, var(--hero-end, #2563EB) 70%, var(--hero-accent, #0EA5E9) 100%);
  border-radius: var(--radius-xl);
  padding: 36px 40px;
  color: #fff;
  position: relative;
  overflow: hidden;
  margin-bottom: 28px;
  box-shadow: 0 8px 32px var(--hero-shadow, rgba(30, 64, 175, 0.25)),
              0 2px 8px rgba(0,0,0,0.1),
              inset 0 1px 0 rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.12);
  transition: all 0.4s ease;
}
.hero-welcome::before {
  content: '';
  position: absolute;
  top: -60%;
  right: -5%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.03) 60%, transparent 70%);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}
.hero-welcome::after {
  content: '';
  position: absolute;
  bottom: -40%;
  left: 15%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 60%);
  border-radius: 50%;
  animation: float 8s ease-in-out infinite reverse;
}
.hero-welcome h2 {
  font-weight: 700;
  font-size: 22px;
  margin-bottom: 4px;
  position: relative;
  z-index: 1;
}
.hero-welcome p {
  opacity: 0.85;
  font-size: 14px;
  margin: 0;
  position: relative;
  z-index: 1;
}
.hero-welcome .hero-clock {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 700;
  position: relative;
  z-index: 1;
  text-align: right;
}
.hero-welcome .hero-date {
  font-size: 13px;
  opacity: 0.8;
  text-align: right;
  position: relative;
  z-index: 1;
}
.quick-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  position: relative;
  z-index: 1;
}
.quick-actions a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.2);
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s var(--ease-out);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.quick-actions a:hover {
  background: rgba(255,255,255,0.35);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ============================================
   DASHBOARD: STAT INLINE PILLS
   ============================================ */
.stat-inline {
  display: flex;
  gap: 12px;
  margin-bottom: var(--space-5);
}
.stat-inline .stat-pill {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: box-shadow 0.2s;
}
.stat-inline .stat-pill:hover {
  box-shadow: var(--shadow-md);
}
.stat-inline .stat-pill .sp-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.stat-inline .stat-pill .sp-num {
  font-size: 22px;
  font-weight: 700;
  font-family: var(--font-mono);
  line-height: 1;
}
.stat-inline .stat-pill .sp-label {
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ============================================
   DASHBOARD: CHART ROWS
   ============================================ */
.chart-row-mixed {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
.chart-row-mixed .card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.chart-row-pie {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.chart-row-pie .card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

/* ============================================
   DASHBOARD: LAHAN HERO CARDS
   ============================================ */
.lahan-hero {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.lahan-hero .lh-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  text-align: center;
  transition: box-shadow 0.2s;
}
.lahan-hero .lh-card:hover {
  box-shadow: var(--shadow-md);
}
.lahan-hero .lh-card .lh-num {
  font-size: 24px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
}
.lahan-hero .lh-card .lh-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}
.lahan-hero .lh-card .lh-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  font-size: 14px;
}

/* ============================================
   DASHBOARD: SECTION LABEL
   ============================================ */
.section-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: var(--space-4);
}

/* ============================================
   DASHBOARD: RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .chart-row-mixed,
  .chart-row-pie,
  .lahan-hero {
    grid-template-columns: 1fr;
  }
  .stat-inline {
    flex-wrap: wrap;
  }
  .stat-inline .stat-pill {
    flex: 1 1 calc(50% - 12px);
  }
  .hero-welcome .hero-clock {
    font-size: 22px;
    text-align: left;
    margin-top: 12px;
  }
  .hero-welcome .hero-date {
    text-align: left;
  }
}

/* ============================================
   PDF CONTAINER: RESPONSIVE FOR MOBILE/TABLET
   ============================================ */
.pdf-container {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.pdf-container iframe {
  width: 100%;
  height: 80vh;
  min-height: 500px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

@media (max-width: 768px) {
  .pdf-container iframe {
    height: 70vh;
    min-height: 400px;
  }
}

@media (max-width: 576px) {
  .pdf-container iframe {
    height: 60vh;
    min-height: 350px;
  }
}
