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

body {
  font-family: Tahoma, Verdana, "Lucida Sans", sans-serif;
  font-size: 12px;
  line-height: 1.4;
  color: #1a2733;
  background: #f2f2f2;
  padding-bottom: 28px;
}

.tcode-bar {
  background: #cfcfcf;
  border-bottom: 1px solid #999;
  padding: 4px 12px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.tcode-bar .tcode {
  font-family: Consolas, "Lucida Console", monospace;
  font-weight: bold;
  color: #0070a3;
  min-width: 70px;
}
.tcode-bar .title { flex: 1; font-weight: 600; }
.tcode-bar .context { color: #555; font-size: 11px; }

.nav {
  background: #d6d6d6;
  border-bottom: 1px solid #999;
  padding: 3px 12px;
  display: flex;
  gap: 16px;
  font-size: 11px;
}
.nav a { color: #0070a3; text-decoration: none; }
.nav a:hover { text-decoration: underline; }
.nav a.current { color: #1a2733; font-weight: bold; }

main { padding: 12px 16px; background: #f2f2f2; }
section { margin-bottom: 18px; }
section h2 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #555;
  border-bottom: 1px solid #b9b9b9;
  padding-bottom: 3px;
  margin-bottom: 6px;
}

table.data {
  border-collapse: collapse;
  width: 100%;
  background: #fff;
  border: 1px solid #b9b9b9;
}
table.data th, table.data td {
  border: 1px solid #d6d6d6;
  padding: 3px 8px;
  text-align: left;
  font-size: 11px;
  white-space: nowrap;
}
table.data th {
  background: #cfcfcf;
  font-weight: 700;
  color: #1a2733;
}
table.data tbody tr:nth-child(even) { background: #f7f7f7; }
table.data tbody tr:hover { background: #ffffd0; }
table.data a { color: #0070a3; text-decoration: none; }
table.data a:hover { text-decoration: underline; }

table.data tr.alert, table.data tr.alert:nth-child(even) { background: #fff3a3; }
table.data tr.alert td:first-child { border-left: 3px solid #b91c1c; }

.kv {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2px 12px;
  background: #fff;
  border: 1px solid #b9b9b9;
  padding: 8px 12px;
  font-size: 11px;
}
.kv dt { text-align: right; font-weight: 700; color: #555; }
.kv dt::after { content: ":"; }
.kv dd { color: #1a2733; font-family: Consolas, "Lucida Console", monospace; }

.counts { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.count {
  background: #fff;
  border: 1px solid #b9b9b9;
  padding: 8px 14px;
  min-width: 110px;
}
.count .num { font-size: 18px; font-weight: 700; color: #0070a3; }
.count .label {
  font-size: 11px;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.alert-box {
  background: #fff3a3;
  border: 1px solid #b91c1c;
  border-left: 4px solid #b91c1c;
  padding: 8px 12px;
  margin-bottom: 12px;
}
.alert-box .badge {
  background: #b91c1c;
  color: #fff;
  font-weight: 700;
  font-size: 10px;
  padding: 2px 6px;
  margin-right: 6px;
  letter-spacing: 0.04em;
}

.filter { margin-bottom: 6px; font-size: 11px; }
.filter input {
  padding: 3px 6px;
  border: 1px solid #888;
  font-size: 11px;
  width: 260px;
}

.status-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #cfcfcf;
  border-top: 1px solid #999;
  padding: 3px 12px;
  font-size: 10px;
  color: #555;
  font-family: Consolas, "Lucida Console", monospace;
  display: flex;
  justify-content: space-between;
}

.gate-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #cfcfcf;
}
.gate-card {
  background: #fff;
  border: 1px solid #888;
  padding: 24px 28px;
  width: 320px;
}
.gate-title { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.gate-hint { font-size: 11px; color: #555; margin-bottom: 10px; }
.gate-error { font-size: 11px; color: #b91c1c; margin-bottom: 6px; }
.gate-input {
  width: 100%;
  padding: 4px 6px;
  border: 1px solid #888;
  font-size: 12px;
  margin-bottom: 8px;
}
.gate-btn {
  width: 100%;
  background: #0070a3;
  color: #fff;
  border: 1px solid #005580;
  padding: 5px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.gate-btn:hover { background: #005580; }
