/* 有据 - Warm Editorial Light Theme */
/* System font stacks only: no external font requests (Google Fonts is slow/blocked in mainland China) */

[v-cloak] { display: none; }

:root {
  --bg-warm: #faf8f5;
  --card-bg: #ffffff;
  --border-warm: #eae6df;
  --border-warm-hover: #d6cfc4;
  --text-main: #1c1917;
  --text-muted: #57534e;
  --text-dim: #78716c;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background-color: var(--bg-warm);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

code, .font-mono {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

button, a {
  -webkit-tap-highlight-color: transparent;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f5f2eb;
}
::-webkit-scrollbar-thumb {
  background: #d6cfc4;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #a8a29e;
}

/* Glassmorphism & Panel Styling */
.glass-panel {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-warm);
  box-shadow: 0 4px 20px -2px rgba(60, 50, 40, 0.04);
}

.glass-card {
  background: var(--card-bg);
  border: 1px solid var(--border-warm);
  box-shadow: 0 2px 8px -2px rgba(60, 50, 40, 0.03), 0 1px 2px -1px rgba(60, 50, 40, 0.02);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
  border-color: #f59e0b;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -6px rgba(80, 60, 40, 0.09), 0 4px 8px -2px rgba(80, 60, 40, 0.03);
}

/* Smooth fade in */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.22s ease-out forwards;
}

/* ===================================================
   Print Optimization Styles (Direction 3: A4 Protocol)
   =================================================== */
.print-only {
  display: none !important;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 1.2cm 1cm 1.2cm 1cm;
  }

  html, body {
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #1c1917 !important;
    font-size: 10.5pt !important;
    line-height: 1.35 !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Hide interactive web UI */
  header,
  nav,
  footer,
  #globalFilters,
  button,
  select,
  .no-print {
    display: none !important;
  }

  /* Reveal dedicated print clinical sheet */
  .print-only {
    display: block !important;
  }

  /* Full-width container reset */
  main,
  .max-w-7xl,
  .print-protocol-sheet {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Strip shadows & glass effects for crisp paper printing */
  * {
    box-shadow: none !important;
    text-shadow: none !important;
  }

  .glass-card,
  .glass-panel {
    background: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid #d6d3d1 !important;
  }

  /* Prevent awkward page cuts */
  .break-inside-avoid,
  tr,
  .glass-card {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  a {
    color: inherit !important;
    text-decoration: none !important;
  }
}
