/* ==============================================================================
   HOÀNG PHÚC OTP STATION - ENTERPRISE DESIGN TOKENS & RESPONSIVE ARCHITECTURE
   ============================================================================== */

:root {
  /* Dynamic Viewport & Safe Areas */
  --app-height: 100dvh;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);

  /* Modern OKLCH Palette Semantics */
  --color-primary: #2563eb;
  --color-primary-hover: #1d4ed8;
  --color-primary-subtle: #eff6ff;
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --color-surface: #ffffff;
  --color-canvas: #f8fafc;
  --color-border: #e2e8f0;

  /* Layered Natural Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.04);

  /* Motion Timing */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Core utilities */
.hidden {
  display: none !important;
}

.mono {
  font-family: 'JetBrains Mono', monospace;
  font-feature-settings: "tnum" 1, "zero" 1;
}

/* Responsive Touch Target Enforcement on Touch / Mobile */
@media (max-width: 768px) {
  button, select, input, .touch-target {
    min-height: 44px;
  }
}

/* Sidebar Responsive Transitions */
.sidebar-open {
  transform: translateX(0);
}
.sidebar-closed {
  transform: translateX(-100%);
}
@media (min-width: 768px) {
  .sidebar-closed {
    transform: translateX(0);
  }
}

.sidebar-btn {
  color: #64748b;
  background: transparent;
  transition: all 0.2s var(--ease-smooth);
}
.sidebar-btn:hover {
  color: #0f172a;
  background: #f1f5f9;
}
.sidebar-btn.active {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
}

/* Micro-interaction & Tactile Feedback */
.btn-effect {
  transition: transform 0.15s var(--ease-smooth), background-color 0.15s ease, box-shadow 0.15s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.btn-effect:active {
  transform: scale(0.96);
}

/* Skeleton Loading Shimmer Animation */
.skeleton-shimmer {
  background: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 50%, #f1f5f9 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Custom Scrollbars */
.custom-scroll::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.custom-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.custom-scroll::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
.custom-scroll::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

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

/* Bottom Safe Area for Mobile Devices */
.safe-bottom-pad {
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
}
