/* ============================================
   YunD 进销存管理系统 - 玻璃拟态主题
   基于 TemplateMo 3D Glassmorphism Dashboard
============================================ */

/* ============================================
   CSS CUSTOM PROPERTIES - 深色主题（默认）
============================================ */
:root {
    --emerald: #059669;
    --emerald-light: #34d399;
    --gold: #d4a574;
    --gold-light: #e8c9a0;
    --amber: #b45309;
    --cream: #fef3e2;
    
    --coral: #e07a5f;
    --slate: #475569;
    
    --indigo-light: #a5b4fc;
    --purple-light: #c084fc;
    --blue-light: #60a5fa;
    --orange-light: #fb923c;
    --cyan-light: #22d3ee;
    
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: rgba(0, 0, 0, 0.3);
    --glass-hover: rgba(255, 255, 255, 0.08);
    --glass-blur: 15px;
    
    --bg-dark: #0a0f0d;
    --bg-gradient-1: #0d1a14;
    --bg-gradient-2: #132419;
    --bg-gradient-3: #1a2e23;
    
    --text-primary: #f5f5f4;
    --text-secondary: rgba(245, 245, 244, 0.7);
    --text-muted: rgba(245, 245, 244, 0.8);
    
    --success: #22c55e;
    --warning: #eab308;
    --danger: #dc2626;
    --info: #0ea5e9;
    
    --sidebar-width: 260px;
    --navbar-height: 60px;
    --border-radius: 16px;
    --card-padding: 20px;
    
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    
    color-scheme: dark;
}

/* ============================================
   RESET & BASE STYLES
============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    /* scroll-behavior: smooth; 移除平滑滚动，避免导航点击时自动回到顶部 */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ============================================
   ANIMATED BACKGROUND
============================================ */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    /* 默认使用渐变背景 */
    background: linear-gradient(135deg, var(--bg-gradient-1) 0%, var(--bg-gradient-2) 50%, var(--bg-gradient-3) 100%);
}

/* 当有背景图片时，使用图片覆盖渐变背景 */
.background.has-background-image {
    background-image: url('../images/background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 背景图片加载失败时，使用渐变背景 */
.background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse 80% 50% at 20% 40%, rgba(120, 0, 255, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 60%, rgba(0, 200, 255, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse 50% 30% at 50% 80%, rgba(255, 0, 200, 0.1) 0%, transparent 50%);
}

/* 当有背景图片时，隐藏光晕效果 */
.background.has-background-image::before {
    display: none;
}

.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    z-index: -1;
    animation: float 20s ease-in-out infinite;
}

/* 当有背景图片时，降低光球的不透明度，避免干扰背景图片 */
.background[style*="background-image"] ~ .orb {
    opacity: 0.15;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--emerald);
    top: 10%;
    left: 10%;
}

.orb-2 {
    width: 350px;
    height: 350px;
    background: var(--gold);
    top: 60%;
    right: 10%;
    animation-delay: -5s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: var(--coral);
    bottom: 10%;
    left: 30%;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(20px, 10px) scale(1.02); }
}

/* ============================================
   LAYOUT STRUCTURE
============================================ */
.dashboard {
    display: flex;
    min-height: 100vh;
}

/* ============================================
   SIDEBAR
============================================ */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-right: 1px solid var(--glass-border);
    padding: 20px;
    z-index: 100;
    transition: all var(--transition-normal);
    overflow-y: auto;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 3px;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 24px;
}

.logo {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--emerald), var(--gold));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    box-shadow: 0 8px 32px rgba(5, 150, 105, 0.3);
}

.logo-text {
    font-size: 20px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--emerald-light), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-header-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.sidebar-header-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary) !important;
}
.sidebar-header-btn:active {
    transform: scale(0.9);
    background: rgba(255, 255, 255, 0.15);
}
.sidebar-header-btn:active svg {
    animation: spin 0.6s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

.nav-section {
    margin-bottom: 20px;
}

.nav-section-top {
    display: flex;
    align-items: center;
    gap: 4px;
}
.nav-section-top .nav-item:first-child {
    flex: 1;
}
.nav-section-top .nav-item-refresh {
    flex: none;
}
.nav-section-top .nav-item-refresh .nav-link {
    color: var(--text-muted);
    padding: 8px 10px;
    font-size: 12px;
    gap: 4px;
}
.nav-section-top .nav-item-refresh .nav-link .nav-icon {
    width: 16px;
    height: 16px;
}
.nav-section-top .nav-item-refresh .nav-link:hover {
    color: var(--text-primary);
}
.nav-section-top .nav-item-refresh .nav-link:active .nav-icon {
    animation: spin 0.6s linear infinite;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 10px;
    padding-left: 14px;
}

.nav-item {
    margin-bottom: 4px;
    list-style: none;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: all var(--transition-fast);
    position: relative;
    font-size: 14px;
}

.nav-link:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

.nav-link.active {
    background: var(--glass-hover);
    color: var(--text-primary);
}

.nav-icon {
    width: 20px;
    height: 20px;
    opacity: 0.8;
    flex-shrink: 0;
}

.nav-link.active .nav-icon,
.nav-link:hover .nav-icon {
    opacity: 1;
}

.nav-badge {
    margin-left: auto;
    background: linear-gradient(135deg, var(--coral), var(--amber));
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: var(--border-radius);
    min-width: 18px;
    text-align: center;
}

.nav-link-danger {
    color: rgba(239, 68, 68, 0.7);
}
.nav-link-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Sidebar Footer */
.sidebar-footer {
    padding-top: 16px;
    border-top: 1px solid var(--glass-border);
    margin-top: auto;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.user-profile:hover {
    background: var(--glass-hover);
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: var(--border-radius);
    background: linear-gradient(135deg, var(--emerald), var(--gold));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-weight: 500;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 11px;
    color: var(--text-muted);
}

/* ============================================
   MAIN CONTENT - Naive Admin Style Independent Scroll
============================================ */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 24px;
    min-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
}

/* ============================================
   TOP NAVBAR
============================================ */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
}

.page-title {
    font-size: 24px;
    font-weight: 600;
}

.page-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-btn {
    width: 40px;
    height: 40px;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all var(--transition-fast);
}

.nav-btn:hover {
    background: var(--glass-hover);
    border-color: var(--emerald-light);
}

.nav-btn svg {
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
}

/* ============================================
   GLASS CARD
============================================ */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: var(--card-padding);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

.glass-card {
    /* 基础玻璃卡片样式 */
}

.glass-card:hover {
    background: var(--glass-hover);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 25px 50px -12px var(--glass-shadow),
        0 0 40px rgba(52, 211, 153, 0.1);
}

/* 3D倾斜效果 - 用于统计卡片和玻璃卡片 */
.stat-card,
.glass-card {
    transition: transform 0.1s ease-out, box-shadow 0.3s ease;
    transform-style: preserve-3d;
}

.stat-card:hover,
.glass-card:hover {
    box-shadow: 
        0 25px 50px -12px var(--glass-shadow),
        0 0 40px rgba(52, 211, 153, 0.15);
}

/* 3D倾斜效果 - 仅用于显示类卡片 */
.glass-card-tilt {
    transition: transform 0.1s ease-out;
    transform-style: preserve-3d;
}

.glass-card-tilt:hover {
    /* transform由JavaScript动态控制 */
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
}

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

/* ============================================
   NAIVE ADMIN STYLE - MODERN STATS CARDS
============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Modern Stat Card - Naive Admin Style */
.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--emerald), var(--gold));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 20px 40px -12px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

.stat-card:hover::before {
    opacity: 1;
}

/* Gradient Background Variants */
.stat-card.gradient-blue {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(37, 99, 235, 0.05) 100%);
    border-color: rgba(59, 130, 246, 0.3);
}

.stat-card.gradient-blue::before {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.stat-card.gradient-green {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(22, 163, 74, 0.05) 100%);
    border-color: rgba(34, 197, 94, 0.3);
}

.stat-card.gradient-green::before {
    background: linear-gradient(90deg, #22c55e, #4ade80);
}

.stat-card.gradient-orange {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.15) 0%, rgba(234, 88, 12, 0.05) 100%);
    border-color: rgba(249, 115, 22, 0.3);
}

.stat-card.gradient-orange::before {
    background: linear-gradient(90deg, #f97316, #fb923c);
}

.stat-card.gradient-purple {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15) 0%, rgba(147, 51, 234, 0.05) 100%);
    border-color: rgba(168, 85, 247, 0.3);
}

.stat-card.gradient-purple::before {
    background: linear-gradient(90deg, #a855f7, #c084fc);
}

.stat-card.gradient-cyan {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.15) 0%, rgba(8, 145, 178, 0.05) 100%);
    border-color: rgba(6, 182, 212, 0.3);
}

.stat-card.gradient-cyan::before {
    background: linear-gradient(90deg, #06b6d4, #22d3ee);
}

.stat-card.gradient-pink {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.15) 0%, rgba(219, 39, 119, 0.05) 100%);
    border-color: rgba(236, 72, 153, 0.3);
}

.stat-card.gradient-pink::before {
    background: linear-gradient(90deg, #ec4899, #f472b6);
}

.stat-card.gradient-red {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.15) 0%, rgba(185, 28, 28, 0.05) 100%);
    border-color: rgba(220, 38, 38, 0.3);
}

.stat-card.gradient-red::before {
    background: linear-gradient(90deg, #dc2626, #f87171);
}



/* Modern Stat Card Inner - Naive Admin Style */
.stat-card-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

.stat-info h3 {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.stat-value {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.stat-change {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.stat-change.positive {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.15);
    border: 1px solid rgba(74, 222, 128, 0.2);
}

.stat-change.negative {
    color: #f87171;
    background: rgba(248, 113, 113, 0.15);
    border: 1px solid rgba(248, 113, 113, 0.2);
}

.stat-change.warning {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.2);
}

/* Modern Stat Icons - Naive Admin Style */
.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.stat-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
    transition: opacity 0.3s ease;
}

.stat-card:hover .stat-icon::before {
    opacity: 0.2;
}

.stat-icon svg {
    width: 28px;
    height: 28px;
    position: relative;
    z-index: 1;
}

/* Icon Color Variants */
.stat-icon.blue {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25) 0%, rgba(37, 99, 235, 0.1) 100%);
    color: #60a5fa;
}

.stat-icon.blue::before {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
}

.stat-icon.green {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.25) 0%, rgba(22, 163, 74, 0.1) 100%);
    color: #4ade80;
}

.stat-icon.green::before {
    background: linear-gradient(135deg, #22c55e, #4ade80);
}

.stat-icon.orange {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.25) 0%, rgba(234, 88, 12, 0.1) 100%);
    color: #fb923c;
}

.stat-icon.orange::before {
    background: linear-gradient(135deg, #f97316, #fb923c);
}

.stat-icon.purple {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.25) 0%, rgba(147, 51, 234, 0.1) 100%);
    color: #c084fc;
}

.stat-icon.purple::before {
    background: linear-gradient(135deg, #a855f7, #c084fc);
}

.stat-icon.cyan {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.25) 0%, rgba(8, 145, 178, 0.1) 100%);
    color: #22d3ee;
}

.stat-icon.cyan::before {
    background: linear-gradient(135deg, #06b6d4, #22d3ee);
}

.stat-icon.pink {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.25) 0%, rgba(219, 39, 119, 0.1) 100%);
    color: #f472b6;
}

.stat-icon.pink::before {
    background: linear-gradient(135deg, #ec4899, #f472b6);
}

.stat-icon.red {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.25) 0%, rgba(185, 28, 28, 0.1) 100%);
    color: #f87171;
}

.stat-icon.red::before {
    background: linear-gradient(135deg, #dc2626, #f87171);
}

/* Legacy icon styles for backward compatibility */
.stat-icon.gold {
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.25) 0%, rgba(212, 165, 116, 0.05) 100%);
    color: #e8c9a0;
}

.stat-icon.coral {
    background: linear-gradient(135deg, rgba(224, 122, 95, 0.25) 0%, rgba(224, 122, 95, 0.05) 100%);
    color: #e07a5f;
}

.stat-icon.success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.25) 0%, rgba(34, 197, 94, 0.05) 100%);
    color: #22c55e;
}

/* ============================================
   MODAL
============================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: linear-gradient(135deg, rgba(30,40,35,0.95), rgba(20,30,25,0.98));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    animation: modalSlideUp 0.3s ease-out;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 20px 24px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: 60vh;
}

.modal-footer {
    padding: 16px 24px;
    background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.03) 100%);
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ============================================
   FORMS
============================================ */
.form-group {
    margin-bottom: 20px;
}

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

.form-label.required::after {
    content: '*';
    color: var(--coral);
    margin-left: 4px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    transition: all var(--transition-fast);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control:focus {
    outline: none;
    border-color: var(--emerald-light);
    box-shadow: 0 0 20px rgba(52, 211, 153, 0.15);
}

.form-control:read-only {
    background: rgba(255, 255, 255, 0.02);
    cursor: not-allowed;
}

select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #111a15;
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    padding: 12px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-normal);
    background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 44px;
}

select.form-control:hover {
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.1);
    background-color: #162a1e;
}

select.form-control:focus {
    outline: none;
    border-color: var(--emerald-light);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
    background-color: #162a1e;
}

select.form-control option {
    background-color: #111a15;
    color: var(--text-primary);
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

select.form-control option:hover {
    background-color: #1a3d28;
    color: var(--text-primary);
}

select.form-control option:checked {
    background-color: #1a3d28;
    color: var(--emerald-light);
    font-weight: 500;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

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

/* ============================================
   BUTTONS
============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-primary {
    background: linear-gradient(135deg, var(--emerald), var(--emerald-light));
    color: white;
    box-shadow: 0 4px 16px rgba(5, 150, 105, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(5, 150, 105, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #4ade80);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning), #fbbf24);
    color: #1a1a1a;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #f87171);
    color: white;
}

.btn-secondary {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
}

.btn-secondary:hover {
    background: var(--glass-hover);
    border-color: var(--emerald-light);
}

.btn-lg {
    padding: 14px 32px;
    font-size: 15px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn i {
    font-size: 14px;
}

/* 按键徽章样式 */
.btn-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: linear-gradient(135deg, var(--coral), var(--amber));
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: var(--border-radius);
    min-width: 18px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(224, 122, 95, 0.4);
}

/* 确保按键有相对定位 */
.btn {
    position: relative;
}

/* ============================================
   CARD VARIANTS
============================================ */
/* 包含表格的卡片 - 移除内边距让表格撑满 */
.card-body.table-card {
    padding: 0;
}

/* 账单详情卡片 */
.bill-detail-card {
    margin: 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.bill-detail-header {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bill-detail-content {
    padding: 16px;
    display: none;
}

.bill-detail-row {
    padding: 0;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ============================================
   DATA TABLE
============================================ */
.table-wrapper {
    overflow-x: auto;
    margin: 0 -8px;
    padding: 0 8px;
}

.table-wrapper::-webkit-scrollbar {
    height: 6px;
}

.table-wrapper::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.table-wrapper::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, var(--emerald), var(--gold));
    border-radius: 3px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 14px 12px;
    text-align: left;
}

.data-table th {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--glass-border);
    white-space: nowrap;
}

.data-table tr {
    transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
    background: var(--glass-hover);
}

.data-table td {
    font-size: 13px;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

/* ============================================
   CHARTS & DATA VISUALIZATION - Naive Admin Style
============================================ */
.chart-container {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.chart-container:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.3);
}

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.chart-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.chart-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.chart-wrapper {
    position: relative;
    height: 300px;
    width: 100%;
}

.chart-wrapper.small {
    height: 200px;
}

.chart-wrapper.large {
    height: 400px;
}

/* Chart Grid Layout */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.charts-grid .chart-container.full-width {
    grid-column: 1 / -1;
}

@media (max-width: 1200px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

/* Dashboard Grid Layout - Naive Admin Style */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.dashboard-grid .grid-col-3 {
    grid-column: span 3;
}

.dashboard-grid .grid-col-4 {
    grid-column: span 4;
}

.dashboard-grid .grid-col-6 {
    grid-column: span 6;
}

.dashboard-grid .grid-col-8 {
    grid-column: span 8;
}

.dashboard-grid .grid-col-12 {
    grid-column: span 12;
}

@media (max-width: 1200px) {
    .dashboard-grid .grid-col-3,
    .dashboard-grid .grid-col-4 {
        grid-column: span 6;
    }
}

@media (max-width: 768px) {
    .dashboard-grid .grid-col-3,
    .dashboard-grid .grid-col-4,
    .dashboard-grid .grid-col-6,
    .dashboard-grid .grid-col-8 {
        grid-column: span 12;
    }
}

/* Chart Legend Custom Styles */
.chart-legend {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--glass-border);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

/* Chart Tooltip Custom Styles */
.custom-tooltip {
    background: rgba(17, 24, 39, 0.95) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    padding: 12px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
}

.custom-tooltip .tooltip-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.custom-tooltip .tooltip-value {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ============================================
   STATUS BADGES
============================================ */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: var(--border-radius);
    font-size: 12px;
    font-weight: 500;
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-badge.success,
.status-badge.completed {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.status-badge.success::before,
.status-badge.completed::before {
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
}

.status-badge.warning,
.status-badge.pending {
    background: rgba(234, 179, 8, 0.15);
    color: var(--warning);
}

.status-badge.warning::before,
.status-badge.pending::before {
    background: var(--warning);
    box-shadow: 0 0 8px var(--warning);
}

.status-badge.danger {
    background: rgba(220, 38, 38, 0.15);
    color: var(--danger);
}

.status-badge.danger::before {
    background: var(--danger);
    box-shadow: 0 0 8px var(--danger);
}

.status-badge.info,
.status-badge.processing {
    background: rgba(14, 165, 233, 0.15);
    color: var(--info);
}

.status-badge.info::before,
.status-badge.processing::before {
    background: var(--info);
    box-shadow: 0 0 8px var(--info);
}

.status-badge.secondary {
    background: rgba(148, 163, 184, 0.15);
    color: var(--text-secondary);
}

.status-badge.secondary::before {
    background: var(--text-muted);
}

/* ============================================
   BILL NO LINK
============================================ */
.bill-no-link {
    color: var(--emerald-light);
    font-family: 'SF Mono', 'Cascadia Code', monospace;
    font-weight: 500;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.bill-no-link:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

/* ============================================
   MONEY AMOUNT
============================================ */
.money-amount {
    font-weight: 600;
    font-family: 'SF Mono', 'Cascadia Code', monospace;
}

.money-amount.income,
.money-amount.positive {
    color: var(--success);
}

.money-amount.expense,
.money-amount.negative {
    color: var(--danger);
}

.money-amount.gold {
    color: var(--gold-light);
}

/* ============================================
   PAY TYPE TAG
============================================ */
.pay-type-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
}

.pay-type-tag.bill {
    background: rgba(99, 102, 241, 0.15);
    color: var(--indigo-light);
}

.pay-type-tag.supplier {
    background: rgba(14, 165, 233, 0.15);
    color: var(--info);
}

/* ============================================
   MONO TEXT
============================================ */
.mono-text {
    font-family: 'SF Mono', 'Cascadia Code', monospace;
    font-size: 13px;
    color: var(--emerald-light);
    font-weight: 600;
}

/* ============================================
   PAGINATION WRAPPER
============================================ */
.pagination-wrapper {
    padding: 16px;
    display: flex;
    justify-content: center;
}

/* ============================================
   ALERTS
============================================ */
.alert {
    padding: 14px 18px;
    border-radius: var(--border-radius);
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: var(--success);
}

.alert-warning {
    background: rgba(234, 179, 8, 0.15);
    border: 1px solid rgba(234, 179, 8, 0.3);
    color: var(--warning);
}

.alert-danger {
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: var(--danger);
}

.alert-info {
    background: rgba(14, 165, 233, 0.15);
    border: 1px solid rgba(14, 165, 233, 0.3);
    color: var(--info);
}

/* ============================================
   ENTRY CARDS (入库/出库选择)
============================================ */
.entry-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.entry-card {
    flex: 0 1 340px;
    padding: 48px 36px;
    border-radius: var(--border-radius);
    border: 1px solid var(--glass-border);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    text-align: center;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.entry-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--emerald), var(--emerald-light));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.entry-card:hover {
    transform: translateY(-6px);
    border-color: rgba(52, 211, 153, 0.4);
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.08), rgba(52, 211, 153, 0.03));
    box-shadow: 0 20px 40px -12px rgba(5, 150, 105, 0.25),
                0 0 60px rgba(52, 211, 153, 0.08);
}

.entry-card:hover::before {
    opacity: 1;
}

.entry-card-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.entry-card:hover .entry-card-icon {
    transform: scale(1.08);
}

.entry-card-icon.scan {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.25), rgba(52, 211, 153, 0.08));
}

.entry-card-icon.manual {
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.2), rgba(212, 165, 116, 0.05));
}

.entry-card-icon svg {
    width: 40px;
    height: 40px;
    color: var(--emerald-light);
}

.entry-card-icon.manual svg {
    color: var(--gold);
}

.entry-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.entry-card p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 4px;
    line-height: 1.5;
}

/* ============================================
   IMAGE UPLOAD
============================================ */
.image-upload {
    border: 2px dashed var(--glass-border);
    border-radius: var(--border-radius);
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.image-upload:hover {
    border-color: var(--emerald-light);
    background: var(--glass-hover);
}

.image-upload svg {
    width: 64px;
    height: 64px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.image-upload h5 {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.image-upload p {
    font-size: 13px;
    color: var(--text-muted);
}

/* ============================================
   BUSINESS TYPE SELECTOR
============================================ */
.business-type-selector {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.business-type-option {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    border-radius: var(--border-radius);
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    cursor: pointer;
    transition: all var(--transition-fast);
}

.business-type-option:hover {
    border-color: var(--emerald-light);
}

.business-type-option.active {
    border-color: var(--emerald-light);
    background: rgba(16, 185, 129, 0.1);
}

.business-type-option input {
    width: 18px;
    height: 18px;
    accent-color: var(--emerald-light);
}

.business-type-option .title {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
    white-space: nowrap;
}

.business-type-option .desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
    white-space: nowrap;
}

/* ============================================
   LOGIN PAGE
============================================ */
.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 40px 32px;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--emerald), var(--gold));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 24px;
    margin: 0 auto 16px;
    box-shadow: 0 8px 32px rgba(5, 150, 105, 0.3);
}

.login-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 6px;
}

.login-subtitle {
    font-size: 13px;
    color: var(--text-muted);
}

/* ============================================
   FOOTER
============================================ */
.site-footer {
    text-align: center;
    padding: 20px;
    margin-left: var(--sidebar-width);
    color: var(--text-muted);
    font-size: 13px;
    border-top: 1px solid var(--glass-border);
    position: relative;
    width: calc(100% - var(--sidebar-width));
}

.dashboard {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.footer-content {
    max-width: 100%;
    margin: 0 auto;
}

.footer-content p {
    margin: 5px 0;
}

.site-footer a {
    color: var(--emerald-light);
    transition: color var(--transition-fast);
}

.site-footer a:hover {
    color: var(--gold);
}

/* ============================================
   MOBILE MENU TOGGLE
============================================ */
.mobile-menu-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--emerald), var(--gold));
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    z-index: 200;
    box-shadow: 0 8px 32px rgba(5, 150, 105, 0.3);
    display: none; /* 默认隐藏，仅在小屏幕显示 */
    touch-action: none;  /* 防止拖动时页面滚动 */
    user-select: none;
    -webkit-user-select: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.mobile-menu-toggle:active,
.mobile-menu-toggle.dragging {
    transform: scale(1.12);
    box-shadow: 0 12px 40px rgba(5, 150, 105, 0.5);
    cursor: grabbing;
}

.mobile-menu-toggle svg {
    width: 22px;
    height: 22px;
    color: white;
}

/* ============================================
   RESPONSIVE DESIGN
============================================ */
@media (max-width: 1400px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 平板电脑布局 (768px - 992px) - 隐藏侧边栏，仅显示右下角菜单按钮 */
@media (max-width: 992px) and (min-width: 768px) {
    :root {
        --sidebar-width: 0px;
    }
    
    .sidebar {
        transform: translateX(-100%);
        width: 260px;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        height: auto;
        min-height: 100vh;
        overflow-y: visible;
    }
    
    .site-footer {
        margin-left: 0;
    }
    
    /* 显示右下角导航按钮 */
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .entry-card {
        flex: 0 1 280px;
        padding: 36px 24px;
    }
    
    .business-type-selector {
        flex-direction: row;
        gap: 12px;
    }
    
    .business-type-option {
        padding: 16px 20px;
    }
    
    .business-type-option .title {
        font-size: 13px;
    }
    
    .business-type-option .desc {
        font-size: 11px;
    }
}

/* 手机布局 (< 768px) - 隐藏侧边栏，仅显示右下角菜单按钮 */
@media (max-width: 767px) {
    :root {
        --sidebar-width: 0px;
    }
    
    .sidebar {
        transform: translateX(-100%);
        width: 260px;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        height: auto;
        min-height: 100vh;
        overflow-y: visible;
    }
    
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .site-footer {
        margin-left: 0;
    }
    
    .entry-card {
        flex: 0 1 280px;
        padding: 36px 24px;
    }
    
    .business-type-selector {
        flex-direction: row;
        gap: 12px;
    }
    
    .business-type-option {
        padding: 16px 20px;
    }
    
    .business-type-option .title {
        font-size: 13px;
    }
    
    .business-type-option .desc {
        font-size: 11px;
    }
}

@media (max-width: 767px) {
    body {
        overflow-x: hidden;
        overflow-y: auto;
    }
    
    .main-content {
        max-width: 100vw;
        overflow-x: hidden;
        height: auto;
        min-height: 100vh;
        overflow-y: visible;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .page-title {
        font-size: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .login-card {
        padding: 32px 24px;
    }
    
    .entry-card {
        padding: 30px 20px;
    }
    
    .entry-card-icon {
        width: 60px;
        height: 60px;
    }
    
    .entry-card-icon svg {
        width: 30px;
        height: 30px;
    }
    
    .entry-card h3 {
        font-size: 16px;
    }
    
    .entry-card p {
        font-size: 12px;
    }
    
    .glass-card {
        max-width: 100%;
    }
    
    /* 首页表格区域 */
    [style*="grid-template-columns: repeat(auto-fit, minmax(500px, 1fr))"] {
        grid-template-columns: 1fr;
    }
    
    /* 扫描录入页面 */
    [style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr;
    }
    
    /* 业务类型选择器 */
    .business-type-selector {
        flex-direction: row;
        gap: 12px;
    }
    
    .business-type-option {
        padding: 16px 20px;
    }
    
    .business-type-option .title {
        font-size: 13px;
    }
    
    .business-type-option .desc {
        font-size: 11px;
    }
    
    /* 表单网格 */
    .form-grid {
        flex-direction: column;
    }
    
    .form-main,
    .form-sidebar {
        width: 100%;
    }
    
    /* 表格容器 */
    .table-container,
    .table-wrapper {
        overflow-x: auto;
        max-width: 100%;
    }
    
    /* 数据表格 */
    .data-table {
        font-size: 12px;
        min-width: 600px;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px 10px;
        white-space: nowrap;
    }
    
    /* 页面头部 */
    .page-header {
        margin-bottom: 16px;
    }
    
    .page-header .page-title {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 16px;
        max-width: 100vw;
        overflow-x: hidden;
        height: auto;
        min-height: 100vh;
        overflow-y: visible;
    }
    
    .glass-card {
        padding: 16px;
        max-width: 100%;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .entry-card {
        padding: 20px 12px;
    }
    
    .entry-card-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 8px;
    }
    
    .entry-card-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .entry-card h3 {
        font-size: 12px;
        margin-bottom: 4px;
    }
    
    .entry-card p {
        font-size: 10px;
    }
    
    /* 业务类型选择器 */
    .business-type-selector {
        gap: 8px;
    }
    
    .business-type-option {
        padding: 12px 16px;
    }
    
    .business-type-option .title {
        font-size: 12px;
    }
    
    .business-type-option .desc {
        font-size: 10px;
    }
    
    .table-wrapper {
        overflow-x: auto;
        max-width: 100%;
    }
    
    .data-table {
        font-size: 11px;
        min-width: 600px;
    }
    
    .data-table th,
    .data-table td {
        padding: 6px 8px;
        white-space: nowrap;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .btn-sm {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    .form-control {
        font-size: 16px;
        padding: 10px 12px;
    }
    
    .form-label {
        font-size: 13px;
        margin-bottom: 4px;
    }
    
    .form-row {
        gap: 12px;
    }
    
    .filter-row {
        gap: 12px;
    }
    
    .filter-item {
        min-width: 100%;
    }
    
    .filter-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .filter-actions .btn {
        width: 100%;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .page-header .btn {
        width: 100%;
    }
    
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .pagination .page-item {
        margin: 2px;
    }
    
    .modal-content {
        width: 95%;
        max-width: none;
        padding: 16px;
        margin: 10px auto;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .modal-header {
        padding-bottom: 8px;
    }
    
    .modal-title {
        font-size: 16px;
    }
    
    .modal-body {
        padding: 8px 0;
        max-height: 60vh;
        overflow-y: auto;
    }
    
    .modal-footer {
        flex-direction: column;
        gap: 8px;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
    
    .empty-state {
        padding: 30px 16px;
    }
    
    .empty-state-icon {
        font-size: 36px;
    }
    
    .alert {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .badge {
        font-size: 11px;
        padding: 2px 6px;
    }
    
    .status-badge {
        font-size: 11px;
        padding: 2px 8px;
    }
    
    .table-container {
        margin: 0 -16px;
        padding: 0 16px;
    }
    
    .actions {
        flex-direction: column;
        gap: 6px;
    }
    
    .actions .btn {
        width: 100%;
    }
}

/* ============================================
   ANIMATIONS
============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.glass-card {
    animation: fadeInUp 0.5s ease-out backwards;
}

.stats-grid .glass-card:nth-child(1) { animation-delay: 0.1s; }
.stats-grid .glass-card:nth-child(2) { animation-delay: 0.15s; }
.stats-grid .glass-card:nth-child(3) { animation-delay: 0.2s; }
.stats-grid .glass-card:nth-child(4) { animation-delay: 0.25s; }

/* ============================================
   EMPTY STATE
============================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
}

.empty-state-icon svg {
    width: 40px;
    height: 40px;
    color: var(--text-muted);
}

.empty-state-text {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.empty-state-desc {
    font-size: 13px;
    color: var(--text-muted);
}

/* 加载中状态 */
.loading-state {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
}

/* ============================================
   PAGINATION
============================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
}

.pagination .page-item {
    list-style: none;
}

.pagination .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: all var(--transition-fast);
}

.pagination .page-link:hover {
    background: var(--glass-hover);
    border-color: var(--emerald-light);
    color: var(--text-primary);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--emerald), var(--emerald-light));
    border-color: transparent;
    color: white;
    font-weight: 600;
}

.pagination .page-item.disabled .page-link {
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.5;
}

.pagination .page-link svg {
    width: 16px;
    height: 16px;
}

/* ============================================
   FILTER BAR
============================================ */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    align-items: flex-end;
}

.filter-bar .form-group {
    margin-bottom: 0;
    min-width: 150px;
    flex: 1;
}

.filter-actions {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

/* ============================================
   UTILITY CLASSES
============================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.badge-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.voucher-row { padding: 8px 16px; background: rgba(255, 255, 255, 0.02); border-top: 1px solid rgba(255, 255, 255, 0.05); }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

.w-100 { width: 100%; }
.hidden { display: none; }

/* ========== 上传缩略图 & 删除按钮 ========== */
.upload-thumb-sm {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
}
.upload-thumb {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
}
.upload-thumb-pdf {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
}
.thumb-delete-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* ============================================
   DETAIL / PRICE LAYOUT (shared by bills & sales)
============================================ */

/* 详情页双栏布局 */
.detail-container {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
}

.detail-main {
    min-width: 0;
}

.detail-sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.detail-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: hidden;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.2);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.detail-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.detail-body {
    padding: 24px;
}

.section {
    margin-bottom: 24px;
}

.section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--glass-border);
}

/* ======= 定价页双栏布局 ======= */
.price-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
    align-items: start;
}

.price-main {
    min-width: 0;
}

.price-sidebar {
    position: sticky;
    top: 20px;
}

/* ======= 详情信息（两列字段布局） ======= */
.detail-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: border-color 0.2s;
}

.info-item:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

/* 高亮关键信息 — 供应商、金额 */
.info-item.key-field {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.2);
    grid-column: span 2;
}

.info-item.key-field .info-value {
    font-size: 18px;
    font-weight: 700;
}

/* 金额高亮 */
.info-item.amount-field {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.2);
}

.info-item.amount-field .info-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--gold-light, #fbbf24);
}

.info-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.info-value {
    font-size: 15px;
    color: var(--text-primary);
    font-weight: 500;
}

.info-value.highlight {
    color: var(--emerald-light);
}

.info-value.gold {
    color: var(--gold-light, #fbbf24);
    font-weight: 700;
}

/* ======= 重量信息区 ======= */
.weight-info {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 16px;
}

.weight-item {
    text-align: center;
    padding: 16px 8px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.weight-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.weight-value {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', 'Cascadia Code', monospace;
}

.weight-value.net {
    color: var(--emerald-light);
    font-size: 26px;
}

/* 结算重量（金色，独立一行） */
.settlement-weight {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    margin-top: 4px;
    background: rgba(245, 158, 11, 0.08);
    border-radius: 10px;
    border: 1px solid rgba(245, 158, 11, 0.15);
}

.settlement-weight .settlement-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.settlement-weight .settlement-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--gold-light, #fbbf24);
    font-family: 'JetBrains Mono', 'Cascadia Code', monospace;
}

.settlement-weight .settlement-unit {
    font-size: 14px;
    color: var(--text-muted);
    margin-left: 4px;
}

/* ======= 定价表格增强 ======= */
.price-table tbody tr {
    transition: background 0.2s;
}

.price-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

.price-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.08);
}

/* 金额/数字列右对齐 */
.price-table td:nth-child(2),
.price-table td:nth-child(3),
.price-table td:nth-child(4),
.row-amount {
    text-align: right;
    font-family: 'JetBrains Mono', 'Cascadia Code', monospace;
    font-weight: 500;
}

/* 料型下拉宽度 */
.price-table select.form-control {
    min-width: 100px;
}

/* 金额汇总区 */
.price-summary {
    padding: 16px 20px;
    margin-top: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.summary-row {
    display: flex;
    align-items: center;
    gap: 24px;
}

.summary-item {
    flex: 1;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.summary-label {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.summary-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', 'Cascadia Code', monospace;
}

.summary-item.main .summary-value {
    font-size: 32px;
    color: var(--gold-light, #fbbf24);
}

.summary-unit {
    font-size: 14px;
    color: var(--text-muted);
}

.summary-divider {
    width: 1px;
    height: 40px;
    background: var(--glass-border);
}

/* 重量分配进度条（定价页顶部） */
.weight-progress {
    margin-bottom: 16px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
}

.weight-progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 8px;
}

.weight-progress-header .progress-label {
    color: var(--text-muted);
}

.weight-progress-header .progress-value {
    color: var(--text-primary);
    font-weight: 600;
}

.weight-progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
}

.weight-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--emerald, #059669), var(--emerald-light, #34d399));
    border-radius: 3px;
    transition: width 0.4s ease;
}

.weight-progress-fill.warning {
    background: linear-gradient(90deg, var(--warning, #eab308), #fbbf24);
}

.weight-progress-fill.over {
    background: linear-gradient(90deg, var(--danger, #ef4444), #f87171);
}

/* ======= 照片画廊改进 ======= */
.photo-card {
    padding: 16px;
}

.photo-main {
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    margin-bottom: 16px;
    aspect-ratio: 4 / 3;
}

.photo-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: pointer;
}

.photo-thumbnails {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.thumbnail-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    flex-shrink: 0;
    transition: border-color 0.2s, transform 0.2s;
}

.thumbnail-item:hover {
    border-color: var(--emerald-light);
    transform: translateY(-2px);
}

.thumbnail-item.active {
    border-color: var(--emerald-light);
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-photos {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 40px;
    color: var(--text-muted);
}

/* ======= 响应式列隐藏（列表表格） ======= */
@media (max-width: 1200px) {
    .col-lg-hide { display: none; }
}

@media (max-width: 992px) {
    .col-md-hide { display: none; }
}

@media (max-width: 768px) {
    .col-sm-hide { display: none; }
}

@media (max-width: 576px) {
    .col-xs-hide { display: none; }
}

/* 表格操作列图标模式（小屏用） */
.btn-icon-only .btn-text { display: inline; }
@media (max-width: 768px) {
    .btn-icon-only .btn-text { display: none; }
    .btn-icon-only svg { margin-right: 0; }
}

/* ======= 数字对齐辅助类 ======= */
.amount-cell {
    text-align: right;
    font-family: 'JetBrains Mono', 'Cascadia Code', monospace;
    font-weight: 600;
    white-space: nowrap;
}

.amount-cell.gold {
    color: var(--gold-light, #fbbf24);
}

.amount-cell.green {
    color: var(--emerald-light, #34d399);
}

/* ======= Flash/Toast 消息增强 ======= */
.flash-messages {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 400px;
}

.alert {
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideInRight 0.3s ease-out;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.alert-success {
    background: rgba(5, 150, 105, 0.9);
    color: #fff;
}

.alert-warning {
    background: rgba(234, 179, 8, 0.9);
    color: #fff;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.9);
    color: #fff;
}

.alert-info {
    background: rgba(59, 130, 246, 0.9);
    color: #fff;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ======= 空状态改进 ======= */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    animation: fadeInUp 0.4s ease-out;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
}

.empty-state-icon svg {
    width: 40px;
    height: 40px;
    color: var(--text-muted);
}

.empty-state-text {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.empty-state-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* ======= 定价操作按钮区 ======= */
.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--glass-border);
}

.form-actions .btn {
    min-width: 140px;
}

/* ======= 右侧栏操作按钮 ======= */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
}

.action-buttons .btn {
    justify-content: center;
}

.btn-block {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 单号链接样式 */
.bill-no {
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 13px;
    color: var(--emerald-light);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}
.bill-no:hover {
    color: var(--emerald);
    text-decoration: underline;
}

/* ======= 流程步骤条 ======= */
.progress-stepper {
    position: relative;
    padding: 8px 0 4px;
}

.stepper-track {
    position: absolute;
    top: 22px;
    left: 20px;
    right: 20px;
    height: 3px;
    background: var(--glass-border);
    border-radius: 2px;
}

.stepper-fill {
    height: 100%;
    background: var(--emerald-light, #34d399);
    border-radius: 2px;
    transition: width 0.5s ease;
}

.stepper-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

.stepper-step {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stepper-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-dark, #0a0f0d);
    border: 2px solid var(--glass-border);
    transition: all 0.3s ease;
}

.stepper-step.completed .stepper-dot {
    background: var(--emerald-light, #34d399);
    border-color: var(--emerald-light, #34d399);
    color: #fff;
}

.stepper-step.active .stepper-dot {
    background: var(--primary, #6366f1);
    border-color: var(--primary, #6366f1);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.25);
}

.stepper-label {
    margin-top: 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
}

.stepper-step.completed .stepper-label {
    color: var(--emerald-light, #34d399);
}

.stepper-step.active .stepper-label {
    color: var(--primary, #6366f1);
    font-weight: 600;
}

/* ======= 响应式断点 ======= */
@media (max-width: 1100px) {
    .detail-container,
    .price-grid {
        grid-template-columns: 1fr;
    }

    .detail-sidebar,
    .price-sidebar {
        position: static;
    }

    .weight-info {
        gap: 8px;
    }

    .weight-value {
        font-size: 20px;
    }

    .weight-value.net {
        font-size: 22px;
    }
}

@media (max-width: 576px) {
    .detail-info {
        grid-template-columns: 1fr;
    }

    .info-item.key-field {
        grid-column: span 1;
    }

    .weight-info {
        grid-template-columns: repeat(2, 1fr);
    }

    .settlement-weight {
        grid-column: 1 / -1;
    }

    .detail-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .price-summary .summary-value {
        font-size: 18px;
    }

    .summary-item.main .summary-value {
        font-size: 24px;
    }

    .summary-divider {
        display: none;
    }

    .summary-row {
        flex-direction: column;
        gap: 12px;
    }

    .photo-main {
        aspect-ratio: 3 / 2;
    }

    .thumbnail-item {
        width: 72px;
        height: 72px;
    }

    .detail-title {
        font-size: 17px;
    }
}
