:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --ink: #1a1d21;
  --muted: #6b7280;
  --line: #dcdfe4;
  --accent: #1a5fb4;
  --accent-ink: #ffffff;
  --ok: #1a7f37;
  --warn: #b8860b;
  --warn-bg: #fff8e1;
  --danger: #b42318;
  --radius: 10px;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}
.wrap { max-width: 1200px; margin: 0 auto; padding: 12px; }
header.bar {
  background: var(--accent); color: var(--accent-ink);
  padding: 10px 14px; display: flex; align-items: center; gap: 12px;
  position: sticky; top: 0; z-index: 20;
}
header.bar h1 { font-size: 17px; margin: 0; font-weight: 600; flex: 1; }
header.bar .who { font-size: 13px; opacity: .9; }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px; margin-bottom: 12px;
}
label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; font-weight: 600; }
input[type=text], input[type=password], input[type=date], input[type=datetime-local], textarea, select {
  width: 100%; padding: 12px; font-size: 17px; border: 1px solid var(--line);
  border-radius: 8px; background: #fff; color: var(--ink);
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
textarea { min-height: 70px; resize: vertical; font-family: inherit; }
button {
  font: inherit; font-weight: 600; padding: 12px 16px; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer;
}
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.big { width: 100%; padding: 18px; font-size: 19px; }
button.ghost { background: transparent; }
button.danger { color: var(--danger); border-color: #f0c6c2; }
button:disabled { opacity: .5; cursor: not-allowed; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.row > * { flex: 1 1 180px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }
.muted { color: var(--muted); font-size: 13px; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill.on { background: #e7f0fb; color: var(--accent); }
.pill.done { background: #e7f5ea; color: var(--ok); }
.pill.auto { background: var(--warn-bg); color: var(--warn); }
.banner { padding: 12px 14px; border-radius: 8px; margin-bottom: 12px; font-weight: 600; }
.banner.ok { background: #e7f5ea; color: var(--ok); border: 1px solid #b7e0c1; }
.banner.err { background: #fdecea; color: var(--danger); border: 1px solid #f5c2bd; }
.banner.warn { background: var(--warn-bg); color: var(--warn); border: 1px solid #f0e0b0; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
tr.autoclosed td { background: var(--warn-bg); }
.tablewrap { overflow-x: auto; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.thumbs img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); cursor: pointer; }
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.85); display: flex;
  align-items: center; justify-content: center; z-index: 50; padding: 16px;
}
.modal img { max-width: 100%; max-height: 90vh; border-radius: 6px; }
.mono { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }

/* ---------------- fülek ---------------- */
.tabs { display: flex; gap: 4px; margin-bottom: 12px; border-bottom: 2px solid var(--line); }
.tabs button {
  border: none; background: none; border-radius: 8px 8px 0 0; padding: 9px 16px;
  font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
}
.tabs button[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.tabs button:hover { color: var(--ink); }

/* ---------------- lerakóhely-sáv (layout) ---------------- */
.strip { display: flex; flex-direction: column; gap: 10px; }
.striprow { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }
/* a két kapu a telephely két végén áll – a rajz is így mutassa */
.striprow.gates { justify-content: space-between; }
.striprow.ramps > .gategroup { flex: 1 1 100%; }
.striprow.ramps .gslots { justify-content: space-between; }
.gategroup {
  display: flex; flex-direction: column; gap: 5px;
  padding: 6px 8px 8px; background: #f6f8fa;
  border: 1px solid var(--line); border-radius: 10px;
}
.gategroup .glabel {
  font-size: 10.5px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--accent);
}
.gategroup .gslots { display: flex; gap: 7px; }
.slot {
  position: relative; width: 152px; min-height: 70px;
  display: flex; flex-direction: column; gap: 2px;
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 9px; background: #fff;
}
.slot .sname { font-weight: 700; font-size: 13px; line-height: 1.25; }
.slot .sstate {
  font-size: 11.5px; color: var(--muted); line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.slot.closed .sstate { white-space: normal; }
.slot .plate { font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; line-height: 1.25; }
.slot.free { border-style: dashed; }
.slot.busy { border-color: #b3cbe8; background: #f3f8fd; }
.slot.closed {
  color: var(--muted); border-style: dashed;
  background: repeating-linear-gradient(135deg, #f4f5f7 0 8px, #eceef1 8px 16px);
}
/* halvány "lezár" a csempe sarkában – nem visz el függőleges helyet */
.slot .corner {
  position: absolute; top: 5px; right: 6px; border: none; background: none; cursor: pointer;
  font-size: 15px; line-height: 1; color: var(--muted); padding: 2px 4px; border-radius: 5px; opacity: .45;
}
.slot .corner:hover, .slot .corner:focus-visible { opacity: 1; background: var(--line); }
.slot .acts { display: flex; gap: 5px; margin-top: auto; padding-top: 5px; flex-wrap: wrap; }
.slot .acts button { padding: 4px 8px; font-size: 12px; border-radius: 6px; }
.slot input.reason { padding: 5px 7px; font-size: 12.5px; width: 100%; }
/* prioritás */
.prio { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.prio.p1 { background: #fdecea; color: var(--danger); }
.prio.p2 { background: #fff1e0; color: #b45309; }
.prio.p3 { background: #eef2f7; color: #475569; }
.capbar { font-size: 13px; color: var(--muted); }
.capbar strong { color: var(--ink); }
.capbar.full { color: var(--danger); font-weight: 600; }

/* ---------------- rendszám-javaslatok a portás felületén ---------------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 9px 13px; border: 1px solid var(--line); border-radius: 9px;
  background: #f2f7fd; cursor: pointer; text-align: left; font: inherit;
}
.chip strong { font-size: 17px; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.chip span { font-size: 12px; color: var(--muted); }
.emptiespill {
  display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11.5px;
  font-weight: 700; background: #eaf3ea; color: #2f6f3e; border: 1px solid #cfe3d2;
}
.ramppill {
  display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11.5px;
  font-weight: 700; background: #eef0fb; color: #3f4a9c; border: 1px solid #d3d8f0;
}
.prio.sofa { background: #ede9fe; color: #5b21b6; }
.vanpill {
  display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11.5px;
  font-weight: 700; background: #f1f5f9; color: #475569; border: 1px solid #dbe3ec;
}
.qrpill {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; white-space: nowrap; cursor: default;
}
.qrpill.ok { background: #e7f5ea; color: #1a7f37; border: 1px solid #b7e0c1; }
.qrpill.no { background: #fdecea; color: #b42318; border: 1px solid #f5c2bd; }
