*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 16px;
  color: #111827;
  background: #e5e7eb;
  min-height: 100vh;
}

/* ── Phone wrapper ── */
.app-shell {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.phone {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  background: #fff;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 40px rgba(0,0,0,0.15);
}

@media (max-width: 520px) {
  .app-shell { background: #fff; }
  .phone { box-shadow: none; }
}

@media (max-width: 320px) {
  .page-title { font-size: 20px; }
  .modal-box { margin: 12px; padding: 20px 16px; }
}

/* ── Navbar ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  padding: 12px 16px;
  min-height: 52px;
}

.navbar-back {
  background: none;
  border: none;
  font-size: 20px;
  color: #374151;
  cursor: pointer;
  padding: 4px 8px 4px 0;
  line-height: 1;
  flex-shrink: 0;
}

.navbar-title {
  flex: 1;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}

.navbar-badge {
  font-size: 13px;
  color: #6b7280;
  flex-shrink: 0;
  min-width: 40px;
  text-align: right;
}

/* ── Scrollable content ── */
.page-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px;
  padding-bottom: 40px;
}

.page-content--gray {
  background: #f9fafb;
}

/* ── Cards ── */
.card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  padding: 16px;
}

.card + .card { margin-top: 12px; }

/* ── Typography ── */
.section-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #10b981;
  background: #d1fae5;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.page-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  color: #111827;
  margin-bottom: 8px;
}

.page-title .green { color: #10b981; }

.page-desc {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.6;
}

/* ── Buttons ── */
.btn {
  display: block;
  width: 100%;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: opacity 0.2s, background 0.2s;
  text-decoration: none;
}

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

.btn-primary {
  background: #10b981;
  color: #fff;
}

.btn-primary:hover:not(:disabled) { background: #059669; }

.btn-primary-gray {
  background: #d1d5db;
  color: #6b7280;
}

.btn-outline {
  background: #fff;
  color: #374151;
  border: 1.5px solid #d1d5db;
}

.btn-outline:hover { border-color: #9ca3af; }

.btn-orange {
  background: #f97316;
  color: #fff;
}

.btn-orange:hover { background: #ea6c0a; }

.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 8px;
  display: inline-block;
  width: auto;
}

/* ── Tags ── */
.tag {
  display: inline-block;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 6px;
  margin: 2px 4px 2px 0;
}

.tag-green {
  background: #d1fae5;
  color: #059669;
}

/* ── Form ── */
.form-group { margin-bottom: 16px; }
.form-label { font-size: 13px; color: #6b7280; margin-bottom: 6px; display: block; }

.form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  font-size: 15px;
  color: #111827;
  background: #fff;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  transition: border-color 0.2s;
}

.form-control:focus { border-color: #10b981; }

.select-wrapper {
  position: relative;
}

.select-wrapper::after {
  content: '▾';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
  font-size: 14px;
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(0,0,0,0.75);
  color: #fff;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 14px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 9999;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-box {
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  width: 100%;
  max-width: 320px;
  text-align: center;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.modal-desc {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 20px;
  line-height: 1.6;
}

.modal-actions { display: flex; flex-direction: column; gap: 10px; }

/* ── Flex utilities ── */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.flex-wrap { flex-wrap: wrap; }

/* ── Divider ── */
.divider {
  height: 1px;
  background: #f3f4f6;
  margin: 12px 0;
}

/* ── Company avatar ── */
.company-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #9ca3af;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ── Green quote block ── */
.quote-block {
  border-left: 4px solid #10b981;
  padding: 10px 14px;
  background: #f0fdf4;
  border-radius: 0 8px 8px 0;
  font-size: 14px;
  color: #374151;
  line-height: 1.6;
  margin-bottom: 16px;
}

/* ── Bullet list ── */
.bullet-list { list-style: none; padding: 0; }
.bullet-list li {
  position: relative;
  padding-left: 16px;
  font-size: 14px;
  color: #374151;
  line-height: 1.6;
  margin-bottom: 6px;
}
.bullet-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #10b981;
}
.plain-list { list-style: none; padding: 0; }
.plain-list li {
  font-size: 13px;
  color: #374151;
  line-height: 1.6;
  margin-bottom: 4px;
  padding-left: 0;
}

/* ── Section heading inside cards ── */
.sub-heading {
  font-size: 13px;
  font-weight: 700;
  color: #374151;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sub-heading::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 14px;
  background: #10b981;
  border-radius: 2px;
}
