/* ==========================================
   AutoShop - 暗色主题样式
   风格：现代简约暗色 + 毛玻璃效果
   配色：背景 #0f0f1a, 卡片 #1a1a2e, 强调色 #6c5ce7
   ========================================== */

/* CSS变量 */
:root {
    --bg-primary: #0f0f1a;
    --bg-secondary: #16162a;
    --bg-card: #1a1a2e;
    --bg-card-hover: #1f1f36;
    --bg-input: rgba(255, 255, 255, 0.05);
    --bg-overlay: rgba(0, 0, 0, 0.6);
    
    --text-primary: #e8e8f0;
    --text-secondary: #a0a0b8;
    --text-muted: #6b6b80;
    
    --accent: #6c5ce7;
    --accent-light: #a29bfe;
    --accent-gradient: linear-gradient(135deg, #6c5ce7, #a29bfe);
    --accent-glow: 0 0 20px rgba(108, 92, 231, 0.3);
    
    --success: #00b894;
    --success-bg: rgba(0, 184, 148, 0.1);
    --warning: #fdcb6e;
    --warning-bg: rgba(253, 203, 110, 0.1);
    --error: #e17055;
    --error-bg: rgba(225, 112, 85, 0.1);
    --info: #74b9ff;
    --info-bg: rgba(116, 185, 255, 0.1);
    
    --border: #2d2d44;
    --border-light: rgba(255, 255, 255, 0.06);
    
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.5);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans TC', Roboto, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;
}

/* 重置样式 */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

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

::-webkit-scrollbar-thumb:hover {
    background: #3d3d54;
}

/* 链接 */
a {
    color: var(--accent-light);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent);
}

/* 标题 */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.3;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

/* ==========================================
   导航栏 - 毛玻璃效果
   ========================================== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(15, 15, 26, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-brand .logo-icon {
    width: 36px;
    height: 36px;
    background: var(--accent-gradient);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    -webkit-text-fill-color: white;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.navbar-nav a,
.navbar-nav button {
    padding: 8px 16px;
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

.navbar-nav a:hover,
.navbar-nav button:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.navbar-nav .btn-primary {
    background: var(--accent-gradient);
    color: white;
    font-weight: 600;
}

.navbar-nav .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--accent-glow);
}

.navbar-balance {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(108, 92, 231, 0.1);
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--accent-light);
}

.navbar-cart {
    position: relative;
}

.navbar-cart .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--error);
    color: white;
    font-size: 0.7rem;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.language-switch {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.language-switch:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* 用户下拉菜单 */
.user-menu {
    position: relative;
}

.user-menu-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
}

.user-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: white;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 8px;
    min-width: 180px;
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 100;
}

.user-menu.active .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.user-dropdown a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.user-dropdown .divider {
    height: 1px;
    background: var(--border);
    margin: 6px 0;
}

/* ==========================================
   布局容器
   ========================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

.page-header {
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 1.75rem;
    margin-bottom: 4px;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ==========================================
   搜索和筛选栏
   ========================================== */
.search-filter-bar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.search-box {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: var(--transition);
    font-family: inherit;
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}

.search-box .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
}

.filter-select {
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    min-width: 140px;
    font-family: inherit;
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent);
}

.price-range {
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-range input {
    width: 100px;
    padding: 10px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
}

.price-range input:focus {
    outline: none;
    border-color: var(--accent);
}

.price-range span {
    color: var(--text-muted);
}

/* ==========================================
   卡片样式
   ========================================== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition);
}

.card:hover {
    border-color: rgba(108, 92, 231, 0.3);
}

.card-hover-effect:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
}

/* ==========================================
   按钮样式
   ========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: inherit;
    white-space: nowrap;
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: var(--accent-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.12);
}

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

.btn-success:hover:not(:disabled) {
    background: #00d2a0;
    box-shadow: 0 0 20px rgba(0, 184, 148, 0.3);
}

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

.btn-danger:hover:not(:disabled) {
    background: #e8856e;
}

.btn-warning {
    background: var(--warning);
    color: #1a1a2e;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1.05rem;
    border-radius: var(--radius);
}

.btn-block {
    width: 100%;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--radius);
}

.btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ==========================================
   表格样式
   ========================================== */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-lg);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

thead th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 2px solid var(--border);
}

tbody td {
    padding: 14px 16px;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-light);
}

tbody tr {
    transition: var(--transition);
}

tbody tr:hover {
    background: rgba(108, 92, 231, 0.03);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* 表格复选框 */
.checkbox-cell {
    width: 40px;
    text-align: center;
}

.checkbox-cell input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--accent);
}

/* 价格列 */
.price-cell {
    font-weight: 600;
    color: var(--accent-light);
    font-family: var(--font-mono);
}

/* 状态标签 */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-unsold {
    background: var(--success-bg);
    color: var(--success);
}

.status-sold {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}

.status-pending {
    background: var(--warning-bg);
    color: var(--warning);
}

.status-completed {
    background: var(--success-bg);
    color: var(--success);
}

.status-cancelled {
    background: var(--error-bg);
    color: var(--error);
}

.status-refunded {
    background: var(--info-bg);
    color: var(--info);
}

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

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

.form-label .required {
    color: var(--error);
    margin-left: 2px;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}

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

.form-textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

.form-error {
    color: var(--error);
    font-size: 0.85rem;
    margin-top: 4px;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent);
}

/* 禁用状态 */
.form-input:disabled,
.form-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==========================================
   弹窗/模态框
   ========================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-overlay);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 32px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-lg {
    max-width: 700px;
}

.modal-sm {
    max-width: 400px;
}

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

.modal-header h3 {
    font-size: 1.25rem;
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    border: none;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

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

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* ==========================================
   商品详情展示卡片
   ========================================== */
.product-detail-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.product-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}

.product-detail-row:last-child {
    border-bottom: none;
}

.product-detail-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.product-detail-value {
    font-weight: 600;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.copy-btn {
    padding: 4px 8px;
    background: rgba(108, 92, 231, 0.1);
    border: 1px solid rgba(108, 92, 231, 0.3);
    border-radius: var(--radius-sm);
    color: var(--accent-light);
    cursor: pointer;
    font-size: 0.75rem;
    transition: var(--transition);
}

.copy-btn:hover {
    background: rgba(108, 92, 231, 0.2);
}

.copy-btn.copied {
    background: var(--success-bg);
    border-color: var(--success);
    color: var(--success);
}

/* ==========================================
   购物车侧边栏
   ========================================== */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    height: 100vh;
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    z-index: 2000;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
}

.cart-sidebar.open {
    right: 0;
}

.cart-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.cart-sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

.cart-sidebar-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 500;
    font-size: 0.9rem;
}

.cart-item-price {
    color: var(--accent-light);
    font-weight: 600;
    font-size: 0.85rem;
}

.cart-item-remove {
    padding: 4px 8px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}

.cart-item-remove:hover {
    color: var(--error);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 1.1rem;
}

.cart-total .amount {
    font-weight: 700;
    color: var(--accent-light);
    font-size: 1.3rem;
    font-family: var(--font-mono);
}

/* ==========================================
   图形验证码
   ========================================== */
.captcha-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.captcha-image {
    border-radius: var(--radius);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
    height: 70px;
}

.captcha-image:hover {
    border-color: var(--accent);
}

.captcha-refresh {
    font-size: 0.8rem;
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
}

.captcha-refresh:hover {
    color: var(--accent-light);
}

/* ==========================================
   充值金额选择器
   ========================================== */
.amount-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.amount-option {
    padding: 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-input);
}

.amount-option:hover {
    border-color: rgba(108, 92, 231, 0.5);
}

.amount-option.selected {
    border-color: var(--accent);
    background: rgba(108, 92, 231, 0.1);
}

.amount-option .amount-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.amount-option .bonus-info {
    font-size: 0.8rem;
    color: var(--success);
    margin-top: 4px;
}

/* ==========================================
   分页
   ========================================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 24px;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    transition: var(--transition);
    color: var(--text-secondary);
}

.pagination a {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
}

.pagination a:hover {
    background: rgba(108, 92, 231, 0.1);
    border-color: var(--accent);
    color: var(--accent-light);
}

.pagination .active {
    background: var(--accent-gradient);
    color: white;
    border: none;
    font-weight: 600;
}

.pagination .disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ==========================================
   提示消息
   ========================================== */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: var(--success-bg);
    border: 1px solid rgba(0, 184, 148, 0.3);
    color: var(--success);
}

.alert-error {
    background: var(--error-bg);
    border: 1px solid rgba(225, 112, 85, 0.3);
    color: var(--error);
}

.alert-warning {
    background: var(--warning-bg);
    border: 1px solid rgba(253, 203, 110, 0.3);
    color: var(--warning);
}

.alert-info {
    background: var(--info-bg);
    border: 1px solid rgba(116, 185, 255, 0.3);
    color: var(--info);
}

/* ==========================================
   空状态
   ========================================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.6;
}

.empty-state h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.empty-state p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ==========================================
   后台管理布局
   ========================================== */
.admin-layout {
    display: flex;
    min-height: calc(100vh - 64px);
}

.admin-sidebar {
    width: 240px;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    padding: 20px 0;
    position: sticky;
    top: 64px;
    height: calc(100vh - 64px);
    overflow-y: auto;
}

.admin-sidebar-nav {
    list-style: none;
}

.admin-sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.admin-sidebar-nav a:hover,
.admin-sidebar-nav a.active {
    color: var(--text-primary);
    background: rgba(108, 92, 231, 0.05);
    border-left-color: var(--accent);
}

.admin-sidebar-nav a.active {
    font-weight: 600;
}

.admin-sidebar-nav .icon {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.admin-content {
    flex: 1;
    padding: 24px 32px;
    overflow-y: auto;
}

/* 统计卡片网格 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: rgba(108, 92, 231, 0.3);
    transform: translateY(-1px);
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    font-family: var(--font-mono);
}

.stat-card .stat-change {
    font-size: 0.8rem;
    margin-top: 4px;
}

.stat-change.positive { color: var(--success); }
.stat-change.negative { color: var(--error); }

/* ==========================================
   响应式设计
   ========================================== */
@media (max-width: 768px) {
    .container {
        padding: 16px;
    }
    
    .navbar {
        padding: 0 16px;
    }
    
    .navbar-nav {
        gap: 4px;
    }
    
    .navbar-nav a,
    .navbar-nav button {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .navbar-balance {
        font-size: 0.8rem;
        padding: 4px 10px;
    }
    
    .search-filter-bar {
        flex-direction: column;
        padding: 16px;
    }
    
    .filter-select {
        width: 100%;
    }
    
    .price-range {
        width: 100%;
    }
    
    .price-range input {
        flex: 1;
    }
    
    .modal {
        margin: 16px;
        padding: 24px;
    }
    
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .admin-layout {
        flex-direction: column;
    }
    
    .admin-sidebar {
        width: 100%;
        height: auto;
        position: static;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 0;
    }
    
    .admin-sidebar-nav {
        display: flex;
        overflow-x: auto;
    }
    
    .admin-sidebar-nav a {
        white-space: nowrap;
        border-left: none;
        border-bottom: 3px solid transparent;
        padding: 14px 16px;
    }
    
    .admin-sidebar-nav a.active {
        border-left-color: transparent;
        border-bottom-color: var(--accent);
    }
    
    .admin-content {
        padding: 20px 16px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .amount-selector {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .navbar-brand span {
        display: none;
    }
    
    .navbar-nav .hide-mobile {
        display: none;
    }
    
    .amount-selector {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    table {
        font-size: 0.85rem;
    }
    
    thead th,
    tbody td {
        padding: 10px 12px;
    }
}

/* ==========================================
   动画关键帧
   ========================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes countUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px rgba(108, 92, 231, 0.3); }
    50% { box-shadow: 0 0 20px rgba(108, 92, 231, 0.6); }
}

/* 工具类 */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.text-warning { color: var(--warning); }
.text-accent { color: var(--accent-light); }
.font-mono { font-family: var(--font-mono); }
.font-bold { font-weight: 700; }
.text-sm { font-size: 0.85rem; }
.text-lg { font-size: 1.1rem; }
.text-xl { font-size: 1.25rem; }

.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }

.hidden { display: none; }
.relative { position: relative; }

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 14px 20px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    box-shadow: var(--shadow-lg);
    animation: slideInRight 0.3s ease;
    max-width: 360px;
}

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

.toast-error {
    background: var(--error);
    color: white;
}

.toast-info {
    background: var(--info);
    color: #1a1a2e;
}