/* 全局样式 */ * { box-sizing: border-box; margin: 0; padding: 0; } body { font-family: -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif; background: #f4f6f9; color: #333; line-height: 1.6; min-height: 100vh; } header { background: linear-gradient(135deg, #2c3e50, #4a6572); color: #fff; padding: 30px 40px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); } header h1 { font-size: 26px; } .subtitle { font-size: 13px; opacity: 0.75; } main { max-width: 1200px; margin: 30px auto; padding: 0 20px; } /* 统计卡片 */ .stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin-bottom: 24px; } .stat-card { background: #fff; border-radius: 10px; padding: 20px; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,0.06); transition: transform 0.2s; } .stat-card:hover { transform: translateY(-3px); } .stat-num { display: block; font-size: 28px; font-weight: 700; color: #2c3e50; } .stat-label { font-size: 13px; color: #888; } /* 工具栏 */ .toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; } .search-form { display: flex; gap: 8px; flex: 1; max-width: 500px; } .search-form input { flex: 1; padding: 10px 14px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; } .search-form input:focus { outline: none; border-color: #4a6572; } /* 按钮 */ .btn { display: inline-block; padding: 10px 18px; background: #e0e0e0; color: #333; border: none; border-radius: 6px; cursor: pointer; font-size: 14px; text-decoration: none; transition: background 0.2s; } .btn:hover { background: #d0d0d0; } .btn-primary { background: #2c3e50; color: #fff; } .btn-primary:hover { background: #1a252f; } .btn-danger { background: #e74c3c; color: #fff; } .btn-danger:hover { background: #c0392b; } .btn-sm { padding: 6px 12px; font-size: 13px; } .btn-clear { background: #f39c12; color: #fff; } /* 表格 */ .table-wrap { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.06); } table { width: 100%; border-collapse: collapse; } th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid #eee; font-size: 14px; } th { background: #f8f9fb; font-weight: 600; color: #555; } tbody tr:hover { background: #fafbfc; } .empty { text-align: center; color: #999; padding: 40px 0; } /* 状态徽章 */ .badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 500; } .badge-available { background: #d4edda; color: #155724; } .badge-in_use { background: #cce5ff; color: #004085; } .badge-maintenance { background: #fff3cd; color: #856404; } /* 表单卡片 */ .form-card { background: #fff; border-radius: 10px; padding: 30px; max-width: 600px; margin: 0 auto; box-shadow: 0 2px 8px rgba(0,0,0,0.06); } form label { display: block; margin-bottom: 16px; font-size: 14px; color: #555; } form input, form select { display: block; width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; font-family: inherit; } form input:focus, form select:focus { outline: none; border-color: #4a6572; } .modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; } /* 弹窗 */ .modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 100; align-items: center; justify-content: center; padding: 20px; } .modal.show { display: flex; } .modal-content { background: #fff; padding: 30px; border-radius: 12px; width: 100%; max-width: 500px; max-height: 90vh; overflow-y: auto; } .modal-content h2 { margin-bottom: 20px; color: #2c3e50; } .actions { white-space: nowrap; } .actions .btn { margin-right: 4px; } @media (max-width: 768px) { header { padding: 20px; } .toolbar { flex-direction: column; align-items: stretch; } .search-form { max-width: 100%; } th, td { padding: 8px 10px; font-size: 13px; } }