/* 罗蒙环球乐园 · 管理后台 · 简洁后台风（白底 + 蓝灰） */

:root {
  --bg: #f4f6f9;
  --card: #ffffff;
  --line: #e3e8ef;
  --line-strong: #cfd7e3;
  --text: #1f2937;
  --text-2: #5b6675;
  --text-3: #93a0b0;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-soft: #eef4ff;
  --ok: #16a34a;
  --warn: #d97706;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --radius: 8px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* ── 登录 / 初始化 ── */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(160deg, #eef4ff 0%, #f4f6f9 40%, #f4f6f9 100%);
}
.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 32px 28px;
  box-shadow: 0 8px 30px rgba(31, 41, 55, .08);
}
.auth-card h1 { font-size: 20px; font-weight: 600; margin-bottom: 6px; }
.auth-card .sub { font-size: 13px; color: var(--text-3); margin-bottom: 22px; }
.auth-env {
  margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line);
  font-size: 12px; color: var(--text-3); line-height: 1.7;
}
.auth-env b { color: var(--text-2); font-weight: 600; }

/* ── 表单 ── */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
input[type="text"], input[type="password"], input[type="date"], input[type="number"], select, textarea {
  width: 100%;
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; padding: 8px 11px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
input:disabled, select:disabled { background: #f8fafc; color: var(--text-3); }

/* ── 按钮 ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff; color: var(--text);
  font-size: 14px; font-family: inherit; cursor: pointer;
  transition: all .15s; white-space: nowrap;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
.btn-danger { color: var(--danger); border-color: #f3c6c6; }
.btn-danger:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-block { width: 100%; height: 40px; }
.btn-sm { height: 28px; padding: 0 9px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn:disabled:hover { border-color: var(--line-strong); color: var(--text); }
.btn-icon {
  width: 26px; height: 26px; padding: 0; border-radius: 6px;
  font-size: 13px; line-height: 1; color: var(--text-2);
}

/* ── 布局 ── */
.topbar {
  height: 54px; background: var(--card); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; padding: 0 20px; gap: 16px;
  position: sticky; top: 0; z-index: 50;
}
.topbar .brand { font-size: 15px; font-weight: 600; }
.topbar .spacer { flex: 1; }
.topbar .who { font-size: 13px; color: var(--text-2); }
.topbar .who b { color: var(--text); font-weight: 600; }
.tag {
  display: inline-block; padding: 2px 8px; border-radius: 20px;
  font-size: 12px; background: var(--primary-soft); color: var(--primary);
}
.tag-admin { background: #fef3c7; color: #b45309; }
.tag-show { background: #ede9fe; color: #6d28d9; }
.tag-ride { background: #dcfce7; color: #15803d; }

.nav { display: flex; gap: 4px; }
.nav a {
  padding: 7px 14px; border-radius: var(--radius);
  font-size: 14px; color: var(--text-2); text-decoration: none; transition: all .15s;
}
.nav a:hover { background: #f1f5f9; color: var(--text); }
.nav a.on { background: var(--primary-soft); color: var(--primary); font-weight: 600; }

.page { max-width: 1280px; margin: 0 auto; padding: 20px; }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 18px; margin-bottom: 16px;
}
.card-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.card-head h2 { font-size: 15px; font-weight: 600; }
.card-head .spacer { flex: 1; }
.hint { font-size: 12px; color: var(--text-3); line-height: 1.7; }

/* ── 表格 ── */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  text-align: left; font-weight: 600; color: var(--text-2);
  background: #f8fafc; padding: 9px 10px; white-space: nowrap;
  border-bottom: 1px solid var(--line); position: sticky; top: 0;
}
td { padding: 5px 10px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #fafcff; }
td input, td select {
  height: 32px; font-size: 13px; padding: 0 8px;
  border-color: transparent; background: transparent;
}
td input:hover, td select:hover { border-color: var(--line); background: #fff; }
td input:focus, td select:focus { border-color: var(--primary); background: #fff; }
.col-t { width: 96px; }
.col-n { min-width: 260px; }
.col-l { min-width: 150px; }
.col-c { min-width: 110px; }
.col-a { width: 104px; text-align: right; white-space: nowrap; }
.col-p { width: 200px; }
.col-s { width: 150px; }

/* ── 状态徽标 ── */
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 20px;
  font-size: 12px; white-space: nowrap;
}
.b-ok { background: #dcfce7; color: #15803d; }
.b-warn { background: #fef3c7; color: #b45309; }
.b-danger { background: #fee2e2; color: #b91c1c; }
.b-gray { background: #f1f5f9; color: var(--text-3); }

/* ── 提示条 ── */
.alert {
  padding: 10px 14px; border-radius: 8px; font-size: 13px;
  margin-bottom: 14px; line-height: 1.6; white-space: pre-wrap;
}
.a-error { background: var(--danger-soft); color: #b91c1c; border: 1px solid #fecaca; }
.a-ok { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.a-info { background: var(--primary-soft); color: #1e40af; border: 1px solid #bfdbfe; }

/* ── 弹层 ── */
.mask {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .45);
  display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.mask.show { display: flex; }
.modal {
  background: #fff; border-radius: 12px; width: 100%; max-width: 460px;
  max-height: 88vh; overflow-y: auto;
  box-shadow: 0 20px 50px rgba(15, 23, 42, .25);
}
.modal-head {
  padding: 18px 22px 0; font-size: 16px; font-weight: 600;
}
.modal-body { padding: 18px 22px; }
.modal-foot {
  padding: 0 22px 18px; display: flex; gap: 10px; justify-content: flex-end;
}

/* ── Toast ── */
#toast {
  position: fixed; left: 50%; top: 24px; transform: translateX(-50%);
  z-index: 999; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none;
}
.toast-item {
  padding: 10px 18px; border-radius: 8px; font-size: 13px;
  background: #1f2937; color: #fff; box-shadow: 0 6px 22px rgba(15, 23, 42, .3);
  animation: tin .25s ease; max-width: 70vw; white-space: pre-wrap; line-height: 1.5;
}
.toast-item.ok { background: #15803d; }
.toast-item.err { background: #b91c1c; }
@keyframes tin { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* ── 空态 / 加载 ── */
.empty { padding: 40px 20px; text-align: center; color: var(--text-3); font-size: 13px; }
.loading { padding: 30px; text-align: center; color: var(--text-3); font-size: 13px; }

/* ── 工具条 ── */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar .spacer { flex: 1; }
.inline { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }
.inline input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--primary); }

@media (max-width: 720px) {
  .page { padding: 12px; }
  .topbar { padding: 0 12px; gap: 10px; }
  .topbar .who { display: none; }
}
