/* ============================================
   HR智能助手 - 专业商务风格
   主色: 深蓝 #1a365d | 金色 #d4a843
   ============================================ */

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #1a365d;
  --primary-light: #2a4a7f;
  --primary-dark: #0f2340;
  --accent: #d4a843;
  --accent-light: #e8c876;
  --accent-dark: #b8922e;
  --bg: #f7f8fc;
  --bg-card: #ffffff;
  --text: #2d3748;
  --text-light: #718096;
  --text-muted: #a0aec0;
  --border: #e2e8f0;
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: all 0.3s ease;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  box-shadow: 0 2px 20px rgba(26,54,93,0.3);
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 24px;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ffffff !important;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.25rem;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.nav { display: flex; gap: 4px; }

.nav-link {
  color: #ffffff !important;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  background: none;
  border: none;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.nav-link:hover {
  color: #ffffff !important;
  background: rgba(255,255,255,0.18);
}

.nav-link.active {
  background: rgba(212,168,67,0.3);
  color: #ffe8a8 !important;
  font-weight: 600;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
}

/* Main Content */
.main { margin-top: 64px; padding: 32px 24px; min-height: calc(100vh - 64px); }

.container { max-width: 1200px; margin: 0 auto; }

/* Pages */
.page { display: none; animation: fadeIn 0.4s ease; }
.page.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, #3b5998 100%);
  border-radius: 20px;
  padding: 36px 48px 28px;
  color: #fff;
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(212,168,67,0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
  border-radius: 50%;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.hero h1 span { color: var(--accent-light); }

.hero p {
  font-size: 0.92rem;
  opacity: 0.9;
  max-width: 860px;
  margin: 0 auto 24px;
  position: relative;
  z-index: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  position: relative;
  z-index: 1;
}

.hero-stat { text-align: center; }

.hero-stat .num {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent-light);
  display: block;
}

.hero-stat .label {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-top: 4px;
}

/* Home CTA */
.home-cta {
  background: linear-gradient(135deg, #1a365d 0%, #1f4980 100%);
  border-radius: 16px;
  padding: 32px;
  margin-top: 40px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(26, 54, 93, 0.25);
}

.home-cta h3 {
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.home-cta p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.home-cta button {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 24px;
  padding: 12px 40px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(212, 168, 67, 0.3);
}

.home-cta button:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 168, 67, 0.4);
}

.home-cta .cta-intro {
  text-align: left;
  margin: 20px 0;
}
.home-cta .cta-intro p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 10px;
}
.home-cta .cta-intro p strong {
  color: #fff;
  font-size: 1rem;
}

.home-cta .cta-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin: 20px 0;
  padding: 16px 0;
  border-top: 1px solid rgba(255,255,255,0.15);
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.home-cta .cta-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 70px;
}
.home-cta .cta-stat-num {
  color: #d4a843;
  font-size: 1.5rem;
  font-weight: 700;
}
.home-cta .cta-stat-label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
  margin-top: 4px;
}

.home-cta .cta-details {
  text-align: left;
  margin: 16px 0 24px;
}
.home-cta .cta-details p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 6px;
}
.home-cta .cta-details p strong {
  color: #fff;
}

/* Feature Cards */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 32px;
}

.feature-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--border);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.feature-card .icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
  display: block;
}

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.5;
}

/* Category Cards */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.category-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  cursor: pointer;
  border: 1px solid var(--border);
  position: relative;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.category-card .cat-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  display: block;
}

.category-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
}

.category-card .cat-count {
  font-size: 0.9rem;
  color: var(--accent-dark);
  font-weight: 600;
  display: block;
  margin-bottom: 8px;
}

.category-card .cat-desc {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.5;
}

/* Section Titles */
.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 28px;
  background: var(--accent);
  border-radius: 2px;
}

/* Chat / Q&A Page */
.chat-container {
  max-width: 800px;
  margin: 0 auto;
}

.chat-header {
  background: var(--bg-card);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 20px 24px;
  border-bottom: 2px solid var(--accent);
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-header h2 {
  font-size: 1.2rem;
  color: var(--primary);
}

.chat-header .badge {
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  padding: 2px 10px;
  border-radius: 20px;
  font-weight: 600;
}

.chat-messages {
  background: var(--bg-card);
  min-height: 180px;
  max-height: 260px;
  overflow-y: auto;
  padding: 20px 24px;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

.message {
  margin-bottom: 20px;
  display: flex;
  gap: 12px;
  animation: fadeIn 0.3s ease;
}

.message.user { flex-direction: row-reverse; }

.message .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.message.bot .avatar {
  background: var(--primary);
  color: #fff;
}

.message.user .avatar {
  background: var(--accent);
  color: #fff;
}

.message .bubble {
  max-width: 75%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.7;
}

.message.bot .bubble {
  background: #f0f4ff;
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.message.user .bubble {
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.message .bubble .source-tag {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--accent-dark);
  background: rgba(212,168,67,0.1);
  padding: 2px 8px;
  border-radius: 4px;
}

.message .bubble .compliance-warn {
  margin-top: 8px;
  padding: 8px 12px;
  background: #fff3cd;
  border-left: 3px solid #ffc107;
  border-radius: 4px;
  font-size: 0.8rem;
  color: #856404;
}

.chat-input-area {
  background: var(--bg-card);
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
  align-items: center;
}

.chat-input {
  flex: 1;
  border: 2px solid var(--border);
  border-radius: 24px;
  padding: 12px 20px;
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
  font-family: inherit;
}

.chat-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,54,93,0.1);
}

.chat-send {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: var(--transition);
  flex-shrink: 0;
}

.chat-send:hover { background: var(--primary-light); transform: scale(1.05); }

.quick-questions {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.quick-q {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 0.8rem;
  color: var(--text-light);
  cursor: pointer;
  transition: var(--transition);
}

.quick-q:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
  background: rgba(212,168,67,0.05);
}

/* Browse Page */
.browse-toolbar {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  align-items: center;
}

.search-box {
  flex: 1;
  min-width: 250px;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 12px 20px 12px 44px;
  border: 2px solid var(--border);
  border-radius: 24px;
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
  background: var(--bg-card);
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,54,93,0.1);
}

.search-box .search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.1rem;
}

.filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 8px 16px;
  border: 2px solid var(--border);
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--text-light);
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg-card);
  font-weight: 500;
}

.filter-tab:hover { border-color: var(--accent); color: var(--accent-dark); }
.filter-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.file-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.file-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid var(--border);
  cursor: pointer;
}

.file-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.file-download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a365d, #2d4a7a);
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  flex-shrink: 0;
  align-self: center;
}
.file-preview-btn {
  filter: brightness(0) invert(1);
}

.file-download-btn:hover {
  transform: scale(1.15);
  box-shadow: 0 2px 8px rgba(26,54,93,0.4);
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26,54,93,0.4);
}

.file-card .file-num {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.file-card .file-info { flex: 1; }

.file-card .file-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 2px;
}

.file-card .file-scene {
  font-size: 0.72rem;
  color: var(--text-light);
  margin-bottom: 6px;
}

.file-card .file-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.file-card .tag {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 4px;
  background: #edf2f7;
  color: var(--text-light);
}

.file-card .format-tag {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.format-docx { background: #dbeafe; color: #1d4ed8; }
.format-xlsx { background: #dcfce7; color: #15803d; }
.format-xls { background: #dcfce7; color: #15803d; }
.format-doc { background: #fef3c7; color: #b45309; }
.format-md { background: #ede9fe; color: #6d28d9; }

/* File Detail Modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay.active { display: flex; }

.modal {
  background: var(--bg-card);
  border-radius: var(--radius);
  max-width: 700px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  padding: 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 1.2rem;
  color: var(--primary);
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #f1f5f9;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close:hover { background: #e2e8f0; }

.modal-body { padding: 24px; }

.modal-body .detail-section { margin-bottom: 20px; }

.modal-body .detail-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.modal-body .detail-content {
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--text);
}

.modal-body .keywords-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.modal-body .kw-tag {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 6px;
  background: #edf2f7;
  color: var(--text-light);
}

/* About Page */
.about-section {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.about-section h2 {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.about-section p {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 16px;
}

.about-section ul {
  padding-left: 20px;
  margin-bottom: 16px;
}

.about-section li {
  font-size: 0.9rem;
  line-height: 2;
  color: var(--text);
}

.disclaimer {
  background: #fff8e1;
  border-left: 4px solid var(--accent);
  padding: 20px 24px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-top: 24px;
}

.disclaimer h4 {
  color: var(--accent-dark);
  margin-bottom: 8px;
}

.disclaimer p {
  font-size: 0.85rem;
  color: #6d5a00;
  margin-bottom: 0;
}

/* Compliance Banner */
.compliance-banner {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 32px;
  border: 1px solid #f59e0b;
}

.compliance-banner h3 {
  color: #92400e;
  font-size: 1rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.compliance-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.compliance-item {
  background: rgba(255,255,255,0.7);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.8rem;
}

.compliance-item .level-high { color: #dc2626; font-weight: 700; }
.compliance-item .level-medium { color: #d97706; font-weight: 700; }
.compliance-item strong { display: block; margin-bottom: 4px; color: var(--text); }

/* Footer */
.footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.6);
  text-align: center;
  padding: 24px;
  font-size: 0.8rem;
}

.footer a { color: var(--accent-light); text-decoration: none; }

/* Empty State */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state .empty-icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state p { font-size: 0.95rem; }

/* Typing indicator */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 8px 12px;
  align-items: center;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-8px); opacity: 1; }
}

/* Results count */
.results-info {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-left: 4px;
}

/* Responsive */
@media (max-width: 768px) {
  .header { padding: 0 16px; }
  
  .nav { 
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--primary);
    flex-direction: column;
    padding: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  }
  
  .nav.open { display: flex; }
  
  .mobile-toggle { display: block; }
  
  .main { padding: 20px 16px; }
  
  .hero { padding: 40px 24px; }
  .hero h1 { font-size: 1.8rem; }
  .hero p { font-size: 1rem; }
  .hero-stats { gap: 24px; }
  .hero-stat .num { font-size: 1.8rem; }
  
  .features-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  
  .feature-card { padding: 20px 16px; }
  .feature-card .icon { font-size: 2rem; }
  
  .categories-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .category-card { padding: 12px; }
  
  .browse-toolbar { flex-direction: column; }
  .search-box { min-width: 100%; }
  
  .file-list { grid-template-columns: 1fr; }
  .file-card { flex-direction: column; gap: 12px; }
  
  .chat-messages { min-height: 300px; max-height: 400px; }
  
  .message .bubble { max-width: 85%; }
  
  .about-section { padding: 24px; }
  
  .modal { margin: 16px; max-height: 90vh; }
  
  .compliance-list { grid-template-columns: 1fr; }
  
  .quick-questions { gap: 6px; }
  .quick-q { font-size: 0.75rem; padding: 6px 12px; }
}

@media (max-width: 480px) {
  .features-grid { grid-template-columns: 1fr; }
  .categories-grid { grid-template-columns: 1fr; }
  .hero-stats { flex-direction: column; gap: 16px; }
  .filter-tabs { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 8px; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e0; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #a0aec0; }

/* Print */
@media print {
  .header, .footer, .chat-input-area, .quick-questions { display: none; }
  .main { margin-top: 0; }
  .page { display: block !important; }
}

/* ============================================
   LOGO & Company Styles
   ============================================ */

.logo-img {
  height: 36px;
  width: auto;
  object-fit: contain;
}

/* Company Section */
.company-section {
  margin: 48px 0 0;
  padding: 32px;
  background: linear-gradient(135deg, #f0f4ff 0%, #fafbff 100%);
  border-radius: var(--radius);
  border: 1px solid #e8ecf4;
}

.company-inner {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.company-logo-wrapper {
  flex-shrink: 0;
}

.company-logo {
  width: 100px;
  height: auto;
  object-fit: contain;
}

.company-text h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.company-slogan {
  font-size: 0.85rem;
  color: var(--accent-dark);
  font-weight: 600;
  font-style: italic;
  margin-bottom: 12px;
}

.company-text p {
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 8px;
}

.company-highlights {
  display: flex;
  gap: 24px;
  margin-top: 16px;
}

.highlight-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.highlight-num {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
}

.highlight-label {
  font-size: 0.72rem;
  color: var(--text-light);
  margin-top: 2px;
}

/* Footer */
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-logo {
  height: 32px;
  width: auto;
  object-fit: contain;
  opacity: 0.9;
}

.footer-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.75rem;
  color: var(--text-light);
}

.footer-text strong {
  font-size: 0.82rem;
  color: var(--text);
}

.footer-copy {
  text-align: right;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.footer-copy p {
  margin-bottom: 3px;
}

/* Responsive */
@media (max-width: 768px) {
  .company-inner {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }
  .company-logo {
    width: 80px;
  }
  .company-highlights {
    justify-content: center;
  }
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
  .footer-brand {
    flex-direction: column;
    gap: 10px;
  }
  .footer-text {
    align-items: center;
  }
  .footer-copy {
    text-align: center;
  }
}

/* ============================================
   Company Page Styles
   ============================================ */

/* Value Proposition */
.value-proposition {
  text-align: center;
  padding: 20px 0 30px;
}

.value-proposition h1 {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 12px;
  font-weight: 700;
}

.value-subtitle {
  font-size: 1.05rem;
  color: var(--accent-dark);
  font-weight: 600;
  margin-bottom: 16px;
}

.value-desc {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.8;
  max-width: 720px;
  margin: 0 auto 28px;
}

.value-highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 720px;
  margin: 0 auto;
}

.value-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 18px;
  text-align: center;
  transition: var(--transition);
}

.value-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.value-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 10px;
}

.value-item strong {
  display: block;
  font-size: 1.05rem;
  color: var(--primary);
  margin-bottom: 8px;
}

.value-item p {
  font-size: 0.82rem;
  color: var(--text-light);
  line-height: 1.6;
  margin: 0;
}

.company-header {
  text-align: center;
  padding: 20px 0 30px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 32px;
}

.company-header-logo {
  height: 64px;
  object-fit: contain;
  margin-bottom: 16px;
}

.company-header h1 {
  font-size: 1.6rem;
  color: var(--primary);
  margin-bottom: 8px;
}

.company-header-slogan {
  font-size: 0.95rem;
  color: var(--accent-dark);
  font-weight: 600;
  line-height: 1.6;
}

.company-intro-content p {
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 10px;
}

/* Methodology */
.methodology-section p {
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 10px;
}

.model-chain {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 20px 0;
  padding: 20px;
  background: linear-gradient(135deg, #f0f4ff 0%, #fafbff 100%);
  border-radius: 12px;
}

.model-step {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--primary);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
}

.step-num {
  background: var(--accent);
  color: var(--primary-dark);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
}

.step-text small {
  font-weight: 400;
  opacity: 0.8;
  font-size: 0.7rem;
}

.model-arrow {
  font-size: 1.2rem;
  color: var(--accent);
  font-weight: 700;
}

/* Implementation Grid */
.implementation-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 20px 0;
}

.impl-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 14px;
  text-align: center;
  transition: var(--transition);
}

.impl-step:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.impl-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.impl-step h4 {
  font-size: 0.88rem;
  color: var(--primary);
  margin-bottom: 6px;
}

.impl-step p {
  font-size: 0.76rem;
  color: var(--text-light);
  line-height: 1.5;
  margin-bottom: 8px;
}

.impl-tag {
  display: inline-block;
  background: rgba(26,54,93,0.08);
  color: var(--primary);
  font-size: 0.65rem;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 500;
}

/* Product Cards */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.product-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border);
}

.product-icon {
  font-size: 2.2rem;
}

.product-header h3 {
  font-size: 1.2rem;
  color: var(--primary);
  margin: 0;
}

.product-subtitle {
  font-size: 0.82rem;
  color: var(--accent-dark);
  font-weight: 500;
  margin: 4px 0 0;
}

.product-card > p {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 16px;
}

.product-table-wrapper {
  overflow-x: auto;
}

.product-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.product-table thead th {
  background: var(--primary);
  color: #ffffff;
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 0.78rem;
  border: none;
}

.product-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: top;
  font-size: 0.78rem;
  line-height: 1.5;
}

.product-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

.product-table tbody tr:hover {
  background: #eef2ff;
}

/* Client Logo Grid */
.client-logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 16px;
  margin: 16px 0;
}

.client-logo-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 10px 12px;
  text-align: center;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 130px;
}

.client-logo-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--primary);
}

.client-logo-item img {
  max-width: 90px;
  max-height: 55px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto 8px;
}

.client-logo-item span {
  display: block;
  font-size: 0.75rem;
  color: var(--text-light);
  font-weight: 500;
  margin-top: auto;
}

/* Legacy Client Grid (keep for backward compat) */
.client-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.client-tag {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.82rem;
  color: var(--text);
  font-weight: 500;
  transition: var(--transition);
}

.client-tag:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Contact Section */
.contact-section {
  margin: 20px 0;
}

.contact-card {
  background: linear-gradient(135deg, #f0f4ff 0%, #fafbff 100%);
  border: 1px solid #dde4f0;
  border-radius: 12px;
  padding: 28px;
}

.contact-person {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.contact-icon {
  font-size: 2.5rem;
}

.contact-person strong {
  font-size: 1.1rem;
  color: var(--primary);
}

.contact-person p {
  font-size: 0.82rem;
  color: var(--text-light);
  margin: 4px 0 0;
}

.contact-info {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.contact-value {
  font-size: 1rem;
  color: var(--text);
  font-weight: 600;
}

/* Responsive for company page */
@media (max-width: 768px) {
  .value-highlights {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .value-proposition h1 {
    font-size: 1.5rem;
  }
  .implementation-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .model-chain {
    flex-direction: column;
    align-items: stretch;
  }
  .model-arrow {
    text-align: center;
    transform: rotate(90deg);
  }
  .product-table {
    font-size: 0.72rem;
  }
  .contact-info {
    flex-direction: column;
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .implementation-grid {
    grid-template-columns: 1fr;
  }
}


/* ============================================ */
/* Company Name Replace Modal                   */
/* ============================================ */
.company-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.2s ease;
}

.company-modal {
  background: #fff;
  border-radius: 16px;
  width: 90%;
  max-width: 480px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  overflow: hidden;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.company-modal-header {
  background: linear-gradient(135deg, #1a365d, #2d4a7a);
  color: #fff;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.company-modal-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.company-modal-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
  padding: 0;
  line-height: 1;
}

.company-modal-close:hover {
  opacity: 1;
}

.company-modal-body {
  padding: 24px;
}

.company-modal-desc {
  color: #4a5568;
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0 0 20px 0;
}

.company-modal-field {
  margin-bottom: 16px;
}

.company-modal-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 8px;
}

.company-modal-field input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.company-modal-field input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.company-modal-info {
  background: #f7fafc;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.82rem;
  color: #718096;
  line-height: 1.5;
}

.company-modal-info strong {
  color: #2d3748;
}

.company-modal-footer {
  padding: 16px 24px 24px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.company-modal-footer .btn-secondary {
  background: #e2e8f0;
  color: #4a5568;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s;
}

.company-modal-footer .btn-secondary:hover {
  background: #cbd5e0;
}

.company-modal-footer .btn-primary {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.company-modal-footer .btn-primary:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  transform: translateY(-1px);
}

.company-modal-footer .btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Dual Answer Styles */
.answer-section { padding: 8px 0; }
.answer-label { font-weight: 700; font-size: 0.95rem; margin-bottom: 6px; padding: 4px 12px; border-radius: 4px; display: inline-block; }
.answer-label.policy-label { background: #dbeafe; color: #1e40af; }
.answer-label.law-label { background: #ede9fe; color: #5b21b6; }
.answer-divider { height: 1px; background: linear-gradient(to right, transparent, #e5e7eb, transparent); margin: 12px 0; }