/* ================================
   K8设计系统 - CSS重置
   ================================ */

/* Box sizing reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Remove default margin and padding */
* {
  margin: 0;
  padding: 0;
}

/* HTML and body defaults */
html {
  line-height: 1.15;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

body {
  font-family: var(--k8-font-family);
  font-size: var(--k8-font-size);
  line-height: var(--k8-line-height);
  color: var(--k8-text-primary);
  background-color: var(--k8-bg-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Improve media defaults */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Remove default form element styling */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

/* Remove default button styling */
button {
  background: none;
  border: none;
  cursor: pointer;
}

/* Remove default list styling */
ul,
ol {
  list-style: none;
}

/* Remove default link styling */
a {
  color: inherit;
  text-decoration: none;
}

/* Table reset */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* Form element improvements */
input,
textarea,
select {
  border: 1px solid var(--k8-border);
  padding: 8px 12px;
  outline: none;
  transition: border-color var(--k8-transition-fast);
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--k8-primary);
}

/* Fieldset and legend improvements */
fieldset {
  border: 1px solid var(--k8-border);
  padding: var(--k8-space-4);
  margin: var(--k8-space-3) 0;
}

legend {
  padding: 0 var(--k8-space-2);
  font-weight: 600;
  color: var(--k8-text-primary);
}

/* Hidden attribute support */
[hidden] {
  display: none !important;
}

/* Screen reader only class */
.k8-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip link for accessibility */
.k8-skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--k8-primary);
  color: var(--k8-white);
  padding: 8px;
  text-decoration: none;
  z-index: var(--k8-z-tooltip);
  transition: top var(--k8-transition-fast);
}

.k8-skip-link:focus {
  top: 6px;
}

/* Print styles */
@media print {
  *,
  *::before,
  *::after {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  
  a,
  a:visited {
    text-decoration: underline;
  }
  
  img {
    page-break-inside: avoid;
  }
  
  h2,
  h3,
  p {
    orphans: 3;
    widows: 3;
  }
  
  h2,
  h3 {
    page-break-after: avoid;
  }
} 