/* ============================================================
   style.css — 会议室预约小程序样式（企微风格 v2）
   ============================================================ */
:root {
  --green: #07c160;
  --green-light: #e8f8ef;
  --green-dark: #06ad56;
  --green-gradient: linear-gradient(135deg, #07c160 0%, #06ad56 100%);
  --blue: #10aeff;
  --blue-light: #e8f4ff;
  --orange: #ff976a;
  --yellow: #fa8c16;
  --yellow-light: #fff7e6;
  --red: #ee0a24;
  --gray-bg: #f5f6f8;
  --gray-border: #ebedf0;
  --text-main: #1a1a1a;
  --text-sub: #5a5a5a;
  --text-dim: #9a9a9a;
  --white: #ffffff;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-hover: 0 4px 20px rgba(0,0,0,0.10);
  --shadow-card: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-fab: 0 6px 16px rgba(7,193,96,0.35);
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Helvetica Neue', sans-serif;
  background: var(--gray-bg);
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#app { min-height: 100vh; padding-bottom: 0; }
#app.no-tabbar { padding-bottom: 0; }

/* ===== Toast ===== */
.toast {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%);
  background: rgba(0,0,0,0.8); color: #fff; padding: 12px 24px;
  border-radius: 10px; font-size: 14px; z-index: 9999;
  display: none; max-width: 260px; text-align: center;
  backdrop-filter: blur(8px);
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  z-index: 9000; display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.modal-box {
  background: #fff; border-radius: 16px; width: 80%; max-width: 320px;
  overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  animation: modalIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes modalIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.modal-title { padding: 22px 20px 8px; font-size: 17px; font-weight: 600; text-align: center; }
.modal-body { padding: 0 20px 20px; font-size: 14px; color: var(--text-sub); text-align: center; }
.modal-actions { display: flex; border-top: 1px solid var(--gray-border); }
.modal-actions button { flex: 1; border: none; padding: 15px 0; font-size: 16px; background: none; cursor: pointer; transition: background 0.15s; }
.modal-actions button:active { background: var(--gray-bg); }
.btn-cancel { color: var(--text-sub); border-right: 1px solid var(--gray-border); }
.btn-confirm { color: var(--green); font-weight: 600; }

/* ===== Nav Bar ===== */
.nav-bar {
  background: var(--green-gradient); color: #fff;
  padding: 48px 20px 14px; position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 12px rgba(7,193,96,0.2);
}
.nav-bar h1 { font-size: 18px; font-weight: 600; letter-spacing: 0.5px; }
.nav-bar .subtitle { font-size: 12px; opacity: 0.85; margin-top: 3px; }
.nav-bar .nav-back {
  position: absolute; left: 16px; top: 48px; font-size: 22px;
  color: #fff; text-decoration: none; line-height: 1; padding: 4px 8px;
  cursor: pointer;
}

/* ===== TabBar ===== */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(255,255,255,0.95); backdrop-filter: blur(20px);
  border-top: 1px solid var(--gray-border);
  display: flex; z-index: 100; padding-bottom: env(safe-area-inset-bottom);
}
.tabbar-item {
  flex: 1; text-align: center; padding: 7px 0 20px;
  color: var(--text-dim); cursor: pointer; transition: color 0.2s;
}
.tabbar-item.active { color: var(--green); }
.tabbar-item .icon { font-size: 22px; display: block; line-height: 1.2; }
.tabbar-item .label { font-size: 10px; margin-top: 2px; }

/* ===== Login ===== */
.login-page {
  min-height: 100vh; background: linear-gradient(160deg, #07c160 0%, #06ad56 35%, #f5f6f8 35%);
  display: flex; flex-direction: column; align-items: center;
}
.login-logo {
  margin-top: 90px; width: 76px; height: 76px; border-radius: 18px;
  background: rgba(255,255,255,0.25); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  font-size: 38px; box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}
.login-title { color: #fff; font-size: 22px; font-weight: 600; margin-top: 16px; letter-spacing: 1px; }
.login-desc { color: rgba(255,255,255,0.85); font-size: 13px; margin-top: 6px; }
.login-card {
  width: 88%; max-width: 340px; background: #fff; border-radius: 20px;
  padding: 28px 20px; margin-top: 40px; box-shadow: 0 8px 32px rgba(0,0,0,0.08);
}
.login-card h3 { font-size: 17px; margin-bottom: 18px; text-align: center; color: var(--text-main); }
.login-user-list { max-height: 320px; overflow-y: auto; }
.login-user-item {
  display: flex; align-items: center; padding: 13px; border-radius: 12px;
  cursor: pointer; transition: var(--transition); border: 1.5px solid var(--gray-border);
  margin-bottom: 10px;
}
.login-user-item:hover { background: var(--green-light); border-color: var(--green); transform: translateY(-1px); box-shadow: var(--shadow-card); }
.login-user-avatar {
  width: 40px; height: 40px; border-radius: 50%; background: var(--green-gradient);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 500; flex-shrink: 0;
}
.login-user-info { margin-left: 12px; flex: 1; }
.login-user-info .name { font-size: 15px; font-weight: 500; }
.login-user-info .dept { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.login-user-role {
  font-size: 11px; padding: 3px 10px; border-radius: 6px;
  background: var(--green-light); color: var(--green); font-weight: 500;
}

/* ===== Date Selector (dashboard) ===== */
.date-selector {
  display: flex; gap: 8px; padding: 12px 16px; overflow-x: auto;
  background: #fff; border-bottom: 1px solid var(--gray-border);
  scrollbar-width: none;
}
.date-selector::-webkit-scrollbar { display: none; }
.date-item {
  flex-shrink: 0; width: 54px; text-align: center; padding: 10px 0;
  border-radius: 10px; cursor: pointer; border: 1.5px solid transparent;
  transition: var(--transition);
}
.date-item.active { background: var(--green-gradient); color: #fff; box-shadow: 0 3px 10px rgba(7,193,96,0.3); }
.date-item .weekday { font-size: 11px; opacity: 0.8; }
.date-item .day { font-size: 19px; font-weight: 700; margin-top: 2px; }
.date-item .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--green); margin: 2px auto 0; }
.date-item.active .dot { background: #fff; }

/* ===== Calendar (booking page) ===== */
.calendar-wrap { background: #fff; padding: 6px 0 10px; }
.calendar-month {
  padding: 0 16px; border-bottom: 1px solid #f5f5f5;
}
.calendar-month:last-child { border-bottom: none; }
.calendar-month-header {
  font-size: 16px; font-weight: 600; padding: 14px 0 10px;
  color: var(--text-main); display: flex; align-items: center; gap: 6px;
  cursor: pointer; user-select: none;
}
.calendar-month-header .cal-arrow {
  display: inline-block; width: 16px; font-size: 12px; color: var(--text-dim);
  transition: transform 0.2s;
}
.calendar-month-header .year-tag {
  font-size: 13px; font-weight: 400; color: var(--text-dim);
}
.calendar-weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr); text-align: center;
  font-size: 11px; color: var(--text-dim); padding: 4px 0;
}
.calendar-days {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px;
}
.cal-day {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  font-size: 14px; border-radius: 10px; cursor: pointer; position: relative;
  transition: background 0.15s;
}
.cal-day:hover { background: var(--green-light); }
.cal-day.other-month { color: var(--gray-border); cursor: default; }
.cal-day.other-month:hover { background: transparent; }
.cal-day.disabled {
  color: var(--text-dim); opacity: 0.3; cursor: not-allowed;
}
.cal-day.disabled:hover { background: transparent; }
.cal-day.today {
  color: var(--green); font-weight: 700;
}
.cal-day.today::after {
  content: ""; position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: var(--green);
}
.cal-day.selected {
  background: var(--green-gradient); color: #fff; font-weight: 600;
  box-shadow: 0 2px 8px rgba(7,193,96,0.35);
}
.cal-day.selected::after { background: #fff; }
.cal-day.weekend:not(.disabled):not(.selected) { color: var(--text-sub); }

/* Calendar collapse */
.calendar-month .calendar-body {
  overflow: hidden; transition: max-height 0.3s ease, opacity 0.25s ease;
  max-height: 500px; opacity: 1;
}
.calendar-month.collapsed .calendar-body {
  max-height: 0; opacity: 0;
}

/* ===== Room Card ===== */
.room-card {
  background: #fff; margin: 10px 16px; border-radius: var(--radius-lg);
  padding: 16px; box-shadow: var(--shadow-card); cursor: pointer;
  transition: var(--transition); position: relative; overflow: hidden;
}
.room-card:active { transform: scale(0.98); }
.room-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  border-radius: 0 4px 4px 0;
}
.room-card.status-free::before { background: var(--green); }
.room-card.status-busy::before { background: var(--yellow); }
.room-card.status-booked::before { background: var(--blue); }
.room-card.status-maintenance::before { background: var(--text-dim); }

.room-card-header { display: flex; justify-content: space-between; align-items: center; }
.room-card-header .name { font-size: 16px; font-weight: 600; }
.room-card-header .meta { font-size: 12px; color: var(--text-dim); margin-top: 4px; }
.status-tag { font-size: 11px; padding: 4px 12px; border-radius: 14px; font-weight: 500; }
.status-free { background: var(--green-light); color: var(--green); }
.status-busy { background: var(--yellow-light); color: var(--yellow); }
.status-booked { background: var(--blue-light); color: var(--blue); }
.status-maintenance { background: #f0f0f0; color: var(--text-dim); }

/* Timeline bar */
.timeline-bar {
  position: relative; height: 32px; margin-top: 12px;
  background: linear-gradient(to right, #f7f8fa, #f0f2f5, #f7f8fa); border-radius: 8px; overflow: hidden;
}
.timeline-block {
  position: absolute; top: 0; height: 100%; border-radius: 6px;
  font-size: 10px; color: #fff; display: flex; align-items: center;
  justify-content: center; padding: 0 4px; overflow: hidden; white-space: nowrap;
  background: linear-gradient(135deg, #10aeff, #0a8fe0);
}
.timeline-now {
  position: absolute; top: -3px; bottom: -3px; width: 2px;
  background: var(--red); z-index: 2; border-radius: 1px;
  box-shadow: 0 0 6px rgba(238,10,36,0.5);
}
.timeline-labels {
  display: flex; justify-content: space-between; font-size: 10px;
  color: var(--text-dim); margin-top: 5px; padding: 0 1px;
}

/* ===== FAB ===== */
.fab {
  position: fixed; right: 20px; bottom: 84px; width: 54px; height: 54px;
  border-radius: 50%; background: var(--green-gradient); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; box-shadow: var(--shadow-fab);
  cursor: pointer; z-index: 50; border: none; line-height: 1;
  transition: var(--transition);
}
.fab:active { transform: scale(0.92); }

/* ===== Section ===== */
.section { background: #fff; margin: 10px 16px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-card); }
.section-title { font-size: 16px; font-weight: 600; padding: 16px 16px 8px; }

/* ===== Form ===== */
.form-group { padding: 0 16px; }
.form-item {
  display: flex; align-items: center; padding: 14px 0;
  border-bottom: 1px solid var(--gray-border);
}
.form-item:last-child { border-bottom: none; }
.form-item .label { width: 80px; font-size: 14px; color: var(--text-sub); flex-shrink: 0; }
.form-item .label .req { color: var(--red); margin-right: 2px; }
.form-item input, .form-item textarea, .form-item select {
  flex: 1; border: none; outline: none; font-size: 14px;
  background: transparent; font-family: inherit; resize: none;
}
.form-item input::placeholder { color: var(--text-dim); }
.form-item .value { flex: 1; font-size: 14px; }
.form-item .arrow { color: var(--text-dim); font-size: 14px; }

/* Room Picker */
.room-picker { display: flex; gap: 10px; padding: 12px 16px; overflow-x: auto; scrollbar-width: none; }
.room-picker::-webkit-scrollbar { display: none; }
.room-pick-item {
  flex-shrink: 0; min-width: 112px; padding: 12px 14px; border-radius: 12px;
  border: 2px solid var(--gray-border); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  transition: var(--transition); background: #fff;
}
.room-pick-item:hover { border-color: var(--green); transform: translateY(-2px); box-shadow: var(--shadow-card); }
.room-pick-item.selected { border-color: var(--green); background: var(--green-light); box-shadow: 0 3px 12px rgba(7,193,96,0.15); }
.room-pick-item .rname { font-size: 14px; font-weight: 600; }
.room-pick-item .rcap { font-size: 11px; color: var(--text-sub); }
.room-pick-item .rcap::before { content: "容纳 "; }
.room-pick-item .rstatus { font-size: 10px; padding: 2px 9px; border-radius: 10px; font-weight: 500; margin-top: 1px; }
.room-pick-item .rstatus.status-free { background: var(--green-light); color: var(--green); }
.room-pick-item .rstatus.status-busy { background: var(--yellow-light); color: var(--yellow); }
.room-pick-item .rstatus.status-booked { background: var(--blue-light); color: var(--blue); }
.room-pick-item .rstatus.status-maintenance { background: #f0f0f0; color: var(--text-dim); }

/* Time Scale (above time grid) */
.time-scale {
  display: flex; justify-content: space-between; padding: 10px 16px 0;
  font-size: 10px; color: var(--text-dim); font-weight: 500;
}
.time-scale span { position: relative; }
.time-scale span:not(:first-child)::before {
  content: ""; position: absolute; left: -50%; top: -4px;
  width: 1px; height: 4px; background: var(--gray-border);
}

/* Time Grid */
.time-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; padding: 10px 16px 12px; }
.time-slot {
  padding: 11px 0; text-align: center; border-radius: 10px;
  border: 1.5px solid var(--gray-border); font-size: 13px; cursor: pointer;
  transition: var(--transition); background: #fff; color: var(--text-main); font-weight: 500;
}
.time-slot:hover { border-color: var(--green); color: var(--green); background: var(--green-light); }
.time-slot.selected { background: var(--green-gradient); color: #fff; border-color: transparent; box-shadow: 0 2px 8px rgba(7,193,96,0.3); }
.time-slot.end-marker {
  background: #fff !important;
  border: 2px solid var(--green) !important;
  color: var(--green) !important;
  font-weight: 600;
  box-shadow: none !important;
}
.time-slot.disabled {
  background: #f7f8fa; color: var(--text-dim); border-color: var(--gray-border);
  cursor: not-allowed; text-decoration: line-through; opacity: 0.6;
}
.time-slot.disabled:hover { border-color: var(--gray-border); color: var(--text-dim); background: #f7f8fa; }
.time-selected-info {
  padding: 10px 16px; font-size: 13px; color: var(--green);
  background: var(--green-light); margin: 0 16px; border-radius: 10px;
  font-weight: 500;
}

/* Conflict Alert */
.conflict-alert {
  margin: 8px 16px; padding: 12px 14px; border-radius: 10px;
  background: #fef0f0; border: 1px solid #fde2e2; font-size: 13px;
  color: var(--red); display: flex; align-items: flex-start; gap: 6px;
}

/* ===== Button ===== */
.btn {
  display: block; width: calc(100% - 32px); margin: 20px auto;
  padding: 14px 0; text-align: center; border-radius: var(--radius);
  font-size: 16px; border: none; cursor: pointer; font-weight: 600;
  transition: var(--transition);
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--green-gradient); color: #fff; box-shadow: 0 3px 12px rgba(7,193,96,0.3); }
.btn-primary:disabled { background: #c8c9cc; box-shadow: none; }
.btn-outline { background: #fff; color: var(--green); border: 1.5px solid var(--green); }
.btn-danger { background: #fff; color: var(--red); border: 1.5px solid var(--red); }

/* ===== Tab Filter ===== */
.tab-filter {
  display: flex; background: #fff; padding: 0 16px;
  border-bottom: 1px solid var(--gray-border);
}
.tab-filter-item {
  flex: 1; text-align: center; padding: 13px 0; font-size: 14px;
  color: var(--text-sub); cursor: pointer; position: relative; transition: color 0.2s;
}
.tab-filter-item.active { color: var(--green); font-weight: 600; }
.tab-filter-item.active::after {
  content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 28px; height: 3px; background: var(--green-gradient); border-radius: 2px;
}

/* ===== Reservation Card ===== */
.res-card {
  background: #fff; margin: 10px 16px; border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow-card); cursor: pointer;
  transition: var(--transition);
}
.res-card:active { transform: scale(0.98); }
.res-card .res-header { display: flex; justify-content: space-between; align-items: center; }
.res-card .res-topic { font-size: 15px; font-weight: 600; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-card .res-meta { font-size: 12px; color: var(--text-dim); margin-top: 10px; }
.res-card .res-meta span { margin-right: 14px; }
.res-card .res-time { font-size: 13px; color: var(--text-sub); margin-top: 5px; }

/* ===== Stats ===== */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px 16px; }
.stats-card {
  background: #fff; border-radius: var(--radius); padding: 18px; text-align: center;
  box-shadow: var(--shadow-card);
}
.stats-card .v { font-size: 30px; font-weight: 700; color: var(--green); }
.stats-card .l { font-size: 12px; color: var(--text-dim); margin-top: 5px; }

.bar-row { display: flex; align-items: center; padding: 7px 16px; gap: 10px; }
.bar-row .bar-label { width: 72px; font-size: 13px; flex-shrink: 0; }
.bar-row .bar-track { flex: 1; height: 22px; background: #f0f2f5; border-radius: 6px; overflow: hidden; }
.bar-row .bar-fill { height: 100%; background: var(--green-gradient); border-radius: 6px; display: flex; align-items: center; justify-content: flex-end; padding-right: 8px; font-size: 11px; color: #fff; min-width: 32px; font-weight: 500; }

/* ===== Room Detail ===== */
.room-detail-header { background: var(--green-gradient); padding: 28px 16px 20px; text-align: center; color: #fff; }
.room-detail-header .name { font-size: 20px; font-weight: 600; }
.room-detail-header .subtitle { font-size: 13px; opacity: 0.85; margin-top: 5px; }
.info-row { display: flex; justify-content: space-around; padding: 18px; background: #fff; }
.info-stat { text-align: center; }
.info-stat .v { font-size: 22px; font-weight: 700; color: var(--text-main); }
.info-stat .l { font-size: 12px; color: var(--text-dim); margin-top: 3px; }
.equip-tags { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 16px 14px; }
.equip-tag { font-size: 12px; padding: 5px 12px; background: var(--green-light); color: var(--green); border-radius: 6px; font-weight: 500; }

/* ===== Detail Page ===== */
.detail-section { background: #fff; margin: 10px 16px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-card); }
.detail-row { display: flex; padding: 14px 16px; border-bottom: 1px solid var(--gray-border); }
.detail-row:last-child { border-bottom: none; }
.detail-row .dl { width: 80px; color: var(--text-dim); font-size: 14px; flex-shrink: 0; }
.detail-row .dr { flex: 1; font-size: 14px; word-break: break-all; }

/* Status Banner */
.status-banner { padding: 16px; text-align: center; font-size: 15px; font-weight: 600; }
.status-banner.passed { background: var(--green-light); color: var(--green); }
.status-banner.pending { background: var(--yellow-light); color: var(--orange); }
.status-banner.rejected { background: #fef0f0; color: var(--red); }
.status-banner.cancelled { background: #f7f8fa; color: var(--text-dim); }
.status-banner.ended { background: #f0f0f0; color: var(--text-dim); }

/* ===== Admin ===== */
.admin-entry { margin: 10px 16px; }
.admin-entry-item {
  background: #fff; border-radius: var(--radius); padding: 16px;
  margin-bottom: 10px; display: flex; align-items: center; cursor: pointer;
  box-shadow: var(--shadow-card); transition: var(--transition);
}
.admin-entry-item:active { transform: scale(0.98); }
.admin-entry-item .icon { font-size: 22px; margin-right: 14px; }
.admin-entry-item .text { flex: 1; font-size: 15px; font-weight: 500; }
.admin-entry-item .arrow { color: var(--text-dim); }

/* ===== Empty ===== */
.empty-state { text-align: center; padding: 70px 0; color: var(--text-dim); }
.empty-state .icon { font-size: 52px; opacity: 0.6; }
.empty-state .text { font-size: 14px; margin-top: 14px; }

/* ===== Switch ===== */
.switch { position: relative; width: 46px; height: 26px; }
.switch input { display: none; }
.switch-slider {
  position: absolute; inset: 0; background: #dcdee0; border-radius: 13px;
  cursor: pointer; transition: background 0.2s;
}
.switch-slider::before {
  content: ''; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px;
  background: #fff; border-radius: 50%; transition: transform 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.switch input:checked + .switch-slider { background: var(--green); }
.switch input:checked + .switch-slider::before { transform: translateX(20px); }

/* ===== Config Item ===== */
.config-item {
  display: flex; align-items: center; padding: 14px 16px;
  border-bottom: 1px solid var(--gray-border);
}
.config-item:last-child { border-bottom: none; }
.config-item .ck { flex: 1; }
.config-item .ck .key { font-size: 14px; font-weight: 500; }
.config-item .ck .desc { font-size: 12px; color: var(--text-dim); margin-top: 3px; }
.config-item .cv { font-size: 14px; color: var(--green); font-weight: 600; }

/* Scroll container */
.scroll-content { padding-bottom: 80px; }

/* ===== Animations ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.room-card, .res-card, .stats-card, .admin-entry-item, .section, .detail-section {
  animation: fadeInUp 0.3s ease;
}

/* ============================================================
   PC端 / 宽屏适配 (企微桌面端)
   ============================================================ */

/* ===== 768px+ 平板/企微桌面窄窗 ===== */
@media (min-width: 768px) {
  /* Container */
  #app {
    max-width: 1100px;
    margin: 0 auto;
    box-shadow: 0 0 60px rgba(0,0,0,0.08);
    min-height: 100vh;
    position: relative;
  }

  /* Nav bar */
  .nav-bar {
    padding: 22px 32px 16px;
    border-radius: 0;
  }
  .nav-bar .nav-back {
    top: 22px;
    left: 24px;
  }

  /* TabBar — 跟随容器宽度居中 */
  .tabbar {
    max-width: 1100px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -2px 16px rgba(0,0,0,0.06);
  }

  /* FAB — 跟随容器右边缘 */
  .fab {
    right: max(20px, calc(50% - 530px));
    bottom: 90px;
  }

  /* ===== Login ===== */
  .login-page {
    background: linear-gradient(160deg, #07c160 0%, #06ad56 30%, #f5f6f8 30%);
    padding-bottom: 60px;
  }
  .login-logo { margin-top: 60px; }
  .login-card {
    max-width: 440px;
    padding: 32px 28px;
  }
  .login-user-list {
    max-height: 380px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .login-user-item { margin-bottom: 0; }

  /* ===== Dashboard 看板 ===== */
  .date-selector {
    padding: 14px 32px;
    gap: 10px;
  }
  .date-item { width: 60px; }

  #room-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 12px 20px;
  }
  #room-list .room-card {
    margin: 0;
  }

  /* ===== Booking 预约页 — 左右分栏 ===== */
  .booking-layout {
    display: flex;
    gap: 20px;
    padding: 0 20px;
  }
  .booking-left {
    width: 360px;
    flex-shrink: 0;
    position: sticky;
    top: 10px;
    align-self: flex-start;
  }
  .booking-right {
    flex: 1;
    min-width: 0;
  }

  /* Calendar 在分栏里更紧凑 */
  .calendar-wrap {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    overflow: hidden;
  }
  .calendar-month { padding: 0 14px; }
  .cal-day { font-size: 13px; }

  /* Room picker — 网格 */
  .room-picker {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    overflow: visible;
    padding: 12px 0;
  }

  /* Time grid — 6列 */
  .time-grid {
    grid-template-columns: repeat(6, 1fr);
    padding: 10px 0 12px;
  }
  .time-scale { padding: 10px 0 0; }

  /* Form */
  .booking-right .section { margin: 10px 0; }
  .booking-right .section-title { padding-left: 0; }
  .btn { width: 100%; margin: 20px 0; }

  /* ===== Mine 我的预约 ===== */
  #res-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 12px 20px;
  }
  #res-list .res-card { margin: 0; }

  .admin-entry {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 0 20px;
  }
  .admin-entry .admin-entry-item { margin-bottom: 0; }

  /* ===== Stats 统计 ===== */
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
    padding: 12px 20px;
  }
  .section-title { padding-left: 20px; }
  .bar-row { padding: 8px 20px; }
  .bar-row .bar-label { width: 90px; }

  /* ===== Room Detail ===== */
  .room-detail-header { padding: 36px 20px 28px; }
  .info-row { padding: 24px 20px; }
  .info-stat .v { font-size: 26px; }
  .equip-tags { padding: 0 20px 18px; }
  .detail-section { margin: 10px 20px; }

  /* ===== Admin pages ===== */
  .config-item { padding: 16px 20px; }

  /* Modal */
  .modal-box { max-width: 420px; }

  /* Scroll content */
  .scroll-content { padding-bottom: 100px; }
  .scroll-content:not(.booking-layout) { padding-left: 0; padding-right: 0; }
}

/* ===== 1024px+ 宽屏桌面 ===== */
@media (min-width: 1024px) {
  #app { max-width: 1200px; }
  .tabbar { max-width: 1200px; }
  .fab { right: max(20px, calc(50% - 580px)); }

  /* Time grid — 9列一行排满 */
  .time-grid { grid-template-columns: repeat(9, 1fr); }

  /* Room picker — 4列 */
  .room-picker { grid-template-columns: repeat(4, 1fr); }

  /* Booking left panel wider */
  .booking-left { width: 400px; }

  /* Stats cards bigger */
  .stats-card { padding: 24px; }
  .stats-card .v { font-size: 36px; }
}
