* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --user-primary: #667eea;
    --user-secondary: #764ba2;
    --admin-primary: #dc2626;
    --admin-secondary: #991b1b;
    --admin-accent: #fca5a5;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --light: #f8f9fa;
    --dark: #343a40;
    --gray: #6c757d;
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --border-color: #e2e8f0;
    --bg-color: #f7fafc;
    --admin-bg-color: #f5f5f5;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
    --admin-shadow: 0 2px 8px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.05);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* 统一UI组件尺寸规范 */
    --ui-component-height: 48px;
    --ui-component-padding-x: 16px;
    --ui-component-padding-y: 12px;
    --ui-component-border-width: 2px;
    --ui-component-border-radius: 10px;
    --ui-component-font-size: 14px;
    --ui-component-border-color: #e5e7eb;
    --ui-component-border-color-focus: #667eea;
    --ui-component-border-color-focus-admin: #dc2626;
    --ui-component-bg: white;
    --ui-component-gap: 12px;
    --ui-component-min-width: 200px;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.7;
    letter-spacing: 0.2px;
}

.navbar {
    padding: 18px 36px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.navbar-user {
    background: linear-gradient(135deg, var(--user-primary) 0%, var(--user-secondary) 100%);
}

.navbar-admin {
    background: linear-gradient(135deg, var(--admin-primary) 0%, var(--admin-secondary) 100%);
}

.navbar .logo {
    font-size: 26px;
    font-weight: 800;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar .logo span {
    font-size: 32px;
}

.navbar .nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.navbar a {
    color: white;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    transition: var(--transition-base);
    font-weight: 600;
    font-size: 14px;
}

.navbar a:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-1px);
}

.navbar .user-info {
    display: flex;
    align-items: center;
    gap: 18px;
    color: white;
}

.navbar .badge {
    background: rgba(255,255,255,0.25);
    padding: 5px 14px;
    border-radius: 24px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.container {
    max-width: 1400px;
    margin: 36px auto;
    padding: 0 24px;
}

.card {
    background: white;
    padding: 36px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 30px;
    border: 1px solid rgba(226, 232, 240, 0.6);
    transition: var(--transition-base);
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.card-header h2 {
    font-size: 26px;
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: 0.3px;
}

.btn {
    padding: 11px 22px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition-base);
    letter-spacing: 0.2px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, var(--user-primary), var(--user-secondary));
    color: white;
}

.btn-primary:hover {
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-admin {
    background: linear-gradient(135deg, var(--admin-primary), var(--admin-secondary));
    color: white;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.25);
}

.btn-admin:hover {
    box-shadow: 0 8px 24px rgba(220, 38, 38, 0.4);
    transform: translateY(-2px);
}

.btn-admin:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.btn-success:hover {
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
}

.btn-danger:hover {
    box-shadow: 0 8px 20px rgba(220, 53, 69, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: #333;
}

.btn-warning:hover {
    box-shadow: 0 8px 20px rgba(255, 193, 7, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid currentColor;
    color: var(--gray);
}

.btn-sm {
    padding: 7px 14px;
    font-size: 13px;
    border-radius: var(--radius-sm);
}

.btn-xs {
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: var(--radius-sm);
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
    letter-spacing: 0.2px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 15px;
    transition: var(--transition-base);
    background: #fafbfc;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--user-primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-group .error {
    color: var(--danger);
    font-size: 13px;
    margin-top: 6px;
    display: none;
    font-weight: 500;
}

.form-group.has-error input,
.form-group.has-error select {
    border-color: var(--danger);
    background: #fff5f5;
}

.form-group.has-error .error {
    display: block;
}

.alert {
    padding: 18px 24px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 15px;
    font-weight: 500;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border: 1px solid #b8dfc1;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border: 1px solid #f1b0b7;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd, #ffeeba);
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    color: #0c5460;
    border: 1px solid #abdde5;
}



.badge {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 24px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.badge-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
}

.badge-danger {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
}

.badge-warning {
    background: linear-gradient(135deg, #fff3cd, #ffeeba);
    color: #856404;
}

.badge-info {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    color: #0c5460;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-bottom: 36px;
}

.stat-card {
    background: white;
    padding: 28px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 22px;
    border: 1px solid rgba(226, 232, 240, 0.6);
    transition: var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.stat-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    flex-shrink: 0;
}

.stat-icon-blue {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.stat-icon-green {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.stat-icon-red {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.stat-icon-yellow {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.stat-icon-purple {
    background: linear-gradient(135deg, #6f42c1, #8561c5);
    color: white;
    box-shadow: 0 4px 15px rgba(111, 66, 193, 0.3);
}

.stat-info h3 {
    font-size: 34px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 4px;
}

.stat-info p {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.login-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
}

.login-container-user {
    background: linear-gradient(135deg, var(--user-primary) 0%, var(--user-secondary) 100%);
}

.login-container-admin {
    background: linear-gradient(135deg, #2d3436 0%, #000 100%);
}

.login-card {
    background: white;
    padding: 48px;
    border-radius: var(--radius-xl);
    box-shadow: 0 25px 70px rgba(0,0,0,0.35);
    width: 100%;
    max-width: 440px;
}

.login-card h1 {
    text-align: center;
    margin-bottom: 12px;
    font-size: 30px;
    font-weight: 800;
}

.login-card-user h1 {
    color: var(--user-primary);
}

.login-card-admin h1 {
    color: var(--admin-primary);
}

.login-card .subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 36px;
    font-size: 15px;
}

.login-card .icon {
    text-align: center;
    font-size: 72px;
    margin-bottom: 24px;
}

.login-links {
    text-align: center;
    margin-top: 28px;
}

.login-links a {
    color: var(--user-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.login-links a:hover {
    text-decoration: underline;
}

.btn-block {
    width: 100%;
    justify-content: center;
    padding: 16px;
    font-size: 16px;
    font-weight: 700;
    border-radius: var(--radius-md);
}

.password-strength {
    height: 5px;
    background: #e9ecef;
    border-radius: 3px;
    margin-top: 10px;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0;
    transition: var(--transition-base);
    border-radius: 3px;
}

.password-strength-weak { width: 33%; background: linear-gradient(90deg, #dc3545, #c82333); }
.password-strength-medium { width: 66%; background: linear-gradient(90deg, #ffc107, #e0a800); }
.password-strength-strong { width: 100%; background: linear-gradient(90deg, #28a745, #20c997); }

.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 24px;
}

.modal.show {
    display: flex;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: white;
    padding: 36px;
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 25px 70px rgba(0,0,0,0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-header h3 {
    font-size: 22px;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition-base);
    line-height: 1;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

.modal-close:hover {
    color: var(--text-primary);
    background: #f8f9fa;
}

.modal-body {
    margin-bottom: 24px;
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Modal Overlay for backward compatibility */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 24px;
}

.modal-overlay.show {
    display: flex;
    animation: fadeIn 0.2s ease;
}

/* ============================================
   QR Save Modal Component - Full Featured
   ============================================ */

/* Base Modal Overlay */
.qr-save-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 24px;
    overflow: hidden;
}

.qr-save-modal.active {
    display: flex;
    animation: modalFadeIn 0.25s ease-out forwards;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.qr-save-modal.closing {
    animation: modalFadeOut 0.15s ease-in forwards;
}

@keyframes modalFadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Modal Content Container */
.qr-save-modal__content {
    background: #ffffff;
    border-radius: 20px;
    width: 100%;
    max-width: 460px;
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    position: relative;
    transform: scale(0.9) translateY(20px);
    opacity: 0;
}

.qr-save-modal.active .qr-save-modal__content {
    animation: modalSlideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes modalSlideUp {
    from {
        transform: scale(0.9) translateY(20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.qr-save-modal.closing .qr-save-modal__content {
    animation: modalSlideDown 0.2s ease-in forwards;
}

@keyframes modalSlideDown {
    from {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
    to {
        transform: scale(0.95) translateY(10px);
        opacity: 0;
    }
}

/* Modal Header */
.qr-save-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 28px 32px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.qr-save-modal__title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    letter-spacing: -0.3px;
}

.qr-save-modal__close {
    width: 36px;
    height: 36px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #666;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
}

.qr-save-modal__close:hover {
    background: #e5e5e5;
    color: #333;
    transform: rotate(90deg);
}

.qr-save-modal__close:active {
    transform: rotate(90deg) scale(0.95);
}

/* Modal Body */
.qr-save-modal__body {
    padding: 28px 32px 32px;
}

.qr-save-modal__field {
    margin-bottom: 24px;
}

.qr-save-modal__label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    letter-spacing: 0.2px;
}

.qr-save-modal__input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    font-size: 15px;
    background: #fafafa;
    transition: all 0.2s ease;
    font-family: inherit;
}

.qr-save-modal__input:focus {
    outline: none;
    border-color: #667eea;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.qr-save-modal__hint {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f0ff 100%);
    border-radius: 12px;
    border: 1px solid #d7e3ff;
}

.qr-save-modal__hint-icon {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 2px;
}

.qr-save-modal__hint-text {
    font-size: 14px;
    color: #4a5568;
    line-height: 1.6;
    margin: 0;
}

/* Modal Footer */
.qr-save-modal__footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 0 32px 32px;
}

.qr-save-modal__btn {
    padding: 12px 28px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.qr-save-modal__btn--cancel {
    background: #f5f5f5;
    color: #333;
}

.qr-save-modal__btn--cancel:hover {
    background: #e5e5e5;
    transform: translateY(-1px);
}

.qr-save-modal__btn--cancel:active {
    transform: translateY(0);
}

.qr-save-modal__btn--save {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.qr-save-modal__btn--save:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.qr-save-modal__btn--save:active {
    transform: translateY(0);
}

.qr-save-modal__btn-icon {
    font-size: 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .qr-save-modal {
        padding: 16px;
    }
    
    .qr-save-modal__content {
        border-radius: 16px;
        max-width: 100%;
    }
    
    .qr-save-modal__header {
        padding: 24px 24px 18px;
    }
    
    .qr-save-modal__title {
        font-size: 20px;
    }
    
    .qr-save-modal__body {
        padding: 24px;
    }
    
    .qr-save-modal__footer {
        padding: 0 24px 24px;
        flex-direction: column-reverse;
    }
    
    .qr-save-modal__btn {
        width: 100%;
        padding: 14px 24px;
    }
}

@media (max-width: 480px) {
    .qr-save-modal {
        padding: 12px;
    }
    
    .qr-save-modal__header {
        padding: 20px 20px 16px;
    }
    
    .qr-save-modal__title {
        font-size: 18px;
    }
    
    .qr-save-modal__body {
        padding: 20px;
    }
    
    .qr-save-modal__footer {
        padding: 0 20px 20px;
    }
    
    .qr-save-modal__input {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .qr-save-modal__hint {
        padding: 12px 14px;
    }
}

/* ============================================
   End QR Save Modal Component
   ============================================ */

/* Flash Messages */
.flash-message {
    position: fixed;
    top: 90px;
    left: 50%;
    transform: translateX(-50%);
    padding: 18px 28px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 600;
    font-size: 14px;
    z-index: 9999;
    animation: flashSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 90%;
}

@keyframes flashSlideIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-24px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes flashSlideOut {
    from {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(-24px);
    }
}

.flash-message.fade-out {
    animation: flashSlideOut 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.flash-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border: 1px solid #b8dfc1;
}

.flash-error {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border: 1px solid #f1b0b7;
}

.flash-message span:first-child {
    font-size: 22px;
}

.flash-message-close {
    margin-left: auto;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.flash-message-close:hover {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }
    
    .card {
        padding: 28px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .modal-content {
        padding: 32px;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 18px;
        padding: 16px;
    }
    
    .navbar .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }
    
    .navbar .logo {
        font-size: 22px;
    }
    
    .navbar a {
        padding: 8px 14px;
        font-size: 13px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    
    .stat-card {
        padding: 22px;
    }
    
    .stat-icon {
        width: 56px;
        height: 56px;
        font-size: 26px;
    }
    
    .stat-info h3 {
        font-size: 30px;
    }
    
    .card {
        padding: 22px;
    }
    
    .card-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .card-header h2 {
        font-size: 22px;
    }
    
    table {
        font-size: 13px;
    }
    
    table th,
    table td {
        padding: 12px 10px;
    }
    
    .actions {
        flex-direction: column;
    }
    
    .login-card {
        padding: 36px 28px;
    }
    
    .login-card h1 {
        font-size: 26px;
    }
    
    /* Modal responsive */
    .modal,
    .modal-overlay {
        padding: 16px;
    }
    
    .modal-content {
        padding: 28px 24px;
    }
    
    .modal-footer {
        flex-direction: column-reverse;
    }
    
    .modal-footer .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 15px;
    }
    
    .container {
        margin: 24px auto;
        padding: 0 16px;
    }
    
    .btn {
        padding: 10px 18px;
        font-size: 13px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .stat-info h3 {
        font-size: 28px;
    }
    
    /* Modal small screen */
    .modal,
    .modal-overlay {
        padding: 12px;
    }
    
    .modal-content {
        padding: 24px 20px;
    }
    
    .modal-header h3 {
        font-size: 20px;
    }
}

/* 表格优化样式 */
table {
    border-collapse: collapse;
    width: 100%;
    background: white;
    table-layout: fixed;
}

table thead {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

table th {
    font-weight: 700;
    color: #495057;
    padding: 10px 8px;
    text-align: center;
    vertical-align: middle;
    border-bottom: 2px solid #dee2e6;
    font-size: 13px;
    letter-spacing: 0.3px;
}

table td {
    padding: 10px 8px;
    border-bottom: 1px solid #e9ecef;
    text-align: center;
    vertical-align: middle;
}

table tbody tr {
    transition: background-color 0.2s ease;
    vertical-align: middle;
}

table tbody tr:hover {
    background-color: #f8f9fa;
}

/* 针对分组名称等特殊列的左对齐 */
table td.text-left,
table th.text-left {
    text-align: left;
}

/* ID标签样式优化 */
table code {
    display: inline-block;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

/* 响应式表格优化 */
@media (max-width: 1200px) {
    table {
        font-size: 13px;
    }
    
    table th,
    table td {
        padding: 8px 6px;
    }
}

@media (max-width: 992px) {
    .card {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table thead,
    table tbody,
    table th,
    table td,
    table tr {
        display: block;
    }
    
    table thead {
        display: none;
    }
    
    table tbody tr {
        margin-bottom: 12px;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        padding: 12px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }
    
    table tbody tr:hover {
        background-color: white;
    }
    
    table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 6px 0;
        border-bottom: 1px dashed #e9ecef;
        text-align: right;
    }
    
    /* 移动端text-left的特殊处理 */
    table td.text-left {
        justify-content: flex-start;
    }
    
    table td.text-left::before {
        justify-content: flex-start;
    }
    
    table td:last-child {
        border-bottom: none;
    }
    
    table td::before {
        content: attr(data-label);
        font-weight: 700;
        color: #495057;
        text-align: left;
        flex-shrink: 0;
        margin-right: 16px;
    }
    
    table td[data-label="选择"],
    table td[data-label="预览"],
    table td[data-label="操作"] {
        justify-content: center;
    }
    
    table td[data-label="选择"]::before,
    table td[data-label="预览"]::before,
    table td[data-label="操作"]::before {
        display: none;
    }
    
    .actions {
        justify-content: center;
        flex-wrap: wrap;
    }
}
