:root {
  --teal: #0d9488;
  --teal-dark: #0f766e;
  --teal-deep: #0b5d56;
  --teal-soft: #f0fdfa;
  --amber: #d97706;
  --amber-soft: #fffbeb;
  --bg: #f3f7f6;
  --text: #0f2926;
  --muted: #64748b;
  --border: #e3eeec;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: radial-gradient(circle at 50% 0%, #dcefe9 0%, #eaf3f1 52%, #e1ecea 100%);
  color: var(--text);
  min-height: 100vh;
  display: flex; justify-content: center;
}
.ic { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ic svg { width: 1em; height: 1em; display: block; }

.mobile-shell {
  width: 100%; max-width: 430px; min-height: 100vh;
  background: var(--bg);
  display: flex; flex-direction: column;
  position: relative;
  border-left: 1px solid rgba(13, 148, 136, 0.12);
  border-right: 1px solid rgba(13, 148, 136, 0.12);
  box-shadow: 0 20px 60px rgba(15, 76, 70, 0.13);
}

.top-nav {
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  color: #fff;
  padding: 13px 16px 11px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 20;
}
.nav-brand { display: flex; align-items: center; gap: 10px; }
.nav-brand img {
  width: 34px; height: 34px; border-radius: 10px; object-fit: cover;
  border: 1.5px solid rgba(255,255,255,0.42);
  box-shadow: 0 3px 10px rgba(0,0,0,0.18);
}
.nav-brand h1 { font-size: 16.5px; font-weight: 800; line-height: 1.2; letter-spacing: 0.3px; }
.nav-brand span { font-size: 10.5px; opacity: 0.88; display: block; margin-top: 1px; }
.nav-trust-badge {
  color: #f0fdfa; font-size: 11px; font-weight: 600;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(255,255,255,0.16); border: 1px solid rgba(255,255,255,0.28);
  backdrop-filter: blur(6px);
}

.scroll-body { flex: 1; padding-bottom: 84px; }

/* Unified Curved Teal Hero Header across ALL 3 Tabs */
.hero-wrap {
  padding: 2px 14px 8px;
  background: linear-gradient(180deg, #0f766e 0%, #0d9488 54%, var(--bg) 54%);
}
.hero-wrap.match-mode {
  background: linear-gradient(180deg, #0f766e 0%, #0d9488 46%, var(--bg) 46%);
  padding-bottom: 4px;
}
.hero-photo {
  height: 94px; border-radius: 18px; overflow: hidden; position: relative;
  margin-bottom: -22px; box-shadow: 0 10px 24px rgba(13,148,136,0.22);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-photo-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(92deg, rgba(11, 93, 86, 0.88) 0%, rgba(13, 148, 136, 0.42) 68%, rgba(13, 148, 136, 0.12) 100%);
  padding: 14px 16px; color: #fff; display: flex; justify-content: space-between; align-items: flex-start;
}
.hero-badge {
  font-size: 10.5px; font-weight: 700; color: #042f2e;
  background: rgba(240,253,250,0.94); padding: 3px 9px; border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* Single Clean Floating Search Bar (No double-nested box) */
.hero-search-bar {
  position: relative; z-index: 2;
  height: 44px; padding: 0 13px;
  background: #ffffff; border-radius: 14px;
  border: 1px solid rgba(13, 148, 136, 0.14);
  box-shadow: 0 8px 24px rgba(15, 118, 110, 0.11);
  display: flex; align-items: center; gap: 9px; color: #0f766e;
}
.hero-search-bar input {
  border: none; outline: none; background: transparent; width: 100%;
  font-size: 13px; color: var(--text);
}
.hero-search-bar input::placeholder { color: #94a3b8; }
.clear-search-btn {
  border: none; background: #eef5f4; color: #475569;
  width: 20px; height: 20px; border-radius: 50%; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.clear-search-btn.hidden { display: none; }

/* Filter Chips with Smooth Right-Edge Fade */
.chip-scroll-wrap { position: relative; margin-top: 2px; }
.chip-scroll-wrap::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 42px;
  background: linear-gradient(90deg, rgba(243,247,246,0), var(--bg) 82%);
  pointer-events: none;
}
.chip-row { display: flex; gap: 8px; overflow-x: auto; padding: 10px 36px 2px 14px; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; border: 1px solid var(--border); background: #fff; color: #475569;
  padding: 6px 13px; border-radius: 999px; font-size: 12px; font-weight: 500; cursor: pointer;
  transition: all 0.16s;
}
.chip.active {
  background: var(--teal); color: #fff; border-color: var(--teal); font-weight: 700;
  box-shadow: 0 3px 10px rgba(13, 148, 136, 0.24);
}

.list-wrap { padding: 12px 14px 6px; display: flex; flex-direction: column; gap: 12px; }
.card {
  background: #fff; border-radius: 16px; padding: 15px 16px;
  border: 1px solid rgba(13,148,136,0.08);
  box-shadow: 0 4px 16px rgba(15,118,110,0.055);
  cursor: pointer; transition: transform 0.16s, box-shadow 0.16s;
}
.card:hover { box-shadow: 0 8px 24px rgba(15,118,110,0.09); }
.card:active { transform: scale(0.985); }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.inline-meta { display: inline-flex; align-items: center; gap: 4px; }

.job-card-title {
  font-size: 14.5px; font-weight: 700; line-height: 1.42; flex: 1; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.salary {
  color: var(--amber); font-weight: 800; font-size: 14.5px; flex-shrink: 0;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}

/* Tiered Tag Hierarchy */
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.mini-tag {
  font-size: 11px; padding: 2.5px 8px; border-radius: 6px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 3px;
}
.tag-loc { background: #f1f5f9; color: #475569; }
.tag-highlight { background: #fef3c7; color: #b45309; font-weight: 600; }
.tag-attr { background: var(--teal-soft); color: var(--teal-dark); }

.card-foot {
  margin-top: 11px; padding-top: 10px; border-top: 1px solid #eef5f3;
  display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--muted);
}

/* Drug Cards with Uniform Studio Framing */
.drug-body { display: flex; gap: 12px; align-items: flex-start; }
.drug-thumb-frame {
  width: 82px; height: 82px; border-radius: 13px; overflow: hidden; flex-shrink: 0;
  background: #f5f9f8; border: 1px solid #e6efed;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.6);
}
.drug-thumb-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

.list-footer-trust {
  text-align: center; padding: 18px 14px 10px;
  font-size: 11px; color: #94a3b8; letter-spacing: 0.4px;
}

/* Match Tab (Unified Curved Teal Header + Clean Account Strip) */
.match-hero {
  border-radius: 18px; overflow: hidden; position: relative; height: 118px;
  box-shadow: 0 10px 24px rgba(13,148,136,0.2);
}
.match-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.match-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(92deg, rgba(11, 51, 47, 0.88) 0%, rgba(13, 148, 136, 0.48) 58%, rgba(13, 148, 136, 0.08) 100%);
  padding: 16px 18px; color: #fff; display: flex; flex-direction: column; justify-content: center;
}
.account-strip {
  margin: 10px 14px 0; padding: 10px 14px; border-radius: 13px;
  background: #ffffff; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  box-shadow: 0 3px 10px rgba(15,118,110,0.04);
}
.account-dot { width: 8px; height: 8px; border-radius: 50%; background: #10b981; display: inline-block; margin-right: 6px; }
.switch-acc-btn {
  border: 1px solid var(--border); background: #f8fbfa; color: #475569;
  font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; cursor: pointer;
}

.form-card {
  margin: 12px 14px; background: #fff; border-radius: 18px; padding: 18px 16px;
  border: 1px solid rgba(13,148,136,0.08);
  box-shadow: 0 4px 18px rgba(15,118,110,0.06);
}
.form-group { margin-bottom: 13px; }
.form-label { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; font-weight: 600; margin-bottom: 6px; color: #1e293b; }
.req { color: #ef4444; margin-left: 3px; }
.opt { font-size: 11px; color: var(--muted); font-weight: 400; }

.input, .select {
  width: 100%; height: 42px; border: 1px solid #d5e2df; border-radius: 11px;
  padding: 0 12px; font-size: 13.5px; background: #f9fcfb; color: var(--text); outline: none;
  transition: border-color 0.16s, background 0.16s, box-shadow 0.16s;
}
.input:focus, .select:focus {
  border-color: var(--teal); background: #fff; box-shadow: 0 0 0 3px rgba(13,148,136,0.12);
}
.input[readonly] {
  background: #f1f5f9; color: #64748b; border-color: #e2e8f0; cursor: not-allowed;
}
select.select {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  padding-right: 36px !important;
  background-color: #f9fcfb;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 15px;
}
select.select::-ms-expand { display: none; }
select.select:focus {
  background-color: #ffffff;
}

.sms-row { display: flex; gap: 8px; }
.sms-btn {
  flex-shrink: 0; padding: 0 14px; border-radius: 11px; border: none;
  background: #ccfbf1; color: var(--teal-dark); font-size: 12px; font-weight: 700; cursor: pointer;
}
.sms-btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* Unified Cohesive Precise-Match Card */
.precise-card {
  border-radius: 14px; border: 1px solid #a7f3d0; background: #f6fdfa;
  overflow: hidden; margin: 14px 0 16px;
}
.toggle-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 14px; cursor: pointer;
}
.switch { width: 42px; height: 24px; border-radius: 999px; background: #cbd5e1; position: relative; transition: background 0.2s; flex-shrink: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.18); transition: transform 0.2s; }
.switch.on { background: var(--teal); }
.switch.on::after { transform: translateX(18px); }
.precise-body {
  padding: 14px; border-top: 1px dashed #99f6e4; background: #ffffff;
}
.quick-picks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.pick-pill {
  border: 1px solid #d5e2df; background: #f8fbfa; color: #334155; font-size: 11px;
  padding: 4px 10px; border-radius: 999px; cursor: pointer; transition: all 0.15s;
}
.pick-pill.active {
  background: var(--teal); border-color: var(--teal); color: #fff; font-weight: 600;
}

.btn-primary {
  width: 100%; height: 44px; border-radius: 12px; border: none;
  background: linear-gradient(135deg, #0d9488, #0f766e); color: #fff;
  font-size: 14px; font-weight: 700; cursor: pointer;
  box-shadow: 0 6px 16px rgba(13,148,136,0.22);
}
.btn-wx {
  width: 100%; height: 44px; border-radius: 12px; border: none;
  background: linear-gradient(135deg, #07c160, #059669); color: #fff; font-size: 14px; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 7px;
  box-shadow: 0 6px 16px rgba(7,193,96,0.24);
}

.privacy-box {
  background: #f0fdfa; border: 1px solid #ccfbf1; border-radius: 13px; padding: 13px;
}
.privacy-tip {
  font-size: 11.5px; color: #0f766e; margin-top: 6px; line-height: 1.55;
}

/* TabBar */
.tabbar {
  position: fixed; bottom: 0; width: 100%; max-width: 430px; height: 64px;
  background: rgba(255,255,255,0.96); backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  display: grid; grid-template-columns: repeat(3, 1fr); z-index: 30;
}
.tab-btn {
  border: none; background: transparent; color: #94a3b8;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 11px; font-weight: 500; cursor: pointer;
}
.tab-btn svg { width: 22px; height: 22px; }
.tab-btn.active { color: var(--teal); font-weight: 700; }

/* Bottom Sheet */
.sheet-backdrop {
  position: fixed; inset: 0; background: rgba(15,41,38,0.52); backdrop-filter: blur(4px);
  z-index: 60; display: none; align-items: flex-end; justify-content: center;
}
.sheet-backdrop.open { display: flex; }
.sheet {
  width: 100%; max-width: 430px; max-height: 86vh; overflow-y: auto;
  background: #fff; border-radius: 24px 24px 0 0; padding: 14px 18px 26px;
  position: relative; box-shadow: 0 -10px 40px rgba(15,41,38,0.18);
}
.sheet-top-bar {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px;
}
.sheet-handle { width: 40px; height: 4px; background: #e2e8f0; border-radius: 99px; margin: 0 auto; }
.sheet-close-btn {
  border: none; background: #f1f5f9; color: #475569;
  width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.sheet-drug-header {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 12px; border-radius: 16px; background: #f8fbfa; border: 1px solid #e6efed;
}
.sheet-drug-photo {
  width: 96px; height: 96px; border-radius: 13px; object-fit: cover; flex-shrink: 0;
  border: 1px solid rgba(13,148,136,0.12); background: #fff;
}
.sheet-sec { margin-top: 15px; }
.sheet-sec h4 { font-size: 13px; color: var(--teal-dark); margin-bottom: 6px; font-weight: 700; }
.sheet-sec p { font-size: 13px; color: #475569; line-height: 1.68; white-space: pre-line; }

.toast {
  position: fixed; top: 68px; left: 50%; transform: translateX(-50%);
  background: rgba(15,41,38,0.94); color: #fff; font-size: 12.5px; font-weight: 600;
  padding: 9px 16px; border-radius: 999px; z-index: 100;
  opacity: 0; pointer-events: none; transition: opacity 0.2s; max-width: 90%; text-align: center;
}
.toast.show { opacity: 1; }
