* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", sans-serif;
  background: linear-gradient(135deg, #f0f4f8 0%, #d9e2ec 100%);
  min-height: 100vh;
  color: #243b53;
}
h1 { margin: 0 0 16px; font-size: 1.5rem; text-align: center; }
.card {
  max-width: 420px;
  margin: 24px auto;
  padding: 24px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.08);
}
.clock {
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-size: 1.1rem;
  color: #486581;
  margin-bottom: 12px;
}
.pin-display {
  text-align: center;
  font-size: 2rem;
  letter-spacing: 0.6em;
  height: 2.5rem;
  border-bottom: 2px solid #bcccdc;
  margin-bottom: 16px;
  color: #102a43;
}
.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.keypad button {
  padding: 18px 0;
  font-size: 1.2rem;
  border: none;
  border-radius: 10px;
  background: #f0f4f8;
  cursor: pointer;
  transition: background 0.1s;
}
.keypad button:hover { background: #d9e2ec; }
.keypad button:active { background: #bcccdc; }
.keypad .aux { background: #e1ebf3; }
.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.actions button {
  padding: 16px;
  font-size: 1.1rem;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  color: #fff;
}
.btn-in { background: #2bb673; }
.btn-in:hover { background: #239059; }
.btn-out { background: #d64545; }
.btn-out:hover { background: #b53737; }
.message {
  min-height: 1.5em;
  text-align: center;
  font-size: 0.95rem;
  margin-top: 8px;
}
.message.success { color: #2bb673; }
.message.error { color: #d64545; }
.link {
  display: block;
  text-align: center;
  margin-top: 12px;
  color: #486581;
  text-decoration: none;
  font-size: 0.9rem;
}
.link:hover { text-decoration: underline; }

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px;
}
.container header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.container header h1 { text-align: left; margin: 0; }
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
  background: #fff;
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.filters label {
  display: flex;
  flex-direction: column;
  font-size: 0.85rem;
  color: #486581;
  gap: 4px;
}
.filters select, .filters input {
  padding: 8px 10px;
  border: 1px solid #bcccdc;
  border-radius: 6px;
  font-size: 0.95rem;
  background: #fff;
}
.filters button {
  padding: 8px 18px;
  border: none;
  background: #486581;
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
}
.filters button:hover { background: #334e68; }
table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
th, td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #f0f4f8;
}
th {
  background: #f0f4f8;
  font-size: 0.85rem;
  color: #486581;
  font-weight: 600;
}
tr:last-child td { border-bottom: none; }
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}
.badge.in { background: #c8eed4; color: #1a6b3e; }
.badge.out { background: #fcd7d7; color: #92272a; }
.empty {
  text-align: center;
  color: #829ab1;
  padding: 32px;
}
