:root {
  --brand: #1a6b56;
  --brand-dark: #124f40;
  --brand-soft: #e7f4ef;
  --accent: #e07a5f;
  --accent-soft: #fdeee9;
  --ink: #162823;
  --muted: #5a6f68;
  --line: #d5e4de;
  --bg: #f3f7f5;
  --card: #ffffff;
  --warn: #b7791f;
  --danger: #c0392b;
  --shadow: 0 14px 40px rgba(26, 107, 86, 0.09);
  --radius: 18px;
  --font: "PingFang SC", "Segoe UI", "Microsoft YaHei", sans-serif;
  --display: "Trebuchet MS", "PingFang SC", "Microsoft YaHei", sans-serif;
  --sage: var(--brand);
  --sage-dark: var(--brand-dark);
  --sage-soft: var(--brand-soft);
  --coral: var(--accent);
  --coral-soft: var(--accent-soft);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 0% -10%, rgba(26,107,86,.08), transparent 55%),
    radial-gradient(700px 360px at 100% 0%, rgba(224,122,95,.08), transparent 50%),
    var(--bg);
  line-height: 1.6;
}
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }
img { max-width: 100%; display: block; }
.container { width: min(1140px, calc(100% - 32px)); margin: 0 auto; }
.brand-mark {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display); font-weight: 800; color: var(--ink);
}
.brand-mark img {
  width: 36px; height: 36px; border-radius: 10px;
  box-shadow: 0 6px 16px rgba(26,107,86,.18);
}
.brand-mark .name { font-size: 22px; letter-spacing: .02em; }
.brand-mark .name em {
  font-style: normal; color: var(--accent); margin-left: 1px;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 12px; padding: 11px 18px; font-size: 15px;
  cursor: pointer; background: var(--brand); color: #fff; transition: .2s ease;
}
.btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn.coral { background: var(--accent); }
.btn.ghost { background: transparent; color: var(--brand); border: 1px solid var(--line); }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn.block { width: 100%; }
.input, select, textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line);
  border-radius: 12px; font: inherit; background: #fff; color: var(--ink);
}
.input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(26,107,86,.22); border-color: var(--brand);
}
label { display: block; font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.form-row { margin-bottom: 14px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.alert {
  padding: 12px 14px; border-radius: 12px; margin-bottom: 14px; font-size: 14px;
}
.alert.ok { background: var(--brand-soft); color: var(--brand-dark); }
.alert.err { background: var(--accent-soft); color: #9b3b2a; }
.alert.warn { background: #fff4e5; color: #8a5a00; }
.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow);
}
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
.table th, .table td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; font-size: 12px; }
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px;
  background: var(--brand-soft); color: var(--brand-dark);
}
.badge.warn { background: #fff3d9; color: var(--warn); }
.badge.danger { background: #ffe4e0; color: var(--danger); }
.badge.coral { background: var(--accent-soft); color: #a34b36; }
.muted { color: var(--muted); }
.page-title { margin: 0 0 4px; font-family: var(--display); font-size: 24px; }
.page-sub { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px;
  background-image: linear-gradient(160deg, #fff, var(--brand-soft));
}
.stat b { display: block; font-size: 26px; font-family: var(--display); color: var(--brand); }
.stat span { color: var(--muted); font-size: 13px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }

/* app shells */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 268px; background: linear-gradient(180deg, #ffffff 0%, #f2faf6 100%);
  border-right: 1px solid var(--line); padding: 18px 14px; position: sticky; top: 0; height: 100vh;
  overflow-y: auto; z-index: 40;
}
.sidebar .brand { padding: 4px 8px 18px; }
.sidebar .brand .name { font-size: 24px; }
.sidebar nav a {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px;
  color: var(--ink); margin-bottom: 4px; font-size: 18px; font-weight: 500;
}
.sidebar nav a i { font-size: 18px; width: 1.15em; text-align: center; }
.sidebar nav a:hover, .sidebar nav a.active { background: var(--brand-soft); color: var(--brand-dark); }
.sidebar nav .nav-group {
  margin: 16px 8px 8px; font-size: 13px; color: var(--muted); letter-spacing: .08em;
}
.main { flex: 1; padding: 22px; min-width: 0; }
.topbar {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; gap: 12px;
}
.compliance-tip {
  background: linear-gradient(90deg, var(--brand-soft), #fff8f4);
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 12px; color: var(--muted); margin-bottom: 16px;
}
.nav-toggle {
  display: none; border: 1px solid var(--line); background: #fff; border-radius: 10px;
  width: 42px; height: 42px; align-items: center; justify-content: center; cursor: pointer;
}
.mobile-bar {
  display: none; position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
  padding: 10px 14px; align-items: center; justify-content: space-between;
}
.sidebar-mask {
  display: none; position: fixed; inset: 0; background: rgba(22,40,35,.35); z-index: 35;
}

/* marketing */
.site-header {
  position: sticky; top: 0; z-index: 50; backdrop-filter: blur(12px);
  background: rgba(243,247,245,.88); border-bottom: 1px solid rgba(213,228,222,.85);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 12px; }
.nav-links { display: flex; gap: 18px; align-items: center; }
.nav-links a { color: var(--muted); font-size: 14px; }
.nav-links a:hover { color: var(--ink); }
.hero {
  position: relative; min-height: calc(100vh - 72px); display: grid; align-items: end;
  overflow: hidden;
}
.hero-visual {
  position: absolute; inset: 0;
  background: url('../img/hero-pet.svg') center/cover no-repeat;
  transform: scale(1.02);
}
.hero-visual::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(105deg, rgba(18,50,42,.78) 0%, rgba(18,50,42,.45) 42%, rgba(18,50,42,.2) 100%),
    linear-gradient(180deg, transparent 40%, rgba(18,50,42,.55) 100%);
}
.hero-inner {
  position: relative; z-index: 1; padding: 72px 0 80px; color: #fff; max-width: 680px;
}
.hero .brand-mark { color: #fff; margin-bottom: 18px; }
.hero .brand-mark .name { color: #fff; }
.brand-mark--light, .brand-mark--hero { color: #fff; }
.brand-mark--light .name, .brand-mark--hero .name { color: #fff; }
.panel { overflow-x: auto; }
.auth-box { width: min(420px, calc(100% - 32px)); margin-left: auto; margin-right: auto; }
.pos-header .btn { flex-shrink: 0; white-space: nowrap; }
.pos-brand strong, .pos-brand .muted {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hero h1 {
  font-family: var(--display); font-size: clamp(38px, 6vw, 68px); line-height: 1.05;
  margin: 0 0 14px; letter-spacing: -.02em;
}
.hero p { font-size: 17px; max-width: 520px; opacity: .95; }
.hero-actions { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.section { padding: 76px 0; }
.section h2 { font-family: var(--display); font-size: 34px; margin: 0 0 10px; }
.section .lead { color: var(--muted); margin: 0 0 28px; max-width: 640px; }
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feat {
  background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 22px;
  transition: transform .25s ease, box-shadow .25s ease;
}
.feat:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feat i { font-size: 22px; color: var(--accent); margin-bottom: 10px; }
.feat img.thumb {
  width: 100%; height: 140px; object-fit: cover; border-radius: 12px; margin-bottom: 12px;
}
.showcase {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; align-items: stretch; margin-bottom: 28px;
}
.showcase img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 20px; min-height: 280px;
  border: 1px solid var(--line);
}
.showcase-copy {
  background:
    linear-gradient(160deg, rgba(255,255,255,.95), rgba(231,244,239,.95)),
    url('../img/hero-pet.svg') right bottom / 180px auto no-repeat;
  border: 1px solid var(--line); border-radius: 20px; padding: 28px;
}
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.price {
  background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 24px; position: relative;
}
.price.hot { border-color: var(--accent); box-shadow: 0 12px 36px rgba(224,122,95,.15); transform: translateY(-4px); }
.price .tag { position: absolute; top: 14px; right: 14px; }
.price h3 { margin: 0 0 6px; font-family: var(--display); }
.price .fee { font-size: 36px; color: var(--brand); font-weight: 800; margin: 10px 0; }
.price .fee small { font-size: 14px; color: var(--muted); font-weight: 500; }
.price ul { padding-left: 18px; color: var(--muted); font-size: 14px; }
.site-footer { padding: 40px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; background: #fff; }
.auth-box { max-width: 460px; margin: 48px auto; }
.portal-cards { display: grid; gap: 12px; }
.portal-card {
  display: flex; gap: 14px; align-items: center; padding: 14px; border: 1px solid var(--line);
  border-radius: 14px; background: linear-gradient(135deg, #fff, var(--brand-soft));
}
.portal-card i { font-size: 22px; color: var(--accent); width: 28px; text-align: center; }
@keyframes rise { from { opacity: 0; transform: translateY(14px);} to { opacity: 1; transform: none;} }
.anim { animation: rise .65s ease both; }
.anim.d2 { animation-delay: .1s; }
.anim.d3 { animation-delay: .2s; }

/* H5 */
.h5-body { max-width: 480px; margin: 0 auto; background: #fff; min-height: 100vh; box-shadow: 0 0 40px rgba(26,107,86,.06); }
.h5-top { padding: 18px 16px 20px; background: linear-gradient(135deg, var(--brand), #2f8f74); color: #fff; }
.h5-card { margin: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; }
.h5-tab {
  position: sticky; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr);
  background: #fff; border-top: 1px solid var(--line); padding: 8px 0; z-index: 20;
}
.h5-tab a { text-align: center; color: var(--muted); font-size: 11px; }
.h5-tab a i { display: block; font-size: 18px; margin-bottom: 2px; }
.h5-tab a.active { color: var(--brand); }
.login-hero {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(600px 300px at 20% 0%, rgba(26,107,86,.12), transparent),
    radial-gradient(500px 280px at 100% 10%, rgba(224,122,95,.12), transparent),
    var(--bg);
}
.login-card { width: min(420px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 28px; box-shadow: var(--shadow); }

@media (max-width: 960px) {
  .stats, .feat-grid, .price-grid { grid-template-columns: 1fr 1fr; }
  .showcase { grid-template-columns: 1fr; }
  .mobile-bar { display: flex; }
  .nav-toggle { display: inline-flex; }
  .app-shell { flex-direction: column; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; height: 100vh; width: min(280px, 86vw);
    transform: translateX(-105%); transition: transform .25s ease; box-shadow: var(--shadow);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-mask.open { display: block; }
  .sidebar nav { display: block; }
  .main { padding: 16px; }
}
@media (max-width: 640px) {
  .stats, .feat-grid, .price-grid, .grid-2 { grid-template-columns: 1fr; }
  .nav-links .hide-sm { display: none; }
  .hero-inner { padding: 56px 0 64px; }
  .price.hot { transform: none; }
  .section { padding: 56px 0; }
  .mkt-grid { grid-template-columns: 1fr; }
  .page-title { font-size: 22px; }
  .pos-header { padding: 10px 12px; gap: 8px; }
  .pos-header .btn span { display: none; }
  .table { font-size: 13px; min-width: 480px; }
  .compliance-tip { font-size: 12px; line-height: 1.45; }
}

/* Captcha */
.captcha-row { display: flex; gap: 8px; align-items: center; }
.captcha-img { height: 40px; border-radius: 8px; border: 1px solid var(--line); cursor: pointer; background: #e8f6f1; flex-shrink: 0; }

/* POS 收银台 */
.pos-body { margin: 0; background: #eef4f1; min-height: 100vh; }
.pos-header {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10;
}
.pos-back { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; color: var(--brand); background: var(--brand-soft); }
.pos-brand { flex: 1; min-width: 0; }
.pos-brand strong { display: block; }
.pos-brand .muted { font-size: 12px; }
.pos-flash { margin: 8px 12px 0; }
.pos-shell { max-width: 520px; margin: 0 auto; padding: 12px 12px 28px; }
.pos-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 12px; }
.pos-tab {
  border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 12px 8px;
  font-size: 14px; color: var(--muted); cursor: pointer;
}
.pos-tab i { display: block; margin-bottom: 4px; font-size: 18px; }
.pos-tab.active { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); font-weight: 600; }
.pos-panel { display: none; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.pos-panel.active { display: block; }
.pos-amount-display {
  text-align: right; font-size: clamp(36px, 10vw, 52px); font-weight: 700; letter-spacing: 1px;
  padding: 8px 4px 16px; color: #16352c; font-variant-numeric: tabular-nums;
}
.pos-currency { font-size: .55em; margin-right: 4px; color: var(--muted); }
.pos-customer-chip {
  background: var(--brand-soft); color: var(--brand); border-radius: 999px; padding: 8px 12px;
  font-size: 13px; margin-bottom: 12px; text-align: center;
}
.pos-pay-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 12px; }

/* 营销中心 / 设置中心卡片 */
.settings-section { margin-bottom: 22px; }
.settings-section-title {
  margin: 0 0 4px; font-size: 15px; font-weight: 700; color: #16352c;
}
.settings-section-sub {
  margin: 0 0 12px; font-size: 13px; color: var(--muted);
}
.maint-banner {
  background: #fff4e5; color: #8a5a00; text-align: center;
  padding: 10px 16px; font-size: 14px; border-bottom: 1px solid #f0d9a8;
}
.mkt-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px;
}
.mkt-card {
  display: flex; align-items: center; gap: 12px; padding: 16px; border: 1px solid var(--line);
  border-radius: 14px; background: #fff; color: inherit; transition: border-color .2s, box-shadow .2s;
}
.mkt-card:hover { border-color: var(--brand); box-shadow: 0 8px 24px rgba(26,107,86,.08); }
.mkt-card.is-off { opacity: .72; }
.mkt-card-icon {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); font-size: 20px; flex-shrink: 0;
}
.mkt-card-body { flex: 1; min-width: 0; }
.mkt-card-body strong { display: block; margin-bottom: 4px; }
.mkt-card-body p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.4; }
.mkt-card-status { display: inline-block; margin-top: 8px; font-size: 12px; color: var(--brand); }
.mkt-card-arrow { color: var(--muted); }
.pos-pay {
  border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 10px 4px;
  font-size: 12px; cursor: pointer; color: var(--muted);
}
.pos-pay i { display: block; margin-bottom: 4px; font-size: 16px; }
.pos-pay.active { border-color: var(--accent); color: var(--accent); background: #fff5f1; }
.pos-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.pos-key {
  border: 1px solid var(--line); background: #f7faf8; border-radius: 12px;
  min-height: 56px; font-size: 22px; font-weight: 600; cursor: pointer; color: #16352c;
}
.pos-key:active { background: var(--brand-soft); }
.pos-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; }
.pos-submit { min-height: 48px; font-size: 16px; }
.pos-hint { font-size: 12px; margin: 10px 0 0; }
.pos-lookup-result { padding: 10px; border-radius: 10px; background: #f7faf8; min-height: 44px; }
.pos-recent-row {
  display: flex; justify-content: space-between; gap: 8px; padding: 8px 0;
  border-bottom: 1px solid var(--line); font-size: 13px;
}
@media (max-width: 420px) {
  .pos-pay-methods { grid-template-columns: repeat(3, 1fr); }
  .pos-pay:nth-child(4), .pos-pay:nth-child(5) { grid-column: span 1; }
  .pos-key { min-height: 48px; font-size: 20px; }
}
@media (min-width: 900px) {
  .pos-shell { max-width: 640px; padding-top: 20px; }
  .pos-pad { gap: 10px; }
  .pos-key { min-height: 64px; }
}

