/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #a8e6cf;
    --secondary-color: #dcedc1;
    --accent-color: #ffd3b6;
    --text-color: #333;
    --card-bg: rgba(255, 255, 255, 0.9);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --shadow: 0 8px 32px rgba(31, 38, 135, 0.1);
    --border-radius: 15px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #e0f7fa, #bbdefb);
    min-height: 100vh;
    color: var(--text-color);
    line-height: 1.6;
    padding: 20px;
}

/* 毛玻璃效果 */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow);
}

/* 卡片样式 */
.card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(168, 230, 207, 0.3);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.15);
}

.card-title {
    color: #00a8ff;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.status-normal { background: #a8e6cf; color: #2e7d32; }
.status-warning { background: #ffd3b6; color: #f57c00; }
.status-error { background: #ffaaa5; color: #d32f2f; }

/* 表单样式 */
.form-container {
    max-width: 500px;
    margin: 40px auto;
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0f7fa;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.form-control:focus {
    outline: none;
    border-color: #00a8ff;
    box-shadow: 0 0 0 3px rgba(0, 168, 255, 0.1);
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #00a8ff, #0097e6);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0097e6, #0088d4);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 168, 255, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #a8e6cf, #8dd7b9);
    color: #2e7d32;
}

/* 导航栏 */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    margin-bottom: 30px;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: #00a8ff;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 20px;
}

/* 产品卡片网格 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

/* 弹窗 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 15px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .form-container {
        margin: 20px;
        padding: 20px;
    }
    
    .card {
        padding: 15px;
    }
}

/* 辅助文本 */
.text-muted {
    color: #666;
    font-size: 14px;
}

.text-center {
    text-align: center;
}

.mt-3 { margin-top: 15px; }
.mb-3 { margin-bottom: 15px; }
.p-3 { padding: 15px; }

/* 浮动效果 */
.floating {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
/* 响应式菜单 */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #00a8ff;
}

/* 错误状态 */
.error {
    border-color: #ff5555 !important;
}

.error-message {
    color: #ff5555;
    font-size: 12px;
    margin-top: 5px;
}

/* 消息提示 */
.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideIn 0.3s ease;
}

.message-success {
    background: linear-gradient(135deg, #a8e6cf, #8dd7b9);
}

.message-error {
    background: linear-gradient(135deg, #ffaaa5, #ff8a8a);
}

.message-warning {
    background: linear-gradient(135deg, #ffd3b6, #ffb88c);
}

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

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

/* 工具提示 */
.tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 1000;
    white-space: nowrap;
    pointer-events: none;
}

/* 加载动画 */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
}

/* 移动端响应式 */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--glass-bg);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 8px 32px rgba(31, 38, 135, 0.1);
    }
    
    .nav-links.show {
        display: flex;
    }
    
    .admin-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .qr-input {
        width: 100%;
    }
    
    table {
        display: block;
        overflow-x: auto;
    }
    
    .dynamic-field {
        flex-direction: column;
    }
    
    .dynamic-field input {
        width: 100%;
    }
}

/* 打印样式 */
@media print {
    .navbar, .sidebar, .btn, .modal {
        display: none !important;
    }
    
    .main-content {
        padding: 0 !important;
    }
    
    .card {
        border: 1px solid #ccc !important;
        box-shadow: none !important;
    }
}