:root {
  --blue: #1e6ce8;
  --bg: #f4f5f9;
  --text-main: #333333;
  --text-sub: #555555;
  --text-muted: #999999;
  --red: #d93025;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 14px;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button, input { font-family: inherit; }

.page {
  padding-bottom: 60px; /* leave room for tab bar */
  min-height: 100vh;
}

.page.no-tabbar { padding-bottom: 0; }

.footer-beian {
  text-align: center;
  padding: 16px 0;
  font-size: 10px;
}
.footer-beian a { color: #e0e0e0; }

/* ---------- 顶部导航（非 tab 页面用） ---------- */
.header-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 44px;
  display: flex;
  align-items: center;
  background: var(--blue);
  color: #fff;
  padding: 0 12px;
}
.header-bar .back-btn { font-size: 20px; width: 32px; }
.header-bar .title {
  flex: 1;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  margin-right: 32px;
}

/* ---------- 底部 Tab Bar ---------- */
.tab-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 55px;
  background: #fff;
  border-top: 1px solid #eee;
  display: flex;
  z-index: 200;
}
.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 11px;
}
.tab-item.active { color: #0e66d4; }
.tab-icon { width: 22px; height: 22px; margin-bottom: 2px; }

/* ---------- 卡片 / 通用 ---------- */
.section-card {
  background: #fff;
  margin: 10px;
  padding: 15px;
  border-radius: 6px;
}

.solid-title {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 15px 0;
}
.solid-title .line { width: 30px; height: 1px; border-top: 1px solid var(--blue); }
.solid-title .title-text { color: var(--blue); font-size: 15px; font-weight: bold; margin: 0 10px; }

.btn-primary {
  display: block;
  width: 100%;
  height: 45px;
  line-height: 45px;
  text-align: center;
  background: var(--blue);
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  border-radius: 5px;
  border: none;
}
.btn-primary:disabled, .btn-primary.disabled { background: #a0c4fd; }

.loading, .empty {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 0;
  font-size: 13px;
}

/* ---------- 首页 ---------- */
.banner-section {
  position: relative;
  padding: 30px 20px 40px;
  background-size: cover;
  background-position: center;
  background-color: #1558c7;
  color: #fff;
}
.banner-section .mask {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(21, 88, 199, 0.55);
}
.banner-content { position: relative; z-index: 1; }
.title-main { font-size: 22px; font-weight: bold; }
.title-sub { font-size: 14px; margin-top: 4px; opacity: 0.9; }
.tag-pill {
  display: inline-block;
  margin-top: 10px;
  padding: 3px 10px;
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 3px;
  font-size: 11px;
  letter-spacing: 2px;
}
.search-box {
  margin-top: 16px;
  background: #fff;
  border-radius: 20px;
  display: flex;
  align-items: center;
  padding: 6px 6px 6px 14px;
}
.search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 13px;
  color: #333;
}
.search-btn {
  background: var(--blue);
  color: #fff;
  font-size: 13px;
  padding: 7px 16px;
  border-radius: 16px;
}
.stats-text { margin-top: 10px; font-size: 12px; }
.stats-text .text-red { color: #ffeb3b; font-weight: bold; margin: 0 3px; }

.article-section { margin: 10px; }
.section-title { display: flex; align-items: center; padding: 12px 5px 8px; }
.icon-horn { width: 16px; height: 16px; margin-right: 6px; }
.section-title .title-text { font-size: 15px; font-weight: bold; color: var(--red); }

.article-list { background: #fff; border-radius: 6px; }
.article-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 15px; border-bottom: 1px solid #f2f2f2;
}
.article-item:last-child { border-bottom: none; }
.art-title { font-size: 14px; color: #333; }
.art-date { font-size: 11px; color: #999; margin-top: 4px; }
.art-arrow { color: #ccc; font-size: 16px; }

.btn-more {
  text-align: center; padding: 12px; color: var(--blue); font-size: 13px;
  background: #fff; margin-top: 1px; border-radius: 0 0 6px 6px;
}

/* ---------- 搜索结果页 ---------- */
.search-status { text-align: center; color: #999; font-size: 13px; padding: 30px 20px; }
.company-card {
  background: #fff; margin: 10px; padding: 15px; border-radius: 6px;
  position: relative;
}
.company-card .company-name { font-size: 16px; font-weight: bold; padding-right: 80px; }
.company-card .auth-btn {
  position: absolute; top: 15px; right: 15px;
  background: var(--blue); color: #fff; font-size: 12px;
  padding: 6px 12px; border-radius: 4px;
}
.company-card .info-row { font-size: 12px; color: #666; margin-top: 8px; }
.company-card .info-row .label { color: #999; margin-right: 6px; }

/* ---------- 公告列表/详情 ---------- */
.article-detail { background: #fff; margin: 10px; padding: 15px; border-radius: 6px; }
.article-detail .a-title { font-size: 18px; font-weight: bold; }
.article-detail .a-date { font-size: 12px; color: #999; margin: 8px 0 15px; }
.article-detail .a-content { font-size: 14px; line-height: 1.8; color: #333; }
.article-detail .a-content img { max-width: 100%; }

/* ---------- 简介页 ---------- */
.intro-banner { width: 100%; display: block; }
.intro-content { font-size: 14px; line-height: 1.8; color: #333; }
.tag-group { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tag-item {
  background: #eaf2ff; color: var(--blue); font-size: 12px;
  padding: 5px 12px; border-radius: 14px;
}

/* ---------- 我的页 ---------- */
.user-banner-wrap { position: relative; }
.user-banner-wrap img { width: 100%; filter: brightness(0.9); }
.user-banner-mask {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.35);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #fff; text-align: center; padding: 0 20px;
}
.user-banner-mask .u-title { font-size: 22px; font-weight: bold; }
.user-banner-mask .u-sub { font-size: 13px; margin-top: 6px; }
.user-banner-mask .u-tip { font-size: 11px; margin-top: 10px; opacity: 0.85; }

.menu-card { margin: -20px 10px 0; background: #fff; border-radius: 8px; position: relative; z-index: 2; }
.menu-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 15px; border-bottom: 1px solid #f2f2f2; font-size: 14px;
}
.menu-item:last-child { border-bottom: none; }
.menu-item .arrow { color: #ccc; }

/* ---------- 表单 / 下单页 ---------- */
.info-row { font-size: 13px; color: #666; margin-bottom: 6px; display: flex; }
.info-row .label { width: 130px; flex-shrink: 0; }
.info-row .value { color: #333; }

.input-item { display: flex; align-items: center; padding: 12px 0; border-bottom: 1px solid #f2f2f2; }
.input-item.no-border { border-bottom: none; }
.input-label { width: 90px; font-size: 14px; font-weight: bold; flex-shrink: 0; }
.input-box { flex: 1; font-size: 14px; border: none; outline: none; }

.notice-desc { font-size: 13px; color: #555; line-height: 1.8; text-align: justify; }
.process-steps { text-align: center; font-size: 14px; font-weight: bold; margin: 10px 0; }
.red-hint { color: var(--red); font-size: 12px; background: #fff5f5; padding: 10px; border-radius: 4px; line-height: 1.6; }
.adv-item { font-size: 13px; color: #444; margin-bottom: 8px; }

.service-header { font-size: 14px; color: #666; margin-bottom: 10px; }
.service-option {
  display: flex; justify-content: space-between; padding: 12px;
  border: 1px solid #eee; border-radius: 5px; margin-bottom: 10px;
}
.service-option.active { border-color: var(--blue); background: rgba(30,108,232,0.05); }
.s-name { font-size: 14px; }
.s-price { color: var(--red); font-weight: bold; }

.bottom-area { margin: 20px 10px; }
.agree-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.agree-left { display: flex; align-items: center; font-size: 12px; color: #666; }
.agree-left .link { color: var(--blue); }
.custom-check {
  width: 16px; height: 16px; border: 2px solid var(--blue); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; margin-right: 6px; flex-shrink: 0;
}
.custom-check.active { background: var(--blue); }
.custom-check.active::after { content: '\2713'; color: #fff; font-size: 10px; }
.contact-link { color: #666; font-size: 12px; }

.modal-mask {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6); z-index: 1000;
}
.modal-box {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 85%; max-width: 400px; background: #fff; border-radius: 10px; z-index: 1001; overflow: hidden;
}
.modal-header {
  padding: 15px; text-align: center; font-size: 16px; font-weight: bold;
  border-bottom: 1px solid #f0f0f0; display: flex; align-items: center; justify-content: center; position: relative;
}
.modal-close { position: absolute; right: 12px; top: 10px; font-size: 18px; color: #ccc; }
.modal-body { max-height: 60vh; overflow-y: auto; padding: 15px; }
.modal-body .p-text { font-size: 12px; color: #666; line-height: 1.6; margin-bottom: 12px; text-align: justify; }
.modal-footer {
  height: 45px; line-height: 45px; text-align: center;
  border-top: 1px solid #eee; color: var(--blue); font-weight: bold; font-size: 15px;
}

/* ---------- 订单列表页 ---------- */
.order-page-header {
  height: 90px; background: var(--blue); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: bold;
}
.order-card {
  background: #fff; margin: 10px; padding: 15px; border-radius: 8px;
}
.order-card .card-header { border-bottom: 1px solid #f0f0f0; padding-bottom: 10px; margin-bottom: 10px; font-size: 15px; font-weight: bold; }
.order-card .info-row { justify-content: space-between; font-size: 12px; margin-bottom: 8px; }
.order-card .info-row .label { color: #999; width: auto; }
.order-card .info-row .value { color: #333; }
.card-footer-amount {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-top: 1px dashed #eee; border-bottom: 1px dashed #eee; margin-top: 5px;
}
.card-footer-amount .price { color: var(--red); font-weight: bold; font-size: 16px; }
.status-text { font-size: 12px; margin-right: 8px; font-weight: 500; }
.status-paid { color: #00a870; }
.status-pending { color: var(--blue); }
.status-refunded { color: #999; }
.pay-btn, .fill-btn { border: none; font-size: 12px; padding: 6px 12px; border-radius: 4px; color: #fff; font-weight: bold; }
.pay-btn { background: #ff9800; }
.fill-btn { background: var(--blue); }
.card-footer-status { display: flex; justify-content: space-between; padding-top: 10px; font-size: 13px; font-weight: bold; }

.form-item { margin-bottom: 15px; border-bottom: 1px solid #eee; padding-bottom: 8px; }
.form-item .f-label { font-size: 13px; color: #666; display: block; margin-bottom: 8px; }
.form-item .f-input { font-size: 15px; color: #333; width: 100%; border: none; outline: none; }

.toast {
  position: fixed; top: 45%; left: 50%; transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.75); color: #fff; padding: 10px 18px;
  border-radius: 6px; font-size: 13px; z-index: 2000; max-width: 80%; text-align: center;
}

/* ---------- 公共JS组件：toast / loading / navbar / tabbar ---------- */
.g-toast {
  position: fixed; top: 45%; left: 50%; transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.75); color: #fff; padding: 10px 18px;
  border-radius: 6px; font-size: 13px; z-index: 3000; max-width: 80%; text-align: center;
  opacity: 0; visibility: hidden; transition: opacity 0.2s;
}
.g-toast.show { opacity: 1; visibility: visible; }

.g-loading-mask {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.35); z-index: 2999;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity 0.15s;
}
.g-loading-mask.show { opacity: 1; visibility: visible; }
.g-loading-box {
  background: rgba(0,0,0,0.75); color: #fff; padding: 18px 24px;
  border-radius: 8px; display: flex; flex-direction: column; align-items: center;
  font-size: 13px;
}
.g-spinner {
  width: 24px; height: 24px; border: 3px solid rgba(255,255,255,0.3);
  border-top-color: #fff; border-radius: 50%; margin-bottom: 8px;
  animation: g-spin 0.8s linear infinite;
}
@keyframes g-spin { to { transform: rotate(360deg); } }

.g-navbar {
  position: sticky; top: 0; z-index: 100; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--blue); color: #fff; padding: 0 12px; position: relative;
}
.g-nav-back {
  position: absolute; left: 12px; top: 0; height: 44px; display: flex; align-items: center;
  font-size: 24px; line-height: 1;
}
.g-nav-title { font-size: 16px; font-weight: 600; }

.g-tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; height: 55px;
  background: #fff; border-top: 1px solid #eee; display: flex; z-index: 200;
}
.g-tabbar-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #999; font-size: 11px;
}
.g-tabbar-item.active { color: #0e66d4; }
.g-tabbar-icon { width: 22px; height: 22px; margin-bottom: 2px; }
