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

:root {
  /* Gold accent system */
  --gold:   #C9A84C;
  --gold-h: #A8882A;
  --gold-light:  #FBF4E3;
  --gold-border: #E8D59A;
  /* Alias — booking.js / book.html use var(--purple) */
  --purple:        #C9A84C;
  --purple-h:      #A8882A;
  --purple-light:  #FBF4E3;
  --purple-border: #E8D59A;
  /* Typography */
  --text:  #1A1209;
  --muted: #8B7A6A;
  /* Surfaces */
  --bg:     #FAF8F5;
  --white:  #FFFFFF;
  --border: #EDE8E0;
  /* Status */
  --green: #4CAF7D;
  --red:   #EF4444;
  /* Tokens */
  --radius: 14px;
  --shadow: 0 1px 8px rgba(26,18,9,0.07);
}

body { font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Segoe UI', sans-serif; color: var(--text); }

a { color: var(--gold-h); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Flash ── */
.flash { padding: 12px 20px; border-radius: 8px; font-size: 14px; margin: 12px 0; }
.flash-success { background: #DCFCE7; color: #166534; }
.flash-error   { background: #FEE2E2; color: #991B1B; }

/* ══════════════════════════════════════════════════════════
   PUBLIC PAGES
══════════════════════════════════════════════════════════ */
.public-body { background: var(--bg); min-height: 100vh; }

/* ── Nav ── */
.public-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px; height: 78px;
  background: var(--bg); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.public-nav.scrolled {
  background: rgba(250,248,245,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: rgba(237,232,224,0.6);
  transition: background 0.3s, border-color 0.3s;
}
.nav-logo {
  display: flex; align-items: center; gap: 8px;
  font-size: 22px; font-weight: 800; color: var(--text);
  letter-spacing: -0.5px;
}
.nav-logo:hover { text-decoration: none; }
.nav-logo-img { height: 72px; width: auto; mix-blend-mode: multiply; display: block; }
.nav-links { display: flex; align-items: center; gap: 24px; font-size: 14px; }
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.btn-sm {
  background: var(--gold); color: var(--text);
  padding: 7px 18px; border-radius: 20px; font-weight: 700;
}
.btn-sm:hover { background: var(--gold-h); color: var(--text); text-decoration: none; }
.nav-links .btn-sm { color: var(--text); }
.nav-links .btn-sm:hover { color: var(--text); }

/* ── Language switch ── */
.lang-switch {
  display: flex; align-items: center; gap: 2px;
  background: var(--white); border: 1px solid var(--border);
  border-radius: 20px; padding: 3px; font-size: 12px; font-weight: 700;
}
.lang-switch a { padding: 4px 10px; border-radius: 16px; color: var(--muted); }
.lang-switch a:hover { color: var(--text); text-decoration: none; }
.lang-switch a.active { background: var(--gold); color: var(--text); }
.mobile-topbar .lang-switch { font-size: 11px; }
.mobile-topbar .lang-switch a { padding: 3px 8px; }

/* ── Landing Hero ── */
.hero-rich {
  position: relative; overflow: hidden;
  padding: 96px 48px 80px;
  background: var(--bg);
}
.hero-rule {
  position: absolute; top: 64px; bottom: 64px; left: 40px;
  width: 2px; border-radius: 2px;
  background: linear-gradient(to bottom, transparent, var(--gold) 18%, var(--gold) 82%, transparent);
  opacity: 0.55;
}
.hero-rich-inner {
  position: relative; z-index: 1;
  max-width: 1120px; margin: 0 auto;
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  align-items: center; gap: 40px;
}
.hero-copy { text-align: left; }
.hero-rich .hero-eyebrow { margin-bottom: 20px; }
.hero-rich h1 {
  font-family: 'Noto Serif SC', serif; font-weight: 800;
  font-size: clamp(38px, 4.6vw, 62px); line-height: 1.08; letter-spacing: -1.5px; color: var(--text);
  margin: 0;
}
.hero-rich .hero-sub { margin: 22px 0 0; max-width: 440px; }
.hero-rich .hero-actions { justify-content: flex-start; margin-top: 34px; }
.hero-preview { display: flex; justify-content: center; perspective: 1600px; }
.hero-eyebrow {
  display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: 0.12em;
  color: var(--gold-h); text-transform: uppercase; margin-bottom: 24px;
}
.accent { color: var(--gold); }
.hero-thin { font-weight: 300; }
.hero-sub { font-size: 17px; color: var(--muted); margin: 22px 0 0; max-width: 420px; line-height: 1.65; }
.hero-actions { display: flex; gap: 12px; justify-content: flex-start; margin-top: 36px; }

/* ── Phone Mockup ── */
.qi-phone {
  width: 298px; border-radius: 40px; background: var(--white);
  border: 2px solid rgba(26,18,9,0.07); overflow: hidden;
  transform: rotate(4deg);
  box-shadow:
    0 54px 104px -34px rgba(0,0,0,0.72),
    0 26px 54px -28px rgba(0,0,0,0.52),
    0 4px 14px rgba(0,0,0,0.30);
}
.qi-phone-screen { position: relative; background: var(--white); }
.qi-phone-statusbar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 4;
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 22px 0; color: #fff;
}
.qi-phone-statusbar span { font-size: 12.5px; font-weight: 700; letter-spacing: 0.2px; }
.qi-phone-sb { display: flex; align-items: flex-end; gap: 3px; }
.qi-phone-sb i { display: block; width: 3px; border-radius: 1px; background: #fff; }
.qi-phone-sb i:nth-child(1) { height: 5px; }
.qi-phone-sb i:nth-child(2) { height: 7px; }
.qi-phone-sb i:nth-child(3) { height: 9px; }
.qi-phone-sb i:nth-child(4) { height: 11px; }
.qi-phone-hero {
  position: relative; height: 132px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: #23221E url('/static/banner.png') center / cover no-repeat;
}
.qi-phone-bizname {
  position: relative; z-index: 2; color: #fff; font-family: 'Noto Serif SC', serif;
  font-weight: 800; font-size: 18px; margin-top: 8px; text-shadow: 0 2px 10px rgba(0,0,0,0.28);
}
.qi-phone-tag { position: relative; z-index: 2; color: #F0DCA6; font-size: 11px; margin-top: 4px; letter-spacing: 0.04em; }
.qi-phone-avatar {
  position: absolute; left: 50%; bottom: -16px; transform: translateX(-50%);
  width: 52px; height: 52px; border-radius: 50%; background: var(--gold-light);
  border: 3px solid var(--white); box-shadow: 0 10px 22px rgba(26,18,9,0.30);
  display: flex; align-items: center; justify-content: center; font-size: 24px; z-index: 6;
}
.qi-phone-body { padding: 36px 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.qi-phone-svc {
  display: flex; align-items: center; gap: 11px;
  background: var(--gold-light); border: 1px solid var(--gold-border);
  border-radius: 14px; padding: 12px 14px;
}
.qi-phone-svc-icon {
  width: 38px; height: 38px; border-radius: 50%; background: var(--white);
  display: flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0;
}
.qi-phone-svc strong { display: block; font-size: 14px; font-weight: 700; color: var(--text); }
.qi-phone-svc small { display: block; font-size: 11px; color: var(--muted); margin-top: 1px; }
.qi-phone-price { margin-left: auto; font-size: 17px; font-weight: 800; color: var(--gold-h); }
.qi-phone-label { font-size: 12px; font-weight: 600; color: var(--muted); margin-top: 2px; }
.qi-phone-datechip {
  align-self: flex-start; font-size: 11px; font-weight: 700; color: var(--gold-h);
  background: var(--gold-light); border: 1px solid var(--gold-border);
  padding: 5px 12px; border-radius: 14px; margin-top: -4px;
}
.qi-phone-slots { display: flex; gap: 7px; }
.qi-phone-slots > span {
  flex: 1; text-align: center; font-size: 12px; font-weight: 600; padding: 9px 0;
  border-radius: 9px; background: var(--bg); border: 1px solid var(--border); color: var(--muted);
}
.qi-phone-slots > span.on { background: var(--gold); border-color: var(--gold); color: var(--text); }
.qi-phone-cta {
  margin-top: 4px; border: none; cursor: default; background: var(--gold); color: var(--text);
  font-family: inherit; font-size: 14px; font-weight: 700; padding: 13px; border-radius: 24px; width: 100%;
}
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}
.btn-lg {
  display: inline-block; color: var(--text);
  padding: 14px 30px; border-radius: 30px; font-size: 15px; font-weight: 700;
  transition: transform 0.1s; letter-spacing: -0.1px;
  background: linear-gradient(90deg, var(--gold) 0%, #E8C96A 40%, var(--gold) 60%, var(--gold-h) 100%);
  background-size: 200% auto;
  animation: shimmer 3s linear infinite;
}
.btn-lg:hover { color: var(--text); text-decoration: none; transform: translateY(-1px); animation-duration: 1s; }
.btn-lg-outline {
  display: inline-block; border: 1.5px solid var(--border); color: var(--muted);
  padding: 14px 30px; border-radius: 30px; font-size: 15px; font-weight: 600;
  background: var(--white);
}
.btn-lg-outline:hover { border-color: var(--gold-border); color: var(--text); text-decoration: none; }

/* ── Trust Strip ── */
.trust-strip {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 8px 20px; padding: 18px 24px;
  background: var(--bg); border-bottom: 1px solid var(--border);
}
.trust-pill {
  font-size: 13px; font-weight: 600; color: var(--gold-h);
  background: var(--gold-light); border: 1px solid var(--gold-border);
  padding: 6px 14px; border-radius: 20px; letter-spacing: 0.01em;
}
.trust-sep { color: var(--border); font-size: 16px; }

/* ── WeChat Mini Program ── */
.wechat-section { padding: 56px 24px; max-width: 1120px; margin: 0 auto; }
.wechat-inner {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 44px 48px;
}
.wechat-copy h2 {
  font-family: 'Noto Serif SC', serif; font-size: 26px; font-weight: 800; color: var(--text);
  margin: 0 0 14px; letter-spacing: -0.5px;
}
.wechat-copy p { font-size: 15px; color: var(--muted); line-height: 1.7; margin: 0 0 20px; max-width: 440px; }
.wechat-points { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.wechat-points li { font-size: 14.5px; color: var(--text); font-weight: 600; padding-left: 16px; position: relative; }
.wechat-points li::before {
  content: ''; position: absolute; left: 0; top: 7px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--gold);
}
.wechat-qr { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.wechat-qr img {
  width: 168px; height: 168px; border-radius: 12px;
  border: 1px solid var(--gold-border); padding: 10px; background: var(--white);
  box-shadow: var(--shadow);
}
.wechat-qr span { font-size: 12.5px; font-weight: 700; color: var(--gold-h); letter-spacing: 0.04em; text-align: center; }

/* ── Features ── */
.features-section {
  padding: 56px 24px; max-width: 940px; margin: 0 auto;
  position: relative;
}
.features-section::before {
  content: '';
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, var(--gold-border), transparent);
}
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.feature-card {
  background: var(--white); border-radius: 0 var(--radius) var(--radius) 0; padding: 28px 24px;
  border: 1px solid var(--border); box-shadow: var(--shadow);
  border-left: 3px solid var(--gold); border-top: none; border-right: none; border-bottom: none;
  padding-left: 28px;
}
.feature-icon { font-size: 26px; margin-bottom: 14px; }
.feature-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.feature-card p { font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.features-heading {
  font-family: 'Noto Serif SC', serif;
  font-size: 22px; font-weight: 800; color: var(--text);
  text-align: center; margin-bottom: 28px; letter-spacing: -0.5px;
}
.feature-card .feature-icon { position: relative; padding-left: 12px; }
.feature-card .feature-icon::before {
  content: ''; position: absolute; left: 0; top: 3px;
  width: 3px; height: 22px; background: var(--gold); border-radius: 2px;
}

/* ── CTA section ── */
.cta-section {
  position: relative;
  text-align: center; background: var(--text); color: var(--white);
  padding: 80px 24px; margin-top: 0;
}
.cta-section::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 80px;
  background: linear-gradient(to bottom, var(--bg), var(--text));
  pointer-events: none;
}
.cta-section h2 { font-size: 30px; font-weight: 800; margin-bottom: 10px; letter-spacing: -0.5px; }
.cta-section p { font-size: 15px; opacity: 0.55; margin-bottom: 28px; }
.cta-section .btn-lg { background: var(--gold); color: var(--text); }
.cta-section .btn-lg:hover { background: var(--gold-h); }

/* ── Footer ── */
.landing-footer {
  text-align: center; padding: 80px 24px 64px;
  border-top: 1px solid var(--border);
}
.footer-qi {
  font-family: 'Noto Serif SC', serif; font-size: 72px; font-weight: 900;
  color: var(--text); line-height: 1; letter-spacing: -2px; margin-bottom: 16px;
}
.footer-slogan { font-size: 14px; color: var(--muted); letter-spacing: 0.05em; margin-bottom: 12px; }
.footer-links {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin-bottom: 16px; font-size: 13px;
}
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--text); text-decoration: none; }
.footer-links span { color: var(--border); }
.footer-copy { font-size: 12px; color: var(--border); }

/* ── Scroll Reveal ── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── Auth ── */
.auth-container { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - 62px); padding: 24px; }
.auth-card {
  background: var(--white); border-radius: 20px; padding: 44px 40px;
  width: 100%; max-width: 440px;
  border: 1px solid var(--border); box-shadow: 0 4px 32px rgba(26,18,9,0.07);
}
.auth-card h1 { font-size: 26px; font-weight: 800; margin-bottom: 4px; letter-spacing: -0.5px; }
.auth-sub { color: var(--muted); font-size: 14px; margin-bottom: 30px; }

.field-label { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; margin-top: 18px; }
.form-input {
  display: block; width: 100%; border: 1.5px solid var(--border); border-radius: 10px;
  padding: 12px 14px; font-size: 15px; font-family: inherit; outline: none;
  background: var(--white); color: var(--text);
  transition: border-color 0.15s;
}
.form-input:focus { border-color: var(--gold); }
.form-input::placeholder { color: #BFB3A6; }

.pw-field { position: relative; }
.pw-field .form-input { padding-right: 44px; }
.pw-toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; padding: 6px;
  color: var(--muted); display: flex; align-items: center;
}
.pw-toggle:hover { color: var(--text); }
.pw-toggle.showing { color: var(--gold); }
.pw-toggle.showing::after {
  content: ''; position: absolute; left: 5px; right: 5px; top: 50%; height: 1.5px;
  background: currentColor; transform: rotate(-45deg);
}
.field-error { display: none; color: #991B1B; font-size: 12px; margin-top: 6px; }
.field-error.show { display: block; }

.slug-preview { display: flex; align-items: center; border: 1.5px solid var(--border); border-radius: 10px; overflow: hidden; }
.slug-preview:focus-within { border-color: var(--gold); }
.slug-prefix { padding: 12px 10px 12px 14px; font-size: 13px; color: var(--muted); white-space: nowrap; background: var(--bg); border-right: 1px solid var(--border); }
.slug-input { border: none; border-radius: 0; flex: 1; padding: 12px 14px; background: transparent; color: var(--text); }
.slug-input:focus { outline: none; }

.btn-primary-full {
  display: block; width: 100%; background: var(--gold); color: var(--text);
  border: none; border-radius: 30px; padding: 14px; font-size: 15px; font-weight: 700;
  cursor: pointer; margin-top: 22px; letter-spacing: -0.1px;
  transition: background 0.15s;
}
.btn-primary-full:hover { background: var(--gold-h); }
.auth-switch { text-align: center; font-size: 14px; color: var(--muted); margin-top: 20px; }
.auth-switch a { color: var(--gold-h); }

/* ══════════════════════════════════════════════════════════
   DASHBOARD
══════════════════════════════════════════════════════════ */
.dash-body { background: var(--bg); color: var(--text); }
.dash-layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 240px; flex-shrink: 0; background: var(--white);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 24px 16px;
  position: sticky; top: 0; height: 100vh;
}
.sidebar-logo { padding: 0 12px; margin-bottom: 6px; }
.sidebar-logo-img { width: 120px; height: auto; display: block; }
.sidebar-biz { font-size: 12px; color: var(--muted); padding: 0 12px; margin-bottom: 28px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.nav-item {
  display: block; padding: 10px 12px; border-radius: 8px; font-size: 14px;
  color: var(--muted); transition: all 0.15s; text-decoration: none;
}
.nav-item:hover { background: var(--bg); color: var(--text); text-decoration: none; }
.nav-item.active { background: var(--gold-light); color: var(--gold-h); font-weight: 600; }
.sidebar-bottom { display: flex; flex-direction: column; gap: 8px; }
.booking-link-btn {
  display: block; text-align: center; background: var(--gold); color: var(--text);
  padding: 9px 12px; border-radius: 8px; font-size: 13px; font-weight: 600;
  text-decoration: none;
}
.booking-link-btn:hover { background: var(--gold-h); color: var(--white); text-decoration: none; }
.logout-link { text-align: center; font-size: 13px; color: var(--muted); padding: 4px; }
.logout-link:hover { color: var(--text); }

.dash-main { flex: 1; padding: 32px 40px; max-width: 900px; }
.dash-header { margin-bottom: 28px; }

.trial-banner {
  display: block; margin-bottom: 20px; padding: 12px 18px; border-radius: 12px;
  background: var(--gold-light); border: 1px solid var(--gold-border);
  color: var(--gold-h); font-size: 14px; font-weight: 600; text-align: center;
}
.trial-banner:hover { background: #F7ECCB; text-decoration: none; }
.trial-banner.expired { background: #FEE2E2; border-color: #FBC4C4; color: #991B1B; }
.dash-header h1 { font-size: 26px; font-weight: 700; color: var(--text); }
.dash-sub { font-size: 14px; color: var(--muted); margin-top: 4px; }
.page-title { font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 24px; }

.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 36px; }
.analytics-stats { grid-template-columns: repeat(4, 1fr); }
.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.stat-card { background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 20px 24px; border-top: 3px solid var(--gold); }
.stat-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }
.stat-value { font-size: 40px; font-weight: 700; color: var(--gold-h); line-height: 1; }
.stat-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }

.section-heading { font-size: 16px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 16px; }

.apt-list { display: flex; flex-direction: column; gap: 10px; }
.apt-card {
  background: var(--white); border: 1px solid var(--border); border-radius: 10px;
  padding: 16px 20px; display: flex; align-items: center; gap: 20px;
}
.apt-time-col { display: flex; flex-direction: column; align-items: flex-start; min-width: 64px; gap: 3px; }
.apt-time { font-size: 22px; font-weight: 800; color: var(--text); line-height: 1; }
.apt-rel-time { font-size: 11px; font-weight: 600; border-radius: 6px; padding: 2px 6px; white-space: nowrap; }
.apt-rel-past { background: #F5F1EA; color: var(--muted); }
.apt-rel-soon { background: var(--gold-light); color: var(--gold-h); border: 1px solid var(--gold-border); }
.apt-info { flex: 1; }
.apt-info strong { display: block; font-size: 15px; color: var(--text); }
.apt-info span { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.apt-comment { font-style: italic; color: var(--muted) !important; }
.apt-phone { font-size: 13px; color: var(--muted); }
.empty-msg { color: var(--muted); font-size: 14px; padding: 24px 0; }
.empty-today { text-align: center; padding: 40px 24px; }
.empty-today-icon { font-size: 36px; margin-bottom: 10px; }
.empty-today-msg { font-size: 18px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.empty-today-sub { font-size: 13px; color: var(--muted); }
.quick-actions { display: flex; gap: 12px; margin-bottom: 28px; flex-wrap: wrap; }
.quick-btn { padding: 10px 20px; background: var(--gold); color: var(--text); border-radius: 20px; font-size: 14px; font-weight: 600; text-decoration: none; }
.quick-btn:hover { background: var(--gold-h); color: var(--white); text-decoration: none; }
.quick-btn-outline { background: var(--white); border: 1.5px solid var(--border); color: var(--muted); }
.quick-btn-outline:hover { border-color: var(--gold-border); color: var(--text); }

.add-service-form { background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 24px; margin-bottom: 28px; }
.add-service-form h2 { font-size: 16px; font-weight: 600; margin-bottom: 16px; color: var(--text); }
.form-row { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 12px; align-items: end; }
.dash-input {
  background: var(--bg); border: 1.5px solid var(--border); border-radius: 8px;
  padding: 10px 12px; font-size: 14px; color: var(--text); font-family: inherit; width: 100%;
  outline: none; transition: border-color 0.15s;
}
.dash-input:focus { border-color: var(--gold); }
.dash-input::placeholder { color: #BFB3A6; }
.btn-add {
  background: var(--gold); color: var(--text); border: none; border-radius: 8px;
  padding: 10px 20px; font-size: 14px; font-weight: 600; cursor: pointer; width: 100%;
}
.btn-add:hover { background: var(--gold-h); color: var(--white); }
.btn-label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; }

.svc-table { width: 100%; }
.svc-table th { text-align: left; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.svc-table td { padding: 14px 12px; border-bottom: 1px solid var(--bg); font-size: 14px; color: #5A4A3A; vertical-align: middle; }
.svc-table tr:hover td { background: var(--bg); }
.svc-name { font-weight: 600; color: var(--text); }
.svc-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.btn-delete { background: none; border: 1px solid var(--border); color: var(--muted); border-radius: 6px; padding: 5px 12px; font-size: 12px; cursor: pointer; }
.btn-delete:hover { border-color: var(--red); color: var(--red); }

.hours-form { background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 24px; }
.hours-row { display: flex; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--bg); }
.hours-row:last-of-type { border-bottom: none; }
.hours-day { width: 100px; font-size: 14px; font-weight: 600; color: var(--text); }
.hours-closed-wrap { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.hours-closed-wrap input[type=checkbox] { accent-color: var(--gold); width: 16px; height: 16px; }
.time-range { display: flex; align-items: center; gap: 8px; }
.time-range span { color: var(--muted); font-size: 13px; }
.btn-save { background: var(--gold); color: var(--text); border: none; border-radius: 8px; padding: 12px 28px; font-size: 15px; font-weight: 600; cursor: pointer; margin-top: 20px; }
.btn-save:hover { background: var(--gold-h); color: var(--white); }

.filter-tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.tab-btn { background: var(--white); border: 1.5px solid var(--border); color: var(--muted); border-radius: 20px; padding: 7px 18px; font-size: 14px; cursor: pointer; text-decoration: none; }
.tab-btn:hover, .tab-btn.active { background: var(--text); border-color: var(--text); color: var(--white); text-decoration: none; }
.apt-table { width: 100%; border-collapse: collapse; }
.apt-table th { text-align: left; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; padding: 8px 14px; border-bottom: 1px solid var(--border); }
.apt-table td { padding: 14px; border-bottom: 1px solid var(--bg); font-size: 14px; color: #5A4A3A; vertical-align: middle; }
.apt-table tr:hover td { background: var(--bg); }
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-confirmed { background: #DCFCE7; color: #166534; }
.badge-cancelled { background: #FEE2E2; color: #991B1B; }
.btn-cancel { background: none; border: 1.5px solid var(--border); color: var(--muted); border-radius: 6px; padding: 5px 12px; font-size: 12px; cursor: pointer; }
.btn-cancel:hover { border-color: var(--red); color: var(--red); }
.empty-table { text-align: center; color: var(--muted); padding: 60px 0; font-size: 14px; }

.settings-card { background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 28px; max-width: 520px; }
.settings-card h2 { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 20px; }
.dash-label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; margin-top: 14px; text-transform: uppercase; letter-spacing: 0.04em; }
.dash-textarea { resize: vertical; min-height: 80px; }
.slug-display { padding: 10px 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; font-size: 14px; color: var(--muted); }

/* ── Skeleton Loader ── */
@keyframes skel-shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.skel-item {
  height: 76px; border-radius: 14px; margin-bottom: 10px;
  background: linear-gradient(90deg, #EDE8DF 25%, #F5F1EA 50%, #EDE8DF 75%);
  background-size: 800px 100%;
  animation: skel-shimmer 1.5s infinite linear;
}

/* ══════════════════════════════════════════════════════════
   BOOKING PAGE (customer-facing)
══════════════════════════════════════════════════════════ */
.book-body { background: var(--bg); min-height: 100vh; }

.book-hero {
  position: relative;
  width: 100%;
  height: 240px;
  background: linear-gradient(135deg, #F5ECD7 0%, #E8D5A3 40%, #D4B87A 100%);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.book-container { max-width: 760px; margin: 0 auto; padding: 0 16px 60px; }

.book-header {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 16px; padding: 20px 24px;
  margin-top: -48px; position: relative; z-index: 10; margin-bottom: 4px;
  border: 1px solid var(--border);
}
.biz-avatar {
  width: 64px; height: 64px; border-radius: 50%; background: var(--gold-light);
  display: flex; align-items: center; justify-content: center; font-size: 28px; flex-shrink: 0;
  border: 2px solid var(--gold-border);
}
.book-header h1 { font-size: 20px; font-weight: 800; color: var(--text); letter-spacing: -0.3px; }
.book-header p { font-size: 14px; color: var(--muted); margin-top: 3px; }

.screen { display: none; }
.screen.active { display: block; }

.section-title { font-size: 17px; font-weight: 700; margin: 24px 0 12px; color: var(--text); letter-spacing: -0.2px; }

.service-item {
  background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius);
  display: flex; align-items: center; gap: 16px; padding: 16px 20px; margin-bottom: 10px;
  cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.service-item:hover {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.12);
  transform: translateX(4px);
}
.svc-icon {
  width: 48px; height: 48px; border-radius: 50%; background: var(--gold-light);
  display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0;
}
.svc-name { font-size: 15px; font-weight: 600; color: var(--text); }
.svc-name-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.svc-meta { text-align: right; flex-shrink: 0; margin-left: auto; }
.svc-duration { font-size: 13px; color: var(--muted); }
.svc-price { font-size: 16px; font-weight: 700; color: var(--gold-h); margin-top: 2px; }

.service-bar {
  background: var(--white); border-radius: var(--radius); padding: 14px 20px;
  margin: 16px 0; display: flex; align-items: center; gap: 16px;
  box-shadow: var(--shadow); border: 1px solid var(--border);
}
.service-bar .svc-icon { width: 40px; height: 40px; font-size: 18px; }
.service-bar .svc-meta { display: flex; gap: 16px; margin-left: auto; color: var(--muted); font-size: 14px; }

.btn-back { background: none; border: none; color: var(--muted); font-size: 14px; cursor: pointer; display: flex; align-items: center; gap: 4px; padding: 8px 0; font-weight: 500; margin-bottom: 4px; }
.btn-back:hover { color: var(--text); }

.calendar-nav { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.month-label { font-size: 17px; font-weight: 700; flex: 1; color: var(--text); }
.btn-nav { width: 32px; height: 32px; background: none; border: none; font-size: 22px; cursor: pointer; color: var(--muted); border-radius: 8px; }
.btn-nav:hover { background: var(--gold-light); color: var(--text); }
.btn-today {
  background: transparent; color: var(--gold-h);
  border: 1.5px solid var(--gold-border); border-radius: 20px;
  padding: 5px 16px; font-size: 14px; cursor: pointer; font-weight: 600;
}
.btn-today:hover { background: var(--gold-light); }

.week-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.day-col { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.day-header { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-bottom: 4px; }
.day-letter { font-size: 11px; color: var(--muted); font-weight: 600; }
.day-number { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; color: var(--text); }
.day-number.today { background: var(--text); color: var(--white); }
.slot-btn {
  width: 100%; background: var(--gold); color: var(--text);
  border: none; border-radius: 9px; padding: 9px 0;
  font-size: 12px; font-weight: 600; cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.slot-btn:hover { background: var(--gold-h); color: var(--white); transform: translateY(-1px); }
.no-slots { font-size: 11px; color: #C8B9A8; text-align: center; }

.modal-overlay { position: fixed; inset: 0; background: rgba(26,18,9,0.45); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.modal-overlay.hidden { display: none; }
.modal { background: var(--white); border-radius: 20px; padding: 28px 24px; width: 100%; max-width: 460px; box-shadow: 0 20px 60px rgba(26,18,9,0.15); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-header h2 { font-size: 18px; font-weight: 800; color: var(--text); }
.btn-close { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--muted); width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.btn-close:hover { background: var(--bg); }
.apt-preview {
  border: 1.5px solid var(--gold-border); border-radius: var(--radius);
  padding: 14px; margin-bottom: 16px; display: flex; align-items: center; gap: 14px;
  background: var(--gold-light);
}
.apt-preview-info strong { display: block; font-size: 14px; font-weight: 700; color: var(--text); }
.apt-preview-info span { font-size: 13px; color: var(--muted); }
.comment-field {
  width: 100%; border: 1.5px solid var(--border); border-radius: 10px;
  padding: 10px 12px; font-size: 14px; resize: none; height: 72px;
  font-family: inherit; outline: none; color: var(--text); background: var(--white);
}
.comment-field:focus { border-color: var(--gold); }
.char-count { font-size: 12px; color: var(--muted); text-align: right; margin: 4px 0 16px; }
.btn-primary {
  width: 100%; background: var(--gold); color: var(--text);
  border: none; border-radius: 30px; padding: 13px;
  font-size: 15px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background 0.15s;
}
.btn-primary:hover { background: var(--gold-h); color: var(--white); }
.btn-primary:disabled { background: var(--gold-light); color: var(--muted); cursor: not-allowed; }

.login-card {
  background: var(--white); border-radius: var(--radius); padding: 28px 24px;
  margin-top: 16px; box-shadow: var(--shadow); border: 1px solid var(--border);
}
.login-card h2 { font-size: 18px; font-weight: 800; margin-bottom: 20px; text-align: center; color: var(--text); }
.book-input {
  display: block; width: 100%; border: 1.5px solid var(--border); border-radius: 10px;
  padding: 13px 14px; font-size: 15px; margin-bottom: 12px;
  font-family: inherit; outline: none; color: var(--text); background: var(--white);
}
.book-input:focus { border-color: var(--gold); }
.book-input::placeholder { color: #BFB3A6; }
.sms-consent-label {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 4px 0 14px; cursor: pointer;
}
.sms-consent-label input[type=checkbox] {
  flex-shrink: 0; margin-top: 2px; width: 16px; height: 16px;
  accent-color: var(--gold); cursor: pointer;
}
.sms-consent-label span {
  font-size: 12px; color: var(--muted); line-height: 1.5;
}

.success-card {
  background: var(--white); border-radius: var(--radius); padding: 48px 24px;
  margin-top: 16px; text-align: center;
  box-shadow: var(--shadow); border: 1px solid var(--border);
}
.success-icon {
  width: 72px; height: 72px; border-radius: 50%; background: var(--gold); color: var(--text);
  font-size: 34px; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px;
}
.success-card h2 { font-size: 22px; font-weight: 800; margin-bottom: 8px; color: var(--text); }
.success-card > p { color: var(--muted); font-size: 14px; }
.success-details {
  background: var(--gold-light); border-radius: 12px;
  border: 1px solid var(--gold-border);
  padding: 16px; margin: 16px 0 24px; text-align: left;
}
.success-details p { font-size: 14px; margin-bottom: 6px; color: var(--text); }
.success-details p:last-child { margin-bottom: 0; }
.success-details strong { color: var(--gold-h); }

/* ── Booking Steps ── */
.booking-steps { display: flex; align-items: center; gap: 0; padding: 20px 0 8px; margin-bottom: 8px; }
.booking-steps .step { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; padding: 6px 12px; border-radius: 20px; transition: all 0.2s; }
.booking-steps .step.active { background: var(--gold-light); color: var(--gold-h); border: 1px solid var(--gold-border); }
.booking-steps .step.done { color: var(--gold-h); }
.booking-steps .step-line { flex: 1; height: 1px; background: var(--border); min-width: 16px; }

/* ── Explore ── */
.explore-header {
  text-align: center; padding: 64px 24px 28px;
  border-bottom: 1px solid var(--border);
}
.explore-header h1 { font-size: 30px; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.5px; color: var(--text); font-family: 'Noto Serif SC', serif; }
.explore-header p { color: var(--muted); font-size: 15px; }

.explore-filters {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  padding: 24px 24px 28px; max-width: 900px; margin: 0 auto;
}
.filter-chip {
  padding: 7px 18px; border-radius: 20px; font-size: 13px; font-weight: 500;
  border: 1.5px solid var(--border); color: var(--muted); background: var(--white);
  cursor: pointer; transition: all 0.15s;
}
.filter-chip:hover { border-color: var(--gold-border); color: var(--text); text-decoration: none; }
.filter-chip.active { background: var(--text); border-color: var(--text); color: var(--white); }

.explore-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px; max-width: 960px; margin: 0 auto; padding: 0 24px 60px;
}
.explore-empty { grid-column: 1/-1; text-align: center; color: var(--muted); padding: 48px 0; font-size: 15px; }

.biz-card {
  background: var(--white); border-radius: 16px; padding: 0;
  border: 1.5px solid var(--border); box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 0; overflow: hidden;
  cursor: pointer; transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  color: var(--text);
}
.biz-card-banner {
  height: 100px;
  background: linear-gradient(135deg, #F5ECD7 0%, #E8D5A3 50%, #D4B87A 100%);
  background-size: cover;
  background-position: center;
  border-radius: 14px 14px 0 0;
}
.biz-card-inner { padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.biz-card:hover {
  transform: translateY(-2px); box-shadow: 0 8px 24px rgba(26,18,9,0.1);
  border-color: var(--gold-border); text-decoration: none;
}
.biz-card-top { display: flex; align-items: center; justify-content: space-between; }
.biz-avatar {
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, #C9A84C, #8B6914);
  color: white; font-size: 18px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.biz-category-badge {
  font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 12px;
  background: var(--bg); color: var(--muted); border: 1px solid var(--border);
}
.biz-name { font-size: 16px; font-weight: 700; color: var(--text); }
.biz-address { font-size: 12px; color: var(--muted); }
.biz-desc { font-size: 13px; color: var(--muted); line-height: 1.5; }
.biz-book-btn { margin-top: auto; font-size: 13px; font-weight: 600; color: var(--gold-h); padding-top: 8px; }
.biz-svc-row { display: flex; align-items: center; gap: 6px; }
.biz-service-count {
  font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 10px;
  background: var(--gold-light); color: var(--gold-h); border: 1px solid var(--gold-border);
  display: inline-block;
}
.biz-service-none { font-size: 12px; color: var(--muted); font-style: italic; }
.explore-title-underline {
  display: inline-block;
  border-bottom: 3px solid var(--gold);
  padding-bottom: 4px;
}
.explore-empty-icon { font-size: 36px; margin-bottom: 10px; }
.explore-empty-hint { font-size: 13px; margin-top: 6px; color: var(--muted); }

/* ── Responsive ── */
@media (max-width: 900px) {
  .hero-rich { padding: 64px 24px 56px; }
  .hero-rule { display: none; }
  .hero-rich-inner { grid-template-columns: 1fr; gap: 36px; }
  .hero-copy { text-align: center; }
  .hero-rich .hero-actions { justify-content: center; }
  .hero-rich .hero-sub { margin-left: auto; margin-right: auto; }
  .qi-phone { width: 240px; }
  .wechat-inner { grid-template-columns: 1fr; padding: 32px 24px; text-align: center; }
  .wechat-copy p { margin-left: auto; margin-right: auto; }
  .wechat-points { align-items: center; }
  .wechat-points li { padding-left: 0; }
  .wechat-points li::before { display: none; }
}
/* ── Mobile top bar & bottom nav (hidden on desktop) ─────── */
.mobile-topbar { display: none; }
.mobile-bottom-nav { display: none; }
.mobile-more-overlay { display: none; }

@media (max-width: 768px) {
  /* Hide desktop sidebar */
  .sidebar { display: none !important; }

  /* Mobile top bar */
  .mobile-topbar {
    display: flex; align-items: center; gap: 10px;
    position: fixed; top: 0; left: 0; right: 0; height: 52px;
    background: white; border-bottom: 1px solid #E8D5A3;
    padding: 0 16px; z-index: 200;
    transform: translateZ(0); -webkit-transform: translateZ(0);
    will-change: transform; backface-visibility: hidden;
  }
  .mobile-biz-name {
    flex: 1; font-size: 14px; font-weight: 700;
    color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .mobile-book-link {
    font-size: 12px; font-weight: 600; color: var(--gold-h);
    white-space: nowrap; text-decoration: none;
  }

  /* Mobile bottom nav */
  .mobile-bottom-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0;
    height: 62px; background: white; border-top: 1px solid #E8D5A3;
    z-index: 200; padding-bottom: env(safe-area-inset-bottom);
    transform: translateZ(0); -webkit-transform: translateZ(0);
    will-change: transform; backface-visibility: hidden;
  }
  .mobile-tab {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 2px;
    color: #AAA; text-decoration: none; padding: 6px 4px;
    background: none; border: none; cursor: pointer; font-family: inherit;
  }
  .mobile-tab.active { color: var(--gold-h); }
  .mobile-tab:hover { text-decoration: none; }
  .tab-icon { font-size: 20px; line-height: 1; }
  .tab-label { font-size: 10px; font-weight: 600; }

  /* Mobile "more" drawer */
  .mobile-more-overlay {
    display: none; position: fixed; inset: 0; z-index: 300;
    background: rgba(26,18,9,0.45); align-items: flex-end;
  }
  .mobile-more-overlay.open { display: flex; }
  .mobile-more-sheet {
    width: 100%; background: white; border-radius: 20px 20px 0 0;
    padding: 12px 20px calc(20px + env(safe-area-inset-bottom));
    box-shadow: 0 -8px 30px rgba(0,0,0,0.2);
  }
  .mobile-more-handle {
    width: 40px; height: 4px; border-radius: 2px; background: #ddd;
    margin: 4px auto 16px;
  }
  .mobile-more-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px 4px;
  }
  .mobile-more-item {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    font-size: 22px; color: var(--text); text-decoration: none;
    padding: 12px 4px; border-radius: 12px;
  }
  .mobile-more-item span { font-size: 11px; font-weight: 600; color: var(--muted); }
  .mobile-more-item:active { background: var(--gold-light); }
  .mobile-more-logout {
    display: block; text-align: center; margin-top: 14px; padding: 12px;
    color: var(--red); font-size: 14px; font-weight: 600; text-decoration: none;
    border: 1px solid var(--border); border-radius: 12px;
  }

  /* Layout adjustments */
  .dash-layout { flex-direction: column; }
  .dash-main {
    padding: 16px; padding-top: 68px; padding-bottom: 78px;
    max-width: 100%;
  }

  /* Stats */
  .stats-row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .analytics-stats { grid-template-columns: 1fr 1fr; }
  .stat-value { font-size: 32px !important; }
  .chart-grid { grid-template-columns: 1fr; }

  /* Tables: horizontal scroll */
  .apt-table, .services-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Forms */
  .form-row { grid-template-columns: 1fr; }
  .hours-row { flex-wrap: wrap; gap: 8px; }
  .settings-card { padding: 20px 16px; }

  /* Customer detail: stack two columns */
  .cust-grid { grid-template-columns: 1fr !important; }

  /* Booking page */
  .week-grid { gap: 3px; }
  .slot-btn { font-size: 10px; padding: 8px 0; min-height: 36px; }

  /* Public pages */
  .public-nav { padding: 0 20px; }
  .hero-rich { padding: 48px 20px 40px; }
  .hero-preview { display: none; }
  .hero-actions { flex-direction: column; align-items: center; }
  .auth-card { padding: 32px 24px; }
  .explore-grid { grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 12px 60px; }
}

/* ── Home insight line ── */
.dash-insight {
  margin: 16px 0 4px; padding: 12px 16px;
  background: var(--gold-light); border: 1px solid var(--gold-border);
  border-radius: 12px; font-size: 14px; font-weight: 600; color: var(--gold-h);
}

/* ── Customer detail grid ── */
.cust-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* ── Analytics: Revenue Hero Stat Card (本月收入) ── */
.stat-card-hero-dark {
  background: linear-gradient(135deg, #1A1209 0%, #3D2410 100%);
  border-color: rgba(201,168,76,0.3);
  border-top-color: var(--gold);
}
.stat-card-hero-dark .stat-label { color: rgba(201,168,76,0.65); }
.stat-card-hero-dark .stat-value { color: var(--gold); font-size: 52px; }
.stat-card-hero-dark .stat-sub { color: rgba(201,168,76,0.5); }

/* ── Blackouts page additions ──────────────────────────────── */

/* 1. Date input cross-browser consistency */
input[type="date"].dash-input {
  color: var(--text);
  font-family: inherit;
}
input[type="date"].dash-input::-webkit-datetime-edit,
input[type="date"].dash-input::-webkit-datetime-edit-fields-wrapper,
input[type="date"].dash-input::-webkit-datetime-edit-text,
input[type="date"].dash-input::-webkit-datetime-edit-day-field,
input[type="date"].dash-input::-webkit-datetime-edit-month-field,
input[type="date"].dash-input::-webkit-datetime-edit-year-field {
  color: var(--text);
  font-family: inherit;
}
input[type="date"].dash-input::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.5;
  filter: invert(0.15);
}

/* 2. Action card — gold left border for "添加" card */
.settings-card-action {
  border-left: 3px solid var(--gold);
}

/* 3. Blackout table row hover — more visible inside white card */
.blackout-table tr:hover td {
  background: #F5EDE0;
}

/* ════════════════════════════════════════════════
   Services page — layout & visual enhancements
════════════════════════════════════════════════ */

/* Form: 4-col grid, name+subtitle each span 2 cols */
.svc-form-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  align-items: end;
}
.svc-form-grid .svc-col-2 { grid-column: span 2; }

/* Table: visible row separators override the near-invisible bg-color border */
.svc-table td { border-bottom: 1px solid var(--border); }
.svc-table tbody tr:last-child td { border-bottom: none; }
.svc-table tbody tr:hover td { background: #F2EBE0; }

/* Emoji cell: 28px, centered, consistent width */
.svc-emoji-cell {
  font-size: 28px;
  text-align: center;
  width: 52px;
  vertical-align: middle;
  line-height: 1.2;
}

/* Delete button: smooth transition; default stays gray, only turns red on hover */
.btn-delete { transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease; }
.btn-delete:hover { background: #FEF2F2; border-color: var(--red); color: var(--red); }

/* Services form: responsive collapse on mobile */
@media (max-width: 600px) {
  .svc-form-grid { grid-template-columns: 1fr 1fr; }
  .svc-form-grid .svc-col-2 { grid-column: span 2; }
}

/* ══════════════════════════════════════════════════════════
   DASHBOARD HOME UI ENHANCEMENTS
══════════════════════════════════════════════════════════ */

/* ── Hero stat card (today's bookings) ── */
.stat-card-hero {
  background: linear-gradient(135deg, #FEF5D3 0%, var(--gold-light) 100%);
  border-top: 4px solid var(--gold-h);
  box-shadow: 0 4px 24px rgba(201,168,76,0.18);
}
.stat-card-hero .stat-value { font-size: 56px; color: var(--text); }
.stat-card-hero .stat-label { font-size: 13px; font-weight: 700; color: var(--text); }
.stat-card-hero .stat-sub { font-weight: 600; color: var(--muted); }

/* ── Secondary stat cards (week / total) ── */
.stat-card-secondary .stat-value { font-size: 30px; color: var(--muted); }
.stat-card-secondary .stat-label { color: #BFB3A6; }
.stat-card-secondary .stat-sub { color: #BFB3A6; }

/* ── Appointment customer avatar ── */
.apt-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--gold); color: #fff;
  font-size: 15px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(201,168,76,0.28);
}

/* ── Quick action primary button ── */
.quick-btn:not(.quick-btn-outline) {
  box-shadow: 0 2px 10px rgba(201,168,76,0.30);
  padding: 11px 26px;
}


/* ── Dashboard number override: stat values → dark text ── */
.stat-value                      { color: var(--text); }
.stat-card-secondary .stat-value { color: var(--text); }
.stat-card-hero-dark .stat-value { color: var(--text); }

/* ── Appointment expand rows (reschedule / notes) ── */
.apt-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.expand-row td {
  background: #f8f6f2;
  border-top: none;
  padding: 10px 20px 14px;
}

.reschedule-form {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.reschedule-form label {
  font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap;
}
.reschedule-form input[type="datetime-local"] {
  border: 1px solid var(--border); border-radius: 8px;
  padding: 6px 10px; font-size: 13px; color: var(--text); background: white;
}
.btn-reschedule {
  background: none; border: 1px solid var(--gold); color: var(--gold-h);
  border-radius: 8px; padding: 4px 12px; font-size: 13px; cursor: pointer; font-weight: 600;
}
.btn-reschedule:hover { background: var(--gold-light); }
.btn-confirm-reschedule {
  background: var(--gold); color: white; border: none;
  border-radius: 8px; padding: 6px 14px; font-size: 13px; cursor: pointer; font-weight: 600;
}
.btn-confirm-reschedule:hover { background: var(--gold-h); }
.btn-cancel-inline {
  background: none; border: 1px solid var(--border); color: var(--muted);
  border-radius: 8px; padding: 6px 12px; font-size: 13px; cursor: pointer;
}
.btn-cancel-inline:hover { background: #f0ece4; }

.btn-note-toggle {
  background: none; border: none; cursor: pointer;
  font-size: 16px; padding: 3px 5px; line-height: 1; opacity: 0.6;
}
.btn-note-toggle:hover { opacity: 1; }

.note-badge { font-size: 13px; margin-left: 4px; cursor: pointer; vertical-align: middle; }

.note-area { display: flex; align-items: flex-start; gap: 12px; }
.note-area label {
  font-size: 13px; font-weight: 600; color: var(--muted);
  white-space: nowrap; padding-top: 7px;
}
.note-area textarea {
  flex: 1; border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 12px; font-size: 13px; resize: vertical; min-height: 64px;
  font-family: inherit; color: var(--text); background: white;
}
.note-area textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 2px rgba(201,168,76,0.15); }

/* ── Service card: price highlight ── */
.svc-info { flex: 1; min-width: 0; }
.svc-price-main { font-size: 17px; font-weight: 700; color: var(--gold-h); margin-top: 4px; }
.svc-price-tbd { font-size: 13px; color: var(--muted); margin-top: 4px; font-style: italic; }

/* ── Confirm Summary Screen ── */
.confirm-card {
  background: var(--white); border-radius: var(--radius); padding: 24px;
  margin-top: 16px; box-shadow: var(--shadow); border: 1px solid var(--border);
}
.confirm-title {
  font-size: 17px; font-weight: 700; color: var(--text);
  margin-bottom: 20px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.confirm-rows { margin-bottom: 24px; }
.confirm-row {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.confirm-row:last-child { border-bottom: none; }
.confirm-label { font-size: 13px; color: var(--muted); flex-shrink: 0; width: 72px; }
.confirm-value { font-size: 14px; font-weight: 600; color: var(--text); text-align: right; }
.confirm-actions { display: flex; gap: 12px; }
.confirm-actions .btn-secondary {
  flex: 1; padding: 14px; border-radius: 12px;
  border: 1.5px solid var(--border); background: var(--white);
  font-size: 15px; font-weight: 600; color: var(--text);
  cursor: pointer; transition: border-color 0.15s;
}
.confirm-actions .btn-secondary:hover { border-color: var(--gold); }
.confirm-actions .btn-primary { flex: 2; }

/* ── Book Page: Floating biz header card ── */
.biz-header-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 4px 24px rgba(26,18,9,0.12);
  border: 1px solid var(--border);
  max-width: 720px;
  margin: -40px auto 0;
  position: relative;
  z-index: 10;
  padding: 24px 28px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}
.biz-header-card h1 {
  font-size: 22px; font-weight: 800; color: var(--text); letter-spacing: -0.3px; margin: 0;
}
.biz-header-card p {
  font-size: 14px; color: var(--muted); margin: 0;
}
.biz-logo-box {
  width: 60px; height: 60px; border-radius: 14px;
  background: linear-gradient(135deg, #C9A84C, #8B6914);
  border: 2px solid var(--gold-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 800; color: white;
  margin-bottom: 4px;
}

/* ── Service item entrance animation ── */
.service-item { opacity: 0; transform: translateY(20px); }
.service-item.svc-visible {
  opacity: 1; transform: translateY(0);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.service-item.svc-visible:hover { transform: translateX(4px); }

/* ── 员工管理页 ── */
.staff-grid { display: flex; flex-direction: column; gap: 16px; }
.staff-card { background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.staff-head { display: flex; align-items: center; gap: 14px; }
.staff-avatar {
  width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0;
  background: var(--gold-light); border: 1px solid var(--gold-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; overflow: hidden;
}
.staff-avatar img { width: 100%; height: 100%; object-fit: cover; }
.staff-meta { min-width: 0; }
.staff-name { font-size: 16px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 8px; }
.staff-bio { font-size: 13px; color: var(--muted); margin-top: 3px; }
.staff-badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px; }
.staff-badge-on { background: #E8F6EE; color: var(--green); }
.staff-badge-off { background: #F3F0EB; color: var(--muted); }
.staff-actions { display: flex; align-items: center; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.staff-tab-btn {
  background: none; border: 1px solid var(--border); color: #5A4A3A;
  border-radius: 8px; padding: 7px 14px; font-size: 13px; cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.staff-tab-btn:hover { border-color: var(--gold); color: var(--gold-h); background: var(--gold-light); }
.staff-tab-btn.active { border-color: var(--gold); color: #1A1209; background: var(--gold); font-weight: 600; }
.staff-panel { display: none; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--bg); }
.staff-panel.open { display: block; }
.staff-svc-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.staff-svc-item {
  display: flex; align-items: center; gap: 8px; font-size: 14px; color: #5A4A3A;
  padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer;
}
.staff-svc-item:hover { border-color: var(--gold-border); background: var(--bg); }
.staff-svc-item input[type=checkbox] { accent-color: var(--gold); width: 16px; height: 16px; }
@media (max-width: 640px) {
  .staff-svc-list { grid-template-columns: 1fr; }
}

/* FullCalendar 图标字体在部分环境加载失败，直接用文字符号兜底 */
.fc-icon { font-family: inherit !important; font-weight: 700; font-size: 1.2em !important; }
.fc-icon-chevron-left::before { content: "\2039" !important; }
.fc-icon-chevron-right::before { content: "\203A" !important; }
.fc-icon-chevrons-left::before { content: "\00AB" !important; }
.fc-icon-chevrons-right::before { content: "\00BB" !important; }

/* ══════════════════════════════════════════════════════════
   GLOBAL MOBILE SAFETY LAYER (≤600px)
   兜底：防横向溢出 / 图片、表格、表单不溢出 / tap 目标够大
   放在文件末尾，同断点下比上方 768/600 规则后出现，冲突时以此为准
══════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
  /* 防止任何元素撑出横向滚动条 */
  html, body { overflow-x: hidden; max-width: 100%; }

  /* 图片自适应，不溢出容器 */
  img { max-width: 100%; height: auto; }
  /* 表格单元格里的小图(头像/图标)保持固定尺寸，不被 max-width 压塌 */
  td img, th img { max-width: none; height: auto; }

  /* 数据表窄屏横滚：只针对本站数据表，绝不动 FullCalendar(.fc 内部靠 table 布局，会被压塌) */
  .apt-table, .services-table, .svc-table {
    display: block; max-width: 100%;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
  }

  /* 表单控件不超出容器宽度 */
  input, textarea, select { max-width: 100%; }
  input[type=file] { max-width: 100%; font-size: 12px; }

  /* 主按钮 / 可点项最小高度，保证 tap 目标 ≥ 44px */
  .btn-primary-full, .btn-primary, .btn-lg, .btn-lg-outline,
  .btn-save, .btn-add, .quick-btn, .btn-sm, .booking-link-btn,
  .slot-btn, .btn-primary-full:disabled { min-height: 44px; }

  /* 容器 / 卡片窄屏 padding 收敛，别贴边也别过宽 */
  .auth-card { padding: 28px 20px; }
  .settings-card, .add-service-form, .hours-form, .login-card,
  .confirm-card, .staff-card { padding: 20px 16px; }
  .biz-header-card { padding: 20px 18px 16px; }
  .book-container { padding: 0 12px 48px; }

  /* 通用模态 / 弹层：限制高度并可内部滚动 */
  .modal { max-height: 90vh; overflow-y: auto; }
  .modal-overlay { padding: 12px; }
}

/* ---------- 手机端：数据表 → 卡片（客户/预约） ---------- */
@media (max-width: 600px) {
  .apt-table, .apt-table tbody, .apt-table tr, .apt-table td { display: block; width: auto; }
  .apt-table thead { display: none; }
  .apt-table tbody tr:not(.expand-row) {
    background: var(--white); border: 1px solid var(--border); border-radius: 14px;
    padding: 12px 16px; margin-bottom: 12px; box-shadow: var(--shadow);
  }
  .apt-table td { border: none !important; padding: 4px 0 !important; white-space: normal !important; text-align: left; }
  .apt-table td[data-label]::before {
    content: attr(data-label) "："; font-weight: 600; color: var(--muted); margin-right: 4px;
  }
  html[lang="en"] .apt-table td[data-label]::before {
    content: attr(data-label) ": ";
  }
  .apt-table td.cell-avatar { display: none !important; }
  .apt-table td.cell-head {
    font-size: 17px; font-weight: 700; color: var(--text);
    padding-bottom: 8px !important; margin-bottom: 6px;
    border-bottom: 1px solid var(--border) !important;
  }
  .apt-table td.cell-actions { padding-top: 12px !important; display: flex; gap: 8px; flex-wrap: wrap; }
  .apt-table td.cell-actions form { display: inline; }
  .apt-table tr.expand-row td { padding: 0 0 10px !important; }
}
