/* 会议室预约 */
.meeting-main { padding-top: 48px; }

.mt-dates { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 12px; margin-bottom: 8px; }
.mt-date {
  flex: 0 0 auto; min-width: 66px; padding: 10px 12px; border-radius: 14px; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--border-subtle); color: var(--text-2);
  font-family: var(--font-body); text-align: center; transition: border-color .18s, background .18s;
}
.mt-date b { display: block; font-size: 14px; font-weight: 500; }
.mt-date span { font-size: 12px; color: var(--text-4); }
.mt-date:hover { background: var(--surface-3); }
.mt-date.is-active { border-color: var(--brand); background: hsla(219, 99%, 62%, .10); color: var(--brand); }
.mt-date.is-active span { color: var(--brand); opacity: .7; }

.mt-rooms { display: grid; gap: 16px; }
.mt-room { padding: 20px; }
.mt-room:hover { transform: none; }
.mt-room-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.mt-room-head h3 { font-size: 18px; }
.mt-room-meta { margin-top: 4px; font-size: 13.5px; color: var(--text-3); }
.mt-room-head .btn { flex: 0 0 auto; height: 38px; padding: 0 18px; font-size: 14px; }

.mt-timeline { display: flex; gap: 2px; margin: 16px 0 2px; }
.mt-cell {
  flex: 1 1 0; min-width: 0; padding: 0; height: 26px; border: 0; border-radius: 4px; cursor: pointer;
  background: #e6f4ea; transition: background .12s;
}
.mt-cell:hover:not(:disabled) { background: #c9e9d3; }
.mt-cell.is-busy { background: #f3d7d7; cursor: not-allowed; }
.mt-scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-4); margin-bottom: 12px; }

.mt-room-list { display: grid; gap: 4px; font-size: 13.5px; color: var(--text-3); }
.mt-room-list b { color: var(--text-2); font-weight: 500; }
.mt-free { color: var(--text-4); }

.mt-panel { margin-top: 32px; }
.mt-panel h3 { font-size: 16px; margin-bottom: 12px; }
.mt-mine { display: grid; gap: 8px; }
.mt-mine li {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--surface-2); border: 1px solid var(--border-subtle); border-radius: var(--radius-panel);
  padding: 12px 16px; font-size: 14px;
}
.mt-mine-time { font-family: var(--font-mono); font-size: 13px; color: var(--text-3); }
.mt-mine-title { font-weight: 500; }
.mt-mine-room { color: var(--text-4); font-size: 13px; }
.mt-cancel {
  margin-left: auto; background: transparent; border: 1px solid var(--border-subtle); color: var(--text-3);
  border-radius: 100px; padding: 5px 14px; font-size: 13px; cursor: pointer; font-family: var(--font-body);
}
.mt-cancel:hover { border-color: #dc2626; color: #dc2626; }
.mt-empty { color: var(--text-4); font-size: 14px; text-align: center; padding: 20px 0; }
.mt-tip { margin-top: 12px; font-size: 12.5px; color: var(--text-4); }

.mt-modal { position: fixed; inset: 0; z-index: 80; background: rgba(15, 23, 42, .45); display: grid; place-items: center; padding: 20px; }
.mt-modal[hidden] { display: none; }
.mt-modal-card {
  position: relative; width: min(440px, 100%); background: #fff; border-radius: var(--radius-card);
  padding: 26px; box-shadow: 0 30px 80px rgba(15, 23, 42, .3);
}
.mt-modal-card h3 { font-size: 17px; margin-bottom: 16px; }
.mt-modal-close { position: absolute; top: 14px; right: 16px; border: 0; background: transparent; font-size: 22px; line-height: 1; color: var(--text-4); cursor: pointer; }
.mt-field { display: grid; gap: 6px; margin-bottom: 12px; }
.mt-field label { font-size: 13px; color: var(--text-3); }
.mt-field input, .mt-field select, .mt-field textarea {
  width: 100%; background: var(--surface-3); border: 1px solid var(--border-subtle); border-radius: var(--radius-input);
  color: var(--text); font-family: var(--font-body); font-size: 15px; padding: 10px 12px; outline: none; resize: vertical;
}
.mt-field input:focus, .mt-field select:focus, .mt-field textarea:focus { border-color: var(--brand); background: #fff; }
.mt-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mt-actions { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.mt-tip-inline { font-size: 13px; color: var(--brand); }
@media (max-width: 640px) {
  .mt-room-head { flex-direction: column; }
  .mt-room-head .btn { width: 100%; }
  .mt-room { padding: 16px 14px; }
  .mt-timeline { gap: 1px; }
  .mt-cell { height: 30px; }
  .mt-scale { font-size: 10px; }
}

/* ---- 多单位版新增 ---- */
.mt-auth { max-width: 420px; }
.mt-auth h3 { font-size: 17px; margin-bottom: 14px; }
.mt-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; margin-bottom: 18px; font-size: 14px; }
.mt-topbar-actions { display: flex; gap: 8px; }
.mt-cols { display: grid; grid-template-columns: 300px 1fr; gap: 20px; align-items: start; }
.mt-side { padding: 18px; }
.mt-side h3 { font-size: 15px; margin-bottom: 10px; }
.mt-gap { margin-top: 20px; }
.mt-units { display: grid; gap: 6px; }
.mt-unit { display: block; width: 100%; text-align: left; background: var(--surface-3); border: 1px solid var(--border-subtle); border-radius: 10px; padding: 9px 12px; cursor: pointer; font-family: var(--font-body); }
.mt-unit b { font-weight: 500; font-size: 14px; }
.mt-unit span { display: block; font-size: 12px; color: var(--text-4); }
.mt-unit.is-active { border-color: var(--brand); background: hsla(219,99%,62%,.10); }
.mt-inline { display: flex; gap: 8px; margin-bottom: 8px; }
.mt-inline input { flex: 1; min-width: 0; background: var(--surface-3); border: 1px solid var(--border-subtle); border-radius: var(--radius-input); color: var(--text); font-family: var(--font-body); font-size: 14px; padding: 9px 11px; outline: none; }
.mt-inline input:focus { border-color: var(--brand); background: #fff; }
.mt-inline .btn { height: 38px; padding: 0 14px; font-size: 14px; }
.mt-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.mt-panel-head h3 { font-size: 16px; }
.mt-newroom { margin-bottom: 16px; }
.mt-code { font-size: 13px; color: var(--text-3); margin: 10px 0 0; }
.mt-code code { font-family: var(--font-mono); background: var(--surface-3); padding: 2px 7px; border-radius: 6px; }
.mt-copy, .mt-chpw { background: transparent; border: 1px solid var(--border-subtle); border-radius: 100px; color: var(--text-3); font-size: 12.5px; padding: 3px 10px; cursor: pointer; font-family: var(--font-body); margin-left: 4px; }
.mt-copy:hover, .mt-chpw:hover { border-color: var(--brand); color: var(--brand); }
.mt-tip-inline.is-err { color: #dc2626; }
.mt-mine li .mt-cancel { margin-left: auto; }
/* 修复：grid 子项默认 min-width:auto，会被 .mt-dates 的最小内容宽顶爆轨道 */
.mt-cols > *, .mt-rooms > *, .mt-units > * { min-width: 0; }
.mt-dates { min-width: 0; }

@media (max-width: 860px) {
  .mt-cols { grid-template-columns: 1fr; }
  .mt-side { order: 2; }
}
.mt-share { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--surface-3); border: 1px dashed var(--border-strong); border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; font-size: 13.5px; color: var(--text-3); }
.mt-share code { font-family: var(--font-mono); background: #fff; border: 1px solid var(--border-subtle); padding: 2px 8px; border-radius: 6px; color: var(--text); }
.mt-room-head { margin-bottom: 4px; }
/* ---- 登录 / 注册页 ---- */
.mt-auth-main { display: grid; place-items: center; min-height: calc(100vh - 260px); padding: 40px 0; }
.mt-auth-card { width: min(420px, 100%); padding: 30px; }
.mt-auth-title { font-size: 22px; margin-bottom: 8px; }
.mt-auth-sub { color: var(--text-3); font-size: 14px; margin-bottom: 20px; }
.mt-auth-alt { margin-top: 16px; font-size: 14px; color: var(--text-3); }
.mt-auth-alt a { color: var(--brand); }

/* ---- 工作台 ---- */
.mt-home-main { padding-top: 32px; }
.mt-onboard { display: grid; place-items: start center; }
.mt-onboard-card { width: min(520px, 100%); padding: 28px; }
.mt-onboard-card h3 { font-size: 18px; margin-bottom: 10px; }
.mt-hr { border: 0; border-top: 1px solid var(--border-default); margin: 20px 0; }
.mt-unit-card { margin-bottom: 16px; }
.mt-unit-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mt-unit-head h3 { font-size: 18px; }
.mt-unit-meta { margin-top: 6px; font-size: 13.5px; color: var(--text-3); }
.mt-unit-meta code { font-family: var(--font-mono); }
.mt-members { display: grid; gap: 6px; margin-top: 12px; font-size: 13.5px; }
.mt-badge { font-size: 12px; padding: 2px 8px; border-radius: 100px; background: hsla(219,99%,62%,.12); color: var(--brand); }
.mt-badge-dim { background: var(--surface-3); color: var(--text-4); }
.mt-tabs { display: flex; align-items: center; gap: 8px; margin: 18px 0 12px; flex-wrap: wrap; }
.mt-tab { background: transparent; border: 1px solid var(--border-subtle); border-radius: 100px; padding: 7px 16px; font-size: 14px; color: var(--text-3); cursor: pointer; font-family: var(--font-body); }
.mt-tab.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.mt-tab-actions { margin-left: auto; }
.mt-room-ops { display: flex; gap: 8px; margin-top: 10px; }

/* ================= 小程序风格工作台（菜单 / 我的 双 Tab） ================= */
.mp-body { background: #f4f5f7; }
.mp-app { max-width: 520px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; background: #f4f5f7; }
.mp-bar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 12px; background: #fff; border-bottom: 1px solid var(--border-subtle); }
.mp-title { margin: 0; font-family: var(--font-display); font-size: 17px; font-weight: 600; color: var(--text); }
.mp-back { flex: 0 0 auto; width: 34px; height: 34px; margin-left: -6px; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: var(--text); cursor: pointer; }
.mp-back svg { width: 21px; height: 21px; }
.mp-back:hover { background: var(--surface-3); }
.mp-bar-brand { margin-left: auto; font-size: 11.5px; letter-spacing: .06em; color: var(--text-4); }
.mp-view { flex: 1 1 auto; padding: 12px 12px calc(78px + env(safe-area-inset-bottom)); }
.mp-page { display: grid; gap: 12px; }
.mp-loading { padding: 60px 0; text-align: center; color: var(--text-4); font-size: 14px; }

.mp-unitcard { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: #fff; border-radius: var(--radius-panel); border: 1px solid var(--border-subtle); }
.mp-unitcard-ic { flex: 0 0 auto; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: hsla(219,99%,62%,.10); color: var(--brand); }
.mp-unitcard-ic svg { width: 22px; height: 22px; }
.mp-unitcard-txt { min-width: 0; display: grid; gap: 2px; }
.mp-unitcard-txt b { font-size: 15.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-unitcard-txt span { font-size: 12.5px; color: var(--text-4); }
.mp-switch { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 3px; height: 30px; padding: 0 10px; border: 1px solid var(--border-subtle); border-radius: 100px; background: #fff; color: var(--text-2); font-family: var(--font-body); font-size: 12.5px; cursor: pointer; }
.mp-switch svg { width: 14px; height: 14px; }
.mp-switch:hover { border-color: var(--brand); color: var(--brand); }

.mp-hero { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 16px 18px 20px; border-radius: var(--radius-panel); background: linear-gradient(135deg, #4d6bfe 0%, #6d86ff 60%, #8ba0ff 100%); box-shadow: 0 12px 28px rgba(77,107,254,.22); }
.mp-hero-txt { min-width: 0; color: #fff; }
.mp-hero-txt b { display: block; font-size: 15px; font-weight: 600; margin-bottom: 6px; opacity: .95; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-hero-txt span { font-size: 13px; line-height: 1.6; opacity: .88; }
.mp-hero-art { flex: 0 0 auto; width: 118px; height: 76px; }

.mp-section { margin: 6px 2px -2px; font-size: 13px; color: var(--text-4); }
.mp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 14px 4px; background: #fff; border-radius: var(--radius-panel); border: 1px solid var(--border-subtle); }
.mp-cell { display: grid; justify-items: center; align-content: start; gap: 6px; padding: 10px 2px 8px; border: 0; border-radius: 12px; background: transparent; font-family: var(--font-body); cursor: pointer; }
.mp-cell:hover { background: var(--surface-3); }
.mp-cell-ic { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: hsla(219,99%,62%,.10); color: var(--brand); }
.mp-cell-ic svg { width: 22px; height: 22px; }
.mp-cell-label { font-size: 12.5px; color: var(--text-2); line-height: 1.25; text-align: center; }
.mp-cell.is-soon .mp-cell-ic { background: var(--surface-3); color: var(--text-4); }
.mp-cell.is-soon .mp-cell-label { color: var(--text-4); }
.mp-cell-soon { font-size: 10px; line-height: 1; padding: 3px 7px; border-radius: 100px; background: var(--surface-3); color: var(--text-4); }

.mp-profile { display: flex; align-items: center; gap: 14px; padding: 20px 16px; background: #fff; border-radius: var(--radius-panel); border: 1px solid var(--border-subtle); }
.mp-avatar { flex: 0 0 auto; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(135deg,#4d6bfe,#8ba0ff); color: #fff; font-size: 22px; font-weight: 600; }
.mp-profile-txt { min-width: 0; display: grid; gap: 3px; }
.mp-profile-txt b { font-size: 17px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-profile-txt span { font-size: 12.5px; color: var(--text-4); }
.mp-mini { flex: 0 0 auto; height: 30px; padding: 0 12px; border: 1px solid var(--border-subtle); border-radius: 100px; background: #fff; color: var(--text-2); font-family: var(--font-body); font-size: 12.5px; cursor: pointer; }
.mp-mini:hover { border-color: var(--brand); color: var(--brand); }
.mp-mini.is-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.mp-profile .mp-mini { margin-left: auto; }

.mp-list { background: #fff; border-radius: var(--radius-panel); border: 1px solid var(--border-subtle); overflow: hidden; }
.mp-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border: 0; border-bottom: 1px solid var(--border-default); background: transparent; font-family: var(--font-body); text-align: left; cursor: pointer; }
.mp-row:last-child { border-bottom: 0; }
.mp-row:hover { background: var(--surface-3); }
.mp-row-ic { flex: 0 0 auto; width: 22px; height: 22px; color: var(--brand); }
.mp-row-ic svg { width: 20px; height: 20px; }
.mp-row-label { flex: 1 1 auto; min-width: 0; font-size: 14.5px; color: var(--text); }
.mp-row-val { flex: 0 0 auto; font-size: 13px; color: var(--text-4); }
.mp-row-arrow { flex: 0 0 auto; width: 16px; height: 16px; color: var(--text-4); }
.mp-row-arrow svg { width: 15px; height: 15px; }

.mp-logout { width: 100%; height: 48px; margin-top: 4px; border: 1px solid rgba(220,38,38,.25); border-radius: var(--radius-panel); background: #fff; color: #dc2626; font-family: var(--font-body); font-size: 15px; cursor: pointer; }
.mp-logout:hover { background: rgba(220,38,38,.06); }
.mp-copyright { margin: 6px 0 0; text-align: center; font-size: 11.5px; color: var(--text-4); }

.mp-block { padding: 18px 16px; }
.mp-block h3 { font-size: 15.5px; margin-bottom: 10px; }
.mp-block p { font-size: 13.5px; line-height: 1.75; color: var(--text-2); margin: 0 0 8px; }
.mp-block p:last-child { margin-bottom: 0; }
.mp-ctx { padding: 10px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--border-subtle); font-size: 13px; color: var(--text-3); }
.mp-ctx b { color: var(--text); }
.mp-kv { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border-default); font-size: 14px; }
.mp-kv:last-child { border-bottom: 0; }
.mp-kv > span { flex: 0 0 76px; color: var(--text-4); font-size: 13px; }
.mp-kv > b { flex: 1 1 auto; min-width: 0; font-weight: 500; word-break: break-all; }
.mp-kv > .mp-mini { margin-left: auto; }
.mp-mono { font-family: var(--font-mono); font-size: 13.5px; }
.mp-count { display: inline-block; margin-left: 4px; padding: 1px 8px; border-radius: 100px; background: var(--surface-3); color: var(--text-3); font-size: 12px; font-weight: 400; }
.mp-share { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.mp-share code { flex: 0 0 auto; font-family: var(--font-mono); font-size: 17px; letter-spacing: .1em; color: var(--brand); }
.mp-share .mp-mini:first-of-type { margin-left: auto; }
.mp-room-ops { display: flex; gap: 8px; margin-top: 12px; }
.mp-booking-for { margin-bottom: 12px; font-size: 13.5px; color: var(--text-3); }

.mp-tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; max-width: 520px; margin: 0 auto; padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-top: 1px solid var(--border-subtle); }
.mp-tabbar[hidden] { display: none; }
.mp-tab { flex: 1 1 0; min-width: 0; display: grid; justify-items: center; gap: 2px; padding: 4px 0; color: var(--text-4); font-size: 11.5px; text-decoration: none; }
.mp-tab svg { width: 23px; height: 23px; }
.mp-tab.is-active { color: var(--brand); }

.mp-modal { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; justify-content: center; background: rgba(15,23,42,.42); }
.mp-modal[hidden] { display: none; }
.mp-sheet { width: 100%; max-width: 520px; max-height: 86vh; overflow-y: auto; background: #fff; border-radius: 18px 18px 0 0; padding: 16px 18px calc(20px + env(safe-area-inset-bottom)); animation: mpUp .22s ease-out; }
@keyframes mpUp { from { transform: translateY(14px); opacity: .6; } to { transform: none; opacity: 1; } }
.mp-sheet-head { display: flex; align-items: center; margin-bottom: 14px; }
.mp-sheet-head b { font-size: 16px; font-weight: 600; }
.mp-sheet-close { margin-left: auto; width: 30px; height: 30px; border: 0; border-radius: 50%; background: var(--surface-3); color: var(--text-3); font-size: 18px; line-height: 1; cursor: pointer; }
.mp-units { display: grid; gap: 8px; margin: 0 0 14px; }
.mp-unit-row { position: relative; display: grid; gap: 3px; width: 100%; padding: 12px 40px 12px 14px; border: 1px solid var(--border-subtle); border-radius: 14px; background: #fff; font-family: var(--font-body); text-align: left; cursor: pointer; }
.mp-unit-row b { font-size: 14.5px; font-weight: 600; }
.mp-unit-row span { font-size: 12.5px; color: var(--text-4); }
.mp-unit-row.is-active { border-color: var(--brand); background: hsla(219,99%,62%,.06); }
.mp-check { position: absolute; right: 14px; top: 50%; width: 18px; height: 18px; margin-top: -9px; color: var(--brand); }
.mp-check svg { width: 18px; height: 18px; }
.mp-sheet-actions { display: flex; gap: 10px; }
.mp-sheet-actions .btn { flex: 1 1 0; }
.mp-about { text-align: center; }
.mp-about-logo { font-size: 17px; font-weight: 600; margin-bottom: 10px; }
.mp-about p { font-size: 13px; color: var(--text-3); margin: 0 0 6px; }

.mp-toast { position: fixed; left: 50%; bottom: 92px; z-index: 90; transform: translate(-50%, 8px); max-width: 78vw; padding: 10px 16px; border-radius: 100px; background: rgba(24,28,36,.88); color: #fff; font-size: 13.5px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.mp-toast.is-show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 400px) {
  .mp-hero-art { width: 96px; height: 62px; }
  .mp-cell-ic { width: 42px; height: 42px; }
  .mp-cell-label { font-size: 12px; }
  .mp-cell-soon { font-size: 9.5px; padding: 2px 6px; }
}
