/**
 * report/style.css
 * 
 * Mô tả: CSS tùy chỉnh cho trang Dashboard báo cáo thống kê hóa đơn Inbot.
 * Thiết kế Light Luxury Tech: Tinh tế, rõ ràng, tương phản cao, tối ưu scannability.
 */

:root {
  --bg-color: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-border: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --accent: #2563eb;
  --radius: 12px;
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #f8fafc !important;
  color: #0f172a !important;
}

.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.03);
  border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}
.animate-fade-in {
  animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* KPI Cards - Pure White, High Elevation Hover */
.kpi-card {
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  border: 1px solid #e2e8f0 !important;
  background: #ffffff !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04) !important;
}
.kpi-card:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 0 0 1px var(--border-color, #2563eb) !important;
  border-color: var(--border-color, #2563eb) !important;
}

/* Quick Date Preset Buttons */
.date-preset-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease-in-out;
}
.date-preset-btn:hover {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}
.date-preset-btn.active {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #2563eb !important;
  box-shadow: 0 1px 3px 0 rgba(37, 99, 235, 0.3) !important;
  font-weight: 600;
}

/* Input Fields */
input[type="date"], input[type="month"], select, input[type="text"] {
  transition: all 0.2s ease-in-out !important;
  border-radius: 6px !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
  font-size: 0.75rem !important;
  padding: 0.35rem 0.65rem !important;
}
input[type="date"]:focus, input[type="month"]:focus, select:focus, input[type="text"]:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
  outline: none !important;
}

/* Clean Table Rows */
table tbody tr {
  transition: background-color 0.15s ease;
  border-bottom: 1px solid #f1f5f9 !important;
}
table tbody tr:hover {
  background-color: #f8fafc !important;
}

.logo-area .icon { width: 100%; height: 100%; object-fit: contain; border-radius: 4px; }

/* Brand / Logo - Unified with Inbot.pro.vn */
.brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
}

.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: contain;
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.2);
}

.brand-name {
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #1e293b;
}

.brand-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #ffffff;
  border-radius: 4px;
  letter-spacing: 0.05em;
  line-height: 1.2;
}

/* Inbot Chat Widget V2 Upgrades */
.inbot-chat-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.inbot-chat-header-actions .header-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.inbot-chat-header-actions .header-btn:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.inbot-chat-header-actions .header-btn:active {
  transform: translateY(0);
}

#inbot-chat-window.maximized {
  width: 780px !important;
  height: 86vh !important;
  max-width: calc(100vw - 32px) !important;
  max-height: calc(100dvh - 32px) !important;
  bottom: 16px !important;
  right: 16px !important;
  border-radius: 20px !important;
  box-shadow: 0 30px 80px -15px rgba(15, 23, 42, 0.5), 0 0 0 1px rgba(99, 102, 241, 0.3) !important;
}

.inbot-action-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 6px 4px 2px 0;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  border: none;
  text-decoration: none;
  line-height: 1.3;
}

.inbot-action-chip:hover {
  transform: translateY(-1.5px) scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.inbot-action-chip:active {
  transform: translateY(0) scale(0.98);
}

.inbot-action-chip .chip-icon {
  font-size: 13px;
}

.inbot-action-chip.chip-gdt {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
}

.inbot-action-chip.chip-sync {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #ffffff;
}

.inbot-action-chip.chip-hkd {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: #ffffff;
}

.inbot-action-chip.chip-posio {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #ffffff;
}

.inbot-action-chip.chip-zalo {
  background: linear-gradient(135deg, #06b6d4, #0891b2);
  color: #ffffff;
}

.inbot-action-chip.chip-pricing {
  background: linear-gradient(135deg, #ec4899, #db2777);
  color: #ffffff;
}

.inbot-action-chip.chip-default {
  background: linear-gradient(135deg, #64748b, #475569);
  color: #ffffff;
}

.inbot-msg-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding-top: 5px;
  border-top: 1px dashed #e2e8f0;
}

.inbot-msg-btn {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11px;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all 0.15s ease;
}

.inbot-msg-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
  border-color: #cbd5e1;
}

.inbot-msg-btn.active-good {
  color: #16a34a !important;
  background: #dcfce7 !important;
  border-color: #86efac !important;
}

.inbot-msg-btn.active-bad {
  color: #dc2626 !important;
  background: #fee2e2 !important;
  border-color: #fca5a5 !important;
}

@media (max-width: 640px) {
  #inbot-chat-window {
    width: 100vw !important;
    height: 100dvh !important;
    max-width: 100vw !important;
    max-height: 100dvh !important;
    bottom: 0 !important;
    right: 0 !important;
    border-radius: 0 !important;
  }
}

/* Invoice Context Menu */
#invoice-context-menu {
  box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(226, 232, 240, 0.9);
}
#invoice-context-menu button:active {
  background-color: #e2e8f0;
}

/* Print Styles for TT88 Sổ Kế Toán */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  header, #sidebar, #mobile-overlay, #gdt-warning-banner, #expired-banner,
  section, #so-tabs-switcher, #btn-export-s3-excel, #btn-print-s3,
  #invoice-context-menu, #inbot-chat-window, #inbot-chat-fab {
    display: none !important;
  }
  main {
    overflow: visible !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  #so-ke-toan-container {
    display: block !important;
    border: none !important;
    box-shadow: none !important;
    overflow: visible !important;
    height: auto !important;
  }
  #so-printable-area {
    overflow: visible !important;
    padding: 0 !important;
    background: transparent !important;
  }
  #so-printable-area > div {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    max-width: 100% !important;
  }
  #s3-table {
    font-size: 10px !important;
    border-color: #000000 !important;
  }
  #s3-table th, #s3-table td {
    border-color: #000000 !important;
    padding: 4px 6px !important;
  }
}



