/* ---- Hero ---- */
.hero {
  text-align: center;
  padding: 32px 20px 28px;
  overflow: hidden;
}
.hero.hero-compact {
  padding: 20px 16px 16px;
}
.hero::before { display: none; }
.hero-icon {
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--accent-light) 0%, var(--accent) 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  position: relative;
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.hero-compact .hero-icon {
  width: 44px; height: 44px;
  margin-bottom: 10px;
}
.hero-compact .hero-icon svg { width: 22px; height: 22px; }
.hero-icon svg { width: 28px; height: 28px; }
.hero h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 10px;
  position: relative;
}
.hero-compact h1 {
  font-size: 22px;
  margin-bottom: 6px;
}
.hero p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0 auto;
  max-width: 300px;
  position: relative;
}
.hero-compact p {
  font-size: 13px;
  max-width: 260px;
}

/* ---- Stats row (profile) ---- */
.stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.stat-card {
  padding: 16px;
  text-align: center;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.14) 0%, transparent 50%),
    var(--bg-card-elevated);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform var(--transition-fast), box-shadow var(--transition);
}
@media (prefers-color-scheme: dark) {
  .stat-card {
    box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }
}
.stat-card.accent {
  background: var(--accent-soft);
}
.stat-card .stat-icon { color: var(--text-muted); margin-bottom: 4px; }
.stat-card .stat-icon svg { width: 20px; height: 20px; }
.stat-card.accent .stat-icon { color: var(--accent); }
.stat-value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text);
}
.stat-label { font-size: 11px; color: var(--text-muted); margin-top: 3px; font-weight: 500; }

/* ---- Credits banner (home) ---- */
.credits-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.12) 0%, transparent 50%),
    var(--accent-soft);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.20);
}
@media (prefers-color-scheme: dark) {
  .credits-banner {
    box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  }
}
.credits-banner-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.credits-banner-icon { width: 20px; height: 20px; color: var(--accent); flex-shrink: 0; }
.credits-banner-value {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1;
}
.credits-banner-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}
.credits-banner-topup {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--accent);
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.credits-banner-topup:hover {
  filter: brightness(1.08);
}

/* ---- Steps list ---- */
.steps-list { padding: 0; overflow: hidden; }
.step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  transition: background var(--transition-fast);
}
.step:not(:last-child) { border-bottom: 1px solid var(--border-light); }
.step:hover { background: var(--accent-soft); }
.step-num {
  width: 30px; height: 30px;
  border-radius: var(--radius-full);
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.step-body { flex: 1; min-width: 0; }
.step-title { font-size: 15px; font-weight: 600; color: var(--text); letter-spacing: -0.01em; }
.step-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ---- Features list ---- */
.features-list { padding: 0; overflow: hidden; }
.feature-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  transition: background var(--transition-fast);
}
.feature-row:not(:last-child) { border-bottom: 1px solid var(--border-light); }
.feature-row:hover { background: var(--accent-soft); }
.feature-icon {
  width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.feature-icon svg { width: 20px; height: 20px; }
.feature-icon.blue { background: var(--accent-soft); color: var(--accent); }
.feature-icon.green { background: var(--success-soft); color: var(--success); }
.feature-icon.purple { background: var(--rose-soft); color: var(--rose); }
.feature-text { flex: 1; min-width: 0; }
.feature-title { font-size: 15px; font-weight: 600; color: var(--text); letter-spacing: -0.01em; }
.feature-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ---- Page tabs ---- */
.page-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}
.tab-btn {
  flex: 1;
  padding: 8px 12px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.tab-btn.active {
  background: linear-gradient(160deg, var(--accent-light) 0%, var(--accent) 60%);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.tab-btn:not(.active):hover {
  background: var(--accent-soft);
  color: var(--text);
}

/* ---- List cards ---- */
.list-card {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 14px 16px;
  margin-top: 8px;
  transition: transform var(--transition-fast), box-shadow var(--transition);
}
a.list-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.list-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.list-card-title { font-size: 15px; font-weight: 600; color: var(--text); letter-spacing: -0.01em; }
.list-card-meta { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ---- Profile card ---- */
.profile-card { text-align: center; padding: 24px 16px; }
.profile-avatar {
  width: 56px; height: 56px;
  margin: 0 auto 12px;
  border-radius: var(--radius-full);
  background: linear-gradient(160deg, var(--accent-light) 0%, var(--accent) 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.profile-avatar svg { width: 28px; height: 28px; }
.profile-name { font-size: 18px; font-weight: 700; color: var(--text); }
.profile-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ---- Product card ---- */
.product-card .btn { margin-top: 10px; }
.product-price { font-size: 15px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.btn-sm { min-height: 38px; font-size: 13px; padding: 0 14px; }

/* ---- Empty state ---- */
.empty-state { text-align: center; padding: 32px 16px; color: var(--text-muted); }
.empty-state svg { width: 32px; height: 32px; margin-bottom: 8px; opacity: 0.5; }
.empty-state p { margin: 0; font-size: 14px; }

/* ---- Loading spinner ---- */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 32px;
  color: var(--text-muted);
  font-size: 14px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 1s linear infinite; }

/* ---- Findings ---- */
.finding-item { padding: 12px 14px; }
.finding-title { font-size: 14px; font-weight: 600; color: var(--text); margin-top: 4px; }
.finding-rec { font-size: 12px; color: var(--text-secondary); margin-top: 4px; line-height: 1.4; }

/* ---- Check form ---- */
.check-form { padding: 20px; }
.check-field { margin-bottom: 14px; }
.check-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.check-select {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238A8698' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.check-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.check-select:disabled { opacity: 0.5; cursor: not-allowed; }

.upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 100px;
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}
.upload-area:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text-secondary);
}
.upload-area svg { width: 28px; height: 28px; opacity: 0.5; }

/* ---- File card (selected file) ---- */
.file-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  animation: fadeIn var(--transition-base);
}
.file-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  flex-shrink: 0;
}
.file-card-icon svg { width: 20px; height: 20px; }
.file-card-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.file-card-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-card-size {
  font-size: 11px;
  color: var(--text-muted);
}
.file-card-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.file-card-remove:hover { background: var(--danger); color: #fff; }
.file-card-remove svg { width: 16px; height: 16px; }

/* ---- Mobile compact ---- */
@media (max-width: 420px) {
  .hero-compact { padding: 14px 14px 12px; }
  .hero-compact .hero-icon { width: 38px; height: 38px; margin-bottom: 8px; }
  .hero-compact .hero-icon svg { width: 18px; height: 18px; }
  .hero-compact h1 { font-size: 20px; margin-bottom: 4px; }
  .hero-compact p { font-size: 12px; max-width: 230px; line-height: 1.4; }

  .step { padding: 10px 14px; gap: 10px; }
  .step-num { width: 26px; height: 26px; font-size: 11px; }
  .step-title { font-size: 13px; }
  .step-desc { font-size: 11px; }

  .feature-row { padding: 10px 14px; gap: 10px; }
  .feature-icon { width: 36px; height: 36px; }
  .feature-icon svg { width: 18px; height: 18px; }
  .feature-title { font-size: 13px; }
  .feature-desc { font-size: 11px; }

  .credits-banner { padding: 10px 14px; }
  .credits-banner-value { font-size: 18px; }
}
