/* 洗鞋小程序 — 全局样式（照搬旧店内系统，不重写） */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #07C160;
  --primary-dark: #06AD56;
  --danger: #FA5151;
  --warning: #FFC300;
  --bg: #F5F5F5;
  --white: #FFFFFF;
  --text: #333333;
  --text-secondary: #888888;
  --border: #E5E5E5;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  overflow: hidden;
  height: 100vh;
}

/* 页面切换 */
.page { display: none; position: absolute; top: 0; left: 0; right: 0; bottom: 0; }
.page.active { display: flex; }

/* 登录页 */
#login-page {
  justify-content: center; align-items: center;
  background: linear-gradient(135deg, #07C160 0%, #06AD56 100%);
}
.login-box {
  background: var(--white); padding: 48px 40px; border-radius: 16px;
  width: 400px; box-shadow: 0 8px 32px rgba(0,0,0,0.15); text-align: center;
}
.login-box h1 { font-size: 32px; margin-bottom: 4px; }
.login-box .subtitle { color: var(--text-secondary); margin-bottom: 32px; }
.login-error { color: var(--danger); margin-top: 12px; min-height: 20px; }

/* 表单 */
.form-group { display: flex; flex-direction: column; margin-bottom: 16px; }
.form-group label { margin-bottom: 6px; font-weight: 500; font-size: 13px; color: var(--text-secondary); }
.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 14px; outline: none; transition: border-color 0.2s; font-family: inherit;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--primary); }
.form-group textarea { resize: vertical; }
.flex-1 { flex: 1; }
.form-row { display: flex; gap: 12px; align-items: flex-end; }
.form-row .form-group { margin-bottom: 0; }
.hint { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }

/* 按钮 */
.btn {
  padding: 10px 20px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--white); color: var(--text); font-size: 14px; cursor: pointer;
  transition: all 0.2s; white-space: nowrap; font-family: inherit;
}
.btn:hover { background: #f0f0f0; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: white; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:disabled { background: #a0e0a0; border-color: #a0e0a0; }
.btn-success { background: #34C759; color: white; border-color: #34C759; }
.btn-success:hover { background: #30B350; }
.btn-warning { background: var(--warning); color: var(--text); border-color: var(--warning); font-weight: 600; }
.btn-warning:hover { background: #e6b000; }
.btn-danger { background: var(--danger); color: white; border-color: var(--danger); }
.btn-danger:hover { background: #e04848; }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: #e8f8ee; }
.btn-outline:disabled { color: #ccc; border-color: #ccc; }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-block { width: 100%; }

/* 顶部导航 */
.topbar {
  display: flex; align-items: center; background: var(--white);
  border-bottom: 1px solid var(--border); padding: 0 20px; height: 56px;
  box-shadow: var(--shadow); z-index: 10;
}
.topbar-title { font-size: 16px; font-weight: 700; color: var(--primary); margin-right: 24px; white-space: nowrap; }
.topbar-nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.nav-item {
  padding: 8px 16px; border-radius: 6px; text-decoration: none;
  color: var(--text-secondary); font-size: 13px; white-space: nowrap; transition: all 0.2s;
}
.nav-item:hover { background: #f0f0f0; color: var(--text); }
.nav-item.active { background: var(--primary); color: white; }
.nav-item.hidden { display: none; }
.topbar-user { display: flex; align-items: center; gap: 12px; margin-left: auto; white-space: nowrap; font-size: 13px; }

/* 主界面布局 */
#main-page { flex-direction: column; }
.content { flex: 1; padding: 24px; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }

.tab-content { display: none; }
.tab-content.active { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow-y: auto; }

/* 卡片 */
.card {
  background: var(--white); border-radius: var(--radius); padding: 20px;
  margin-bottom: 16px; box-shadow: var(--shadow);
}
.card h3 { font-size: 16px; margin-bottom: 12px; }
.card h4 { font-size: 14px; margin: 16px 0 8px; color: var(--text-secondary); }
.card hr { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

/* 占位卡片（未开发模块） */
.placeholder-card {
  text-align: center; padding: 40px; color: #999;
}

/* 数据表格 */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
  background: #fafafa; padding: 10px 12px; text-align: left;
  font-weight: 600; border-bottom: 2px solid var(--border); white-space: nowrap;
}
.data-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); }
.data-table tr:hover td { background: #f8f8f8; }

/* 信息网格 */
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 24px; }
.info-item { display: flex; gap: 8px; padding: 4px 0; }
.info-label { color: var(--text-secondary); white-space: nowrap; }
.info-value { font-weight: 500; }

/* 提示消息 */
.msg-success { color: #34C759; font-weight: 500; margin-top: 8px; }
.msg-error { color: var(--danger); font-weight: 500; margin-top: 8px; }

/* 复选框组 */
.checkbox-group { display: flex; flex-wrap: wrap; gap: 8px; }
.checkbox-item {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 12px; background: #f5f5f5; border-radius: 6px; font-size: 13px; cursor: pointer;
}
.checkbox-item input { margin: 0; }

/* 自定义滚动条 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #aaa; }

/* ========== 弹窗（补打选择等） ========== */
.modal-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center; z-index: 1000;
}
.modal-box {
  background: #fff; border-radius: 12px; width: 90%; max-width: 420px;
  padding: 20px; box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}
.modal-title { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.modal-subtitle { font-size: 12px; color: var(--text-secondary); margin-bottom: 14px; }
.modal-body { max-height: 55vh; overflow-y: auto; }
.modal-footer { display: flex; gap: 10px; margin-top: 16px; justify-content: flex-end; }
.modal-footer .btn { min-width: 80px; }

/* ========== 入店三栏面板 ========== */
.checkin-three-col { display: flex; gap: 12px; margin-top: 12px; }
.checkin-panel {
  flex: 1; background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px; min-height: 140px; font-size: 13px; line-height: 1.7;
}
.checkin-panel .panel-empty { color: #999; text-align: center; padding: 40px 0; }
.checkin-ok { color: #07C160; font-weight: 600; margin-top: 8px; }

/* ========== 打条码界面（照搬旧系统布局） ========== */
.label-layout { display: flex; gap: 16px; align-items: flex-start; margin-top: 12px; }
.label-left {
  flex: 0 0 300px; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; font-size: 13px; line-height: 2;
}
.label-left h3 { font-size: 16px; margin-bottom: 10px; color: var(--primary); }
.label-left .btn { margin-top: 14px; width: 100%; }
.label-right { flex: 1; display: flex; gap: 12px; }
.label-photo-column {
  flex: 1; background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px; display: flex; flex-direction: column; min-height: 280px;
}
.photo-col-title {
  font-size: 13px; font-weight: 600; color: var(--text-secondary);
  margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
.photo-col-body { flex: 1; display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; }
.label-col-btns { margin-top: 10px; }

/* 照片槽位 */
.photo-slot {
  width: 80px; height: 80px; border: 1px dashed var(--border); border-radius: 6px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  overflow: hidden; background: #fafafa; transition: all 0.2s;
}
.photo-slot:hover { border-color: var(--primary); }
.photo-slot .slot-text { font-size: 28px; color: #ccc; }
.photo-slot img { width: 100%; height: 100%; object-fit: cover; }
.photo-slot.filled { border-style: solid; border-color: #ddd; }

/* 备注展示 */
.remark-display { display: flex; flex-direction: column; gap: 6px; }
.remark-tags { font-size: 12px; color: #fff; background: var(--primary); padding: 2px 8px; border-radius: 4px; display: inline-block; }
.remark-input {
  width: 100%; min-height: 56px; padding: 8px 10px;
  border: 1px solid var(--border); border-radius: 6px;
  font-size: 13px; resize: vertical; font-family: inherit; outline: none;
  box-sizing: border-box;
}
.remark-input:focus { border-color: var(--primary); }
#label-remark-slots .remark-display { width: 100%; }

/* 摄像头弹窗 */
.camera-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  display: flex; align-items: center; justify-content: center; z-index: 2000; flex-direction: column;
}
.camera-box { text-align: center; }
.camera-box video { width: 560px; max-width: 90vw; border-radius: 8px; background: #000; }
.camera-btns { margin-top: 14px; display: flex; gap: 12px; justify-content: center; }

/* ========== 扫码输入框（扫码框 + 手动框） ========== */
.scan-box {
  position: relative;
  display: flex;
  align-items: center;
}
.scan-box .scan-input {
  width: 100%;
  padding-left: 110px; /* 给左侧「图标 + 扫一扫」占位留空间 */
}
.scan-box .scan-icon-placeholder {
  position: absolute;
  left: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
  color: #999; /* 灰体 */
  font-size: 14px;
  pointer-events: none; /* 不挡输入 */
  white-space: nowrap;
}
.scan-manual-col {
  width: 200px;
  flex: 0 0 200px;
}
.scan-manual-col input {
  width: 100%;
}

/* 大图预览 */
.photo-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.85);
  display: flex; align-items: center; justify-content: center; z-index: 3000; cursor: zoom-out;
}
.photo-overlay img { max-width: 90vw; max-height: 90vh; border-radius: 8px; }

