/* ============================================================
   style.css - Sistem Inventaris SDN 064979 Setia Budi
   Tema: Modern 3D, Elegan, Profesional untuk Presentasi Perusahaan
   Enhanced: Efek 3D, Animasi Smooth, Desain Corporate Grade
   ============================================================ */

:root {
  --blue-dark: #1e40af;
  --blue: #3b82f6;
  --blue-light: #dbeafe;
  --green-dark: #059669;
  --green: #10b981;
  --orange-dark: #d97706;
  --orange: #f59e0b;
  --red-dark: #dc2626;
  --red: #ef4444;
  --text-dark: #1f2937;
  --text-muted: #6b7280;
  --border-light: #e5e7eb;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 30px 80px rgba(0, 0, 0, 0.20);
  --transition-smooth: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Segoe UI', 'Roboto', system-ui, -apple-system, sans-serif;
  background: linear-gradient(180deg, #f0f9ff 0%, #e0f2fe 50%, #ffffff 100%);
  color: var(--text-dark);
  min-height: 100vh;
  perspective: 1000px;
}

a { text-decoration: none; }

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

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

@keyframes pulse3D {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

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

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

@keyframes rotateIn {
  from {
    transform: perspective(400px) rotateY(90deg);
    opacity: 0;
  }
  to {
    transform: perspective(400px) rotateY(0);
    opacity: 1;
  }
}

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

@keyframes glow-pulse {
  0%, 100% {
    box-shadow: 0 0 5px rgba(59, 130, 246, 0.3);
  }
  50% {
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.6);
  }
}

@keyframes icon-pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

@keyframes underline-expand {
  from {
    width: 0;
    opacity: 0;
  }
  to {
    width: 100%;
    opacity: 1;
  }
}

/* ===== LOGIN PAGE ===== */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 30%, #3b82f6 70%, #dbeafe 100%);
  perspective: 1200px;
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.2) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}

.login-wrapper {
  width: 100%;
  max-width: 420px;
  padding: 20px;
  position: relative;
  z-index: 10;
  animation: slideInUp 0.8s var(--transition-smooth);
}

.login-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  box-shadow: var(--shadow-xl);
  padding: 50px 40px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  transform: perspective(1000px) rotateX(0deg);
  transition: var(--transition-smooth);
}

.login-card:hover {
  box-shadow: 0 40px 100px rgba(30, 64, 175, 0.25);
  transform: perspective(1000px) rotateX(2deg) translateZ(30px);
}

.login-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  box-shadow: 0 10px 30px rgba(30, 64, 175, 0.3);
  animation: pulse3D 2s ease-in-out infinite;
}

.logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.login-card h2 {
  text-align: center;
  margin-bottom: 8px;
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-card p {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 28px;
  font-size: 14px;
}

.form-group { margin-bottom: 16px; }

.form-control {
  border-radius: 12px;
  border: 2px solid var(--border-light);
  padding: 12px 16px;
  font-size: 14px;
  transition: var(--transition-smooth);
  background: #f8fafc;
}

.form-control:focus {
  background: #fff;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.btn-primary-gradient {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  border: none;
  color: #fff;
  border-radius: 12px;
  padding: 12px 24px;
  font-weight: 600;
  font-size: 15px;
  width: 100%;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 10px 25px rgba(30, 64, 175, 0.2);
  position: relative;
  overflow: hidden;
}

.btn-primary-gradient::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn-primary-gradient:hover {
  transform: translateY(-3px) translateZ(20px);
  box-shadow: 0 15px 40px rgba(30, 64, 175, 0.35);
}

.btn-primary-gradient:hover::before {
  left: 100%;
}

.btn-primary-gradient:active {
  transform: translateY(-1px) translateZ(10px);
}

/* ===== APP LAYOUT ===== */
.app-wrapper { display: flex; min-height: 100vh; }

.sidebar {
  width: 260px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 50%, #334155 100%);
  color: #e2e8f0;
  min-height: 100vh;
  position: sticky;
  top: 0;
  align-self: flex-start;
  box-shadow: 8px 0 30px rgba(0, 0, 0, 0.25);
  transform: translateZ(50px);
  border-right: 1px solid rgba(59, 130, 246, 0.1);
  transition: box-shadow 0.3s ease;
}

.sidebar::after {
  content: '';
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.5) 0%, transparent 20%, transparent 80%, rgba(59, 130, 246, 0.5) 100%);
  pointer-events: none;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 28px 22px;
  font-weight: 700;
  font-size: 17px;
  color: #fff;
  border-bottom: 2px solid rgba(59, 130, 246, 0.3);
  transition: var(--transition-smooth);
  background: rgba(59, 130, 246, 0.08);
  backdrop-filter: blur(10px);
  animation: slideInDown 0.6s var(--transition-smooth);
}

.sidebar-brand:hover {
  background: rgba(59, 130, 246, 0.15);
  border-bottom-color: rgba(59, 130, 246, 0.5);
}

.sidebar-brand i {
  color: var(--blue);
  font-size: 24px;
  animation: float 3s ease-in-out infinite;
  text-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

.sidebar-nav {
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: menuSlideIn 0.8s var(--transition-smooth) 0.1s backwards;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  color: #cbd5e1;
  font-size: 14.5px;
  border-left: 4px solid transparent;
  border-radius: 8px;
  transition: var(--transition-smooth);
  position: relative;
  margin: 0;
  overflow: hidden;
  transform: perspective(1000px) rotateY(0deg);
  background: transparent;
}

.sidebar-nav a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--blue-light), var(--blue), #0ea5e9);
  border-radius: 0 4px 4px 0;
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  opacity: 0;
}

.sidebar-nav a::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mouse-x, 0) var(--mouse-y, 0), rgba(59, 130, 246, 0.15) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 8px;
  pointer-events: none;
}

.sidebar-nav a i {
  font-size: 16px;
  width: 18px;
  transition: var(--transition-smooth);
  text-shadow: 0 0 8px rgba(59, 130, 246, 0.3);
}

.sidebar-nav a:hover {
  background: rgba(59, 130, 246, 0.15);
  color: #fff;
  padding-left: 20px;
  transform: perspective(1200px) rotateY(-5deg) translateZ(10px);
  border-radius: 10px;
  box-shadow: inset 0 0 15px rgba(59, 130, 246, 0.1), 0 0 20px rgba(59, 130, 246, 0.1);
}

.sidebar-nav a:hover i {
  animation: icon-pop 0.5s ease;
  text-shadow: 0 0 12px rgba(59, 130, 246, 0.6);
}

.sidebar-nav a:hover::after {
  opacity: 1;
}

.sidebar-nav a.active {
  background: rgba(59, 130, 246, 0.25);
  border-left-color: var(--blue);
  color: #fff;
  font-weight: 600;
  box-shadow: 
    inset 0 4px 12px rgba(59, 130, 246, 0.2),
    inset -4px 0 12px rgba(59, 130, 246, 0.1),
    0 0 20px rgba(59, 130, 246, 0.15);
  border-radius: 10px;
  transform: perspective(1200px) rotateY(-3deg) translateZ(5px);
}

.sidebar-nav a.active::before {
  transform: scaleY(1);
  opacity: 1;
  animation: none;
}

.sidebar-nav a.active i {
  animation: icon-pop 0.5s ease;
  text-shadow: 0 0 15px rgba(59, 130, 246, 0.8);
  filter: brightness(1.2);
}

.main-content { flex: 1; min-width: 0; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  padding: 18px 28px;
  border-bottom: 1px solid rgba(59, 130, 246, 0.15);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  position: sticky;
  top: 0;
  z-index: 10;
  animation: slideInDown 0.6s var(--transition-smooth);
  border-radius: 0 0 18px 0;
}

.topbar h1 {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.topbar h5 {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
  animation: slideInDown 0.6s var(--transition-smooth) 0.1s backwards;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 16px;
  animation: slideInDown 0.6s var(--transition-smooth) 0.15s backwards;
}

.user-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.4;
  transition: var(--transition-smooth);
}

.user-info:hover {
  transform: translateX(-2px);
}

.user-info p:first-child {
  font-weight: 600;
  color: var(--text-dark);
  margin: 0;
  font-size: 14px;
}

.badge-level {
  font-size: 11px;
  color: var(--text-muted);
  margin: 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.05));
  padding: 3px 8px;
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: var(--transition-smooth);
}

.user-info:hover .badge-level {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.1));
  color: var(--blue);
}

.user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 
    0 8px 20px rgba(59, 130, 246, 0.3),
    inset 0 1px 2px rgba(255, 255, 255, 0.3);
  transition: var(--transition-smooth);
  font-size: 18px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  position: relative;
  overflow: hidden;
}

.user-avatar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.3), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.user-avatar:hover {
  transform: scale(1.15) rotateZ(5deg) translateZ(15px);
  box-shadow: 
    0 12px 30px rgba(59, 130, 246, 0.4),
    inset 0 1px 2px rgba(255, 255, 255, 0.4);
}

.user-avatar:hover::before {
  opacity: 1;
}

.content-wrapper {
  padding: 28px;
  animation: slideInUp 0.5s var(--transition-smooth);
}

.btn-toggle-sidebar {
  border: none;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.05));
  font-size: 22px;
  color: var(--blue-dark);
  cursor: pointer;
  transition: var(--transition-smooth);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.btn-toggle-sidebar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(59, 130, 246, 0.2), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-toggle-sidebar:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.1));
  color: var(--blue);
  transform: scale(1.15) rotateZ(5deg);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.btn-toggle-sidebar:hover::before {
  opacity: 1;
}

.btn-toggle-sidebar:active {
  transform: scale(0.95) rotateZ(5deg);
}

/* ===== CARDS ===== */
.card-panel {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-radius: 18px;
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.1),
    inset 0 1px 2px rgba(255, 255, 255, 0.5);
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  transition: var(--transition-smooth);
  transform: perspective(1000px) rotateY(0deg);
  animation: slideInUp 0.6s var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.card-panel::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.card-panel:hover {
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.15),
    inset 0 1px 2px rgba(255, 255, 255, 0.6);
  transform: perspective(1000px) rotateY(-1deg) translateZ(20px);
  border-color: rgba(59, 130, 246, 0.4);
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.1),
    inset 0 1px 2px rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.6);
  transition: var(--transition-smooth);
  height: 100%;
  transform: perspective(1200px) rotateX(0deg) rotateY(0deg);
  animation: slideInUp 0.6s var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  inset: -50%;
  background: radial-gradient(circle at var(--mouse-x, 30%) var(--mouse-y, 30%), rgba(59, 130, 246, 0.1) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

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

.stat-card:hover {
  transform: perspective(1200px) rotateX(-3deg) rotateY(3deg) translateZ(25px);
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.15),
    inset 0 1px 2px rgba(255, 255, 255, 0.6);
  border-color: rgba(59, 130, 246, 0.5);
}

.stat-icon {
  width: 70px;
  height: 70px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 
    0 12px 24px rgba(0, 0, 0, 0.2),
    inset 0 1px 2px rgba(255, 255, 255, 0.3);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.stat-icon::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.2), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 18px;
}

.stat-card:hover .stat-icon::before {
  opacity: 1;
}

.stat-blue .stat-icon {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
}

.stat-green .stat-icon {
  background: linear-gradient(135deg, var(--green-dark), var(--green));
}

.stat-orange .stat-icon {
  background: linear-gradient(135deg, var(--orange-dark), var(--orange));
}

.stat-red .stat-icon {
  background: linear-gradient(135deg, var(--red-dark), var(--red));
}

.stat-card:hover .stat-icon {
  transform: scale(1.15) rotateZ(8deg);
  box-shadow: 
    0 16px 32px rgba(0, 0, 0, 0.25),
    inset 0 1px 2px rgba(255, 255, 255, 0.4);
}

.stat-info h3 {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--text-dark), var(--blue-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.stat-info p {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition-smooth);
}

.stat-card:hover .stat-info p {
  color: var(--blue);
}

/* ===== BUTTONS ===== */
.btn {
  border-radius: 12px;
  font-weight: 600;
  transition: var(--transition-smooth);
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: perspective(1000px) translateZ(0);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transform: translate(-50%, -50%);
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), height 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mouse-x, 30%) var(--mouse-y, 30%), rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 12px;
  pointer-events: none;
}

.btn:active::before {
  width: 300px;
  height: 300px;
}

.btn:hover::after {
  opacity: 1;
}

.btn-blue {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  border: none;
  color: #fff;
  box-shadow: 
    0 8px 20px rgba(30, 64, 175, 0.25),
    inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.btn-green {
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  border: none;
  color: #fff;
  box-shadow: 
    0 8px 20px rgba(5, 150, 105, 0.25),
    inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.btn-orange {
  background: linear-gradient(135deg, var(--orange-dark), var(--orange));
  border: none;
  color: #fff;
  box-shadow: 
    0 8px 20px rgba(217, 119, 6, 0.25),
    inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.btn-red {
  background: linear-gradient(135deg, var(--red-dark), var(--red));
  border: none;
  color: #fff;
  box-shadow: 
    0 8px 20px rgba(220, 38, 38, 0.25),
    inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.btn-blue:hover,
.btn-green:hover,
.btn-orange:hover,
.btn-red:hover {
  transform: translateY(-4px) translateZ(15px) scale(1.02);
  filter: brightness(1.1);
  box-shadow: 
    0 12px 30px rgba(0, 0, 0, 0.3),
    inset 0 1px 2px rgba(255, 255, 255, 0.4);
  color: #fff;
}

.btn-blue:active,
.btn-green:active,
.btn-orange:active,
.btn-red:active {
  transform: translateY(-2px) translateZ(5px) scale(0.98);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
  min-height: 34px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
  min-height: 50px;
}

/* ===== FILTER PILLS ===== */
.filter-pill {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--text-dark);
  font-weight: 600;
  font-size: 13.5px;
  border: 2px solid var(--border-light);
  margin-right: 10px;
  margin-bottom: 10px;
  transition: var(--transition-smooth);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
}

.filter-pill::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(59, 130, 246, 0.1), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.filter-pill:hover {
  border-color: var(--blue);
  color: var(--blue);
  transform: translateY(-3px) translateZ(8px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.2);
}

.filter-pill:hover::before {
  opacity: 1;
}

.filter-pill.active {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.35);
  transform: scale(1.08);
  animation: pulse3D 0.5s ease;
}

/* ===== TABLE ===== */
.table-responsive {
  border-radius: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
  background: #fff;
  border: 1px solid #edf1f5;
}

.table-modern {
  border-collapse: collapse;
  margin-bottom: 0;
  width: 100%;
  table-layout: fixed;
  background: #fff;
}

.table-modern thead {
  background: #f3f4f6;
  color: #111827;
  font-weight: 700;
}

.table-modern thead th,
.table-modern tbody td {
  padding: 12px 10px;
  line-height: 1.3;
  box-sizing: border-box;
  vertical-align: middle;
}

.table-modern colgroup col:nth-child(1) { width: 13%; }
.table-modern colgroup col:nth-child(2) { width: 23%; }
.table-modern colgroup col:nth-child(3) { width: 9%; }
.table-modern colgroup col:nth-child(4) { width: 14%; }
.table-modern colgroup col:nth-child(5) { width: 15%; }
.table-modern colgroup col:nth-child(6) { width: 12%; }
.table-modern colgroup col:nth-child(7) { width: 11%; }
.table-modern colgroup col:nth-child(8) { width: 9%; }

.table-modern thead th {
  border: none;
  padding: 16px 18px;
  font-size: 15px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  box-shadow: inset 0 -1px 0 rgba(15, 23, 42, 0.08);
  background: #f4f5f7;
  color: #1f2937;
}

.table-modern tbody tr {
  transition: var(--transition-smooth);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  height: 68px;
  background: #ffffff;
}

.table-modern tbody tr td {
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.table-modern tbody tr:nth-child(even) {
  background: #f8fafc;
}

.table-modern tbody tr:hover {
  background: #f1f5f9;
  transform: none;
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.06);
}

.table-modern tbody td {
  padding: 14px 16px;
  vertical-align: middle;
  font-size: 14px;
  color: #1f2937;
  border-color: rgba(15, 23, 42, 0.08);
  white-space: nowrap;
}

.table-modern tbody td.td-kode {
  font-weight: 700;
  color: #1f2937;
  text-align: left;
}

.table-modern tbody td.td-jumlah,
.table-modern tbody td.td-kondisi,
.table-modern tbody td.td-tgl,
.table-modern tbody td.td-aksi {
  text-align: center;
}

.table-modern tbody td.td-nama,
.table-modern tbody td.td-kategori,
.table-modern tbody td.td-lokasi {
  text-align: left;
}

.table-modern tbody td.td-kondisi .badge-kondisi,
.table-modern tbody td.td-aksi {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.badge-kondisi {
  padding: 7px 16px;
  border-radius: 22px;
  font-size: 12px;
  font-weight: 700;
  display: inline-block;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: var(--transition-smooth);
  text-transform: capitalize;
  position: relative;
  overflow: hidden;
}

.badge-kondisi::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.2), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 22px;
}

.badge-kondisi:hover {
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.badge-kondisi:hover::before {
  opacity: 1;
}

.badge-baik {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  color: var(--green-dark);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.3);
}

.badge-ringan {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: var(--orange-dark);
  box-shadow: 0 6px 16px rgba(217, 119, 6, 0.3);
}

.badge-berat {
  background: linear-gradient(135deg, #fee2e2, #fca5a5);
  color: var(--red-dark);
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.3);
}

/* ===== CHARTS & CANVAS ===== */
canvas {
  max-height: 300px;
  animation: slideInUp 0.8s var(--transition-smooth);
}

.chart-container {
  position: relative;
  height: 300px;
  margin-bottom: 16px;
}

/* ===== MODALS ===== */
.modal-content {
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.2),
    inset 0 1px 2px rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.99);
  backdrop-filter: blur(20px);
  animation: slideInUp 0.5s var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.modal-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.3), transparent);
  pointer-events: none;
}

.modal-header {
  border-bottom: 2px solid rgba(59, 130, 246, 0.15);
  padding: 28px 28px 20px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(59, 130, 246, 0.02));
}

.modal-title {
  font-size: 22px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
  margin: 0;
}

.modal-body {
  padding: 28px;
}

.modal-footer {
  background: rgba(59, 130, 246, 0.03);
  border-top: 1px solid rgba(59, 130, 246, 0.1);
  padding: 20px 28px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.form-label {
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 10px;
  font-size: 14px;
  display: block;
  transition: var(--transition-smooth);
}

.form-label:hover {
  color: var(--blue);
}

.form-control {
  border-radius: 14px;
  border: 2px solid var(--border-light);
  padding: 12px 16px;
  font-size: 14px;
  transition: var(--transition-smooth);
  background: #f8fafc;
  font-family: inherit;
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-control:focus {
  background: #fff;
  border-color: var(--blue);
  box-shadow: 
    0 0 0 4px rgba(59, 130, 246, 0.15),
    inset 0 1px 2px rgba(59, 130, 246, 0.1);
  transform: translateZ(5px);
  outline: none;
}

.form-select {
  border-radius: 14px;
  border: 2px solid var(--border-light);
  padding: 12px 16px;
  font-size: 14px;
  transition: var(--transition-smooth);
  background: #f8fafc;
  font-family: inherit;
  cursor: pointer;
}

.form-select:focus {
  background: #fff;
  border-color: var(--blue);
  box-shadow: 
    0 0 0 4px rgba(59, 130, 246, 0.15),
    inset 0 1px 2px rgba(59, 130, 246, 0.1);
  outline: none;
}

/* ===== ALERTS ===== */
.alert {
  border-radius: 16px;
  border: 1.5px solid;
  animation: slideInDown 0.5s var(--transition-smooth);
  backdrop-filter: blur(10px);
  padding: 16px 20px;
  position: relative;
  overflow: hidden;
}

.alert::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  border-radius: 4px 0 0 4px;
}

.alert-success {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.05));
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--green-dark);
}

.alert-success::before {
  background: linear-gradient(180deg, var(--green-dark), var(--green));
}

.alert-danger {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.1), rgba(220, 38, 38, 0.05));
  border-color: rgba(220, 38, 38, 0.3);
  color: var(--red-dark);
}

.alert-danger::before {
  background: linear-gradient(180deg, var(--red-dark), var(--red));
}

.alert-auto-hide {
  animation: slideInDown 0.5s var(--transition-smooth), slideInDown 0.5s var(--transition-smooth) 3s reverse forwards;
}

/* ===== PRINT ===== */
.print-header {
  position: relative;
  width: 100%;
  margin: 0 auto 18px;
  text-align: center;
  padding-bottom: 0;
  overflow: hidden;
}

.print-header::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  width: 470px;
  height: 470px;
  background: none;
  opacity: 0;
  z-index: 0;
  pointer-events: none;
}

.print-kop {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: left;
  margin: 0 auto 8px;
  width: 100%;
  max-width: 940px;
}

.print-logo-box {
  width: 110px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  left: 0;
  margin-right: 8px;
}

.print-logo {
  width: 100px;
  height: 100px;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.12));
}

.print-kop-text {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #111;
  max-width: 620px;
  margin: 0 auto;
}

.print-kop-title {
  font-weight: 700;
  font-size: 17px;
  line-height: 1.35;
  text-transform: uppercase;
}

.print-kop-title-lg {
  font-size: 18px;
}

.print-kop-title-xl {
  font-size: 19px;
  letter-spacing: 0.2px;
}

.print-kop-address {
  font-size: 12px;
  line-height: 1.5;
  color: #222;
}

.print-kop-line {
  border-top: 2px solid #000;
  margin: 10px auto 8px;
  width: 100%;
  max-width: none;
}

.print-report-title {
  margin: 0;
  font-weight: 700;
  font-size: 24px;
  color: #000;
  text-transform: none;
  letter-spacing: 0.2px;
  padding-top: 4px;
}

.print-header h4 {
  margin: 0;
  font-weight: 700;
  font-size: 18px;
  color: #000;
}

.print-header p {
  margin: 4px 0;
  color: var(--text-muted);
  font-size: 13px;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 12mm 12mm 12mm 12mm;
  }

  html, body {
    width: 210mm;
    height: auto;
    background: #fff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .no-print { display: none !important; }

  body {
    margin: 0;
    padding: 0;
    font-size: 11pt;
  }

  .container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .card-panel,
  .table-responsive,
  .print-header {
    background: #fff !important;
    box-shadow: none !important;
    border: none !important;
  }

  .print-header::before {
    display: none !important;
    background: none !important;
    opacity: 0 !important;
  }

  .print-header,
  .print-kop,
  .print-kop-text,
  .print-kop-line,
  .print-report-title {
    background: transparent !important;
    box-shadow: none !important;
  }

  .table-modern thead {
    background: #f3f4f6 !important;
    color: #000 !important;
  }

  .table-modern thead th,
  .table-modern tbody td {
    background: transparent !important;
    color: #000 !important;
  }

  .table-modern {
    font-size: 10pt;
    width: 100% !important;
    min-width: 0 !important;
  }
}

/* ===== PAGINATION ===== */
.pagination {
  gap: 8px;
  display: flex;
  flex-wrap: wrap;
}

.page-link {
  border-radius: 12px;
  border: 2px solid var(--border-light);
  padding: 10px 14px;
  color: var(--blue);
  transition: var(--transition-smooth);
  font-weight: 700;
  font-size: 13px;
  min-width: 44px;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.95);
}

.page-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(59, 130, 246, 0.1), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.page-link:hover {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  color: #fff;
  border-color: var(--blue);
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.3);
}

.page-link:hover::before {
  opacity: 1;
}

.page-item.active .page-link {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  border-color: transparent;
  box-shadow: 
    0 8px 20px rgba(59, 130, 246, 0.35),
    inset 0 1px 2px rgba(255, 255, 255, 0.3);
  animation: pulse3D 0.5s ease;
}

.page-item.disabled .page-link {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== HEADINGS & TEXT ===== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text-dark);
  letter-spacing: -0.5px;
  transition: var(--transition-smooth);
}

h1 { 
  font-size: 36px;
  background: linear-gradient(135deg, var(--text-dark), var(--blue-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 { 
  font-size: 30px;
  background: linear-gradient(135deg, var(--text-dark), var(--blue-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h3 { 
  font-size: 26px;
  background: linear-gradient(135deg, var(--text-dark), var(--blue-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h4 { font-size: 22px; }

h5 { font-size: 20px; }

h6 {
  font-size: 16px;
  color: var(--blue-dark);
  border-bottom: 3px solid var(--blue-light);
  padding-bottom: 10px;
  background: linear-gradient(90deg, var(--blue-dark) 0%, var(--blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h6:hover {
  border-bottom-color: var(--blue-dark);
  text-shadow: 0 0 20px rgba(30, 64, 175, 0.2);
}

.card-panel h6, .card-panel h5 {
  margin-top: 0;
}

/* ===== RESPONSIVE SIDEBAR ===== */
@media (max-width: 991px) {
  .sidebar {
    position: fixed;
    left: -260px;
    z-index: 1050;
    height: 100vh;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    top: 0;
    box-shadow: 8px 0 40px rgba(0, 0, 0, 0.3);
  }
  
  .sidebar.show {
    left: 0;
    box-shadow: 8px 0 40px rgba(0, 0, 0, 0.3);
  }
  
  .sidebar.show::after {
    opacity: 1;
    pointer-events: auto;
  }
  
  .main-content {
    position: relative;
  }
}

@media (max-width: 991px) and (prefers-reduced-motion: no-preference) {
  .sidebar.show .sidebar-nav a {
    animation: menuSlideIn 0.6s var(--transition-smooth) forwards;
  }
  
  .sidebar.show .sidebar-nav a:nth-child(1) { animation-delay: 0.1s; }
  .sidebar.show .sidebar-nav a:nth-child(2) { animation-delay: 0.15s; }
  .sidebar.show .sidebar-nav a:nth-child(3) { animation-delay: 0.2s; }
  .sidebar.show .sidebar-nav a:nth-child(4) { animation-delay: 0.25s; }
  .sidebar.show .sidebar-nav a:nth-child(5) { animation-delay: 0.3s; }
  .sidebar.show .sidebar-nav a:nth-child(6) { animation-delay: 0.35s; }
  .sidebar.show .sidebar-nav a:nth-child(7) { animation-delay: 0.4s; }
  .sidebar.show .sidebar-nav a:nth-child(8) { animation-delay: 0.45s; }
}

/* ===== RESPONSIVE GENERAL ===== */
@media (max-width: 768px) {
  .content-wrapper {
    padding: 16px;
  }

  .card-panel {
    padding: 18px;
  }

  .stat-card {
    padding: 18px;
    gap: 14px;
    flex-direction: column;
    align-items: flex-start;
  }

  .stat-icon {
    width: 56px;
    height: 56px;
    font-size: 24px;
  }

  .stat-info h3 {
    font-size: 24px;
  }

  .topbar {
    flex-direction: column;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 0;
  }

  .topbar h5 {
    font-size: 16px;
  }

  .topbar-user {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }

  .user-avatar {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .user-info {
    align-items: flex-start;
  }

  .user-info p:first-child {
    font-size: 13px;
  }

  .badge-level {
    font-size: 10px;
  }

  .table-modern {
    font-size: 13px;
  }

  .table-modern thead th {
    font-size: 11px;
    padding: 12px 10px;
  }

  .table-modern tbody td {
    padding: 10px 8px;
    font-size: 12px;
  }

  .btn-sm {
    padding: 6px 10px;
    font-size: 12px;
    min-height: 32px;
  }

  .btn-lg {
    padding: 10px 16px;
    font-size: 14px;
    min-height: 42px;
  }

  .filter-pill {
    padding: 8px 16px;
    font-size: 12px;
    margin-right: 6px;
    margin-bottom: 6px;
  }

  h1 { font-size: 24px; }
  h2 { font-size: 20px; }
  h3 { font-size: 18px; }
  h4 { font-size: 16px; }
  h5 { font-size: 14px; }
  h6 { font-size: 13px; }
}
