/* ══════════════════════════════════════════════════════
   WritingReview – közös stíluslap
   Betöltési sorrend: app.css → (csak a belépő oldalon) auth.css
   ══════════════════════════════════════════════════════ */

/* ══════ Helyi betűtípusok (Syne, DM Sans) ══════
   A Google Fonts-ról letöltött, saját tárhelyről kiszolgált változó betűtípusok (SIL Open Font License 1.1):
   a látogatók IP-címe így nem kerül a Google-hez. A latin-ext részhalmaz a magyar ő/ű miatt kell. */
@font-face {
  font-family: 'DM Sans';
  font-style: italic;
  font-weight: 100 1000;
  font-display: swap;
  src: url(fonts/dmsans-italic-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'DM Sans';
  font-style: italic;
  font-weight: 100 1000;
  font-display: swap;
  src: url(fonts/dmsans-italic-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url(fonts/dmsans-normal-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url(fonts/dmsans-normal-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Syne';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(fonts/syne-normal-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Syne';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(fonts/syne-normal-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}


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

/* ── DESIGN TOKENEK ── */
:root {
  --ink:    #0f0f0f;
  --paper:  #f5f2ec;
  --card:   #ffffff;
  --border: #e0dbd2;
  --muted:  #7a7670;

  --accent:         #d4500a;   /* tanári felület: narancs */
  --accent-light:   #fff4f0;
  --accent-on-dark: #d4500a;   /* sötét topbaron használt változat */

  --ok:         #16a34a;
  --ok-light:   #f0fdf4;
  --warn:       #d97706;
  --warn-light: #fffbeb;
  --err:        #c0392b;
  --err-light:  #fdecea;

  --topbar-h: 60px;
}

/* Diák felület: kék akcentus – <body class="theme-diak"> */
body.theme-diak {
  --accent:         #2563eb;
  --accent-light:   #eff6ff;
  --accent-on-dark: #60a5fa;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
}

/* ── TOPBAR ── */
.topbar {
  background: var(--topbar-bg, var(--ink));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 2rem;
  height: var(--topbar-h);
  position: sticky;
  top: 0;
  z-index: 100;
}
.brand {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}
.brand span { color: var(--accent-on-dark); }

.topbar-right { display: flex; align-items: center; gap: 1.5rem; }
.user-info { font-size: 0.85rem; color: #aaa; }
.user-info strong { color: #fff; font-weight: 500; }

.btn-logout {
  padding: 0.4rem 1rem;
  border: 1.5px solid #444;
  border-radius: 6px;
  background: transparent;
  color: #aaa;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-logout:hover { border-color: var(--accent-on-dark); color: var(--accent-on-dark); }

/* Nyelvválasztó a fejlécben – a kilépés gombbal egy stílusban */
.nyelvvalaszto {
  width: auto;
  padding: 0.4rem 0.5rem;
  border: 1.5px solid #444;
  border-radius: 6px;
  background: transparent;
  color: #aaa;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
  flex-shrink: 0;
}
.nyelvvalaszto:hover { border-color: var(--accent-on-dark); color: var(--accent-on-dark); }
.nyelvvalaszto option { color: #111; background: #fff; }

/* ── LAYOUT + SIDEBAR ── */
.layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100vh - var(--topbar-h));
}
.sidebar {
  background: var(--sidebar-bg, #fff);
  border-right: 1.5px solid var(--border);
  padding: 1.5rem 0;
}
.nav-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  padding: 0 1.5rem;
  margin: 1rem 0 0.5rem;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1.5rem;
  font-size: 0.9rem;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.15s;
  cursor: pointer;
  border-left: 3px solid transparent;
}
.nav-item:hover { background: var(--paper); }
.nav-item.active {
  background: var(--accent-light);
  border-left-color: var(--accent);
  color: var(--accent);
  font-weight: 500;
}
.nav-icon { font-size: 1.1rem; }

/* ── MAIN + FEJLÉC ── */
.main { padding: 2.5rem; }
.main.narrow { max-width: 900px; }
.main.centered { max-width: 700px; margin: 0 auto; padding: 2.5rem 1.5rem; }

.page-header { margin-bottom: 2rem; }
.page-header.split {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.page-header h1 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.8rem;
  letter-spacing: -0.03em;
  margin-bottom: 0.3rem;
}
.page-header p { color: var(--muted); font-size: 0.9rem; }

.section-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ── GOMBOK ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  background: var(--ink);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  white-space: nowrap;
}
.btn-primary:hover { background: #2a2a2a; }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { background: #ccc; cursor: not-allowed; }

.btn-sm {
  padding: 0.4rem 0.8rem;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-sm:hover { border-color: #999; }
.btn-sm.danger:hover { border-color: var(--err); color: var(--err); }
/* A sor fő művelete (pl. a feladatlista „Link” gombja): kitűnik a többi kis gomb közül. */
.btn-sm.kiemelt { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-sm.kiemelt:hover { filter: brightness(1.08); }

.btn-copy {
  padding: 0.5rem 1rem;
  border: 1.5px solid #444;
  border-radius: 6px;
  background: transparent;
  color: #aaa;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-copy:hover { border-color: var(--accent); color: var(--accent); }

/* ── FORM ── */
.form-group { margin-bottom: 1.2rem; }
label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
input[type="text"], input[type="email"], input[type="password"], textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.2s;
  outline: none;
  resize: vertical;
}
input:focus, textarea:focus { border-color: var(--accent); }

/* ── ÜZENETEK ── */
.msg {
  margin-top: 1rem;
  padding: 0.7rem 1rem;
  border-radius: 7px;
  font-size: 0.875rem;
  display: none;
}
.msg.error   { background: var(--err-light); color: var(--err); display: block; }
.msg.success { background: var(--ok-light);  color: var(--ok);  display: block; }

/* ── PANEL ── */
.panel {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  margin-bottom: 2rem;
  overflow: hidden;
}
.panel-header {
  padding: 1.2rem 1.5rem;
  border-bottom: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.panel-header h2 { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 1.05rem; }
.panel-body { padding: 1.5rem; }
.panel-body.flush { padding: 0.5rem 0; }

/* ── STAT KÁRTYÁK (tanári főoldal) ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.stat-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 1.3rem 1.5rem;
}
.stat-label {
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.stat-value {
  font-family: 'Syne', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}
.stat-value.accent { color: var(--accent); }
.stat-value.kicsi { font-size: 1.25rem; }
.stat-value small { font-size: 0.7em; font-weight: 500; color: var(--muted); }

/* ── MODUL KÁRTYÁK (tanári főoldal) ── */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}
.module-card {
  display: block;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: box-shadow 0.2s, border-color 0.2s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.module-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.08); border-color: #ccc; }
.module-icon { font-size: 2rem; margin-bottom: 0.8rem; }
.module-title { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 1.05rem; margin-bottom: 0.3rem; }
.module-desc { font-size: 0.85rem; color: var(--muted); line-height: 1.5; }
.module-badge {
  display: inline-block;
  margin-top: 0.8rem;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--accent-light);
  color: var(--accent);
}

/* ── FELTÖLTÉS ZÓNA (feladatok) ── */
.upload-zone {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--paper);
}
.upload-zone:hover, .upload-zone.drag-over { border-color: var(--accent); background: var(--accent-light); }
.upload-zone input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.upload-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.upload-zone p { font-size: 0.875rem; color: var(--muted); }
.upload-zone strong { color: var(--ink); }
.upload-preview {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: var(--ok-light);
  border-radius: 8px;
  font-size: 0.875rem;
  color: var(--ok);
  display: none;
  align-items: center;
  gap: 0.5rem;
}
.upload-preview.show { display: flex; }

/* ── PROMPT TERÜLET (feladatok) ── */
.prompt-area { position: relative; }
.prompt-loading {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.85);
  border-radius: 8px;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--muted);
}
.prompt-loading.show { display: flex; }
.prompt-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.7rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--ok-light);
  color: var(--ok);
  margin-bottom: 0.5rem;
}

/* ── OSZTÁLYKÓD KIJELZŐ (feladatok) ── */
.kod-display {
  display: none;
  margin-top: 1rem;
  padding: 1rem 1.2rem;
  background: var(--ink);
  border-radius: 10px;
  color: #fff;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.kod-display.show { display: flex; }
.kod-label { font-size: 0.78rem; color: #888; margin-bottom: 0.2rem; }
.kod-text {
  font-family: 'Syne', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--accent);
}

/* ── KÓDBEÍRÓ KÁRTYA (diák) ── */
.code-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 1.8rem;
  margin-bottom: 2rem;
}
.code-card h2 { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 1.1rem; margin-bottom: 0.3rem; }
.code-card p { color: var(--muted); font-size: 0.875rem; margin-bottom: 1.2rem; }
.code-input-row { display: flex; gap: 0.75rem; }
.code-input {
  flex: 1;
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.code-input::placeholder {
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  letter-spacing: 0;
  font-size: 0.95rem;
  text-transform: none;
  color: #bbb;
}

/* ── LISTA KÁRTYÁK (feladatok + beadások) ── */
.list-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 1.2rem 1.5rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.list-card h3 { font-weight: 500; font-size: 0.95rem; margin-bottom: 0.25rem; }
.list-card-meta { font-size: 0.8rem; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.list-card-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }

.feladat-kod {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-light);
  padding: 0.2rem 0.6rem;
  border-radius: 5px;
}

/* ── BADGE-EK ── */
.badge {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge.feltoltve   { background: var(--warn-light); color: var(--warn); }
.badge.folyamatban { background: #eff6ff; color: #2563eb; }
.badge.javitva     { background: var(--ok-light); color: var(--ok); }
.badge.elkuldve    { background: var(--ok-light); color: #15803d; }
.badge.aktiv       { background: var(--ok-light); color: var(--ok); }
.badge.inaktiv     { background: #f3f4f6; color: #999; }

/* ── ÜRES ÁLLAPOT ── */
.empty-state {
  background: #fff;
  border: 1.5px dashed var(--border);
  border-radius: 12px;
  padding: 2.5rem;
  text-align: center;
  color: var(--muted);
}
.empty-state.bare { background: none; border: none; }
.empty-state .empty-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.empty-state p { font-size: 0.9rem; line-height: 1.6; }

/* ── SPINNER + BETÖLTŐ KÉPERNYŐ ── */
.spinner {
  width: 24px;
  height: 24px;
  border: 2.5px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.spinner.inline {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-width: 2px;
  border-color: rgba(255,255,255,0.4);
  border-top-color: #fff;
  vertical-align: middle;
  margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

#loading-screen {
  position: fixed;
  inset: 0;
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem;
  color: var(--muted);
  text-align: center;
  padding: 2rem;
}

/* ── RESZPONZÍV ── */
@media (max-width: 700px) {
  .topbar { padding: 0 1.25rem; }
  .topbar-right { gap: 1rem; }
  .layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main { padding: 1.5rem; }
  .list-card { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 500px) {
  .code-input-row { flex-direction: column; }
  .code-input-row .btn-primary { width: 100%; justify-content: center; }
}

/* ── AUTH KAPU: a .gated osztályt a guard.js távolítja el ── */
.gated { display: none !important; }

/* ══════════════════════════════════════════════════════
   2. ÜTEM – osztályok, rubrika-űrlap, javítási sor, beadás
   ══════════════════════════════════════════════════════ */

.halvany { color: var(--muted); font-size: 0.85rem; line-height: 1.55; }
.lejart { color: var(--err); font-weight: 500; }
.vissza-link {
  display: inline-block;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  margin-bottom: 1.2rem;
}
.vissza-link:hover { color: var(--accent); }
.gomb-sor { display: flex; gap: 0.75rem; margin-top: 1.5rem; flex-wrap: wrap; }
.ket-hasab { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.nyil { color: var(--muted); font-size: 1.2rem; }
.list-card.kattinthato { cursor: pointer; }
.list-card.kattinthato:hover { border-color: var(--accent); }
.module-card.halvanyitott { opacity: 0.55; cursor: default; }
.module-card.halvanyitott:hover { box-shadow: none; border-color: var(--border); }
a.stat-card { text-decoration: none; color: inherit; display: block; transition: border-color 0.2s; }
a.stat-card:hover { border-color: var(--accent); }

select,
input[type="date"],
input[type="month"],
input[type="number"] {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s;
}
select:focus,
input[type="date"]:focus,
input[type="month"]:focus,
input[type="number"]:focus { border-color: var(--accent); }

/* ── ADMIN: AI-használat számoló ── */
.szamolo-racs { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0 1rem; margin-top: 1rem; }
.szamolo-pipa { display: flex; gap: 0.6rem; align-items: center; margin-top: 0.5rem; font-size: 0.9rem; cursor: pointer; }
.szamolo-pipa input { width: auto; }
.szamolo-alcim { font-family: 'Syne', sans-serif; font-size: 0.95rem; margin: 1.6rem 0 0.4rem; }

/* ── TÁBLÁZAT ── */
.tabla { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.tabla th {
  text-align: left;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  border-bottom: 1.5px solid var(--border);
}
.tabla td { padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border); }
.tabla tr:last-child td { border-bottom: none; }

/* ── NÉVSOR ── */
.nevsor-box {
  background: var(--paper);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin: -0.25rem 0 0.75rem;
  /* Az email-címekkel a névsor telefonon szélesebb, mint a kijelző –
     a táblázat a saját keretén belül görgethető, az oldal nem lóg túl. */
  overflow-x: auto;
}
.nevsor-box .tabla { min-width: 340px; }

/* ── CÍMKÉK (diák osztályai) ── */
.cimke-sor { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.cimke {
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--accent-light);
  color: var(--accent);
}

/* ── RUBRIKA ŰRLAP ── */
.rubrika-blokk {
  position: relative;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  background: var(--paper);
  margin-bottom: 1rem;
}
.rubrika-fejlec {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}
.rubrika-fejlec h3 { font-family: 'Syne', sans-serif; font-size: 1rem; font-weight: 700; }
.rubrika-fejlec .prompt-badge { margin-bottom: 0; }
.rubrika-tolt {
  position: absolute;
  inset: 0;
  background: rgba(245, 242, 236, 0.92);
  border-radius: 12px;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--muted);
  z-index: 2;
}
.rubrika-tolt.show { display: flex; }

.szempont-sor {
  display: grid;
  grid-template-columns: 120px 1fr 90px auto;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  align-items: center;
}
.szempont-sor input { padding: 0.55rem 0.7rem; font-size: 0.875rem; }

.suly-jelzo {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.15rem 0.55rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}
.suly-jelzo.ok { background: var(--ok-light); color: var(--ok); }
.suly-jelzo.figyelem { background: var(--warn-light); color: var(--warn); }

/* ── SZŰRŐ SÁV ── */
.szuro { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.szuro-btn {
  padding: 0.45rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.2s;
}
.szuro-btn:hover { border-color: #999; }
.szuro-btn.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ── ÁTIRAT ── */
.atirat {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  line-height: 1.7;
  background: var(--paper);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.15rem;
  margin: 0.5rem 0;
}
.hiba-szoveg {
  margin-top: 0.4rem;
  font-size: 0.8rem;
  color: var(--err);
}
.badge.hiba { background: var(--err-light); color: var(--err); }

/* ── KÉPEK ── */
.kep-sor { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.75rem; }
.kep-sor img {
  width: 110px;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  display: block;
}
.kep-elem { position: relative; }
.kep-label {
  font-size: 0.7rem;
  color: var(--muted);
  text-align: center;
  margin-top: 0.25rem;
}
.kep-torol {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: var(--err);
  color: #fff;
  font-size: 0.7rem;
  cursor: pointer;
  line-height: 1;
}

/* ── VETÍTÉS (feladat kivetítése órán) ──
   Sötét háttér, nagy betű: projektoron a világos háttér kimos, és a
   hátsó padból is olvasható kell legyen. */
.vetites {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 600;
  background: var(--ink);
  color: #fff;
  overflow-y: auto;
}
.vetites.show { display: block; }
.vetites-sav {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(var(--ink) 70%, transparent);
  z-index: 1;
}
.vetites-sav .btn-sm { background: rgba(255,255,255,0.1); color: #fff; border-color: rgba(255,255,255,0.25); }
.vetites-tartalom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 3rem) 3rem;
}
.vetites h1 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(1.8rem, 4.5vw, 3.4rem);
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.vetites-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 0.9rem;
  font-size: clamp(1rem, 2vw, 1.4rem);
  color: rgba(255,255,255,0.7);
}
.vetites-leiras {
  margin-top: 1.8rem;
  padding-left: 1.2rem;
  border-left: 4px solid var(--accent);
  font-size: clamp(1.2rem, 2.6vw, 2rem);
  line-height: 1.5;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.vetites-lap { margin-top: 2rem; }
.vetites-lap img {
  display: block;
  max-width: 100%;
  margin: 0 auto;
  background: #fff;
  border-radius: 8px;
}
.vetites-lap iframe {
  display: block;
  width: 100%;
  height: 85vh;
  border: 0;
  border-radius: 8px;
  background: #fff;
}
.vetites-lap > .btn-sm { background: rgba(255,255,255,0.1); color: #fff; border-color: rgba(255,255,255,0.25); }
.vetites-lap > .btn-sm + div { margin-top: 1rem; }

/* ── FELADATLINK: megosztás és kivetítés (megosztas.html) ──
   A QR-kód fehér alapon kell legyen (sötét témában és kivetítve is),
   különben a telefon kamerája nem olvassa. */
.link-megosztas {
  display: grid;
  grid-template-columns: minmax(160px, 220px) 1fr;
  gap: 1.5rem;
  align-items: start;
}
.link-qr { background: #fff; border-radius: 10px; padding: 0.5rem; }
.link-qr svg, .vetites-qr svg { display: block; width: 100%; height: auto; }
.link-adatok label { display: block; margin-bottom: 0.35rem; }
.link-adatok input[readonly] { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85rem; }
.link-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  margin: 0.9rem 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.link-meta strong { font-variant-numeric: tabular-nums; color: var(--ink); }
@media (max-width: 600px) {
  .link-megosztas { grid-template-columns: 1fr; }
  .link-qr { max-width: 240px; }
}
.vetites-link {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem 2.5rem;
  margin-top: 1.8rem;
}
.vetites-qr {
  width: min(42vh, 420px);
  background: #fff;
  border-radius: 12px;
  padding: 0.75rem;
}
.vetites-cim-szoveg {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: clamp(1rem, 2.2vw, 1.6rem);
  overflow-wrap: anywhere;
}
.vetites-link .vetites-meta { font-variant-numeric: tabular-nums; }

/* ── MODAL ── */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 15, 15, 0.55);
  z-index: 500;
  padding: 2rem 1rem;
  overflow-y: auto;
}
.modal.show { display: block; }
.modal-box {
  background: var(--paper);
  border-radius: 14px;
  max-width: 760px;
  margin: 0 auto;
  overflow: hidden;
}
.modal-fejlec {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 1.5rem;
  background: var(--ink);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1;
}
.modal-fejlec h2 { font-family: 'Syne', sans-serif; font-size: 1.05rem; font-weight: 700; }
.modal-torzs { padding: 1.5rem; }

.m-szekcio {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.m-szekcio.kiemelt { border-color: var(--accent); }
.m-szekcio h4 {
  font-family: 'Syne', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.hiba-lista { display: flex; flex-direction: column; gap: 0.75rem; }
.hiba-elem {
  border-left: 3px solid var(--warn);
  padding: 0.5rem 0 0.5rem 0.85rem;
  font-size: 0.875rem;
  line-height: 1.6;
}
.hiba-elem s { color: var(--err); }
.lista-pontok { padding-left: 1.2rem; font-size: 0.875rem; line-height: 1.7; }

/* ── DIÁK: ÁLLAPOT ÉS JEGY ── */
.allapot-fej { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.jegy-kartya {
  background: var(--ink);
  border-radius: 14px;
  padding: 1.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
}
.jegy-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #888;
  margin-bottom: 0.25rem;
}
.jegy-szam {
  font-family: 'Syne', sans-serif;
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--accent-on-dark);
}
.visszajelzes-szoveg { font-size: 0.95rem; line-height: 1.8; }

details summary {
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
}

@media (max-width: 700px) {
  .ket-hasab { grid-template-columns: 1fr; }
  .szempont-sor { grid-template-columns: 1fr 1fr 70px auto; }
  .modal { padding: 0; }
  .modal-box { border-radius: 0; min-height: 100vh; }
}

/* ── TOPBAR SZŰK KIJELZŐN ──
   A tanári topbar ("👨‍🏫 Tanár | Név" + Kilépés) 375 px-en túllógott.
   Flexbox-buktató: a nowrap egy sorba kényszeríti a nevet, de a
   .topbar-right csak akkor tud zsugorodni, ha min-width: 0 – e nélkül
   a szövege alá "beragad" a saját tartalmi minimumánál. */
.brand { flex-shrink: 0; }
.topbar-right { min-width: 0; }
.user-info {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.btn-logout { flex-shrink: 0; }
@media (max-width: 700px) {
  .csak-nagy { display: none; }
}

/* ── SAJÁT NÉV KÁRTYA (diák) ── */
.nev-kartya {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}
.nev-sor {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.nev-sor .halvany { margin: 0; }
.nev-sor strong { font-size: 0.95rem; }
.nev-sor .btn-sm { margin-left: auto; }
.nev-kartya .msg { margin-top: 0.75rem; }

@media (max-width: 500px) {
  .nev-sor .btn-sm { margin-left: 0; }
}

/* ── NÉVSOR: eltávolító gomb ── */
.tabla-akcio { width: 1%; white-space: nowrap; text-align: right; }
.tabla-akcio .btn-sm { padding: 0.2rem 0.5rem; line-height: 1; }

/* ── RUBRIKA-SABLONOK ── */
.sablon-sav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.75rem 0 1.25rem;
  flex-wrap: wrap;
}
.sablon-sav select { flex: 1; min-width: 180px; padding: 0.55rem 0.7rem; font-size: 0.875rem; }
.sablon-sav .btn-sm { flex-shrink: 0; }
.sablon-sav .btn-sm:disabled { opacity: 0.4; cursor: not-allowed; }
#sablon-msg { margin-top: 0; margin-bottom: 1rem; }

/* ── HÁROM HASÁB (nyelv / típus / szint) ── */
.harom-hasab { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 700px) {
  .harom-hasab { grid-template-columns: 1fr; }
}

/* ── OSZTÁLYSZINTŰ ELEMZÉS ── */
.sav-sor {
  display: grid;
  grid-template-columns: 130px 1fr 120px;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}
.sav-cimke { font-size: 0.875rem; font-weight: 500; }
.sav-ertek { font-size: 0.8rem; color: var(--muted); text-align: right; white-space: nowrap; }
.sav {
  height: 10px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.sav-kitolt { height: 100%; border-radius: 6px; transition: width 0.3s; }
.sav-kitolt.baj     { background: var(--err); }
.sav-kitolt.kozepes { background: var(--warn); }
.sav-kitolt.jo      { background: var(--ok); }

.elem-kartya {
  border-left: 3px solid var(--accent);
  padding: 0.6rem 0 0.6rem 1rem;
  margin-bottom: 1.1rem;
}
.elem-kartya h4 {
  font-family: 'Syne', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.elem-kartya p { font-size: 0.9rem; line-height: 1.6; margin-bottom: 0.3rem; }
.elem-kartya .lista-pontok { margin-top: 0.4rem; }

@media (max-width: 700px) {
  .sav-sor { grid-template-columns: 1fr; gap: 0.25rem; }
  .sav-ertek { text-align: left; }
}

/* ══════════════════════════════════════════════════════
   BEMUTATÓ (tura.js)

   Reflektorfény négy sávval, nem kivágott maszkkal: a sávok elnyelik a
   kattintásokat, a cél viszont kattintható marad. A z-index 2000 fölött
   van, mert a lapon már van 999-es és egy 500-as modál – a bemutatónak
   azok fölé kell kerülnie, hogy a modál tartalmát is ki tudja emelni.
   ══════════════════════════════════════════════════════ */

/* ── villanykörte a topbaron ── */
.tura-korte {
  flex-shrink: 0;            /* a topbar 375px-en is elfért – ne rontsuk el */
  padding: 0.35rem 0.6rem;
  border: 1.5px solid #444;
  border-radius: 6px;
  background: transparent;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.tura-korte:hover { border-color: #777; background: #ffffff14; }
.tura-korte:focus-visible { outline: 2px solid var(--accent-on-dark); outline-offset: 2px; }

/* A villanykörte 43px-et kér a topbaron, és 375px-en ettől a Kilépés
   gomb kicsúszott a képből (mérve: 328–407, a képernyő 375). A topbar
   korábban 8px tartalékkal fért el, tehát helyet kell csinálni:
   szűkebb szegély, kisebb rések, kisebb körte. */
@media (max-width: 500px) {
  .topbar { padding: 0 0.85rem; }
  .topbar-right { gap: 0.55rem; }
  .tura-korte { padding: 0.3rem 0.45rem; font-size: 0.95rem; }
  /* A márkanév a legnagyobb tétel a sorban (216px), és nem zsugorodik.
     Enélkül a Kilépés gomb 5px-et még kicsúszik 375px-en. */
  .brand { font-size: 1.05rem; }
}

/* ── a reflektor ── */
.tura-gyoker { display: none; }
.tura-gyoker.lathato { display: block; }

.tura-sav {
  position: fixed;
  background: #0f0f0fa8;
  z-index: 2000;
}
.tura-gyoker.nincs-cel .tura-sav {
  inset: 0;                  /* cél nélkül teljes elhalványítás */
  width: auto; height: auto;
}

.tura-gyuru {
  position: fixed;
  display: none;
  z-index: 2001;
  border: 2px solid var(--accent);
  border-radius: 10px;
  box-shadow: 0 0 0 3px #d4500a33;
  pointer-events: none;      /* a cél kattintható marad */
}

/* ── a buborék ── */
.tura-bubi {
  position: fixed;
  z-index: 2002;
  width: min(360px, calc(100vw - 24px));
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 18px 44px #0f0f0f40;
  padding: 1rem 1.15rem 0.9rem;
}
.tura-bubi:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.tura-gyoker.nincs-cel .tura-bubi {
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
}
.tura-bubi.menu { width: min(460px, calc(100vw - 24px)); }

/* Telefonon alsó lapként ül: 380px-en nincs hely a cél mellett */
.tura-bubi.lap {
  left: 12px; right: 12px; bottom: 12px; top: auto;
  width: auto;
  max-height: 62vh;
  overflow-y: auto;
}

.tura-bubi.beugrik { animation: tura-be 0.18s ease-out; }
@keyframes tura-be { from { opacity: 0; transform: translateY(6px); } }
.tura-gyoker.nincs-cel .tura-bubi.beugrik { animation: none; }

.tura-fej {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}
.tura-szamlalo {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tura-zar {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.95rem;
  cursor: pointer;
  padding: 0.15rem 0.3rem;
  border-radius: 5px;
}
.tura-zar:hover { background: var(--paper); color: var(--ink); }

.tura-bubi h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.3;
  text-wrap: balance;
  margin-bottom: 0.5rem;
}
.tura-torzs { font-size: 0.875rem; line-height: 1.55; color: var(--ink); }
.tura-torzs p { margin-bottom: 0.55rem; }
.tura-torzs p:last-child { margin-bottom: 0; }
.tura-torzs em { color: var(--muted); font-style: italic; }

.tura-labs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.9rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
/* A hidden attribútumot a display:flex felülírná – a menü módban
   az alsó navigációnak el kell tűnnie. */
.tura-labs[hidden] { display: none; }
.tura-nav { display: flex; gap: 0.5rem; flex-shrink: 0; }
.tura-kihagy {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0.3rem 0;
  text-decoration: underline;
}
.tura-kihagy:hover { color: var(--ink); }
.tura-elozo, .tura-kovetkezo {
  padding: 0.45rem 0.85rem;
  border-radius: 7px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
}
.tura-elozo { border: 1.5px solid var(--border); background: var(--card); color: var(--ink); }
.tura-elozo:hover { border-color: var(--muted); }
.tura-kovetkezo { border: none; background: var(--accent); color: #fff; }
.tura-kovetkezo:hover { filter: brightness(1.08); }

/* ── a menü ── */
.tura-bevezeto { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.9rem; }
.tura-szakaszok { display: grid; gap: 0.5rem; }
.tura-szakasz {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  width: 100%;
  text-align: left;
  padding: 0.7rem 0.8rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: border-color 0.15s, background 0.15s;
}
.tura-szakasz:hover { border-color: var(--accent); background: var(--accent-light); }
.tura-szakasz.kesz { background: var(--paper); }
.tura-szakasz-ikon { font-size: 1.15rem; line-height: 1.3; flex-shrink: 0; }
.tura-szakasz-fo { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.tura-szakasz-cim { font-size: 0.9rem; font-weight: 500; color: var(--ink); }
.tura-pipa { color: var(--ok); font-weight: 700; }
.tura-szakasz-kimenet { font-size: 0.8rem; line-height: 1.45; color: var(--ink); }
.tura-szakasz-meta {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.tura-menu-labs {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.9rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border);
}
.tura-teljes {
  padding: 0.6rem 0.9rem;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  text-wrap: balance;
}
.tura-teljes:hover { filter: brightness(1.08); }
.tura-menu-zar {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0.35rem;
  text-decoration: underline;
}
.tura-menu-zar:hover { color: var(--ink); }

/* ── példaadat jelzése ──
   Minden bemutató-elem láthatóan példa: a tanár soha ne higgye egy
   valódi diák dolgozatának. */
.badge.tura-jelzo {
  background: var(--warn-light);
  color: var(--warn);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}
.tura-demo.panel { border-color: var(--warn); }
/* A példa átirat és prompt görgethető: e nélkül a szekció magasabb
   lenne a képernyőnél, és a buborék nem tudna elférni mellette. */
.tura-demo pre.atirat { max-height: 200px; overflow-y: auto; }
/* Csak a valóban hosszú részek görgethetők. Beágyazott görgetést
   (görgethető szekció a görgethető lapon) szándékosan NEM csinálunk:
   attól a scrollIntoView kiszámíthatatlanul viselkedik, és a reflektor
   rossz helyre kerül. */
.tura-demo .hiba-lista { max-height: 170px; overflow-y: auto; }
/* A bemutató szekciói görgethetők és korlátozott magasak. Ez nem
   kozmetika: a reflektor buborékának a kiemelés MELLETT kell elférnie,
   különben eltakarja azt, amire mutat. Egy 620px magas ablakban ez
   kb. 300px-es felső korlátot jelent a kiemelt elemre. */
.tura-demo .m-szekcio { max-height: 290px; overflow-y: auto; }

@media (prefers-reduced-motion: reduce) {
  .tura-bubi.beugrik { animation: none; }
  .tura-korte, .tura-szakasz { transition: none; }
}

/* ══════════════════════════════════════════════════════
   FEJLÉC-NAVIGÁCIÓ (fejlec.js)

   Telefonon az oldalsáv rejtve van, telepített appban a böngésző
   vissza gombja sincs – ez a két elem az egyetlen navigáció.
   ══════════════════════════════════════════════════════ */

/* A topbar space-between-nel rendez: a bal oldali elemeknek egy
   csoportban kell lenniük, különben a márkanév középre sodródik. */
.topbar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;          /* nélküle a hosszú név szétnyomja a sort */
}

a.brand {
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
  border-radius: 4px;
}
a.brand:hover span { filter: brightness(1.15); }
a.brand:focus-visible { outline: 2px solid var(--accent-on-dark); outline-offset: 3px; }

.btn-vissza {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  padding: 0.4rem 0.7rem;
  border: 1.5px solid #444;
  border-radius: 6px;
  background: transparent;
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s;
}
.btn-vissza:hover { border-color: #777; background: #ffffff14; }
.btn-vissza:focus-visible { outline: 2px solid var(--accent-on-dark); outline-offset: 2px; }

@media (max-width: 500px) {
  /* Szűk kijelzőn csak a nyíl marad – a cím a title/aria-label-ben van.
     A helyet a Kilépés feliratának elrejtésével teremtjük meg. */
  .btn-vissza-nev { display: none; }
  .topbar-left { gap: 0.5rem; }
  .btn-logout { font-size: 0; padding: 0.4rem 0.55rem; }
  .btn-logout::before { content: "🚪"; font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .btn-vissza { transition: none; }
}

/* ── PONTOZÁS SZERKESZTÉSE (javító modal) ──
   Telefonon a három oszlop nem fér ki: a táblázat a saját keretén belül
   görgethető, az oldal nem lóg túl. */
.tabla-gorgeto { overflow-x: auto; }
.pont-szerk { min-width: 460px; }
.pont-szerk td { vertical-align: top; }
.pont-szerk .pont-cella { white-space: nowrap; }
.pont-szerk .p-pont { width: 4.5rem; padding: 0.35rem 0.5rem; }
.pont-szerk .p-megj { width: 100%; min-width: 180px; padding: 0.35rem 0.5rem; font-size: 0.85rem; resize: vertical; }
.pont-szerk tfoot td { border-top: 1.5px solid var(--border); padding-top: 0.6rem; }

/* ── EREDMÉNY (diák visszajelzése) ── */
.eredmeny-tabla td:nth-child(2) { white-space: nowrap; font-weight: 600; }
.eredmeny-tabla tfoot td { border-top: 1.5px solid var(--border); font-weight: 700; }
.eredmeny-tabla .megj { color: var(--muted); font-size: 0.85rem; }

/* ── Jelölőnégyzet felirattal (feladat-űrlap, pl. a helyesírás-kapcsoló) ──
   A globális label nagybetűs „mezőcím”; itt a label maga a tartalom, ezért normál szöveg. */
.jelolo {
  display: flex; gap: 0.6rem; align-items: flex-start;
  margin: 0; color: var(--ink); font-size: 0.9rem; cursor: pointer;
  text-transform: none; letter-spacing: 0;
}
.jelolo input { margin-top: 0.2rem; accent-color: var(--accent); }
.jelolo small { display: block; color: var(--muted); font-size: 0.78rem; margin-top: 0.15rem; }

/* Panelfejléc jelvénnyel: a cím és a jelvény egy sorban */
.panel-header:has(.badge) { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }

/* ── Jegyskála-szerkesztő (feladat űrlap) ── */
.skala-sorok { display: grid; gap: 0.4rem; margin-top: 0.6rem; max-width: 420px; }
.skala-sor { display: grid; grid-template-columns: 6rem auto auto; justify-content: start; gap: 0.5rem; align-items: center; }
.skala-sor .sk-min { display: flex; align-items: center; gap: 0.4rem; margin: 0; font-size: 0.8rem; color: var(--ink); text-transform: none; letter-spacing: 0; }
.skala-sor input:disabled { background: var(--paper, #f4f1ea); color: var(--muted, #888); }
.skala-sor input { padding: 0.5rem 0.6rem; }
.skala-sor .sk-min input { width: 5.5rem; }
#skala-csoport .btn-sm { margin-top: 0.5rem; }
#sk-uj[hidden], #sk-szazalek-tipp[hidden], #sk-sorok[hidden] { display: none; }

/* ── Beírt dolgozat (diák) és az írás közbeni jelzések (tanár) ── */
.mod-fulek { display: flex; gap: 0.5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.mod-fulek .btn-sm[aria-pressed="true"] { background: var(--accent-light); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.iras-szoveg { width: 100%; min-height: 18rem; font: inherit; line-height: 1.65; resize: vertical; margin-top: 0.5rem; }
.szamlalo { margin-top: 0.4rem; font-size: 0.85rem; color: var(--muted); }
.iras-figyelmeztetes { background: var(--warn-light); border-left: 3px solid var(--warn); padding: 0.5rem 0.75rem; border-radius: 0 6px 6px 0; }
mark.beillesztett { background: #fde68a; color: inherit; padding: 0 0.1em; border-radius: 2px; }
/* A kiválasztott csomag jelölése és a fizetés előtti jóváhagyás */
#csomag-gombok { display: inline-flex; gap: 0.5rem; flex-wrap: wrap; }
#csomag-gombok button[aria-pressed="true"] { outline: 2px solid var(--accent); outline-offset: 2px; }
.csomag-megerosites { margin-top: 1rem; padding: 0.9rem 1.1rem; border: 1.5px solid var(--accent); border-radius: 10px; background: var(--accent-light); }
.csomag-megerosites p { margin: 0 0 0.75rem; line-height: 1.6; }
.jelzes-lista { margin: 0.4rem 0 0.6rem 1.1rem; padding: 0; line-height: 1.6; }

/* ── Grafikonok (fejlődés-követés; js/fejlodes-grafikon.js) ── */
/* A színek dataviz-validált tokenek; az oldal jelenleg csak világos módú, a sötét változat a téma-váltóhoz készen áll. */
.viz-root {
  --viz-felulet: #ffffff;
  --viz-szoveg: #0b0b0b;
  --viz-szoveg-2: #52514e;
  --viz-halvany: #7a7670;
  --viz-racs: #e1e0d9;
  --viz-alap: #c3c2b7;
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --series-4: #eda100;
  --series-5: #e87ba4;
  --series-6: #008300;
  --series-7: #4a3aa7;
}
:root[data-theme="dark"] .viz-root {
  --viz-felulet: #1a1a19;
  --viz-szoveg: #ffffff;
  --viz-szoveg-2: #c3c2b7;
  --viz-halvany: #898781;
  --viz-racs: #2c2c2a;
  --viz-alap: #383835;
  --series-1: #3987e5;
  --series-2: #d95926;
  --series-3: #199e70;
  --series-4: #c98500;
  --series-5: #d55181;
  --series-6: #008300;
  --series-7: #9085e9;
}
.viz-kartya { margin-bottom: 1.5rem; position: relative; }
.viz-cim { font-size: 1rem; font-weight: 600; color: var(--viz-szoveg); }
.viz-alcim { font-size: 0.85rem; color: var(--viz-szoveg-2); margin: 0.15rem 0 0.75rem; }
.viz-tarto { position: relative; }
.viz-svg { width: 100%; height: auto; display: block; }
.viz-racs { stroke: var(--viz-racs); stroke-width: 1; }
.viz-alap { stroke: var(--viz-alap); stroke-width: 1; }
.viz-tengely { fill: var(--viz-halvany); font-size: 12px; }
.viz-ertek { fill: var(--viz-szoveg); font-size: 13px; font-weight: 600; }
.viz-vonal { fill: none; stroke: var(--series-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.viz-terulet { fill: var(--series-1); fill-opacity: 0.1; stroke: none; }
.viz-pont { fill: var(--series-1); stroke: var(--viz-felulet); stroke-width: 2; }
.viz-kereszt { stroke: var(--viz-alap); stroke-width: 1; pointer-events: none; }
.viz-hit { fill: transparent; outline: none; cursor: crosshair; }
.viz-tooltip {
  position: absolute; top: 0; z-index: 2; pointer-events: none; min-width: 9rem;
  background: var(--viz-felulet); color: var(--viz-szoveg); border: 1px solid var(--viz-racs);
  border-radius: 8px; padding: 0.5rem 0.7rem; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12); font-size: 0.85rem;
}
.viz-tooltip[hidden] { display: none; }
.viz-tt-cim { color: var(--viz-szoveg-2); margin-bottom: 0.25rem; }
.viz-tt-sor { display: flex; align-items: center; gap: 0.45rem; line-height: 1.6; }
.viz-tt-kulcs { width: 12px; height: 3px; border-radius: 2px; flex: none; }
.viz-tt-cimke { color: var(--viz-szoveg-2); }
.viz-jelmagyarazat { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; margin: 0.75rem 0 0; font-size: 0.85rem; color: var(--viz-szoveg-2); }
.viz-jelmagyarazat li { display: flex; align-items: center; gap: 0.4rem; }
.viz-jel { width: 10px; height: 10px; border-radius: 2px; flex: none; display: inline-block; }
.viz-hibalista { list-style: none; margin: 0.5rem 0 0; }
.viz-hibalista li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; padding: 0.5rem 0; border-bottom: 1px solid var(--viz-racs); }
.viz-hibalista li:last-child { border-bottom: none; }
.viz-cimke-uj { font-size: 0.78rem; font-weight: 600; color: var(--warn); background: var(--warn-light); border-radius: 999px; padding: 0.1rem 0.55rem; }
.viz-tabla { margin-top: 0.5rem; }
.viz-tabla summary { cursor: pointer; font-size: 0.9rem; color: var(--muted); padding: 0.4rem 0; }
/* A csomagok tartalma a csomag-panelen; a sajátod kiemelve */
.csomag-funkciok { list-style: none; margin: 0.75rem 0 0; }
.csomag-funkciok li { padding: 0.35rem 0.6rem; border-left: 3px solid transparent; font-size: 0.9rem; line-height: 1.55; color: var(--muted); }
.csomag-funkciok li.aktualis { border-left-color: var(--accent); background: var(--accent-light); color: var(--ink); }
.csomag-funkciok strong { color: var(--ink); }

/* ── Színtémák a tanári felületen (Alap csomagtól; js/tema.js, js/tema-menu.js, functions/tema.js) ──
   A téma az EGÉSZ felületet színezi: az oldal háttere, az oldalsáv és a felső sáv színt vált, és a háttéren a téma
   motívumai tapétaként ismétlődnek (halványan, hogy a szöveg olvasható maradjon). Az alapszín (narancs) a megszokott, sima
   háttér. A paletták fixek és kontraszt-ellenőrzöttek (tests/tema.test.mjs). A diák felület kék marad. */
:root {
  --motivum-narancs: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 80' fill='none' stroke='black' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M24 56 L74 12 L90 28 L40 72 L20 76 Z'/%3E%3Cpath d='M66 20 L82 36'/%3E%3Cpath d='M80 70 H112'/%3E%3Cpath d='M96 56 H112'/%3E%3C/svg%3E");
  --motivum-kek: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 80' fill='none' stroke='black' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 22 q13 -14 27 0 t27 0 t27 0 t27 0'/%3E%3Cpath d='M6 42 q13 -14 27 0 t27 0 t27 0 t27 0'/%3E%3Cpath d='M6 62 q13 -14 27 0 t27 0 t27 0 t27 0'/%3E%3C/svg%3E");
  --motivum-zold: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 80' fill='none' stroke='black' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 70 Q60 62 106 12'/%3E%3Cpath d='M44 62 q-16 -22 4 -36 q18 18 -4 36z'/%3E%3Cpath d='M80 40 q-4 -24 22 -26 q4 22 -22 26z'/%3E%3C/svg%3E");
  --motivum-lila: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 80' fill='none' stroke='black' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M60 8 l7 20 21 1 -17 12 6 21 -17 -12 -17 12 6 -21 -17 -12 21 -1z'/%3E%3Ccircle cx='20' cy='22' r='3'/%3E%3Ccircle cx='102' cy='62' r='3'/%3E%3Ccircle cx='100' cy='18' r='2'/%3E%3C/svg%3E");
  --motivum-bordo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 80' fill='none' stroke='black' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M60 20 Q38 10 12 16 V66 Q38 60 60 70 Q82 60 108 66 V16 Q82 10 60 20 Z'/%3E%3Cpath d='M60 20 V70'/%3E%3C/svg%3E");
  --motivum-pala: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 80' fill='none' stroke='black' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 68 L42 18 L62 46 L78 28 L114 68 Z'/%3E%3Cpath d='M34 30 l8 8 l8 -8'/%3E%3C/svg%3E");
  --tema-motivum: var(--motivum-narancs);
}
:root[data-tema="kek"] {
  --accent: #1d4ed8; --accent-light: #eff6ff; --accent-on-dark: #60a5fa;
  --paper: #e3ecfa; --muted: #5b6780; --sidebar-bg: #f4f8fe; --topbar-bg: #0f1b36;
  --hatterminta: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200' fill='none' stroke='%23c3d5f1' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg transform='translate(10 14) rotate(-10) scale(0.55)'%3E%3Cpath d='M6 22 q13 -14 27 0 t27 0 t27 0 t27 0'/%3E%3Cpath d='M6 42 q13 -14 27 0 t27 0 t27 0 t27 0'/%3E%3Cpath d='M6 62 q13 -14 27 0 t27 0 t27 0 t27 0'/%3E%3C/g%3E%3Cg transform='translate(112 78) rotate(12) scale(0.45)'%3E%3Cpath d='M6 22 q13 -14 27 0 t27 0 t27 0 t27 0'/%3E%3Cpath d='M6 42 q13 -14 27 0 t27 0 t27 0 t27 0'/%3E%3Cpath d='M6 62 q13 -14 27 0 t27 0 t27 0 t27 0'/%3E%3C/g%3E%3Cg transform='translate(26 128) rotate(6) scale(0.5)'%3E%3Cpath d='M6 22 q13 -14 27 0 t27 0 t27 0 t27 0'/%3E%3Cpath d='M6 42 q13 -14 27 0 t27 0 t27 0 t27 0'/%3E%3Cpath d='M6 62 q13 -14 27 0 t27 0 t27 0 t27 0'/%3E%3C/g%3E%3Cg transform='translate(122 12) rotate(-6) scale(0.4)'%3E%3Cpath d='M6 22 q13 -14 27 0 t27 0 t27 0 t27 0'/%3E%3Cpath d='M6 42 q13 -14 27 0 t27 0 t27 0 t27 0'/%3E%3Cpath d='M6 62 q13 -14 27 0 t27 0 t27 0 t27 0'/%3E%3C/g%3E%3C/svg%3E");
  --tema-motivum: var(--motivum-kek);
}
:root[data-tema="zold"] {
  --accent: #15803d; --accent-light: #f0fdf4; --accent-on-dark: #4ade80;
  --paper: #e1f0e5; --muted: #566b5c; --sidebar-bg: #f3faf5; --topbar-bg: #0e2417;
  --hatterminta: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200' fill='none' stroke='%23bddcc5' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg transform='translate(10 14) rotate(-10) scale(0.55)'%3E%3Cpath d='M14 70 Q60 62 106 12'/%3E%3Cpath d='M44 62 q-16 -22 4 -36 q18 18 -4 36z'/%3E%3Cpath d='M80 40 q-4 -24 22 -26 q4 22 -22 26z'/%3E%3C/g%3E%3Cg transform='translate(112 78) rotate(12) scale(0.45)'%3E%3Cpath d='M14 70 Q60 62 106 12'/%3E%3Cpath d='M44 62 q-16 -22 4 -36 q18 18 -4 36z'/%3E%3Cpath d='M80 40 q-4 -24 22 -26 q4 22 -22 26z'/%3E%3C/g%3E%3Cg transform='translate(26 128) rotate(6) scale(0.5)'%3E%3Cpath d='M14 70 Q60 62 106 12'/%3E%3Cpath d='M44 62 q-16 -22 4 -36 q18 18 -4 36z'/%3E%3Cpath d='M80 40 q-4 -24 22 -26 q4 22 -22 26z'/%3E%3C/g%3E%3Cg transform='translate(122 12) rotate(-6) scale(0.4)'%3E%3Cpath d='M14 70 Q60 62 106 12'/%3E%3Cpath d='M44 62 q-16 -22 4 -36 q18 18 -4 36z'/%3E%3Cpath d='M80 40 q-4 -24 22 -26 q4 22 -22 26z'/%3E%3C/g%3E%3C/svg%3E");
  --tema-motivum: var(--motivum-zold);
}
:root[data-tema="lila"] {
  --accent: #7e22ce; --accent-light: #faf5ff; --accent-on-dark: #c084fc;
  --paper: #ece4f7; --muted: #665a7a; --sidebar-bg: #f8f4fd; --topbar-bg: #1c1030;
  --hatterminta: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200' fill='none' stroke='%23d3c4ea' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg transform='translate(10 14) rotate(-10) scale(0.55)'%3E%3Cpath d='M60 8 l7 20 21 1 -17 12 6 21 -17 -12 -17 12 6 -21 -17 -12 21 -1z'/%3E%3Ccircle cx='20' cy='22' r='3'/%3E%3Ccircle cx='102' cy='62' r='3'/%3E%3Ccircle cx='100' cy='18' r='2'/%3E%3C/g%3E%3Cg transform='translate(112 78) rotate(12) scale(0.45)'%3E%3Cpath d='M60 8 l7 20 21 1 -17 12 6 21 -17 -12 -17 12 6 -21 -17 -12 21 -1z'/%3E%3Ccircle cx='20' cy='22' r='3'/%3E%3Ccircle cx='102' cy='62' r='3'/%3E%3Ccircle cx='100' cy='18' r='2'/%3E%3C/g%3E%3Cg transform='translate(26 128) rotate(6) scale(0.5)'%3E%3Cpath d='M60 8 l7 20 21 1 -17 12 6 21 -17 -12 -17 12 6 -21 -17 -12 21 -1z'/%3E%3Ccircle cx='20' cy='22' r='3'/%3E%3Ccircle cx='102' cy='62' r='3'/%3E%3Ccircle cx='100' cy='18' r='2'/%3E%3C/g%3E%3Cg transform='translate(122 12) rotate(-6) scale(0.4)'%3E%3Cpath d='M60 8 l7 20 21 1 -17 12 6 21 -17 -12 -17 12 6 -21 -17 -12 21 -1z'/%3E%3Ccircle cx='20' cy='22' r='3'/%3E%3Ccircle cx='102' cy='62' r='3'/%3E%3Ccircle cx='100' cy='18' r='2'/%3E%3C/g%3E%3C/svg%3E");
  --tema-motivum: var(--motivum-lila);
}
:root[data-tema="bordo"] {
  --accent: #be123c; --accent-light: #fff1f2; --accent-on-dark: #fb7185;
  --paper: #f8e4ea; --muted: #76585f; --sidebar-bg: #fdf4f7; --topbar-bg: #2b0d17;
  --hatterminta: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200' fill='none' stroke='%23eec2cf' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg transform='translate(10 14) rotate(-10) scale(0.55)'%3E%3Cpath d='M60 20 Q38 10 12 16 V66 Q38 60 60 70 Q82 60 108 66 V16 Q82 10 60 20 Z'/%3E%3Cpath d='M60 20 V70'/%3E%3C/g%3E%3Cg transform='translate(112 78) rotate(12) scale(0.45)'%3E%3Cpath d='M60 20 Q38 10 12 16 V66 Q38 60 60 70 Q82 60 108 66 V16 Q82 10 60 20 Z'/%3E%3Cpath d='M60 20 V70'/%3E%3C/g%3E%3Cg transform='translate(26 128) rotate(6) scale(0.5)'%3E%3Cpath d='M60 20 Q38 10 12 16 V66 Q38 60 60 70 Q82 60 108 66 V16 Q82 10 60 20 Z'/%3E%3Cpath d='M60 20 V70'/%3E%3C/g%3E%3Cg transform='translate(122 12) rotate(-6) scale(0.4)'%3E%3Cpath d='M60 20 Q38 10 12 16 V66 Q38 60 60 70 Q82 60 108 66 V16 Q82 10 60 20 Z'/%3E%3Cpath d='M60 20 V70'/%3E%3C/g%3E%3C/svg%3E");
  --tema-motivum: var(--motivum-bordo);
}
:root[data-tema="pala"] {
  --accent: #475569; --accent-light: #f1f5f9; --accent-on-dark: #94a3b8;
  --paper: #e4e9ee; --muted: #566170; --sidebar-bg: #f4f7f9; --topbar-bg: #141a22;
  --hatterminta: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200' fill='none' stroke='%23c5cfd9' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg transform='translate(10 14) rotate(-10) scale(0.55)'%3E%3Cpath d='M6 68 L42 18 L62 46 L78 28 L114 68 Z'/%3E%3Cpath d='M34 30 l8 8 l8 -8'/%3E%3C/g%3E%3Cg transform='translate(112 78) rotate(12) scale(0.45)'%3E%3Cpath d='M6 68 L42 18 L62 46 L78 28 L114 68 Z'/%3E%3Cpath d='M34 30 l8 8 l8 -8'/%3E%3C/g%3E%3Cg transform='translate(26 128) rotate(6) scale(0.5)'%3E%3Cpath d='M6 68 L42 18 L62 46 L78 28 L114 68 Z'/%3E%3Cpath d='M34 30 l8 8 l8 -8'/%3E%3C/g%3E%3Cg transform='translate(122 12) rotate(-6) scale(0.4)'%3E%3Cpath d='M6 68 L42 18 L62 46 L78 28 L114 68 Z'/%3E%3Cpath d='M34 30 l8 8 l8 -8'/%3E%3C/g%3E%3C/svg%3E");
  --tema-motivum: var(--motivum-pala);
}
body { background-image: var(--hatterminta, none); background-size: 200px 200px; }
body.theme-diak { background-image: none; }

/* a színválasztó: lenyíló menü a felső sáv jobb oldalán (js/tema-menu.js) */
.tema-menu { position: relative; }
.tema-gomb-fent {
  display: flex; align-items: center; gap: 0.45rem; padding: 0.3rem 0.55rem;
  border: 1.5px solid #444; border-radius: 6px; background: transparent; color: #aaa; cursor: pointer;
  font-family: 'DM Sans', sans-serif; font-size: 0.85rem; transition: all 0.2s;
}
.tema-gomb-fent:hover, .tema-gomb-fent[aria-expanded="true"] { border-color: var(--accent-on-dark); color: var(--accent-on-dark); }
.tema-gomb-fent:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.tema-gomb-fent .tema-minta { width: 1.7rem; height: 1.15rem; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.tema-nyil { font-size: 0.7rem; line-height: 1; }
.tema-lenyilo {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 200; width: 16rem; padding: 0.5rem;
  background: #fff; color: var(--ink); border: 1.5px solid var(--border); border-radius: 12px; box-shadow: 0 14px 36px rgba(0, 0, 0, 0.2);
}
.tema-lenyilo[hidden] { display: none; }
.tema-fejlec { padding: 0.35rem 0.6rem 0.6rem; font-size: 0.82rem; line-height: 1.45; color: #5a5750; }
.tema-fejlec strong { color: var(--ink); }
.tema-elem {
  display: flex; align-items: center; gap: 0.75rem; width: 100%; padding: 0.45rem 0.6rem; border: 0; border-radius: 8px;
  background: transparent; font: inherit; font-size: 0.92rem; color: var(--ink); text-align: left; cursor: pointer;
}
.tema-elem:hover, .tema-elem:focus-visible { background: #f2efe9; outline: none; }
.tema-elem:focus-visible { box-shadow: inset 0 0 0 2px var(--ink); }
.tema-elem[aria-checked="true"] { font-weight: 600; background: #f2efe9; }
.tema-elem:disabled { opacity: 0.6; cursor: wait; }
.tema-pipa { margin-left: auto; visibility: hidden; font-weight: 700; }
.tema-elem[aria-checked="true"] .tema-pipa { visibility: visible; }
.tema-minta { display: inline-block; width: 3rem; height: 2rem; flex: none; background: var(--szin); -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.tema-uzenet { margin: 0.4rem 0.6rem 0.2rem; font-size: 0.82rem; line-height: 1.45; color: var(--err); }
.tema-uzenet:empty { display: none; }
.tema-elem[data-tema="narancs"] { --szin: #d4500a; --m: var(--motivum-narancs); }
.tema-elem[data-tema="kek"] { --szin: #1d4ed8; --m: var(--motivum-kek); }
.tema-elem[data-tema="zold"] { --szin: #15803d; --m: var(--motivum-zold); }
.tema-elem[data-tema="lila"] { --szin: #7e22ce; --m: var(--motivum-lila); }
.tema-elem[data-tema="bordo"] { --szin: #be123c; --m: var(--motivum-bordo); }
.tema-elem[data-tema="pala"] { --szin: #475569; --m: var(--motivum-pala); }
.tema-gomb-fent { --m: var(--tema-motivum); }

/* keskeny képernyőn a felső sáv jobb oldala kompakt: a menü gombja csak a minta, a térközök és a feliratok kisebbek */
@media (max-width: 520px) {
  .topbar { gap: 0.5rem; }
  .tema-nyil { display: none; }
  .tema-gomb-fent { padding: 0.25rem 0.3rem; }
  .tema-gomb-fent .tema-minta { width: 1.3rem; height: 1rem; }
  .topbar-right { gap: 0.35rem; }
  .nyelvvalaszto { padding: 0.35rem 0.2rem; font-size: 0.78rem; }
  .btn-logout { padding: 0.35rem 0.5rem; font-size: 0.75rem; }
  .brand { font-size: 0.9rem; }
}
@media (max-width: 380px) {
  .topbar { padding: 0 0.6rem; gap: 0.4rem; }
  .brand { font-size: 0.78rem; }
  .btn-logout { padding: 0.35rem 0.4rem; }
}

/* ── csomagok összehasonlítása (tanári főoldal) ── */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.csomag-tabla { margin-top: 1rem; }
.csomag-tabla-gorgeto { overflow-x: auto; }
.csomag-tabla table { width: 100%; border-collapse: collapse; font-size: 0.875rem; min-width: 460px; }
.csomag-tabla th, .csomag-tabla td { padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border); text-align: center; vertical-align: middle; }
.csomag-tabla th:first-child, .csomag-tabla td:first-child { text-align: left; }
.csomag-tabla thead th { font-weight: 700; }
.csomag-tabla tbody th { font-weight: 500; color: var(--ink); }
.csomag-tabla .aktualis { background: var(--accent-light); }
.csomag-tabla td [aria-hidden="true"] { font-weight: 700; }
@media (max-width: 560px) {
  .csomag-tabla table { min-width: 0; font-size: 0.78rem; }
  .csomag-tabla th, .csomag-tabla td { padding: 0.45rem 0.25rem; }
  .csomag-tabla table { table-layout: fixed; }
  .csomag-tabla th:first-child { width: 31%; }
  .csomag-tabla .btn-sm { padding: 0.35rem 0.1rem; font-size: 0.66rem; white-space: normal; width: 100%; }
}

/* ── A DIÁK OLDALA A FELADATLINKEN (iras.html) ──
   Nincs oldalsáv és belépés: egy keskeny, telefonon is kényelmes oszlop. */
.diak-main { max-width: 760px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.feladat-leiras { white-space: pre-line; line-height: 1.6; overflow-wrap: anywhere; }

/* ── Az írás közbeni jelzések időrendje (javitas.html) ── */
.jelzes-idorend { margin-top: 0.6rem; font-size: 0.88rem; }
.jelzes-idorend summary { cursor: pointer; color: var(--muted); }
.jelzes-idorend ol { margin: 0.5rem 0 0; padding-left: 1.2rem; }
.idorend-ido { font-variant-numeric: tabular-nums; color: var(--muted); margin-right: 0.35rem; }

/* ── „Az összes beadott értékelése” sáv (javitas.html) ── */
.ertekeles-sav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin: 0 0 1rem; }
.ertekeles-sav[hidden] { display: none; }

/* ── Linkindítás csoportválasztóval (megosztas.html, 8b) ── */
.link-inditas { margin-bottom: 1.5rem; }
.link-inditas label { display: block; font-size: 0.85rem; margin-bottom: 0.35rem; }
.link-inditas select { flex: 1; min-width: 0; }
.link-inditas .halvany { margin-top: 0.5rem; }
