
* { box-sizing: border-box; }
:root { --page:#f4f6f8; --card:#fff; --line:#e6e8ec; --text:#15181d; --muted:#667085; --ink:#111827; --soft:#f8fafc; --ok-bg:#eaf7ef; --ok:#147d3f; --warn-bg:#f2f4f7; --danger:#b42318; }
html, body { margin: 0; min-height: 100%; font-family: Arial, 'Microsoft YaHei', sans-serif; background: var(--page); color: var(--text); }
button, input, select { font: inherit; }
.phone-page { width: min(520px, 100%); margin: 0 auto; padding-bottom: 88px; background: #fff; min-height: 100vh; }
.landing-image, .delivery-image { display: block; width: 100%; height: auto; }
.empty-landing { min-height: 60vh; display: grid; place-items: center; padding: 24px; color: #777; text-align: center; }
.pay-bar { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: min(520px, 100%); padding: 12px; background: rgba(255,255,255,.96); border-top: 1px solid #e5e5e5; }
.pay-bar button { width: 100%; min-height: 60px; border: 0; border-radius: 6px; background: #e23425; color: #fff; font-weight: 800; font-size: 18px; }
.delivery-only { width: min(720px, 100%); margin: 0 auto; background: #f6f6f6; min-height: 100vh; padding: 12px; }
.delivery-tip { background: #fff; border: 1px solid #e5e5e5; border-radius: 8px; padding: 14px; margin-bottom: 12px; }
.delivery-tip strong { display: block; font-size: 18px; margin-bottom: 4px; }
.delivery-tip span { color: #666; font-size: 14px; }
.delivery-frame { background: #fff; border: 1px solid #e2e2e2; border-radius: 8px; padding: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.05); }
.delivery-frame .delivery-image { border-radius: 4px; margin-bottom: 10px; }
.delivery-frame .delivery-image:last-child { margin-bottom: 0; }
.admin-shell { width: min(980px, calc(100% - 28px)); margin: 0 auto; padding: 22px 0 48px; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: min(380px, 100%); background: #fff; border: 1px solid #ddd; border-radius: 8px; padding: 18px; display: grid; gap: 14px; }
.login-card input { width: 100%; border: 1px solid #ccc; border-radius: 6px; padding: 10px; margin-top: 6px; }
.login-card button { min-height: 44px; border: 0; border-radius: 6px; background: #222; color: #fff; font-weight: 700; }
.auth-link { margin: 0; text-align: center; color: #666; font-size: 14px; }
.auth-link a { color: #111; font-weight: 700; }
.admin-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin: 14px 0; box-shadow: 0 10px 28px rgba(15, 23, 42, .04); }
.admin-card form { display: grid; gap: 12px; }
.admin-card input, .admin-card select { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-top: 6px; background: #fff; outline: none; transition: border-color .15s ease, box-shadow .15s ease; }
.admin-card input:focus, .admin-card select:focus { border-color: #98a2b3; box-shadow: 0 0 0 4px rgba(152,162,179,.16); }
.admin-card input[type="color"] { height: 46px; padding: 5px; }
.admin-card button, .admin-actions a { min-height: 44px; border: 0; border-radius: 10px; padding: 0 16px; background: var(--ink); color: #fff; font-weight: 800; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.admin-actions { display: flex; gap: 10px; }
.product-link { display: grid; gap: 10px; margin-bottom: 14px; }
.product-link .qr { width: 240px; height: 240px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.preview-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.preview-actions .link-btn { min-height: 42px; }
.checkline { display: flex; gap: 8px; align-items: center; }
.checkline input { width: auto; margin: 0; }
.product-edit > summary { list-style: none; min-height: 46px; display: flex; align-items: center; gap: 10px; margin: 0; font-weight: 800; color: #111827; }
.product-edit > summary::-webkit-details-marker { display: none; }
.product-edit > summary::after { content: "展开"; order: 2; min-height: 34px; padding: 0 12px; border-radius: 6px; background: #111; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }
.product-edit[open] > summary { margin-bottom: 12px; }
.product-edit[open] > summary::after { content: "收起"; background: #f1f1f1; color: #222; }
.product-edit > summary > span { order: 1; }
.inline-delete-form { order: 3; margin: 0 0 0 auto; padding: 0; border: 0; display: block !important; }
.inline-delete-form button { min-height: 34px !important; padding: 0 12px !important; border-radius: 6px !important; background: #b42318 !important; color: #fff !important; font-size: 14px !important; }
.version-note { margin: 4px 0 0; padding: 10px 12px; border: 1px solid #d6e4ff; background: #f5f9ff; color: #344054; border-radius: 10px; line-height: 1.55; font-size: 14px; }
.publish-version-form { margin-top: 12px; border-top: 1px solid #eee; padding-top: 12px; }
.publish-version-form button { background: #14532d; }
.delete-form { margin-top: 12px; border-top: 1px solid #eee; padding-top: 12px; }
.delete-form button { background: #b42318; }
.muted { color: #666; }
.success { background: #e7f6ec; color: #155c2f; border: 1px solid #bce4c7; padding: 10px 12px; border-radius: 6px; }
.error { background: #ffe8e5; color: #9d2116; border: 1px solid #ffc3bc; padding: 10px 12px; border-radius: 6px; }
.service-float { position: fixed; right: 8px; top: 42%; z-index: 5; display: inline-flex; align-items: center; justify-content: center; min-height: 42px; min-width: 42px; padding: 0 12px; border-radius: 999px; background: #111; color: #fff; text-decoration: none; font-weight: 700; white-space: nowrap; box-shadow: 0 10px 24px rgba(0,0,0,.18); }
.service-shape-pill { border-radius: 999px; }
.service-shape-rounded { border-radius: 10px; }
.service-shape-square { border-radius: 2px; }
.service-shape-circle { width: 58px; height: 58px; padding: 0 8px; border-radius: 50%; text-align: center; line-height: 1.15; font-size: 13px; white-space: normal; }
.service-modal { position: fixed; inset: 0; z-index: 20; display: none; place-items: center; padding: 20px; background: rgba(0,0,0,.58); }
.service-modal.show { display: grid; }
.service-modal-box { width: min(420px, 94vw); background: #fff; border-radius: 8px; padding: 18px; text-align: center; }
.service-modal-box img { width: min(360px, 82vw); height: auto; border-radius: 6px; }
.service-modal-box button { width: 100%; min-height: 44px; margin-top: 12px; border: 0; border-radius: 6px; background: #111; color: #fff; font-weight: 700; }
.pay-modal { position: fixed; inset: 0; z-index: 30; display: none; place-items: center; padding: 20px; background: rgba(0,0,0,.62); }
.pay-modal.show { display: grid; }
.pay-modal-box { width: min(420px, 94vw); background: #fff; border-radius: 10px; padding: 20px; text-align: center; display: grid; gap: 12px; box-shadow: 0 18px 60px rgba(15,23,42,.28); }
.pay-modal-box strong { font-size: 20px; }
.pay-modal-box img { width: min(300px, 76vw); height: auto; justify-self: center; border: 1px solid #eef0f3; border-radius: 8px; padding: 10px; }
.pay-modal-box span { color: #667085; font-size: 14px; }
.pay-modal-box button { width: 100%; min-height: 44px; border: 0; border-radius: 8px; background: #111827; color: #fff; font-weight: 800; }
.pro-admin { padding-top: 14px; }
.admin-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.admin-top h1 { margin: 0; }
.admin-top a { color: #222; font-weight: 700; }
.top-actions { position: relative; display: flex; align-items: center; gap: 16px; }
.top-password { position: relative; border: 0; padding: 0; }
.top-password summary { list-style: none; margin: 0; cursor: pointer; color: #222; font-weight: 700; }
.top-password summary::-webkit-details-marker { display: none; }
.top-password form { position: absolute; right: 0; top: calc(100% + 12px); z-index: 10; width: min(320px, 86vw); display: grid; gap: 10px; padding: 14px; background: #fff; border: 1px solid #ddd; border-radius: 8px; box-shadow: 0 14px 34px rgba(0,0,0,.12); }
.top-password input { width: 100%; border: 1px solid #ccc; border-radius: 6px; padding: 10px; margin-top: 6px; }
.top-password button { min-height: 40px; border: 0; border-radius: 6px; background: #111; color: #fff; font-weight: 700; }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 14px 0; }
.metric-grid div { background: #fff; border: 1px solid #ddd; border-radius: 8px; padding: 14px; }
.metric-grid b { display: block; font-size: 24px; margin-bottom: 4px; }
.metric-grid span { color: #666; font-size: 13px; }
.metric-grid.small { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 12px 0; }
.metric-grid.small b { font-size: 20px; }
.overview-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.card-head h2 { margin: 0; }
.card-head .link-btn { white-space: nowrap; }
.badge { display: inline-flex; align-items: center; min-height: 24px; margin-left: 8px; padding: 0 9px; border-radius: 999px; background: #eef7f1; color: #17622f; font-size: 12px; font-weight: 700; }
.link-btn { min-height: 38px; border-radius: 10px; padding: 0 13px; background: #f1f3f5; color: #222; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
label small { display: block; margin-top: 4px; color: #777; font-size: 12px; font-weight: 400; }
.edit-sections { display: grid; gap: 10px; margin-top: 8px; }
.edit-section { border: 1px solid var(--line); border-radius: 14px; padding: 0; overflow: hidden; background: #fff; box-shadow: none; }
.edit-section + .edit-section { margin-top: 0; }
.edit-section summary { min-height: 54px; display: grid; grid-template-columns: minmax(108px, auto) 1fr auto; gap: 10px; align-items: center; margin: 0; padding: 0 12px; list-style: none; background: var(--soft); }
.edit-section summary::-webkit-details-marker { display: none; }
.edit-section summary span { display: inline-flex; align-items: center; gap: 8px; font-weight: 900; }
.edit-section summary span::before { content: ""; width: 24px; height: 24px; border-radius: 8px; background: #111827; box-shadow: inset 0 0 0 7px rgba(255,255,255,.16); }
.edit-section summary em { min-width: 0; color: #666; font-size: 12px; font-style: normal; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.edit-section summary::after { content: "展开"; justify-self: end; min-height: 28px; padding: 0 10px; border-radius: 999px; display: inline-flex; align-items: center; background: #111; color: #fff; font-size: 12px; font-weight: 800; }
.edit-section[open] summary { border-bottom: 1px solid var(--line); background: #fff; }
.edit-section[open] summary::after { content: "收起"; background: #eef0f3; color: #222; }
.edit-section-body { display: grid; gap: 10px; padding: 12px; }
.edit-section-body label { margin: 0; }
.color-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.color-grid label:first-child, .color-grid label:nth-child(4), .color-grid label:last-child { grid-column: 1 / -1; }
.upload-field { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.field-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 900; }
.field-head > span:first-child { display: inline-flex; align-items: center; gap: 7px; }
.field-head > span:first-child::before { content: ""; width: 18px; height: 18px; border-radius: 6px; background: linear-gradient(135deg,#111827,#3f4654); }
.upload-count { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 900; }
.upload-count.filled { background: var(--ok-bg); color: var(--ok); }
.upload-count.missing { background: var(--warn-bg); color: #667085; }
.upload-count.append { background: #fef3c7; color: #9a5b00; }
.upload-count.modified { background: #e0f2fe; color: #0369a1; }
.upload-field input[type="file"] { margin-top: 0; padding: 8px; background: #f8fafc; }
.upload-field input[type="file"]::file-selector-button { min-height: 34px; margin-right: 10px; border: 0; border-radius: 9px; padding: 0 12px; background: #111827; color: #fff; font-weight: 800; }
.upload-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.upload-actions a { min-height: 30px; padding: 0 10px; border-radius: 9px; background: #eef0f3; color: #111827; text-decoration: none; display: inline-flex; align-items: center; font-size: 12px; font-weight: 800; }
.compact-form { margin: 10px 0; }
.compact-form button:disabled { opacity: .45; cursor: not-allowed; }
details { border-top: 1px solid #eee; padding-top: 12px; }
summary { cursor: pointer; font-weight: 800; margin-bottom: 12px; }
.detail-toggle { padding: 0; overflow: hidden; }
.detail-toggle summary { list-style: none; margin: 0; min-height: 48px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; background: #111; color: #fff; }
.detail-toggle summary::-webkit-details-marker { display: none; }
.detail-toggle summary::after { content: "展开"; font-size: 13px; opacity: .78; }
.detail-toggle[open] summary::after { content: "收起"; }
.add-product-panel summary { list-style: none; min-height: 46px; display: flex; align-items: center; justify-content: space-between; margin: 0; }
.add-product-panel summary::-webkit-details-marker { display: none; }
.add-product-panel summary::after { content: "新增"; min-height: 34px; padding: 0 12px; border-radius: 6px; background: #111; color: #fff; display: inline-flex; align-items: center; font-size: 14px; }
.add-product-panel[open] summary { margin-bottom: 12px; }
.add-product-panel[open] summary::after { content: "收起"; background: #f1f1f1; color: #222; }
.domain-panel summary { list-style: none; min-height: 46px; display: flex; align-items: center; justify-content: space-between; margin: 0; }
.domain-panel summary::-webkit-details-marker { display: none; }
.domain-panel summary::after { content: "管理"; min-height: 34px; padding: 0 12px; border-radius: 6px; background: #111; color: #fff; display: inline-flex; align-items: center; font-size: 14px; }
.domain-panel[open] summary { margin-bottom: 12px; }
.domain-panel[open] summary::after { content: "收起"; background: #f1f1f1; color: #222; }
.payment-panel summary { list-style: none; min-height: 46px; display: flex; align-items: center; justify-content: space-between; margin: 0; }
.payment-panel summary::-webkit-details-marker { display: none; }
.payment-panel summary::after { content: "配置"; min-height: 34px; padding: 0 12px; border-radius: 6px; background: #111; color: #fff; display: inline-flex; align-items: center; font-size: 14px; }
.payment-panel[open] summary { margin-bottom: 12px; }
.payment-panel[open] summary::after { content: "收起"; background: #f1f1f1; color: #222; }
.payment-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 12px 0; }
.payment-form label { margin: 0; }
.payment-form button, .payment-form .checkline { grid-column: 1 / -1; }
.payment-form button { min-height: 46px; border: 0; border-radius: 10px; background: #111827; color: #fff; font-weight: 900; }
.pay-guide { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 14px 0; }
.pay-guide-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #fafafa; min-width: 0; }
.pay-guide-card.important { background: #f7fbff; border-color: #cfe3ff; }
.pay-guide-card.danger { background: #fff8f2; border-color: #ffd8b5; }
.pay-guide-card h3 { margin: 0 0 10px; font-size: 16px; }
.pay-guide-card p { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px; margin: 8px 0; align-items: start; }
.pay-guide-card p span { word-break: break-all; color: #344054; }
.pay-guide-card ul { margin: 0; padding-left: 18px; display: grid; gap: 7px; }
.pay-guide-card li { line-height: 1.45; }
.pay-guide-card small { display: block; margin-top: 10px; color: var(--muted); line-height: 1.55; }
.domain-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.domain-summary-grid div { border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: #fafafa; display: grid; gap: 6px; min-width: 0; }
.domain-summary-grid b { font-size: 15px; word-break: break-all; }
.domain-summary-grid span { color: var(--muted); font-size: 13px; }
.domain-section { border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin-top: 12px; }
.domain-section h3 { margin: 0 0 8px; font-size: 17px; }
.domain-list { display: grid; gap: 10px; margin-bottom: 12px; }
.domain-row { display: grid; grid-template-columns: minmax(220px, 1fr) auto auto; gap: 10px; align-items: center; padding: 10px; border: 1px solid #eee; border-radius: 8px; }
.domain-row input { margin: 0; }
.domain-add-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; }
.domain-add-form label { margin: 0; }
.password-panel summary { list-style: none; min-height: 46px; display: flex; align-items: center; justify-content: space-between; margin: 0; }
.password-panel summary::-webkit-details-marker { display: none; }
.password-panel summary::after { content: "修改"; min-height: 34px; padding: 0 12px; border-radius: 6px; background: #111; color: #fff; display: inline-flex; align-items: center; font-size: 14px; }
.password-panel[open] summary { margin-bottom: 12px; }
.password-panel[open] summary::after { content: "收起"; background: #f1f1f1; color: #222; }
.user-panel summary { list-style: none; min-height: 46px; display: flex; align-items: center; justify-content: space-between; margin: 0 0 12px; }
.user-panel summary::-webkit-details-marker { display: none; }
.user-panel > summary::after { content: "展开"; min-height: 34px; padding: 0 12px; border-radius: 6px; background: #111; color: #fff; display: inline-flex; align-items: center; font-size: 14px; }
.user-panel[open] > summary::after { content: "收起"; background: #f1f1f1; color: #222; }
.agent-head, .agent-item > summary { display: grid; grid-template-columns: 1.1fr .7fr .7fr 1.45fr 1.2fr; gap: 12px; align-items: center; min-width: 880px; }
.agent-head { color: #666; font-size: 13px; font-weight: 700; padding: 8px 10px; border-bottom: 1px solid #eee; }
.agent-item { border-top: 0; padding: 0; overflow-x: auto; }
.agent-item > summary { list-style: none; margin: 0; padding: 12px 10px; font-weight: 700; border-bottom: 1px solid #eee; }
.agent-item > summary::-webkit-details-marker { display: none; }
.agent-item .table-wrap { margin: 8px 0 14px; }
.agent-actions { display: flex; gap: 8px; align-items: center; }
.inline-form { margin: 0; }
.inline-form button { min-height: 34px; padding: 0 12px; border: 0; border-radius: 6px; background: #111; color: #fff; font-weight: 700; }
.inline-form button:disabled { opacity: .4; cursor: not-allowed; }
.withdraw-inline button { background: #147d3f; }
.danger-inline button { background: #b42318; }
.refund-inline button { background: #b42318; }
.refund-badge { display: inline-flex; min-height: 28px; align-items: center; padding: 0 10px; border-radius: 999px; background: #eef0f3; color: #475467; font-size: 12px; font-weight: 900; }
.trade-search { display: grid; grid-template-columns: minmax(220px, 1fr) auto auto auto; gap: 10px; align-items: end; padding: 14px; }
.trade-search label { margin: 0; }
.trade-search input { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-top: 6px; outline: none; }
.trade-search button { min-height: 42px; border: 0; border-radius: 10px; padding: 0 16px; background: #111827; color: #fff; font-weight: 800; }
.trade-search > span { color: #667085; font-size: 13px; white-space: nowrap; align-self: center; }
.history-summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 14px; }
.history-summary div { border: 1px solid #eee; border-radius: 8px; padding: 14px; }
.history-summary b { display: block; font-size: 22px; margin-bottom: 4px; }
.history-summary span { color: #666; font-size: 13px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { border-bottom: 1px solid #eee; padding: 10px; text-align: left; white-space: nowrap; }
@media (max-width: 680px) {
  .admin-shell { width: min(100% - 20px, 980px); padding-bottom: 28px; }
  .admin-top { align-items: flex-start; }
  .top-actions { gap: 12px; padding-top: 8px; }
  .metric-grid { grid-template-columns: 1fr; }
  .overview-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .overview-grid div { padding: 10px 8px; }
  .overview-grid b { font-size: 17px; }
  .overview-grid span { font-size: 12px; }
  .product-card .metric-grid.small { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .metric-grid.small div { padding: 10px 8px; }
  .metric-grid.small b { font-size: 17px; }
  .metric-grid.small span { font-size: 12px; }
  .admin-card { padding: 14px; }
  .admin-actions { flex-direction: column; }
  .edit-section summary { grid-template-columns: 1fr; gap: 4px; padding: 10px 12px; }
  .edit-section summary em { text-align: left; white-space: normal; }
  .edit-section summary::after { grid-column: 1; justify-self: stretch; justify-content: center; }
  .color-grid { grid-template-columns: 1fr; }
  .color-grid label:first-child, .color-grid label:nth-child(4), .color-grid label:last-child { grid-column: auto; }
  .trade-search { grid-template-columns: 1fr; padding: 12px; }
  .trade-search > span { justify-self: start; }
  .domain-summary-grid { grid-template-columns: 1fr; }
  .domain-row, .domain-add-form { grid-template-columns: 1fr; }
  .domain-row .agent-actions { flex-wrap: wrap; }
  .pay-guide { grid-template-columns: 1fr; }
  .pay-guide-card p { grid-template-columns: 1fr; gap: 2px; }
  .payment-form { grid-template-columns: 1fr; }
  .product-link .qr { width: 220px; height: 220px; max-width: 100%; }
  .preview-actions { grid-template-columns: 1fr; }
}
