/* ============================================================
   预约订餐系统 V2 公共样式（手机友好）
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  background: #f4f5f7;
  color: #222;
  font-size: 15px;
  line-height: 1.5;
  padding-bottom: env(safe-area-inset-bottom);
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* 顶部标题栏 */
.app-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  height: 50px; padding: 0 12px;
  background: linear-gradient(135deg, #ff6b2c, #ff8c42);
  color: #fff; font-size: 17px; font-weight: 600;
}
.app-header .back { position: absolute; left: 12px; font-size: 20px; line-height: 1; padding: 4px; }
.app-header .right { position: absolute; right: 12px; font-size: 14px; font-weight: 400; }

/* 页面容器 */
.page { max-width: 560px; margin: 0 auto; padding: 12px 12px 80px; }
.page-narrow { max-width: 480px; }

/* 卡片 */
.card {
  background: #fff; border-radius: 12px; padding: 14px;
  margin-bottom: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.card-title { font-size: 15px; font-weight: 600; margin-bottom: 10px; }

/* 通用按钮 */
.btn {
  display: inline-block; border: none; border-radius: 8px;
  padding: 11px 16px; font-size: 15px; text-align: center;
  background: #eee; color: #333; line-height: 1.2;
}
.btn-block { display: block; width: 100%; }
.btn-primary { background: #ff6b2c; color: #fff; }
.btn-danger  { background: #fa5151; color: #fff; }
.btn-green   { background: #07c160; color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 6px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* 表单 */
.form-item { margin-bottom: 14px; }
.form-item label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-item input, .form-item select, .form-item textarea {
  width: 100%; border: 1px solid #e5e5e5; border-radius: 8px;
  padding: 11px 12px; font-size: 15px; background: #fff; color: #222;
}
.form-item textarea { min-height: 72px; resize: vertical; }
.form-item input:focus, .form-item textarea:focus { outline: none; border-color: #ff6b2c; }

/* 列表行 */
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid #f2f2f2; }
.row:last-child { border-bottom: none; }
.row-label { font-size: 15px; }
.row-value { font-size: 15px; color: #333; }

/* 菜品卡片 */
.goods-card { display: flex; gap: 12px; align-items: center; }
.goods-img { width: 74px; height: 74px; border-radius: 10px; object-fit: cover; background: #f0f0f0; flex-shrink: 0; }
.goods-info { flex: 1; min-width: 0; }
.goods-name { font-size: 16px; font-weight: 600; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.goods-remark { font-size: 12px; color: #999; margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.goods-bottom { display: flex; align-items: center; justify-content: space-between; }
.goods-price { color: #ff6b2c; font-weight: 700; font-size: 17px; }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper button { width: 28px; height: 28px; border-radius: 50%; border: none; background: #ff6b2c; color: #fff; font-size: 18px; line-height: 1; }
.stepper button.minus { background: #eee; color: #555; }
.stepper .num { min-width: 24px; text-align: center; font-size: 16px; font-weight: 600; }

/* 状态胶囊 */
.badge { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 12px; color: #fff; }
.badge-s0 { background: #3a7afe; }   /* 待备餐 */
.badge-s1 { background: #07c160; }   /* 已备餐 */
.badge-s2 { background: #999; }      /* 已取餐 */

/* 底部分栏（购物车/合计） */
.bottom-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  max-width: 560px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: #fff; box-shadow: 0 -2px 8px rgba(0,0,0,.06);
}
.bottom-bar .total { flex: 1; font-size: 13px; color: #666; }
.bottom-bar .total .amount { color: #ff6b2c; font-weight: 700; font-size: 20px; }

/* 弹窗提示 */
.app-toast {
  position: fixed; left: 50%; top: 40%; transform: translate(-50%, -50%);
  background: rgba(0,0,0,.78); color: #fff; font-size: 14px;
  padding: 10px 18px; border-radius: 8px; z-index: 999;
  max-width: 78%; text-align: center; opacity: 0; pointer-events: none; transition: opacity .2s;
}
.app-toast.show { opacity: 1; }

/* 空状态 */
.empty { text-align: center; color: #999; padding: 50px 0; font-size: 14px; }
.empty .icon { font-size: 44px; display: block; margin-bottom: 10px; }

/* 筛选条 */
.filter-bar { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 10px; }
.filter-bar .chip {
  flex-shrink: 0; padding: 6px 14px; border-radius: 20px; font-size: 13px;
  background: #fff; color: #555; border: 1px solid #e5e5e5;
}
.filter-bar .chip.active { background: #ff6b2c; color: #fff; border-color: #ff6b2c; }

/* 表格（厨房端） */
.table-wrap { overflow-x: auto; background: #fff; border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
th, td { padding: 10px 8px; border-bottom: 1px solid #f0f0f0; text-align: left; vertical-align: top; }
th { background: #fafafa; font-weight: 600; color: #555; position: sticky; top: 50px; }
td .line { display: block; }
td .muted { color: #999; }

/* 登录/表单卡片 */
.panel { max-width: 400px; margin: 40px auto; padding: 0 16px; }
.panel .brand { text-align: center; font-size: 22px; font-weight: 700; color: #ff6b2c; margin-bottom: 6px; }
.panel .sub { text-align: center; color: #999; font-size: 13px; margin-bottom: 24px; }

/* 标签页 */
.tabs { display: flex; background: #fff; border-radius: 10px; overflow: hidden; margin-bottom: 12px; }
.tabs .tab { flex: 1; text-align: center; padding: 11px 0; font-size: 14px; color: #555; border-bottom: 2px solid transparent; }
.tabs .tab.active { color: #ff6b2c; font-weight: 600; border-bottom-color: #ff6b2c; }

/* 订单卡片 */
.order-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.order-no { font-weight: 600; font-size: 14px; }
.order-items { font-size: 13px; color: #555; margin-bottom: 6px; }
.order-item-line { display: flex; justify-content: space-between; }
.order-item-line .name { flex: 1; }
.order-meta { font-size: 12px; color: #999; }
.order-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; padding-top: 8px; border-top: 1px dashed #eee; }
.order-foot .total { color: #ff6b2c; font-weight: 700; }
.order-actions { display: flex; gap: 8px; }

/* 登录提示横幅 */
.notice-banner { background: #fff7e6; border: 1px solid #ffe0a3; color: #8a6d3b; padding: 10px 12px; border-radius: 10px; font-size: 13px; margin-bottom: 12px; }
