:root {
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-900: #111827;
  --primary-100: #dcfce7;
  --primary-500: #009a44;
  --primary-600: #008a3d;
  --primary-700: #007a35;
  --danger-500: #dc2626;
  --warn-500: #d97706;
  --info-500: #2563eb;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.1);
  --radius-xl: 16px;
  --radius-lg: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, "Microsoft YaHei", sans-serif;
  color: var(--gray-900);
  background: var(--gray-100);
}

html.embed-mode,
body.embed-mode {
  overflow: hidden !important;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body.embed-mode {
  background: var(--gray-100);
}

html.embed-mode::-webkit-scrollbar,
body.embed-mode::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.hidden {
  display: none !important;
}

.hero {
  background: linear-gradient(135deg, #005a26 0%, #006a2e 55%, #111827 100%);
}

.hero-inner {
  padding: 64px 0 76px;
}

.hero-title {
  margin: 0;
  text-align: center;
  color: #fff;
  font-size: clamp(38px, 5vw, 56px);
  line-height: 1.12;
  font-weight: 700;
}

.hero-subtitle {
  margin: 12px 0 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

.search-shell {
  margin-top: 28px;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr 124px;
  gap: 12px;
}

.search-input-wrap {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  width: 20px;
  height: 20px;
}

.search-icon svg {
  width: 100%;
  height: 100%;
}

.search-input {
  width: 100%;
  height: 58px;
  border: 0;
  border-radius: 14px;
  padding: 0 14px 0 46px;
  font-size: 18px;
  color: #111827;
  background: #fff;
}

.search-input::placeholder {
  color: #a5b4c8;
}

.search-input:focus {
  outline: 2px solid rgba(255, 255, 255, 0.4);
}

.btn {
  border: 0;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: 0.2s ease;
  font-weight: 600;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-search {
  height: 58px;
  background: var(--primary-500);
  color: #fff;
  font-size: 18px;
}

.btn-search:hover {
  background: var(--primary-600);
}

.search-meta-row {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.hot-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.hot-label {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
}

.hot-chip {
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 14px;
  cursor: pointer;
}

.hot-chip:hover {
  background: rgba(255, 255, 255, 0.17);
}

.feedback-chip {
  border: 0;
  border-radius: 999px;
  background: #d49d09;
  color: #fff;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.feedback-chip:hover {
  background: #bb8c07;
}

.page-main {
  padding: 48px 0 82px;
}

.state-box {
  margin-bottom: 24px;
}

.intro-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-bottom: 22px;
}

.intro-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  padding: 22px;
}

.intro-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  font-size: 28px;
  font-weight: 700;
  color: #2563eb;
  background: #dbeafe;
}

.step-green {
  color: #0f9c4a;
  background: #d1fae5;
}

.step-amber {
  color: #d97706;
  background: #fef3c7;
}

.intro-card h3 {
  margin: 16px 0 10px;
  font-size: 20px;
  line-height: 1.25;
}

.intro-card p {
  margin: 0;
  color: var(--gray-700);
  font-size: 14px;
  line-height: 1.55;
}

.brand-panel {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  padding: 22px;
}

.brand-panel h3 {
  margin: 0 0 14px;
  font-size: 20px;
}

.brand-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.brand-pill {
  display: inline-block;
  border-radius: 999px;
  background: var(--gray-100);
  color: #374151;
  font-size: 14px;
  padding: 8px 13px;
}

.support-strip {
  background: var(--gray-900);
  border-radius: var(--radius-xl);
  color: #fff;
  padding: 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.support-strip h2 {
  margin: 0 0 8px;
  font-size: 30px;
}

.support-strip p {
  margin: 0;
  color: #cbd5e1;
  font-size: 16px;
}

.support-actions {
  display: flex;
  gap: 10px;
}

.support-actions a {
  text-decoration: none;
}

.btn-phone {
  background: var(--primary-500);
  color: #fff;
  font-size: 16px;
  padding: 12px 16px;
}

.btn-phone:hover {
  background: var(--primary-600);
}

.btn-outline {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-size: 16px;
  padding: 12px 16px;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
}

.result-head {
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.search-message {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
}

.btn-export {
  background: var(--primary-100);
  color: #166534;
  font-size: 14px;
  padding: 9px 13px;
}

.btn-export:hover {
  background: #bbf7d0;
}

.brand-filters {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.filter-label {
  align-self: center;
  color: var(--gray-500);
  font-size: 14px;
}

.filter-btn {
  border: 0;
  border-radius: 999px;
  background: var(--gray-100);
  color: #374151;
  padding: 7px 12px;
  font-size: 14px;
  cursor: pointer;
}

.filter-btn.active {
  background: var(--primary-500);
  color: #fff;
}

.result-table-wrap {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 12px;
}

.result-table-title {
  background: #f0fdf4;
  border-left: 4px solid var(--primary-500);
  color: #14532d;
  font-size: 16px;
  font-weight: 700;
  padding: 12px 14px;
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

th,
td {
  font-size: 14px;
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #f1f5f9;
}

th {
  background: #f8fafc;
}

tbody tr:hover td {
  background: #f9fafb;
}

.brand-tag {
  display: inline-block;
  background: var(--gray-100);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
}

.status-tag {
  display: inline-block;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
}

.status-ina {
  background: var(--info-500);
}

.status-ok {
  background: var(--primary-500);
}

.status-restrict {
  background: var(--warn-500);
}

.status-no {
  background: var(--danger-500);
}

.status-empty {
  background: #9ca3af;
}

.important-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  font-size: 14px;
  line-height: 1;
}

.empty-result {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  padding: 18px;
  color: var(--gray-500);
  font-size: 16px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
}

.modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.modal-card {
  position: relative;
  margin: 10vh auto 0;
  width: min(500px, 92vw);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-md);
}

.modal-head {
  background: linear-gradient(90deg, var(--primary-600), var(--primary-700));
  color: #fff;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-head h3 {
  margin: 0;
  font-size: 20px;
}

.modal-head button {
  border: 0;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  cursor: pointer;
}

.modal-body {
  padding: 18px;
}

.modal-body p {
  margin: 0 0 13px;
  color: var(--gray-700);
  font-size: 14px;
}

.form-label {
  display: block;
  margin: 0 0 7px;
  font-size: 14px;
  font-weight: 600;
}

.form-label span {
  color: #ef4444;
}

.form-input,
.form-textarea {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 14px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.form-input:focus,
.form-textarea:focus {
  outline: 2px solid rgba(0, 154, 68, 0.2);
  border-color: var(--primary-500);
}

.feedback-error {
  margin: 0 0 10px;
  color: var(--danger-500);
  font-size: 13px;
}

.btn-submit {
  width: 100%;
  height: 44px;
  background: var(--primary-500);
  color: #fff;
  font-size: 16px;
}

.btn-submit:hover {
  background: var(--primary-600);
}

.ai-bubble {
  position: fixed;
  right: 22px;
  bottom: 92px;
  width: 280px;
  padding: 13px 14px;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  font-size: 14px;
  color: var(--gray-700);
  z-index: 88;
}

.bubble-close {
  position: absolute;
  right: 8px;
  top: 8px;
  border: 0;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--gray-100);
  cursor: pointer;
  color: var(--gray-500);
}

.ai-open-btn {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 999px;
  background: var(--primary-500);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(0, 92, 38, 0.35);
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-open-btn svg {
  width: 24px;
  height: 24px;
}

.ai-open-btn:hover {
  background: var(--primary-600);
}

.ai-panel {
  position: fixed;
  right: 24px;
  bottom: 94px;
  width: min(392px, 92vw);
  height: 600px;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  z-index: 95;
  display: flex;
  flex-direction: column;
}

.ai-head {
  background: linear-gradient(90deg, var(--primary-600), var(--primary-700));
  color: #fff;
  padding: 13px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ai-head h3 {
  margin: 0;
  font-size: 20px;
}

.ai-head p {
  margin: 3px 0 0;
  font-size: 15px;
  opacity: 0.88;
}

.ai-head-actions {
  display: flex;
  gap: 8px;
}

.ai-head-actions a,
.ai-head-actions button {
  border: 0;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
}

.ai-messages {
  flex: 1;
  padding: 12px;
  background: #f8fafc;
  overflow-y: auto;
}

.ai-welcome {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 12px;
}

.ai-welcome h4 {
  margin: 0 0 8px;
  font-size: 18px;
}

.ai-welcome p {
  margin: 0;
  color: var(--gray-700);
  font-size: 14px;
}

.quick-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.quick-btn {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  padding: 8px;
  font-size: 13px;
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.quick-btn-icon {
  line-height: 1.2;
  font-size: 16px;
}

.quick-btn:hover {
  border-color: #86efac;
  background: #f0fdf4;
}

.ai-msg-row {
  display: flex;
  margin-bottom: 8px;
}

.ai-msg-row.user {
  justify-content: flex-end;
}

.ai-msg-row.assistant {
  justify-content: flex-start;
}

.ai-msg {
  max-width: 84%;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.ai-msg.user {
  background: var(--primary-500);
  color: #fff;
}

.ai-msg.assistant {
  background: #fff;
  color: var(--gray-900);
  border: 1px solid var(--gray-200);
}

.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 14px;
  background: var(--primary-500);
  margin-left: 2px;
  animation: blink 1s steps(2, start) infinite;
}

@keyframes blink {
  0% {
    opacity: 0;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

.ai-loading {
  color: var(--gray-500);
}

.ai-provider {
  border-top: 1px solid var(--gray-200);
  padding: 9px 12px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-provider select {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 13px;
  padding: 4px 7px;
}

.ai-input-row {
  border-top: 1px solid var(--gray-200);
  display: flex;
  gap: 8px;
  align-items: flex-end;
  padding: 10px;
}

.ai-input-row textarea {
  flex: 1;
  min-height: 40px;
  max-height: 120px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 14px;
  resize: vertical;
}

.ai-input-row textarea:focus {
  outline: 2px solid rgba(0, 154, 68, 0.2);
  border-color: var(--primary-500);
}

.ai-input-row button {
  border: 0;
  width: 66px;
  height: 40px;
  border-radius: 10px;
  background: var(--primary-500);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}

.ai-input-row button:disabled {
  background: #9ca3af;
}

@media (max-width: 980px) {
  .hero-inner {
    padding: 40px 0 46px;
  }

  .hero-title {
    font-size: clamp(30px, 8vw, 42px);
  }

  .hero-subtitle {
    font-size: 17px;
  }

  .search-row {
    grid-template-columns: 1fr;
  }

  .search-input {
    height: 50px;
    font-size: 16px;
  }

  .btn-search {
    height: 48px;
    font-size: 17px;
  }

  .search-meta-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .feedback-chip {
    align-self: flex-end;
    font-size: 13px;
  }

  .hot-label,
  .hot-chip {
    font-size: 13px;
  }

  .intro-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .intro-card h3 {
    font-size: 20px;
  }

  .intro-card p {
    font-size: 14px;
  }

  .intro-step {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .brand-panel h3 {
    font-size: 20px;
  }

  .brand-pill {
    font-size: 13px;
    padding: 6px 10px;
  }

  .support-strip {
    flex-direction: column;
    align-items: flex-start;
    padding: 18px;
  }

  .support-strip h2 {
    font-size: 22px;
  }

  .support-strip p {
    font-size: 14px;
  }

  .support-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .support-actions .btn {
    font-size: 14px;
  }

  .search-message {
    font-size: 18px;
  }

  .btn-export {
    font-size: 13px;
  }

  .filter-label,
  .filter-btn {
    font-size: 13px;
  }

  .result-table-title {
    font-size: 15px;
  }

  th,
  td {
    font-size: 13px;
  }

  .brand-tag,
  .status-tag {
    font-size: 12px;
  }

  .empty-result {
    font-size: 14px;
  }

  .modal-head h3 {
    font-size: 18px;
  }

  .modal-body p,
  .form-label,
  .form-input,
  .form-textarea,
  .feedback-error,
  .btn-submit {
    font-size: 14px;
  }

  .ai-bubble {
    width: 235px;
    font-size: 13px;
  }
}
