/* The gate: the portal's Gate log and Vehicles, and the guard's Gate check on the phone. */

/* ---- Visitors: Visits | Gate log | Vehicles ---- */
.subtabs {
  display: flex;
  gap: 6px;
  margin: 0 0 12px;
  flex-wrap: wrap;
}
.subtabs button,
.gate-view .seg button,
.gate-view .chips button {
  border-radius: 999px;
  padding: 5px 14px;
  background: var(--card);
}
.subtabs button[aria-selected='true'],
.gate-view .seg button[aria-pressed='true'],
.gate-view .chips button[aria-pressed='true'] {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.gate-view .gate-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.gate-view .gate-bar .spacer,
.gate-ask .spacer {
  flex: 1;
}
.gate-view .gate-bar input[type='search'] {
  min-width: 220px;
  flex: 1 1 220px;
  max-width: 340px;
}
.gate-view .gate-bar input,
.gate-view .gate-bar select {
  width: auto;
}
.gate-view label.inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-weight: 400;
}
.gate-view .seg {
  display: inline-flex;
  gap: 4px;
}
.gate-view .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.gate-view .chips .n {
  opacity: 0.75;
  font-variant-numeric: tabular-nums;
  margin-left: 2px;
}
.gate-view .gate-inside {
  margin: 0 0 10px;
}
.gate-view .plate,
.gate-check .mono {
  font-family: ui-monospace, Consolas, monospace;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.gate-view td {
  vertical-align: top;
}
.gate-view td.actions button {
  white-space: nowrap;
}
.badge.tone-ok {
  color: var(--green);
  border-color: var(--green);
}
.badge.tone-warn {
  color: var(--amber);
  border-color: var(--amber);
}
.badge.tone-bad {
  color: var(--red);
  border-color: var(--red);
}
.gate-view .warn {
  color: var(--amber);
}
.gate-ask {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 2px solid var(--blue);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 10px;
}
.gate-try {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}
.gate-try input {
  width: 180px;
  text-transform: uppercase;
}
.gate-view .gate-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
  margin-bottom: 8px;
}
.gate-view .gate-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
}
.gate-view details.gate-card {
  margin-top: 16px;
}
.gate-view h3 {
  margin: 14px 0 8px;
  font-size: 15px;
}
.gate-view .gate-card > h3:first-child {
  margin-top: 0;
}
.gate-view summary {
  cursor: pointer;
  font-weight: 600;
  margin: 8px 0;
}
.gate-view textarea {
  width: 100%;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 13px;
  box-sizing: border-box;
  background: var(--field);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
}
.gate-view pre {
  background: var(--subtle);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  overflow-x: auto;
  font-size: 12.5px;
}
.gate-view form.settings label {
  font-weight: 400;
}
.gate-view form.settings input[type='number'] {
  width: 72px;
  display: inline-block;
}
.gate-view button.danger {
  color: var(--red);
}
dialog.gate-photo img {
  width: 100%;
  border-radius: 8px;
}

/* ---- The pass dialog ---- */
#pass-dialog .pass-link {
  word-break: break-all;
}
#pass-dialog .pass-actions {
  flex-wrap: wrap;
}

/* ---- The guard's phone ---- */
.gate-check .gcard {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}
.gate-check label {
  margin: 0;
}
.gate-check .big {
  font-size: 18px;
  padding: 16px;
}
.gate-check .walk {
  font-size: 16px;
  padding: 12px;
}
.gate-check .typed {
  display: flex;
  gap: 8px;
}
.gate-check .typed input {
  flex: 1;
  min-width: 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  font-size: 18px;
}
.gate-check .typed input::placeholder {
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
  font-size: 15px;
}
.gate-check .typed button {
  min-height: 44px;
}
.gate-check .way {
  display: flex;
  gap: 6px;
}
.gate-check .way button {
  flex: 1;
  padding: 9px;
}
.gate-check .way button[aria-checked='true'] {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  font-weight: 600;
}
.gate-check .verdict {
  color: #fff;
  border: 0;
}
.gate-check .verdict.green {
  background: #15803d;
}
.gate-check .verdict.red {
  background: #b91c1c;
}
.gate-check .verdict p {
  margin: 0;
}
.gate-check .light {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 22px;
}
.gate-check .light small {
  display: block;
  font-size: 14px;
  opacity: 0.9;
}
.gate-check .sign {
  font-size: 40px;
  line-height: 1;
}
.gate-check .vplate {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: #fff;
  color: #111;
  border-radius: 6px;
  padding: 4px 10px;
  justify-self: start;
}
.gate-check .home {
  font-size: 20px;
  font-weight: 600;
}
.gate-check .pic {
  width: 100%;
  border-radius: 6px;
}
.gate-check h3 {
  margin: 0;
  font-size: 15px;
}
.gate-check .recent {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  font-size: 14px;
}
.gate-check .recent small {
  color: var(--muted);
}
.gate-check .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  vertical-align: middle;
}
.gate-check .dot.green {
  background: #15803d;
}
.gate-check .dot.red {
  background: #b91c1c;
}
.gate-check .ok {
  color: var(--green);
  margin: 0;
}
.gate-check .error {
  margin: 0;
}

.gate-view .gate-card .actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}
.gate-view .gate-card form + form,
.gate-view .gate-card details {
  margin-top: 10px;
}
