:root { color-scheme: light; font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif; color: #1f2726; background: #f5f7f7; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: #f5f7f7; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.admin-header { height: 70px; padding: 0 34px; display: flex; align-items: center; justify-content: space-between; background: #fff; border-bottom: 1px solid #e8eceb; }
.admin-brand { color: #202624; font-size: 18px; font-weight: 650; text-decoration: none; }
.admin-brand span { display: inline-grid; place-items: center; width: 30px; height: 30px; margin-right: 8px; border-radius: 9px; color: #fff; background: #16bcae; }
.admin-header nav { display: flex; gap: 22px; }
.admin-header nav a { color: #356b8d; text-decoration: none; }
.admin-shell { width: min(1180px, calc(100% - 40px)); margin: 34px auto 70px; }
.admin-intro { display: flex; align-items: end; justify-content: space-between; margin-bottom: 22px; }
.admin-intro p, .panel-title p { margin: 0 0 5px; color: #12a99d; font-size: 13px; }
.admin-intro h1 { margin: 0 0 8px; font-size: 28px; }
.admin-intro span { color: #77817f; font-size: 14px; }
.admin-grid { display: grid; grid-template-columns: 310px minmax(0, 1fr); gap: 20px; align-items: start; }
.store-panel, .editor-panel { background: #fff; border: 1px solid #e4e9e8; border-radius: 10px; }
.store-panel { padding: 20px 14px; }
.store-panel h2 { margin: 0 8px 15px; font-size: 16px; }
.store-list { display: grid; gap: 8px; }
.store-item { width: 100%; min-height: 72px; padding: 10px; border: 1px solid transparent; border-radius: 8px; background: transparent; display: grid; grid-template-columns: 42px 1fr auto; gap: 10px; align-items: center; text-align: left; cursor: pointer; }
.store-item:hover { background: #f6fbfa; }
.store-item.selected { border-color: #9bded8; background: #eefafa; }
.store-avatar { width: 42px; height: 42px; border-radius: 50%; overflow: hidden; background: #dff6f3; position: relative; }
.store-avatar::after { content: "店"; display: grid; place-items: center; height: 100%; color: #0a9b90; }
.store-avatar img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.store-copy { min-width: 0; display: grid; gap: 5px; }
.store-copy strong, .store-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-copy small { color: #76807e; }
.store-item em { padding: 3px 7px; border-radius: 4px; color: #068d83; background: #ddf8f5; font-size: 11px; font-style: normal; }
.editor-panel { padding: 26px 30px 30px; }
.panel-title { padding-bottom: 18px; border-bottom: 1px solid #edf0ef; }
.panel-title h2 { margin: 0; font-size: 20px; }
#store-form { padding-top: 22px; display: grid; gap: 18px; }
label { display: grid; gap: 8px; color: #48514f; font-size: 14px; }
input, select { width: 100%; height: 42px; padding: 0 12px; border: 1px solid #dbe1df; border-radius: 6px; outline: none; background: #fff; color: #202725; }
input:focus, select:focus { border-color: #18b9ad; box-shadow: 0 0 0 3px rgba(24,185,173,.1); }
small { color: #89918f; }
.avatar-row { display: grid; grid-template-columns: 82px 1fr; gap: 18px; align-items: center; }
.avatar-preview { width: 78px; height: 78px; border-radius: 50%; overflow: hidden; background: #ddf6f3; display: grid; place-items: center; color: #079b90; font-size: 25px; }
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-note { margin: -3px 0 0; padding: 11px 13px; color: #64706d; background: #f4f9f8; border-radius: 6px; font-size: 13px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 5px; }
button { min-height: 40px; padding: 0 16px; border: 1px solid #dbe1df; border-radius: 6px; background: #fff; cursor: pointer; }
button.primary { border-color: #10b3a6; color: #fff; background: #10b3a6; }
button.primary.soft { color: #087f77; background: #e9f9f7; }
button.danger { color: #c94b48; }
button:disabled { cursor: wait; opacity: .55; }
.admin-message { min-height: 24px; margin-bottom: 8px; color: #65706e; font-size: 13px; }
.admin-message.error { color: #c43d39; }
.admin-message.success { color: #078f84; }
.admin-tabs { display: flex; gap: 28px; margin: 0 0 14px; border-bottom: 1px solid #dfe5e3; }
.admin-tabs button { padding: 0 3px 12px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; }
.admin-tabs button.active { color: #08a99e; border-color: #11b8ab; font-weight: 650; }
.store-entry { display: grid; gap: 2px; }
.store-links { display: flex; gap: 12px; padding: 0 10px 6px 62px; }
.store-links a { color: #087f77; font-size: 12px; text-decoration: none; }
.store-links a:hover { text-decoration: underline; }
.order-association { min-width: 0; margin: 4px 0 0; padding: 16px; border: 1px solid #e2e8e6; border-radius: 8px; }
.order-association legend { padding: 0 7px; font-weight: 650; }
.association-tools { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 8px; }
.association-list { max-height: 220px; margin: 10px 0 14px; overflow: auto; border: 1px solid #e8eceb; border-radius: 6px; }
.association-option { display: grid; grid-template-columns: 20px 1fr auto; gap: 8px; align-items: center; min-height: 42px; padding: 7px 10px; border-bottom: 1px solid #edf0ef; }
.association-option:last-child { border-bottom: 0; }
.association-option input { width: 16px; height: 16px; }
.association-option small { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.orders-admin { min-width: 0; }
.library-tabs { display: flex; gap: 24px; margin: 0 0 15px; border-bottom: 1px solid #dfe5e3; }
.library-tabs button { min-height: 36px; padding: 0 2px 10px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: #65706e; background: transparent; }
.library-tabs button.active { color: #08a99e; border-color: #11b8ab; font-weight: 650; }
.simple-table-head, .simple-library-row { display: grid; grid-template-columns: minmax(0,1fr) 150px 105px; }
.buyer-table-head, .buyer-library-row { grid-template-columns: minmax(0,1fr) minmax(180px,1fr) 105px; }
.simple-table-head { color: #65706e; background: #fafbfb; border-bottom: 1px solid #e4e8e7; font-size: 13px; }
.simple-table-head span { padding: 13px 14px; }
.simple-library-row { min-height: 78px; border-bottom: 1px solid #e8eceb; }
.simple-library-row > div { min-width: 0; padding: 12px 14px; border-right: 1px solid #edf0ef; }
.simple-library-row > div:last-child { border-right: 0; }
.simple-library-row strong, .simple-library-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.simple-library-row small { margin-top: 5px; color: #77817f; }
.product-library-cell { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; align-items: center; }
.product-library-cell img { width: 52px; height: 52px; border-radius: 6px; object-fit: cover; background: #f6eee3; }
.simple-library-actions { display: flex; gap: 9px; align-items: start; }
.simple-library-actions button { min-height: 28px; padding: 0; border: 0; color: #3c6595; background: transparent; }
.order-toolbar { display: grid; grid-template-columns: minmax(240px,1fr) 170px auto auto auto; gap: 10px; align-items: end; margin-bottom: 15px; }
.order-toolbar label { grid-template-columns: auto 90px; align-items: center; }
.order-admin-grid { display: grid; grid-template-columns: minmax(0,1fr) 390px; gap: 16px; align-items: start; }
.order-library, .order-editor { background: #fff; border: 1px solid #e4e9e8; border-radius: 9px; overflow: hidden; }
.order-table-head, .order-library-row { display: grid; grid-template-columns: minmax(230px,1.4fr) 110px minmax(230px,1.25fr) 100px 105px; gap: 0; }
.order-table-head { color: #65706e; background: #fafbfb; border-bottom: 1px solid #e4e8e7; font-size: 13px; }
.order-table-head span { padding: 13px 14px; }
.order-library-row { min-height: 104px; border-bottom: 1px solid #e8eceb; }
.order-library-row:last-child { border-bottom: 0; }
.order-library-row > div { min-width: 0; padding: 14px; border-right: 1px solid #edf0ef; }
.order-library-row > div:last-child { border-right: 0; }
.product-cell { display: grid; grid-template-columns: 64px minmax(0,1fr); gap: 10px; }
.product-cell img { width: 64px; height: 64px; border-radius: 6px; object-fit: cover; background: #f6eee3; }
.product-cell strong, .product-cell small { display: block; overflow: hidden; text-overflow: ellipsis; }
.product-cell small { margin-top: 5px; color: #77817f; }
.order-row-actions { display: flex; gap: 9px; align-items: start; }
.order-row-actions button { min-height: 28px; padding: 0; border: 0; color: #3c6595; background: transparent; }
.order-editor { position: sticky; top: 16px; padding: 22px; }
#order-form { display: grid; gap: 13px; padding-top: 17px; }
#order-form textarea { min-height: 76px; padding: 10px 12px; resize: vertical; border: 1px solid #dbe1df; border-radius: 6px; font: inherit; }
.product-upload { display: grid; grid-template-columns: 76px 1fr; gap: 13px; align-items: center; }
.product-upload img { width: 76px; height: 76px; border-radius: 6px; object-fit: cover; background: #f6eee3; }
.product-image-search { display: grid; gap: 8px; padding: 11px; border: 1px solid #e3e8e7; border-radius: 6px; background: #fbfcfc; }
.product-image-search > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #48514f; font-size: 14px; }
.product-image-search button { min-height: 30px; padding: 0 10px; color: #087f77; border-color: #b9e5e0; background: #f1fbfa; font-size: 12px; }
.candidate-image { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
.candidate-image input { height: 34px; font-size: 12px; }

.address-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.empty-admin { padding: 60px 20px; color: #8a9290; text-align: center; }
[hidden] { display: none !important; }
@media (max-width: 1080px) { .order-admin-grid { grid-template-columns: 1fr; } .order-editor { position: static; } .order-library { overflow-x: auto; } .order-table-head, .order-library-row { min-width: 860px; } .order-toolbar { grid-template-columns: 1fr 160px auto; } }
@media (max-width: 820px) { .admin-grid { grid-template-columns: 1fr; } .admin-header { padding: 0 20px; } .admin-shell { width: min(100% - 24px, 680px); margin-top: 22px; } .form-row, .address-row { grid-template-columns: 1fr; } .order-toolbar { grid-template-columns: 1fr; } }

.store-products-panel { padding: 24px; border: 1px solid #e4e9e8; border-radius: 10px; background: #fff; }
#store-products-form { display: grid; gap: 22px; }
.store-product-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.store-product-option { grid-template-columns: 20px 58px minmax(0, 1fr); align-items: center; gap: 12px; min-height: 82px; padding: 10px; border: 1px solid #e5e9e8; border-radius: 8px; cursor: pointer; }
.store-product-option:has(input:checked) { border-color: #9bded8; background: #f1fbfa; }
.store-product-option input { width: 16px; height: 16px; }
.store-product-option img { width: 58px; height: 58px; border-radius: 6px; object-fit: cover; background: #f6eee3; }
.store-product-option strong, .store-product-option small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-product-option small { margin-top: 6px; }
.category-select { height: 110px; padding: 7px 12px; }
#category-form { display: grid; gap: 14px; padding-top: 17px; }
/* 店铺管理：保持原有数据结构，仅提升设置区的信息层级和操作反馈。 */
.admin-grid[data-admin-panel="stores"] { grid-template-columns: 322px minmax(0, 1fr); gap: 18px; }
.admin-grid[data-admin-panel="stores"] .store-panel { padding: 18px 12px 14px; }
.store-panel-heading { display: flex; align-items: center; justify-content: space-between; margin: 0 8px 14px; }
.store-panel-heading h2 { margin: 0; color: #25302e; font-size: 16px; line-height: 1.3; }
.store-panel-heading p { margin: 4px 0 0; color: #7a8582; font-size: 12px; }
.admin-grid[data-admin-panel="stores"] .store-list { gap: 10px; }
.admin-grid[data-admin-panel="stores"] .store-entry { gap: 4px; padding-bottom: 8px; border-bottom: 1px solid #eef1f0; }
.admin-grid[data-admin-panel="stores"] .store-entry:last-child { padding-bottom: 0; border-bottom: 0; }
.admin-grid[data-admin-panel="stores"] .store-item { min-height: 76px; padding: 11px; border-color: #edf1f0; background: #fff; }
.admin-grid[data-admin-panel="stores"] .store-item:hover { border-color: #c7ebe6; background: #f7fcfb; }
.admin-grid[data-admin-panel="stores"] .store-item.selected { border-color: #7fd4cc; background: #eefaf8; box-shadow: inset 3px 0 0 #10b3a6; }
.admin-grid[data-admin-panel="stores"] .store-item em { padding: 3px 6px; border-radius: 5px; font-weight: 600; }
.admin-grid[data-admin-panel="stores"] .store-links { flex-wrap: wrap; gap: 5px; margin: -1px 0 0 62px; padding: 0; }
.admin-grid[data-admin-panel="stores"] .store-links a { padding: 4px 6px; border-radius: 5px; color: #397c77; line-height: 1.3; text-decoration: none; }
.admin-grid[data-admin-panel="stores"] .store-links a:hover { color: #087f77; background: #eaf8f6; text-decoration: none; }
.admin-grid[data-admin-panel="stores"] .editor-panel { padding: 28px 30px 30px; }
.admin-grid[data-admin-panel="stores"] .panel-title { display: flex; align-items: flex-start; justify-content: space-between; padding-bottom: 17px; }
.admin-grid[data-admin-panel="stores"] .panel-title h2 { color: #25302e; font-size: 21px; }
.admin-grid[data-admin-panel="stores"] .panel-title > div > span { display: block; margin-top: 6px; color: #7b8582; font-size: 13px; }
.admin-grid[data-admin-panel="stores"] #store-form { gap: 14px; padding-top: 18px; }
.store-settings-section { display: grid; gap: 15px; padding: 18px; border: 1px solid #e7edeb; border-radius: 8px; background: #fcfdfd; }
.store-settings-section-data { border-color: #d8ece9; background: #f7fbfa; }
.store-settings-heading h3 { margin: 0; color: #26302e; font-size: 15px; line-height: 1.4; }
.store-settings-heading p { margin: 4px 0 0; color: #7b8582; font-size: 12px; line-height: 1.5; }
.admin-grid[data-admin-panel="stores"] label { gap: 7px; color: #3f4c49; font-weight: 550; }
.admin-grid[data-admin-panel="stores"] label small { font-weight: 400; }
.admin-grid[data-admin-panel="stores"] input,
.admin-grid[data-admin-panel="stores"] select { border-color: #d7e1df; background: #fff; }
.admin-grid[data-admin-panel="stores"] input::placeholder { color: #9ba6a3; }
.admin-grid[data-admin-panel="stores"] .avatar-row { gap: 16px; padding: 2px 0; }
.admin-grid[data-admin-panel="stores"] .avatar-preview { width: 74px; height: 74px; border: 1px solid #c7ebe6; font-size: 23px; }
.admin-grid[data-admin-panel="stores"] .form-note { margin: 0; padding: 10px 12px; border: 1px solid #dcefeb; border-radius: 6px; background: #eef8f6; color: #5c6d69; }
.admin-grid[data-admin-panel="stores"] .form-actions { gap: 9px; padding-top: 2px; }
.admin-grid[data-admin-panel="stores"] .form-actions button { min-height: 40px; }
.admin-grid[data-admin-panel="stores"] :is(button, .store-links a) { transition: border-color .16s ease, background-color .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease; }
.admin-grid[data-admin-panel="stores"] :is(button, .store-links a):focus-visible { outline: 3px solid rgba(16, 179, 166, .26); outline-offset: 2px; }
.admin-grid[data-admin-panel="stores"] button:not(:disabled):active { transform: translateY(1px); }
@media (min-width: 821px) {
  .admin-grid[data-admin-panel="stores"] .store-panel { position: sticky; top: 16px; }
  .admin-grid[data-admin-panel="stores"] .store-list { max-height: calc(100vh - 220px); overflow-y: auto; padding-right: 2px; }
}
@media (max-width: 820px) {
  .admin-grid[data-admin-panel="stores"] { grid-template-columns: 1fr; gap: 14px; }
  .admin-grid[data-admin-panel="stores"] .editor-panel { padding: 22px 16px; }
  .store-settings-section { padding: 16px; }
}