/* ===== 叫号系统管理后台样式 ===== */
* { box-sizing: border-box; }
body {
  margin: 0; background: #f2f5f9; color: #1f2d3d;
  font: 14px/1.7 "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}
a { color: #0f7bd4; text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  display: flex; align-items: center; gap: 20px;
  background: #0e2a43; color: #fff; padding: 0 20px; height: 56px;
  position: sticky; top: 0; z-index: 10;
}
.topbar .brand { font-size: 16px; font-weight: 700; white-space: nowrap; }
.topbar nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.topbar nav a {
  color: #c8d8e8; padding: 6px 14px; border-radius: 6px; font-size: 14px;
}
.topbar nav a:hover { background: #17395a; color: #fff; text-decoration: none; }
.topbar nav a.active { background: #0f7bd4; color: #fff; }
.topbar .user { color: #c8d8e8; display: flex; gap: 12px; align-items: center; }
.topbar .logout { color: #ffb3a7; }

.wrap { max-width: 1240px; margin: 22px auto 40px; padding: 0 18px; }
.foot { text-align: center; color: #8a99a8; font-size: 12px; padding: 18px 0 30px; }

.card {
  background: #fff; border-radius: 10px; padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(16, 42, 67, .08); margin-bottom: 18px;
}
.card h2 { margin: 0 0 14px; font-size: 16px; color: #0e2a43; }
.card h2 .sub { font-weight: 400; font-size: 12px; color: #8a99a8; margin-left: 8px; }

.flash { padding: 10px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.flash.ok { background: #e6f7ee; color: #14663f; border: 1px solid #b7e4cc; }
.flash.err { background: #fdecec; color: #a32222; border: 1px solid #f5c2c2; }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 9px 10px; text-align: left; border-bottom: 1px solid #eef2f6; font-size: 14px; }
th { background: #f7fafc; color: #5b6b7b; font-weight: 600; white-space: nowrap; }
tr:hover td { background: #fafcfe; }
td.actions { white-space: nowrap; }
td.actions a { margin-right: 10px; }
.empty { text-align: center; color: #94a3b2; padding: 28px 0; }

label { display: block; font-size: 13px; color: #5b6b7b; margin-bottom: 4px; }
input[type=text], input[type=password], input[type=number], input[type=date],
select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid #d5dde5; border-radius: 6px;
  font: inherit; background: #fff; color: #1f2d3d;
}
input:focus, select:focus, textarea:focus { outline: 2px solid #b9dcfb; border-color: #0f7bd4; }
textarea { min-height: 80px; resize: vertical; font-family: Consolas, monospace; font-size: 13px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.grid .full { grid-column: 1 / -1; }

.btn {
  display: inline-block; padding: 8px 18px; border-radius: 6px; border: 0;
  background: #0f7bd4; color: #fff; font: inherit; cursor: pointer;
}
.btn:hover { background: #0c69b3; text-decoration: none; }
.btn.ghost { background: #e8eef5; color: #2c3e50; }
.btn.danger { background: #d64545; }
.btn.sm { padding: 4px 12px; font-size: 13px; }

.toolbar { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .field { min-width: 160px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.stat { background: #fff; border-radius: 10px; padding: 18px 20px; box-shadow: 0 1px 3px rgba(16,42,67,.08); }
.stat .num { font-size: 30px; font-weight: 700; color: #0f7bd4; line-height: 1.2; }
.stat .lbl { color: #7d8b99; font-size: 13px; }

.badge { display: inline-block; padding: 1px 9px; border-radius: 20px; font-size: 12px; }
.badge.on { background: #e6f7ee; color: #14663f; }
.badge.off { background: #f1f3f5; color: #7d8b99; }
.badge.warn { background: #fff4e5; color: #a05a00; }
.badge.err { background: #fdeaea; color: #a52424; }

.login-box {
  max-width: 380px; margin: 12vh auto; background: #fff; padding: 34px 32px 28px;
  border-radius: 14px; box-shadow: 0 10px 40px rgba(14, 42, 67, .12);
}
.login-box h1 { font-size: 20px; margin: 0 0 6px; color: #0e2a43; text-align: center; }
.login-box p.tip { text-align: center; color: #93a1af; font-size: 12px; margin: 0 0 22px; }
.login-box .field { margin-bottom: 14px; }
.login-box .btn { width: 100%; padding: 10px; margin-top: 6px; }
.login-err { background: #fdecec; color: #a32222; border-radius: 6px; padding: 8px 12px; font-size: 13px; margin-bottom: 14px; }

.hint { color: #8a99a8; font-size: 12px; margin-top: 4px; }
.radio-row { display: flex; gap: 22px; align-items: center; padding: 4px 0; }
.radio-row label { display: inline-flex; align-items: center; gap: 6px; color: #1f2d3d; font-size: 14px; margin: 0; }
