/* ======================== 变量 & Reset ======================== */
:root {
    --primary: #1e3a5f;
    --primary-light: #2c5282;
    --primary-dark: #142a47;
    --accent: #94785a;
    --accent-glow: rgba(148, 120, 90, 0.35);
    --success: #2f855a;
    --warning: #b7791f;
    --danger: #9b2c2c;
    --bg: #f5f4f1;
    --card-bg: #ffffff;
    --text: #1a202c;
    --text-secondary: #4a5568;
    --text-light: #718096;
    --border: #ddd9d2;
    --shadow-sm: 0 1px 3px rgba(30,58,95,0.08);
    --shadow: 0 2px 8px rgba(30,58,95,0.08);
    --shadow-lg: 0 8px 25px rgba(30,58,95,0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --gray-cc: #9ca3af;
    --header-h: 56px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
*::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; border: none; outline: none; }
input, select, textarea { font-family: inherit; outline: none; }

/* ======================== Header ======================== */
#header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-h);
    background: rgba(30,58,95,0.97);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(20,42,71,0.5);
    z-index: 1000;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    padding: 0 16px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
    flex-shrink: 0;
}

.logo-icon {
    width: 32px; height: 32px;
    background: linear-gradient(135deg, var(--accent), #b89472);
    color: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
}

.logo-main {
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.logo-cc {
    font-size: 20px;
    font-weight: 800;
    color: var(--gray-cc);
    letter-spacing: -0.5px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.search-wrap {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.12);
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.15);
    transition: border-color 0.2s;
}

.search-wrap:focus-within { border-color: rgba(255,255,255,0.4); }

.search-wrap input {
    border: none;
    background: transparent;
    padding: 7px 12px;
    font-size: 14px;
    width: 200px;
    color: #ffffff;
}

.search-wrap input::placeholder { color: rgba(255,255,255,0.5); }

.search-btn {
    background: var(--accent);
    color: #fff;
    padding: 7px 14px;
    font-size: 14px;
    transition: background 0.2s;
}

.search-btn:hover { background: #7d6749; }

.mobile-menu-btn {
    display: none;
    background: transparent;
    color: #ffffff;
    padding: 6px;
}

.mobile-search {
    padding: 8px 16px;
    display: flex;
    gap: 8px;
    background: var(--primary-dark);
}

.mobile-search input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.mobile-search input::placeholder { color: rgba(255,255,255,0.5); }

.mobile-search button {
    background: var(--accent);
    color: #fff;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
}

/* ======================== 幻灯片 ======================== */
.slideshow-section {
    margin-top: var(--header-h);
    padding: 16px 0 8px;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
}

.section-title {
    max-width: 1200px;
    margin: 0 auto 10px;
    padding: 0 16px;
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.section-title h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.section-sub {
    font-size: 12px;
    color: var(--text-light);
}

.slideshow-viewport {
    overflow: hidden;
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.slideshow-track {
    display: flex;
    gap: 12px;
    padding: 4px 16px;
    animation: slideScroll 40s linear infinite;
    width: max-content;
}

.slideshow-track:hover { animation-play-state: paused; }

@keyframes slideScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.slide-card {
    flex-shrink: 0;
    width: 200px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.slide-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.slide-card-img {
    width: 100%;
    height: 140px;
    background: linear-gradient(135deg, #e8e4de, #d6cfc4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 12px;
    overflow: hidden;
}

.slide-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-card-info {
    padding: 8px 10px;
}

.slide-card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.slide-card-price {
    font-size: 15px;
    font-weight: 800;
    color: var(--danger);
}

.slide-card-price::before { content: '¥'; font-size: 12px; }

/* ======================== 筛选栏 ======================== */
.filter-bar {
    max-width: 1200px;
    margin: 12px auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-group label {
    font-size: 14px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.filter-group select {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: var(--card-bg);
    color: var(--text);
    cursor: pointer;
}

.btn-clear-filter {
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    transition: color 0.2s;
}

.btn-clear-filter:hover { color: var(--danger); }

/* ======================== 主内容 ======================== */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px 40px;
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

/* ======================== 提交卡片（呼吸灯） ======================== */
.submit-card {
    grid-column: 1 / -1;
    border: 2px solid var(--accent) !important;
    border-radius: var(--radius) !important;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.submit-card-inner {
    padding: 14px 20px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
}

.submit-icon {
    width: 44px; height: 44px;
    min-width: 44px;
    background: linear-gradient(135deg, var(--accent), #b89472);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: iconBreathe 2s ease-in-out infinite;
    flex-shrink: 0;
}

.submit-icon svg {
    width: 22px; height: 22px;
}

@keyframes iconBreathe {
    0%, 100% {
        box-shadow: 0 0 4px var(--accent-glow), 0 0 8px rgba(148, 120, 90, 0.2);
    }
    50% {
        box-shadow: 0 0 16px var(--accent-glow), 0 0 32px rgba(148, 120, 90, 0.4);
    }
}

.submit-text {
    flex: 1;
    min-width: 0;
}

.submit-text h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--primary);
    animation: textBreathe 2s ease-in-out infinite;
    margin: 0;
}

.submit-text p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 2px 0 0;
}

@keyframes textBreathe {
    0%, 100% {
        text-shadow: 0 0 4px rgba(30, 58, 95, 0.15);
        color: var(--primary);
    }
    50% {
        text-shadow: 0 0 12px rgba(30, 58, 95, 0.35), 0 0 24px rgba(30, 58, 95, 0.15);
        color: var(--primary-light);
    }
}

.submit-hint {
    font-size: 11px;
    color: var(--accent);
    font-weight: 600;
    background: rgba(148, 120, 90, 0.1);
    padding: 2px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

/* 卡片内嵌二维码 */
.submit-card-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    padding: 4px 6px;
    border-left: 1px solid var(--border);
    margin-left: 2px;
}
.submit-card-qr img {
    width: 60px; height: 60px;
    border-radius: 4px;
    border: 1px solid var(--border);
    padding: 1px;
    background: #fff;
}
.submit-card-qr span {
    font-size: 10px;
    color: var(--text-light);
    white-space: nowrap;
}


/* ======================== 物品卡片 ======================== */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.item-card {
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.item-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.item-card-img {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, #ede9e3, #ddd9d2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 28px;
    overflow: hidden;
    position: relative;
}

.item-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-badges {
    position: absolute;
    top: 8px; left: 8px;
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.badge {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    color: #fff;
}

.badge-consignment { background: var(--accent); }
.badge-status-sold { background: var(--text-secondary); }
.badge-status-expired { background: var(--text-light); }
.badge-discount { background: var(--danger); }

.item-card-body {
    padding: 10px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.item-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    min-height: 2.8em;
}

.item-card-price-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-top: auto;
}

.item-card-price {
    font-size: 18px;
    font-weight: 800;
    color: var(--danger);
}

.item-card-price::before { content: '¥'; font-size: 13px; }

.item-card-original-price {
    font-size: 12px;
    color: var(--text-light);
    text-decoration: line-through;
}

.item-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--text-light);
    margin-top: 4px;
}

.item-card-category {
    background: var(--bg);
    padding: 1px 6px;
    border-radius: 4px;
}

.item-card-views::before {
    content: '👁 ';
}

/* ======================== 广告卡片 ======================== */
.ad-card {
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 50%, #94785a 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    min-height: 200px;
    position: relative;
    overflow: hidden;
}

.ad-card::before {
    content: '广告';
    position: absolute;
    top: 8px; right: 8px;
    font-size: 10px;
    background: rgba(255,255,255,0.3);
    padding: 2px 8px;
    border-radius: 4px;
    color: #fff;
}

.ad-card h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
}

.ad-card p {
    font-size: 13px;
    opacity: 0.9;
    line-height: 1.5;
}

.ad-card .ad-link {
    margin-top: 8px;
    font-size: 12px;
    background: rgba(255,255,255,0.2);
    padding: 4px 12px;
    border-radius: 20px;
    color: #fff;
}

.ad-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

/* ======================== 返回顶部 ======================== */
.return-top {
    position: fixed;
    bottom: 24px; right: 24px;
    width: 44px; height: 44px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: 900;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s;
}

.return-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.return-top:hover { background: var(--primary-dark); }

/* ======================== Footer ======================== */
footer {
    background: var(--primary-dark);
    border-top: 3px solid var(--accent);
    padding: 24px 16px;
    text-align: center;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo {
    margin-bottom: 8px;
}

.footer-logo .logo-main { font-size: 18px; color: #fff; }
.footer-logo .logo-cc { font-size: 18px; }

footer p {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    margin-bottom: 4px;
}

.footer-note { font-size: 12px !important; color: var(--text-light) !important; }

/* ======================== Modal ======================== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow-y: auto;
}

.modal-overlay.show { display: flex; }

.modal-box {
    background: var(--card-bg);
    border-radius: var(--radius);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.25s ease;
}

.modal-large { max-width: 600px; }
.modal-small { max-width: 380px; }

.modal-fullscreen { padding: 0; }
.modal-admin { max-width: 1000px; max-height: 95vh; }

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--card-bg);
    z-index: 1;
    border-radius: var(--radius) var(--radius) 0 0;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.modal-close {
    background: transparent;
    font-size: 26px;
    color: var(--text-light);
    line-height: 1;
    padding: 4px;
    transition: color 0.2s;
}

.modal-close:hover { color: var(--danger); }

.modal-body { padding: 20px; }

/* ======================== 表单 ======================== */
.form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
}

.form-group {
    flex: 1;
    margin-bottom: 14px;
}

.form-group-small { max-width: 160px; flex-shrink: 0; }

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 5px;
}

.req { color: var(--danger); }

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text);
    background: var(--card-bg);
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
}

.form-group textarea { resize: vertical; }

.char-count {
    text-align: right;
    font-size: 12px;
    color: var(--text-light);
    margin-top: 3px;
}

.image-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.or-divider {
    font-size: 12px;
    color: var(--text-light);
}

.btn-upload {
    background: var(--bg);
    border: 1px dashed var(--border);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.2s;
}

.btn-upload:hover { border-color: var(--primary); color: var(--primary); }

.image-preview {
    margin-top: 8px;
}

.image-preview img {
    max-height: 120px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.image-preview .remove-img {
    display: inline-block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--danger);
    cursor: pointer;
}

/* Checkbox */
.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin-bottom: 0 !important;
}

.checkbox-label input[type="checkbox"] {
    width: 18px; height: 18px;
    accent-color: var(--primary);
}

.consignment-group {
    background: var(--bg);
    padding: 12px;
    border-radius: var(--radius-sm);
}

.consignment-group input[type="text"] {
    margin-top: 8px;
}

.form-tip {
    background: #f0ede8;
    border: 1px solid #ddd9d2;
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.form-tip-small {
    font-size: 12px;
    color: var(--text-light);
    text-align: center;
    margin-top: 12px;
}

/* ======================== 按钮 ======================== */
.btn-primary {
    background: var(--primary);
    color: #fff;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    transition: background 0.2s, transform 0.1s;
}

.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:active { transform: scale(0.98); }

.btn-full { width: 100%; }
.btn-sm { padding: 6px 14px; font-size: 13px; }

.btn-secondary {
    background: var(--bg);
    color: var(--text);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    border: 1px solid var(--border);
    transition: background 0.2s;
}

.btn-secondary:hover { background: #e0ddd8; }

.btn-danger {
    background: var(--danger);
    color: #fff;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    transition: opacity 0.2s;
}

.btn-danger:hover { opacity: 0.85; }

.btn-copy {
    background: var(--bg);
    color: var(--text-secondary);
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
    border: 1px solid var(--border);
}

.btn-copy:hover { background: #e0ddd8; }

.manage-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.manage-actions button { flex: 1; min-width: 80px; }

/* ======================== 成功提示 ======================== */
.success-body { text-align: center; }

.success-icon {
    width: 56px; height: 56px;
    background: var(--success);
    color: #fff;
    border-radius: 50%;
    font-size: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.success-body > p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.credential-box {
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 12px;
}

.credential-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

.credential-item:not(:last-child) {
    border-bottom: 1px solid var(--border);
}

.credential-label {
    font-size: 13px;
    color: var(--text-secondary);
    width: 70px;
    text-align: right;
    flex-shrink: 0;
}

.credential-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
    flex: 1;
}

.warning-text {
    font-size: 13px;
    color: var(--danger);
    margin-bottom: 16px;
}

/* ======================== 物品详情 ======================== */
.detail-content { padding: 20px; }

.detail-img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 16px;
    background: var(--bg);
}

.detail-img-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #ede9e3, #ddd9d2);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: var(--text-light);
    margin-bottom: 16px;
}

.detail-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

.detail-price-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 16px;
}

.detail-price {
    font-size: 28px;
    font-weight: 800;
    color: var(--danger);
}

.detail-price::before { content: '¥'; font-size: 18px; }

.detail-original-price {
    font-size: 16px;
    color: var(--text-light);
    text-decoration: line-through;
}

.detail-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.detail-meta .badge {
    font-size: 12px;
    padding: 3px 10px;
}

.detail-desc {
    background: var(--bg);
    padding: 14px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text);
    line-height: 1.7;
    margin-bottom: 16px;
    white-space: pre-wrap;
    word-break: break-word;
}

.detail-contact {
    background: #f0ede8;
    border: 1px solid #ddd9d2;
    border-radius: var(--radius-sm);
    padding: 14px;
    margin-bottom: 16px;
}

.detail-contact-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.detail-contact-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-actions {
    display: flex;
    gap: 10px;
}

.detail-actions button { flex: 1; }

/* ======================== 加载 & 空状态 ======================== */
.loading-spinner {
    text-align: center;
    padding: 40px;
}

.spinner {
    width: 36px; height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-spinner p { color: var(--text-light); font-size: 14px; }

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state p {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 16px;
}

.load-more-wrap { text-align: center; margin-top: 20px; }

.btn-load-more {
    background: var(--card-bg);
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 10px 32px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-load-more:hover { background: var(--primary); color: #fff; }

/* ======================== Toast ======================== */
.toast-container {
    position: fixed;
    top: 70px; right: 16px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--text);
    color: #fff;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.3s ease;
    max-width: 320px;
}

.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.warning { background: var(--warning); }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ======================== 管理后台 ======================== */
.admin-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 12px;
    text-align: center;
}

.stat-card .stat-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
}

.stat-card .stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.admin-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--border);
    margin-bottom: 16px;
}

.admin-tab {
    background: transparent;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
}

.admin-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.admin-filter-bar {
    margin-bottom: 12px;
}

.admin-filter-bar select {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
}

.admin-table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.admin-table th,
.admin-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.admin-table th {
    background: var(--bg);
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.admin-table td {
    color: var(--text);
}

.admin-table tr:hover td { background: var(--bg); }

.admin-table .admin-action-btn {
    font-size: 12px;
    padding: 3px 8px;
    margin-right: 4px;
}

.status-tag {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.status-tag.active { background: #e0e8e0; color: #2f855a; }
.status-tag.sold { background: #faf0e0; color: #b7791f; }
.status-tag.removed { background: #f0e0e0; color: #9b2c2c; }
.status-tag.expired { background: #ece9e4; color: #718096; }

.admin-ad-form {
    background: var(--bg);
    padding: 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
}

.admin-ad-form h4 {
    font-size: 15px;
    margin-bottom: 10px;
}

.admin-ad-form input,
.admin-ad-form textarea,
.admin-ad-form select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 8px;
}

.admin-ad-form .form-row { margin-bottom: 8px; }

.admin-ad-item {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.admin-ad-item-info { flex: 1; }

.admin-ad-item-info h5 {
    font-size: 14px;
    font-weight: 600;
}

.admin-ad-item-info p {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ======================== 响应式 ======================== */
@media (max-width: 768px) {
    .header-actions .search-wrap { display: none; }
    .mobile-menu-btn { display: flex; }

    .items-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .submit-card-inner { padding: 12px 14px; gap: 10px; }
    .submit-icon { width: 38px; height: 38px; min-width: 38px; }
    .submit-icon svg { width: 18px; height: 18px; }
    .submit-text h3 { font-size: 15px; }
    .submit-text p { font-size: 12px; }
    .submit-card-qr img { width: 48px; height: 48px; }
    .submit-card-qr span { font-size: 9px; }

    .slide-card { width: 150px; }
    .slide-card-img { height: 110px; }

    .form-row { flex-direction: column; gap: 0; }
    .form-group-small { max-width: 100%; }

    .modal-box { max-width: 100% !important; }
    .modal-overlay { padding: 0; }

    .filter-bar { gap: 8px; }
    .filter-group label { font-size: 13px; }
    .filter-group select { padding: 5px 8px; font-size: 13px; }

    .return-top { bottom: 16px; right: 16px; width: 40px; height: 40px; }

    .admin-stats { grid-template-columns: repeat(2, 1fr); }

    .toast-container { top: 64px; right: 8px; left: 8px; }
    .toast { max-width: 100%; }

    .detail-title { font-size: 18px; }
    .detail-price { font-size: 24px; }
}

@media (max-width: 400px) {
    .items-grid { grid-template-columns: 1fr; }
    .logo-main, .logo-cc { font-size: 16px; }
    .logo-icon { width: 28px; height: 28px; font-size: 16px; }
}

/* ======================== 滚动条美化 ======================== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }
