/* ===== 婚礼宾客管家 · 主题样式 ===== */
:root {
  --bg: #faf5ef;
  --card: #ffffff;
  --ink: #40323a;
  --muted: #9a8a90;
  --rose: #b23a5f;
  --rose-dark: #962e4f;
  --rose-light: #fbe9ee;
  --gold: #c8a45d;
  --gold-light: #f6edda;
  --green: #4a8f68;
  --green-light: #e6f2ec;
  --amber: #c07f2d;
  --amber-light: #faf0e0;
  --gray: #8d868b;
  --gray-light: #f0ecee;
  --line: #efe4e0;
  --radius: 14px;
  --shadow: 0 2px 14px rgba(140, 70, 90, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[v-cloak] { display: none; }

body {
  background: var(--bg);
  background-image: radial-gradient(rgba(200, 164, 93, 0.06) 1px, transparent 1px);
  background-size: 22px 22px;
  color: var(--ink);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

h1, h3 { font-family: "Noto Serif SC", "Songti SC", "SimSun", serif; }

/* ===== 登录页 ===== */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-card {
  background: var(--card); border-radius: 20px; box-shadow: var(--shadow);
  padding: 48px 44px; width: 360px; text-align: center;
  border-top: 4px solid var(--rose);
}
.login-ring { font-size: 44px; margin-bottom: 8px; }
.login-card h1 { font-size: 26px; color: var(--rose); letter-spacing: 2px; }
.login-sub { color: var(--muted); margin: 6px 0 24px; font-size: 13px; letter-spacing: 1px; }
.login-card input {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 14px; outline: none; margin-bottom: 10px; background: #fffdfa;
}
.login-card input:focus { border-color: var(--rose); }
.login-error { color: var(--rose); font-size: 13px; margin-bottom: 8px; }

/* ===== 顶栏 ===== */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 18px;
  background: rgba(255, 253, 250, 0.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  padding: 10px 28px;
}
.brand { font-family: "Noto Serif SC", serif; font-size: 18px; font-weight: 700; color: var(--rose); white-space: nowrap; }
.brand-ring { font-size: 16px; }
.tabs { display: flex; gap: 6px; flex: 1; }
.tabs button {
  border: none; background: transparent; padding: 8px 16px; border-radius: 999px;
  font-size: 14px; color: var(--ink); cursor: pointer; transition: all .15s;
}
.tabs button:hover { background: var(--rose-light); }
.tabs button.active { background: var(--rose); color: #fff; font-weight: 600; }

/* ===== 布局 ===== */
.content { max-width: 1180px; margin: 0 auto; padding: 24px 28px 60px; }
.page { display: flex; flex-direction: column; gap: 18px; }
.panel {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 20px; border: 1px solid #f6ede9;
}
.panel h3 { font-size: 16px; margin-bottom: 12px; color: var(--ink); }
.panel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 860px) { .panel-grid { grid-template-columns: 1fr; } }

/* ===== 统计卡片 ===== */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 860px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
.stat-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px 18px; border: 1px solid #f6ede9; position: relative;
}
.stat-card.stat-primary { background: linear-gradient(135deg, var(--rose), #d16a87); color: #fff; }
.stat-card.stat-primary .stat-label { color: rgba(255,255,255,.85); }
.stat-card.stat-warn { border-color: var(--gold); background: var(--gold-light); }
.stat-num { font-size: 30px; font-weight: 700; font-family: "Noto Serif SC", serif; }
.stat-unit { font-size: 14px; font-weight: 400; margin-left: 3px; }
.stat-label { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.stat-link { font-size: 12.5px; color: var(--rose); cursor: pointer; position: absolute; right: 16px; bottom: 14px; }
.stat-link:hover { text-decoration: underline; }

/* ===== 进度条 ===== */
.bar { height: 10px; background: var(--gray-light); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--rose), #d16a87); border-radius: 999px; transition: width .3s; }
.bar-fill.bar-gold { background: linear-gradient(90deg, var(--gold), #dfc084); }
.bar-fill.bar-full { background: var(--green); }
.bar-hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.bed-summary { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; font-size: 13px; }
.bed-summary b { color: var(--rose); }

.cat-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.cat-name { width: 52px; flex-shrink: 0; }
.cat-bar { flex: 1; }
.cat-num { width: 86px; text-align: right; font-size: 12.5px; color: var(--muted); flex-shrink: 0; }

/* ===== 工具栏 ===== */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar-spacer { flex: 1; }
.input {
  padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px;
  font-size: 13.5px; outline: none; background: #fffdfa; color: var(--ink);
  font-family: inherit;
}
.input:focus { border-color: var(--rose); }
.input.search { width: 260px; }
select.input { cursor: pointer; }
.checkbox { display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; cursor: pointer; white-space: nowrap; }

/* ===== 按钮 ===== */
.btn {
  border: none; border-radius: 9px; padding: 8px 16px; font-size: 13.5px;
  cursor: pointer; transition: all .15s; font-family: inherit; white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--rose); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--rose-dark); }
.btn-outline { background: transparent; border: 1px solid var(--rose); color: var(--rose); }
.btn-outline:hover:not(:disabled) { background: var(--rose-light); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--gray-light); color: var(--ink); }
.btn-warn { background: var(--amber-light); color: var(--amber); }
.btn-warn:hover { background: #f3e2c6; }
.btn-sm { padding: 6px 12px; }
.btn-xs { padding: 3px 9px; font-size: 12.5px; border-radius: 7px; }
.btn-block { width: 100%; padding: 11px; }
.btn-danger-text { color: var(--rose); }
.btn-danger-text:hover { background: var(--rose-light); color: var(--rose-dark); }

/* ===== 表格 ===== */
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 600;
  padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 10px; border-bottom: 1px solid #f7f0ee; vertical-align: middle; }
.table tbody tr:hover { background: #fdf9f6; }
.table tbody tr:last-child td { border-bottom: none; }
.td-name { font-weight: 600; white-space: nowrap; }
.td-time { font-size: 12.5px; white-space: nowrap; }
.td-notes { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.td-actions { white-space: nowrap; }
.empty { text-align: center; color: var(--muted); padding: 36px 0 !important; }
.table-footer { margin-top: 10px; font-size: 12.5px; color: var(--muted); text-align: right; }
.guest-table { font-size: 13.5px; }

.party-tag {
  display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px;
  background: var(--gold-light); color: var(--amber); font-size: 11.5px; font-weight: 600;
  vertical-align: 1px;
}

.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-confirmed { background: var(--green-light); color: var(--green); }
.badge-pending { background: var(--amber-light); color: var(--amber); }
.badge-declined { background: var(--gray-light); color: var(--gray); }
.badge-bride { background: var(--rose-light); color: var(--rose); }
.badge-groom { background: #e8eefa; color: #4f7cad; }

/* ===== 男方 / 女方 ===== */
.side-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.side-card { border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.side-card.side-groom { background: linear-gradient(135deg, #fdfeff, #f1f5fb); border: 1px solid #e0e9f5; }
.side-card.side-bride { background: linear-gradient(135deg, #fffdfd, #fceff3); border: 1px solid #f3dbe3; }
.side-title { font-size: 13.5px; color: var(--muted); margin-bottom: 4px; }
.side-num { font-size: 26px; font-weight: 700; font-family: "Noto Serif SC", serif; }
.side-num .stat-unit { font-size: 13px; font-weight: 400; margin-left: 5px; color: var(--muted); }
.side-sub { font-size: 12.5px; color: var(--muted); margin: 2px 0 8px; }
.bar-fill.bar-groom { background: linear-gradient(90deg, #7fa3cc, #a9c3e0); }
.bar-fill.bar-bride { background: linear-gradient(90deg, var(--rose), #d16a87); }

.room-chip { display: inline-block; background: var(--rose-light); color: var(--rose); border-radius: 7px; padding: 2px 8px; font-size: 12.5px; margin-right: 4px; }

/* ===== 房间安排 ===== */
.hotel-panel { margin-bottom: 4px; }
.hotel-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.hotel-head h3 { margin: 0; }
.hotel-addr { font-size: 12.5px; color: var(--muted); font-weight: 400; margin-left: 10px; font-family: inherit; }
.hotel-stat { margin-right: 8px; font-size: 12.5px; }
.room-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 14px; }
.room-card {
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  background: #fffdfa; display: flex; flex-direction: column; gap: 8px;
}
.room-card.room-full { border-color: #cfe3d6; background: #fbfdfb; }
.room-head { display: flex; align-items: center; gap: 8px; }
.room-head b { font-size: 15px; }
.room-type { font-size: 12px; color: var(--muted); background: var(--gray-light); padding: 1px 8px; border-radius: 999px; }
.room-meta { font-size: 12.5px; color: var(--muted); }
.occupants { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.occupant-chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--rose-light); color: var(--rose); border-radius: 999px;
  padding: 2px 10px; font-size: 12.5px;
}
.occupant-chip i { font-style: normal; cursor: pointer; opacity: .6; }
.occupant-chip i:hover { opacity: 1; }

.unassigned-panel { border-color: var(--gold); background: #fffcf5; }
.unassigned-list { display: flex; flex-direction: column; gap: 8px; }
.unassigned-item {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: #fff; border: 1px dashed var(--gold); border-radius: 10px; padding: 8px 14px;
}
.unassigned-item .muted { flex: 1; font-size: 12.5px; }
.empty-hotels { text-align: center; color: var(--muted); padding: 40px 0; }

/* ===== 弹窗 ===== */
.modal-mask {
  position: fixed; inset: 0; background: rgba(70, 40, 50, 0.35); z-index: 50;
  display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px;
  overflow-y: auto;
}
.modal {
  background: var(--card); border-radius: 16px; box-shadow: 0 12px 40px rgba(90,40,60,.2);
  padding: 24px 26px; width: 560px; max-width: 100%;
}
.modal h3 { margin-bottom: 16px; font-size: 17px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.form-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); }
.form-grid .form-full { grid-column: 1 / -1; }
.form-grid .input { width: 100%; }
.checkbox-row { flex-direction: row !important; align-items: center; gap: 7px !important; font-size: 13.5px !important; color: var(--ink) !important; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }

.pick-list { display: flex; flex-direction: column; gap: 8px; max-height: 52vh; overflow-y: auto; margin-bottom: 14px; }
.pick-item {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  border: 1px solid var(--line); background: #fffdfa; border-radius: 10px;
  padding: 10px 14px; cursor: pointer; font-size: 13.5px; font-family: inherit; color: var(--ink);
  transition: all .12s; text-align: left;
}
.pick-item:hover:not(:disabled) { border-color: var(--rose); background: var(--rose-light); }
.pick-item:disabled { opacity: .45; cursor: not-allowed; }

/* ===== 提示 ===== */
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 10px 22px; border-radius: 999px;
  font-size: 13.5px; z-index: 99; box-shadow: 0 6px 20px rgba(0,0,0,.18);
}
.toast-error { background: var(--rose); }
.toast-enter-active, .toast-leave-active { transition: all .25s; }
.toast-enter-from, .toast-leave-to { opacity: 0; transform: translateX(-50%) translateY(12px); }

.muted { color: var(--muted); }
.text-danger { color: var(--rose); }

@media (max-width: 720px) {
  .topbar { padding: 8px 12px; gap: 6px 8px; flex-wrap: wrap; }
  /* 手机上分两行：品牌+退出在第一行，页签整行平铺，避免文字被挤成竖排 */
  .tabs { order: 3; flex-basis: 100%; gap: 6px; }
  .tabs button { flex: 1; padding: 7px 2px; font-size: 13px; white-space: nowrap; }
  .content { padding: 16px 12px 50px; }
  .form-grid { grid-template-columns: 1fr; }
  .side-grid { grid-template-columns: 1fr; }
  .table { display: block; overflow-x: auto; }
  .input.search { width: 100%; }
  /* iOS 聚焦字号 <16px 的输入框会自动放大页面，统一提到 16px 规避 */
  .input, .login-card input, input, select, textarea { font-size: 16px; }
}
