/**
 * ============================================================================
 * GLOBAL PREMIUM MOTION UI & 3D CLAYMORPHISM STYLESHEET
 * SD Islam Insani Karakter Kun Anta - ERP System
 * ============================================================================
 * Locked Permanent Formulas based on 5 Interactive Reference Videos:
 * 1. Goal Tracker & Analytics Progress (.premium-top)
 * 2. Bulk Action Interactive List & Lift (-4px, glowing border, floating bar)
 * 3. File Upload Premium Dropzone (radial glow, 3-layer folder, progress bar)
 * 4. Sliding Auth & Modal Overlay (asymmetrical curve 150px)
 * 5. Animated SVG Logout Door & Tactile Capsule Buttons
 */

/* ----------------------------------------------------------------------------
 * 1. TIPOGRAFI GLOBAL & ROOT TOKENS
 * ---------------------------------------------------------------------------- */
*, body, button, input, select, textarea {
  font-family: 'Plus Jakarta Sans', Nunito, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

:root {
  --motion-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --motion-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --brand-navy: #0B2545;
  --brand-blue: #133E87;
  --brand-gold: #F59E0B;
  --brand-mint: #10B981;
  --brand-lilac: #8E8AFF;
  --brand-peach: #FF9A8B;
  --brand-purple: #7C3AED;
}

/* ----------------------------------------------------------------------------
 * 2. KARTU METRIK & HEADER ANALITIK (.premium-top)
 * ---------------------------------------------------------------------------- */
.premium-top {
  background: linear-gradient(180deg, rgba(142, 138, 255, 0.14) 0%, rgba(237, 233, 254, 0.05) 45%, #ffffff 100%);
  border-radius: 24px;
  border: 1px solid rgba(139, 92, 246, 0.14);
  box-shadow: 0 16px 40px -8px rgba(11, 37, 69, 0.08);
  transition: transform 300ms var(--motion-ease), box-shadow 300ms var(--motion-ease);
}
.premium-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px -6px rgba(11, 37, 69, 0.12);
}

.premium-top-mint {
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.14) 0%, rgba(240, 253, 244, 0.05) 45%, #ffffff 100%);
  border-radius: 24px;
  border: 1px solid rgba(16, 185, 129, 0.18);
  box-shadow: 0 16px 40px -8px rgba(16, 185, 129, 0.08);
  transition: transform 300ms var(--motion-ease), box-shadow 300ms var(--motion-ease);
}
.premium-top-mint:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px -6px rgba(16, 185, 129, 0.14);
}

.premium-top-lilac {
  background: linear-gradient(180deg, rgba(142, 138, 255, 0.16) 0%, rgba(245, 243, 255, 0.05) 45%, #ffffff 100%);
  border-radius: 24px;
  border: 1px solid rgba(142, 138, 255, 0.20);
  box-shadow: 0 16px 40px -8px rgba(142, 138, 255, 0.08);
  transition: transform 300ms var(--motion-ease), box-shadow 300ms var(--motion-ease);
}
.premium-top-lilac:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px -6px rgba(142, 138, 255, 0.15);
}

.premium-top-peach {
  background: linear-gradient(180deg, rgba(255, 154, 139, 0.16) 0%, rgba(255, 245, 245, 0.05) 45%, #ffffff 100%);
  border-radius: 24px;
  border: 1px solid rgba(255, 154, 139, 0.22);
  box-shadow: 0 16px 40px -8px rgba(255, 154, 139, 0.09);
  transition: transform 300ms var(--motion-ease), box-shadow 300ms var(--motion-ease);
}
.premium-top-peach:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px -6px rgba(255, 154, 139, 0.16);
}

.premium-top-gold {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.16) 0%, rgba(254, 243, 199, 0.05) 45%, #ffffff 100%);
  border-radius: 24px;
  border: 1px solid rgba(245, 158, 11, 0.22);
  box-shadow: 0 16px 40px -8px rgba(245, 158, 11, 0.09);
  transition: transform 300ms var(--motion-ease), box-shadow 300ms var(--motion-ease);
}
.premium-top-gold:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px -6px rgba(245, 158, 11, 0.16);
}

/* Circular SVG Progress Ring Animation */
.progress-ring-circle {
  transition: stroke-dashoffset 1200ms var(--motion-ease);
}

/* ----------------------------------------------------------------------------
 * 3. KARTU ITEM, BARIS TABEL & INTERACTIVE HOVER LIFT
 * ---------------------------------------------------------------------------- */
.premium-row-item {
  transition: transform 220ms var(--motion-ease), box-shadow 220ms var(--motion-ease), border-color 220ms var(--motion-ease), background 220ms var(--motion-ease);
  border-radius: 18px;
}
.premium-row-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(11, 37, 69, 0.06), 0 2px 6px rgba(11, 37, 69, 0.04);
}
.premium-row-item.row-selected,
.premium-row-item:has(input:checked) {
  transform: translateY(-4px) !important;
  border-color: #7c3aed !important;
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.08), #ffffff) !important;
  box-shadow: 0 12px 24px rgba(124, 58, 237, 0.14), 0 2px 6px rgba(124, 58, 237, 0.08) !important;
}

/* ----------------------------------------------------------------------------
 * 4. FLOATING GRADIENT ACTION BAR (Bulk Action)
 * ---------------------------------------------------------------------------- */
.floating-gradient-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(140px);
  background: linear-gradient(135deg, #0B2545 0%, #133E87 40%, #7c3aed 100%);
  color: #ffffff;
  border-radius: 28px;
  padding: 12px 24px;
  box-shadow: 0 20px 48px -6px rgba(11, 37, 69, 0.45), inset 0 1.5px 2px rgba(255, 255, 255, 0.25);
  transition: transform 380ms var(--motion-spring), opacity 300ms ease;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 16px;
  opacity: 0;
  pointer-events: none;
}
.floating-gradient-bar.active {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* ----------------------------------------------------------------------------
 * 5. PREMIUM DROPZONE (File Upload)
 * ---------------------------------------------------------------------------- */
.premium-dropzone-modal {
  background: radial-gradient(circle at top, #f3e8ff, #ffffff 70%);
  box-shadow: 0 20px 50px rgba(124, 58, 237, 0.15);
  border-radius: 28px;
}
.premium-dropzone-box {
  border: 2px dashed #c4b5fd;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.7);
  transition: all 250ms var(--motion-ease);
}
.premium-dropzone-box.dragover,
.premium-dropzone-box:hover {
  border-color: #7c3aed;
  background: rgba(124, 58, 237, 0.05);
  transform: scale(1.01);
}

/* 3-Layer Folder Bloom Animation */
.folder-layer-1 { transition: transform 250ms ease; }
.folder-layer-2 { transition: transform 250ms ease; }
.folder-layer-3 { transition: transform 250ms ease; }
.premium-dropzone-box:hover .folder-layer-1 { transform: translateY(-3px) rotate(-3deg); }
.premium-dropzone-box:hover .folder-layer-2 { transform: translateY(-5px); }
.premium-dropzone-box:hover .folder-layer-3 { transform: translateY(-3px) rotate(3deg); }

/* ----------------------------------------------------------------------------
 * 6. ASYMMETRICAL SLIDING AUTH OVERLAY (Sliding Auth)
 * ---------------------------------------------------------------------------- */
.sliding-auth-panel {
  border-radius: 30px;
  overflow: hidden;
  position: relative;
}
.sliding-overlay-curved-left {
  border-radius: 150px 0 0 100px;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.sliding-overlay-curved-right {
  border-radius: 0 150px 100px 0;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ----------------------------------------------------------------------------
 * 7. LOGOUT 3D DOOR ANIMATION & TACTILE CAPSULE BUTTONS
 * ---------------------------------------------------------------------------- */
.door-container {
  perspective: 600px;
}
.door-leaf {
  transform-origin: left center;
  transition: transform 450ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.door-opening .door-leaf {
  transform: rotateY(-65deg);
}
.door-walker {
  opacity: 0;
  transform: translateX(-10px);
  transition: all 400ms ease 100ms;
}
.door-opening .door-walker {
  opacity: 1;
  transform: translateX(12px);
}

/* Tactile Push Scale */
.tactile-press {
  transition: transform 150ms var(--motion-ease);
}
.tactile-press:active {
  transform: scale(0.95);
}

/* ----------------------------------------------------------------------------
 * 8. MAIN VIEWPORT & ROUTER OUTLET BREATHING ROOM PADDING
 * ---------------------------------------------------------------------------- */
#router-outlet, .main-content, .page-container {
  padding: 24px 16px 40px 16px !important;
  box-sizing: border-box;
  scroll-behavior: smooth;
}
@media (min-width: 640px) {
  #router-outlet, .main-content, .page-container {
    padding: 28px 28px 48px 28px !important;
  }
}
@media (min-width: 1024px) {
  #router-outlet, .main-content, .page-container {
    padding: 32px 36px 56px 36px !important;
  }
}

/* ----------------------------------------------------------------------------
 * 9. AMBIENT AURORA CANVAS & DEPTH LIGHTING
 * ---------------------------------------------------------------------------- */
body, #app-shell {
  background-color: #FDFBF7 !important;
  position: relative;
}

.ambient-aurora-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-orb {
  position: absolute;
  border-radius: 9999px;
  filter: blur(90px);
  opacity: 0.35;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.ambient-orb-mint {
  width: 480px;
  height: 480px;
  top: -120px;
  left: -100px;
  background: radial-gradient(circle, #68D391 0%, rgba(104, 211, 145, 0) 70%);
}

.ambient-orb-lilac {
  width: 520px;
  height: 520px;
  top: 30%;
  right: -120px;
  background: radial-gradient(circle, #8E8AFF 0%, rgba(142, 138, 255, 0) 70%);
}

.ambient-orb-gold {
  width: 460px;
  height: 460px;
  bottom: -80px;
  left: 25%;
  background: radial-gradient(circle, #F59E0B 0%, rgba(245, 158, 11, 0) 70%);
}

/* ----------------------------------------------------------------------------
 * 10. FROSTED GLASS TOPBAR & STICKY SUB-HEADER (.glass-topbar)
 * ---------------------------------------------------------------------------- */
.glass-topbar {
  background: rgba(255, 255, 255, 0.75) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.85) !important;
  box-shadow: 0 8px 32px rgba(11, 37, 69, 0.05) !important;
}

/* ----------------------------------------------------------------------------
 * 11. UPGRADED SPECULAR INNER GLASS BORDER & CLAY-CARD HOVER
 * ---------------------------------------------------------------------------- */
.clay-card {
  border-radius: 24px !important;
  box-shadow: 
    0 16px 36px -6px rgba(11, 37, 69, 0.08),
    0 6px 14px -3px rgba(11, 37, 69, 0.03),
    inset 0 1.5px 2px rgba(255, 255, 255, 0.95) !important;
  transition: transform 280ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 280ms var(--motion-ease) !important;
}

.clay-card:hover {
  transform: translateY(-4px) scale(1.005) !important;
  box-shadow: 
    0 22px 46px -6px rgba(11, 37, 69, 0.12),
    inset 0 1.5px 2px rgba(255, 255, 255, 0.98) !important;
}

/* ----------------------------------------------------------------------------
 * 12. TAB SCROLLBAR REMOVAL & GLASS PILL TABS (.glass-pill-tabs)
 * ---------------------------------------------------------------------------- */
.tab-container, .glass-pill-tabs, .no-scrollbar {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.tab-container::-webkit-scrollbar,
.glass-pill-tabs::-webkit-scrollbar,
.no-scrollbar::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.glass-pill-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 6px;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 16px rgba(11, 37, 69, 0.04), inset 0 1px 2px rgba(255, 255, 255, 0.9);
}

.glass-pill-tab-item {
  padding: 8px 16px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  color: #475569;
  transition: all 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
}

.glass-pill-tab-item.active {
  background: linear-gradient(135deg, #0B2545 0%, #133E87 100%);
  color: #FFFFFF;
  box-shadow: 0 6px 16px rgba(11, 37, 69, 0.25), inset 0 1px 2px rgba(255, 255, 255, 0.3);
  transform: scale(1.02);
}

/* ----------------------------------------------------------------------------
 * 13. RESPONSIVE KPI RUPIAH TYPOGRAPHY (ANTI-TRUNCATION)
 * ---------------------------------------------------------------------------- */
.kpi-rupiah, .kpi-currency, .kpi-number,
.premium-top [id^="kpi-val"],
.kpi-amount,
.kpi-val-responsive {
  font-size: clamp(1.15rem, 1.6vw, 1.55rem) !important;
  white-space: nowrap !important;
  line-height: 1.25 !important;
  letter-spacing: -0.02em !important;
  overflow: visible !important;
}

/* ----------------------------------------------------------------------------
 * 14. STAGGERED SPRING PAGE TRANSITION & MICRO-ANIMATIONS
 * ---------------------------------------------------------------------------- */
@keyframes clayFadeUpSpring {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  65% {
    transform: translateY(-2px) scale(1.002);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.clay-fade-up-spring {
  animation: clayFadeUpSpring 420ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.spring-stagger > *:nth-child(1) { animation: clayFadeUpSpring 420ms cubic-bezier(0.34, 1.56, 0.64, 1) 0ms both; }
.spring-stagger > *:nth-child(2) { animation: clayFadeUpSpring 420ms cubic-bezier(0.34, 1.56, 0.64, 1) 45ms both; }
.spring-stagger > *:nth-child(3) { animation: clayFadeUpSpring 420ms cubic-bezier(0.34, 1.56, 0.64, 1) 90ms both; }
.spring-stagger > *:nth-child(4) { animation: clayFadeUpSpring 420ms cubic-bezier(0.34, 1.56, 0.64, 1) 135ms both; }
.spring-stagger > *:nth-child(5) { animation: clayFadeUpSpring 420ms cubic-bezier(0.34, 1.56, 0.64, 1) 180ms both; }
.spring-stagger > *:nth-child(6) { animation: clayFadeUpSpring 420ms cubic-bezier(0.34, 1.56, 0.64, 1) 225ms both; }

/* Hero Banner Sheen & Decorative Shapes */
.hero-glass-sheen {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.03) 40%, transparent 60%);
  pointer-events: none;
}

.hero-decorative-circle {
  position: absolute;
  right: -24px;
  top: -24px;
  width: 140px;
  height: 140px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  pointer-events: none;
}

/* ----------------------------------------------------------------------------
 * 15. SKELETON SHIMMER LOADING
 * ---------------------------------------------------------------------------- */
@keyframes shimmerSlide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.skeleton-shimmer {
  position: relative;
  overflow: hidden;
  background-color: #E2E8F0;
  border-radius: 14px;
}

.skeleton-shimmer::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
  animation: shimmerSlide 1.5s infinite;
}

/* ----------------------------------------------------------------------------
 * 16. SIDEBAR NAVIGATOR STYLING & ACCORDION ANIMATION
 * ---------------------------------------------------------------------------- */
.sidebar-icon-badge {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(11, 37, 69, 0.08);
  box-shadow: 0 2px 6px rgba(11, 37, 69, 0.04), inset 0 1px 1px rgba(255, 255, 255, 0.9);
  flex-shrink: 0;
  font-size: 14px;
  transition: all 200ms var(--motion-ease);
}

.sidebar-menu-btn:hover .sidebar-icon-badge {
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(11, 37, 69, 0.08);
}

.submenu-timeline-tree {
  border-left: 2px solid rgba(19, 62, 135, 0.12);
  margin-left: 17px;
  padding-left: 10px;
}

.submenu-item {
  position: relative;
  transition: all 220ms cubic-bezier(0.34, 1.56, 0.64, 1);
  border-radius: 12px;
}

.submenu-dot {
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: #CBD5E1;
  transition: all 240ms ease;
  flex-shrink: 0;
}

.submenu-item.active .submenu-dot {
  background: #F59E0B !important;
  box-shadow: 0 0 8px #F59E0B, 0 0 2px #F59E0B !important;
  transform: scale(1.3);
}

.submenu-item.active {
  background: linear-gradient(135deg, #0B2545 0%, #133E87 100%) !important;
  color: #FFFFFF !important;
  box-shadow: 0 6px 14px rgba(11, 37, 69, 0.2), inset 0 1px 2px rgba(255, 255, 255, 0.25) !important;
}

.accordion-chevron {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.accordion-chevron.expanded {
  transform: rotate(180deg);
}

/* ----------------------------------------------------------------------------
 * 17. MOBILE PHONE SIMULATION FRAME & FLOATING GLASS BOTTOM BAR
 * ---------------------------------------------------------------------------- */
.mobile-phone-frame {
  max-width: 412px;
  min-height: 840px;
  margin: 16px auto;
  border-radius: 44px;
  border: 8px solid #0B2545;
  box-shadow: 0 24px 60px rgba(11, 37, 69, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.6);
  overflow: hidden;
  position: relative;
  background: #FDFBF7;
  display: flex;
  flex-direction: column;
}

.mobile-phone-topbar {
  height: 48px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  font-size: 11px;
  font-weight: 800;
  color: #0B2545;
  flex-shrink: 0;
}

.floating-glass-bottom-nav {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 410px;
  background: rgba(255, 255, 255, 0.82) !important;
  backdrop-filter: blur(24px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.9) !important;
  box-shadow: 0 16px 36px -4px rgba(11, 37, 69, 0.16), 0 4px 12px rgba(11, 37, 69, 0.05), inset 0 1px 2px rgba(255, 255, 255, 0.95) !important;
  border-radius: 28px !important;
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 6px 8px;
}

/* ----------------------------------------------------------------------------
 * 15. MOBILE DUOTONE SQUIRCLE ICONS & BOTTOM SHEET DRAWER
 * ---------------------------------------------------------------------------- */
.mobile-squircle-icon {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px -4px rgba(11, 37, 69, 0.12), inset 0 1.5px 2px rgba(255, 255, 255, 0.9);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
  flex-shrink: 0;
}

.mobile-squircle-icon:hover {
  transform: translateY(-2px) scale(1.04);
}

.mobile-squircle-mint {
  background: linear-gradient(135deg, #A7F3D0 0%, #34D399 100%);
  color: #064E3B;
  box-shadow: 0 8px 20px -4px rgba(52, 211, 153, 0.35), inset 0 1.5px 2px rgba(255, 255, 255, 0.85);
}

.mobile-squircle-peach {
  background: linear-gradient(135deg, #FECDD3 0%, #FB7185 100%);
  color: #881337;
  box-shadow: 0 8px 20px -4px rgba(251, 113, 133, 0.35), inset 0 1.5px 2px rgba(255, 255, 255, 0.85);
}

.mobile-squircle-lilac {
  background: linear-gradient(135deg, #E9D5FF 0%, #A855F7 100%);
  color: #581C87;
  box-shadow: 0 8px 20px -4px rgba(168, 85, 247, 0.35), inset 0 1.5px 2px rgba(255, 255, 255, 0.85);
}

.mobile-squircle-gold {
  background: linear-gradient(135deg, #FDE68A 0%, #F59E0B 100%);
  color: #78350F;
  box-shadow: 0 8px 20px -4px rgba(245, 158, 11, 0.35), inset 0 1.5px 2px rgba(255, 255, 255, 0.85);
}

.mobile-squircle-sky {
  background: linear-gradient(135deg, #BAE6FD 0%, #38BDF8 100%);
  color: #0C4A6E;
  box-shadow: 0 8px 20px -4px rgba(56, 189, 248, 0.35), inset 0 1.5px 2px rgba(255, 255, 255, 0.85);
}

.mobile-squircle-navy {
  background: linear-gradient(135deg, #1E3A8A 0%, #0B2545 100%);
  color: #F59E0B;
  box-shadow: 0 8px 20px -4px rgba(11, 37, 69, 0.4), inset 0 1.5px 2px rgba(255, 255, 255, 0.3);
}

/* Mobile Frosted Glass Bottom Sheet Drawer */
.mobile-bottom-drawer {
  position: fixed;
  inset: 0;
  z-index: 99998;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: rgba(11, 37, 69, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fadeInDrawerBackdrop 0.25s ease-out;
}

.mobile-drawer-content {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border-top: 1.5px solid rgba(255, 255, 255, 0.95);
  border-radius: 32px 32px 0 0;
  box-shadow: 0 -20px 60px rgba(11, 37, 69, 0.22);
  max-height: 85vh;
  overflow-y: auto;
  animation: slideUpDrawer 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes fadeInDrawerBackdrop {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUpDrawer {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* Hide Floating Switcher in Mobile Mode to prevent covering Bottom Navigation Bar */
@media (max-width: 768px) {
  .floating-switcher {
    display: none !important;
  }
}

body.mobile-mode-active .floating-switcher {
  display: none !important;
}

.mobile-scroll-container {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
.mobile-scroll-container::-webkit-scrollbar {
  display: none !important;
}

/* ============================================================================
   14. GOVTECH / ANTI-AI SLOP ENGINEERING & PRINT READINESS TOKENS
   Standard: Non-Destructive High-Contrast & Extreme Data Stress-Test Protections
   ============================================================================ */

/* 14.1. Universal Tabular Figures (Financial, Time, NIK, NIP, Rec-Code Alignment) */
.tabular-nums,
.font-mono,
table td.numeric,
table th.numeric,
.currency-cell,
.kpi-value,
.audit-hash,
.nip-text,
.nik-text,
.wita-time,
.badge-mono,
[data-tabular="true"] {
  font-variant-numeric: tabular-nums lining-nums !important;
  font-feature-settings: "tnum" 1, "lnum" 1 !important;
}
.currency-cell,
td.numeric,
th.numeric,
.font-mono.font-bold,
.font-mono.font-black {
  white-space: nowrap;
}

table td.numeric,
table th.numeric,
.currency-cell {
  text-align: right !important;
}

/* 14.2. Extreme Data Stress-Test & Overflow Guards */
.cell-overflow-guard {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: middle;
}

.cell-overflow-guard-wide {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: middle;
}

.flex-cell-guard {
  min-width: 0 !important;
  flex: 1 1 auto !important;
}

/* Universal Table Mobile Scroll & Touch Target Safeguards */
.overflow-x-auto {
  -webkit-overflow-scrolling: touch !important;
}

@media screen and (max-width: 768px) {
  .overflow-x-auto {
    width: 100% !important;
    max-width: 100% !important;
  }
  
  /* Guarantee bottom clearance above floating mobile bottom nav on all modules */
  #router-outlet {
    padding-bottom: 132px !important;
  }
  #router-outlet > * {
    padding-bottom: 96px !important;
  }

  /* Guarantee minimum 44px touch targets on mobile interactive controls */
  .mobile-touch-target,
  .floating-glass-bottom-nav button,
  .mobile-drawer-content button {
    min-height: 44px;
    min-width: 44px;
  }
}

/* 14.3. High-Contrast WCAG 2.1 AA Compliance Safeguards (>= 4.5:1) */
.text-high-contrast {
  color: #0F2545 !important;
}

.text-high-contrast-muted {
  color: #334155 !important; /* Slate-700 ensures AAA/AA legibility */
}

/* Elevate low-contrast text on bright backgrounds */
.bg-white .text-slate-400,
.bg-white .text-gray-400,
.clay-card .text-slate-400,
.clay-card .text-gray-400 {
  color: #475569 !important; /* Elevated to Slate-600 */
}

/* 14.4. 4-State UI Standards (Loading Skeleton, Empty State, Error State) */
.skeleton-shimmer {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmerWave 1.6s infinite linear;
  border-radius: 8px;
}

@keyframes shimmerWave {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.empty-state-formal {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  text-align: center;
  border: 1.5px dashed #cbd5e1;
  border-radius: 20px;
  background-color: #fafbfc;
}

.empty-state-formal h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #0B2545;
  margin-top: 0.75rem;
  margin-bottom: 0.25rem;
}

.empty-state-formal p {
  font-size: 0.8125rem;
  color: #475569;
  max-width: 380px;
  line-height: 1.5;
}

.error-state-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
  text-align: center;
  border: 1.5px solid #fecaca;
  border-radius: 20px;
  background-color: #fef2f2;
}

/* 14.5. Complete Native @media print Ready Engine */
@media print {
  /* 1. Global Reset for Physical Paper (A4 / F4 / Legal) */
  *, *::before, *::after {
    box-shadow: none !important;
    text-shadow: none !important;
    transition: none !important;
    animation: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  html, body {
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 10pt !important;
    line-height: 1.4 !important;
    overflow: visible !important;
  }

  /* 2. Hide Navigation, Bars, Modals & Interactive Chrome */
  #app-sidebar,
  #sidebar,
  #sidebar-backdrop,
  header,
  header.glass-topbar,
  .glass-topbar,
  #topbar,
  .floating-glass-bottom-nav,
  #floating-role-switcher,
  .floating-switcher,
  .ambient-aurora-canvas,
  .ambient-orb,
  .door-opening,
  .door-btn,
  #btn-header-bell,
  #notification-dropdown,
  button:not(.print-keep),
  .no-print,
  [data-no-print],
  .modal-backdrop,
  .floating-gradient-bar,
  #mobile-bottom-bar,
  .mobile-bottom-drawer,
  #toast-container,
  #app-toast,
  .app-toast {
    display: none !important;
    visibility: hidden !important;
  }

  /* 3. Main Viewport Expansion for Clean Paper Flow */
  #main-viewport,
  #main-content,
  .main-viewport,
  .pwa-viewport,
  .print-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    overflow: visible !important;
  }

  /* 4. Table Print Formatting & Multi-Page Pagination */
  table {
    width: 100% !important;
    border-collapse: collapse !important;
    page-break-inside: auto !important;
    break-inside: auto !important;
    margin-top: 8pt !important;
    margin-bottom: 12pt !important;
  }

  thead {
    display: table-header-group !important; /* Repeats table header on next page */
  }

  tfoot {
    display: table-footer-group !important;
  }

  tr {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  th, td {
    border: 1px solid #334155 !important;
    padding: 5pt 7pt !important;
    color: #000000 !important;
    font-size: 9pt !important;
  }

  th {
    background-color: #f1f5f9 !important;
    font-weight: 700 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* 5. Document Header (Kop Surat) & Signature Areas */
  .print-kop-surat {
    display: block !important;
    width: 100% !important;
    border-bottom: 2.5pt double #000000 !important;
    padding-bottom: 8pt !important;
    margin-bottom: 14pt !important;
  }

  .print-ttd-area {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    margin-top: 24pt !important;
    display: flex !important;
    justify-content: space-between !important;
    width: 100% !important;
  }

  /* 6. High Quality Barcode / QR Code Rendering */
  canvas, img {
    max-width: 100% !important;
    image-rendering: -webkit-optimize-contrast !important;
    image-rendering: crisp-edges !important;
  }

  /* 7. Page break utilities */
  .page-break-before {
    page-break-before: always !important;
    break-before: always !important;
  }

  .page-break-after {
    page-break-after: always !important;
    break-after: always !important;
  }
}




