/* ==========================================================================
   IntelCons Landing Page Styles
   Tuân thủ nghiêm ngặt quy ước: Nền sáng (Trắng), Xanh lá thương hiệu (#16a34a), Đen, Xám.
   ========================================================================== */

/* Hero Section */
.hero-section {
  position: relative;
  padding: 3.5rem 0 2.5rem;
  background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
  border-bottom: 1px solid var(--border-color);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  max-width: 100%;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  background: #ffffff;
  border: 1px solid var(--primary-border);
  color: var(--primary-hover);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
  line-height: 1.4;
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  display: inline-block;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.hero-desc {
  font-size: 1.12rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 750px;
  margin: 0 auto 1.25rem;
}

/* Nút Sổ tay Kết cấu ở Hero */
.hero-handbook-wrap {
  margin: 0 auto 2.25rem;
  display: flex;
  justify-content: center;
}

.btn-handbook-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 1.4rem;
  background: #ffffff;
  border: 1.5px solid #2e7d32;
  border-radius: 9999px;
  color: #1b5e20;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(46, 125, 50, 0.08);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-handbook-pill:hover {
  background: #f0fdf4;
  border-color: #1b5e20;
  color: #15803d;
  box-shadow: 0 4px 14px rgba(46, 125, 50, 0.16);
  transform: translateY(-1px);
}

.btn-handbook-tag {
  background: #e8f5e9;
  color: #2e7d32;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  border: 1px solid #c8e6c9;
  text-transform: uppercase;
}

/* Điều kiện thi công chỉ định (compact) trong Thẻ 2 */
.drawing-conditions-compact {
  margin: 0.85rem 0 1rem;
  padding: 0.85rem 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  text-align: left;
}

.conditions-compact-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.conditions-compact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

.condition-compact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.condition-compact-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
}

.condition-compact-radios {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: flex-start;
}

@media (min-width: 641px) {
  .condition-compact-radios {
    flex-direction: row;
    gap: 0.75rem;
    align-items: center;
  }
}

.condition-radio-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: #1e293b;
  cursor: pointer;
  line-height: 1.35;
}

.condition-radio-label input[type="radio"] {
  accent-color: #2e7d32;
  cursor: pointer;
}

/* Quick Audit Widget (Upload Box) & Hero 2 Tools Grid */
.hero-tools-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 1140px;
  margin: 0 auto;
  align-items: stretch;
}

.audit-widget-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-md);
  max-width: 760px;
  margin: 0 auto;
  text-align: left;
}

.hero-tools-grid .audit-widget-card {
  max-width: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.handbook-card-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 0.85rem;
}

.handbook-feature-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.handbook-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #334155;
  text-align: left;
}

.handbook-feature-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  line-height: 1.3;
}

@media (max-width: 991px) {
  .hero-tools-grid {
    grid-template-columns: 1fr;
    max-width: 680px;
  }
}

.widget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.85rem;
}

.widget-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  line-height: 1.35;
  word-break: break-word;
}

.widget-tag {
  background: var(--primary-light);
  color: var(--primary-hover);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--primary-border);
}

.upload-dropzone {
  border: 2px dashed #cbd5e1;
  background: #f8fafc;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 1rem;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.dropzone-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.dropzone-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.dropzone-hint {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.selected-file-display {
  display: none;
  background: #ffffff;
  border: 1px solid var(--primary-border);
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 600;
  justify-content: space-between;
  align-items: center;
}

.selected-file-display.active {
  display: flex;
}

.widget-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.widget-security-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.widget-security-info svg {
  width: 16px;
  height: 16px;
  fill: var(--primary);
  flex-shrink: 0;
}

/* Thanh tiến trình phân tích xử lý yêu cầu */
.analysis-progress-wrap {
  width: 100%;
  margin-bottom: 0.85rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  text-align: left;
}

.progress-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: #15803d;
  margin-bottom: 0.45rem;
}

.progress-bar-bg {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 9999px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #16a34a, #22c55e);
  border-radius: 9999px;
  transition: width 0.4s ease;
  width: 15%;
}

.btn-audit-submit:disabled, .btn-audit-submit.loading {
  opacity: 0.75;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-audit-submit {
  background: var(--primary);
  color: #ffffff;
  border: none;
  font-weight: 700;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

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

/* Mô tả tính năng ngắn gọn trên 2 thẻ */
.card-feature-desc {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.6;
  padding: 0.65rem 0.25rem 1rem;
  text-align: left;
}

/* Khối ghi nhận ý kiến đóng góp vị trí giữa */
.feedback-invite-box {
  margin: 4.5rem auto 3.5rem;
  max-width: 760px;
  text-align: center;
  padding: 0.5rem 1rem;
}

.feedback-invite-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.feedback-invite-desc {
  font-size: 0.95rem;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

/* Feature Pillars */
.pillars-section {
  padding: 3rem 0;
}

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.pillar-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  text-align: left;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.pillar-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.pillar-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--primary-light);
  color: var(--primary-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.pillar-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
}

.pillar-card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0;
}

/* Audit Results Section */
.audit-results-section {
  padding: 2.5rem 0 3.5rem;
  background: #f8fafc;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.results-header-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.results-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
}

.metrics-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.metric-box {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: left;
}

.metric-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.metric-value {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1;
}

.metric-value.text-success { color: #16a34a; }
.metric-value.text-warning { color: #d97706; }
.metric-value.text-danger { color: #dc2626; }
.metric-value.text-dark { color: #0f172a; }

.metric-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* Status Badges */
.badge-status {
  display: inline-block;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
}

.status-success {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.status-warning {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.status-danger {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.status-secondary {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

/* Results Table */
.results-table-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

.results-table-scroll {
  max-height: 480px;
  overflow-y: auto;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  text-align: left;
}

.results-table th {
  background: #f8fafc;
  padding: 0.85rem 1rem;
  font-weight: 700;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 2;
}

.results-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
}

.results-table tr:hover td {
  background: #fcfcfc;
}

/* CTA Upsell Box in Results */
.upsell-cta-box {
  background: #ffffff;
  border: 2px solid var(--primary-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
}

.upsell-content h4 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.upsell-content p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0;
  max-width: 650px;
  line-height: 1.5;
}

/* ==========================================================================
   Tối ưu hóa hiển thị Mobile & Tablet (Mobile-First Polish)
   ========================================================================== */
@media (max-width: 768px) {
  .hero-section {
    padding: 2.25rem 0 2rem;
  }
  .hero-title {
    font-size: 1.65rem;
    line-height: 1.25;
    margin-bottom: 0.75rem;
  }
  .hero-desc {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1.25rem;
  }
  .hero-badge {
    font-size: 0.72rem;
    padding: 0.35rem 0.65rem;
    margin-bottom: 1rem;
    display: inline-block;
    text-align: center;
    line-height: 1.4;
    border-radius: 8px;
  }
  .hero-badge .dot {
    vertical-align: middle;
    margin-right: 0.25rem;
  }
  .hero-handbook-wrap {
    margin-bottom: 1.75rem;
  }
  .btn-handbook-pill {
    font-size: 0.88rem;
    padding: 0.5rem 1rem;
  }
  .audit-widget-card {
    padding: 1.25rem 1rem;
  }
  .widget-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
  }
  .widget-title {
    font-size: 1.05rem;
  }
  .upload-dropzone {
    padding: 1.25rem 0.75rem;
  }
  .dropzone-text {
    font-size: 0.88rem;
  }
  .dropzone-hint {
    font-size: 0.78rem;
  }
  .drawing-conditions-compact {
    padding: 0.75rem 0.85rem;
  }
  .condition-compact-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }
  .condition-compact-radios {
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
  }
  .condition-radio-label {
    font-size: 0.8rem;
  }
  .widget-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
  }
  .widget-security-info {
    font-size: 0.78rem;
  }
  /* Thanh tiến trình phân tích xử lý yêu cầu */
.analysis-progress-wrap {
  width: 100%;
  margin-bottom: 0.85rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  text-align: left;
}

.progress-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: #15803d;
  margin-bottom: 0.45rem;
}

.progress-bar-bg {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 9999px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #16a34a, #22c55e);
  border-radius: 9999px;
  transition: width 0.4s ease;
  width: 15%;
}

.btn-audit-submit:disabled, .btn-audit-submit.loading {
  opacity: 0.75;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-audit-submit {
    width: 100%;
    justify-content: center;
  }
}
