/* 监控端样式：口令门 / 顶栏 / 概览卡片 / 筛选 / 只读表格 */

/* ================= 顶栏 ================= */
.mon {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  max-width: 900px;
  margin: 0 auto;
  overflow: hidden;
}

/* 大屏下把两侧留白做成深色，避免"内容漂在白色中间" */
@media (min-width: 960px) {
  body { background: #eef0f3; }
  .mon {
    background: #fff;
    box-shadow: 0 0 40px rgba(0, 0, 0, .06);
  }
}

.mon__hd {
  flex: none;
  z-index: 210;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: #1f2d3d;
  color: #fff;
}

.mon__hdL b {
  display: block;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .4px;
}

.mon__hdL span {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: rgba(255, 255, 255, .55);
}

.mon__hdR {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: rgba(255, 255, 255, .62);
}

.live {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #07c160;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(7, 193, 96, .6);
}

.live.blink {
  animation: livePulse .7s ease-out;
}

@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(7, 193, 96, .65); }
  100% { box-shadow: 0 0 0 9px rgba(7, 193, 96, 0); }
}

.mon__refresh {
  margin-left: 4px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 400;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 20px;
  cursor: pointer;
}

.mon__refresh:active {
  background: rgba(255, 255, 255, .12);
}

/* ================= 概览卡片 ================= */
.cards {
  flex: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 10px 12px 2px;
}

.card {
  padding: 8px 6px 7px;
  background: #f7f8fa;
  border-radius: 10px;
  border-top: 2px solid #dcdee0;
  box-sizing: border-box;
  text-align: center;
  min-width: 0;
}

.card__k {
  font-size: 11px;
  color: #7d8592;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card__v {
  margin-top: 1px;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.15;
  color: #1f2d3d;
  font-variant-numeric: tabular-nums;
}

.card__v i {
  font-size: 10px;
  font-weight: 400;
  font-style: normal;
  color: #9aa4b2;
  margin-left: 2px;
}

.card__s {
  display: none;
}

.card.c-live { border-top-color: #ff8319; background: #fff8f1; }
.card.c-live .card__v { color: #e97104; }
.card.c-vacant { border-top-color: #07c160; background: #f2fbf6; }
.card.c-vacant .card__v { color: #06a552; }
.card.c-arrive { border-top-color: #1989fa; background: #f3f9ff; }
.card.c-arrive .card__v { color: #1573d4; }
.card.c-depart { border-top-color: #969799; }

/* ================= 筛选 ================= */
.filters {
  flex: none;
  display: flex;
  gap: 6px;
  padding: 9px 12px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.filters::-webkit-scrollbar { display: none; }

.chip {
  flex: none;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 400;
  color: #676c75;
  background: #f2f3f5;
  border-radius: 20px;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.chip.is-on {
  color: #fff;
  background: #1f2d3d;
}

.mon__hint {
  flex: none;
  padding: 6px 12px 8px;
  font-size: 11px;
  color: #b6bec9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mon__hint.warn {
  color: #e97104;
}

/* ================= 表格区 ================= */
.mon .table-wrap {
  flex: 1;
  min-height: 0;
  height: auto;
  overflow: auto;
  border-top: 1px solid #ddd;
  border-bottom: 0;
  -webkit-overflow-scrolling: touch;
}

.mon table {
  margin: 0;
}

/* 筛选时淡出无关行 */
.mon tbody tr.is-dim {
  opacity: .28;
}

.mon tbody tr.is-dim .booked {
  filter: grayscale(1);
}

/* 监控端格子可点（看详情） */
.mon td.item {
  cursor: pointer;
}

/* ================= 底栏 ================= */
.mon__ft {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px calc(14px + env(safe-area-inset-bottom));
  font-size: 11px;
  color: #b6bec9;
}

.mon__ft a {
  color: #9aa4b2;
  text-decoration: none;
}
