/* ftp.media – kiegészítések a Quirk sablonhoz (fő felület, Beállítások, bejelentkezés) */

/* Színek. A sötét témát a <html data-theme="dark"> kapcsolja (ftpm_theme süti, js/ftpmedia-theme.js);
   a saját elemek ezekből a változókból dolgoznak, a Quirk elemeit lent a „Sötét téma” rész írja felül. */
:root {
  --ftpm-bg: #d8dce3;
  --ftpm-surface: #ffffff;
  --ftpm-surface-2: #fafbfc;
  --ftpm-text: #3b4354;
  --ftpm-muted: #8a94a6;
  --ftpm-soft: #6b7280;
  --ftpm-line: #eceef2;
  --ftpm-line-strong: #d5d9e0;
  --ftpm-accent: #259dab;
  --ftpm-link: #259dab;
  --ftpm-thumb: #eef1f5;
  --ftpm-thumb-dir: #fdf3e1;
  --ftpm-warn-bg: #fff8e6;
  --ftpm-selected: #d0e6f5;
  --ftpm-danger: #c0392b;
  --ftpm-shadow: 0 12px 40px rgba(16, 24, 40, .22);
}
html[data-theme="dark"] {
  color-scheme: dark;
  --ftpm-bg: #0f1218;
  --ftpm-surface: #171b23;
  --ftpm-surface-2: #12161d;
  --ftpm-text: #dde2ea;
  --ftpm-muted: #8f99ab;
  --ftpm-soft: #9aa3b2;
  --ftpm-line: #262c38;
  --ftpm-line-strong: #343c4b;
  --ftpm-accent: #34b6c5;
  --ftpm-link: #4cc3d1;
  --ftpm-thumb: #232a35;
  --ftpm-thumb-dir: #3a2f1a;
  --ftpm-warn-bg: #2b2416;
  --ftpm-selected: #1b3047;
  --ftpm-danger: #f0706a;
  --ftpm-shadow: 0 12px 40px rgba(0, 0, 0, .55);
}
/* Rövid színátmenet csak a téma váltásának pillanatában. */
.ftpm-theme-anim, .ftpm-theme-anim * { transition: background-color .25s, border-color .25s, color .25s !important; }

.ftpm-hidden { display: none !important; }
/* a quirk.css input[type="file"] { display: block } szabálya felülírná a hidden attribútumot (a feltöltő Browse… gombja) */
[hidden] { display: none !important; }

/* A Quirk fejléce (64 px magas, z-index 2000) a párbeszédablakok fölött van: az ablakok a fejléc alatt kezdődjenek. */
.modal-dialog { margin-top: 80px; }
@media (min-width: 768px) {
  .modal-dialog { margin-top: 94px; margin-bottom: 40px; }
}
/* Az ablakokon nincs Bootstrap "fade" (az átmenet közbeni újranyitás beragasztotta őket); a megjelenést tisztán CSS animálja.
   A Quirk a transform-mal középre teszi az ablakot, ezért a beúszás a külön translate tulajdonságot animálja. */
.modal.in .modal-dialog { animation: ftpm-modal-in .18s ease-out; }
.modal-backdrop.in { animation: ftpm-backdrop-in .15s linear; }
@keyframes ftpm-modal-in { from { opacity: 0; translate: 0 -14px; } to { opacity: 1; translate: 0 0; } }
@keyframes ftpm-backdrop-in { from { opacity: 0; } }
.ftpm-muted { color: var(--ftpm-muted); margin: 12px 0 0; font-size: 13px; }
.ftpm-nowrap { white-space: nowrap; }

/* fejléc */
.ftpm-avatar {
  display: inline-block; width: 26px; height: 26px; line-height: 26px; border-radius: 50%;
  background: #259dab; color: #fff; text-align: center; font-weight: 700; margin-right: 6px; font-size: 13px;
}
.headermenu > li .btn.ftpm-theme-btn { width: 46px; font-size: 18px; }
.ftpm-ico-sun { display: none; }
html[data-theme="dark"] .ftpm-ico-sun { display: inline-block; }
html[data-theme="dark"] .ftpm-ico-moon { display: none; }
/* keskeny képernyőn a Quirk elrejti a logót: a menügomb mellé kerül */
.ftpm-brand-mobile { display: none; }
@media (max-width: 991px) {
  .ftpm-brand-mobile {
    display: block; position: absolute; left: 60px; top: 0; line-height: 64px;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-weight: 500; font-size: 22px; color: #259dab;
  }
  .ftpm-brand-mobile:hover, .ftpm-brand-mobile:focus { color: #31c1d2; text-decoration: none; }
}

/* eszköztár */
.ftpm-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; }
.ftpm-toolbar-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex: 1 1 auto; min-width: 0; }
.ftpm-toolbar .btn { border-radius: 4px; }
.ftpm-toolbar .btn[disabled] { opacity: .45; }
.ftpm-toolbar-sep { width: 1px; height: 26px; background: var(--ftpm-line-strong); margin: 0 4px; }
.ftpm-summary { margin-left: auto; color: var(--ftpm-muted); font-size: 13px; }
.ftpm-summary a { color: var(--ftpm-link); }
.ftpm-pending { margin-bottom: 14px; }

/* táblázat */
.ftpm-table .ftpm-col-check { width: 34px; text-align: center; vertical-align: middle; }
.ftpm-table .ftpm-col-actions { width: 200px; }
.ftpm-table td { vertical-align: middle !important; }
.ftpm-table td:nth-child(2) { min-width: 200px; }
.ftpm-table tr.ftpm-dir td:nth-child(2) a { font-weight: 600; }
.ftpm-table .ftpm-ico-folder { color: #f2a93b; }
.ftpm-table tr.ftpm-up a { color: var(--ftpm-soft); }
.ftpm-table tr.ftpm-empty td { text-align: center; color: var(--ftpm-muted); padding: 40px 10px; }
.ftpm-table .table-options { white-space: nowrap; }
.ftpm-checkall { margin: 0; font-weight: normal; }
.ftpm-checkall span { display: none; }
/* a soronkénti „⋮” gomb csak telefonon látszik (ott a műveletek egy lenyíló sorban vannak) */
.ftpm-more { display: none; }
/* középső szélességen (tablet, keskeny ablak) a Feltöltő oszlop kimarad */
@media (min-width: 768px) and (max-width: 1199px) {
  .ftpm-table th:nth-child(5), .ftpm-table td:nth-child(5) { display: none; }
  .ftpm-table .ftpm-col-actions { width: 1%; }
  .ftpm-table > thead > tr > th, .ftpm-table > tbody > tr > td { padding-left: 8px; padding-right: 8px; }
  .ftpm-table td:nth-child(2) { min-width: 160px; }
}

/* bélyegképek a fájlnév mellett */
/* A szóköz nélküli hosszú fájlnév is törhet; a névoszlop 200 px-nél keskenyebb nem lehet (fent), különben betűnként tördelne. */
.ftpm-name { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; overflow-wrap: anywhere; }
.ftpm-thumb {
  position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 36px; border-radius: 4px; overflow: hidden; background: var(--ftpm-thumb); color: var(--ftpm-muted); font-size: 17px;
}
.ftpm-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ftpm-table tr.ftpm-dir .ftpm-thumb { background: var(--ftpm-thumb-dir); font-size: 20px; }
.ftpm-thumb-play {
  position: absolute; right: 3px; bottom: 3px; width: 15px; height: 15px; border-radius: 50%; padding-left: 1px;
  display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .55); color: #fff; font-size: 7px;
}
.ftpm-thumb > i.fa + .ftpm-thumb-play { display: none; }
.ftpm-table tr.ftpm-file[data-preview] .ftpm-thumb { cursor: zoom-in; }
.ftpm-k-image { color: #2f9e6b; }
.ftpm-k-video { color: #7b5fd6; }
.ftpm-k-audio { color: #d6820f; }
.ftpm-k-pdf { color: #d9534f; }

/* megosztási link a kijelölt elemekhez, és a linkek listája */
.ftpm-sellink-items { margin: 6px 0 16px; padding-left: 18px; max-height: 150px; overflow: auto; overflow-wrap: anywhere; }
.ftpm-sellink-exp { display: flex; gap: 8px; }
.ftpm-sellink-exp select { max-width: 200px; }
.ftpm-sellink-exp input { max-width: 190px; }
.ftpm-links-table { margin: 10px 0 0; font-size: 13px; }
.ftpm-links-table td { vertical-align: middle !important; overflow-wrap: anywhere; }
.ftpm-links-table .ftpm-muted { margin: 2px 0 0; font-size: 12px; }

/* felhasználó szerkesztése: regisztrációs link */
.ftpm-user-invite { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--ftpm-line); }
.ftpm-user-invite h5 { margin: 0 0 6px; font-weight: 600; }
.ftpm-user-invite .alert { margin: 12px 0 8px; }

/* befejezetlen feltöltések figyelmeztetése */
.ftpm-pending-list { margin: 6px 0; padding-left: 18px; }
.ftpm-pending-list li { overflow-wrap: anywhere; }
.ftpm-pending-del { margin-left: 8px; padding: 0 4px; border: 0; background: none; color: #8a6d3b; font-size: 18px; line-height: 1; vertical-align: -1px; opacity: .7; }
.ftpm-pending-del:hover, .ftpm-pending-del:focus { opacity: 1; outline: none; }

/* megtekintő (kép, videó, hang, PDF, szöveg) – mindkét témában sötét */
body.ftpm-viewing { overflow: hidden; }
.ftpm-viewer {
  position: fixed; inset: 0; z-index: 2100; display: flex; align-items: center; justify-content: center;
  padding: 64px 74px 24px; background: rgba(12, 15, 20, .94);
}
.ftpm-viewer-bar {
  position: absolute; top: 0; left: 0; right: 0; height: 52px; display: flex; align-items: center; gap: 12px;
  padding: 0 12px 0 20px; color: #fff; background: rgba(0, 0, 0, .35);
}
.ftpm-viewer-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 15px; }
.ftpm-viewer-close { background: none; border: 0; color: #fff; font-size: 32px; line-height: 1; padding: 0 6px; opacity: .8; }
.ftpm-viewer-close:hover, .ftpm-viewer-close:focus { opacity: 1; outline: none; }
.ftpm-viewer-stage { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.ftpm-viewer-stage img, .ftpm-viewer-stage video { max-width: 100%; max-height: 100%; background: #000; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.ftpm-viewer-doc { width: min(1100px, 100%); height: 100%; border: 0; border-radius: 4px; background: #fff; }
.ftpm-viewer-doc.ftpm-viewer-text { width: min(900px, 100%); }
.ftpm-viewer-audio { display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 40px 48px; border-radius: 10px; background: rgba(255, 255, 255, .08); color: #fff; }
.ftpm-viewer-audio .fa { font-size: 54px; opacity: .8; }
.ftpm-viewer-audio audio { width: min(440px, 80vw); }
.ftpm-viewer-msg { max-width: 460px; color: #e5e7eb; text-align: center; font-size: 15px; }
.ftpm-viewer-msg .fa { font-size: 40px; opacity: .7; margin-bottom: 12px; }
.ftpm-viewer-nav {
  position: absolute; top: 50%; width: 46px; height: 46px; margin-top: -23px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .12); color: #fff; font-size: 18px;
}
.ftpm-viewer-nav:hover, .ftpm-viewer-nav:focus { background: rgba(255, 255, 255, .25); outline: none; }
.ftpm-viewer-prev { left: 14px; }
.ftpm-viewer-next { right: 14px; }
@media (max-width: 767px) {
  .ftpm-viewer { padding: 60px 8px 74px; }
  .ftpm-viewer-bar { padding-left: 14px; }
  .ftpm-viewer-bar .btn { padding: 5px 9px; }
  .ftpm-viewer-nav { top: auto; bottom: 14px; margin-top: 0; }
}
.ftpm-badge {
  display: inline-block; min-width: 16px; padding: 0 4px; margin-left: 2px; border-radius: 8px;
  background: #259dab; color: #fff; font-size: 10px; line-height: 16px; text-align: center; vertical-align: top;
}

/* megjegyzések */
.ftpm-comments td { background: var(--ftpm-surface-2); font-size: 12px; }
.ftpm-comment { padding: 4px 0; border-bottom: 1px dashed var(--ftpm-line); }
.ftpm-comment:last-of-type { border-bottom: 0; }
.ftpm-comment-date { color: var(--ftpm-muted); margin-left: 8px; font-size: 11px; }
.ftpm-comment-del { margin-left: 8px; color: var(--ftpm-danger); }
.ftpm-comment-text { margin-top: 2px; white-space: normal; overflow-wrap: anywhere; }
.ftpm-comment-form { margin-top: 8px; }
.ftpm-comment-form textarea {
  display: block; width: 100%; max-width: 640px; height: 60px; resize: vertical; margin-bottom: 6px;
  border: 1px solid var(--ftpm-line-strong); border-radius: 3px; padding: 6px; background: var(--ftpm-surface); color: var(--ftpm-text);
}

/* link ablak */
.ftpm-linkbox { display: flex; gap: 8px; }
.ftpm-linkbox input { flex: 1; min-width: 0; font-family: Consolas, Menlo, monospace; font-size: 13px; }

/* húzd ide */
.ftpm-drop {
  position: fixed; inset: 0; z-index: 2000; display: none; align-items: center; justify-content: center;
  background: rgba(37, 157, 171, .14); border: 3px dashed #259dab; pointer-events: none;
}
.ftpm-drop div { background: var(--ftpm-surface); padding: 28px 40px; border-radius: 10px; font-size: 18px; font-weight: 600; color: #259dab; text-align: center; box-shadow: var(--ftpm-shadow); }
.ftpm-drop .fa { font-size: 42px; }
.ftpm-drop.ftpm-drop-on { display: flex; }

/* feltöltési panel */
.ftpm-uploads {
  position: fixed; right: 18px; bottom: 18px; z-index: 1500; width: 420px; max-width: calc(100vw - 36px);
  background: var(--ftpm-surface); color: var(--ftpm-text); border-radius: 10px; box-shadow: var(--ftpm-shadow); display: none; overflow: hidden;
}
.ftpm-uploads.ftpm-up-open { display: block; }
.ftpm-up-head { display: flex; align-items: center; gap: 6px; padding: 10px 12px 10px 16px; background: #262b36; color: #fff; }
.ftpm-up-title { flex: 1; font-weight: 600; }
.ftpm-up-head button { border: 0; background: transparent; color: #fff; font-size: 18px; line-height: 1; width: 28px; height: 28px; border-radius: 4px; }
.ftpm-up-head button:hover { background: rgba(255, 255, 255, .15); }
.ftpm-up-list { max-height: 50vh; overflow-y: auto; }
.ftpm-up-min .ftpm-up-list { display: none; }
.ftpm-up-item { padding: 10px 16px 12px; border-top: 1px solid var(--ftpm-line); }
.ftpm-up-item:first-child { border-top: 0; }
.ftpm-up-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ftpm-up-bar { height: 6px; background: var(--ftpm-line); border-radius: 3px; margin: 7px 0 5px; overflow: hidden; }
.ftpm-up-bar span { display: block; height: 100%; width: 0; background: #259dab; border-radius: 3px; transition: width .25s; }
.ftpm-up-meta { font-size: 12px; color: var(--ftpm-soft); }
.ftpm-up-where { font-size: 12px; color: var(--ftpm-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ftpm-up-restore { background: var(--ftpm-warn-bg); }

/* Értesítések párbeszédablak */
.ftpm-notify-list { list-style: none; padding: 0; margin: 0 0 14px; }
.ftpm-notify-list li { padding: 8px 0; border-bottom: 1px solid var(--ftpm-line); }
.ftpm-notify-info { font-size: 12px; color: var(--ftpm-soft); }
.ftpm-notify-del { float: right; color: #9ca3af; padding: 2px 6px; }
.ftpm-notify-del:hover { color: var(--ftpm-danger); }
.ftpm-notify-row { display: flex; gap: 6px; }
.ftpm-notify-row .form-control { flex: 1; }
.ftpm-notify-sub { font-weight: normal; margin-top: 8px; display: block; }
.ftpm-up-actions { margin-top: 6px; display: flex; gap: 6px; justify-content: flex-end; }
.ftpm-up-done .ftpm-up-bar span { background: #1e9e57; }
.ftpm-up-error .ftpm-up-bar span { background: #d9534f; }
.ftpm-up-error .ftpm-up-meta { color: var(--ftpm-danger); }
.ftpm-up-paused .ftpm-up-bar span { background: #f0ad4e; }
.ftpm-up-cancelled { opacity: .5; }

/* bejelentkezés */
.ftpm-signin-error { margin-bottom: 14px; }
.ftpm-signin-gap { height: 14px; }

/* Bejelentkezés: elfelejtett jelszó, jelszó beállítása */
.ftpm-signin-link { text-align: center; margin: 4px 0 0; font-size: 13px; }
.ftpm-signin-text { font-size: 13px; color: #4b5563; }

/* Beállítások oldal */
.ftpm-prefs-loading { padding: 40px; text-align: center; color: var(--ftpm-soft); }
.ftpm-prefs-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.ftpm-prefs-head h3 { margin: 0; font-weight: 600; }
.ftpm-prefs-sub { margin-top: 22px; font-weight: 600; }
.ftpm-prefs .ftpm-muted { margin: 6px 0 14px; }
.ftpm-prefs-table td { vertical-align: middle !important; }
.ftpm-prefs-table .ftpm-col-actions { width: 1%; white-space: nowrap; text-align: right; }
/* A Bootstrap gombcsoport úszó elemei a keskeny (1%) cellában egymás alá törnének. */
.ftpm-prefs-table .ftpm-col-actions .btn-group { display: inline-flex; }
.ftpm-prefs-table .dropdown-menu a.text-danger { color: var(--ftpm-danger); }
.ftpm-prefs-form { max-width: 460px; }
.ftpm-row-off td { opacity: .6; }
.ftpm-deleted-list { padding-left: 18px; }
.ftpm-deleted-list li { margin: 4px 0; }
.ftpm-bucket-picker .radio-inline { margin-bottom: 8px; }
.ftpm-rights-table td { vertical-align: middle !important; }
.ftpm-rights-table th.text-center { width: 64px; cursor: help; }
.ftpm-rights-table input[type=checkbox] { width: 18px; height: 18px; margin: 0; }
.ftpm-path { display: flex; gap: 4px; }
.ftpm-path .form-control { flex: 1; min-width: 120px; }
.ftpm-rule-del { color: #9ca3af; padding: 4px; }
.ftpm-rule-del:hover { color: var(--ftpm-danger); }
.ftpm-rights-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ftpm-rights-tools select { width: auto; max-width: 320px; }
.ftpm-browser { margin-top: 14px; border: 1px solid var(--ftpm-line); border-radius: 6px; padding: 12px; background: var(--ftpm-surface-2); }
.ftpm-browser-crumbs { font-weight: 600; margin-bottom: 8px; }
.ftpm-browser-list { list-style: none; padding: 0; margin: 0 0 10px; max-height: 220px; overflow-y: auto; }
.ftpm-browser-list li { padding: 3px 0; }
.ftpm-browser-list .fa-folder { color: #f0ad4e; }
.ftpm-job .panel-body { padding: 12px 16px; }
.ftpm-job-head { margin-bottom: 6px; }
.ftpm-job .progress { margin: 8px 0; height: 10px; }
.ftpm-job-msg { margin-top: 6px; }
.ftpm-job-hiba .ftpm-job-msg { color: var(--ftpm-danger); }
.ftpm-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); max-width: 90vw; background: #1f2937; color: #fff; padding: 10px 18px; border-radius: 8px; box-shadow: 0 8px 30px rgba(0,0,0,.2); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 2000; }
.ftpm-toast.ftpm-toast-on { opacity: 1; transform: translate(-50%, 0); }
.ftpm-toast.ftpm-toast-bad { background: #b91c1c; }
.ftpm-rights-wrap { overflow-x: auto; }

/* ================= Sötét téma: a Quirk és a Bootstrap elemei ================= */
html[data-theme="dark"] body { background-color: var(--ftpm-bg); color: var(--ftpm-text); }
html[data-theme="dark"] h1, html[data-theme="dark"] h2, html[data-theme="dark"] h3,
html[data-theme="dark"] h4, html[data-theme="dark"] h5, html[data-theme="dark"] h6 { color: #eef1f6; }
html[data-theme="dark"] .headerpanel .logopanel h2 > a { color: #259dab; }
html[data-theme="dark"] .text-muted, html[data-theme="dark"] .help-block { color: var(--ftpm-muted); }
html[data-theme="dark"] hr { border-top-color: var(--ftpm-line); }
html[data-theme="dark"] code { color: #f39bbd; }

/* fejléc és bal oldali sáv */
html[data-theme="dark"] .headerpanel { background-color: #151922; box-shadow: 0 1px 0 #222834; }
html[data-theme="dark"] .headerpanel .logopanel { background-color: #11141b; }
html[data-theme="dark"] .headermenu > li .btn:hover, html[data-theme="dark"] .headermenu > li .btn:focus { color: #c8d0dd; }
html[data-theme="dark"] .headermenu .open .dropdown-toggle.dropdown-toggle,
html[data-theme="dark"] .headermenu .dropdown-toggle:hover { background-color: #1c212b; }
html[data-theme="dark"] .leftpanel { background-color: #151922; box-shadow: 1px 0 0 #222834; }
html[data-theme="dark"] .leftpanel-profile { background-color: #1c212b; }
html[data-theme="dark"] .nav-sidebar.nav-justified { background-color: #262c38; }
html[data-theme="dark"] .nav-sidebar.nav-justified > li > a { background-color: #1c212b; color: #aeb7c6; }
html[data-theme="dark"] .nav-sidebar.nav-justified > li > a:hover,
html[data-theme="dark"] .nav-sidebar.nav-justified > li > a:focus { background-color: #232a35; }
html[data-theme="dark"] .nav-sidebar.nav-justified > .active > a,
html[data-theme="dark"] .nav-sidebar.nav-justified > .active > a:hover,
html[data-theme="dark"] .nav-sidebar.nav-justified > .active > a:focus { background-color: #151922; color: #eef1f6; }
html[data-theme="dark"] .sidebar-title { color: #6c7486; }
html[data-theme="dark"] .nav-quirk { background-color: transparent; }
html[data-theme="dark"] .nav-quirk > li { border-top-color: #222834; }
html[data-theme="dark"] .nav-quirk > li:last-child { border-bottom-color: #222834; }
html[data-theme="dark"] .nav-quirk > li > a { color: #b6bfcd; }
html[data-theme="dark"] .nav-quirk > li > a:hover,
html[data-theme="dark"] .nav-quirk > li > a:focus { color: #fff; background-color: #1c212b; }
html[data-theme="dark"] .nav-quirk > li.active > a,
html[data-theme="dark"] .nav-quirk > li.active > a > i { color: #fff; }

/* tartalom */
html[data-theme="dark"] .breadcrumb-quirk > li,
html[data-theme="dark"] .breadcrumb-quirk > li.active { color: #dde2ea; }
html[data-theme="dark"] .breadcrumb-quirk > li > a { color: #aab3c2; }
html[data-theme="dark"] .breadcrumb-quirk > li > a:hover,
html[data-theme="dark"] .breadcrumb-quirk > li > a:focus { color: #fff; }
html[data-theme="dark"] .breadcrumb-quirk > li + li:before { color: #5d6678; }
html[data-theme="dark"] .panel { background-color: var(--ftpm-surface); border-color: var(--ftpm-line); }
html[data-theme="dark"] .panel-default > .panel-heading { background-color: #1d222c; border-color: var(--ftpm-line); color: var(--ftpm-text); }
html[data-theme="dark"] .well { background-color: var(--ftpm-surface-2); }
html[data-theme="dark"] .progress { background-color: #262c38; }

/* táblázatok */
html[data-theme="dark"] table { background-color: var(--ftpm-surface-2); }
html[data-theme="dark"] .table { color: var(--ftpm-text); }
html[data-theme="dark"] .table > thead > tr > th,
html[data-theme="dark"] .table > tfoot > tr > th { background-color: #1d222c; color: #aeb7c6; }
html[data-theme="dark"] .table > thead > tr > th, html[data-theme="dark"] .table > tbody > tr > th,
html[data-theme="dark"] .table > tfoot > tr > th, html[data-theme="dark"] .table > thead > tr > td,
html[data-theme="dark"] .table > tbody > tr > td, html[data-theme="dark"] .table > tfoot > tr > td { border-color: var(--ftpm-line); }
html[data-theme="dark"] .table-hover > tbody > tr:hover { background-color: #1d2430; }
html[data-theme="dark"] .table > tbody > tr.info > td, html[data-theme="dark"] .table > tbody > tr.info > th { background-color: var(--ftpm-selected); }
html[data-theme="dark"] .table-primary { background-color: var(--ftpm-surface); }
html[data-theme="dark"] .table-primary > thead > tr > th { background-color: #1f2b3b; color: #c8d3e2; border-color: #2a3647; }
html[data-theme="dark"] .table-primary > tbody > tr > th,
html[data-theme="dark"] .table-primary > tbody > tr > td { color: #cfd6e2; }
html[data-theme="dark"] .table-primary > tbody > tr.info > td { background-color: var(--ftpm-selected); }
html[data-theme="dark"] .table-primary.table-hover > tbody > tr:hover { background-color: #1d2430; }
html[data-theme="dark"] .table-primary.table-hover > tbody > tr.info:hover > td { background-color: #21384f; }
html[data-theme="dark"] .table-options > li > a { color: #7d889c; }
html[data-theme="dark"] .table-options > li > a:hover,
html[data-theme="dark"] .table-options > li > a:focus { color: #dde2ea; }
html[data-theme="dark"] .ftpm-name { color: var(--ftpm-link); }

/* gombok és űrlapok */
html[data-theme="dark"] .btn-default { background-color: #1d222c; border-color: #343c4b; color: #cfd6e2; }
html[data-theme="dark"] .btn-default:hover, html[data-theme="dark"] .btn-default:focus,
html[data-theme="dark"] .btn-default:active, html[data-theme="dark"] .btn-default.active,
html[data-theme="dark"] .open > .dropdown-toggle.btn-default { background-color: #262c38; border-color: #444d5f; color: #fff; }
html[data-theme="dark"] .btn-default[disabled], html[data-theme="dark"] .btn-default[disabled]:hover { background-color: #1a1e26; border-color: #2a303c; color: #6c7486; }
html[data-theme="dark"] .form-control { background-color: #12161d; border-color: #343c4b; color: #e2e6ee; box-shadow: none; }
html[data-theme="dark"] .form-control:focus { border-color: #4cc3d1; box-shadow: 0 0 0 3px rgba(76, 195, 209, .18); }
html[data-theme="dark"] .form-control::placeholder { color: #6c7486; }
html[data-theme="dark"] .form-control[readonly], html[data-theme="dark"] .form-control[disabled] { background-color: #1a1e26; }
html[data-theme="dark"] .input-group-addon { background-color: #1d222c; border-color: #343c4b; color: #aeb7c6; }
html[data-theme="dark"] .close { color: #fff; text-shadow: none; opacity: .6; }
html[data-theme="dark"] .close:hover, html[data-theme="dark"] .close:focus { color: #fff; opacity: 1; }

/* lenyíló menük, ablakok, figyelmeztetések */
html[data-theme="dark"] .dropdown-menu { background-color: #1d222c; border-color: #2c3340; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); }
html[data-theme="dark"] .dropdown-menu > li > a { color: #cfd6e2; }
html[data-theme="dark"] .dropdown-menu > li > a:hover, html[data-theme="dark"] .dropdown-menu > li > a:focus { background-color: #262c38; color: #fff; }
html[data-theme="dark"] .dropdown-menu .divider { background-color: #2c3340; }
html[data-theme="dark"] .modal-content { background-color: var(--ftpm-surface); border-color: #2c3340; color: var(--ftpm-text); box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
html[data-theme="dark"] .modal-header, html[data-theme="dark"] .modal-footer { border-color: var(--ftpm-line); }
html[data-theme="dark"] .modal-title { color: #eef1f6; }
html[data-theme="dark"] .modal-backdrop.in { opacity: .7; }
html[data-theme="dark"] .alert-warning { background-color: #2b2416; border-color: #5a4a1f; color: #ecc977; }
html[data-theme="dark"] .alert-info { background-color: #132636; border-color: #1f4a66; color: #93cdf0; }
html[data-theme="dark"] .alert-success { background-color: #13281d; border-color: #1f5a3a; color: #86d9aa; }
html[data-theme="dark"] .alert-danger { background-color: #301818; border-color: #6a2a2a; color: #f3a6a2; }
html[data-theme="dark"] .alert a, html[data-theme="dark"] .alert .alert-link { color: inherit; text-decoration: underline; }
html[data-theme="dark"] .ftpm-pending-del { color: #ecc977; }
html[data-theme="dark"] .ftpm-toast { background: #2c3340; }
html[data-theme="dark"] .ftpm-avatar { background: #1f7f8b; }

/* ================= Telefon (767 px-ig) ================= */
@media (max-width: 767px) {
  .ftpm-app { font-size: 13px; }
  .contentpanel { padding: 14px 10px 96px; }
  .breadcrumb-quirk { margin-bottom: 10px; }
  .breadcrumb-quirk > li { font-size: 13px; }
  .headermenu > li .btn.ftpm-theme-btn { width: 40px; }
  .ftpm-username, .btn-logged .caret { display: none; }
  .btn-logged .ftpm-avatar { margin-right: 4px; width: 30px; height: 30px; line-height: 30px; }

  /* eszköztár: egy vízszintesen görgethető sor a fejléc alatt rögzítve; ami nem használható, nem foglal helyet */
  .ftpm-toolbar {
    position: sticky; top: 64px; z-index: 30; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 4px;
    margin: 0 -10px 8px; padding: 8px 0 6px; background: var(--ftpm-bg);
  }
  .ftpm-toolbar-btns { flex-wrap: nowrap; overflow-x: auto; padding: 0 10px 2px; gap: 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .ftpm-toolbar-btns::-webkit-scrollbar { display: none; }
  .ftpm-toolbar .btn { flex: none; padding: 8px 12px; font-size: 13px; border-radius: 999px; }
  .ftpm-toolbar .btn[disabled], .ftpm-toolbar-sep { display: none; }
  .ftpm-summary { margin: 0; padding: 0 12px; font-size: 12px; }

  /* fájllista: táblázat helyett sorok (név, alatta méret · dátum · feltöltő, jobbra „⋮”) */
  .ftpm-list-panel { border-radius: 10px; overflow: hidden; margin-bottom: 12px; }
  .ftpm-list-panel > .panel-body { padding: 0; }
  .ftpm-list-panel .table-responsive { overflow: visible; border: 0; margin: 0; }
  .ftpm-table, .ftpm-table > tbody, .ftpm-table > thead { display: block; width: 100%; }
  .ftpm-table.table-primary { background: var(--ftpm-surface); }
  .ftpm-table > thead > tr { display: block; }
  .ftpm-table > thead > tr > th { display: none; }
  .ftpm-table > thead > tr > th.ftpm-col-check {
    display: block; width: auto; padding: 0; text-align: left; border: 0; border-radius: 0;
    background: var(--ftpm-surface-2); color: var(--ftpm-soft); text-transform: none; letter-spacing: 0; font-size: 13px;
  }
  .ftpm-checkall { display: flex; align-items: center; gap: 12px; padding: 11px 14px; cursor: pointer; }
  .ftpm-checkall span { display: inline; font-weight: 600; }
  .ftpm-table input[type=checkbox] { width: 18px; height: 18px; margin: 0; }
  .ftpm-table > tbody > tr { display: block; border-top: 1px solid var(--ftpm-line); }
  .ftpm-table > tbody > tr > td { display: block; padding: 0; border: 0 !important; background: transparent !important; min-width: 0 !important; text-align: left; }
  .ftpm-table.table-primary > tbody > tr.info { background-color: var(--ftpm-selected); }
  .ftpm-table > tbody > tr.ftpm-file, .ftpm-table > tbody > tr.ftpm-dir {
    display: grid; grid-template-columns: 44px 58px auto auto minmax(0, 1fr) 44px;
    align-items: center; padding: 10px 0; row-gap: 2px;
  }
  .ftpm-table > tbody > tr > td.ftpm-col-check { grid-column: 1; grid-row: 1 / span 2; width: auto; align-self: center; text-align: center; }
  .ftpm-table > tbody > tr > td:nth-child(2) { grid-column: 2 / 6; grid-row: 1; white-space: normal !important; }
  .ftpm-table > tbody > tr.ftpm-comments > td, .ftpm-table > tbody > tr.ftpm-up > td, .ftpm-table > tbody > tr.ftpm-empty > td { white-space: normal !important; }
  .ftpm-table > tbody > tr > td:nth-child(3) { grid-column: 3; grid-row: 2; }
  .ftpm-table > tbody > tr > td:nth-child(4) { grid-column: 4; grid-row: 2; }
  .ftpm-table > tbody > tr > td:nth-child(5) { grid-column: 5; grid-row: 2; overflow: hidden; text-overflow: ellipsis; }
  .ftpm-table > tbody > tr > td:nth-child(n+3):nth-child(-n+5) { font-size: 12px; color: var(--ftpm-muted); white-space: nowrap; }
  .ftpm-table > tbody > tr.ftpm-file > td:nth-child(4)::before,
  .ftpm-table > tbody > tr > td:nth-child(5):not(:empty)::before { content: '·'; margin: 0 6px; }
  .ftpm-table .ftpm-name { gap: 10px; font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
  .ftpm-table tr.ftpm-dir .ftpm-thumb { font-size: 21px; }
  .ftpm-table > tbody > tr > td.ftpm-col-actions { display: contents; }
  .ftpm-more {
    display: flex; align-items: center; justify-content: center; grid-column: 6; grid-row: 1 / span 2;
    width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--ftpm-muted); font-size: 18px;
  }
  .ftpm-more:active, tr.ftpm-open .ftpm-more { background: var(--ftpm-thumb); color: var(--ftpm-text); }
  .ftpm-table .table-options { display: none; grid-column: 1 / -1; grid-row: 3; flex-wrap: wrap; gap: 6px; padding: 8px 12px 2px 44px; text-align: left; white-space: normal; }
  .ftpm-table tr.ftpm-open .table-options { display: flex; }
  .ftpm-table .table-options > li { margin: 0; }
  .ftpm-table .table-options > li > a {
    display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; line-height: 1.2; font-size: 13px;
    border: 1px solid var(--ftpm-line); border-radius: 999px; background: var(--ftpm-surface); color: var(--ftpm-text);
  }
  .ftpm-table .table-options > li > a::after { content: attr(title); }
  .ftpm-table .table-options > li > a > i { line-height: 1; color: var(--ftpm-muted); }
  .ftpm-table .table-options > li > a.ftpm-delete-one, .ftpm-table .table-options > li > a.ftpm-delete-one > i { color: var(--ftpm-danger); }
  .ftpm-table > tbody > tr.ftpm-up > td:first-child, .ftpm-table > tbody > tr.ftpm-comments > td:first-child { display: none; }
  .ftpm-table > tbody > tr.ftpm-up a { display: block; padding: 12px 14px; font-size: 14px; }
  .ftpm-table > tbody > tr.ftpm-comments { border-top: 0; }
  .ftpm-table > tbody > tr.ftpm-comments > td { padding: 2px 12px 10px 102px; font-size: 12px; }
  .ftpm-table > tbody > tr.ftpm-comments.ftpm-hidden { display: none; }
  .ftpm-comment-form textarea { max-width: none; }
  .ftpm-table > tbody > tr.ftpm-empty > td { padding: 36px 16px; }

  /* ablakok: a Quirk középre igazítása helyett normál folyás, hogy a hosszú ablak is görgethető legyen */
  .modal-dialog, .modal.in .modal-dialog { position: relative; top: auto; left: auto; transform: none; margin: 74px 10px 24px; width: auto; }
  .modal-dialog.modal-sm { margin-left: auto; margin-right: auto; max-width: 300px; }
  .modal-header, .modal-body, .modal-footer { padding-left: 16px; padding-right: 16px; }
  .modal-footer .btn { margin-bottom: 4px; }
  .ftpm-sellink-exp { flex-wrap: wrap; }
  .ftpm-sellink-exp select, .ftpm-sellink-exp input { max-width: none; flex: 1 1 140px; }
  .ftpm-linkbox { flex-direction: column; }

  /* linkek listája és a Beállítások táblázatai: soronként egy kártya, a mezők előtt a fejléc szövegével */
  .ftpm-stack, .ftpm-stack > tbody { display: block; width: 100%; }
  .ftpm-stack > thead { display: none; }
  .ftpm-stack > tbody > tr { display: block; position: relative; padding: 10px 12px; border-top: 1px solid var(--ftpm-line); }
  .ftpm-stack > tbody > tr:first-child { border-top: 0; }
  .ftpm-stack > tbody > tr > td { display: block; padding: 2px 0 !important; border: 0 !important; text-align: left !important; width: auto !important; }
  .ftpm-stack > tbody > tr > td[data-label]::before { content: attr(data-label) ': '; color: var(--ftpm-muted); font-size: 12px; }
  .ftpm-stack > tbody > tr > td:first-child { font-size: 14px; }
  .ftpm-stack > tbody > tr > td:first-child::before { display: none; }
  .ftpm-stack > tbody > tr > td.ftpm-col-actions { padding-top: 8px !important; white-space: normal; }
  .ftpm-stack .btn-xs { padding: 6px 11px; font-size: 13px; }
  .table-responsive > .ftpm-stack { margin: 0; }
  .table-responsive { border: 0; }
  .ftpm-prefs .panel-body { padding: 0; }
  .ftpm-prefs-head { flex-wrap: wrap; }
  .ftpm-prefs-head h3 { font-size: 20px; }

  /* feltöltési panel: alul, teljes szélességben */
  .ftpm-uploads { left: 8px; right: 8px; bottom: 8px; width: auto; max-width: none; }
}
