/* Egyedi stílusok a Tailwind alapok mellé */

/* Mindig nyerjen a hidden osztály (a saját display:flex szabályokkal szemben is) */
.hidden { display: none !important; }

/* ===== Sötét mód ===== */
body.dark {
  color-scheme: dark;
}
body.dark,
body.dark #main {
  background: linear-gradient(180deg, #0f172a 0%, #111c33 100%);
}
body.dark .auth-view {
  background: #5c1a23;
}
body.dark .tab-btn.active { background: #1e293b; color: #f1f5f9; }
body.dark #sidebar { background: #0f172a; border-color: #1e293b; }
body.dark .sidebar-header { border-color: #1e293b; }
body.dark .side-section-head:hover { background: #1e293b; }
body.dark .bg-white { background-color: #1e293b; }
body.dark .bg-slate-100 { background-color: #334155; }
body.dark .bg-blue-50 { background-color: #1e3a5f; }
body.dark .bg-red-50 { background-color: #450a0a; }
body.dark .bg-blue-600 { background-color: #8c2633; }
body.dark .bg-blue-700 { background-color: #74202b; }
body.dark .text-slate-900 { color: #f1f5f9; }
body.dark .text-slate-800 { color: #e2e8f0; }
body.dark .text-slate-700 { color: #cbd5e1; }
body.dark .text-slate-600 { color: #94a3b8; }
body.dark .text-slate-500 { color: #94a3b8; }
body.dark .text-slate-400 { color: #94a3b8; }
body.dark .text-blue-700,
body.dark .text-blue-800,
body.dark .text-blue-600 { color: #dd9ba5; }
body.dark .border-slate-100,
body.dark .border-slate-200 { border-color: #1e293b; }
body.dark .border-slate-300 { border-color: #334155; }
body.dark .shadow-slate-200,
body.dark .shadow-slate-200\/60 { --tw-shadow-color: rgba(0,0,0,.4); }
body.dark .filter-btn { color: #cbd5e1; }
body.dark .filter-btn:hover { background: #1e293b; }
body.dark .filter-btn.active { background: #1e3a5f; color: #dd9ba5; }
body.dark .filter-btn .count { color: #64748b; }
body.dark .filter-btn.active .count { color: #c2606f; }
body.dark .task { background-color: #1e293b; border-color: #334155; }
body.dark .task:hover { border-color: #a63d4c; }
body.dark .task.overdue { background-color: #2b2222; border-color: #6b3232; }
body.dark .task.done { background-color: #1e293b; opacity: 0.6; }
body.dark .task-title { color: #f8fafc; }
body.dark .task.overdue .task-title { color: #fecaca; }
body.dark .meta-due.overdue-text { color: #fca5a5; }
body.dark .meta-due.due-today { color: #86efac; }
body.dark .task-desc { color: #cbd5e1; }
body.dark .task-subs { color: #cbd5e1; }
body.dark .meta-due { color: #cbd5e1; }
body.dark .badge { background: #1e3a5f; color: #dd9ba5; }
body.dark .modal-card { background: #1e293b; border-color: #334155; color: #e2e8f0; }
/* Sötét módban a beállítások szövegei világosak legyenek (nem fekete) */
body.dark .modal-card h1, body.dark .modal-card h2, body.dark .modal-card h3,
body.dark .modal-card .text-slate-900, body.dark .modal-card .text-slate-800, body.dark .modal-card .text-slate-700,
body.dark .modal-card .font-semibold, body.dark .modal-card th { color: #f1f5f9; }
body.dark .modal-card .text-slate-600, body.dark .modal-card .text-slate-500, body.dark .modal-card .text-slate-400,
body.dark .modal-card .text-xs, body.dark .modal-card td { color: #94a3b8; }
body.dark .modal-card .inp, body.dark .modal-card input, body.dark .modal-card select, body.dark .modal-card textarea { background: #0f172a; color: #f1f5f9; border-color: #334155; }
body.dark .modal-card label, body.dark .modal-card .bg-white, body.dark .modal-card .border-slate-200 { background: #1e293b; border-color: #334155; }
body.dark .settings-tab-btn { color: #cbd5e1; background: transparent; }
body.dark .settings-tab-btn.active { background: #0f172a; color: #f1f5f9; }
body.dark .settings-tab-btn:hover { color: #f1f5f9; }
body.dark .modal-card table tr { border-color: #334155; }
body.dark .inp { background: #0f172a; border-color: #334155; color: #f1f5f9; }
body.dark .file-row { background: #0f172a; border-color: #334155; }
body.dark .file-thumb { background: #0f172a; border-color: #334155; }
body.dark .file-link { color: #c2606f; }
body.dark .empty { color: #64748b; }
body.dark .avatar-row .avatar { box-shadow: 0 0 0 2px #1e293b; }
body.dark .sidebar-header .avatar { box-shadow: 0 0 0 2px #1e293b; }
body.dark .icon-btn:hover { background: #1e293b; color: #f1f5f9; }
body.dark .subtask-remove { color: #94a3b8; }
body.dark .side-act:hover { background: #1e3a5f; color: #dd9ba5; }
body.dark #btn-enable-push { background: #1e3a5f; color: #dd9ba5; }
body.dark .btn-danger { background: #1e293b; color: #f87171; border-color: #7f1d1d; }
body.dark .btn-danger:hover { background: #3a1d1d; }
body.dark .theme-opt { border-color: #334155 !important; background: #1e293b !important; }
body.dark .theme-opt span { color: #e2e8f0 !important; }
body.dark #add-user-form { background: #0f172a !important; border-color: #334155 !important; }
body.dark .filter-btn .dot { background: #475569; }
body.dark .file-ico { filter: invert(.7); }
body.dark ::-webkit-scrollbar-thumb { background: #334155; }
@media (min-width: 769px) {
  body.sidebar-collapsed #sidebar { display: none; }
}

/* Auth nézet — a splash mintájára: kék háttér, fehér programnév */
.auth-view {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: #8c2633;
}
.auth-inner { width: 100%; max-width: 28rem; }
.auth-title {
  color: #fff; font-weight: 800; letter-spacing: .5px; line-height: 1;
  font-size: clamp(40px, 12vw, 72px); text-align: center;
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .22);
}
.auth-card {
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 20px;
  box-shadow: 0 22px 55px rgba(2, 20, 60, .32);
  padding: 24px;
}
/* Világos mód: erős kontraszt (címkék, beviteli mezők) */
.auth-card label { color: #0f172a !important; }
.auth-card input {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}
.auth-card input::placeholder { color: #94a3b8 !important; }
.auth-card input:focus { border-color: #8c2633 !important; box-shadow: 0 0 0 3px rgba(140, 38, 51, .18) !important; }
/* Sötét mód: sötét kártya, világos szöveg */
body.dark .auth-card { background: #1e293b; border-color: #334155; }
body.dark .auth-card label { color: #e2e8f0 !important; }
body.dark .auth-card input {
  background: #0f172a !important;
  color: #f1f5f9 !important;
  border-color: #475569 !important;
}
body.dark .auth-card input::placeholder { color: #64748b !important; }
body.dark .auth-card input:focus { border-color: #c2606f !important; box-shadow: 0 0 0 3px rgba(96, 165, 250, .25) !important; }

/* Auth tabok */
.tab-btn.active { background: #fff; color: #0f172a; box-shadow: 0 1px 2px rgba(15,23,42,.08); }

/* Profilkép kör */
.avatar {
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.6), 0 1px 2px rgba(15,23,42,.15);
  border: 2px solid #cbd5e1; /* light mode: slate-300 */
}
body.dark .avatar {
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.1), 0 1px 2px rgba(0,0,0,.3);
  border-color: #64748b; /* dark mode: slate-500 */
}
.avatar-row {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  vertical-align: middle;
}
.avatar-row .avatar { box-shadow: 0 0 0 2px #fff; }
body.dark .avatar-row .avatar { box-shadow: 0 0 0 2px #0f172a; }

/* App elrendezés */
.app-view {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

#main {
  overflow-y: auto;
}

/* Edge-to-edge / status bar safe area (Android 16+ / notch): a tartalom ne lógjon a
   felső értesítési sávba. A desktop-webhelyen env()=0, ott nincs hatása. */
#main,
#sidebar {
  padding-top: env(safe-area-inset-top, 0px);
}
/* Mobilon erősebb alsó korlát: a szokásos állapotsáv (24-28px) fölé emel, hogy a
   hamburger és a lista neve ne nyúljon az értesítési sávba; a notch nagyobb env()-et ad. */
@media (max-width: 768px) {
  #main,
  #sidebar {
    padding-top: max(env(safe-area-inset-top, 0px), 28px);
  }
}
/* Safe area (böngésző/rendszer alsó sáv): a lebegő + gombok ne kerüljenek az alsó
   gombsáv alá (mobil web / standalone PWA). */
#btn-new-task,
#btn-inline-task,
#btn-camera-task {
  bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
}

/* Pull-to-refresh (natív APK) — lehúzással frissítés, mint a webböngészőben */
#main { overscroll-behavior-y: contain; }
.pull-indicator {
  height: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 13px; color: #64748b; background: transparent;
  transition: height .18s ease;
}
.pull-indicator.pulling { transition: none; }
.pull-indicator .pull-icon { display: inline-block; font-size: 18px; transition: transform .15s linear; }
.pull-indicator .pull-icon.spin { animation: pullSpin .7s linear infinite; }
.pull-indicator.refreshing .pull-icon,
.pull-indicator.refreshing .pull-label { color: #8c2633; font-weight: 600; }
@keyframes pullSpin { to { transform: rotate(360deg); } }

/* Sidebar görgethető (egérrel / mobilon kézzel) — a hosszú menü (listák, címkék) nem vágódik le */
#sidebar {
  overflow-y: auto;
  overflow-x: hidden;
}

/* Gombok */
.btn {
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .15s;
}
.btn-primary { background: #8c2633; color: #fff; box-shadow: 0 4px 12px rgba(140,38,51,.25); }
.btn-primary:hover { background: #74202b; }
.btn-danger { background: #fff; color: #dc2626; border-color: #fecaca; }
.btn-danger:hover { background: #fef2f2; }
#btn-inline-task { background: #ffffff; color: #334155; border: 1px solid #cbd5e1; box-shadow: 0 4px 14px rgba(15,23,42,.14); }
#btn-inline-task:hover { background: #f1f5f9; border-color: #94a3b8; }
body.dark #btn-inline-task { background: #1e293b; color: #e2e8f0; border-color: #475569; box-shadow: 0 4px 14px rgba(0,0,0,.45); }
body.dark #btn-inline-task:hover { background: #334155; border-color: #64748b; }
#btn-camera-task { background: #ffffff; color: #8c2633; border: 1px solid #ecc6cc; box-shadow: 0 4px 14px rgba(15,23,42,.14); }
#btn-camera-task:hover { background: #fbf3f4; border-color: #dd9ba5; }
body.dark #btn-camera-task { background: #1e293b; color: #dd9ba5; border-color: #334155; box-shadow: 0 4px 14px rgba(0,0,0,.45); }
body.dark #btn-camera-task:hover { background: #334155; border-color: #475569; }
/* A lebegő gombok pontos helye (a Tailwind right-24/right-40 hiányozhat a generált CSS-ből) */
#btn-new-task { right: 24px !important; }
#btn-camera-task { right: 96px !important; }
#btn-inline-task { right: 168px !important; }

/* Inputok */
.recur-day-chip {
  display: inline-flex; align-items: center; gap: 4px;
  cursor: pointer; user-select: none; -webkit-user-select: none;
}
.recur-day-chip input { width: 16px; height: 16px; accent-color: #8c2633; }
.recur-day-chip span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; padding: 3px 5px; border-radius: 6px;
  background: #f1f5f9; color: #475569; font-size: 12px; font-weight: 600;
  border: 1px solid #e2e8f0; transition: background .15s, color .15s;
}
.recur-day-chip:has(input:checked) span { background: #8c2633; color: #fff; border-color: #8c2633; }
.inp {
  width: 100%;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0f172a;
  font-size: 15px;
}
.inp:focus { outline: none; border-color: #a63d4c; box-shadow: 0 0 0 3px rgba(166,61,76,.15); }

/* Toggle switch */
.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  appearance: none;
  background: #cbd5e1;
  border-radius: 12px;
  cursor: pointer;
  transition: background .2s;
}
.toggle-switch::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0,0,0,.2);
  transition: transform .2s;
}
.toggle-switch:checked {
  background: #8c2633;
}
.toggle-switch:checked::before {
  transform: translateX(20px);
}
.toggle-switch:focus { outline: none; box-shadow: 0 0 0 3px rgba(140,38,51,.3); }
body.dark .toggle-switch { background: #475569; }
body.dark .toggle-switch::before { background: #1e293b; }
body.dark .toggle-switch:checked { background: #a63d4c; }

/* Sidebar navigáció */
.filter-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  background: transparent;
  color: #334155;
  cursor: pointer;
  border-radius: 10px;
  transition: background .12s, color .12s;
}
.filter-btn:hover { background: #f1f5f9; }
.filter-btn.active { background: #fbf3f4; color: #74202b; font-weight: 600; }
.filter-btn .dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; background: #94a3b8; }
.filter-btn .count { font-size: 12px; color: #94a3b8; margin-left: auto; }
.filter-btn.active .count { color: #a63d4c; }
.filter-btn .side-acts { display: none; gap: 2px; flex-shrink: 0; }
.filter-btn:hover .side-acts, .filter-btn.active .side-acts { display: flex; }
.side-act {
  background: transparent; border: none; cursor: pointer;
  color: #94a3b8; font-size: 12px; line-height: 1;
  border-radius: 6px; padding: 3px 4px;
}
.side-act:hover { background: #f6e4e7; color: #74202b; }
.side-act.danger:hover { background: #fee2e2; color: #dc2626; }

/* Feladatlista */
.task {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
  position: relative;
  background-color: var(--task-bg, #fff);
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 16px;
  cursor: pointer;
  transition: box-shadow .15s, border-color .15s;
}
.task:hover { box-shadow: 0 4px 16px rgba(15,23,42,.06); border-color: #ecc6cc; }
/* Bal oszlop: kész gomb, alatta a mozgató rács (vízszintes helyet nyerünk) */
.task-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.drag-handle {
  flex-shrink: 0; cursor: grab; color: #94a3b8; font-size: 16px; line-height: 1;
  padding: 2px 2px; user-select: none; -webkit-user-select: none; touch-action: none;
}
.drag-handle:hover { color: #64748b; }
.task.dragging { opacity: .5; }
.task.overdue { background-color: #fff6f6; border: 1px solid #fca5a5; }
.task.done { opacity: .55; background-color: #f8fafc; }
.task.done .task-title { text-decoration: line-through; }
.task.done .task-desc { color: #94a3b8; }

/* Gyors inline-feladat box (piros gomb) — oszlopméretű kártya, a lista elején */
.task.inline-compose { cursor: default; padding: 14px 16px; }
.task.inline-compose:hover { box-shadow: none; border-color: #e2e8f0; }
.inline-prio { position: absolute; top: 12px; right: 14px; display: flex; gap: 6px; z-index: 1; }
.prio-dot { width: 14px; height: 14px; border-radius: 999px; border: 1px solid transparent; cursor: pointer; transition: transform .12s, box-shadow .12s; }
.prio-dot:hover { transform: scale(1.2); }
.prio-dot.pi-2 { background: #ef4444; }
.prio-dot.pi-1 { background: #f59e0b; }
.prio-dot.pi-0 { background: #22c55e; }
.prio-dot.selected { box-shadow: 0 0 0 3px rgba(15,23,42,.28); border: 1px solid rgba(15,23,42,.5); }
.in-compose .in-title,
.in-title { display: block; width: 100%; padding-right: 64px; font-weight: 600; font-size: 14px; color: #0f172a; border: none; background: transparent; outline: none; }
.in-desc { display: block; width: 100%; margin-top: 6px; font-size: 13px; color: #64748b; border: none; background: transparent; outline: none; resize: vertical; min-height: 32px; line-height: 1.4; }
.inline-controls { display: flex; align-items: center; gap: 6px; margin-top: 8px; width: 100%; }
.inline-spacer { flex: 1; }
.in-expand { font-size: 15px; line-height: 1; color: #64748b; background: none; border: none; cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.in-expand:hover { background: #f1f5f9; color: #0f172a; }
.in-cancel, .in-save { background: none; border: none; cursor: pointer; padding: 4px 8px; border-radius: 8px; font-size: 15px; }
.in-cancel:hover { background: #fef2f2; }
.in-save:hover { background: #eef6ff; }
body.dark .in-title { color: #f1f5f9; }
body.dark .in-desc { color: #94a3b8; }
body.dark .in-expand:hover, body.dark .in-cancel:hover { background: #1e293b; }
.task.done .task-subs { color: #94a3b8; }
.task.done .meta-due { color: #94a3b8; }
.task-check {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid #94a3b8; background: #fff;
  color: #fff; font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.task-check:hover { border-color: #22c55e; }
.task-check.checked { background: #22c55e; border-color: #22c55e; }
/* Műveletek: a kártya legalján, teljes szélességű sorban, jobbra igazítva */
.task-actions {
  position: static;
  flex: 1 0 100%;
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 10px;
  transition: opacity .15s;
}
.task-actions .icon-btn { font-size: 20px; padding: 6px 8px; line-height: 1; }
/* Szűk mobilnézet: a kártya gombjai EGY sorban, egyenletesen elosztva (ne kelljen görgetni) */
@media (max-width: 480px) {
  .task-actions { display: flex; flex-wrap: nowrap; justify-content: space-between; gap: 2px; }
  .task-actions .icon-btn { padding: 6px 3px; }
}
/* Csatolt fájl / kép / PDF előnézete a kártya alján, a kártya szélességében */
.task-files-preview {
  flex: 1 0 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  overflow: hidden;
}
.task-files-preview img { display: block; width: 100%; height: auto; max-height: none; object-fit: contain; }
/* Weboldal mini előnézet (thumbnail + cím + URL) */
.task-link-preview {
  display: block;
}
.link-preview-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  min-width: 0;
}
.link-preview-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 10px;
  background: #eef2f7;
  display: none; /* csak akkor jelenik meg, ha van érvényes miniatűr */
}
.link-preview-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.link-preview-title {
  font-weight: 600;
  color: #0f172a;
  font-size: 13px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: none;
}
.link-preview-url {
  color: #64748b;
  font-size: 12px;
  word-break: break-all;
}

/* Masonry (kőműves) elrendezés: magasság alapján pakol, az oszlopszám a képernyőméret szerint */
.task-list {
  column-count: 1;
  column-gap: 14px;
}
@media (min-width: 720px) { .task-list { column-count: 2; } }
@media (min-width: 1150px) { .task-list { column-count: 3; } }
/* Ha egy kártya kiemelkedően magas, 2 oszlop (ne maradjon ritka üres oszlop) */
.task-list.reduce-cols { column-count: 2; }
.task-list .task {
  break-inside: avoid;
  margin-bottom: 14px;
}

.empty { text-align: center; color: #94a3b8; padding: 40px; }
.empty-home { padding: 0; color: inherit; }
.task-body { flex: 1; min-width: 0; user-select: text; -webkit-user-select: text; cursor: text; }
.task-title { font-weight: 600; color: #0f172a; }
/* Leírás: akár 20 sor is látszik; kijelölhető/másolható */
.task-desc { color: #64748b; font-size: 13px; white-space: pre-wrap; margin-top: 2px; overflow-wrap: anywhere; word-break: break-word; user-select: text; -webkit-user-select: text; }
.task-subs { color: #94a3b8; font-size: 12px; margin-top: 6px; display: flex; align-items: center; gap: 5px; }
.task-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.meta-project { border: 1px solid; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 500; }
.meta-list { border: 1px solid; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 500; }
.meta-due { font-size: 12px; color: #64748b; }
.meta-due.overdue-text { color: #dc2626; font-weight: 600; }
.meta-due.due-today { color: #16a34a; font-weight: 600; }
.prio { font-size: 11px; }
.meta-files { font-size: 12px; color: #64748b; }
.badge { background: #fbf3f4; color: #74202b; padding: 2px 8px; border-radius: 999px; font-size: 10px; margin-left: 6px; }
.tag-chip { padding: 2px 9px; border-radius: 999px; font-size: 11px; }

/* Modálok */
.modal {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(15,23,42,.45);
  backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto;
  padding: 24px;
  box-shadow: 0 24px 60px rgba(15,23,42,.18);
}
.modal-small { max-width: 380px; }
/* Az e-mail súgó a beállítások fölött nyíljon */
#mail-help-modal { z-index: 80; }
.modal-wide { max-width: 940px; }
/* A beállítások ablak desktopon ne ugráljon — mindig felülre igazítjuk, nem középre */
.modal.modal-top { align-items: flex-start; padding-top: 4vh; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.icon-btn { background: transparent; border: none; cursor: pointer; color: #64748b; border-radius: 8px; }
.icon-btn:hover { background: #f1f5f9; color: #0f172a; }

/* Címke választó */
.tag-option { cursor: pointer; display: inline-flex; }
.tag-option .tag-chip { cursor: pointer; opacity: .6; transition: opacity .12s, outline .12s; }
.tag-option.selected .tag-chip { opacity: 1; outline: 2px solid #a63d4c; outline-offset: 1px; }
.tag-checkbox { position: absolute; opacity: 0; pointer-events: none; }

/* Alműveletek */
.subtask-row { display: flex; gap: 8px; align-items: center; }
.subtask-title { flex: 1; }
.subtask-remove { flex-shrink: 0; }
.subtask-check {
  width: 18px; height: 18px; flex-shrink: 0;
  accent-color: #8c2633; cursor: pointer;
}
.subtask-row.subtask-done .subtask-title { text-decoration: line-through; color: #94a3b8; }
.card-subcheckbox { color: #64748b; font-size: 12px; }

/* Mellékletek */
.file-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border: 1px solid #e2e8f0; border-radius: 10px;
  background: #f8fafc;
}
.file-thumb {
  width: 40px; height: 40px; flex-shrink: 0;
  object-fit: cover; border-radius: 8px;
  border: 1px solid #e2e8f0; background: #fff;
}
.file-thumb-pdf {
  width: 30px; height: 40px;
}
.file-ico { flex-shrink: 0; font-size: 18px; line-height: 1; }
.file-link {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 13px; color: #8c2633; text-decoration: none;
}
.file-link:hover { text-decoration: underline; }
.file-size { font-size: 11px; color: #94a3b8; flex-shrink: 0; }
.file-remove { flex-shrink: 0; }
.file-remove:hover { color: #dc2626; background: #fee2e2; }
.file-preview {
  margin-bottom: 6px; padding: 10px;
  border: 1px solid #e2e8f0; border-radius: 12px;
  background: #f8fafc; text-align: center;
}
.file-preview img {
  max-width: 100%; max-height: 480px; width: auto; height: auto;
  border-radius: 8px; display: inline-block; vertical-align: middle;
}
.file-preview-pdf embed { width: 100%; height: 480px; border: 0; border-radius: 8px; background: #fff; display: block; }
body.dark .file-preview { border-color: #334155; background: #0f172a; }
body.dark .file-preview img { background: #0f172a; }

/* Quick add animation */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-slide-up { animation: slideUp .2s ease-out; }

/* Szekció fejléc (összecsukható) */
.side-section-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px; cursor: pointer; border-radius: 8px;
  user-select: none;
}
.side-section-head:hover { background: #f1f5f9; }
.collapse-caret { color: #94a3b8; font-size: 11px; transition: transform .15s; }
.side-section-head.collapsed .collapse-caret { transform: rotate(-90deg); }
.side-collapse { overflow: hidden; transition: max-height .2s ease; }
.side-collapse.collapsed { max-height: 0; }

/* Mobil */
@media (max-width: 768px) {
  /* Egy fokkal kisebb alapszöveg-méret mobilon (a rem-alapú Tailwind méreteket is csökkenti) */
  html { font-size: 15px; }
  /* Fejléc: a hamburger+cím és a rendezés nem fér ki egy sorban -> törés két sorba */
  #main header { flex-wrap: wrap; }
  #main header > div:last-child { width: 100%; justify-content: flex-start; margin-top: 4px; }
  .app-view { flex-direction: column; height: 100dvh; }
  #sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: 84vw !important; max-width: 320px;
    z-index: 60;
    transform: translateX(-100%);
    transition: transform .22s ease;
    background: #fff;
    border-right: 1px solid #e2e8f0;
    border-bottom: none;
    flex-direction: column;
    overflow-y: auto;
  }
  #sidebar.sidebar-open { transform: translateX(0); }
  #sidebar-overlay {
    position: fixed; inset: 0; z-index: 55;
    background: rgba(15,23,42,.45);
  }
  #sidebar .sidebar-header { width: 100%; padding: 0 0 10px; margin-bottom: 2px; }
  .filters { flex-direction: column; gap: 4px; padding: 0; }
  .filter-btn { white-space: normal; width: 100%; padding: 10px 12px; font-size: 16px; }
  /* Mobilon nagyobb szöveg és ikonok a bal menüben */
  .filter-btn svg { width: 22px; height: 22px; }
  .filter-btn > span:first-child { font-size: 22px; line-height: 1; }
  .side-section-head { font-size: 15px; }
  .side-section-head .collapse-caret { font-size: 16px; }
  #sidebar .icon-btn { font-size: 18px; }
  #sidebar > .px-3 { display: block; }
  #sidebar .mt-auto { display: block; }
  #main { padding: 0; }
  /* Felső safe-area a mobil elrendezésben (a `padding:0` shorthand után kell, hogy ne írja felül) */
  #main,
  #sidebar { padding-top: max(env(safe-area-inset-top, 0px), 28px); }
  /* Mobilon a kártya-alji ikonok külön sorba kerüljenek, ne lógjanak a határidőre */
  .task-actions {
    opacity: 1;
    position: static;
    flex: 1 0 100%;
    justify-content: flex-end;
  }
  /* Egységes ikonméret mobilon: a kuka (emoji) picit kisebb, az SVG-ikonok (kedvenc/pdf/…) nagyobbak */
  .task-actions .icon-btn { font-size: 18px; padding: 6px 8px; line-height: 1; }
  .task-actions .icon-btn svg { width: 18px; height: 18px; }
  .filter-btn .side-acts { display: flex; }
}

/* Mobil nézet (swipe navigáció): nincs bal oldalsáv */
body.swipe-nav #sidebar,
body.swipe-nav #sidebar-overlay,
body.swipe-nav #btn-menu { display: none !important; }
body.swipe-nav #btn-settings-mobile { display: flex !important; }

/* Settings tabs */
.settings-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 4px;
  margin-bottom: 4px;
}
.settings-tab-btn {
  flex: 1;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all .15s;
}
.settings-tab-btn:hover { background: #f1f5f9; color: #0f172a; }
.settings-tab-btn.active {
  background: #fbf3f4;
  color: #74202b;
}
.settings-tab-panel { animation: fadeIn .15s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Dark mode settings tabs */
body.dark .settings-tabs { border-color: #334155; }
body.dark .settings-tab-btn { color: #94a3b8; }
body.dark .settings-tab-btn:hover { background: #1e293b; color: #f1f5f9; }
body.dark .settings-tab-btn.active { background: #1e3a5f; color: #dd9ba5; }

/* Dark mode fix for settings modal text */
body.dark .settings-tab-btn { color: #94a3b8; }
body.dark .theme-opt span { color: #e2e8f0 !important; }
body.dark label.block.text-sm.font-semibold { color: #e2e8f0; }
body.dark .settings-tab-panel label.block.text-sm.font-semibold { color: #e2e8f0; }

/* Fix for export/import buttons in dark mode */
body.dark .theme-opt { border-color: #334155 !important; background: #1e293b !important; }
body.dark .theme-opt span { color: #e2e8f0 !important; }

/* --- Inline (zoom) feladat-szerkesztő: a modál-kártya a lista fölé kerül, teljes szélességben --- */
.inline-editor { margin-bottom: 14px; }
.inline-editor .modal-card {
  position: static; width: 100%; max-width: none; max-height: none; margin: 0;
  border: 1px solid #e2e8f0; box-shadow: 0 6px 28px rgba(15,23,42,.12);
  transform-origin: top center;
}
.inline-editor .modal-card.editor-in { animation: editorZoom .22s ease; }
@keyframes editorZoom {
  from { opacity: 0; transform: scale(.96) translateY(-8px); }
  to { opacity: 1; transform: none; }
}
#main.editing .task-list { opacity: .4; transition: opacity .2s ease; }
#main.editing .task-list .task { pointer-events: none; }
/* Szerkesztés közben a lebegő + gombok ne takarják a Mégse/Mentés gombokat */
body.editing #btn-new-task,
body.editing #btn-inline-task,
body.editing #btn-camera-task { display: none !important; }
body.dark .inline-editor .modal-card { border-color: #334155; }

/* Közvetlen szöveg-szerkesztés a kártyán (cím / leírás) */
.task-title.inline-text-edit,
.task-desc.inline-text-edit {
  outline: 2px solid #dd9ba5; border-radius: 6px; background: #fbf3f4; cursor: text;
}
body.dark .task-title.inline-text-edit,
body.dark .task-desc.inline-text-edit { background: #1e3a5f; outline-color: #a63d4c; }
.note-mark { font-size: 16px; line-height: 1; }
/* „Kész" gomb az inline szerkesztőben */
.btn-done { background: #16a34a; border-color: #16a34a; color: #fff; }
.btn-done:hover { background: #15803d; border-color: #15803d; }

/* Bejövő e-mail */
.email-item { display: block; padding: 10px 12px; border: 1px solid #eef2f7; border-radius: 12px; background: #fff; }
.email-item:hover { background: #f8fafc; }
.email-main { display: flex; gap: 10px; align-items: flex-start; }
.email-detail { margin-top: 10px; border-top: 1px solid #eef2f7; padding-top: 10px; }
.email-body { font-size: 13px; line-height: 1.55; color: #334155; overflow-wrap: anywhere; max-height: 45vh; overflow-y: auto; }
.email-body img { max-width: 100%; height: auto; }
.email-body a { color: #8c2633; text-decoration: underline; }
.email-body table { max-width: 100%; border-collapse: collapse; }
.email-body blockquote { border-left: 3px solid #cbd5e1; margin: 6px 0; padding-left: 10px; color: #64748b; }
.email-unread { width: 8px; height: 8px; border-radius: 999px; background: #8c2633; display: inline-block; flex-shrink: 0; }
/* Levél sor gombjai (kompakt ikonok) */
.email-actions { display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; }
.email-act { width: 30px; height: 30px; border-radius: 9px; border: 1px solid #e2e8f0; background: #fff; color: #475569; font-size: 15px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.email-act:hover { background: #f1f5f9; border-color: #cbd5e1; color: #0f172a; }
.email-act-danger:hover { background: #fef2f2; border-color: #fecaca; color: #dc2626; }
body.dark .email-act { background: #1e293b; border-color: #334155; color: #cbd5e1; }
body.dark .email-act:hover { background: #334155; }
body.dark .email-act-danger:hover { background: #3f1d1d; border-color: #7f1d1d; color: #fca5a5; }
/* Bejövő e-mail neve (szerkesztő ikon a mezőben) */
.inbox-name-wrap { position: relative; }
.inbox-name-wrap #set-inbox-name { padding-right: 40px; }
.inbox-name-ico { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: 15px; pointer-events: none; }
body.dark .email-item { background: #1e293b; border-color: #334155; }
body.dark .email-item:hover { background: #334155; }
body.dark .email-item .text-slate-800 { color: #e2e8f0; }
body.dark .email-item .text-slate-700 { color: #cbd5e1; }
body.dark .email-detail { border-color: #334155; }
body.dark .email-body { color: #cbd5e1; }
body.dark .email-body a { color: #dd9ba5; }
/* Levél csatolmányok */
.email-atts-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.email-att-btn { display: inline-flex; align-items: center; gap: 6px; max-width: 170px; padding: 6px 10px; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; font-size: 12px; cursor: pointer; color: #334155; }
.email-att-btn:hover { background: #f1f5f9; border-color: #cbd5e1; }
.email-att-btn .email-att-ico { font-size: 15px; flex-shrink: 0; }
.email-att-btn .email-att-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 120px; }
.email-viewer { margin-top: 10px; }
.email-viewer img { display: block; max-width: 100%; max-height: 320px; object-fit: contain; border-radius: 8px; background: #fff; }
.email-viewer iframe { width: 100%; height: 380px; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; }
.email-viewer pre { white-space: pre-wrap; word-break: break-word; font-size: 12px; max-height: 320px; overflow: auto; background: #f8fafc; padding: 8px; border-radius: 8px; }
.pdf-pages { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.pdf-canvas { max-width: 100%; height: auto; border-radius: 8px; box-shadow: 0 2px 10px rgba(15,23,42,.12); background: #fff; }
body.dark .email-att-btn { background: #1e293b; border-color: #334155; color: #cbd5e1; }
body.dark .email-att-btn:hover { background: #334155; }
body.dark .email-viewer img, body.dark .email-viewer iframe { background: #1e293b; }
body.dark .email-viewer pre { background: #0f172a; color: #cbd5e1; }

/* Gyorsfelvitel: feladat/feljegyzés választó a mezőbe építve (suffix ikon) */
.quick-add-wrap { position: relative; }
.quick-add-wrap #quick-add-input { padding-right: 46px; }
.quick-add-type {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border: 0; border-radius: 10px;
  background: transparent; font-size: 18px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: .7; transition: opacity .15s, background .15s;
}
.quick-add-type:hover { background: rgba(100, 116, 139, .14); opacity: 1; }
.quick-add-type.note { opacity: .95; }
body.dark .quick-add-type:hover { background: rgba(148, 163, 184, .22); }
/* Eltérő típusú elem a listában: halvány, de kezelhető */
.task.dim { opacity: .5; }
.task.dim:hover { opacity: .8; }

/* Lista típus jelölés */
.list-type-mark { font-size: 11px; flex-shrink: 0; opacity: .85; }

/* Verziónapló */
.changelog-body { max-height: 62vh; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.changelog-item { border: 1px solid #eef2f7; border-radius: 12px; padding: 10px 12px; background: #fff; }
.changelog-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.changelog-ver { font-weight: 700; color: #8c2633; font-size: 13px; }
.changelog-date { font-size: 11px; color: #94a3b8; }
.changelog-text { font-size: 12px; color: #475569; line-height: 1.5; }
.changelog-text code { background: #f1f5f9; padding: 0 4px; border-radius: 4px; font-size: 11px; }
body.dark .changelog-item { background: #1e293b; border-color: #334155; }
body.dark .changelog-text { color: #cbd5e1; }
body.dark .changelog-text code { background: #0f172a; }

/* Naptár nézet */
.cal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.cal-title { font-size: 18px; font-weight: 700; color: #0f172a; flex: 1; text-transform: capitalize; }
body.dark .cal-title { color: #e2e8f0; }
.cal-nav { width: 38px; height: 38px; border-radius: 10px; border: 1px solid #e2e8f0; background: #fff; color: #334155; font-size: 20px; line-height: 1; cursor: pointer; }
.cal-nav:hover { background: #f1f5f9; }
.cal-today { padding: 8px 14px; border-radius: 10px; border: 1px solid #e2e8f0; background: #fff; color: #8c2633; font-weight: 600; font-size: 13px; cursor: pointer; }
.cal-today:hover { background: #fbf3f4; }
.cal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 4px; }
.cal-weekdays span { text-align: center; font-size: 11px; font-weight: 600; color: #94a3b8; text-transform: uppercase; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-day { min-height: 92px; border: 1px solid #eef2f7; border-radius: 10px; background: #fff; padding: 4px; display: flex; flex-direction: column; gap: 3px; overflow: hidden; }
.cal-day.other { background: #f8fafc; opacity: .6; }
.cal-day.today { border-color: #8c2633; box-shadow: inset 0 0 0 1px #8c2633; }
.cal-daynum { font-size: 12px; font-weight: 600; color: #475569; text-align: right; padding: 1px 3px; }
.cal-day.today .cal-daynum { color: #8c2633; }
.cal-chip { font-size: 11px; line-height: 1.25; padding: 2px 5px; border-radius: 6px; background: #fbf3f4; color: #74202b; border-left: 3px solid #8c2633; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-chip.done { text-decoration: line-through; opacity: .6; }
.cal-chip.overdue { background: #fef2f2; color: #b91c1c; border-left-color: #ef4444; }
.cal-chip.p2 { border-left-color: #ef4444; }
.cal-chip.p1 { border-left-color: #f59e0b; }
.cal-more { font-size: 10px; color: #94a3b8; padding-left: 4px; }
body.dark .cal-day { background: #1e293b; border-color: #334155; }
body.dark .cal-day.other { background: #0f172a; }
body.dark .cal-daynum { color: #94a3b8; }
body.dark .cal-chip { background: #1e3a5f; color: #dd9ba5; }
body.dark .cal-nav, body.dark .cal-today { background: #1e293b; border-color: #334155; color: #e2e8f0; }
.cal-modes { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.cal-mode { padding: 6px 12px; border-radius: 999px; border: 1px solid #e2e8f0; background: #fff; color: #475569; font-size: 12px; font-weight: 600; cursor: pointer; }
.cal-mode:hover { background: #f1f5f9; }
.cal-mode.active { background: #8c2633; border-color: #8c2633; color: #fff; }
.cal-grid.mode-week, .cal-grid.mode-3day, .cal-grid.mode-day { grid-template-rows: 1fr; }
.cal-grid.mode-week .cal-day { min-height: 340px; }
.cal-grid.mode-3day { grid-template-columns: repeat(3, 1fr); }
.cal-grid.mode-3day .cal-day { min-height: 340px; }
.cal-grid.mode-day { grid-template-columns: 1fr; }
.cal-grid.mode-day .cal-day { min-height: 380px; }
.cal-grid.mode-agenda { display: block; }
.cal-agenda-day { border: 1px solid #eef2f7; border-radius: 10px; background: #fff; padding: 8px 10px; margin-bottom: 8px; }
.cal-agenda-day.today { border-color: #8c2633; box-shadow: inset 0 0 0 1px #8c2633; }
.cal-agenda-head { font-size: 13px; font-weight: 700; color: #334155; margin-bottom: 6px; }
.cal-agenda-empty { color: #94a3b8; font-size: 13px; padding: 12px 4px; }
body.dark .cal-mode { background: #1e293b; border-color: #334155; color: #cbd5e1; }
body.dark .cal-mode.active { background: #8c2633; border-color: #8c2633; color: #fff; }
body.dark .cal-agenda-day { background: #1e293b; border-color: #334155; }
body.dark .cal-agenda-head { color: #e2e8f0; }
@media (max-width: 640px) {
  .cal-day { min-height: 66px; padding: 2px; border-radius: 8px; gap: 2px; }
  .cal-chip { font-size: 10px; padding: 1px 4px; }
  .cal-daynum { font-size: 11px; }
  .cal-grid.mode-week .cal-day, .cal-grid.mode-3day .cal-day { min-height: 240px; }
  .cal-mode { padding: 5px 10px; font-size: 11px; }
}

/* Teljes képernyős képnézegető (appon belül, nem natív) — zoomolható */
.image-viewer {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(0, 0, 0, .94);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; touch-action: none; overscroll-behavior: contain;
}
.image-viewer img {
  max-width: 100vw; max-height: 100vh; width: auto; height: auto;
  object-fit: contain; will-change: transform;
  user-select: none; -webkit-user-select: none; -webkit-user-drag: none;
}
.image-viewer-close {
  position: absolute; top: max(12px, env(safe-area-inset-top, 0px)); right: 16px; z-index: 2;
  width: 42px; height: 42px; border: 0; border-radius: 999px;
  background: rgba(255, 255, 255, .16); color: #fff; font-size: 20px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.image-viewer-close:active { background: rgba(255, 255, 255, .3); }
/* Listába húzás célkiemelése */
#list-list .filter-btn.drop-target { background: #f6e4e7 !important; outline: 2px dashed #a63d4c; outline-offset: -2px; }
body.dark #list-list .filter-btn.drop-target { background: #1e3a5f !important; }
/* Fájl ráhúzása a kártyára */
.task.drop-file { outline: 2px dashed #a63d4c; outline-offset: -2px; background-color: #fbf3f4 !important; }
body.dark .task.drop-file { background-color: #1e3a5f !important; }

/* Szerkesztő lábléc: szűk nézetben a gombok két sorba törjenek (ne kelljen görgetni) */
@media (max-width: 520px) {
  .task-footer { flex-wrap: wrap; }
  .task-footer > .flex-1 { display: none; }
  .task-footer .btn { flex: 1 1 auto; }
  .task-footer .btn.btn-primary { flex: 1 1 auto; }
}
/* Üres lista: csak egy rövid szöveg */
.empty-simple {
  margin: 32px auto; max-width: 340px; padding: 28px 20px; text-align: center;
  color: #94a3b8; font-size: 15px; font-weight: 500;
  background: #fff; border: 1px dashed #e2e8f0; border-radius: 16px;
}
body.dark .empty-simple { background: #1e293b; border-color: #334155; color: #94a3b8; }

/* --- Modern megjelenés az inline (zoom) szerkesztőnek --- */
.inline-editor .modal-card {
  border-radius: 18px; padding: 22px 22px 18px; background: #fff;
}
.inline-editor .modal-head {
  margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid #f1f5f9;
}
.inline-editor .modal-head h3 { font-size: 17px; letter-spacing: -.01em; }
.inline-editor .modal-head .modal-close {
  width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; transition: background .15s, color .15s;
}
.inline-editor .modal-head .modal-close:hover { background: #f1f5f9; }
/* Mezőcímkék: kicsi, tömör, modern */
.inline-editor form label.block {
  font-size: 12px; font-weight: 600; color: #64748b;
  text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px;
}
/* Bemenetek: lágy, lekerekített, finom háttér */
.inline-editor .inp {
  border-radius: 12px; border: 1px solid #e2e8f0; background: #f8fafc;
  font-size: 15px; padding: 11px 14px;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.inline-editor .inp:hover { background: #fff; border-color: #cbd5e1; }
.inline-editor .inp:focus { background: #fff; border-color: #a63d4c; box-shadow: 0 0 0 4px rgba(166,61,76,.12); }
.inline-editor textarea.inp { min-height: 84px; resize: vertical; line-height: 1.5; }
/* Gombok */
.inline-editor .btn { border-radius: 12px; font-weight: 600; }
.inline-editor .btn-primary {
  background: linear-gradient(180deg, #a63d4c, #8c2633); border: none;
  box-shadow: 0 6px 16px rgba(140,38,51,.28);
}
.inline-editor .btn-primary:hover { background: linear-gradient(180deg, #8c2633, #74202b); }
.inline-editor .btn-danger { border-radius: 12px; }
.inline-editor form > div:last-child { border-top: 1px solid #f1f5f9; }
/* Sötét mód finomhangolás */
body.dark .inline-editor .modal-card { background: #1e293b; }
body.dark .inline-editor .modal-head { border-bottom-color: #334155; }
body.dark .inline-editor .inp { background: #0f172a; border-color: #334155; }
body.dark .inline-editor .inp:hover,
body.dark .inline-editor .inp:focus { background: #0b1220; }
body.dark .inline-editor form > div:last-child { border-top-color: #334155; }

/* --- Statisztika --- */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .stats-grid { grid-template-columns: 1fr; } }
.stat-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 18px; }
.stat-card h4 { font-size: 12px; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: .05em; margin: 0 0 14px; }
.stat-pie-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.stat-pie { width: 180px; height: 180px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.stat-pie-hole { width: 110px; height: 110px; border-radius: 50%; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.stat-pie-hole span { font-size: 30px; font-weight: 700; color: #0f172a; line-height: 1; }
.stat-pie-hole small { font-size: 11px; color: #94a3b8; }
.stat-legend { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; font-size: 13px; color: #475569; }
.stat-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; }
.stat-bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 11px; }
.stat-bar-label { width: 92px; font-size: 13px; color: #475569; flex-shrink: 0; }
.stat-bar-track { flex: 1; height: 12px; background: #f1f5f9; border-radius: 999px; overflow: hidden; }
/* Kattintható statisztika-sorok (Összes / Lejárt → nézet) */
.stat-clickable { cursor: pointer; }
.stat-clickable:hover { background: #f1f5f9; border-radius: 8px; }
body.dark .stat-clickable:hover { background: #334155; }
.stat-bar-fill { height: 100%; border-radius: 999px; transition: width .4s ease; }
.stat-bar-val { width: 34px; text-align: right; font-size: 13px; font-weight: 600; color: #0f172a; }
.stat-table-wrap { margin-top: 16px; }
.stat-table { width: 100%; border-collapse: collapse; }
.stat-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #94a3b8; padding: 8px 10px; border-bottom: 1px solid #e2e8f0; }
.stat-table td { padding: 11px 10px; font-size: 14px; color: #334155; border-bottom: 1px solid #f1f5f9; }
.stat-table tr:last-child td { border-bottom: none; }
.stat-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; }
body.dark .stat-card { background: #1e293b; border-color: #334155; }
body.dark .stat-pie-hole { background: #1e293b; }
body.dark .stat-pie-hole span { color: #f1f5f9; }
body.dark .stat-legend, body.dark .stat-bar-label, body.dark .stat-table td { color: #cbd5e1; }
body.dark .stat-bar-track { background: #0f172a; }
body.dark .stat-bar-val { color: #f1f5f9; }
body.dark .stat-table th { border-bottom-color: #334155; }
body.dark .stat-table td { border-bottom-color: #1e293b; }

/* --- Beállítások: kártyás menü + résznézet --- */
.settings-menu { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 640px) { .settings-menu { grid-template-columns: 1fr; } }
.settings-menu-box {
  display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 16px; border: 1px solid #e2e8f0; border-radius: 14px; background: #fff;
  font-size: 15px; font-weight: 600; color: #0f172a; cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .1s;
}
.settings-menu-box:hover { border-color: #dd9ba5; box-shadow: 0 4px 16px rgba(140,38,51,.10); transform: translateY(-1px); }
.settings-menu-ico { font-size: 22px; line-height: 1; }
.settings-back {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px;
  background: none; border: none; color: #8c2633; font-size: 14px; font-weight: 600; cursor: pointer; padding: 4px 0;
}
.settings-back:hover { color: #74202b; }
body.dark .settings-menu-box { background: #1e293b; border-color: #334155; color: #e2e8f0; }
body.dark .settings-menu-box:hover { border-color: #a63d4c; }

/* --- Felhasználók: kártyás megjelenés + inline zoom szerkesztés --- */
.user-card {
  border: 1px solid #e2e8f0; border-radius: 14px; background: #fff; overflow: hidden;
  transition: box-shadow .15s, border-color .15s;
}
.user-card:hover { box-shadow: 0 4px 16px rgba(15,23,42,.06); border-color: #ecc6cc; }
.user-card-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; }
.user-card-head .user-card-name { font-weight: 600; color: #0f172a; }
.user-card-head .user-card-email { font-size: 12px; color: #64748b; }
.user-card-fields { padding: 0 14px 14px; border-top: 1px solid #f1f5f9; }
.user-card-fields label { display: block; font-size: 12px; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: .04em; margin: 10px 0 5px; }
.user-card.editing { border-color: #dd9ba5; box-shadow: 0 6px 24px rgba(140,38,51,.12); }
.user-card.editing .user-card-fields { animation: editorZoom .2s ease; }
.user-card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
body.dark .user-card { background: #1e293b; border-color: #334155; }
body.dark .user-card-head .user-card-name { color: #f1f5f9; }
body.dark .user-card-fields { border-top-color: #334155; }