* { box-sizing: border-box; }
body {
  font-family: "Microsoft YaHei", system-ui, sans-serif;
  margin: 0; padding: 0;
  background: #0f1d2e; color: #e8eef5;
  min-height: 100vh; display: flex; flex-direction: column; align-items: center;
}
header { width: 100%; background: #16263c; padding: 16px 0; text-align: center; }
header h1 { margin: 0; font-size: 20px; letter-spacing: 2px; }
nav a { color: #8fb6e0; margin: 0 10px; text-decoration: none; font-size: 13px; }
.card {
  background: #16263c; border-radius: 14px; padding: 28px;
  width: 420px; max-width: 92vw; margin: 26px 0;
  box-shadow: 0 8px 30px rgba(0,0,0,.4);
}
h2 { margin-top: 0; }
input[type=text] {
  width: 100%; padding: 12px; font-size: 18px; letter-spacing: 2px;
  border-radius: 8px; border: 1px solid #2c4d70;
  background: #0f1d2e; color: #fff; text-align: center;
}
button {
  width: 100%; padding: 13px; margin-top: 12px; font-size: 16px;
  border: none; border-radius: 8px; cursor: pointer;
  background: #2f7fe0; color: #fff; transition: .15s;
}
button:hover { background: #3a8ef0; }
button.pay { background: #25b06a; }
button.pay:hover { background: #2bc578; }
button:disabled { background: #44566b; cursor: not-allowed; }
.plate-display {
  font-size: 30px; text-align: center; letter-spacing: 4px;
  background: #1f4e8c; color: #fff; padding: 12px; border-radius: 8px; margin: 14px 0;
}
.info { font-size: 15px; line-height: 1.8; }
.fee { font-size: 34px; color: #ffd75e; text-align: center; margin: 10px 0; }
.msg { margin-top: 12px; padding: 10px; border-radius: 8px; font-size: 14px; }
.msg.ok { background: #1d4d33; color: #8ff0b8; }
.msg.err { background: #5a2330; color: #ffb3c0; }
.hint { font-size: 12px; color: #8aa0b8; margin-top: 6px; }

/* 道闸动画 */
.gate { margin: 20px auto; width: 240px; height: 120px; position: relative; }
.gate .base { position: absolute; left: 0; bottom: 0; width: 18px; height: 90px; background: #4a5d75; border-radius: 4px; }
.gate .bar {
  position: absolute; left: 18px; bottom: 78px; width: 200px; height: 12px;
  background: repeating-linear-gradient(45deg,#e23,#e23 14px,#fff 14px,#fff 28px);
  transform-origin: left center; transform: rotate(0deg);
  transition: transform 1s ease;
}
.gate.open .bar { transform: rotate(-78deg); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 7px 8px; border-bottom: 1px solid #2c4d70; text-align: center; }
th { color: #8fb6e0; }
.tag-in { color: #ffd75e; } .tag-out { color: #8aa0b8; }
.tag-unpaid { color: #ff8a8a; } .tag-paid { color: #8ff0b8; }
.stat { display: flex; gap: 18px; justify-content: center; margin-bottom: 16px; }
.stat div { background: #0f1d2e; padding: 12px 18px; border-radius: 10px; text-align: center; }
.stat b { font-size: 22px; color: #ffd75e; display: block; }
