/* ============================================================
   common.css - 公共样式文件（最终完整版）
   适用于：值班系统、行政系统、损益系统、知识库
   统一：顶部导航、菜单栏、滑动提示、按钮、弹窗、页面底部
   保留：各系统表格内容、输入框、机会点、卡片等独有样式
   ============================================================ */

/* ===== 1. 全局重置（不碰表单元素，保护表格样式） ===== */

/* 1.1 重置块级元素和文本元素的盒模型 */
body,
div,
section,
article,
header,
footer,
nav,
main,
aside,
h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
dl,
dt,
dd,
li,
table,
caption,
thead,
tbody,
tfoot,
tr,
th,
td,
figure,
figcaption,
blockquote,
pre,
address,
span,
a,
strong,
em,
b,
i,
u,
s,
small,
mark,
code,
label,
legend,
fieldset {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 1.2 字体统一（不影响表单） */
body,
div,
section,
article,
header,
footer,
nav,
main,
aside,
h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
dl,
dt,
dd,
li,
table,
caption,
thead,
tbody,
tfoot,
tr,
th,
td,
span,
a,
label,
.top-bar,
.tab-bar,
.scroll-hint,
.modal-box {
    font-family: -apple-system, 'Segoe UI', Roboto, system-ui, sans-serif;
}

/* 1.3 表单元素：完全不碰，保留各系统原有样式 */
input,
select,
textarea,
button,
input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"],
input[type="week"],
input[type="color"],
input[type="file"],
input[type="checkbox"],
input[type="radio"],
select,
textarea,
button {
    /* 什么都不写！完全跳过！保留各系统原有样式 */
}

/* 1.4 body 背景 */
body {
    background: #f0f4f8;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 10px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    overflow-x: hidden;
}


/* ===== 2. 主容器 ===== */
.app-container {
    max-width: 100%;
    width: 100%;
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 20, 40, 0.08);
    padding: 16px 14px 24px;
    margin-top: 10px;
    overflow-x: hidden;
}


/* ===== 3. 顶部导航（4行结构） ===== */

/* 3.1 品牌色方案 */
.top-bar-brand-blue {
    background: linear-gradient(135deg, #0f2b4f 0%, #1a3a6a 100%);
}
.top-bar-brand-green {
    background: linear-gradient(135deg, #0d4a3a 0%, #1a6a50 100%);
}
.top-bar-brand-purple {
    background: linear-gradient(135deg, #3d1a6a 0%, #5a2a8a 100%);
}
.top-bar-brand-orange {
    background: linear-gradient(135deg, #8a4a0a 0%, #b86a1a 100%);
}

/* 3.2 顶部栏容器 */
.top-bar {
    color: #fff;
    padding: 8px 14px;
    border-radius: 10px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.top-bar,
.top-bar * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, 'Segoe UI', Roboto, system-ui, sans-serif;
}

/* 3.3 行布局 */
.top-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 10px;
    width: 100%;
}

/* 3.4 品牌区域 */
.top-row .brand {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 1 auto;
}
.top-row .brand h2 {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.3px;
}
.top-row .brand .badge {
    background: rgba(255, 255, 255, 0.10);
    padding: 1px 8px;
    border-radius: 12px;
    font-size: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.top-row .brand .admin-badge {
    background: rgba(251, 191, 36, 0.20);
    color: #fbbf24;
    padding: 1px 10px;
    border-radius: 12px;
    font-size: 10px;
    border: 1px solid rgba(251, 191, 36, 0.15);
}

/* 3.5 登录区域 */
.top-row .login-section {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.top-row .login-section .shop-name {
    font-weight: 600;
    color: #fff;
    background: rgba(255, 255, 255, 0.10);
    padding: 2px 12px;
    border-radius: 12px;
    font-size: 12px;
}

/* 权限标签 */
.perm-badge {
    font-size: 10px;
    padding: 2px 10px;
    border-radius: 10px;
    font-weight: 500;
    white-space: nowrap;
}
.perm-badge.perm-admin {
    background: rgba(239, 68, 68, 0.25);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.20);
}
.perm-badge.perm-view {
    background: rgba(251, 191, 36, 0.20);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.15);
}
.perm-badge.perm-edit {
    background: rgba(52, 211, 153, 0.20);
    color: #6ee7b7;
    border: 1px solid rgba(52, 211, 153, 0.15);
}

/* 3.6 用户操作按钮 */
.top-row .user-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
.top-row .user-actions button {
    border: none;
    border-radius: 4px;
    padding: 2px 10px;
    font-size: 11px;
    cursor: pointer;
    transition: 0.2s;
    color: #fff;
    min-height: 26px;
    white-space: nowrap;
}
.top-row .user-actions button:active {
    transform: scale(0.96);
}
.top-row .user-actions .btn-changepwd {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.top-row .user-actions .btn-changepwd:hover {
    background: rgba(255, 255, 255, 0.25);
}
.top-row .user-actions .btn-admin {
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.20);
}
.top-row .user-actions .btn-admin:hover {
    background: rgba(251, 191, 36, 0.30);
}
.top-row .user-actions .btn-auth {
    background: rgba(139, 92, 246, 0.25);
    border: 1px solid rgba(139, 92, 246, 0.25);
}
.top-row .user-actions .btn-auth:hover {
    background: rgba(139, 92, 246, 0.40);
}
.top-row .user-actions .btn-back {
    background: #8b5cf6;
}
.top-row .user-actions .btn-back:hover {
    background: #7c3aed;
}
.top-row .user-actions .btn-history-top {
    background: #f59e0b;
}
.top-row .user-actions .btn-history-top:hover {
    background: #d97706;
}
.top-row .user-actions .btn-logout {
    background: rgba(220, 38, 38, 0.70);
}
.top-row .user-actions .btn-logout:hover {
    background: #dc2626;
}

/* 3.7 功能操作按钮 */
.top-row .btn-group {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
.top-row .btn-group .btn {
    padding: 2px 10px;
    border: none;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    font-weight: 500;
    transition: 0.2s;
    color: #fff;
    min-height: 26px;
    white-space: nowrap;
}
.top-row .btn-group .btn:active {
    transform: scale(0.96);
}
.top-row .btn-group .btn-checkall {
    background: #6366f1;
}
.top-row .btn-group .btn-checkall:hover {
    background: #4f46e5;
}
.top-row .btn-group .btn-cancelall {
    background: #8b5cf6;
}
.top-row .btn-group .btn-cancelall:hover {
    background: #7c3aed;
}
.top-row .btn-group .btn-query {
    background: #0ea5e9;
}
.top-row .btn-group .btn-query:hover {
    background: #0284c7;
}
.top-row .btn-group .btn-history {
    background: #f59e0b;
}
.top-row .btn-group .btn-history:hover {
    background: #d97706;
}


/* ===== 4. 菜单栏 ===== */

/* 4.1 一级菜单 */
.tab-bar,
.tab-bar * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, 'Segoe UI', Roboto, system-ui, sans-serif;
}
.tab-bar {
    display: flex;
    gap: 4px;
    background: #f0f4fa;
    padding: 4px;
    border-radius: 30px;
    margin-bottom: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #c1c9d4 #f0f2f5;
}
.tab-bar::-webkit-scrollbar {
    height: 4px;
    display: block;
}
.tab-bar::-webkit-scrollbar-track {
    background: #f0f2f5;
    border-radius: 2px;
}
.tab-bar::-webkit-scrollbar-thumb {
    background: #c1c9d4;
    border-radius: 2px;
}

.tab-btn {
    border: none;
    background: transparent;
    padding: 6px 14px;
    border-radius: 24px;
    font-weight: 500;
    font-size: 12px;
    color: #3e5f7a;
    cursor: pointer;
    transition: 0.2s;
    text-align: center;
    white-space: nowrap;
    flex-shrink: 0;
    min-height: 32px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.tab-btn i {
    font-size: 12px;
}
.tab-btn:active {
    transform: scale(0.96);
}
.tab-btn:hover {
    background: #e8edf4;
}
.tab-btn.active {
    background: #1a3a6a;
    color: white;
    box-shadow: 0 2px 6px rgba(26, 58, 106, 0.20);
}
.tab-btn.active i {
    color: white;
}

/* 4.2 二级菜单 */
.tab-bar-2,
.tab-bar-2 * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, 'Segoe UI', Roboto, system-ui, sans-serif;
}
.tab-bar-2 {
    display: flex;
    gap: 4px;
    background: #f8fafc;
    padding: 4px 6px;
    border-radius: 10px;
    border: 1px solid #e2eaf2;
    margin-bottom: 6px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #c1c9d4 #f0f2f5;
}
.tab-bar-2::-webkit-scrollbar {
    height: 4px;
    display: block;
}
.tab-bar-2::-webkit-scrollbar-track {
    background: #f0f2f5;
    border-radius: 2px;
}
.tab-bar-2::-webkit-scrollbar-thumb {
    background: #c1c9d4;
    border-radius: 2px;
}

.tab-btn-2 {
    border: none;
    background: transparent;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 12px;
    color: #4a6a8a;
    cursor: pointer;
    transition: 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
    min-height: 32px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.tab-btn-2 i {
    font-size: 12px;
}
.tab-btn-2:active {
    transform: scale(0.96);
}
.tab-btn-2:hover {
    background: #e8edf4;
}
.tab-btn-2.active {
    background: #1a3a6a;
    color: white;
    box-shadow: 0 2px 6px rgba(26, 58, 106, 0.20);
}
.tab-btn-2.active i {
    color: white;
}

/* 4.3 三级菜单 */
.tab-bar-3,
.tab-bar-3 * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, 'Segoe UI', Roboto, system-ui, sans-serif;
}
.tab-bar-3 {
    display: flex;
    gap: 4px;
    background: #f3f4f6;
    padding: 4px 6px;
    border-radius: 8px;
    margin-bottom: 6px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #c1c9d4 #f0f2f5;
}
.tab-bar-3::-webkit-scrollbar {
    height: 4px;
    display: block;
}
.tab-bar-3::-webkit-scrollbar-track {
    background: #f0f2f5;
    border-radius: 2px;
}
.tab-bar-3::-webkit-scrollbar-thumb {
    background: #c1c9d4;
    border-radius: 2px;
}

.tab-btn-3 {
    border: none;
    background: transparent;
    padding: 6px 14px;
    border-radius: 16px;
    font-weight: 500;
    font-size: 12px;
    color: #6b7280;
    cursor: pointer;
    transition: 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
    min-height: 32px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.tab-btn-3 i {
    font-size: 12px;
}
.tab-btn-3:active {
    transform: scale(0.96);
}
.tab-btn-3:hover {
    background: #e5e7eb;
    color: #374151;
}
.tab-btn-3.active {
    background: #1a3a6a;
    color: white;
    box-shadow: 0 2px 6px rgba(26, 58, 106, 0.18);
}
.tab-btn-3.active i {
    color: white;
}


/* ===== 5. 滑动提示条（居左） ===== */

.scroll-hint,
.scroll-hint * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, 'Segoe UI', Roboto, system-ui, sans-serif;
}
.scroll-hint {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding: 2px 0 6px 0;
    font-size: 10px;
    color: #9ca3af;
}
.scroll-hint .scroll-text {
    font-size: 10px;
    color: #9ca3af;
    white-space: nowrap;
}
.scroll-hint .scroll-bar-track {
    flex: 1;
    max-width: 120px;
    height: 3px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}
.scroll-hint .scroll-bar-track .scroll-bar-thumb {
    width: 35%;
    height: 100%;
    background: #c1c9d4;
    border-radius: 2px;
    animation: scrollSlide 2.5s ease-in-out infinite alternate;
}
@keyframes scrollSlide {
    0% { transform: translateX(0); }
    100% { transform: translateX(150%); }
}
.scroll-hint.hidden {
    display: none !important;
}


/* ===== 6. 统一按钮 ===== */

.btn {
    padding: 6px 16px;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 12px;
    cursor: pointer;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 32px;
    white-space: nowrap;
}
.btn:active {
    transform: scale(0.96);
}

.btn-primary {
    background: #1e4f7a;
    color: white;
}
.btn-primary:hover {
    background: #143b5c;
}

.btn-success {
    background: #1e7a5e;
    color: white;
}
.btn-success:hover {
    background: #146349;
}

.btn-danger {
    background: #b13a3a;
    color: white;
}
.btn-danger:hover {
    background: #8f2c2c;
}

.btn-warning {
    background: #f59e0b;
    color: white;
}
.btn-warning:hover {
    background: #d97706;
}

.btn-outline {
    background: transparent;
    border: 1px solid #d0ddee;
    color: #1f3f5c;
}
.btn-outline:hover {
    background: #eaf0f8;
}

.btn-sm {
    padding: 4px 12px;
    font-size: 11px;
    min-height: 28px;
}


/* ===== 7. 弹窗（统一） ===== */

/* 7.1 遮罩 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 16px;
}
.modal-overlay.show {
    display: flex;
}

/* 7.2 弹窗卡片 */
.modal-box {
    background: white;
    border-radius: 24px;
    padding: 20px 18px;
    max-width: 860px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
    animation: modalFadeIn 0.25s ease;
}
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 7.3 弹窗标题栏 */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2eaf2;
    padding-bottom: 10px;
    margin-bottom: 12px;
    flex-shrink: 0;
}
.modal-header h2 {
    font-size: 18px;
    color: #0a2942;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}
.modal-header h2 i {
    color: #2a7de1;
}
.modal-header .close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #6a89a5;
    cursor: pointer;
    padding: 0 8px;
    transition: 0.2s;
    line-height: 1;
}
.modal-header .close-btn:hover {
    color: #1f3f5c;
    transform: rotate(90deg);
}

/* 7.4 弹窗内容区 */
.modal-body {
    flex: 1;
    overflow: auto;
    padding: 4px 0;
}
.modal-body::-webkit-scrollbar {
    width: 6px;
}
.modal-body::-webkit-scrollbar-thumb {
    background: #c1c9d4;
    border-radius: 3px;
}
.modal-body::-webkit-scrollbar-track {
    background: #f0f2f5;
}

/* 7.5 弹窗底部操作栏 */
.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 12px;
    border-top: 1px solid #e2eaf2;
    margin-top: 12px;
    flex-shrink: 0;
    flex-wrap: wrap;
}
.modal-footer .btn {
    padding: 6px 20px;
    font-size: 12px;
}


/* ===== 8. 历史预览弹窗（查看详情） ===== */

.preview-modal .modal-body {
    background: #f5f8fa;
    border-radius: 12px;
    border: 1px solid #e2eaf2;
    padding: 16px 20px;
    min-height: 200px;
    max-height: 55vh;
}

/* 预览信息栏 */
.preview-meta {
    background: #fff;
    padding: 8px 14px;
    border-radius: 8px;
    margin-bottom: 12px;
    border-left: 4px solid #8b5cf6;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    font-size: 12px;
    color: #1f3f5c;
}
.preview-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}
.preview-meta .meta-item .label {
    color: #6a89a5;
}
.preview-meta .meta-item .value {
    font-weight: 500;
    color: #0a2942;
}

/* 预览数据网格 */
.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin-top: 6px;
}
.preview-card {
    background: white;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid #e8edf2;
    text-align: center;
}
.preview-card .preview-label {
    font-size: 10px;
    color: #6a89a5;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 500;
}
.preview-card .preview-value {
    font-size: 18px;
    font-weight: 700;
    color: #0a2942;
    margin-top: 2px;
}
.preview-card .preview-value.positive {
    color: #1e7a5e;
}
.preview-card .preview-value.negative {
    color: #b13a3a;
}
.preview-card .preview-value.warning {
    color: #b8860b;
}

/* 预览详情列表 */
.preview-detail {
    margin-top: 14px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 16px;
    background: white;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid #e8edf2;
    font-size: 13px;
}
.preview-detail .detail-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px solid #f0f4f8;
}
.preview-detail .detail-row .detail-label {
    color: #4a6a8a;
}
.preview-detail .detail-row .detail-value {
    font-weight: 600;
    color: #0a2942;
}


/* ===== 9. 页面底部 ===== */

.page-footer {
    margin-top: 16px;
    font-size: 12px;
    color: #6a89a5;
    text-align: right;
    border-top: 1px solid #e6edf5;
    padding-top: 10px;
}
.page-footer i {
    color: #8a9aa8;
    margin-right: 4px;
}


/* ===== 10. 锁定状态标签 ===== */

.lock-badge {
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}
.lock-badge.draft {
    background: #e8edf2;
    color: #3a4a5a;
}
.lock-badge.editable {
    background: #d1fae5;
    color: #065f46;
}
.lock-badge.locked {
    background: #fde8d0;
    color: #7a4a1a;
}


/* ===== 11. 信息头 ===== */

.info-header {
    background: #f8fafc;
    border-radius: 8px;
    padding: 8px 14px;
    margin-bottom: 10px;
    border: 1px solid #e2eaf2;
    font-size: 12px;
    color: #1f3f5c;
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.6;
}
.info-header .info-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 12px;
}
.info-header .info-row .label {
    font-weight: 500;
    color: #4a6a8a;
}
.info-header .info-row .value {
    font-weight: 600;
    color: #0a2942;
}
.info-header .info-row .divider {
    color: #d6e0ea;
}
.info-header .info-table-name {
    font-size: 13px;
    font-weight: 600;
    color: #0a2942;
}


/* ===== 12. 表格容器（不影响表格内部样式） ===== */

/* 只控制表格外容器，不控制表格内部 */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    border: 1px solid #e2eaf2;
    background: white;
    padding: 2px;
}
.table-wrap::-webkit-scrollbar {
    height: 6px;
    display: block;
}
.table-wrap::-webkit-scrollbar-track {
    background: #f0f2f5;
    border-radius: 3px;
}
.table-wrap::-webkit-scrollbar-thumb {
    background: #b0b8c4;
    border-radius: 3px;
}


/* ===== 13. 移动端适配 ===== */

@media (max-width: 768px) {
    body {
        padding: 6px;
    }
    .app-container {
        padding: 10px 8px 16px;
        border-radius: 16px;
    }

    /* 顶部栏 */
    .top-row .brand h2 {
        font-size: 13px;
    }
    .top-row .brand .badge {
        font-size: 9px;
    }
    .top-row .login-section .shop-name {
        font-size: 11px;
    }
    .top-row .user-actions button,
    .top-row .btn-group .btn {
        font-size: 10px;
        padding: 2px 8px;
        min-height: 24px;
    }
    .perm-badge {
        font-size: 9px;
        padding: 1px 8px;
    }

    /* 菜单 */
    .tab-btn {
        font-size: 11px;
        padding: 5px 12px;
        min-height: 30px;
    }
    .tab-btn-2 {
        font-size: 11px;
        padding: 5px 12px;
        min-height: 30px;
    }
    .tab-btn-3 {
        font-size: 11px;
        padding: 5px 12px;
        min-height: 30px;
    }

    /* 按钮 */
    .btn {
        font-size: 11px;
        padding: 4px 12px;
        min-height: 28px;
    }
    .btn-sm {
        font-size: 10px;
        padding: 3px 10px;
        min-height: 24px;
    }

    /* 弹窗 */
    .modal-box {
        padding: 14px 12px;
        border-radius: 16px;
    }
    .modal-header h2 {
        font-size: 15px;
    }

    /* 预览弹窗 */
    .preview-modal .modal-body {
        padding: 12px 14px;
        max-height: 50vh;
        min-height: 150px;
    }
    .preview-meta {
        font-size: 11px;
        padding: 6px 10px;
        gap: 4px 12px;
    }
    .preview-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 6px;
    }
    .preview-card .preview-value {
        font-size: 15px;
    }
    .preview-detail {
        grid-template-columns: 1fr;
        font-size: 12px;
        padding: 10px 12px;
    }

    /* 信息头 */
    .info-header {
        font-size: 11px;
        padding: 6px 10px;
    }
    .info-header .info-table-name {
        font-size: 12px;
    }

    /* 页面底部 */
    .page-footer {
        font-size: 11px;
    }
}

@media (max-width: 400px) {
    .top-row .brand h2 {
        font-size: 12px;
    }
    .top-row .login-section .shop-name {
        font-size: 10px;
        padding: 1px 8px;
    }
    .tab-btn {
        font-size: 10px;
        padding: 4px 10px;
        min-height: 28px;
    }
    .tab-btn-2 {
        font-size: 10px;
        padding: 4px 10px;
        min-height: 28px;
    }
    .tab-btn-3 {
        font-size: 10px;
        padding: 4px 10px;
        min-height: 28px;
    }
    .modal-box {
        padding: 12px 10px;
        border-radius: 14px;
    }
    .modal-header h2 {
        font-size: 14px;
    }
    .preview-grid {
        grid-template-columns: 1fr 1fr;
    }
    .preview-card .preview-value {
        font-size: 13px;
    }
}