:root {
  --bg: #0c1222;
  --bg-card: #111827;
  --sidebar: #0f172a;
  --sidebar-w: 240px;
  --accent: #2dd4bf;
  --accent-dim: rgba(45, 212, 191, 0.15);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --main: #f8fafc;
  --ink: #0f172a;
  --border: #1e293b;
  --danger: #f87171;
  --font: "DM Sans", "Noto Sans SC", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  background: var(--main);
  color: var(--ink);
}

a {
  color: var(--accent);
  text-decoration: none;
}

.app {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #0b1220 0%, #0f172a 50%, #0b1220 100%);
  border-right: 1px solid var(--border);
  padding: 1.5rem 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.brand {
  padding: 0 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.5rem;
}

.brand h1 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
}

.brand p {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.4;
}

.nav {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  flex: 1;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 1.25rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.nav a.active {
  color: var(--accent);
  background: var(--accent-dim);
  border-left-color: var(--accent);
}

.nav .ico {
  font-size: 1.1rem;
  opacity: 0.9;
}

.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
  padding: 1.75rem 2rem 3rem;
}

.panel {
  display: none;
  animation: fade 0.25s ease;
}

.panel.is-visible {
  display: block;
}

@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.page-title {
  margin: 0 0 1.25rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
}

.grid-kpi {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.kpi {
  background: #fff;
  border-radius: 12px;
  padding: 1.15rem 1.25rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  border: 1px solid #e2e8f0;
}

.kpi .label {
  font-size: 0.8rem;
  color: #64748b;
  margin-bottom: 0.35rem;
}

.kpi .val {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.kpi .val.accent {
  color: #0d9488;
}

.card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  margin-bottom: 1.25rem;
  overflow: hidden;
}

.card-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f1f5f9;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.card-h h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #334155;
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.data-table th,
.data-table td {
  padding: 0.65rem 1rem;
  text-align: left;
  border-bottom: 1px solid #f1f5f9;
}

.data-table th {
  background: #f8fafc;
  color: #64748b;
  font-weight: 600;
  white-space: nowrap;
}

.data-table tr:hover td {
  background: #fafafa;
}

.data-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: filter 0.15s, transform 0.1s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, #0d9488, #14b8a6);
  color: #fff;
}

.btn-primary:hover {
  filter: brightness(1.05);
}

.btn-ghost {
  background: #f1f5f9;
  color: #475569;
}

.btn-ghost:hover {
  background: #e2e8f0;
}

.btn-danger {
  background: #fef2f2;
  color: #b91c1c;
}

.btn-danger:hover {
  background: #fee2e2;
}

.btn-sm {
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
}

.row-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-rmb {
  background: #ecfdf5;
  color: #047857;
}

.badge-u {
  background: #eff6ff;
  color: #1d4ed8;
}

.log-meta {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 0.25rem;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop.is-open {
  display: flex;
}

.modal {
  background: #fff;
  border-radius: 14px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-lg {
  max-width: 560px;
}

.modal-h {
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-h h3 {
  margin: 0;
  font-size: 1.05rem;
  color: #0f172a;
}

.modal-body {
  padding: 1.25rem;
}

.form-row {
  margin-bottom: 0.9rem;
}

.form-row label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 0.35rem;
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
}

/* 下拉里明确为原生下拉，避免与输入框难区分 */
.form-row select {
  min-height: 2.4rem;
  max-width: 100%;
  background: #fff;
  color: #0f172a;
  cursor: pointer;
  appearance: auto;
  -webkit-appearance: menulist;
  -moz-appearance: menulist;
  line-height: 1.3;
  border-color: #94a3b8;
}

.modal .form-row select {
  background-color: #f8fafc;
}

.form-row textarea {
  min-height: 70px;
  resize: vertical;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: #2dd4bf;
  box-shadow: 0 0 0 3px var(--accent-dim);
}

/* 预付：人民币锁汇率=1、折算只读 */
.yfc-huilv-locked {
  background: #f1f5f9 !important;
  color: #64748b;
  cursor: not-allowed;
}
.yfc-rmb-calc {
  background: #f8fafc !important;
  color: #334155;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1.1rem;
}

.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  padding: 0.75rem 1.1rem;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 10px;
  font-size: 0.9rem;
  z-index: 300;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  display: none;
  max-width: 90vw;
}

.toast.is-show {
  display: block;
  animation: toast 0.25s ease;
}

@keyframes toast {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
  }
}

.empty {
  padding: 2rem;
  text-align: center;
  color: #94a3b8;
  font-size: 0.9rem;
}

/* —— 登录页（login.php）独立版式，与主应用区隔 —— */
body.login-page {
  position: relative;
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1.25rem 2.5rem;
  font-family: "DM Sans", "Noto Sans SC", system-ui, sans-serif;
  color: #e2e8f0;
  background: #0b1220;
  overflow-x: hidden;
}

body.login-page .yfc-login-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: radial-gradient(1200px 600px at 20% 10%, rgba(45, 212, 191, 0.12), transparent 55%),
    radial-gradient(900px 500px at 90% 70%, rgba(20, 184, 166, 0.08), transparent 50%),
    linear-gradient(165deg, #0b1220 0%, #0f172a 38%, #0c1324 100%);
  pointer-events: none;
}

body.login-page .yfc-login-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  animation: yfcLoginIn 0.5s ease;
}

@keyframes yfcLoginIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

body.login-page .yfc-login-card {
  width: 100%;
  background: #fff;
  color: #0f172a;
  border-radius: 20px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 24px 48px -12px rgba(15, 23, 42, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  overflow: hidden;
}

body.login-page .yfc-login-accent {
  height: 4px;
  background: linear-gradient(90deg, #0d9488, #2dd4bf, #5eead4, #0d9488);
  background-size: 200% 100%;
  animation: yfcShine 4s ease infinite;
}

@keyframes yfcShine {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

body.login-page .yfc-login-head {
  padding: 1.6rem 1.75rem 0.5rem;
  text-align: center;
}

body.login-page .yfc-login-logo {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
  background: linear-gradient(145deg, #0d9488, #14b8a6);
  box-shadow: 0 12px 28px rgba(13, 148, 136, 0.38);
}

body.login-page .yfc-login-title {
  margin: 0 0 0.6rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

body.login-page .yfc-login-hint {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.55;
  color: #64748b;
  max-width: 32em;
  margin-left: auto;
  margin-right: auto;
}

body.login-page .yfc-login-hint code {
  background: #f1f5f9;
  padding: 0.1rem 0.35rem;
  border-radius: 5px;
  font-size: 0.88em;
  color: #334155;
  font-weight: 600;
}

body.login-page .yfc-login-form {
  padding: 1.1rem 1.75rem 1.75rem;
}

body.login-page .yfc-login-field {
  margin-bottom: 1.05rem;
}

body.login-page .yfc-login-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 0.4rem;
  letter-spacing: 0.02em;
}

body.login-page .yfc-login-field input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.7rem 0.9rem;
  font-size: 0.95rem;
  line-height: 1.4;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fafafa;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

body.login-page .yfc-login-field input::placeholder {
  color: #94a3b8;
}

body.login-page .yfc-login-field input:hover {
  border-color: #cbd5e1;
  background: #fff;
}

body.login-page .yfc-login-field input:focus {
  outline: none;
  border-color: #2dd4bf;
  background: #fff;
  box-shadow: 0 0 0 3px var(--accent-dim);
}

body.login-page .yfc-login-err {
  color: #b91c1c;
  font-size: 0.85rem;
  line-height: 1.4;
  margin: 0 0 1rem;
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

body.login-page .yfc-login-err:empty,
body.login-page .yfc-login-err[hidden] {
  display: none;
}

body.login-page .yfc-login-submit {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 0.35rem;
  padding: 0.8rem 1.25rem;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 0.04em;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #0d9488, #14b8a6);
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.35);
  transition: filter 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

body.login-page .yfc-login-submit:hover {
  filter: brightness(1.06);
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.42);
}

body.login-page .yfc-login-submit:active {
  transform: scale(0.99);
}

body.login-page .yfc-login-foot {
  margin: 1.25rem 0 0;
  text-align: center;
  font-size: 0.72rem;
  line-height: 1.4;
  color: rgba(148, 163, 184, 0.85);
  max-width: 24rem;
  align-self: center;
}

body.login-page .yfc-login-restart {
  margin: 0 0 0.5rem;
  padding: 0 1.75rem 1.25rem;
  text-align: center;
  font-size: 0.85rem;
}
body.login-page .yfc-login-restart a {
  color: #14b8a6;
  font-weight: 500;
}
body.login-page .yfc-login-restart a:hover {
  text-decoration: underline;
}

.yfc-totp-wizard {
  margin-top: 1rem;
  padding: 1rem 0 0;
  border-top: 1px solid #e2e8f0;
}

.yfc-totp-wiz-title {
  font-size: 0.85rem;
  color: #475569;
  margin: 0 0 0.75rem;
  line-height: 1.45;
}

.yfc-totp-qrwrap {
  text-align: center;
  margin-bottom: 0.75rem;
}

.yfc-totp-qrwrap img {
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
}

.yfc-totp-secret {
  font-size: 0.8rem;
  color: #64748b;
  margin: 0 0 1rem;
  word-break: break-all;
}

.yfc-totp-secret code {
  background: #f1f5f9;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85em;
}

.yfc-totp-confirmrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.yfc-totp-confirmrow input {
  min-width: 8rem;
  max-width: 12rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.95rem;
}

.yfc-totp-unbind {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

/* 对外统计页 public_shop_stats.php（与 login 同品牌：深色底 + 白卡 + 青绿点缀） */
body.yfc-public-stats {
  position: relative;
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: #0f172a;
  background: #0b1220;
  overflow-x: hidden;
}

.yfc-public-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: radial-gradient(1200px 600px at 20% 10%, rgba(45, 212, 191, 0.12), transparent 55%),
    radial-gradient(900px 500px at 90% 70%, rgba(20, 184, 166, 0.08), transparent 50%),
    linear-gradient(165deg, #0b1220 0%, #0f172a 38%, #0c1324 100%);
  pointer-events: none;
}

.yfc-public-wrap {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.75rem 1.15rem 2.5rem;
  animation: yfcPublicIn 0.45s ease;
}

@keyframes yfcPublicIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.yfc-public-hero {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 24px 48px -12px rgba(15, 23, 42, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.yfc-public-hero-top {
  height: 4px;
  background: linear-gradient(90deg, #0d9488, #2dd4bf, #5eead4, #0d9488);
  background-size: 200% 100%;
  animation: yfcShine 4s ease infinite;
}

.yfc-public-hero-in {
  display: flex;
  align-items: flex-start;
  gap: 1.1rem 1.25rem;
  padding: 1.4rem 1.5rem 1.5rem;
}

.yfc-public-mark {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
  background: linear-gradient(145deg, #0d9488, #14b8a6);
  box-shadow: 0 12px 28px rgba(13, 148, 136, 0.35);
}

.yfc-public-title {
  margin: 0.15rem 0 0.5rem;
  font-size: 1.32rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

.yfc-badge-out {
  display: inline-block;
  margin-left: 0.4rem;
  font-size: 0.68rem;
  font-weight: 600;
  vertical-align: middle;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  background: #e0f2fe;
  color: #0369a1;
}

.yfc-public-sub {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.6;
  color: #64748b;
  max-width: 52em;
}

.yfc-public-link {
  color: #0d9488;
  font-weight: 600;
  margin-left: 0.25rem;
  white-space: nowrap;
}
.yfc-public-link:hover {
  text-decoration: underline;
}

/* 主区：白卡 + 表 */
.yfc-public-card {
  background: #fff;
  color: #0f172a;
  border-radius: 20px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 24px 48px -12px rgba(15, 23, 42, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.yfc-public-card-h {
  padding: 0.9rem 1.5rem 0.5rem;
  border-bottom: 1px solid #f1f5f9;
}

.yfc-public-h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: 0.02em;
}

.yfc-public-search {
  padding: 1rem 1.5rem 0;
}

.yfc-public-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 0.4rem;
  letter-spacing: 0.02em;
}

.yfc-public-search-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.65rem;
}

.yfc-public-input {
  flex: 1 1 200px;
  min-width: 0;
  padding: 0.7rem 0.9rem;
  font-size: 0.95rem;
  line-height: 1.4;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fafafa;
  font-family: inherit;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.yfc-public-input::placeholder {
  color: #94a3b8;
}
.yfc-public-input:hover {
  border-color: #cbd5e1;
  background: #fff;
}
.yfc-public-input:focus {
  outline: none;
  border-color: #2dd4bf;
  background: #fff;
  box-shadow: 0 0 0 3px var(--accent-dim);
}

body.yfc-public-stats .yfc-pub-btn-main {
  padding: 0.7rem 1.25rem;
  font-weight: 600;
  border-radius: 10px;
  box-shadow: 0 3px 12px rgba(13, 148, 136, 0.3);
}
body.yfc-public-stats .yfc-pub-btn-sec {
  border-radius: 10px;
  padding: 0.7rem 1.1rem;
}

.yfc-public-hint {
  margin: 0;
  padding: 0.75rem 1.5rem 1rem;
  font-size: 0.8rem;
  line-height: 1.55;
  color: #64748b;
  border-bottom: 1px solid #f1f5f9;
}

.yfc-public-table-wrap {
  margin: 0;
  padding: 0.25rem 0 0.5rem;
  border-top: none;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

body.yfc-public-stats .yfc-pub-table {
  min-width: 1000px;
  font-size: 0.86rem;
}
body.yfc-public-stats .yfc-pub-table thead th {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  color: #475569;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: none;
  letter-spacing: 0.02em;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
  padding: 0.6rem 0.5rem;
}
body.yfc-public-stats .yfc-pub-table td {
  padding: 0.5rem 0.5rem;
  border-bottom: 1px solid #f1f5f9;
}
body.yfc-public-stats .yfc-pub-table tbody tr:nth-child(even) td {
  background: #fafbfc;
}
body.yfc-public-stats .yfc-pub-table tbody tr:hover td {
  background: #f0fdfa;
}
body.yfc-public-stats .yfc-pub-table .num {
  font-variant-numeric: tabular-nums;
  font-size: 0.85em;
}

.yfc-public-foot {
  text-align: center;
  font-size: 0.72rem;
  line-height: 1.5;
  color: rgba(148, 163, 184, 0.9);
  margin: 0;
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
  padding: 0 0.5rem 0.5rem;
}

@media (max-width: 600px) {
  .yfc-public-hero-in {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .yfc-public-title {
    font-size: 1.15rem;
  }
  .yfc-public-sub {
    max-width: none;
  }
  .yfc-public-search-row {
    flex-direction: column;
  }
  body.yfc-public-stats .yfc-pub-btn-main,
  body.yfc-public-stats .yfc-pub-btn-sec {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.login-page .yfc-login-shell {
    animation: none;
  }
  body.login-page .yfc-login-accent {
    animation: none;
  }
  body.yfc-public-stats .yfc-public-wrap {
    animation: none;
  }
  body.yfc-public-stats .yfc-public-hero-top {
    animation: none;
  }
}

.yfc-user-line {
  font-size: 0.8rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

#yfc-user-name {
  color: #e2e8f0;
  font-weight: 500;
}

.yfc-shop-stats-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.yfc-stats-q {
  min-width: 8rem;
  max-width: 16rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.9rem;
}

#table-shop-stats.yfc-stat-search .yfc-prepay-col {
  display: none;
}

/* 侧栏：官方数据（iframe）、对外统计（复制链接） */
.yfc-official-tbar {
  margin-bottom: 0.9rem;
  padding: 1.1rem 1.25rem 1.15rem;
}

.yfc-official-lead {
  margin: 0 0 0.9rem;
  font-size: 0.86rem;
  line-height: 1.6;
  color: #475569;
  max-width: 46rem;
}

.yfc-official-btns {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
}

a.yfc-official-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.3rem;
  padding: 0.5rem 1.2rem;
  font-weight: 600;
}

/* 与深色内嵌页用浅灰外衬+圆角，减小「白底上挖黑洞」的违和感 */
.yfc-official-embed {
  margin: 0;
  padding: 0.55rem 0.6rem 0.65rem;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #f1f5f9 0%, #e8eef5 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.yfc-official-embed-label {
  margin: 0.15rem 0 0.45rem 0.1rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: none;
  color: #94a3b8;
}

.yfc-official-frame {
  border-radius: 10px;
  overflow: hidden;
  background: #0b0f18;
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(15, 23, 42, 0.35),
    inset 0 0 0 1px rgba(45, 212, 191, 0.12);
  line-height: 0;
}

/* 具体高度由 JS 按子页回写，未加载前不撑满一屏，避免「大片空白」 */
.yfc-iframe-embed {
  display: block;
  width: 100%;
  min-height: 12rem;
  height: 20rem;
  max-height: none;
  border: 0;
  background: #0b0f18;
  vertical-align: top;
}

.yfc-official-foot {
  margin: 0.6rem 0 0;
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.5;
}

.yfc-pq-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.5rem;
  max-width: 40rem;
}

.yfc-pub-url-input {
  flex: 1 1 16rem;
  min-width: 0;
  padding: 0.6rem 0.8rem;
  font-size: 0.9rem;
  line-height: 1.4;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fafafa;
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace, sans-serif;
}
.yfc-pub-url-input:focus {
  outline: none;
  border-color: #2dd4bf;
  background: #fff;
  box-shadow: 0 0 0 3px var(--accent-dim);
}

@media (max-width: 768px) {
  :root {
    --sidebar-w: 200px;
  }

  .brand h1 {
    font-size: 0.95rem;
  }

  .brand p.yfc-brand-sub {
    display: none;
  }

  .nav a {
    font-size: 0.82rem;
    padding: 0.55rem 0.85rem;
  }

  .main {
    padding: 1rem 0.85rem 2rem;
  }
}
