:root {
  --navy: #0b2a4a;
  --navy-2: #123a63;
  --accent: #c8a24a;
  --accent-2: #1f8a8a;
  --bg: #f5f7fa;
  --card: #ffffff;
  --text: #1d2733;
  --muted: #6b7785;
  --line: #e3e8ee;
  --danger: #c0392b;
  --ok: #1f8a4c;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(11, 42, 74, 0.08);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-2); }
.wrap { max-width: 720px; margin: 0 auto; padding: 24px 18px 56px; }

/* 顶栏 */
.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 0 14px; border-bottom: 1px solid var(--line); margin-bottom: 22px;
}
.logo {
  font-weight: 800; letter-spacing: .5px; font-size: 20px; color: var(--navy);
  display: flex; align-items: center; gap: 8px;
}
.logo .mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
  color: var(--accent); display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800;
}
.logo small { color: var(--muted); font-weight: 500; font-size: 13px; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px; margin-bottom: 18px;
}
.card h2 { margin: 0 0 6px; font-size: 18px; color: var(--navy); }
.lead { color: var(--muted); font-size: 14px; margin: 0 0 4px; }

/* 时段 */
.day-group { margin-bottom: 18px; }
.day-label { font-weight: 700; color: var(--navy); margin: 16px 0 10px; font-size: 15px; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.slot {
  border: 1.5px solid var(--line); background: #fff; border-radius: 10px;
  padding: 12px 10px; text-align: center; cursor: pointer; font-weight: 600;
  transition: .15s; color: var(--navy); font-size: 15px;
}
.slot:hover { border-color: var(--accent-2); }
.slot.selected { background: var(--navy); color: #fff; border-color: var(--navy); }
.slot.empty { color: var(--muted); border-style: dashed; cursor: default; }
.slot.taken { color: #b9c0c9; background: #f0f2f5; border-style: dashed; cursor: not-allowed; text-decoration: line-through; }

/* 表单 */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.field input, .field textarea {
  width: 100%; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 10px;
  font-size: 15px; font-family: inherit; color: var(--text); background: #fff;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent-2); }
.field textarea { resize: vertical; min-height: 70px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.btn {
  display: inline-block; width: 100%; padding: 14px 18px; border: none; border-radius: 12px;
  background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff;
  font-size: 16px; font-weight: 700; cursor: pointer; transition: .15s;
}
.btn:hover { opacity: .94; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.secondary { background: #fff; color: var(--navy); border: 1.5px solid var(--line); }

/* 状态 */
.msg { padding: 12px 14px; border-radius: 10px; font-size: 14px; margin: 14px 0; display: none; }
.msg.show { display: block; }
.msg.error { background: #fdecea; color: var(--danger); border: 1px solid #f5c6c0; }
.msg.ok { background: #e9f7ef; color: var(--ok); border: 1px solid #bfe6cd; }
.msg.info { background: #eef4fb; color: var(--navy-2); border: 1px solid #cfe1f5; }

.success-box { text-align: center; padding: 14px 0; }
.success-box .check {
  width: 64px; height: 64px; border-radius: 50%; background: var(--ok); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 34px; margin: 0 auto 14px;
}

/* 页脚 */
.foot { color: var(--muted); font-size: 12px; text-align: center; margin-top: 26px; line-height: 1.7; }
.foot strong { color: var(--navy); }

/* 管理员 */
.admin-wrap { max-width: 980px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { color: var(--navy); font-weight: 700; background: #f8fafc; position: sticky; top: 0; }
.table tr:hover td { background: #fafcff; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.tag.free { background: #e9f7ef; color: var(--ok); }
.tag.booked { background: #fdecea; color: var(--danger); }
.row-actions button { margin-right: 6px; padding: 5px 10px; font-size: 12px; border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.row-actions button.del { color: var(--danger); }
.row-actions button.cancel { color: #b9770b; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.login-box { max-width: 360px; margin: 80px auto; }
.admin-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.admin-head .who { font-size: 13px; color: var(--muted); }
.section-title { font-size: 16px; font-weight: 700; color: var(--navy); margin: 24px 0 10px; }
.pill { font-size: 12px; color: var(--muted); }
small.muted { color: var(--muted); }
