: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; }
.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; }
.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; }
.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; } }
