/* ============================================================
   管理增强样式：上架窗口照片预览 + 保洁手机端
   加载顺序：themes.css -> manage.css，全部使用主题变量
   ============================================================ */

/* ---------- 上传预览：照片自适应，不拉伸 ---------- */
.upload-preview {
  display: block;
  width: 100%;
  max-height: 180px;
  margin-top: 8px;
  border: 1px dashed rgba(var(--c1-rgb), .38);
  border-radius: 10px;
  object-fit: contain;
  object-position: center;
  background: rgba(var(--surface-rgb), .55);
}
.upload-preview.empty { display: none; }
.field input[type="file"] {
  padding: 9px;
  font-size: 12px;
  color: var(--muted);
}
.field input[type="file"]::file-selector-button {
  border: 1px solid rgba(var(--c1-rgb), .35);
  background: rgba(var(--c1-rgb), .1);
  color: var(--text);
  border-radius: 7px;
  padding: 6px 10px;
  margin-right: 10px;
  cursor: pointer;
}
.table-img img, .cart-thumb img {
  object-fit: cover;
  object-position: center;
}
.table-img { display: inline-block; overflow: hidden; border-radius: 6px; vertical-align: middle; }

/* ---------- 保洁手机端 ---------- */
body.cleaner-page {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
.cleaner-app {
  width: min(440px, 100vw);
  min-height: 100vh;
  margin: 0 auto;
  padding: 16px 14px 28px;
  background: var(--bg);
  box-shadow: 0 0 60px rgba(0, 0, 0, .25);
}
.cleaner-head {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  backdrop-filter: blur(16px);
}
.cleaner-title { display: flex; align-items: center; gap: 10px; }
.cleaner-title > span {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: rgba(var(--c3-rgb), .14);
  font-size: 22px;
}
.cleaner-title b { display: block; font-size: 16px; letter-spacing: .5px; }
.cleaner-title small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.cleaner-staff {
  max-width: 130px;
  padding: 7px 8px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
}
.cleaner-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin: 14px 0 18px;
}
.cleaner-stats > div {
  padding: 13px 6px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}
.cleaner-stats b {
  display: block;
  font-size: 22px;
  line-height: 1.1;
  color: rgb(var(--c1-rgb));
}
.cleaner-stats div:nth-child(3) b { color: rgb(var(--c3-rgb)); }
.cleaner-stats span { display: block; margin-top: 5px; font-size: 11px; color: var(--muted); }
.cleaner-section-title {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 4px 2px 10px; font-size: 14px; font-weight: 700;
}
.cleaner-section-title small { color: var(--muted); font-weight: 400; }
.cleaner-list { display: flex; flex-direction: column; gap: 11px; }
.cleaner-card {
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.cleaner-card.done { opacity: .72; }
.cleaner-card-top { display: flex; align-items: center; gap: 11px; }
.cleaner-room {
  width: 62px; height: 54px;
  flex: 0 0 62px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(var(--surface-rgb), .8);
}
.cleaner-room img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cleaner-card-top > div:nth-child(2) { flex: 1; min-width: 0; }
.cleaner-card-top b { font-size: 15px; }
.cleaner-card-top .tag { white-space: nowrap; }
.cleaner-card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 12px; padding-top: 10px;
  border-top: 1px dashed var(--border);
}
.cleaner-foot {
  margin-top: 18px; padding: 12px;
  border-radius: 11px;
  background: rgba(var(--c3-rgb), .08);
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}
.cleaner-app .btn-sm { padding: 7px 12px; font-size: 12px; }

/* ---------- 自助早餐 ---------- */
.breakfast-hero {
  display: flex; align-items: center; gap: 18px;
  padding: 14px; margin-bottom: 16px;
  border: 1px solid var(--border); border-radius: 16px;
  background: var(--surface);
}
.breakfast-hero-img {
  width: 130px; height: 92px; flex: 0 0 130px;
  border-radius: 12px; overflow: hidden;
}
.breakfast-hero-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.breakfast-hero h2 { margin: 0 0 8px; }
.breakfast-hero p { margin: 4px 0; font-size: 13px; }
.ticket-list { display: flex; flex-direction: column; gap: 10px; }
.ticket-card {
  padding: 12px 14px; border: 1px dashed rgba(var(--c1-rgb),.35);
  border-radius: 12px; background: rgba(var(--c1-rgb),.05);
}
.ticket-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }

/* ---------- 前台房态 / 房卡 / 效率 ---------- */
.front-list { display:flex; flex-direction:column; gap:9px; }
.front-card { display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:11px 13px; border:1px solid var(--border); border-radius:11px; background:rgba(var(--surface-rgb),.6); }
.room-state-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:9px; }
.state-room { padding:11px 12px; border:1px solid var(--border); border-radius:11px; background:var(--surface); }
.state-room.occupied { border-color:rgba(var(--c1-rgb),.5); }
.state-room.dirty { border-color:rgba(var(--accent-rgb),.5); }
.state-room.cleaning { border-color:rgba(var(--c2-rgb),.5); }
.state-room.maintenance { border-color:rgba(var(--red-rgb),.5); }
.state-room-top { display:flex; justify-content:space-between; align-items:center; gap:6px; margin-bottom:5px; }
.eff-bar { display:inline-block; width:70px; height:6px; margin-right:8px; border-radius:6px;
  background:rgba(var(--muted-rgb),.18); overflow:hidden; vertical-align:middle; }
.eff-bar span { display:block; height:100%; background:linear-gradient(90deg,rgb(var(--c2-rgb)),rgb(var(--c1-rgb))); }

/* ---------- 功能开关中心 ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 10px; }
.feature-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 14px; border: 1px solid var(--border);
  border-radius: 12px; background: rgba(var(--surface-rgb),.6);
}
.feature-item.on { border-color: rgba(var(--c3-rgb),.45); }
.feature-switch {
  flex: 0 0 auto; min-width: 66px; padding: 6px 10px;
  border: 1px solid var(--border); border-radius: 20px;
  background: rgba(var(--muted-rgb),.12); color: var(--muted);
  font-size: 11px; cursor: pointer;
}
.feature-switch.on {
  border-color: rgba(var(--c3-rgb),.55);
  background: rgba(var(--c3-rgb),.16); color: rgb(var(--c3-rgb));
}
@media (max-width: 620px) {
  .breakfast-hero { flex-direction: column; align-items: flex-start; }
  .breakfast-hero-img { width: 100%; height: 140px; flex: auto; }
  .feature-grid { grid-template-columns: 1fr; }
}

@media (min-width: 700px) {
  body.cleaner-page {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 28px 0;
    background:
      radial-gradient(circle at 20% 10%, rgba(var(--c2-rgb), .16), transparent 40%),
      radial-gradient(circle at 80% 20%, rgba(var(--c1-rgb), .12), transparent 42%),
      var(--bg);
  }
  .cleaner-app {
    min-height: auto;
    border: 1px solid var(--border);
    border-radius: 26px;
    padding: 18px 16px 24px;
  }
}
@media (max-width: 420px) {
  .cleaner-app { padding: 12px 10px 24px; }
  .cleaner-head { border-radius: 13px; padding: 11px; }
  .cleaner-title > span { width: 36px; height: 36px; font-size: 19px; }
  .cleaner-staff { max-width: 108px; font-size: 11px; }
}
