:root {
  color-scheme: light;
  --ink: #1c1917;
  --muted: #57534e;
  --line: #d6d3d1;
  --paper: #fffdf8;
  --head: #f5f0e8;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 24px/1.45 "Liberation Sans", "Nimbus Sans", sans-serif;
}
.site-head {
  display: flex;
  justify-content: center;
  min-height: 180px;
  background: #c5d5c4 url("/header-minta.png") left center / auto 180px repeat-x;
}
.site-head-inner {
  width: 100%;
  max-width: 1100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 20px;
}
.site-title {
  margin: 0;
  color: #fff;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.2;
}
.site-head .lead {
  margin: 8px 0 0;
  color: #fff;
}
.site-head img {
  height: 124px;
  width: auto;
  display: block;
}
@media (max-width: 800px) {
  .site-head { background-size: auto 140px; }
  .site-head-inner {
    align-items: stretch;
    flex-direction: column;
    padding: 12px;
    gap: 8px;
  }
  .site-head a { align-self: flex-end; }
  .site-head img { height: 72px; max-width: 100%; }
  .site-title { font-size: 32px; }
}
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}
h1 { font-size: 40px; line-height: 1.2; margin: 0 0 12px; }
h2 { font-size: 28px; margin: 28px 0 8px; }
.lead, .note { color: var(--muted); }
a { color: #1d4ed8; }
.docs-doboz {
  margin: 24px 0 0;
  border: 1px solid #8eaa96;
}
.docs-fej {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 12px 14px;
  background: #5f7666;
  color: #fff;
}
.docs-fej a {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.docs-fej a:hover { text-decoration: underline; }
.docs-fej a.datum { justify-self: end; }
.ures {
  margin: 0;
  padding: 16px 14px;
  color: var(--muted);
}
.docs {
  list-style: none;
  padding: 0;
  margin: 0;
  border: 0;
}
.docs li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 16px 14px;
  border-top: 1px solid #8eaa96;
}
.jelol {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}
.jelol input,
.tobb input[type="checkbox"] {
  width: 28px;
  height: 28px;
  accent-color: #163e28;
}
.tobb label {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mappa-jel {
  color: var(--muted);
  font-size: 0.8em;
  white-space: nowrap;
}
.morzsa { margin: 16px 0 0; }
.morzsa a { font-weight: 700; }
.docs li:nth-child(odd) { background: #d5e3d8; }
.docs li:nth-child(even) { background: #eef4f0; }
.docs > li > span:not(.doc-name) {
  color: var(--muted);
  white-space: nowrap;
}
.doc-name {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.doc-name a {
  min-width: 0;
  overflow-wrap: anywhere;
}
.torol { margin: 0; flex: 0 0 auto; }
.torol button {
  width: 32px;
  height: 32px;
  padding: 4px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #3d5346;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.torol button:hover,
.torol button:focus {
  color: #991b1b;
  background: rgba(153, 27, 27, 0.08);
}
.torol svg {
  width: 20px;
  height: 20px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* toolbar */
.panel {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1.15fr) minmax(0, 0.95fr) auto;
  column-gap: 12px;
  row-gap: 14px;
  align-items: center;
  width: 100%;
  max-width: 100%;
  position: relative;
  z-index: 2;
}
.upload,
.keres,
.uj-mappa { display: contents; }

.belepes {
  display: flex;
  gap: 10px;
  grid-column: 1 / -1;
  grid-row: 1;
  min-width: 0;
  position: relative;
  z-index: 3;
}
.belepes input[type="email"] {
  flex: 1.35 1 0;
  min-width: 0;
}
.belepes input[type="password"] {
  flex: 1 1 0;
  min-width: 0;
}
.belepes button {
  flex: 0 0 auto;
}

.belepett-sav {
  grid-column: 1 / -1;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 8px 14px;
  background: #eef4f0;
  border: 1px solid #8eaa96;
  border-radius: 8px;
}
.belepett-info {
  overflow-wrap: anywhere;
}
.belepett-info .szerep {
  color: var(--muted);
}
.belepett-gombok {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.kilepes-form { margin: 0; }
.panel .tanarok-nyito {
  background: #3f5348;
}
.panel .tanarok-nyito:hover {
  background: #2d3d35;
}
.panel .kilepes-gomb {
  background: #78716c;
}
.panel .kilepes-gomb:hover {
  background: #57534e;
}

.fajl {
  grid-column: 1 / 4;
  grid-row: 2;
  justify-self: stretch;
  position: relative;
  z-index: 1;
  font: inherit;
  height: 48px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.upload button { grid-column: 4; grid-row: 2; }

.keres input[type="search"] {
  grid-column: 1 / 4;
  grid-row: 3;
  width: calc(50% - 6px);
  min-width: 0;
  justify-self: start;
}
.uj-mappa input[type="text"] {
  grid-column: 1 / 4;
  grid-row: 3;
  width: calc(50% - 6px);
  min-width: 0;
  justify-self: end;
}
.uj-mappa button { grid-column: 4; grid-row: 3; }

.tobb {
  display: grid;
  grid-column: 1 / -1;
  grid-row: 4;
  grid-template-columns: subgrid;
  column-gap: 12px;
  row-gap: 0;
  margin: 0;
  min-width: 0;
}
.sor-muvelet {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: subgrid;
  column-gap: 12px;
  row-gap: 0;
  align-items: center;
  min-width: 0;
}
.sor-bal {
  grid-column: 1 / 3;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex-wrap: wrap;
}
.mappa-valaszto {
  grid-column: 3;
  position: relative;
  min-width: 0;
  max-width: 100%;
}
.tobb .athelyez { grid-column: 4; width: 100%; min-width: 0; }

.keres input[type="search"],
.uj-mappa input[type="text"],
.belepes input[type="email"],
.belepes input[type="password"],
.belepes button,
.panel .mappa-nyito,
.panel button {
  height: 48px;
  box-sizing: border-box;
  font: inherit;
  border-radius: 8px;
}
.keres input[type="search"],
.uj-mappa input[type="text"],
.belepes input[type="email"],
.belepes input[type="password"],
.panel .mappa-nyito {
  padding: 0 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 400;
}
.panel .mappa-nyito {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  cursor: pointer;
}
.panel .mappa-nyito::after {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-right: 2px solid #44403c;
  border-bottom: 2px solid #44403c;
  transform: rotate(45deg);
}
.mappa-lista {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(28, 25, 23, 0.18);
  max-height: 240px;
  overflow: auto;
}
.mappa-lista[hidden] { display: none; }
.panel .mappa-lista button {
  display: block;
  width: 100%;
  height: auto;
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  font-weight: 400;
  text-align: left;
  white-space: normal;
}
.panel .mappa-lista button:hover,
.panel .mappa-lista button:focus {
  background: #1d4ed8;
  color: #fff;
}
.panel button {
  padding: 0 18px;
  border: 0;
  font-weight: 700;
  color: #fff;
  background: #163e28;
  cursor: pointer;
  white-space: nowrap;
}
.upload button,
.uj-mappa button { width: 100%; min-width: 0; }
.panel button:hover { background: #102e20; }
.tobb button {
  font: inherit;
  font-weight: 700;
  color: #fff;
  background: #991b1b;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  cursor: pointer;
  width: auto;
  min-width: 0;
}
.tobb button:hover { background: #7f1d1d; }
.tobb .athelyez { background: #163e28; }
.tobb .athelyez:hover { background: #102e20; }

/* Admin user management panel */
.tanar-panel {
  margin: 18px 0 0;
  padding: 18px;
  background: #eef4f0;
  border: 1px solid #8eaa96;
  border-radius: 8px;
}
.tanar-panel[hidden] { display: none; }
.tanar-panel h2 {
  margin: 0 0 6px;
  font-size: 26px;
}
.tanar-seged {
  margin: 0 0 14px;
  color: var(--muted);
}
.tanar-uj {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}
.tanar-uj input,
.tanar-uj select,
.tanar-uj button {
  height: 48px;
  font: inherit;
  border-radius: 8px;
}
.tanar-uj input,
.tanar-uj select {
  padding: 0 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  min-width: 0;
}
.tanar-uj button {
  padding: 0 18px;
  border: 0;
  font-weight: 700;
  color: #fff;
  background: #163e28;
  cursor: pointer;
}
.tanar-uj button:hover { background: #102e20; }
.tanar-lista {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid #8eaa96;
  background: #fff;
}
.tanar-lista li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-top: 1px solid #8eaa96;
}
.tanar-lista li:first-child { border-top: 0; }
.tanar-lista li:nth-child(odd) { background: #d5e3d8; }
.tanar-lista li:nth-child(even) { background: #eef4f0; }
.tanar-email {
  font-weight: 700;
  overflow-wrap: anywhere;
}
.tanar-szerep,
.tanar-sajat {
  color: var(--muted);
  white-space: nowrap;
}
.tanar-lista form { margin: 0; }
.tanar-torol {
  height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-size: 0.85em;
  font-weight: 700;
  color: #fff;
  background: #991b1b;
  cursor: pointer;
}
.tanar-torol:hover { background: #7f1d1d; }

@media (max-width: 800px) {
  body { font-size: 20px; }
  .docs li,
  .docs-fej {
    grid-template-columns: 44px minmax(0, 1fr);
  }
  .docs li > span:last-child,
  .docs-fej a.datum { grid-column: 2; justify-self: start; }
  .doc-name { width: 100%; align-items: flex-start; }
  .panel { grid-template-columns: minmax(0, 1fr); }
  .tobb,
  .sor-muvelet { grid-template-columns: minmax(0, 1fr); }
  .fajl,
  .keres input[type="search"],
  .upload button,
  .uj-mappa input[type="text"],
  .uj-mappa button,
  .sor-bal,
  .mappa-valaszto,
  .tobb .athelyez {
    grid-column: 1;
    grid-row: auto;
    width: 100%;
    max-width: 100%;
  }
  .belepes,
  .belepett-sav {
    grid-column: 1;
    grid-row: auto;
    width: 100%;
    order: 1;
  }
  .belepes {
    flex-direction: column;
  }
  .belepes input[type="email"],
  .belepes input[type="password"],
  .belepes button {
    width: 100%;
    flex: none;
  }
  .fajl { order: 2; justify-self: stretch; width: 100%; }
  .upload button { order: 3; }
  .keres input[type="search"] { order: 4; justify-self: stretch; }
  .uj-mappa input[type="text"] { order: 5; justify-self: stretch; }
  .uj-mappa button { order: 6; }
  .sor-bal { order: 7; }
  .mappa-valaszto { order: 8; }
  .tobb .athelyez { order: 9; }
  .tanar-uj {
    grid-template-columns: minmax(0, 1fr);
  }
  .tanar-lista li {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }
}

.lapoz {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 16px;
}
.lapoz a,
.lapoz .most {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 6px 12px;
  border: 1px solid #8eaa96;
  border-radius: 8px;
  text-decoration: none;
  color: #1c1917;
  background: #eef4f0;
}
.lapoz .most {
  background: #5f7666;
  color: #fff;
  font-weight: 700;
}
.lapoz a:hover { background: #d5e3d8; }
.msg { margin: 16px 0 0; }
.msg.ok { color: #166534; }
.msg.err { color: #991b1b; }

.mappa-gombok {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
}
.mappa-gomb {
  display: inline-block;
  background: #3f5348;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  padding: 0.45rem 0.95rem;
  font-weight: 700;
}
.mappa-gomb:hover,
.mappa-gomb:focus { background: #2d3d35; }
.mappa-gomb.aktiv { background: #5f7666; }
