/* ============ 设计系统 ============ */
:root {
  --bg: #f5f8f7;
  --card: #ffffff;
  --ink: #0d2b25;
  --ink-2: #44605a;
  --muted: #7d918b;
  --line: #e5ecea;
  --line-soft: #eef3f1;

  --green: #0f8a6f;
  --green-2: #12b37f;
  --green-deep: #0b6b57;
  --green-soft: #e9f6f1;

  --red: #d93025;
  --red-soft: #fdecea;
  --amber: #a86500;
  --amber-soft: #fdf4e6;

  --shadow-sm: 0 1px 2px rgba(13, 43, 37, .05);
  --shadow: 0 1px 3px rgba(13, 43, 37, .05), 0 14px 32px -14px rgba(13, 43, 37, .14);
  --shadow-lg: 0 2px 6px rgba(13, 43, 37, .06), 0 28px 56px -24px rgba(13, 43, 37, .2);

  --r-sm: 12px;
  --r: 18px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(1100px 460px at 50% -8%, #e9f5f1 0%, rgba(233, 245, 241, 0) 62%),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { max-width: 600px; margin: 0 auto; padding: 26px 18px 40px; }
.hidden { display: none !important; }

/* ============ 页头 / 品牌 ============ */
.hero { text-align: center; padding: 8px 4px 4px; }

.logo-badge {
  width: 84px; height: 84px; margin: 0 auto 16px;
  border-radius: 26px; background: #fff;
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg);
}
.logo-badge img { display: block; width: 54px; height: auto; }
.logo-badge.small-badge { width: 62px; height: 62px; border-radius: 20px; margin-bottom: 16px; }
.logo-badge.small-badge img { width: 40px; }

.hero h1 {
  margin: 0; font-size: 25px; line-height: 1.28;
  font-weight: 700; letter-spacing: -.022em; color: var(--ink);
}
.hero .sub { margin: 8px auto 0; color: var(--ink-2); font-size: 14.5px; max-width: 430px; }

.verified-badge {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 14px; padding: 5px 13px 5px 10px;
  border-radius: 999px; background: var(--green-soft);
  color: var(--green-deep); font-size: 12.5px; font-weight: 600;
}
.verified-badge svg { flex: 0 0 15px; }

/* ============ 卡片 ============ */
.card {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-top: 18px;
}

.lbl {
  display: block; font-weight: 600; margin-bottom: 10px;
  font-size: 13.5px; letter-spacing: -.005em; color: var(--ink);
}

.input-row { display: flex; gap: 10px; }

input[type="tel"], input[type="text"], input[type="password"], input[type="time"], textarea, select {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: 15.5px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color .16s, box-shadow .16s;
  box-shadow: var(--shadow-sm);
}
input::placeholder, textarea::placeholder { color: #a9b8b3; }
input:focus, textarea:focus, select:focus {
  border-color: var(--green-2);
  box-shadow: 0 0 0 4px rgba(18, 179, 127, .13);
}
textarea { resize: vertical; min-height: 130px; font-size: 14px; line-height: 1.55; }

button {
  font-family: inherit; cursor: pointer; border: none;
  border-radius: var(--r-sm); padding: 13px 22px;
  font-size: 14.5px; font-weight: 600; letter-spacing: -.005em;
  background: linear-gradient(180deg, var(--green-2), var(--green));
  color: #fff; white-space: nowrap;
  box-shadow: 0 1px 2px rgba(13, 43, 37, .1), 0 8px 18px -8px rgba(15, 138, 111, .55);
  transition: transform .12s, box-shadow .16s, filter .16s;
}
button:hover { filter: brightness(1.04); }
button:active { transform: translateY(1px); }
button:disabled { opacity: .55; cursor: not-allowed; filter: none; box-shadow: none; }
button.ghost-btn { width: 100%; background: var(--green-soft); color: var(--green-deep); box-shadow: none; }
button.ghost-btn:hover { background: #ddf1e9; }
button.danger { background: linear-gradient(180deg, #e04136, #c62a20); }
button.small { padding: 7px 13px; font-size: 13px; border-radius: 10px; box-shadow: none; }

.hint { margin: 11px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }

/* ============ 警示条 ============ */
.notice {
  display: flex; gap: 10px; align-items: flex-start;
  margin-top: 18px; padding: 13px 15px;
  background: var(--amber-soft); border: 1px solid #f0e0bd;
  color: var(--amber); border-radius: var(--r-sm);
  font-size: 13px; line-height: 1.55;
}
.notice:empty { display: none; }
.notice svg { flex: 0 0 16px; margin-top: 2px; }

/* ============ 核验结果 ============ */
.result { margin-top: 18px; }

.res {
  border-radius: var(--r); padding: 26px 20px 22px;
  text-align: center; box-shadow: var(--shadow);
  animation: rise .34s cubic-bezier(.16, .84, .44, 1) both;
}
.res.ok { background: linear-gradient(180deg, #f2fbf7 0%, #ffffff 70%); border: 1px solid #c9e9db; }
.res.bad { background: linear-gradient(180deg, #fef6f5 0%, #ffffff 70%); border: 1px solid #f4cfca; }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to { opacity: 1; transform: none; }
}
@keyframes pop {
  0% { transform: scale(.5); opacity: 0; }
  60% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); }
}

.res-icon {
  width: 72px; height: 72px; border-radius: 50%;
  margin: 0 auto 14px; display: flex; align-items: center; justify-content: center;
  animation: pop .42s cubic-bezier(.2, .9, .3, 1.3) both;
}
.res.ok .res-icon { background: linear-gradient(180deg, #23c98a, var(--green-2)); box-shadow: 0 12px 26px -10px rgba(18, 179, 127, .65); }
.res.bad .res-icon { background: linear-gradient(180deg, #ec5445, #c9291f); box-shadow: 0 12px 26px -10px rgba(217, 48, 37, .6); }
.res-icon svg { width: 38px; height: 38px; }

.res-eyebrow {
  font-size: 11.5px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; margin-bottom: 6px;
}
.res.ok .res-eyebrow { color: var(--green); }
.res.bad .res-eyebrow { color: var(--red); }

.res h2 { margin: 0 0 8px; font-size: 21px; font-weight: 700; letter-spacing: -.02em; }
.res.ok h2 { color: var(--green-deep); }
.res.bad h2 { color: var(--red); }
.res p { margin: 6px 0 0; font-size: 13.5px; color: var(--ink-2); }

.alert-box {
  display: flex; gap: 9px; align-items: flex-start; text-align: left;
  margin-top: 14px; padding: 12px 14px;
  background: #fff; border: 1px solid #f4cfca; border-radius: var(--r-sm);
  color: #a32b21; font-size: 13px; line-height: 1.5; font-weight: 500;
}
.alert-box svg { flex: 0 0 16px; margin-top: 2px; }

.who {
  display: flex; align-items: center; gap: 13px;
  background: #fff; border: 1px solid var(--line);
  border-radius: 16px; padding: 14px; margin-top: 18px;
  text-align: left; box-shadow: var(--shadow-sm);
}
.avatar {
  width: 50px; height: 50px; border-radius: 50%;
  background: var(--green); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 600; flex: 0 0 50px;
  object-fit: cover;
}
.who .info { min-width: 0; flex: 1; }
.who .name { font-weight: 700; font-size: 15.5px; letter-spacing: -.01em; }
.who .phone { font-size: 13px; color: var(--green); font-weight: 600; word-break: break-all; margin-top: 1px; }
.who .note { font-size: 12.5px; color: var(--muted); word-break: break-word; margin-top: 2px; }

.wa-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 16px; padding: 14px;
  background: linear-gradient(180deg, #20c563, #12a95a); color: #fff;
  text-decoration: none; border-radius: var(--r-sm);
  font-weight: 700; font-size: 15px; letter-spacing: -.005em;
  box-shadow: 0 1px 2px rgba(13, 43, 37, .1), 0 12px 24px -10px rgba(18, 169, 90, .6);
  transition: transform .12s, filter .16s;
}
.wa-btn:hover { filter: brightness(1.05); }
.wa-btn:active { transform: translateY(1px); }
.wa-btn svg { width: 18px; height: 18px; }

/* ============ 通用 ============ */
.empty { color: var(--muted); font-size: 13.5px; padding: 16px 0; text-align: center; }

/* ============ 客户留资 ============ */
.lead-card { animation: rise .38s cubic-bezier(.22, 1, .36, 1) both; }
.lead-title { font-size: 16px; font-weight: 700; letter-spacing: -.01em; margin: 0 0 6px; }
.lead-desc { margin: 0 0 12px; }
.lead-err { color: #c0392b; margin: 8px 0 0; min-height: 0; }
.lead-ok {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 14px; border-radius: var(--r-sm);
  background: rgba(15, 138, 111, .08);
  border: 1px solid rgba(15, 138, 111, .22);
  color: var(--green-deep); font-size: 14px; line-height: 1.5;
}
.lead-ok svg { flex: 0 0 18px; margin-top: 1px; }

/* ============ 工作时间 / 北京时间 ============ */
.hours-grid { display: flex; gap: 16px; align-items: stretch; }
.hours-block { flex: 1; min-width: 0; }
.hours-block.bjnow { text-align: right; border-left: 1px solid var(--line-soft); padding-left: 16px; }
.hours-label {
  font-size: 11px; font-weight: 600; letter-spacing: .07em;
  text-transform: uppercase; color: var(--muted);
}
.hours-value { font-size: 15px; font-weight: 700; margin-top: 4px; letter-spacing: -.01em; }
.hours-note { font-size: 12.5px; color: var(--muted); margin-top: 2px; word-break: break-word; }
.hours-date { font-size: 12.5px; color: var(--ink-2); margin-top: 1px; }
.clock {
  font-size: 27px; font-weight: 700; color: var(--ink);
  font-variant-numeric: tabular-nums; letter-spacing: -.01em;
  line-height: 1.2; margin-top: 3px;
}
.open-tag {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 8px; font-size: 12px; font-weight: 600;
  padding: 4px 11px; border-radius: 999px;
  background: #f1f4f3; color: #85968f;
}
.open-tag .dot { width: 7px; height: 7px; border-radius: 50%; background: #9fadaa; }
.open-tag.on { background: var(--green-soft); color: var(--green-deep); }
.open-tag.on .dot { background: var(--green-2); box-shadow: 0 0 0 3px rgba(18, 179, 127, .18); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
.hours-hint { margin: 14px 0 0; font-size: 12.5px; color: var(--muted); }

/* ============ 页脚信任条 ============ */
footer {
  margin-top: 26px; text-align: center; color: var(--muted);
  font-size: 12.5px; line-height: 1.6;
}
.trust-row {
  display: flex; justify-content: center; gap: 16px; flex-wrap: wrap;
  padding: 14px 0; margin-bottom: 12px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line-soft);
}
.trust-item { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink-2); font-weight: 500; }
.trust-item svg { flex: 0 0 14px; }
footer a { color: var(--muted); font-size: 12px; text-decoration: none; }
footer a:hover { color: var(--green); }
.copyright { margin: 10px 0 0; font-size: 11.5px; color: #a3b1ac; letter-spacing: .01em; }

/* ============ 管理后台 ============ */
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.admin-head h1 { font-size: 20px; margin: 0; letter-spacing: -.02em; font-weight: 700; }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.tabs {
  display: flex; gap: 4px; margin: 18px 0; padding: 4px;
  background: #eef3f1; border-radius: 14px;
}
.tabs button {
  flex: 1; background: transparent; color: var(--ink-2);
  border: none; box-shadow: none;
  padding: 9px 6px; font-size: 13.5px; border-radius: 10px;
}
.tabs button:hover { background: rgba(255, 255, 255, .6); box-shadow: none; }
.tabs button.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); font-weight: 600; }

.stat { display: flex; gap: 10px; margin-bottom: 14px; }
.stat > div {
  flex: 1; background: #fff; border: 1px solid var(--line-soft);
  border-radius: var(--r-sm); padding: 12px 8px; text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat b { display: block; font-size: 21px; color: var(--green); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-lbl { font-size: 11.5px; color: var(--muted); }

.login-card { max-width: 380px; margin: 56px auto; text-align: center; box-shadow: var(--shadow-lg); }
.login-card .field { text-align: left; }
.login-card .hint { text-align: left; }
.login-title { margin: 0 0 18px; font-size: 19px; letter-spacing: -.02em; font-weight: 700; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 5px; font-weight: 500; }

.section-title {
  font-size: 13px; font-weight: 700; letter-spacing: .02em; color: var(--ink);
  margin: 22px 0 10px; padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
}
.section-title:first-child { margin-top: 0; }

table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; }
tbody tr:hover { background: #fafcfb; }
td.phone { font-weight: 600; word-break: break-all; }
td.phone .note { font-size: 11.5px; color: var(--muted); font-weight: 400; }
td.muted { color: var(--muted); font-size: 12.5px; }
.tag {
  font-size: 11.5px; padding: 3px 9px; border-radius: 999px;
  background: var(--green-soft); color: var(--green-deep); font-weight: 600; white-space: nowrap;
}
.tag.off { background: #f1f4f3; color: #85968f; }
.tag.miss { background: var(--red-soft); color: var(--red); }
.warn-num { color: var(--red); font-size: 15px; }
.row-actions { display: flex; gap: 6px; align-items: center; }
.row-done td { opacity: .6; }
.wa-link {
  display: inline-flex; align-items: center;
  padding: 6px 12px; border-radius: var(--r-sm);
  background: linear-gradient(180deg, #20c563, #12a95a); color: #fff;
  text-decoration: none; font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.wa-link:hover { filter: brightness(1.05); }
.table-wrap { overflow-x: auto; margin-top: 6px; }

.log-filter { display: flex; gap: 8px; margin: 12px 0; flex-wrap: wrap; }
.log-filter select { flex: 0 0 auto; min-width: 120px; font-size: 14px; padding: 10px 12px; }
.log-filter input { flex: 1; min-width: 140px; font-size: 14px; padding: 10px 14px; }
.log-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }

.days { display: flex; flex-wrap: wrap; gap: 12px; padding: 8px 0 2px; }
.days label { display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; color: var(--ink); cursor: pointer; margin: 0; }
.days input[type="checkbox"] { width: auto; }

.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 11px 20px;
  border-radius: 999px; font-size: 13.5px; z-index: 99;
  box-shadow: var(--shadow-lg);
  animation: rise .26s ease both;
}
.toast.err { background: var(--red); }

/* ============ 响应式 ============ */
@media (max-width: 520px) {
  .form-grid { grid-template-columns: 1fr; }
  .input-row { flex-direction: column; }
  .input-row button { width: 100%; }
  .hours-block.bjnow {
    text-align: left; border-left: none; padding-left: 0;
    border-top: 1px solid var(--line-soft); padding-top: 14px;
  }
  .hours-grid { flex-direction: column; gap: 14px; }
  .stat { flex-wrap: wrap; }
  .stat > div { min-width: calc(50% - 10px); }
  .hero h1 { font-size: 22px; }
  .wrap { padding: 20px 14px 34px; }
}
