/* ===== 摇摇车管理系统 - 样式 ===== */

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif; background: #f0f2f5; color: #333; }

/* ===== 侧边栏 ===== */
.sidebar { position: fixed; left: 0; top: 0; width: 220px; height: 100vh; background: #1a1a2e; color: #fff; overflow-y: auto; z-index: 100; }
.sidebar-header { padding: 20px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.sidebar-header h2 { font-size: 18px; font-weight: 600; color: #fff; }
.nav-list { list-style: none; padding: 10px 0; }
.nav-list li a { display: block; padding: 12px 20px; color: rgba(255,255,255,0.7); text-decoration: none; font-size: 14px; transition: all 0.2s; }
.nav-list li a:hover { background: rgba(255,255,255,0.1); color: #fff; }
.nav-list li a.active { background: rgba(79,172,254,0.2); color: #4facfe; border-right: 3px solid #4facfe; }

/* ===== 主内容区 ===== */
.main-content { margin-left: 220px; min-height: 100vh; }
.top-bar { display: flex; justify-content: space-between; align-items: center; padding: 16px 24px; background: #fff; border-bottom: 1px solid #e8e8e8; font-size: 14px; color: #666; }
.content { padding: 24px; }

/* ===== 页面标题 ===== */
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.page-header h2 { font-size: 20px; color: #333; }

/* ===== 筛选栏 ===== */
.filter-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }

/* ===== 按钮 ===== */
.btn { display: inline-block; padding: 8px 16px; border: 1px solid #ddd; border-radius: 6px; background: #fff; color: #333; font-size: 13px; cursor: pointer; text-decoration: none; transition: all 0.2s; }
.btn:hover { background: #f5f5f5; border-color: #ccc; }
.btn-primary { background: #4facfe; border-color: #4facfe; color: #fff; }
.btn-primary:hover { background: #3d9cfe; }
.btn-danger { color: #e74c3c; border-color: #e74c3c; }
.btn-danger:hover { background: #e74c3c; color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-full { width: 100%; padding: 12px; font-size: 16px; }
.btn-active { background: #4facfe; color: #fff; border-color: #4facfe; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ===== 表格 ===== */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { background: #f8f9fa; padding: 12px 16px; text-align: left; font-size: 13px; color: #666; font-weight: 600; border-bottom: 2px solid #eee; }
.data-table td { padding: 12px 16px; border-bottom: 1px solid #f0f0f0; font-size: 14px; }
.data-table tbody tr:hover { background: #f8f9ff; }
.action-cell { white-space: nowrap; }
code { background: #f0f0f0; padding: 2px 6px; border-radius: 4px; font-size: 12px; color: #666; }

/* ===== 标签 ===== */
.badge { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 500; }
.badge-online { background: #e8f5e9; color: #4caf50; }
.badge-offline { background: #f5f5f5; color: #999; }
.badge-running { background: #e3f2fd; color: #2196f3; }
.badge-maintenance { background: #fff3e0; color: #ff9800; }
.badge-pending { background: #fff8e1; color: #ffa000; }
.badge-paid { background: #e8f5e9; color: #43a047; }
.badge-completed { background: #f3e5f5; color: #8e24aa; }
.badge-refunded { background: #fce4ec; color: #e53935; }
.badge-group { background: #e8eaf6; color: #3949ab; padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.filter-spacer { flex: 1; }

/* ===== 弹窗 ===== */
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); }
.modal-content { background: #fff; margin: 8% auto; padding: 24px; width: 90%; max-width: 500px; border-radius: 12px; position: relative; max-height: 80vh; overflow-y: auto; }
.modal-content h3 { margin-bottom: 20px; font-size: 18px; color: #333; }
.close { position: absolute; right: 20px; top: 16px; font-size: 28px; cursor: pointer; color: #999; }
.close:hover { color: #333; }

/* ===== 表单 ===== */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 14px; color: #555; font-weight: 500; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; outline: none; transition: border-color 0.2s; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: #4facfe; }
.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }

/* ===== 登录页 ===== */
.login-body { display: flex; justify-content: center; align-items: center; min-height: 100vh; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.login-container { width: 100%; max-width: 400px; padding: 20px; }
.login-box { background: #fff; border-radius: 16px; padding: 40px; box-shadow: 0 20px 60px rgba(0,0,0,0.2); }
.login-box h1 { font-size: 48px; text-align: center; margin-bottom: 10px; }
.login-box h2 { text-align: center; font-size: 20px; color: #333; margin-bottom: 30px; }
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.alert-error { background: #fce4ec; color: #c62828; border: 1px solid #f8bbd0; }

/* ===== 支付页面 ===== */
.pay-body { display: flex; justify-content: center; align-items: center; min-height: 100vh; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.pay-container { width: 100%; max-width: 420px; background: #fff; border-radius: 20px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.15); margin: 20px; }
.pay-header { text-align: center; padding: 30px 20px 20px; }
.pay-icon { font-size: 64px; margin-bottom: 10px; }
.pay-header h1 { font-size: 22px; color: #333; }
.pay-info { padding: 0 24px; }
.info-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #f5f5f5; }
.info-label { color: #999; font-size: 14px; }
.info-value { color: #333; font-size: 14px; font-weight: 500; }
.pay-price { text-align: center; padding: 24px; }
.price-symbol { font-size: 24px; vertical-align: top; color: #e74c3c; }
.price-number { font-size: 56px; font-weight: 700; color: #e74c3c; line-height: 1; }
.pay-button { display: block; width: calc(100% - 48px); margin: 0 24px 20px; padding: 16px; background: linear-gradient(135deg, #00c853, #69f0ae); border: none; border-radius: 12px; font-size: 20px; font-weight: 600; color: #fff; cursor: pointer; }
.pay-button:hover { opacity: 0.9; }
.pay-status { text-align: center; padding: 30px; color: #666; }
.pay-success { text-align: center; padding: 30px; }
.success-icon { font-size: 64px; margin-bottom: 10px; }
.pay-success h2 { color: #4caf50; margin-bottom: 10px; }
.pay-success p { color: #666; }
.pay-footer { text-align: center; padding: 16px; color: #999; font-size: 12px; background: #fafafa; }

/* ===== 加载动画 ===== */
.spinner { display: inline-block; width: 40px; height: 40px; border: 4px solid #f3f3f3; border-top: 4px solid #4facfe; border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 12px; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .sidebar { width: 100%; height: auto; position: relative; }
    .main-content { margin-left: 0; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .grid-2col { grid-template-columns: 1fr; }
    .form-row { flex-direction: column; gap: 0; }
}
