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

/* 登录 */
.login-wrap { display: flex; justify-content: center; align-items: center; min-height: 100vh; }
.login-box { background: #fff; padding: 40px; border-radius: 8px; box-shadow: 0 2px 12px rgba(0,0,0,.1); width: 360px; }
.login-box h2 { text-align: center; margin-bottom: 30px; color: #1890ff; }
.login-box input { width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 4px; margin-bottom: 16px; font-size: 14px; }
.login-box button { width: 100%; padding: 10px; background: #1890ff; color: #fff; border: none; border-radius: 4px; cursor: pointer; font-size: 16px; }
.login-box button:hover { background: #40a9ff; }

/* 布局 */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 200px; background: #001529; color: #fff; flex-shrink: 0; }
.sidebar .logo { padding: 20px; font-size: 18px; font-weight: bold; text-align: center; border-bottom: 1px solid #003a70; }
.sidebar .menu-item { padding: 14px 24px; cursor: pointer; transition: background .2s; }
.sidebar .menu-item:hover { background: #003a70; }
.sidebar .menu-item.active { background: #1890ff; }
.sidebar .menu-item.logout { margin-top: auto; position: absolute; bottom: 0; width: 200px; }
.main { flex: 1; padding: 24px; overflow-y: auto; }
.main h2 { margin-bottom: 20px; color: #333; }

/* 卡片 */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.stat-card .label { color: #999; font-size: 14px; }
.stat-card .value { font-size: 28px; font-weight: bold; color: #1890ff; margin-top: 8px; }

/* 表格 */
.table-wrap { background: #fff; border-radius: 8px; padding: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #f0f0f0; font-size: 14px; }
th { color: #666; font-weight: 500; white-space: nowrap; }
td img { width: 40px; height: 40px; border-radius: 4px; object-fit: cover; }

/* 按钮 */
.btn { padding: 6px 16px; border: 1px solid #1890ff; background: #fff; color: #1890ff; border-radius: 4px; cursor: pointer; font-size: 13px; }
.btn:hover { background: #1890ff; color: #fff; }
.btn-primary { background: #1890ff; color: #fff; }
.btn-primary:hover { background: #40a9ff; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-danger { border-color: #ff4d4f; color: #ff4d4f; }
.btn-danger:hover { background: #ff4d4f; color: #fff; }

/* 工具栏 */
.toolbar { display: flex; gap: 12px; margin-bottom: 16px; align-items: center; flex-wrap: wrap; }
.toolbar select, .toolbar input { padding: 6px 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; }

/* 弹窗 */
.modal-mask { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,.45); display: flex; justify-content: center; align-items: center; z-index: 1000; }
.modal { background: #fff; border-radius: 8px; padding: 24px; width: 560px; max-height: 80vh; overflow-y: auto; }
.modal h3 { margin-bottom: 20px; }
.modal .form-group { margin-bottom: 14px; }
.modal label { display: block; margin-bottom: 4px; color: #666; font-size: 14px; }
.modal input, .modal select, .modal textarea { width: 100%; padding: 8px 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; }
.modal textarea { min-height: 80px; resize: vertical; }
.modal .form-row { display: flex; gap: 12px; }
.modal .form-row .form-group { flex: 1; }
.modal .modal-footer { display: flex; gap: 12px; justify-content: flex-end; margin-top: 20px; }

/* 分页 */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 16px; }

/* 标签 */
.tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.tag-green { background: #f6ffed; color: #52c41a; border: 1px solid #b7eb8f; }
.tag-orange { background: #fff7e6; color: #fa8c16; border: 1px solid #ffd591; }
.tag-red { background: #fff2f0; color: #ff4d4f; border: 1px solid #ffccc7; }
.tag-blue { background: #e6f7ff; color: #1890ff; border: 1px solid #91d5ff; }
.tag-gray { background: #fafafa; color: #999; border: 1px solid #d9d9d9; }

/* 装修编辑 */
.deco-section { background: #fff; border-radius: 8px; padding: 16px; margin-bottom: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.deco-section h3 { margin-bottom: 12px; font-size: 16px; }
.deco-item { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; padding: 8px; background: #fafafa; border-radius: 4px; }
.deco-item input { flex: 1; padding: 6px 10px; border: 1px solid #ddd; border-radius: 4px; }
