/* Lorántffy Tananyagtár | színek a Lorántffy Középiskola logójából */
@font-face { font-family: Figtree; font-weight: 400; font-display: swap; src: url(../fonts/figtree-400-latin-ext.woff2) format("woff2"); unicode-range: U+0100-024F, U+1E00-1EFF; }
@font-face { font-family: Figtree; font-weight: 400; font-display: swap; src: url(../fonts/figtree-400-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC; }
@font-face { font-family: Figtree; font-weight: 600; font-display: swap; src: url(../fonts/figtree-600-latin-ext.woff2) format("woff2"); unicode-range: U+0100-024F, U+1E00-1EFF; }
@font-face { font-family: Figtree; font-weight: 600; font-display: swap; src: url(../fonts/figtree-600-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC; }
@font-face { font-family: Figtree; font-weight: 700; font-display: swap; src: url(../fonts/figtree-700-latin-ext.woff2) format("woff2"); unicode-range: U+0100-024F, U+1E00-1EFF; }
@font-face { font-family: Figtree; font-weight: 700; font-display: swap; src: url(../fonts/figtree-700-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC; }

:root {
  --indigo: #434e9c;
  --indigo-600: #39438a;
  --indigo-700: #2e3672;
  --indigo-900: #1f2550;
  --indigo-50: #f0f1f9;
  --indigo-100: #e0e3f3;
  --ink: #1c2038;
  --text: #2d3148;
  --muted: #676b82;
  --paper: #f4f3ee;
  --card: #ffffff;
  --line: #e2e0d7;
  --line-2: #ecebe4;
  --amber: #d99a1e;
  --amber-50: #fcf4e2;
  --red: #b02a2a;
  --red-50: #fbecec;
  --green: #23744a;
  --green-50: #e8f4ed;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(28, 32, 56, .05), 0 4px 18px rgba(28, 32, 56, .06);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font: 15px/1.5 Figtree, "Segoe UI", system-ui, sans-serif; color: var(--text); background: var(--paper);
}
a { color: var(--indigo); }
a:hover { color: var(--indigo-700); }
h1, h2 { color: var(--ink); line-height: 1.2; margin: 0; }
h1 { font-size: 1.55rem; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; font-weight: 700; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { width: 20px; height: 20px; flex: none; vertical-align: middle; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
small { font-size: .82em; }
code { font-family: Consolas, "Cascadia Mono", monospace; font-size: .95em; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--indigo) 45%, transparent); outline-offset: 2px; border-radius: 4px; }

/* ---------- fejléc ---------- */
.top { background: var(--card); border-bottom: 3px solid var(--indigo); position: sticky; top: 0; z-index: 20; }
.top-in { max-width: 1440px; margin: 0 auto; padding: 8px 20px; display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; flex: none; }
.brand img { width: 52px; height: auto; }
.brand-text { display: flex; flex-direction: column; }
.brand-school { font-size: .74rem; color: var(--muted); white-space: nowrap; }
.brand-name { font-size: 1.3rem; font-weight: 700; color: var(--indigo-900); letter-spacing: -.01em; line-height: 1.15; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav > a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--text); font-weight: 600; font-size: .93rem; }
.nav > a .ico { width: 18px; height: 18px; color: var(--indigo); }
.nav > a:hover { background: var(--indigo-50); color: var(--indigo-900); }
.nav > a.on { background: var(--indigo); color: #fff; }
.nav > a.on .ico { color: #fff; }
.who { display: flex; align-items: center; gap: 10px; margin-left: 14px; padding-left: 16px; border-left: 1px solid var(--line); }
.who form { margin: 0; }
.who-name { font-weight: 600; text-decoration: none; color: var(--ink); font-size: .93rem; white-space: nowrap; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.who-name.on, .who-name:hover { color: var(--indigo); text-decoration: underline; }
.role { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 3px 8px; border-radius: 999px; background: var(--indigo-50); color: var(--indigo-700); }
.role-reviewer { background: var(--amber-50); color: #8a5c00; }
.role-admin { background: var(--indigo-900); color: #fff; }
.role-student { background: var(--green-50); color: var(--green); }
.linkbtn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; font: inherit; font-size: .9rem; color: var(--muted); cursor: pointer; padding: 6px 4px; }
.linkbtn:hover { color: var(--red); }
.linkbtn .ico { width: 18px; height: 18px; }
.nav-toggle { display: none; margin-left: auto; border: 1px solid var(--line); background: var(--card); border-radius: 8px; padding: 7px; cursor: pointer; color: var(--ink); }

/* ---------- üzenetek ---------- */
.flashes { max-width: 1440px; width: 100%; margin: 14px auto 0; padding: 0 20px; }
.flash { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 8px; padding: 10px 14px; border-radius: 8px; background: var(--green-50); color: #174d31; border: 1px solid #c4e2d0; }
.flash .ico { color: var(--green); margin-top: 1px; }
.flash-err { background: var(--red-50); color: #7a1c1c; border-color: #efc9c9; }
.flash-err .ico { color: var(--red); }

/* ---------- elrendezés ---------- */
.main { flex: 1; width: 100%; max-width: 1440px; margin: 0 auto; padding: 20px 20px 40px; }
.foot { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 18px 20px 22px; color: var(--muted); font-size: .8rem; text-align: left; }
.foot img { opacity: .9; }

/* ---------- gombok ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 7px 14px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink);
  font: inherit; font-weight: 600; font-size: .92rem; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--indigo); color: var(--indigo-900); background: var(--indigo-50); }
.btn .ico { width: 18px; height: 18px; color: var(--indigo); }
.btn-primary { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.btn-primary .ico { color: #fff; }
.btn-primary:hover { background: var(--indigo-700); border-color: var(--indigo-700); color: #fff; }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-danger:hover { background: #8f1f1f; border-color: #8f1f1f; color: #fff; }
.btn-ghost-danger { color: var(--red); }
.btn-ghost-danger:hover { border-color: var(--red); background: var(--red-50); color: var(--red); }
.btn-sm { min-height: 32px; padding: 4px 10px; font-size: .85rem; }
.btn-wide { width: 100%; }
.btn:disabled { opacity: .6; cursor: wait; }
.iconbtn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; color: var(--muted); border: 1px solid transparent; background: none; cursor: pointer; list-style: none; }
.iconbtn::-webkit-details-marker { display: none; }
.iconbtn:hover { color: var(--indigo); background: var(--indigo-50); border-color: var(--indigo-100); }

/* ---------- űrlapok ---------- */
.form { display: grid; gap: 14px; }
.form fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 12px; }
.form legend { font-weight: 700; color: var(--ink); font-size: 1.02rem; padding: 0; margin-bottom: 4px; }
label { display: grid; gap: 5px; font-size: .88rem; font-weight: 600; color: var(--ink); }
input, select, textarea {
  font: inherit; font-weight: 400; color: var(--ink); background: #fff; border: 1px solid #d3d1c7; border-radius: 8px; padding: 8px 11px; min-height: 40px; width: 100%;
}
input:focus, select:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 3px var(--indigo-100); }
.hint { margin: 0; color: var(--muted); font-size: .9rem; }
.hint.small { font-size: .82rem; margin-top: 14px; }

/* ---------- belépés ---------- */
body.bare {
  background:
    linear-gradient(135deg, transparent 49.6%, rgba(67, 78, 156, .07) 49.6%, rgba(67, 78, 156, .07) 50.4%, transparent 50.4%) 0 0 / 56px 56px,
    linear-gradient(45deg, transparent 49.6%, rgba(67, 78, 156, .07) 49.6%, rgba(67, 78, 156, .07) 50.4%, transparent 50.4%) 0 0 / 56px 56px,
    var(--paper);
}
.gate { flex: 1; display: grid; place-items: center; padding: 32px 16px; }
.gate-card { width: 100%; max-width: 430px; background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--indigo); border-radius: 12px; padding: 26px 28px 28px; box-shadow: var(--shadow); }
.gate-head { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.gate-head img { width: 92px; height: auto; flex: none; }
.gate-school { margin: 0 0 4px; font-size: .8rem; color: var(--muted); line-height: 1.35; }
.gate-head h1 { font-size: 1.7rem; color: var(--indigo-900); }
.gate-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--paper); border-radius: 10px; margin-bottom: 18px; }
.gate-tabs a { text-align: center; padding: 8px 6px; border-radius: 7px; text-decoration: none; font-weight: 600; color: var(--muted); font-size: .92rem; }
.gate-tabs a.on { background: var(--card); color: var(--indigo-900); box-shadow: 0 1px 3px rgba(28, 32, 56, .12); }
.gate .form { gap: 14px; }

/* ---------- böngészés ---------- */
.browse { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 22px; align-items: start; }
.tree {
  position: sticky; top: 92px; max-height: calc(100vh - 110px); overflow: auto; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 10px 8px 12px; font-size: .88rem;
}
.tree ul { list-style: none; margin: 0; padding: 0 0 0 14px; }
.tree ul.tree-root { padding-left: 0; }
.tree li { margin: 0; }
.tree summary { list-style: none; display: flex; align-items: flex-start; cursor: default; }
.tree summary::-webkit-details-marker { display: none; }
.tree .leaf { display: flex; align-items: flex-start; }
.tree .tw { flex: none; width: 20px; height: 26px; display: grid; place-items: center; color: var(--muted); cursor: pointer; }
.tree .tw .ico { width: 14px; height: 14px; transition: transform .15s; }
.tree details[open] > summary .tw .ico { transform: rotate(90deg); }
.tree a { display: block; flex: 1; min-width: 0; padding: 3px 8px; border-radius: 6px; text-decoration: none; color: var(--text); line-height: 1.35; }
.tree a:hover { background: var(--indigo-50); color: var(--indigo-900); }
.tree a.cur { background: var(--indigo); color: #fff; font-weight: 600; }
.tree-home { display: flex !important; align-items: center; gap: 8px; font-weight: 700; color: var(--ink) !important; margin-bottom: 6px; padding: 6px 8px !important; }
.tree-home .ico { color: var(--indigo); width: 19px; height: 19px; }
.tree-home.cur { background: var(--indigo) !important; color: #fff !important; }
.tree-home.cur .ico { color: #fff; }

/* a mappa „dossziéfüllel” */
.folder { position: relative; margin-top: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 0 var(--radius) var(--radius) var(--radius); padding: 16px 22px 20px; box-shadow: var(--shadow); min-height: 320px; }
.folder::before { content: ""; position: absolute; left: -1px; top: -16px; width: 170px; height: 16px; background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--indigo); border-bottom: 0; border-radius: 9px 14px 0 0; }
.folder::after { content: ""; position: absolute; left: 0; top: -1px; width: 168px; height: 2px; background: var(--card); }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: .85rem; color: var(--muted); margin-bottom: 8px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--indigo); text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; }
.crumbs .sep { width: 6px; height: 6px; background: var(--indigo); opacity: .45; transform: rotate(45deg); flex: none; }
.folder-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.folder-title { min-width: 0; }
.folder-title h1 { overflow-wrap: anywhere; }
.meta { margin: 4px 0 0; color: var(--muted); font-size: .88rem; }
.meta .dot { display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: currentColor; margin: 0 8px 2px; vertical-align: middle; }
.tools { display: flex; flex-wrap: wrap; gap: 8px; }
.drop-hint { margin: 10px 0 0; font-size: .8rem; color: var(--muted); }

.items { list-style: none; margin: 6px 0 0; padding: 0; }
.item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 4px 6px; border-bottom: 1px solid var(--line-2); border-radius: 8px; }
.item:last-child { border-bottom: 0; }
.item:hover { background: #faf9f6; }
.item-main { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 7px 4px; text-decoration: none; color: var(--ink); }
.item-main:hover .item-name { color: var(--indigo); text-decoration: underline; text-underline-offset: 2px; }
.item-name { overflow-wrap: anywhere; line-height: 1.35; }
.is-folder .item-name { font-weight: 600; }
.item-ico { position: relative; flex: none; width: 34px; height: 34px; display: grid; place-items: center; color: var(--indigo); }
.item-ico .ico { width: 30px; height: 30px; }
.ftype .ico { color: #b8b6ad; }
.ftype b { position: absolute; left: -3px; bottom: 2px; font-size: 8.5px; font-weight: 700; letter-spacing: .02em; color: #fff; background: var(--tc, #77798a); padding: 1px 3px; border-radius: 3px; line-height: 1.2; }
.t-pdf { --tc: #c0392b; }
.t-ppt { --tc: #c4581d; }
.t-doc { --tc: #2b5cb8; }
.t-xls { --tc: #1f7a46; }
.t-img { --tc: #0f7c8c; }
.t-media { --tc: #7b3fa0; }
.t-zip { --tc: #6d5a2d; }
.item-meta { display: flex; align-items: center; gap: 0; font-size: .83rem; color: var(--muted); }
.item-meta > span { padding: 0 10px; white-space: nowrap; }
.item-meta > span:first-child { min-width: 78px; text-align: right; }
.item-meta .owner { min-width: 150px; max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
.item-meta .owner.mine { color: var(--indigo); font-weight: 600; }
.item-meta .date { min-width: 96px; }
.item-act { display: flex; align-items: center; gap: 2px; min-width: 72px; justify-content: flex-end; }

.menu { position: relative; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 4px); z-index: 15; min-width: 220px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(28, 32, 56, .16); padding: 6px; display: grid; }
.menu-pop button, .menu-pop a { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: none; border-radius: 7px; font: inherit; font-size: .9rem; color: var(--ink); text-align: left; text-decoration: none; cursor: pointer; }
.menu-pop .ico { width: 18px; height: 18px; color: var(--muted); }
.menu-pop button:hover, .menu-pop a:hover { background: var(--indigo-50); }
.menu-pop .danger { color: var(--red); }
.menu-pop .danger .ico { color: var(--red); }
.menu-pop .danger:hover { background: var(--red-50); }

.empty { display: grid; place-items: center; text-align: center; padding: 56px 20px; color: var(--muted); }
.empty .ico { width: 48px; height: 48px; color: var(--indigo-100); }
.empty p { margin: 8px 0 0; }

/* húzd ide */
.dropzone { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(31, 37, 80, .55); padding: 24px; }
.dropzone[hidden] { display: none; }
.dropzone > div { width: min(560px, 100%); padding: 48px 24px; text-align: center; background: var(--card); border: 3px dashed var(--indigo); border-radius: 16px; color: var(--indigo-900); }
.dropzone .ico { width: 44px; height: 44px; color: var(--indigo); }
.dropzone p { margin: 10px 0 2px; font-size: 1.2rem; font-weight: 700; }
.dropzone small { color: var(--muted); font-size: .9rem; }

/* feltöltési panel */
.uploads { position: fixed; right: 18px; bottom: 18px; z-index: 50; width: min(420px, calc(100vw - 32px)); max-height: min(70vh, 560px); display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px rgba(28, 32, 56, .22); overflow: hidden; }
.uploads[hidden] { display: none; }
.uploads header { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 8px 16px; }
.up-bar { height: 4px; background: var(--indigo-50); }
.up-bar span { display: block; height: 100%; width: 0; background: var(--indigo); transition: width .2s; }
.uploads.has-err .up-bar span { background: var(--amber); }
.uploads ol { list-style: none; margin: 0; padding: 6px 0; overflow: auto; flex: 1; font-size: .84rem; }
.uploads li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 16px; }
.uploads li .n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.uploads li .s { flex: none; color: var(--muted); max-width: 55%; text-align: right; }
.uploads li.run .s { color: var(--indigo); }
.uploads li.ok .s { color: var(--green); }
.uploads li.err { background: var(--red-50); }
.uploads li.err .s { color: var(--red); white-space: normal; }
.uploads footer { padding: 10px 12px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; }

/* párbeszédablak */
.dlg { border: 0; border-radius: 14px; padding: 22px 24px; width: min(440px, calc(100vw - 32px)); box-shadow: 0 24px 60px rgba(28, 32, 56, .3); color: var(--text); }
.dlg::backdrop { background: rgba(31, 37, 80, .45); }
.dlg form { display: grid; gap: 14px; }
.dlg p { margin: 0; }
.dlg-err { color: var(--red); font-size: .9rem; }
.dlg-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

/* ---------- panelek (napló, felhasználók, beállítások) ---------- */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px 26px; box-shadow: var(--shadow); }
.panel.narrow { max-width: 620px; margin: 0 auto; }
.panel-head { margin-bottom: 18px; }
.panel-head .meta { max-width: 860px; }

.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; padding: 14px; background: var(--paper); border-radius: 10px; margin-bottom: 16px; }
.filters label { min-width: 150px; }
.filters label.grow { flex: 1; min-width: 200px; }
.filter-btns { display: flex; gap: 8px; }
.chip-note { margin: 0 0 14px; font-size: .9rem; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 8px 10px; border-bottom: 2px solid var(--line); }
td { padding: 10px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
tr:hover td { background: #fbfaf7; }
.act { display: inline-block; font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.act-upload { background: var(--green-50); color: var(--green); }
.act-folder_create { background: var(--indigo-50); color: var(--indigo-700); }
.act-rename { background: var(--amber-50); color: #8a5c00; }
.act-delete { background: var(--red-50); color: var(--red); }
.log-item { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: flex-start; }
.log-item .kind .ico { width: 18px; height: 18px; color: var(--muted); }
.log-path { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.log-path small { display: block; }
.log-detail { flex-basis: 100%; padding-left: 26px; font-size: .84rem; color: var(--muted); }
.log-detail summary { cursor: pointer; color: var(--indigo); }
.log-detail ul { margin: 6px 0 0; padding-left: 18px; }
.tag-del { display: inline-block; margin-left: 6px; font-size: .72rem; font-weight: 700; color: var(--red); background: var(--red-50); border-radius: 4px; padding: 1px 6px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 18px; color: var(--muted); font-size: .9rem; }

.addbox { margin-bottom: 18px; }
.addbox > summary { list-style: none; display: inline-flex; }
.addbox > summary::-webkit-details-marker { display: none; }
.addbox[open] > summary { margin-bottom: 12px; }
.form-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; padding: 14px; background: var(--paper); border-radius: 10px; }
.form-row label { flex: 1; min-width: 170px; }
.pwbox { border: 1px solid #ecd9a8; background: var(--amber-50); border-radius: 10px; padding: 14px 16px; margin-bottom: 18px; }
.pwbox p { margin: 0 0 8px; }
.pwbox dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; align-items: center; }
.pwbox dt { font-weight: 700; font-size: .85rem; }
.pwbox dd { margin: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pwbox .pw { font-size: 1.15rem; letter-spacing: .06em; background: #fff; padding: 2px 8px; border-radius: 6px; border: 1px solid #ecd9a8; }
.users td { vertical-align: middle; }
.users tr.off td { opacity: .62; }
.inline-edit { display: grid; gap: 4px; min-width: 230px; }
.inline-edit input { min-height: 34px; padding: 5px 9px; }
.inline-edit input[name="name"] { font-weight: 600; }
.users select { min-height: 34px; padding: 5px 9px; min-width: 140px; }
.row-act { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; min-width: 250px; }
.row-act form { margin: 0; }

.facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 26px 0 0; padding-top: 18px; border-top: 1px solid var(--line); font-size: .9rem; }
.facts dt { font-weight: 600; color: var(--ink); }
.facts dd { margin: 0; }

/* ---------- mobil ---------- */
@media (max-width: 1240px) {
  .brand-school { display: none; }
  .nav > a { padding: 8px 9px; }
  .who { margin-left: 8px; padding-left: 12px; }
  .who .linkbtn span { display: none; }
  .who-name { max-width: 130px; }
}
@media (max-width: 1100px) {
  .browse { grid-template-columns: 240px minmax(0, 1fr); }
  .item-meta .owner { min-width: 110px; }
}
@media (max-width: 1000px) {
  .top-in { flex-wrap: wrap; padding: 8px 16px; gap: 10px; }
  .brand-school { display: none; }
  .nav-toggle { display: inline-grid; }
  .nav { display: none; width: 100%; flex-direction: column; align-items: stretch; padding: 6px 0 10px; }
  body.nav-open .nav { display: flex; }
  .who { margin: 8px 0 0; padding: 10px 12px 0; border-left: 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
  .who form { margin-left: auto; }
  .main { padding: 14px 16px 32px; }
  .flashes { padding: 0 16px; }
  .browse { grid-template-columns: minmax(0, 1fr); }
  .tree { display: none; }
  .folder { padding: 14px 14px 16px; }
  .folder::before { width: 120px; }
  .folder::after { width: 118px; }
  .item { grid-template-columns: minmax(0, 1fr) auto; gap: 0 6px; padding: 4px 2px; }
  .item-meta { grid-column: 1; grid-row: 2; padding: 0 0 8px 50px; flex-wrap: wrap; gap: 2px 0; }
  .item-meta > span { padding: 0 10px 0 0; min-width: 0 !important; text-align: left !important; }
  .item-meta > span + span::before { content: ""; display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: currentColor; margin: 0 8px 3px 0; vertical-align: middle; }
  .item-act { grid-column: 2; grid-row: 1 / span 2; min-width: 0; }
  .tools { width: 100%; }
  .tools .btn { flex: 1; }
  .drop-hint { display: none; }
  .panel { padding: 18px 16px 20px; }
  table.log thead, table.users thead { display: none; }
  table.log, table.log tbody, table.log tr, table.log td,
  table.users, table.users tbody, table.users tr, table.users td { display: block; width: 100%; }
  table.log tr, table.users tr { border-bottom: 1px solid var(--line); padding: 10px 0; }
  table.log td, table.users td { border: 0; padding: 3px 0; }
  table.log td[data-l="Időpont"] { font-size: .8rem; color: var(--muted); }
  .row-act { justify-content: flex-start; padding-top: 6px; min-width: 0; }
  .filters label { min-width: 0; flex: 1 1 140px; }
}
@media (max-width: 480px) {
  .brand img { width: 42px; }
  .brand-name { font-size: 1.15rem; }
  h1 { font-size: 1.3rem; }
  .gate-card { padding: 22px 18px; }
  .gate-head img { width: 70px; }
  .tools .btn { flex: 1 1 100%; }
}
@media (pointer: coarse) {
  .iconbtn { width: 42px; height: 42px; }
}
