/* Transfer-Portal – baut auf site.css (Website-Look) auf */
:root {
  --ok: #30c26a;       /* Signal: erledigt */
  --err: #e5484d;      /* Signal: Fehler / Pflicht fehlt */
  --warn: #f5a524;     /* Signal: Hinweis / optional fehlt */
  --card: #17181e;
  --line-2: #2c2d35;
  --r: 10px;
}
body.portal { min-height: 100vh; display: flex; flex-direction: column; }
.portal main { flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: calc(var(--header-h) + 36px) clamp(16px, 3vw, 40px) 80px; }
.portal .site-header { background: rgba(18, 19, 24, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand-sub { color: var(--accent-text); }
.head-user { display: flex; align-items: center; gap: 14px; }
.head-user .who { font-size: 13px; color: var(--muted); white-space: nowrap; }
.head-user .who strong { color: var(--text); font-weight: 500; }

.ic { width: 20px; height: 20px; flex: none; display: block; }

/* Buttons: überall gleich */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 44px; padding: 0 18px; min-width: 0; border-radius: var(--r);
  border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text);
  font: 600 13px/1 Raleway, sans-serif; letter-spacing: .04em; white-space: nowrap;
  transition: border-color .2s, background .2s, color .2s, transform .15s;
}
.btn:hover:not(:disabled) { border-color: var(--accent); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .4; cursor: default; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #06231f; }
.btn-primary:hover:not(:disabled) { background: #19d6bd; border-color: #19d6bd; }
.btn-danger { color: var(--err); border-color: rgba(229, 72, 77, .5); }
.btn-danger:hover:not(:disabled) { background: var(--err); border-color: var(--err); color: #fff; }
.btn-danger.btn-solid { background: var(--err); border-color: var(--err); color: #fff; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 12px; }
.btn .ic { width: 18px; height: 18px; }
.form .btn { justify-self: stretch; }
.two-col > .card.card, .stat-grid > .card.card { margin-top: 0; }
.card .sec-title:not(:first-child) { margin-top: 34px; }
.btn-row { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px; }

.ibtn {
  width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r); border: 1px solid transparent; color: var(--muted); flex: none;
  transition: color .2s, border-color .2s, background .2s;
}
.ibtn:hover { color: var(--text); border-color: var(--line-2); background: var(--bg-2); }
.ibtn-danger:hover { color: var(--err); border-color: rgba(229, 72, 77, .5); }
.ibtn-ph { visibility: hidden; }

/* Titelzeile einer Seite */
.ptitle { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin: 0 0 26px; }
.ptitle h1 { font-weight: 300; font-size: clamp(26px, 3vw, 36px); line-height: 1.2; margin: 4px 0 0; }
.kicker { font-size: 11px; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: var(--accent-text); margin: 0; }
.lead { color: #cfcfcf; margin: 10px 0 0; max-width: 680px; }

/* Login */
.login { max-width: 440px; margin: 6vh auto 0; }
.login .card { padding: clamp(24px, 4vw, 40px); }
.login h1 { font-weight: 300; font-size: 32px; margin: 6px 0 4px; }
.login .form { margin-top: 26px; }
.login .btn { width: 100%; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.form input, .form select { border-radius: var(--r); }
.form select { font: 400 16px/1.5 Raleway, sans-serif; color: var(--text); background: var(--bg-2); border: 1px solid var(--line); padding: 12px 14px; width: 100%; }
.form input.is-missing { border-color: var(--err); }
.form input.is-optional-missing { border-color: var(--warn); }
.notice { border-radius: 0 var(--r) var(--r) 0; }
.notice.ok { border-color: var(--ok); }
.notice.error { border-color: var(--err); }

/* Freigaben-Kacheln (Kunde) */
.share-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; list-style: none; margin: 0; padding: 0; }
.share-tile {
  display: grid; grid-template-columns: 52px 1fr; grid-template-rows: auto auto auto; column-gap: 16px; row-gap: 4px;
  padding: 20px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); height: 100%;
  transition: border-color .2s, transform .2s;
}
.share-tile:hover { border-color: var(--accent); transform: translateY(-2px); }
.share-tile .ic { grid-row: 1 / 4; width: 52px; height: 52px; color: var(--accent-text); stroke-width: 1.2; }
.share-tile strong { font-size: 18px; font-weight: 500; line-height: 1.3; word-break: break-word; }
.share-tile small { color: var(--muted); font-size: 13px; }
.badge { justify-self: start; padding: 3px 10px; border-radius: 99px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; background: rgba(0, 194, 168, .14); color: var(--accent-text); margin-top: 6px; }
.badge-rw { background: rgba(48, 194, 106, .16); color: var(--ok); }
.badge-off { background: rgba(229, 72, 77, .16); color: var(--err); }
.badge-warn { background: rgba(245, 165, 36, .16); color: var(--warn); }

/* Dateibrowser */
.browser { position: relative; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 18px; }
.crumb { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--bg-2); font-size: 14px; color: var(--muted); transition: color .2s, border-color .2s; }
.crumb .ic { width: 16px; height: 16px; }
.crumb:hover { color: var(--text); border-color: var(--accent); }
.crumb.is-current { color: var(--text); border-color: var(--accent); background: rgba(0, 194, 168, .08); }
.crumb-sep { color: var(--line-2); }
.toolbar { display: grid; grid-auto-flow: column; grid-auto-columns: 210px; gap: 10px; margin: 0 0 14px; }
.selbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 10px 10px 10px 18px; margin: 0 0 14px; border-radius: var(--r); background: rgba(0, 194, 168, .08); border: 1px solid rgba(0, 194, 168, .35); }
.selbar[hidden] { display: none; }
.sel-count { font-weight: 600; font-size: 14px; }
.sel-actions { display: grid; grid-auto-flow: column; grid-auto-columns: 210px; gap: 10px; }

.flist { --acts: 88px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); overflow: hidden; }
.flist.is-admin { --acts: 168px; }
.fl-head, .fl-row { display: grid; grid-template-columns: 44px 34px minmax(0, 1fr) 104px 156px var(--acts); align-items: center; gap: 10px; padding: 0 12px 0 10px; }
.fl-head { height: 46px; font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.fl-row { min-height: 58px; border-bottom: 1px solid var(--line); transition: background .15s; }
.fl-row:hover { background: rgba(255, 255, 255, .025); }
.fl-row.is-sel { background: rgba(0, 194, 168, .07); }
.fl-size, .fl-date { font-size: 14px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.fl-size { text-align: right; }
.fl-acts { display: flex; justify-content: flex-end; gap: 2px; }
.fl-icon { display: flex; align-items: center; justify-content: center; color: var(--muted); }
.fl-icon .ic { width: 24px; height: 24px; stroke-width: 1.4; }
.k-folder, .k-video { color: var(--accent-text); }
.k-image { color: #8fb8ff; } .k-audio { color: #d6a2ff; } .k-pdf { color: #ff8a7a; } .k-archive { color: #e8c170; } .k-project { color: #7fd8e8; }
.fl-name { min-width: 0; display: flex; flex-direction: column; text-align: left; padding: 8px 0; line-height: 1.35; }
.fl-name span { font-size: 15px; overflow-wrap: anywhere; }
.fl-name small { font-size: 12px; color: var(--muted); }
.fl-open:hover span { color: var(--accent-text); }
.fl-chk { display: flex; align-items: center; justify-content: center; height: 100%; cursor: pointer; }
.fl-chk input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fl-chk span { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid #4a4b55; transition: background .15s, border-color .15s; position: relative; }
.fl-chk input:checked + span { background: var(--accent); border-color: var(--accent); }
.fl-chk input:checked + span::after { content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px; border: solid #06231f; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.fl-chk input:focus-visible + span { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.fl-chk input:disabled + span { opacity: .3; }
.fl-empty { padding: 56px 20px; text-align: center; color: var(--muted); }
.fl-empty .ic { width: 40px; height: 40px; margin: 0 auto 10px; color: var(--accent-text); stroke-width: 1.2; }
.fl-empty p { margin: 0; }
.fl-foot { padding: 12px 18px; font-size: 13px; color: var(--muted); }

.dropveil { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; background: rgba(8, 9, 12, .82); backdrop-filter: blur(4px); pointer-events: none; }
.dropveil[hidden] { display: none; }
.dropveil > div { padding: 48px 64px; border: 2px dashed var(--accent); border-radius: 20px; text-align: center; color: var(--text); font-size: 18px; }
.dropveil .ic { width: 56px; height: 56px; margin: 0 auto 12px; color: var(--accent-text); }

/* Upload-Liste */
.uq { position: fixed; right: 20px; bottom: 20px; z-index: 80; width: min(440px, calc(100vw - 40px)); max-height: 60vh; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); overflow: hidden; }
.uq-head { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 16px 10px; align-items: center; }
.uq-head strong { font-weight: 600; }
.uq-sum { grid-column: 1; font-size: 12px; color: var(--muted); }
.uq-btns { grid-column: 2; grid-row: 1 / 3; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.uq-btns [hidden] { display: none; }
.uq-bar, .uq-pbar { height: 4px; background: var(--line); }
.uq-bar span, .uq-pbar span { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.uq-bar.is-done span { background: var(--ok); }
.uq-list { list-style: none; margin: 0; padding: 0; overflow: auto; }
.uq-list li { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 8px; padding: 10px 10px 0 16px; border-top: 1px solid var(--line); }
.uq-name { min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.uq-name span { font-size: 14px; overflow-wrap: anywhere; }
.uq-name small { font-size: 12px; color: var(--muted); }
.uq-pbar { grid-column: 1 / -1; margin: 8px -10px 0 -16px; height: 2px; }
.uq-list .is-done small { color: var(--ok); } .uq-list .is-done .uq-pbar span { background: var(--ok); }
.uq-list .is-err small { color: var(--err); } .uq-list .is-err .uq-pbar span { background: var(--err); }
.uq-list .is-cancel { opacity: .5; }

/* Dialoge */
.dlg { width: min(520px, calc(100vw - 32px)); }
.dlg-body { padding: clamp(22px, 4vw, 34px); }
.dlg-title { font-size: 20px; font-weight: 400; margin: 0 0 4px; line-height: 1.3; }
.dlg .form { margin-top: 0; gap: 16px; }
.dlg-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.dlg-preview { width: min(1280px, calc(100vw - 32px)); }
.dlg-preview .dlg-body { padding: 0; }
.pv-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 16px 14px 22px; border-bottom: 1px solid var(--line); }
.pv-title { min-width: 0; display: flex; flex-direction: column; }
.pv-title strong { font-weight: 500; overflow-wrap: anywhere; }
.pv-title small { color: var(--muted); }
.pv-acts { display: grid; grid-auto-flow: column; grid-auto-columns: 150px; gap: 10px; }
.pv-media { background: #000; display: flex; justify-content: center; }
.pv-media video, .pv-media img { width: 100%; max-height: calc(100vh - 170px); object-fit: contain; }
.pv-media audio { width: 100%; margin: 40px 24px; }
.pv-media.k-audio { background: var(--bg-2); }
.pv-media iframe { width: 100%; height: calc(100vh - 170px); border: 0; background: #fff; }

/* Meldungen */
.toasts { position: fixed; left: 50%; top: calc(var(--header-h) + 14px); transform: translateX(-50%); z-index: 100; display: grid; gap: 8px; width: min(560px, calc(100vw - 32px)); }
.toast { padding: 12px 16px; border-radius: var(--r); background: #23242b; border: 1px solid var(--line-2); border-left: 4px solid var(--accent); box-shadow: 0 10px 30px rgba(0, 0, 0, .4); animation: overlay-in .3s var(--ease); transition: opacity .4s; }
.toast.is-ok { border-left-color: var(--ok); } .toast.is-err { border-left-color: var(--err); } .toast.is-warn { border-left-color: var(--warn); }
.toast.is-out { opacity: 0; }

@media (max-width: 900px) {
  .fl-head, .fl-row { grid-template-columns: 40px 30px minmax(0, 1fr) 90px var(--acts); }
  .fl-date { display: none; }
  .toolbar, .sel-actions { grid-auto-flow: row; grid-template-columns: repeat(2, 1fr); grid-auto-columns: auto; }
}
@media (max-width: 600px) {
  .flist, .flist.is-admin { --acts: 80px; }
  .fl-head, .fl-row { grid-template-columns: 36px minmax(0, 1fr) var(--acts); padding: 0 8px; }
  .fl-icon, .fl-size { display: none; }
  .fl-head .fl-name { visibility: hidden; }
  .fl-acts .ibtn[data-act="rename"], .fl-acts .ibtn[data-act="delOne"], .fl-acts .ibtn-ph { display: none; }
  .toolbar, .sel-actions, .pv-acts { grid-template-columns: 1fr; }
  .pv-acts { grid-auto-flow: row; width: 100%; }
  .head-user .who { display: none; }
}

/* ---------- Admin ---------- */
.hint { color: var(--muted); font-size: 14px; }
.pad { padding: clamp(18px, 2.5vw, 28px); }
.notice.warn { border-color: var(--warn); }
.sig-ok { color: var(--ok); } .sig-warn { color: var(--warn); } .sig-err { color: var(--err); }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 28px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.tab { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: var(--r); border: 1px solid transparent; color: var(--muted); font-size: 14px; font-weight: 500; transition: color .2s, border-color .2s, background .2s; }
.tab:hover { color: var(--text); border-color: var(--line-2); }
.tab.is-active { color: var(--text); background: var(--bg-2); border-color: var(--accent); }
.tab-n { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--line-2); color: var(--text); font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.sec-title { font-size: 12px; font-weight: 600; letter-spacing: .25em; text-transform: uppercase; color: var(--accent-text); margin: 0 0 16px; }
.card + .card, .card + .two-col, .two-col + .card, .stat-grid + .two-col, .quota + .stat-grid, form.card + .card { margin-top: 18px; }

.cred { padding: 20px 22px; margin: 16px 0 24px; border-color: var(--accent); }
.cred h3 { margin: 0 0 4px; font-weight: 500; }
.cred pre { margin: 14px 0; padding: 14px 16px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); font: 500 15px/1.7 ui-monospace, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.cred pre.codes { columns: 2; }
.cred-btns { grid-auto-columns: minmax(0, 300px); justify-content: start; }
.cred-btns form { display: contents; }

.quota { padding: clamp(20px, 3vw, 32px); }
.quota-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.quota-big { margin: 6px 0 0; font-size: clamp(18px, 2vw, 22px); font-weight: 300; }
.quota-big strong { font-weight: 500; font-size: 1.4em; }
.quota-pct { font-size: clamp(30px, 4vw, 46px); font-weight: 300; line-height: 1; }
.qbar { height: 14px; border-radius: 99px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; margin: 18px 0 12px; }
.qbar span { display: block; height: 100%; border-radius: 99px; background: var(--ok); transition: width .6s var(--ease); }
.q-warn .qbar span { background: var(--warn); } .q-err .qbar span { background: var(--err); }
.q-warn .quota-pct { color: var(--warn); } .q-err .quota-pct { color: var(--err); }
.quota-sub { margin: 0; color: var(--muted); font-size: 14px; }
.quota-sub strong { color: var(--text); font-weight: 500; }

.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stat { display: flex; flex-direction: column; padding: 18px 22px; color: var(--muted); font-size: 14px; transition: border-color .2s; }
.stat:hover { border-color: var(--accent); }
.stat-n { font-size: 34px; font-weight: 300; color: var(--text); line-height: 1.2; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.usage-list, .log-list { list-style: none; margin: 0; padding: 0; }
.usage-list a { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.usage-list li:first-child a { border-top: 0; }
.usage-list a:hover .u-name { color: var(--accent-text); }
.u-size { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.u-bar { grid-column: 1 / -1; height: 6px; border-radius: 99px; background: var(--bg); overflow: hidden; }
.u-bar span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.log-list li { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.log-list li:first-child { border-top: 0; }
.l-when { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.l-what small { display: block; color: var(--muted); overflow-wrap: anywhere; }

.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main btns" "chips btns"; gap: 10px 20px; padding: 16px 18px; align-items: center; }
.row-main { grid-area: main; display: flex; align-items: center; gap: 16px; min-width: 0; text-align: left; }
.row-main:hover strong { color: var(--accent-text); }
.row-ic { width: 40px; height: 40px; color: var(--accent-text); stroke-width: 1.3; }
.row-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.4; }
.row-text strong { font-size: 17px; font-weight: 500; overflow-wrap: anywhere; }
.row-text small { color: var(--muted); font-size: 13px; }
.avatar { width: 40px; height: 40px; flex: none; border-radius: 50%; background: rgba(0, 194, 168, .16); color: var(--accent-text); display: flex; align-items: center; justify-content: center; font-weight: 600; }
.chips { grid-area: chips; display: flex; flex-wrap: wrap; gap: 6px; padding-left: 56px; }
.chips .badge { margin: 0; }
.chips-left { padding-left: 0; margin-top: 12px; }
a.badge:hover { filter: brightness(1.25); }
.row-btns { grid-area: btns; display: grid; grid-auto-flow: column; grid-auto-columns: 170px; gap: 8px; }
.row-btns form { display: contents; }
.title-btns { grid-auto-columns: 190px; }

.log-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.log-table td { padding: 10px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.log-table tr:first-child td { border-top: 0; }
.log-table .l-detail { color: var(--muted); overflow-wrap: anywhere; }
.lt-up td:nth-child(3) { color: var(--ok); } .lt-down td:nth-child(3) { color: var(--accent-text); } .lt-bad td:nth-child(3) { color: var(--err); }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.settings-form { margin-top: 0; }
.settings-form .sec-title { margin: 18px 0 0 !important; }
.settings-form .sec-title:first-of-type { margin-top: 0; }
.field-info span { display: block; font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.field-info p { margin: 0; padding: 12px 0; }
.form .chk, label.chk { display: flex !important; align-items: center; gap: 10px !important; font-size: 15px !important; letter-spacing: 0 !important; text-transform: none !important; font-weight: 400 !important; color: var(--text) !important; }
.chk input { width: 20px !important; height: 20px; accent-color: var(--accent); }
.form-end { display: grid; grid-template-columns: 210px; justify-content: end; }
.inline-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 12px 0 26px; }
.inline-form label { display: grid; gap: 6px; font-size: 11px; font-weight: 600; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); }
.inline-form input { font: 400 16px/1.4 Raleway, sans-serif; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); padding: 11px 12px; width: 220px; }
.inline-form .btn { width: 170px; }
.sec-steps { color: #cfcfcf; padding-left: 1.2em; }
.qr-wrap { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; margin: 6px 0 10px; }
#qr { width: 200px; height: 200px; background: #fff; border-radius: var(--r); overflow: hidden; }
#qr svg { width: 100%; height: 100%; display: block; }
.secret { font-size: 16px; letter-spacing: .1em; background: var(--bg); padding: 8px 12px; border-radius: 6px; }
.server-info { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.server-info li { display: grid; grid-template-columns: 280px 1fr; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.server-info li:first-child { border-top: 0; }
.server-info span { color: var(--muted); }

.dlg-wide { width: min(720px, calc(100vw - 32px)); }
.perm-list { border: 1px solid var(--line); border-radius: var(--r); padding: 6px 14px; margin: 0; }
.perm-list legend { font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); padding: 0 6px; }
.perm-row { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.perm-row:first-of-type { border-top: 0; }
.perm-row span { display: flex; flex-direction: column; min-width: 0; }
.perm-row strong { font-weight: 500; overflow-wrap: anywhere; }
.perm-row small { color: var(--muted); font-size: 12px; }
.perm-row select { padding: 9px 12px; }
.pw-field { display: grid; grid-template-columns: 1fr 150px; gap: 10px; }
.pw-field input { font-family: ui-monospace, Menlo, monospace !important; letter-spacing: .05em; }
.pw-field .btn { height: 100%; }
.head-user .btn { width: 170px; }
.head-user form { margin: 0; }

@media (max-width: 1100px) {
  .row { grid-template-columns: 1fr; grid-template-areas: "main" "chips" "btns"; }
  .row-btns { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
@media (max-width: 800px) {
  .two-col, .grid2, .stat-grid { grid-template-columns: 1fr; }
  .chips { padding-left: 0; }
  .server-info li { grid-template-columns: 1fr; gap: 2px; }
  .log-table td:nth-child(4), .log-table td:nth-child(5) { display: none; }
  .perm-row { grid-template-columns: 1fr; }
  .head-user .btn { width: auto; }
  .title-btns { grid-auto-flow: row; grid-auto-columns: auto; }
}
.back-btn { width: 190px; }

/* ---------- Handy-Menü ---------- */
.mnav { display: none; position: relative; }
.mnav-btn { min-width: 170px; justify-content: space-between; }
.mnav-btn[aria-expanded="true"] .mnav-chev { transform: rotate(180deg); }
.mnav-chev { transition: transform .2s; }
.mnav-panel { position: fixed; left: 0; right: 0; top: var(--header-h); z-index: 70; padding: 16px clamp(16px, 4vw, 24px) 20px;
  background: rgba(18, 19, 24, .98); border-bottom: 1px solid var(--line); box-shadow: 0 20px 40px rgba(0, 0, 0, .5); }
.mnav-panel[hidden] { display: none; }
.mnav-items { display: grid; gap: 10px; }
.mnav-items .btn { width: 100%; }
.mnav-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.mnav-foot form { display: contents; }
.mnav-foot .btn { width: 100%; }
.mnav-who { font-size: 14px; color: var(--muted); padding: 2px 2px 6px; }
.mnav-who strong { color: var(--text); font-weight: 500; }
@media (max-width: 760px) {
  .head-user, .tabs { display: none; }
  .mnav { display: block; }
  .admin-portal main { padding-top: calc(var(--header-h) + 24px); }
}
