/* AccuBooks v2.0 - Enhanced Styles */
/* ========== Print Styles (P5) ========== */
@media print {
  body { background: white !important; font-size: 11pt; }
  .no-print, header, nav, footer, .tab-btn, button, 
  #helperPanel, .helper-panel, 
  #tabNav, .fixed { display: none !important; }
  .print-only { display: block !important; }
  .tab-content { display: none !important; }
  .tab-content.active { display: block !important; }
  .print-area { break-inside: avoid; }
  main { padding: 0 !important; max-width: 100% !important; }
  table { border-collapse: collapse; width: 100%; font-size: 10pt; page-break-inside: auto; }
  table th, table td { border: 1px solid #333 !important; padding: 4px 6px !important; }
  table thead { display: table-header-group; }
  table tr { page-break-inside: avoid; page-break-after: auto; }
  .bg-gradient-to-br, .bg-blue-50, .bg-green-50, .bg-red-50, .bg-purple-50,
  .bg-amber-50, .bg-yellow-50, .bg-gray-50, .bg-gray-100, .bg-blue-100, 
  .bg-green-100, .bg-red-100 { background: white !important; color: black !important; }
  .shadow, .shadow-lg, .shadow-2xl { box-shadow: none !important; }
  .rounded-xl, .rounded-lg { border-radius: 0 !important; }
  h3 { font-size: 14pt; margin-bottom: 8px; }
  .print-header { display: block !important; text-align: center; margin-bottom: 20px; }
  .print-header h2 { font-size: 18pt; margin-bottom: 4px; }
  .print-header p { font-size: 10pt; color: #666; }
  @page { margin: 15mm; size: A4; }
}

/* ========== Onboarding overlay (P3) ========== */
.onboarding-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 100;
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.4s ease;
}
.onboarding-card {
  background: white; border-radius: 16px; padding: 32px; max-width: 520px; width: 90%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3); text-align: center;
  animation: slideUp 0.4s ease;
}
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ========== Empty state (P3) ========== */
.empty-state {
  text-align: center; padding: 40px 20px; color: #9ca3af;
}
.empty-state i { font-size: 48px; margin-bottom: 12px; display: block; }
.empty-state p { font-size: 14px; margin-top: 4px; }

/* ========== Toast animation ========== */
@keyframes toastIn { from { transform: translateX(100%); opacity:0; } to { transform:translateX(0); opacity:1; } }
@keyframes toastOut { from { opacity:1; } to { opacity:0; transform:translateY(-20px); } }
.toast-enter { animation: toastIn 0.3s ease; }
.toast-exit { animation: toastOut 0.3s ease forwards; }

/* ========== Scrollbar ========== */
.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

/* ========== Responsive improvements ========== */
@media (max-width: 640px) {
  .tab-btn { padding: 6px 10px !important; font-size: 12px !important; }
  .kpi-card p.text-xl { font-size: 16px !important; }
  table { font-size: 11px !important; }
  table th, table td { padding: 4px !important; }
}

/* ========== Progress bar ========== */
.progress-bar { transition: width 0.5s ease; }

/* ========== Number cell ========== */
.num-cell { font-variant-numeric: tabular-nums; }

/* ========== Tooltip (개선안 #9) ========== */
.tooltip-wrapper { position: relative; }
.tooltip-wrapper:hover .tooltip-box { display: block; }
.tooltip-box {
  display: none; position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
  background: #1f2937; color: white; padding: 6px 10px; border-radius: 6px;
  font-size: 12px; white-space: nowrap; z-index: 50; margin-bottom: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.tooltip-box::after {
  content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: #1f2937;
}
