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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

a {
    color: #4a90d9;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

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

.admin-sidebar {
    width: 250px;
    background: linear-gradient(180deg, #1a1f36 0%, #2d3561 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 28px;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    text-decoration: none;
}

.nav-item.active {
    background: rgba(74, 144, 217, 0.2);
    color: #fff;
    border-left-color: #4a90d9;
}

.nav-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.nav-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 12px 0;
}

.nav-item.logout {
    color: rgba(255, 255, 255, 0.5);
}

.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.admin-header {
    background: #fff;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e4e7ed;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.page-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #4a90d9;
    color: #fff;
    border-radius: 50%;
    font-weight: 600;
    text-transform: uppercase;
}

.user-role {
    color: #909399;
    font-size: 13px;
}

.admin-content {
    flex: 1;
    padding: 24px;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    padding: 40px;
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-header h1 {
    font-size: 28px;
    color: #333;
    margin-bottom: 8px;
}

.login-header p {
    color: #909399;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #ebeef5;
    color: #909399;
    font-size: 13px;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-error {
    background: #fef0f0;
    color: #f56c6c;
    border: 1px solid #fbc4c4;
}

.alert-success {
    background: #f0f9eb;
    color: #67c23a;
    border: 1px solid #c2e7b0;
}

.alert-icon {
    font-size: 18px;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-row .form-group {
    flex: 1;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px 14px;
}

.form-grid .form-group {
    margin-bottom: 0;
}

.form-grid .form-group label {
    margin-bottom: 4px;
    font-size: 13px;
}

.form-grid .form-input {
    padding: 7px 10px;
    font-size: 13px;
}

.form-grid .span-2 {
    grid-column: span 2;
}

.form-grid .span-4 {
    grid-column: span 4;
}

.product-edit-page .form-container,
.site-product-edit-page .form-container {
    padding: 20px;
}

/* SPU 编辑页：左侧信息区 + 右侧分类区 两列布局 */
.spu-edit-layout {
    display: grid;
    grid-template-columns: minmax(0, 2.4fr) minmax(300px, 1fr);
    gap: 20px;
    align-items: stretch;
}

.spu-edit-main {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
    align-content: start;
}

.spu-edit-main .form-group {
    margin-bottom: 0;
}

.spu-col-2 {
    grid-column: span 2;
}

.spu-col-3 {
    grid-column: span 3;
}

.spu-col-6 {
    grid-column: span 6;
}

.spu-edit-main textarea.form-input {
    resize: vertical;
    line-height: 1.5;
}

.spu-textarea-images {
    min-height: 150px;
}

.spu-textarea-lang {
    min-height: 420px;
}

.spu-textarea-attributes {
    min-height: 320px;
}

.spu-edit-side {
    display: flex;
    flex-direction: column;
}

.spu-edit-side .form-group {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.spu-category-tree {
    flex: 1;
    max-height: 1000px;
    min-height: 480px;
    gap: 2px;
}

/* 分类树节点：父级可收起/展开 */
.spu-category-tree .cat-node-row {
    display: flex;
    align-items: center;
    gap: 2px;
}

.spu-category-tree .cat-toggle {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    padding: 0;
    border: none;
    background: none;
    color: #909399;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.spu-category-tree .cat-toggle[aria-expanded="false"] {
    transform: rotate(-90deg);
}

.spu-category-tree .cat-toggle:hover {
    color: #4a90d9;
}

.spu-category-tree .cat-toggle-empty {
    display: inline-block;
    cursor: default;
    pointer-events: none;
}

.spu-category-tree .cat-children {
    margin-left: 9px;
    padding-left: 12px;
    border-left: 1px dashed #e4e7ed;
}

.spu-category-tree .category-checkbox-item {
    white-space: normal;
    padding: 2px 0;
}

@media (max-width: 1200px) {
    .spu-edit-layout {
        grid-template-columns: 1fr;
    }

    .spu-category-tree {
        min-height: 240px;
    }
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #606266;
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #dcdfe6;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
    background: #fff;
}

.form-input:focus {
    outline: none;
    border-color: #4a90d9;
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.1);
}

.form-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #dcdfe6;
    border-radius: 8px;
    font-size: 14px;
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-textarea:focus {
    outline: none;
    border-color: #4a90d9;
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.1);
}

.form-hint {
    margin-top: 6px;
    font-size: 12px;
    color: #909399;
}

.html-editor {
    border: 1px solid #dcdfe6;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.html-editor-tabs {
    display: flex;
    gap: 4px;
    padding: 6px 8px;
    background: #f5f7fa;
    border-bottom: 1px solid #dcdfe6;
}

.html-editor-tab {
    padding: 4px 12px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 13px;
    border-radius: 4px;
    color: #606266;
}

.html-editor-tab.active {
    background: #fff;
    color: #1976d2;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.html-editor-pane {
    display: none;
}

.html-editor-pane.active {
    display: block;
}

.html-editor-pane textarea {
    border: none;
    border-radius: 0;
    resize: vertical;
}

.html-editor-preview-content {
    padding: 16px;
    min-height: 200px;
    overflow: auto;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    background: #f5f7fa;
    color: #606266;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

.btn-primary {
    background: #4a90d9;
    color: #fff;
}

.btn-primary:hover {
    background: #3a7cc4;
}

.btn-secondary {
    background: #f5f7fa;
    color: #606266;
}

.btn-secondary:hover {
    background: #e4e7ed;
}

.btn-danger {
    background: #f56c6c;
    color: #fff;
}

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

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-block {
    width: 100%;
}

.btn-back {
    margin-right: 16px;
}

.dashboard-page {
    max-width: 1400px;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-icon.total {
    background: #ecf5ff;
}

.stat-icon.online {
    background: #f0f9eb;
}

.stat-icon.offline {
    background: #fef0f0;
}

.stat-icon.blog {
    background: #fdf6ec;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}

.stat-value.small {
    font-size: 14px;
}

.stat-label {
    font-size: 13px;
    color: #909399;
}

.dashboard-section {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.section-desc {
    font-size: 13px;
    color: #909399;
}

.sites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.site-card {
    background: #fff;
    border: 1px solid #e4e7ed;
    border-radius: 10px;
    padding: 20px;
    transition: all 0.2s;
}

.site-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.site-card.online {
    border-left: 4px solid #67c23a;
}

.site-card.offline {
    border-left: 4px solid #f56c6c;
}

.site-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.site-status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #67c23a;
    margin-top: 6px;
    flex-shrink: 0;
}

.site-card.offline .site-status-indicator {
    background: #f56c6c;
}

.site-info {
    flex: 1;
    min-width: 0;
}

.site-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.site-domain {
    font-size: 13px;
    color: #909399;
    word-break: break-all;
}

.site-type {
    padding: 4px 10px;
    background: #ecf5ff;
    color: #4a90d9;
    border-radius: 4px;
    font-size: 12px;
}

.site-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.site-stat {
    display: flex;
    flex-direction: column;
}

.site-stat .stat-label {
    font-size: 12px;
    color: #c0c4cc;
    margin-bottom: 4px;
}

.site-stat .stat-value {
    font-size: 14px;
    font-weight: 600;
}

.text-success {
    color: #67c23a;
}

.text-danger {
    color: #f56c6c;
}

.site-actions {
    display: flex;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid #f2f6fc;
}

.sites-page,
.sites-edit-page,
.sites-config-page,
.sites-blog-page,
.products-page,
.media-page,
.blog-edit-page,
.media-upload-page {
    max-width: 1400px;
}

.page-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.page-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.header-info {
    flex: 1;
}

.header-info .site-domain {
    font-size: 13px;
}

.header-actions {
    display: flex;
    gap: 12px;
    margin-left: auto;
}

.page-actions {
    margin-bottom: 20px;
}

.table-container {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: #f5f7fa;
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    color: #606266;
    font-size: 14px;
    border-bottom: 1px solid #ebeef5;
}

.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #ebeef5;
    font-size: 14px;
}

.data-table tbody tr:hover {
    background: #f5f7fa;
}

.data-table tbody tr.orders-row {
    cursor: pointer;
}

.data-table .order-link {
    color: #2563eb;
    text-decoration: none;
}

.data-table .order-link:hover {
    text-decoration: underline;
}

.order-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px 24px;
    background: #fff;
    border: 1px solid #ebeef5;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 20px;
    font-size: 14px;
}

.order-meta .meta-label {
    color: #909399;
    margin-right: 8px;
}

.order-meta .meta-value {
    color: #303133;
    font-weight: 500;
}

.order-section {
    background: #fff;
    border: 1px solid #ebeef5;
    border-radius: 8px;
    padding: 18px 20px;
    margin-bottom: 20px;
}

.order-section h3 {
    font-size: 15px;
    font-weight: 600;
    color: #303133;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f2f5;
}

.order-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.order-grid .order-section {
    margin-bottom: 20px;
}

.item-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.item-table th {
    text-align: left;
    color: #909399;
    font-weight: 500;
    padding: 8px 10px;
    border-bottom: 1px solid #f0f2f5;
}

.item-table td {
    padding: 10px;
    border-bottom: 1px solid #f7f8fa;
    color: #303133;
    vertical-align: middle;
}

.item-table .text-right {
    text-align: right;
}

.item-name {
    display: flex;
    align-items: center;
    gap: 10px;
}

.item-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #ebeef5;
}

.spec-chip {
    display: inline-block;
    background: #f4f4f5;
    color: #606266;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 12px;
    margin: 2px 4px 2px 0;
}

.spec-chip-custom {
    background: #fdf2f8;
    color: #db2777;
}

.summary-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 14px;
}

.summary-list li {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 6px 0;
    color: #606266;
}

.summary-list li span:last-child {
    color: #303133;
    text-align: right;
    word-break: break-all;
}

.summary-list .summary-total {
    border-top: 1px solid #f0f2f5;
    margin-top: 6px;
    padding-top: 10px;
    font-weight: 600;
}

.summary-list .summary-total span {
    color: #db2777;
    font-size: 16px;
}

.address-block {
    font-style: normal;
    font-size: 14px;
    color: #606266;
    line-height: 1.8;
}

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12px;
}

.text-danger {
    color: #f56c6c;
}

.empty-tip {
    color: #909399;
    font-size: 13px;
}

.timeline {
    list-style: none;
    margin: 0;
    padding: 0 0 0 8px;
    font-size: 14px;
}

.timeline li {
    position: relative;
    padding: 0 0 18px 20px;
    color: #909399;
}

.timeline li:last-child {
    padding-bottom: 0;
}

.timeline .dot {
    position: absolute;
    left: 0;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #d9d9d9;
}

.timeline li.done {
    color: #303133;
}

.timeline li.done .dot {
    background: #db2777;
}

.timeline li.cancelled .dot {
    background: #909399;
}

.timeline li div p {
    color: #909399;
    font-size: 12px;
    margin-top: 2px;
}

.data-table .actions {
    white-space: nowrap;
}

.search-bar {
    margin-bottom: 20px;
}

.search-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.search-form select {
    padding: 9px 12px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    color: #606266;
    min-width: 160px;
}

.search-form .search-input {
    flex: 1;
    min-width: 220px;
    padding: 9px 12px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    font-size: 14px;
}

.search-form .search-input:focus {
    outline: none;
    border-color: #409eff;
}

.data-table .actions .btn {
    margin-right: 6px;
}

.badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: #f0f9eb;
    color: #67c23a;
}

.badge-warning {
    background: #fdf6ec;
    color: #e6a23c;
}

.badge-danger {
    background: #fef0f0;
    color: #f56c6c;
}

.badge-gray {
    background: #f4f4f5;
    color: #909399;
}

.badge-type {
    background: #ecf5ff;
    color: #4a90d9;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #909399;
}

.empty-state p {
    margin-bottom: 16px;
    font-size: 16px;
}

.form-container {
    background: #fff;
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.config-layout {
    display: flex;
    gap: 24px;
}

.config-sidebar {
    width: 220px;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.config-sidebar h3 {
    font-size: 14px;
    color: #909399;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.config-list {
    list-style: none;
}

.config-list li {
    margin-bottom: 4px;
}

.config-list a {
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    color: #606266;
    font-size: 14px;
    transition: all 0.2s;
}

.config-list a:hover {
    background: #f5f7fa;
    color: #4a90d9;
    text-decoration: none;
}

.config-list a.active {
    background: #ecf5ff;
    color: #4a90d9;
    font-weight: 600;
}

.config-main {
    flex: 1;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.config-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #ebeef5;
}

.config-toolbar h3 {
    font-size: 16px;
    font-weight: 600;
}

.toolbar-actions {
    display: flex;
    gap: 8px;
}

.config-editor {
    padding: 20px;
}

.editor-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    border-bottom: 1px solid #ebeef5;
}

.tab-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: #606266;
    cursor: pointer;
    font-size: 14px;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.tab-btn.active {
    color: #4a90d9;
    border-bottom-color: #4a90d9;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.json-editor {
    width: 100%;
    min-height: 80vh;
    padding: 16px;
    border: 1px solid #dcdfe6;
    border-radius: 8px;
    font-family: "Monaco", "Menlo", monospace;
    font-size: 13px;
    line-height: 1.6;
    resize: vertical;
    background: #fafafa;
}

.json-editor:focus {
    outline: none;
    border-color: #4a90d9;
    background: #fff;
}

.config-data pre {
    background: #f5f7fa;
    padding: 16px;
    border-radius: 8px;
    font-family: "Monaco", "Menlo", monospace;
    font-size: 13px;
    overflow-x: auto;
}

.empty-config {
    text-align: center;
    padding: 40px;
    color: #909399;
}

/* 配置示例侧栏 */
.config-example {
    width: 500px;
    flex-shrink: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 24px;
    max-height: calc(100vh - 48px);
    overflow: hidden;
    border: 1px solid #ebeef5;
}

.config-example-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #ebeef5;
    background: linear-gradient(135deg, #f0f9eb 0%, #ecf5ff 100%);
}

.config-example-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.config-example-name {
    padding: 2px 10px;
    background: #fff;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    font-size: 12px;
    color: #4a90d9;
    font-family: "Monaco", "Menlo", monospace;
    font-weight: 600;
}

.config-example-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    min-height: 0;
}

.config-example-tip {
    font-size: 12px;
    color: #909399;
    margin-bottom: 12px;
    line-height: 1.5;
}

.config-example-pre {
    background: #2d3561;
    color: #e6e8ec;
    padding: 16px;
    border-radius: 8px;
    font-family: "Monaco", "Menlo", monospace;
    font-size: 12px;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre;
    margin: 0;
}

.config-example-actions {
    display: flex;
    gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid #ebeef5;
    background: #fafafa;
}

.config-example-actions .btn {
    flex: 1;
}

@media (max-width: 1200px) {
    .config-layout {
        flex-direction: column;
    }
    .config-example {
        width: 100%;
        position: static;
        max-height: none;
    }
}

.blog-tags-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 16px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.filter-label {
    font-weight: 500;
    color: #606266;
    margin-right: 8px;
}

.tag-chip {
    padding: 4px 12px;
    background: #ecf5ff;
    color: #4a90d9;
    border-radius: 16px;
    font-size: 13px;
    display: inline-block;
}

.blog-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.blog-item {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    gap: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.blog-info {
    flex: 1;
}

.blog-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.blog-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
    font-size: 13px;
    color: #909399;
}

.blog-tags .tag {
    padding: 2px 8px;
    background: #f0f9eb;
    color: #67c23a;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 4px;
}

.blog-summary {
    color: #606266;
    font-size: 14px;
}

.blog-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.seo-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.products-section {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.products-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.config-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.config-card {
    background: #f5f7fa;
    border-radius: 10px;
    padding: 16px;
    transition: all 0.2s;
    text-align: center;
}

.config-card:hover {
    background: #ecf5ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.config-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.config-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.config-desc {
    font-size: 12px;
    color: #909399;
}

.site-info-bar {
    background: #fff;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 20px;
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    font-size: 14px;
    color: #606266;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.site-info-bar strong {
    color: #333;
}

.quick-actions {
    padding: 16px;
    background: #f5f7fa;
    border-radius: 8px;
}

.site-selector {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-selector label {
    color: #606266;
    font-size: 14px;
}

.site-selector select {
    padding: 8px 12px;
    border: 1px solid #dcdfe6;
    border-radius: 6px;
    font-size: 14px;
}

.media-filters {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    padding: 16px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.filter-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-chip {
    padding: 6px 14px;
    background: #f5f7fa;
    border-radius: 16px;
    font-size: 13px;
    color: #606266;
    transition: all 0.2s;
}

.filter-chip:hover {
    background: #ecf5ff;
    color: #4a90d9;
    text-decoration: none;
}

.filter-chip.active {
    background: #4a90d9;
    color: #fff;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.media-item {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
}

.media-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.media-preview {
    width: 100%;
    height: 160px;
    background: #f5f7fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.media-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-icon {
    font-size: 48px;
}

.media-info {
    padding: 12px 16px;
}

.media-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.media-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #909399;
}

.media-tags {
    margin-top: 8px;
}

.media-tags .tag {
    display: inline-block;
    padding: 2px 8px;
    background: #f0f9eb;
    color: #67c23a;
    border-radius: 4px;
    font-size: 11px;
    margin-right: 4px;
}

.media-actions {
    padding: 0 16px 12px;
    display: flex;
    gap: 8px;
}

.upload-form {
    background: #fff;
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.upload-tips {
    background: #f5f7fa;
    padding: 20px;
    border-radius: 10px;
}

.upload-tips h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
}

.upload-tips ul {
    padding-left: 20px;
    color: #606266;
    font-size: 14px;
}

.upload-tips li {
    margin-bottom: 6px;
}

@media (max-width: 768px) {
    .admin-layout {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
    }

    .sidebar-header {
        display: none;
    }

    .sidebar-nav {
        display: flex;
        padding: 0;
    }

    .nav-item {
        padding: 12px 16px;
        border-left: none;
        border-bottom: 3px solid transparent;
        white-space: nowrap;
    }

    .nav-item.active {
        border-left: none;
        border-bottom-color: #4a90d9;
    }

    .nav-divider {
        display: none;
    }

    .admin-content {
        padding: 16px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .config-layout {
        flex-direction: column;
    }

    .config-sidebar {
        width: 100%;
    }

    .sites-grid {
        grid-template-columns: 1fr;
    }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Category multi-select checkboxes in product edit form */
.category-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
    padding: 10px 12px;
    border: 1px solid #dcdfe6;
    border-radius: 6px;
    background: #fafafa;
}

.category-checkbox-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    white-space: nowrap;
    padding: 2px 0;
}

.category-checkbox-item input[type="checkbox"] {
    width: 15px;
    height: 15px;
    margin: 0;
    cursor: pointer;
    accent-color: #4a90d9;
}

.category-checkbox-item:hover {
    color: #4a90d9;
}

.form-hint {
    font-size: 13px;
    color: #909399;
    margin: 0;
    padding: 4px 0;
}

/* ============================================================
   订单详情抽屉
   ============================================================ */

.order-drawer {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
}

.order-drawer.open {
    display: block;
}

body.drawer-open {
    overflow: hidden;
}

.order-drawer-mask {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    animation: drawerFade 0.2s ease;
}

.order-drawer-panel {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 50%;
    max-width: 92vw;
    background: #f7f8fa;
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.15);
    animation: drawerSlide 0.25s ease;
}

@keyframes drawerFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes drawerSlide {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.order-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #fff;
    border-bottom: 1px solid #ebeef5;
}

.order-drawer-header h3 {
    font-size: 16px;
    color: #303133;
    margin: 0;
}

.order-drawer-close {
    border: none;
    background: none;
    font-size: 18px;
    line-height: 1;
    color: #909399;
    cursor: pointer;
}

.order-drawer-close:hover {
    color: #303133;
}

.order-drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px 24px;
}

.order-drawer-content .order-meta,
.order-drawer-content .order-section {
    margin-bottom: 14px;
}

.order-drawer-content .order-grid {
    grid-template-columns: 1fr;
    gap: 0;
}

.drawer-loading {
    padding: 40px 0;
    text-align: center;
    color: #909399;
    font-size: 14px;
}

.drawer-items {
    display: flex;
    flex-direction: column;
}

.drawer-item {
    padding: 12px 0;
    border-bottom: 1px solid #f0f2f5;
}

.drawer-item:last-child {
    border-bottom: none;
}

.drawer-item-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.drawer-item-name {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    font-weight: 600;
    color: #303133;
    word-break: break-word;
}

.drawer-item-price {
    flex: 0 0 auto;
    font-size: 13px;
    color: #909399;
    white-space: nowrap;
}

.drawer-item-qty {
    margin: 0 2px;
}

.drawer-item-total {
    margin-left: 4px;
    color: #303133;
    font-weight: 600;
}

.drawer-item-specs {
    margin-bottom: 8px;
}

.drawer-item-empty {
    color: #c0c4cc;
    font-size: 13px;
}

.drawer-item-images {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.drawer-item-image {
    width: 180px;
    height: auto;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #ebeef5;
    background: #fff;
}

.drawer-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 4px;
}

/* ============================================================
   发起采购弹层
   ============================================================ */

.purchase-modal-panel {
    width: 560px;
}

.purchase-brief {
    margin-top: 6px;
}
