/* ===== 榜单团 - 手机Web应用样式 ===== */

:root {
    --primary: #FF5000;
    --primary-dark: #E04900;
    --primary-light: #FFF1EB;
    --bg: #F5F5F5;
    --white: #FFFFFF;
    --text: #333333;
    --text-light: #666666;
    --text-muted: #999999;
    --border: #EEEEEE;
    --success: #27AE60;
    --danger: #E74C3C;
    --warning: #F39C12;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --radius: 8px;
    --bottom-nav-height: 56px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    padding-bottom: calc(var(--bottom-nav-height) + 20px);
}

a {
    color: var(--primary);
    text-decoration: none;
}

/* ===== 顶部导航栏 ===== */
.top-bar {
    background: var(--primary);
    color: var(--white);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-bar h1 {
    font-size: 18px;
    font-weight: 600;
    text-align: center;
}

.top-bar a {
    color: var(--white);
    font-size: 14px;
}

.top-bar .btn-back {
    position: absolute;
    left: 16px;
    font-size: 14px;
    padding: 4px 8px;
}

/* ===== 底部导航 ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    max-width: 480px;
    width: 100%;
    background: var(--white);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: var(--bottom-nav-height);
    z-index: 100;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}

.bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
    font-size: 10px;
    padding: 6px 0;
    text-decoration: none;
}

.bottom-nav a.active {
    color: var(--primary);
}

.bottom-nav .nav-icon {
    font-size: 20px;
    margin-bottom: 2px;
}

/* ===== 卡片 ===== */
.card {
    background: var(--white);
    border-radius: var(--radius);
    margin: 12px 16px;
    padding: 16px;
    box-shadow: var(--shadow);
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text);
}

/* ===== 按钮 ===== */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 20px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:active {
    background: var(--primary-dark);
}

.btn-outline {
    background: var(--white);
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-block {
    display: block;
    width: 100%;
}

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

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn:disabled {
    opacity: 0.5;
}

/* ===== 表单 ===== */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 6px;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    background: var(--white);
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
}

.form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ===== 数量/时间步进器：右侧竖排 ＋/− 按钮（＋在上，− 在下，隐藏原生箭头）===== */
.stepper {
    display: flex;
    align-items: stretch;
    width: 100%;
}
.stepper .stepper-input {
    flex: 1;
    min-width: 0;
    text-align: center;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    -moz-appearance: textfield;
    appearance: textfield;
}
.stepper .stepper-input::-webkit-outer-spin-button,
.stepper .stepper-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.stepper-btns {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    width: 32px;
}
.stepper-btn {
    flex: 1;
    min-height: 0;
    border: 1px solid var(--border);
    border-left: none;
    background: var(--white);
    font-size: 16px;
    line-height: 1;
    color: var(--text);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    touch-action: manipulation;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.stepper-btn.plus {
    border-top-right-radius: var(--radius);
    border-bottom: none;
}
.stepper-btn.minus {
    border-bottom-right-radius: var(--radius);
}
.stepper-btn:active {
    background: var(--primary-light);
    color: var(--primary);
}

/* ===== 产品卡片 ===== */
.product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 0 16px;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.product-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.product-card .info {
    padding: 10px 12px;
}

.product-card .info .title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card .info .price {
    color: var(--primary);
    font-size: 16px;
    font-weight: 700;
}

.product-card .info .price span {
    font-size: 12px;
    font-weight: 400;
}

/* ===== 订单状态标签 ===== */
.status-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.status-unpaid { background: #FFF3E0; color: #E65100; }
.status-paid { background: #E3F2FD; color: #0D47A1; }
.status-in_service { background: #E8F5E9; color: #1B5E20; }
.status-completed { background: #F3E5F5; color: #6A1B9A; }
.status-refunded { background: #FFEBEE; color: #B71C1C; }

/* ===== 金额显示 ===== */
.amount {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.amount-positive { color: var(--success); }
.amount-negative { color: var(--danger); }

/* ===== 消息提示 ===== */
.messages {
    margin: 8px 16px;
}

.alert {
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: 13px;
    margin-bottom: 8px;
}

.alert-error { background: #FFEBEE; color: #B71C1C; }
.alert-success { background: #E8F5E9; color: #1B5E20; }
.alert-info { background: #E3F2FD; color: #0D47A1; }
.alert-warning { background: #FFF3E0; color: #E65100; }

/* ===== 级联分类布局（淘宝风格：顶栏横滑 + 左侧二级 + 右侧商品） ===== */
.cascade-page {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 44px - var(--bottom-nav-height));
    background: #F4F4F4;
}

/* 顶部一级分类横滑标签 */
.cascade-tabs {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--white);
    flex-shrink: 0;
    scrollbar-width: none;
    padding: 6px 4px;
}
.cascade-tabs::-webkit-scrollbar { display: none; }

.cascade-tab {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    font-size: 13px;
    color: #666;
    white-space: nowrap;
    position: relative;
    transition: color 0.2s;
}
.cascade-tab .tab-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background: #F0F0F0;
}
.cascade-tab .tab-icon-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #666;
    background: #F0F0F0;
}
.cascade-tab.active .tab-icon-fallback {
    background: var(--primary-light);
    color: var(--primary);
}
.cascade-tab.active {
    color: var(--primary);
    font-weight: 700;
}
.cascade-tab.active::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    border-radius: 2px;
    background: var(--primary);
}

/* 主体：左侧二级分类 + 右侧内容 */
.cascade-body {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* 左侧二级分类栏 */
.cascade-sidebar {
    width: 92px;
    min-width: 92px;
    background: #F0F0F0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.cascade-side-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 13px 8px;
    font-size: 13px;
    color: #555;
    text-align: center;
    min-height: 44px;
    transition: all 0.2s;
    line-height: 1.4;
    position: relative;
    text-decoration: none;
    word-break: break-all;
}
.cascade-side-item.active {
    background: var(--white);
    color: var(--primary);
    font-weight: 600;
}
.cascade-side-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 3px;
    border-radius: 0 2px 2px 0;
    background: var(--primary);
}

/* 右侧商品区 */
.cascade-content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--white);
}

.cascade-content .empty {
    padding: 60px 20px;
    text-align: center;
    color: #999;
}

/* 级联布局内的商品列表（小图在左，标题+价格在右） */
.cascade-product-list {
    display: flex;
    flex-direction: column;
}

.cascade-product-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 12px;
    min-height: 80px;
    border-bottom: 1px solid #F0F0F0;
    text-decoration: none;
    color: var(--text);
}
.cascade-product-row:active {
    background: #FAFAFA;
}
.cascade-product-row img {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    display: block;
}
.cascade-product-row .row-img-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    background: #F5F5F5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #CCC;
    font-size: 11px;
    flex-shrink: 0;
}
.cascade-product-row .cp-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.cascade-product-row .cp-title {
    font-size: 14px;
    color: #333;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cascade-product-row .cp-price {
    font-size: 15px;
    color: var(--primary);
    font-weight: 700;
}
.cascade-product-row .cp-price span {
    font-size: 11px;
    font-weight: 400;
}
.cascade-product-row .cp-buy {
    flex-shrink: 0;
    background: linear-gradient(135deg, #FF6A00, #FF5000);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: 16px;
    white-space: nowrap;
}

/* ===== 首页分类（图标 + 文字宫格） ===== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px 8px;
    padding: 16px 12px;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: var(--text);
}

.category-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--primary-light);
}

.category-icon-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
    color: var(--primary);
}

.category-name {
    font-size: 12px;
    color: #333;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== 海报 ===== */
.banner {
    margin: 12px 16px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--primary-light);
}

.banner img {
    width: 100%;
    height: auto;
    display: block;
}

.banner .placeholder {
    padding: 40px 20px;
    text-align: center;
    color: var(--primary);
    font-size: 16px;
    font-weight: 500;
}

/* ===== 导航栏客服徽章 ===== */
.bottom-nav a .badge {
    position: absolute;
    top: 2px;
    right: 50%;
    transform: translateX(18px);
    background: var(--danger);
    color: white;
    border-radius: 50%;
    min-width: 16px;
    height: 16px;
    font-size: 10px;
    line-height: 16px;
    text-align: center;
    padding: 0 3px;
}

/* ===== 微信风格聊天 ===== */

/* --- 聊天页容器 --- */
.chat-page {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 44px;
    bottom: var(--bottom-nav-height);
    left: 50%;
    transform: translateX(-50%);
    max-width: 480px;
    width: 100%;
    background: #EDEDED;
}

/* --- 聊天顶部栏 --- */
.chat-header {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    background: #EDEDED;
    border-bottom: 1px solid #D9D9D9;
    flex-shrink: 0;
    gap: 10px;
}
.chat-header .header-avatar {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}
.chat-header .header-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.chat-header .header-avatar .avatar-default {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 17px;
    font-weight: 600;
}
.chat-header .header-name {
    font-size: 16px;
    font-weight: 600;
}
.chat-header .header-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.chat-header .header-sub {
    font-size: 11px;
    color: #999;
}

/* --- 消息列表区 --- */
.chat-message-list {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 8px 0;
}

/* --- 时间分隔 --- */
.chat-time-sep {
    text-align: center;
    padding: 8px 0;
}
.chat-time-sep span {
    display: inline-block;
    background: #DADADA;
    color: #fff;
    padding: 2px 8px;
    border-radius: 2px;
    font-size: 10px;
}

/* --- 消息行 --- */
.chat-msg-row {
    display: flex;
    align-items: flex-start;
    padding: 4px 14px;
    margin-bottom: 2px;
}
.chat-msg-row.received {
    flex-direction: row;
    justify-content: flex-start;
}
.chat-msg-row.sent {
    flex-direction: row;
    justify-content: flex-end;
}

/* --- 头像 --- */
.chat-avatar {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 4px;
    overflow: hidden;
    margin: 0 10px;
}
.chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.chat-avatar .avatar-default {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
}

/* --- 消息体 --- */
.chat-msg-body {
    max-width: 72%;
    display: flex;
    flex-direction: column;
    width: fit-content;
}
.chat-msg-row.sent .chat-msg-body {
    align-items: flex-end;
}
.chat-msg-row.received .chat-msg-body {
    align-items: flex-start;
}

/* 发送者名称 */
.chat-sender-name {
    font-size: 11px;
    color: #999;
    margin-bottom: 3px;
    padding: 0 4px;
}

/* 撤回链接（自己消息下方的小字入口） */
.chat-recall-link {
    font-size: 10px;
    color: #B2B2B2;
    margin-top: 2px;
    padding: 0 4px;
    cursor: pointer;
    user-select: none;
}
.chat-recall-link:active {
    color: #999;
}

/* 撤回的消息占位提示 */
.chat-withdrawn {
    text-align: center;
    padding: 6px 0;
}
.chat-withdrawn span {
    font-size: 11px;
    color: #999;
}

/* --- 气泡 --- */
.chat-bubble {
    padding: 10px 13px;
    font-size: 15px;
    line-height: 1.5;
    word-break: break-word;
    position: relative;
    border-radius: 4px;
    width: fit-content;
    max-width: 100%;
    text-align: left;
}

/* 发出的消息：品牌橙色 */
.chat-msg-row.sent .chat-bubble {
    background: var(--primary);
    color: #fff;
}

/* 收到的消息：白色，用 App 的阴影和边框 */
.chat-msg-row.received .chat-bubble {
    background: #fff;
    color: #333;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* 气泡小尾巴 - 发出的 */
.chat-msg-row.sent .chat-bubble::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 10px;
    width: 0;
    height: 0;
    border: 5px solid transparent;
    border-left-color: var(--primary);
    border-right: 0;
}

/* 气泡小尾巴 - 收到的 */
.chat-msg-row.received .chat-bubble::after {
    content: '';
    position: absolute;
    left: -6px;
    top: 10px;
    width: 0;
    height: 0;
    border: 5px solid transparent;
    border-right-color: #fff;
    border-left: 0;
}

/* --- 输入栏 --- */
.chat-input-bar {
    display: flex;
    align-items: center;
    padding: 7px 10px;
    background: #F7F7F7;
    border-top: 1px solid #E0E0E0;
    gap: 6px;
    flex-shrink: 0;
}
.chat-input-bar input {
    flex: 1;
    padding: 9px 12px;
    border: 1px solid #E0E0E0;
    border-radius: 6px;
    font-size: 15px;
    background: #fff;
    outline: none;
    min-width: 0;
}
.chat-input-bar input:focus {
    border-color: var(--primary);
}
.chat-input-bar button {
    padding: 8px 16px;
    border-radius: 6px;
    background: var(--primary);
    color: #fff;
    border: none;
    font-size: 14px;
    white-space: nowrap;
    flex-shrink: 0;
}
.chat-input-bar button:active {
    background: var(--primary-dark);
}
.chat-input-bar .btn-img-pick {
    background: transparent;
    color: #666;
    font-size: 20px;
    padding: 4px 8px;
}
.chat-input-bar .btn-img-pick:active {
    background: #f0f0f0;
}
.chat-image {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    margin-top: 4px;
    cursor: pointer;
    display: block;
}
/* 图片预览浮层 */
.image-viewer-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.image-viewer-overlay img {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
}

/* ===== 管理员聊天：左右两栏布局 ===== */
.admin-chat-layout {
    display: flex;
    position: fixed;
    top: 44px;
    bottom: var(--bottom-nav-height);
    left: 50%;
    transform: translateX(-50%);
    max-width: 480px;
    width: 100%;
    overflow: hidden;
}

/* 左侧联系人栏 */
.chat-contact-sidebar {
    width: 105px;
    min-width: 105px;
    background: #EDEDED;
    border-right: 1px solid #D9D9D9;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.contact-sidebar-title {
    padding: 12px 10px 8px;
    font-size: 12px;
    color: #999;
    flex-shrink: 0;
    text-align: center;
}
.contact-sidebar-list {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.contact-item {
    padding: 12px 8px;
    text-align: center;
    cursor: pointer;
    border-bottom: 1px solid #E0E0E0;
    transition: background 0.15s;
    position: relative;
}
.contact-item.active {
    background: #fff;
    border-left: 3px solid var(--primary);
    padding-left: 5px;
}
.contact-item-avatar {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    overflow: hidden;
    margin: 0 auto 6px;
}
.contact-item-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.contact-item-avatar .avatar-default {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
}
.contact-item-name {
    font-size: 12px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.contact-item-role {
    font-size: 10px;
    color: #999;
    margin-top: 2px;
}
.contact-item-preview {
    font-size: 10px;
    color: #B2B2B2;
    margin-top: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 联系人未读角标 */
.contact-unread-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: var(--danger);
    color: #fff;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    font-size: 10px;
    line-height: 18px;
    text-align: center;
    padding: 0 4px;
    font-weight: 600;
}

/* 右侧聊天区 */
.chat-main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #EDEDED;
    overflow: hidden;
    min-width: 0;
}
.chat-main-area .chat-header {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    background: #EDEDED;
    border-bottom: 1px solid #D9D9D9;
    flex-shrink: 0;
    gap: 10px;
}
.chat-main-area .chat-header .header-name {
    font-size: 15px;
    font-weight: 600;
}
.chat-main-area .chat-message-list {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 8px 0;
}
.chat-main-area .chat-input-bar {
    display: flex;
    padding: 7px 10px;
    background: #F7F7F7;
    border-top: 1px solid #E0E0E0;
    gap: 6px;
    flex-shrink: 0;
}
.chat-main-area .chat-input-bar input {
    flex: 1;
    padding: 9px 12px;
    border: 1px solid #E0E0E0;
    border-radius: 6px;
    font-size: 15px;
    background: #fff;
    outline: none;
    min-width: 0;
}
.chat-main-area .chat-input-bar input:focus {
    border-color: var(--primary);
}
.chat-main-area .chat-input-bar button {
    padding: 8px 16px;
    border-radius: 6px;
    background: var(--primary);
    color: #fff;
    border: none;
    font-size: 14px;
    white-space: nowrap;
    flex-shrink: 0;
}


/* ===== 列表项 ===== */
.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--white);
    border-bottom: 1px solid var(--border);
}

.list-item:active {
    background: #FAFAFA;
}

.list-item .left {
    flex: 1;
}

.list-item .title {
    font-size: 14px;
    font-weight: 500;
}

.list-item .subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

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

/* ===== 空状态 ===== */
.empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty .icon {
    font-size: 48px;
    margin-bottom: 12px;
}

/* ===== 分页 ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 16px;
}

.pagination a, .pagination span {
    padding: 6px 12px;
    border-radius: var(--radius);
    background: var(--white);
    font-size: 13px;
}

.pagination .current {
    background: var(--primary);
    color: var(--white);
}

/* ===== 统计卡 ===== */
.stat-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    padding: 0 16px;
    margin-bottom: 12px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px 12px;
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-card .value {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

.stat-card .label {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ===== 细分页签 ===== */
.tabs {
    display: flex;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tabs a {
    flex-shrink: 0;
    padding: 12px 16px;
    font-size: 13px;
    color: var(--text-light);
    border-bottom: 2px solid transparent;
}

.tabs a.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 500;
}

.tab-count {
    display: inline-block;
    min-width: 16px;
    padding: 0 4px;
    margin-left: 4px;
    font-size: 11px;
    line-height: 16px;
    text-align: center;
    border-radius: 8px;
    background: #F2F2F2;
    color: #999;
    vertical-align: middle;
}

.tabs a.active .tab-count {
    background: #FFF0E8;
    color: var(--primary);
}

/* ===== 管理员后台 ===== */
.stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    padding: 12px 16px;
}

.stat-grid .stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 14px 8px;
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-grid .stat-card .value {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

.stat-grid .stat-card .label {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.admin-menu {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    padding: 0 16px;
}

.admin-menu-item {
    background: var(--white);
    border-radius: var(--radius);
    padding: 18px 8px;
    text-align: center;
    box-shadow: var(--shadow);
    color: var(--text);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    position: relative;
}

.admin-menu-item .icon {
    font-size: 24px;
}

.admin-menu-item:active {
    background: var(--primary-light);
    color: var(--primary);
}
.admin-menu-item small {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
}
.admin-menu-item .menu-count {
    position: absolute;
    top: 6px;
    right: 6px;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    border-radius: 9px;
    background: var(--text-muted);
    color: #fff;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
    font-weight: 600;
}
.admin-menu-item .menu-count.danger {
    background: var(--danger);
}

/* ===== 公告：顶部滚动（跑马灯） ===== */
.announce-marquee {
    background: linear-gradient(90deg, #FFF7E6, #FFEFD5);
    overflow: hidden;
    height: 34px;
    display: flex;
    align-items: center;
    position: relative;
}
.announce-marquee .marquee-track {
    display: inline-block;
    white-space: nowrap;
    padding-left: 100%;
    animation: marqueeScroll 18s linear infinite;
}
.announce-marquee .marquee-item {
    font-size: 13px;
    color: #B45309;
    margin-right: 40px;
}
@keyframes marqueeScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* ===== 公告：强制弹窗 ===== */
.announce-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}
.announce-dialog {
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 340px;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: announcePop 0.25s ease;
}
@keyframes announcePop {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.announce-head {
    padding: 14px 18px;
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    text-align: center;
    border-bottom: 1px solid #F0F0F0;
    background: var(--primary-light);
}
.announce-body {
    padding: 16px 18px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.announce-item {
    margin-bottom: 14px;
}
.announce-item:last-child {
    margin-bottom: 0;
}
.announce-item-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}
.announce-item-content {
    font-size: 14px;
    line-height: 1.7;
    color: #555;
    word-break: break-word;
}
.announce-footer {
    padding: 12px 18px;
    border-top: 1px solid #F0F0F0;
}
.announce-confirm {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 22px;
    background: linear-gradient(135deg, #FF6A00, #FF5000);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

/* ===== 产品详情：主图左 + 信息右 ===== */
.detail-head {
    display: flex;
    gap: 14px;
    background: var(--white);
    border-radius: var(--radius);
    margin: 12px 16px;
    padding: 16px;
    box-shadow: var(--shadow);
}
.detail-head-img {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    background: #F5F5F5;
}
.detail-head-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.detail-head-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #CCC;
    font-size: 13px;
}
.detail-head-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.detail-head-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.detail-head-no {
    font-size: 12px;
    color: #999;
}
.detail-head-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
}
.detail-head-price span {
    font-size: 14px;
    font-weight: 500;
}
.detail-gallery {
    display: flex;
    gap: 8px;
    padding: 0 16px 12px;
    margin: -6px 0 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.detail-gallery-thumb {
    width: 56px;
    height: 56px;
    border-radius: 6px;
    object-fit: cover;
    border: 2px solid #EEE;
    cursor: pointer;
    flex-shrink: 0;
    display: block;
}
.detail-gallery-thumb:active {
    border-color: var(--primary);
}

/* ===== 产品详情：详细说明里的图片适配（限宽、可点击放大） ===== */
.detail-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 8px 0;
    border-radius: 6px;
    cursor: zoom-in;
}

/* ===== 内容管理分类标签栏 ===== */
.content-tabs {
    display: flex;
    background: var(--white);
    margin: 12px 16px 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.content-tab {
    flex: 1;
    padding: 12px 0;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    position: relative;
}
.content-tab.active {
    color: var(--primary);
    font-weight: 600;
}
.content-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 3px;
    border-radius: 2px;
    background: var(--primary);
}
.content-panel .card:first-child {
    margin-top: 12px;
}
