/* ============================================
   精工银饰进销存管理系统 - 样式表
   ============================================ */

/* CSS 变量 */
:root {
    /* 主色调 - 银灰色系 */
    --primary: #4a5568;
    --primary-light: #718096;
    --primary-dark: #2d3748;
    --accent: #c9a96e;
    --accent-light: #d4b87e;
    --accent-dark: #b8975a;

    /* 功能色 */
    --success: #38a169;
    --success-light: #e6ffed;
    --danger: #e53e3e;
    --danger-light: #fff0f0;
    --warning: #dd6b20;
    --warning-light: #fffaf0;
    --info: #3182ce;
    --info-light: #ebf8ff;

    /* 中性色 */
    --bg: #f0f2f5;
    --bg-white: #ffffff;
    --bg-card: #ffffff;
    --border: #e2e8f0;
    --border-light: #edf2f7;
    --text: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #a0aec0;
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 12px rgba(0,0,0,0.12);
    --radius: 8px;
    --radius-sm: 4px;
    --sidebar-width: 220px;
}

/* 重置 */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    color: var(--text);
    background: var(--bg);
    overflow: hidden;
}

/* 滚动条 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e0; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #a0aec0; }

/* ========== 布局 ========== */
#app { display: flex; height: 100vh; }

/* 侧边栏 */
.sidebar {
    width: var(--sidebar-width);
    background: var(--primary-dark);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: transform 0.3s;
    z-index: 100;
}
.sidebar-header { padding: 20px 18px 16px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.logo { display: flex; align-items: center; gap: 8px; }
.logo-icon { font-size: 24px; color: var(--accent); }
.logo-text { font-size: 18px; font-weight: 700; color: #fff; letter-spacing: 1px; }
.logo-subtitle { font-size: 11px; color: rgba(255,255,255,0.5); margin-top: 4px; padding-left: 32px; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 8px 0; }
.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}
.nav-item:hover { color: #fff; background: rgba(255,255,255,0.05); }
.nav-item.active {
    color: #fff;
    background: rgba(201,169,110,0.15);
    border-left-color: var(--accent);
}
.nav-icon { font-size: 16px; width: 20px; text-align: center; }
.nav-divider { height: 1px; background: rgba(255,255,255,0.1); margin: 8px 16px; }

.sidebar-footer { padding: 12px 18px; border-top: 1px solid rgba(255,255,255,0.1); }
.silver-price-box {
    background: rgba(201,169,110,0.15);
    border: 1px solid rgba(201,169,110,0.3);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
}
.silver-price-box.connected {
    border-color: rgba(56, 161, 105, 0.4);
}
.sp-header { display: flex; justify-content: space-between; align-items: center; }
.sp-label { font-size: 11px; color: rgba(255,255,255,0.6); }
.sp-value { font-size: 16px; font-weight: 700; color: var(--accent-light); margin-top: 2px; }
.sp-detail { font-size: 10px; color: rgba(255,255,255,0.45); margin-top: 2px; }
.sp-time { font-size: 10px; color: rgba(255,255,255,0.4); margin-top: 2px; }
.sp-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #e53e3e; display: inline-block;
    animation: sp-pulse 1.5s ease-in-out infinite;
}
.sp-dot.connected {
    background: #38a169;
    animation: none;
    box-shadow: 0 0 6px rgba(56, 161, 105, 0.5);
}
@keyframes sp-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* 主内容区 */
.main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

/* 顶部栏 */
.topbar {
    height: 56px;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    flex-shrink: 0;
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.menu-toggle {
    background: none; border: none; font-size: 18px; cursor: pointer;
    color: var(--text-secondary); display: none;
}
.page-title { font-size: 18px; font-weight: 600; color: var(--text); }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.search-box { display: flex; align-items: center; gap: 4px; }
.search-box input {
    width: 240px; padding: 7px 12px; border: 1px solid var(--border);
    border-radius: var(--radius-sm); font-size: 13px; outline: none;
    transition: border-color 0.2s;
}
.search-box input:focus { border-color: var(--accent); }
.search-btn {
    background: none; border: none; cursor: pointer; font-size: 14px;
    color: var(--text-muted); padding: 4px 8px;
}
.topbar-date { font-size: 13px; color: var(--text-muted); white-space: nowrap; }

/* 内容区 */
.content-area { flex: 1; overflow-y: auto; padding: 20px; }

/* ========== 通用组件 ========== */

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 16px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    font-family: inherit;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-secondary { background: var(--border); color: var(--text-secondary); }
.btn-secondary:hover { background: #cbd5e0; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #c53030; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #2f855a; }
.btn-outline {
    background: transparent; border: 1px solid var(--border);
    color: var(--text-secondary);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-warning { background: var(--warning); color: #fff; border: none; }
.btn-warning:hover { background: #dd6b20; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-lg { padding: 10px 24px; font-size: 15px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* 卡片 */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-light);
}
.card-title { font-size: 15px; font-weight: 600; color: var(--text); }
.card-body { padding: 20px; }
.card-actions { display: flex; gap: 8px; align-items: center; }

/* 表格 */
.table-wrapper { overflow-x: auto; }
table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.data-table th {
    text-align: left;
    padding: 10px 12px;
    background: #f7fafc;
    color: var(--text-secondary);
    font-weight: 600;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
}
.data-table td {
    padding: 9px 12px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text);
    white-space: nowrap;
}
.data-table tbody tr:hover { background: #f7fafc; }
.data-table tbody tr:last-child td { border-bottom: none; }

/* 状态标签 */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
}
.badge-success { background: var(--success-light); color: var(--success); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-info { background: var(--info-light); color: var(--info); }
.badge-default { background: #edf2f7; color: var(--text-secondary); }

/* 表单 */
.form-group { margin-bottom: 14px; }
.form-label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 5px;
    font-weight: 500;
}
.form-label .required { color: var(--danger); }
.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(201,169,110,0.1); }
.form-control:disabled { background: #f7fafc; color: var(--text-muted); }
textarea.form-control { resize: vertical; min-height: 60px; }
select.form-control { cursor: pointer; }

.form-row { display: flex; gap: 14px; }
.form-row .form-group { flex: 1; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

/* ========== 仪表盘 ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}
.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; flex-shrink: 0;
}
.stat-icon.blue { background: #ebf8ff; }
.stat-icon.green { background: #e6ffed; }
.stat-icon.orange { background: #fffaf0; }
.stat-icon.purple { background: #faf5ff; }
.stat-icon.red { background: #fff0f0; }
.stat-icon.gold { background: #fffbeb; }
.stat-info { flex: 1; }
.stat-label { font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }
.stat-value { font-size: 24px; font-weight: 700; color: var(--text); }
.stat-change { font-size: 12px; margin-top: 2px; }
.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
.chart-container { height: 300px; }
.full-width { grid-column: 1 / -1; }

/* 快捷操作 */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.quick-action {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}
.quick-action:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.quick-action-icon { font-size: 28px; margin-bottom: 8px; }
.quick-action-label { font-size: 13px; color: var(--text-secondary); font-weight: 500; }

/* ========== 工具栏 ========== */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}
.toolbar-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar-right { display: flex; align-items: center; gap: 8px; }
.filter-input {
    padding: 7px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    outline: none;
}
.filter-input:focus { border-color: var(--accent); }
.filter-select {
    padding: 7px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    outline: none;
    cursor: pointer;
    background: #fff;
}

/* ========== 模态框 ========== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: flex-start;
    justify-content: center;
    padding: 30px 20px;
    overflow-y: auto;
}
.modal-overlay.active { display: flex; }
.modal {
    background: #fff;
    border-radius: var(--radius);
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalIn 0.2s ease;
}
.modal.modal-lg { max-width: 900px; }
.modal.modal-xl { max-width: 1200px; }
@keyframes modalIn { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.modal-title { font-size: 17px; font-weight: 600; }
.modal-close {
    background: none; border: none; font-size: 18px; cursor: pointer;
    color: var(--text-muted); padding: 4px; line-height: 1;
}
.modal-close:hover { color: var(--danger); }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.modal-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0;
}

/* 确认对话框 */
.confirm-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1100;
    align-items: center;
    justify-content: center;
}
.confirm-overlay.active { display: flex; }
.confirm-dialog {
    background: #fff;
    border-radius: var(--radius);
    padding: 24px;
    width: 360px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.confirm-icon { font-size: 36px; margin-bottom: 12px; }
.confirm-message { font-size: 15px; color: var(--text); margin-bottom: 20px; line-height: 1.6; }
.confirm-buttons { display: flex; gap: 10px; justify-content: center; }

/* Toast */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.toast {
    background: #fff;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    padding: 12px 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: toastIn 0.3s ease;
    border-left: 4px solid var(--info);
    min-width: 200px;
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
.toast.fade-out { animation: toastOut 0.3s ease forwards; }
@keyframes toastIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes toastOut { to { transform: translateX(100%); opacity: 0; } }

/* 条码 */
.barcode-display {
    text-align: center;
    padding: 10px;
}
.barcode-display svg { max-width: 100%; }

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.empty-state-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state-text { font-size: 15px; margin-bottom: 8px; }
.empty-state-sub { font-size: 13px; }

/* 分页 */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 16px;
}
.pagination button {
    padding: 6px 12px;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    transition: all 0.2s;
}
.pagination button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.pagination button.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }
.pagination-info { font-size: 13px; color: var(--text-muted); margin: 0 12px; }

/* 批量入库表格 */
.batch-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.batch-table th {
    background: #f7fafc;
    padding: 8px 6px;
    text-align: left;
    border-bottom: 2px solid var(--border);
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
}
.batch-table td { padding: 4px 6px; border-bottom: 1px solid var(--border-light); }
.batch-table input, .batch-table select {
    width: 100%;
    padding: 5px 8px;
    border: 1px solid var(--border);
    border-radius: 3px;
    font-size: 13px;
    outline: none;
    font-family: inherit;
}
.batch-table input:focus, .batch-table select:focus { border-color: var(--accent); }
.batch-table .delete-row { cursor: pointer; color: var(--danger); font-size: 16px; text-align: center; }
.batch-table .delete-row:hover { opacity: 0.7; }

/* 打印 */
.print-area { display: none; }
@media print {
    body * { visibility: hidden; }
    .print-area { display: block; visibility: visible; position: absolute; top: 0; left: 0; width: 100%; }
    .print-area * { visibility: visible; }
    @page { margin: 10mm; }
}

/* 标签打印样式 */
.label-print {
    display: inline-block;
    width: 180px;
    padding: 8px;
    border: 1px dashed #ccc;
    margin: 4px;
    text-align: center;
    font-size: 12px;
}
.label-print .lp-name { font-weight: 600; margin-bottom: 4px; }
.label-print .lp-info { color: var(--text-muted); font-size: 11px; margin-bottom: 4px; }
.label-print .lp-price { font-size: 16px; font-weight: 700; color: var(--danger); }

/* 响应式 */
@media (max-width: 1024px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .sidebar { position: fixed; left: 0; top: 0; height: 100%; transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .menu-toggle { display: block; }
    .search-box input { width: 150px; }
    .topbar-date { display: none; }
    .form-row { flex-direction: column; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 16px; height: 16px;
    border: 2px solid #ddd;
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 选中行高亮 */
.data-table tbody tr.selected { background: rgba(201,169,110,0.08); }

/* 金额高亮 */
.amount { font-weight: 600; color: var(--danger); }
.amount-positive { font-weight: 600; color: var(--success); }
.amount-negative { font-weight: 600; color: var(--danger); }

/* 进度条 */
.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--border-light);
    border-radius: 3px;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    transition: width 0.3s;
}

/* 导出中心选项 */
.export-option {
    transition: all 0.2s;
}
.export-option:hover {
    border-color: var(--primary) !important;
    background: var(--bg);
}
.export-option input[type="checkbox"]:checked + div {
    color: var(--primary);
}

/* 拖拽上传区域 */
#dropZone {
    transition: border-color 0.2s;
}

/* 批量表格标价模式列 */
.batch-table select {
    padding: 4px 6px;
    font-size: 12px;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: #fff;
}

/* 标价提示文字 */
#inboundPriceHint, #editPriceHint {
    line-height: 1.4;
}

/* ====== 入库行内编辑（修改/确认机制） ====== */
.row-editing {
    background: rgba(201,169,110,0.06) !important;
    box-shadow: inset 3px 0 0 var(--accent);
}
.row-editing td {
    padding: 4px 4px !important;
}
.inline-edit-input {
    padding: 4px 6px;
    font-size: 12px;
    border: 1px solid var(--accent);
    border-radius: 3px;
    background: #fff;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s;
}
.inline-edit-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(49,130,222,0.15);
}

/* ====== 登录界面 ====== */
.login-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 50%, #2d3748 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.login-box {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 48px 40px;
    width: 380px;
    max-width: 90vw;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}
.login-logo-icon {
    font-size: 36px;
    color: var(--accent);
}
.login-logo-text {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
}
.login-subtitle {
    font-size: 14px;
    color: rgba(255,255,255,0.5);
    margin-bottom: 32px;
    letter-spacing: 2px;
}
.login-form {
    text-align: left;
}
.login-field {
    margin-bottom: 16px;
}
.login-field label {
    display: block;
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    margin-bottom: 6px;
}
.login-field input {
    width: 100%;
    padding: 10px 14px;
    font-size: 15px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    background: rgba(255,255,255,0.08);
    color: #fff;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
    box-sizing: border-box;
}
.login-field input:focus {
    border-color: var(--accent);
    background: rgba(255,255,255,0.12);
}
.login-field input::placeholder {
    color: rgba(255,255,255,0.3);
}
.login-btn {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    margin-top: 8px;
    border-radius: 8px;
}
.login-error {
    color: #fc8181;
    font-size: 13px;
    margin-top: 12px;
    min-height: 18px;
}
.login-hint {
    margin-top: 24px;
    font-size: 11px;
    color: rgba(255,255,255,0.3);
    letter-spacing: 1px;
}

/* ====== PWA / 移动端适配 ====== */
@media (max-width: 768px) {
    .login-box { padding: 32px 24px; width: 92vw; }
    .login-logo-text { font-size: 24px; }
    .toolbar { flex-direction: column; gap: 8px; }
    .toolbar-left, .toolbar-right { flex-wrap: wrap; gap: 6px; }
    .toolbar-left .filter-input,
    .toolbar-left .filter-select { width: auto !important; min-width: 100px; }
    .data-table { font-size: 12px; }
    .data-table th, .data-table td { padding: 6px 4px; white-space: nowrap; }
    .data-table .btn-sm { padding: 3px 6px; font-size: 11px; }
    .stats-grid { grid-template-columns: 1fr 1fr !important; gap: 8px !important; }
    .stat-card { padding: 12px !important; }
    .stat-value { font-size: 18px !important; }
    .modal { width: 95vw !important; margin: 10px !important; }
    .modal-body { padding: 16px !important; max-height: 70vh !important; }
    .topbar-right .search-box { display: none; }
    .content-area { padding: 12px !important; }
    .card-body { padding: 12px !important; }
    .table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .sidebar { width: 240px; }
    .silver-price-box { padding: 8px 10px !important; }
    .sp-value { font-size: 16px !important; }
    .page-btn { padding: 4px 8px !important; font-size: 12px !important; }
}
@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr !important; }
    .login-logo-text { font-size: 20px; }
    .login-subtitle { font-size: 12px; }
    .topbar-left h1 { font-size: 16px; }
    .modal-header { padding: 12px 16px !important; }
    .modal-title { font-size: 16px !important; }
}

/* 款号图片缩略图样式 */
.data-table td img.style-thumb {
    width: 28px; height: 28px; border-radius: 3px;
    object-fit: cover; border: 1px solid var(--border);
    vertical-align: middle; cursor: pointer;
    transition: transform 0.2s;
}
.data-table td img.style-thumb:hover {
    transform: scale(2.5); z-index: 10;
    position: relative; border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.style-no-cell {
    display: flex; align-items: center; gap: 4px;
}
.style-no-cell .btn-upload-img {
    font-size: 10px; padding: 1px 4px; line-height: 1;
    border-radius: 2px; border: 1px dashed var(--border);
    background: var(--bg); cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s;
}
.style-no-cell .btn-upload-img:hover {
    background: var(--accent-light); color: var(--accent);
    border-color: var(--accent);
}
.same-style-badge {
    font-size: 10px; color: var(--text-muted);
    background: var(--bg-secondary); padding: 1px 4px;
    border-radius: 2px; display: inline-block;
}

/* 库存筛选增强样式 */
.toolbar-left .filter-input,
.toolbar-left .filter-select {
    font-size: 13px;
}
.toolbar-left {
    flex-wrap: wrap;
    gap: 6px;
}
