/**
 * MyPACS V2 - Design System Main Entry
 * Professional CSS Architecture
 * 
 * Import Order:
 * 1. Variables (Design Tokens)
 * 2. Components (UI Elements)
 * 3. Layout (Grid & Utilities)
 */

@import '01-variables.css';
@import '02-components.css';
@import '03-layout.css';

/* ============================================
   BASE STYLES & RESET
   ============================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-sans);
  font-size: var(--text-base);
  line-height: var(--line-height-normal);
  color: var(--theme-text-primary);
  background: var(--theme-bg-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Remove default list styles */
ul,
ol {
  list-style: none;
}

/* Remove default anchor styles */
a {
  color: inherit;
  text-decoration: none;
}

/* Remove default button styles */
button {
  font-family: inherit;
  cursor: pointer;
}

/* Remove default input styles */
input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}

/* Image defaults */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Selection color */
::selection {
  background: var(--color-primary-500);
  color: white;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--theme-bg-tertiary);
}

::-webkit-scrollbar-thumb {
  background: var(--theme-border-strong);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--theme-text-tertiary);
}

/* Focus visible for accessibility */
:focus-visible {
  outline: 2px solid var(--color-primary-500);
  outline-offset: 2px;
}

/* Disable transitions for users who prefer reduced motion */
@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;
  }
}

/* Safe area insets for notched devices */
@supports (padding: max(0px)) {
  .safe-area-inset-top {
    padding-top: max(var(--space-4), env(safe-area-inset-top));
  }
  
  .safe-area-inset-bottom {
    padding-bottom: max(var(--space-4), env(safe-area-inset-bottom));
  }
}
