/**
 * 后台样式：侧栏、表格、表单，与前台统一色系
 */
:root {
    --aside-w: 220px;
    --aside-collapsed: 72px;
}

.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #e8f8ef 0%, #f6f8f7 45%, #eef0ee 100%);
}

.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 36px 32px 32px;
    box-shadow: 0 16px 50px rgba(7, 193, 96, 0.12);
    border: 1px solid rgba(7, 193, 96, 0.12);
}

.login-wrap {
    width: 100%;
    max-width: 440px;
    padding: 24px;
}

/* 布局 */
.admin-root {
    display: flex;
    min-height: 100vh;
    background: #f0f3f1;
}

.admin-aside {
    width: var(--aside-w);
    background: #fff;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
    position: sticky;
    top: 0;
    height: 100vh;
    flex-shrink: 0;
}

.admin-aside.collapsed {
    width: var(--aside-collapsed);
}

.admin-aside.collapsed .aside-text {
    display: none;
}

.admin-aside.collapsed .aside-brand span:last-child {
    display: none;
}

.aside-brand {
    padding: 20px 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #eef2f0;
}

.aside-toggle {
    margin: 12px 14px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #fafafa;
    cursor: pointer;
    font-size: 0.85rem;
    color: #4b5563;
    transition: background 0.2s, border-color 0.2s;
}

.aside-toggle:hover {
    border-color: var(--wx);
    color: var(--wx);
    background: var(--wx-light);
}

.aside-nav {
    flex: 1;
    padding: 8px 10px;
    overflow-y: auto;
}

.aside-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 10px;
    color: #4b5563;
    font-size: 0.92rem;
    margin-bottom: 4px;
    transition: background 0.2s, color 0.2s, transform 0.15s;
}

.aside-nav a:hover {
    background: var(--wx-light);
    color: var(--wx);
}

.aside-nav a.active {
    background: linear-gradient(90deg, var(--wx-light), #fff);
    color: var(--wx-dark);
    font-weight: 600;
    border: 1px solid rgba(7, 193, 96, 0.15);
}

.aside-foot {
    padding: 14px;
    border-top: 1px solid #eef2f0;
    font-size: 0.8rem;
    color: #9ca3af;
}

.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.admin-topbar {
    height: 56px;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid #e8ece9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 22px;
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(8px);
}

.admin-topbar h1 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.88rem;
    color: #6b7280;
}

.topbar-actions a {
    color: var(--wx);
    font-weight: 600;
}

.admin-content {
    padding: 22px;
    flex: 1;
}

.panel {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e8ece9;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.04);
    padding: 22px;
    margin-bottom: 20px;
}

.panel h2 {
    margin: 0 0 16px;
    font-size: 1.05rem;
}

.panel--product-upload {
    max-width: none;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.form-grid .full {
    grid-column: 1 / -1;
}

.field-block-row--pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    grid-column: 1 / -1;
}

.field-block-row--triple {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    grid-column: 1 / -1;
}

@media (max-width: 720px) {
    .field-block-row--triple {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .field-block-row--pair {
        grid-template-columns: 1fr;
    }
}

.field-block label {
    display: block;
    font-size: 0.82rem;
    color: #4b5563;
    margin-bottom: 6px;
}

.field-block input,
.field-block textarea,
.field-block select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    font-family: inherit;
    font-size: 0.92rem;
}

.field-block textarea {
    min-height: 88px;
    resize: vertical;
}

.field-block input:focus,
.field-block textarea:focus,
.field-block select:focus {
    outline: none;
    border-color: var(--wx);
    box-shadow: 0 0 0 3px var(--wx-light);
}

/* 资料上架 / 编辑：分步表单 */
.product-form {
    max-width: 760px;
}

/* 资料上传：左 ① 基本信息 | 右 ②③ 文件与详情 */
.product-form.product-form--split {
    max-width: none;
    width: 100%;
}

.product-form.product-form--split .product-form-columns {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 20px;
    width: 100%;
}

.product-form.product-form--split .product-form-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1 1 0;
    min-width: 0;
    width: 50%;
}

.product-form.product-form--split .product-form-col--left .form-section,
.product-form.product-form--split .product-form-col--right .form-section {
    margin-bottom: 0;
}

.product-form.product-form--split .product-form-col--left .form-grid,
.product-form.product-form--split .product-form-col--right .form-grid {
    grid-template-columns: 1fr;
}

@media (max-width: 900px) {
    .product-form.product-form--split .product-form-columns {
        flex-direction: column;
        flex-wrap: wrap;
    }

    .product-form.product-form--split .product-form-col {
        width: 100%;
        flex: 1 1 auto;
    }

    .product-form.product-form--split .product-form-col--left .form-section {
        margin-bottom: 22px;
    }
}

.product-form-head {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eef2f0;
}

.product-form-head h2 {
    margin: 0 0 8px;
}

.product-form-head .edit-product-title {
    margin: 0 0 10px;
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.35;
}

.product-form-head .muted {
    margin: 0;
    line-height: 1.55;
    font-size: 0.9rem;
}

.form-section {
    margin-bottom: 22px;
    padding: 18px 18px 4px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #fafdfb;
}

.form-section:last-of-type {
    margin-bottom: 8px;
}

.form-section--optional {
    background: #fafafa;
    border-style: dashed;
    border-color: #d1d5db;
}

.form-section--delivery {
    border-left: 4px solid var(--wx);
    background: #fff;
}

.form-section-header {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.form-step {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.88rem;
    color: #fff;
    background: linear-gradient(135deg, var(--wx), #2dd279);
    box-shadow: 0 4px 12px rgba(7, 193, 96, 0.25);
}

.form-section-header h3 {
    margin: 0 0 4px;
    font-size: 0.98rem;
    font-weight: 700;
    color: #111827;
}

.form-section-header .form-section-lead {
    margin: 0;
    font-size: 0.82rem;
    color: #6b7280;
    line-height: 1.45;
}

.form-section .form-grid {
    margin-bottom: 14px;
}

.form-section .field-block label .label-hint {
    font-weight: 400;
    color: #9ca3af;
    font-size: 0.78rem;
}

.field-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    vertical-align: middle;
}

.field-tag--req {
    background: #fef2f2;
    color: #b91c1c;
}

.field-tag--opt {
    background: #f3f4f6;
    color: #6b7280;
}

.field-block--upload {
    padding: 14px;
    border-radius: 10px;
    border: 1px dashed #d1d5db;
    background: #fff;
}

.field-block--upload label {
    margin-bottom: 8px;
}

.form-section .btn-row {
    margin-top: 0;
}

.product-form > .btn-row {
    margin-top: 12px;
    padding-top: 4px;
}

.panel--product-upload .product-form.product-form--split {
    padding-bottom: 88px;
}

.panel--product-upload .product-form-actions {
    position: sticky;
    bottom: 0;
    z-index: 30;
    margin: 20px -22px -22px;
    padding: 14px 22px;
    padding-bottom: max(14px, env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.panel--product-upload .product-form-actions__inner {
    margin: 0;
    padding: 0;
    justify-content: center;
    align-items: center;
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.btn-admin {
    padding: 10px 18px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.88rem;
    transition: transform 0.12s, box-shadow 0.2s, opacity 0.2s;
}

.btn-admin:active {
    transform: scale(0.96);
}

.btn-save {
    background: linear-gradient(135deg, var(--wx), #2dd279);
    color: #fff;
    box-shadow: 0 4px 16px rgba(7, 193, 96, 0.3);
}

.btn-save:hover {
    opacity: 0.95;
}

.btn-muted {
    background: #f3f4f6;
    color: #374151;
}

.btn-danger {
    background: #fee2e2;
    color: #b91c1c;
}

.btn-warn {
    background: #fef3c7;
    color: #92400e;
}

/* 表格 */
.data-table-wrap {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid #e8ece9;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.data-table th,
.data-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid #eef2f0;
}

.data-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
}

.data-table tbody tr:nth-child(even) {
    background: #fafdfb;
}

.data-table tbody tr:hover {
    background: var(--wx-light);
}

.admin-user-search {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.admin-user-search__label {
    font-size: 0.88rem;
    font-weight: 600;
    color: #374151;
}

.admin-user-search input[type="search"] {
    min-width: 220px;
    max-width: 360px;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.9rem;
}

.admin-user-batch__actions {
    margin-bottom: 12px;
    align-items: center;
}

.admin-user-batch__hint {
    font-size: 0.85rem;
}

.admin-user-table .col-check {
    width: 44px;
    text-align: center;
}

.admin-user-table tbody tr.is-disabled {
    opacity: 0.72;
}

.admin-video-current__path {
    margin: 0 0 10px;
}

.admin-inline-action-form {
    display: inline-block;
    margin: 0;
}

/* 会员与积分包 */
.membership-form {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.membership-form-section__head {
    margin-bottom: 12px;
}

.membership-form-section__head h3 {
    margin: 0 0 4px;
    font-size: 0.98rem;
    font-weight: 700;
    color: #111827;
}

.membership-form-section__head .muted {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.45;
}

.membership-form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #eef2f0;
}

.admin-membership-table .col-id {
    width: 140px;
}

.admin-membership-table .col-label {
    min-width: 180px;
}

.admin-membership-table .col-duration {
    width: 120px;
}

.admin-membership-table .col-price,
.admin-membership-table .col-points {
    width: 120px;
}

.admin-membership-table .col-toggle,
.admin-membership-table .col-remove {
    width: 72px;
    text-align: center;
}

.admin-membership-table td.col-id code {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    background: #f3f4f6;
    font-size: 0.82rem;
    color: #374151;
    word-break: break-all;
}

.admin-membership-table input[type="text"],
.admin-membership-table input[type="number"],
.admin-membership-table select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    font-family: inherit;
    font-size: 0.88rem;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.admin-membership-table input::placeholder {
    color: #9ca3af;
}

.admin-membership-table input:focus,
.admin-membership-table select:focus {
    outline: none;
    border-color: var(--wx);
    box-shadow: 0 0 0 3px var(--wx-light);
}

.admin-membership-table tbody tr:last-child td {
    border-bottom: none;
}

.admin-membership-table__new td {
    background: rgba(7, 193, 96, 0.06);
    border-top: 2px dashed rgba(7, 193, 96, 0.28);
}

.membership-new-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    background: var(--wx-light);
    color: var(--wx-dark);
}

.membership-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin: 0;
}

.membership-toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.membership-toggle__box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 1.5px solid #d1d5db;
    background: #fff;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.membership-toggle input:checked + .membership-toggle__box {
    background: var(--wx);
    border-color: var(--wx);
    box-shadow: 0 0 0 3px var(--wx-light);
}

.membership-toggle input:checked + .membership-toggle__box::after {
    content: "";
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translate(-1px, -1px);
}

.membership-toggle input:focus-visible + .membership-toggle__box {
    outline: none;
    box-shadow: 0 0 0 3px var(--wx-light);
}

.membership-toggle--danger input:checked + .membership-toggle__box {
    background: #ef4444;
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
}

.badge-ok {
    background: var(--wx-light);
    color: var(--wx-dark);
}

.badge-wait {
    background: #fef3c7;
    color: #92400e;
}

.stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 18px;
    border: 1px solid #e8ece9;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.stat-card .num {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--wx-dark);
}

.stat-card .lab {
    font-size: 0.82rem;
    color: #6b7280;
    margin-top: 4px;
}

.flash {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.flash-ok {
    background: var(--wx-light);
    color: #065f46;
}

.flash-err {
    background: #fef2f2;
    color: #991b1b;
}

.thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 8px;
    background: #f3f4f6;
}

.admin-file-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid var(--line, #e5e7eb);
    border-radius: 10px;
    overflow: hidden;
}

.admin-file-list li {
    border-bottom: 1px solid var(--line, #e5e7eb);
}

.admin-file-list li:last-child {
    border-bottom: none;
}

.admin-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
}

.admin-file-item__main {
    flex: 1;
    min-width: 0;
}

.admin-file-item__name {
    display: block;
    font-size: 0.9rem;
}

.admin-file-item__path {
    display: block;
    margin-top: 4px;
    font-size: 0.75rem;
    color: var(--muted, #6b7280);
    word-break: break-all;
}

.admin-file-item.is-marked-remove {
    background: #fef2f2;
    opacity: 0.72;
}

.admin-file-remove {
    flex-shrink: 0;
    padding: 6px 12px;
    font-size: 0.82rem;
    white-space: nowrap;
}

/* 通用文件拖拽上传（封面 / 资料 / 视频） */
.admin-file-dropzone {
    margin-bottom: 0;
}

.admin-dropzone__label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 0.82rem;
    color: #4b5563;
}

.admin-file-dropzone--split .admin-dropzone__row {
    display: flex;
    align-items: stretch;
    gap: 12px;
}

.admin-file-dropzone--split .admin-dropzone__zone {
    flex: 1;
    min-width: 0;
    min-height: 120px;
    padding: 14px 12px;
}

.admin-file-dropzone--split .admin-dropzone__zone-text {
    font-size: 0.85rem;
}

.admin-file-dropzone--split .admin-dropzone__preview {
    margin-top: 0;
}

.admin-file-dropzone--cover.admin-file-dropzone--split .admin-dropzone__preview {
    flex: 0 0 168px;
    width: 168px;
}

.admin-file-dropzone[data-mode="multi-file"] .admin-dropzone__preview {
    flex: 1;
    min-width: 0;
}

.admin-dropzone__files-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    padding: 12px;
    border: 1px dashed #d1d5db;
    border-radius: 10px;
    background: #f9fafb;
    color: #9ca3af;
    font-size: 0.82rem;
    text-align: center;
}

.admin-dropzone__files-empty[hidden],
.admin-dropzone__file-list[hidden] {
    display: none;
}

.admin-file-dropzone[data-mode="multi-file"] .admin-dropzone__file-list {
    min-height: 120px;
    max-height: 220px;
    overflow-y: auto;
}

.admin-dropzone__cover-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 4 / 3;
    border: 1px dashed #d1d5db;
    border-radius: 10px;
    background: #f9fafb;
    color: #9ca3af;
    font-size: 0.82rem;
}

.admin-dropzone__cover-empty[hidden] {
    display: none;
}

@media (max-width: 520px) {
    .admin-file-dropzone--split .admin-dropzone__row {
        flex-direction: column;
    }

    .admin-file-dropzone--cover.admin-file-dropzone--split .admin-dropzone__preview,
    .admin-file-dropzone[data-mode="multi-file"] .admin-dropzone__preview {
        flex: 1 1 auto;
        width: 100%;
    }
}

.admin-dropzone__zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 110px;
    padding: 18px 16px;
    border: 2px dashed #c5d0cb;
    border-radius: 10px;
    background: #fafdfb;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    text-align: center;
}

.admin-dropzone__zone:hover,
.admin-dropzone__zone:focus {
    outline: none;
    border-color: var(--wx, #07c160);
    background: var(--wx-light, #e8f8ef);
}

.admin-dropzone__zone--active {
    border-color: var(--wx, #07c160);
    background: var(--wx-light, #e8f8ef);
}

.admin-dropzone__zone-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #d1d5db;
    font-size: 1.4rem;
    line-height: 1;
    color: var(--wx, #07c160);
}

.admin-dropzone__zone-text {
    margin: 0;
    font-size: 0.9rem;
    color: #374151;
}

.admin-dropzone__zone-sub {
    margin: 0;
    font-size: 0.78rem;
}

.admin-dropzone__preview {
    margin-top: 12px;
}

.admin-dropzone__preview.is-hidden {
    display: none;
}

.admin-dropzone__cover-wrap {
    position: relative;
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background: #f3f4f6;
}

.admin-dropzone__cover-img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.admin-dropzone__remove-new {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.admin-dropzone__remove-new:hover {
    background: rgba(185, 28, 28, 0.85);
}

.admin-dropzone__file-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid var(--line, #e5e7eb);
    border-radius: 10px;
    overflow: hidden;
}

.admin-dropzone__file-item {
    display: flex;
    align-items: center;
    gap: 8px 12px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line, #e5e7eb);
    font-size: 0.88rem;
}

.admin-dropzone__file-item:last-child {
    border-bottom: none;
}

.admin-dropzone__file-name {
    flex: 1;
    min-width: 0;
    word-break: break-all;
}

.admin-dropzone__file-size {
    flex-shrink: 0;
    font-size: 0.78rem;
}

.admin-dropzone__video-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--line, #e5e7eb);
    border-radius: 10px;
    background: #fafdfb;
}

.admin-dropzone__video-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--wx-light, #e8f8ef);
    color: var(--wx, #07c160);
    font-size: 0.85rem;
}

.admin-dropzone__video-name {
    flex: 1;
    min-width: 0;
    word-break: break-all;
    font-size: 0.88rem;
}

.admin-dropzone__video-size {
    flex-shrink: 0;
    font-size: 0.78rem;
}

.admin-dropzone__remove-file {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: #fee2e2;
    color: #b91c1c;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.admin-dropzone__remove-file:hover {
    background: #fecaca;
}

.admin-dropzone__hint {
    display: block;
    margin-top: 8px;
}

/* 详情图片：拖拽上传与排序 */
.detail-images-uploader {
    margin-bottom: 0;
}

.detail-images-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
}

.detail-images-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 120px;
    padding: 20px 16px;
    border: 2px dashed #c5d0cb;
    border-radius: 10px;
    background: #fafdfb;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    text-align: center;
}

.detail-images-dropzone:hover,
.detail-images-dropzone:focus {
    outline: none;
    border-color: var(--wx, #07c160);
    background: var(--wx-light, #e8f8ef);
}

.detail-images-dropzone--active {
    border-color: var(--wx, #07c160);
    background: var(--wx-light, #e8f8ef);
}

.detail-images-dropzone-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #d1d5db;
    font-size: 1.4rem;
    line-height: 1;
    color: var(--wx, #07c160);
}

.detail-images-dropzone-text {
    margin: 0;
    font-size: 0.9rem;
    color: #374151;
}

.detail-images-dropzone-sub {
    margin: 0;
    font-size: 0.8rem;
}

.detail-images-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
}

.detail-images-item {
    position: relative;
    width: 96px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background: #fff;
    cursor: grab;
    user-select: none;
}

.detail-images-item--dragging {
    opacity: 0.55;
    cursor: grabbing;
}

.detail-images-item--over {
    border-color: var(--wx, #07c160);
    box-shadow: 0 0 0 2px rgba(7, 193, 96, 0.25);
}

.detail-images-item img {
    display: block;
    width: 96px;
    height: 72px;
    object-fit: cover;
    background: #f3f4f6;
    pointer-events: none;
}

.detail-images-drag {
    position: absolute;
    top: 4px;
    left: 4px;
    z-index: 2;
    padding: 2px 4px;
    font-size: 0.65rem;
    line-height: 1;
    letter-spacing: -1px;
    color: #fff;
    background: rgba(0, 0, 0, 0.45);
    border-radius: 4px;
    pointer-events: none;
}

.detail-images-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    z-index: 3;
    width: 22px;
    height: 22px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(185, 28, 28, 0.88);
    color: #fff;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-images-remove:hover {
    background: #b91c1c;
}

.detail-images-hint {
    display: block;
    margin-top: 8px;
}

/* 资料分类 / 资料标签 */
.product-form.taxonomy-add-form {
    max-width: none;
    margin: 0;
}

.taxonomy-add-row {
    display: grid;
    grid-template-columns: auto minmax(140px, 200px) minmax(160px, 1fr) 100px auto;
    gap: 12px 16px;
    align-items: end;
    width: 100%;
}

.taxonomy-add-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.2;
    padding-bottom: 10px;
}

.taxonomy-add-row .field-block {
    margin: 0;
    min-width: 0;
}

.taxonomy-add-actions {
    justify-self: end;
    padding-bottom: 1px;
}

.taxonomy-add-hint {
    display: block;
    margin-top: 8px;
}

@media (max-width: 960px) {
    .taxonomy-add-row {
        grid-template-columns: 1fr 1fr;
    }

    .taxonomy-add-title {
        grid-column: 1 / -1;
        padding-bottom: 0;
    }

    .taxonomy-add-actions {
        grid-column: 1 / -1;
        justify-self: end;
    }
}

@media (max-width: 560px) {
    .taxonomy-add-row {
        grid-template-columns: 1fr;
    }
}

.taxonomy-name-sort-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    align-items: flex-end;
}

.taxonomy-field--name {
    flex: 1 1 200px;
    min-width: 0;
}

.taxonomy-field--sort {
    flex: 0 0 120px;
    width: 120px;
}

.taxonomy-field--sort .field-block,
.taxonomy-field--name .field-block {
    margin: 0;
}

.taxonomy-inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 0;
}

.taxonomy-inline-form .taxonomy-name-sort-row {
    flex: 1 1 240px;
    align-items: center;
}

.taxonomy-inline-form input[type="text"],
.taxonomy-inline-form input[type="number"] {
    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    font-family: inherit;
    font-size: 0.88rem;
    box-sizing: border-box;
}

.taxonomy-inline-form .taxonomy-field--sort {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    width: auto;
}

.taxonomy-inline-form .taxonomy-field--sort input[type="number"] {
    width: 88px;
}

.taxonomy-sort-label {
    margin: 0;
    font-size: 0.82rem;
    white-space: nowrap;
}

@media (max-width: 860px) {
    .admin-root {
        flex-direction: column;
    }

    .admin-aside {
        width: 100%;
        height: auto;
        position: relative;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }

    .aside-nav {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
        padding: 8px;
    }

    .aside-nav a {
        flex: 1 1 auto;
        justify-content: center;
    }

    .aside-foot {
        width: 100%;
    }
}

.admin-tag-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin-top: 6px;
}

.admin-tag-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--line, #e4e4e7);
    border-radius: 8px;
    background: #fafafa;
    cursor: pointer;
    font-size: 0.9rem;
}

.admin-tag-check input {
    margin: 0;
}
