/* ============================================================
   厨间助手管理后台 - 全局样式
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: #f5f7fa;
  color: #333;
  font-size: 14px;
}

/* ---------- 登录页 ---------- */
.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.login-box {
  width: 360px;
  background: #fff;
  border-radius: 12px;
  padding: 36px 32px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}
.login-box h2 {
  text-align: center;
  margin-bottom: 24px;
  font-size: 20px;
  color: #333;
}
.captcha-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.captcha-img {
  height: 38px;
  width: 120px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
  background: #fafafa;
}
.login-tip {
  margin-top: 14px;
  text-align: center;
  color: #999;
  font-size: 12px;
}

/* ---------- 表单通用 ---------- */
.form-item { margin-bottom: 16px; }
.form-item label { display: block; margin-bottom: 6px; font-weight: 500; color: #444; }
.form-item input[type="text"],
.form-item input[type="password"],
.form-item input[type="number"],
.form-item textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s;
  background: #fff;
}
.form-item input:focus,
.form-item textarea:focus {
  outline: none;
  border-color: #4096ff;
  box-shadow: 0 0 0 2px rgba(64, 150, 255, 0.1);
}
.form-item textarea { resize: vertical; font-family: inherit; }
.form-row { display: flex; gap: 16px; }
.form-row .form-item { flex: 1; }
.form-item .hint { color: #999; font-size: 12px; margin-top: 4px; }
.form-item .warn {
  color: #e6a23c;
  background: #fdf6ec;
  border: 1px solid #f0d9a8;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 12px;
  margin-top: 6px;
}
.form-card {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  max-width: 620px;
}
.form-card h4 {
  margin: 18px 0 12px;
  padding-top: 14px;
  border-top: 1px dashed #eee;
  color: #444;
  font-size: 14px;
}
.form-card h4:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.hint { color: #999; font-size: 12px; margin-top: 10px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block;
  padding: 7px 16px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  background: #fff;
  color: #333;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn:hover { border-color: #4096ff; color: #4096ff; }
.btn-primary { background: #4096ff; border-color: #4096ff; color: #fff; }
.btn-primary:hover { background: #69b1ff; border-color: #69b1ff; color: #fff; }
.btn-danger { background: #fff; border-color: #ff4d4f; color: #ff4d4f; }
.btn-danger:hover { background: #ff4d4f; color: #fff; }
.btn-block { width: 100%; padding: 10px; font-size: 15px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- 后台布局 ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 220px;
  background: #001529;
  color: #fff;
  flex-shrink: 0;
  padding-top: 16px;
}
.sidebar-title {
  padding: 12px 20px 20px;
  font-size: 16px;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 10px;
}
.menu-item {
  padding: 13px 20px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.75);
  transition: all 0.2s;
  font-size: 14px;
}
.menu-item:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.menu-item.active { color: #fff; background: #4096ff; }
.menu-item.logout-item { color: #ff7875; margin-top: 30px; }

.main {
  flex: 1;
  padding: 24px 28px;
  overflow-x: auto;
}
.main h3 {
  font-size: 18px;
  margin-bottom: 18px;
  color: #222;
}
.main h4 {
  font-size: 15px;
  margin: 24px 0 12px;
  color: #444;
}
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ---------- 统计卡片 ---------- */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 10px;
}
.stat-card {
  background: #fff;
  border-radius: 8px;
  padding: 18px 16px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.stat-num { font-size: 26px; font-weight: 700; color: #4096ff; }
.stat-label { margin-top: 6px; color: #888; font-size: 13px; }

/* ---------- 工具栏 ---------- */
.toolbar { display: flex; gap: 10px; margin-bottom: 14px; align-items: center; }
.toolbar input[type="text"] {
  padding: 7px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  width: 220px;
}

/* ---------- 表格 ---------- */
.table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.table th,
.table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13px;
}
.table th {
  background: #fafafa;
  color: #555;
  font-weight: 600;
  white-space: nowrap;
}
.table tbody tr:hover { background: #f5f5f5; }
.table img { max-height: 60px; border-radius: 4px; }
.table .btn { margin-right: 6px; padding: 4px 10px; font-size: 12px; }

/* ---------- 分页 ---------- */
.pager {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
}
.pager span { color: #666; }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal {
  background: #fff;
  border-radius: 10px;
  width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}
.modal-wide { width: 640px; }
.modal-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
  color: #222;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* ---------- 滚动条美化 ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 4px; }
::-webkit-scrollbar-track { background: #f5f5f5; }
