﻿* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
:root {
  --bg:#f0f2f5; --white:#fff; --border:#e2e8f0; --text:#1e293b;
  --muted:#64748b; --light:#f8fafc; --accent:#f0a500;
  --green:#16a34a; --red:#dc2626; --navy:#1e293b;
  --gaz:#e8a000; --gaz-bg:#fffbeb; --gaz-b:#fde68a;
  --klima:#2563eb; --klima-bg:#eff6ff; --klima-b:#93c5fd;
  --viz:#7c3aed; --viz-bg:#f5f3ff; --viz-b:#c4b5fd;
  --futes:#7c3aed; --futes-bg:#f5f3ff; --futes-b:#c4b5fd;
  --garancialis:#dc2626; --garancialis-bg:#fff1f2; --garancialis-b:#fca5a5;
  --felmeres:#f8fafc; --felmeres-bg:#f8fafc; --felmeres-b:#cbd5e1;
  --egyeb:#16a34a; --egyeb-bg:#f0fdf4; --egyeb-b:#86efac;
}
body { font-family:"Nunito Sans",sans-serif; background:var(--bg); color:var(--text); min-height:100vh; }
button { cursor:pointer; font-family:inherit; }
input,select,textarea { font-family:inherit; outline:none; }

/* PAGES */
.page { display:none; flex-direction:column; min-height:100vh; }
.page.active { display:flex; }

/* TOPNAV */
.topnav { background:var(--navy); height:56px; padding:0 20px; display:flex; align-items:center; gap:6px; flex-shrink:0; border-bottom:1px solid rgba(255,255,255,0.07); z-index:10; position:relative; }
.nav-logo { display:flex; align-items:center; gap:9px; margin-right:20px; cursor:pointer; }
.nav-logo-icon { width:32px; height:32px; border-radius:9px; background:linear-gradient(135deg,#f0a500,#ff8c00); display:flex; align-items:center; justify-content:center; font-size:16px; }
.nav-logo-name { font-family:"Nunito",sans-serif; font-size:16px; font-weight:900; color:#fff; }
.nav-links { display:flex; gap:2px; flex:1; }
.nav-btn { padding:6px 13px; border-radius:8px; border:none; background:transparent; color:rgba(255,255,255,0.5); font-size:13px; font-weight:600; transition:all .15s; white-space:nowrap; }
.nav-btn:hover { background:rgba(255,255,255,0.08); color:#fff; }
.nav-btn.active { background:rgba(255,255,255,0.12); color:#fff; }
.nav-right { display:flex; align-items:center; gap:8px; margin-left:auto; }
.nav-user { display:flex; align-items:center; gap:7px; padding:5px 11px; border-radius:8px; background:rgba(255,255,255,0.08); color:#fff; font-size:13px; font-weight:600; }
.nav-avatar { width:26px; height:26px; border-radius:50%; background:#f0a500; display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:800; color:#1e293b; }
.nav-fab { padding:7px 15px; border:none; border-radius:8px; background:linear-gradient(135deg,#f0a500,#ff8c00); color:#1e293b; font-family:"Nunito",sans-serif; font-size:13px; font-weight:800; }
.nav-exit { padding:6px 12px; border:none; border-radius:8px; background:rgba(255,255,255,0.08); color:rgba(255,255,255,.7); font-size:12px; font-weight:600; }

/* BOTTOM NAV */
.bottom-nav { display:none; position:fixed; bottom:0; left:0; right:0; background:#fff; border-top:1px solid var(--border); padding:6px 0 max(12px,env(safe-area-inset-bottom)); z-index:100; box-shadow:0 -3px 16px rgba(0,0,0,.07); }
.bn-item { flex:1; display:flex; flex-direction:column; align-items:center; gap:2px; border:none; background:transparent; color:#94a3b8; font-size:9.5px; font-weight:700; padding:3px 0; }
.bn-item.active { color:var(--navy); }
.bn-icon { font-size:20px; line-height:1.2; }
.bn-fab { width:46px; height:46px; border-radius:50%; background:var(--navy); display:flex; align-items:center; justify-content:center; font-size:22px; color:#fff; margin-top:-16px; box-shadow:0 4px 16px rgba(0,0,0,.22); border:none; }

/* SHARED */
.btn { padding:9px 18px; border-radius:10px; border:none; font-family:"Nunito",sans-serif; font-size:13px; font-weight:800; cursor:pointer; }
.btn-primary { background:linear-gradient(135deg,#f0a500,#ff8c00); color:#1e293b; }
.btn-ghost { background:var(--light); color:var(--muted); border:1.5px solid var(--border); }
.btn-danger { background:#fee2e2; color:var(--red); }
.badge { display:inline-flex; align-items:center; gap:4px; padding:3px 10px; border-radius:20px; font-size:11px; font-weight:700; }
.badge-gaz { background:var(--gaz-bg); color:#92400e; }
.badge-klima { background:var(--klima-bg); color:#1e40af; }
.badge-viz { background:var(--viz-bg); color:#5b21b6; }
.badge-garancialis { background:var(--garancialis-bg); color:#991b1b; }
.badge-felmeres { background:#f1f5f9; color:#475569; }
.badge-kazancsere { background:#fff7ed; color:#c2410c; }
.badge-egyeb { background:var(--egyeb-bg); color:#166534; }

/* OVERLAY */
.overlay { display:none; position:fixed; inset:0; z-index:9999; background:rgba(15,23,42,.5); backdrop-filter:blur(4px); align-items:center; justify-content:center; padding:16px; }
.overlay.open { display:flex; }
.modal { background:#fff; border-radius:18px; width:100%; max-width:540px; max-height:90vh; overflow-y:auto; box-shadow:0 20px 60px rgba(0,0,0,.18); animation:popIn .2s cubic-bezier(.34,1.3,.64,1); }
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
@keyframes popIn { from{opacity:0;transform:scale(.94) translateY(10px)} to{opacity:1;transform:none} }
.modal-head { padding:16px 20px; border-bottom:1px solid var(--border); display:flex; align-items:center; justify-content:space-between; position:sticky; top:0; background:#fff; z-index:5; border-radius:18px 18px 0 0; }
.modal-title { font-family:"Nunito",sans-serif; font-size:18px; font-weight:900; }
.modal-close { width:30px; height:30px; border-radius:50%; border:none; background:var(--light); font-size:15px; display:flex; align-items:center; justify-content:center; cursor:pointer; }
.modal-body { padding:20px; }
.modal-foot { padding:14px 20px; border-top:1px solid var(--border); display:flex; justify-content:flex-end; gap:8px; position:sticky; bottom:0; background:#fff; border-radius:0 0 18px 18px; }
.fg { display:flex; flex-direction:column; gap:5px; margin-bottom:12px; }
.fg label { font-size:11px; font-weight:700; color:var(--muted); text-transform:uppercase; letter-spacing:.5px; }
.fg input, .fg select, .fg textarea { padding:9px 12px; border:1.5px solid var(--border); border-radius:9px; font-size:16px; color:var(--text); background:#fff; min-height:120px; line-height:1.6; }
.fg input:focus, .fg select:focus, .fg textarea:focus { border-color:#f0a500; box-shadow:0 0 0 3px rgba(240,165,0,.1); }
.fg textarea { min-height:72px; resize:vertical; }
.fgrid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.fgrid .full { grid-column:1/-1; }
.toast { position:fixed; bottom:80px; right:20px; z-index:999; background:var(--navy); color:#fff; border-radius:12px; padding:11px 16px; font-size:13px; font-weight:600; display:flex; align-items:center; gap:8px; box-shadow:0 8px 24px rgba(0,0,0,.2); transform:translateY(20px); opacity:0; transition:all .25s cubic-bezier(.34,1.3,.64,1); pointer-events:none; }
.toast.show { transform:none; opacity:1; }

/* LOGIN */
#p-login { align-items:center; justify-content:center; background:linear-gradient(135deg,#0d1117 0%,#161b22 100%); min-height:100vh; padding:20px; }
.login-card { background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.08); border-radius:20px; padding:32px 28px; width:100%; max-width:400px; }
.login-logo { text-align:center; margin-bottom:24px; }
.login-logo-icon { width:64px; height:64px; border-radius:18px; background:linear-gradient(135deg,#f0a500,#ff8c00); display:flex; align-items:center; justify-content:center; font-size:30px; margin:0 auto 12px; box-shadow:0 8px 24px rgba(240,165,0,.3); }
.login-logo-name { font-family:"Nunito",sans-serif; font-size:24px; font-weight:900; color:#fff; }
.login-logo-sub { font-size:13px; color:rgba(255,255,255,.45); margin-top:3px; }
.login-label { font-size:11px; font-weight:700; color:rgba(255,255,255,.45); text-transform:uppercase; letter-spacing:.6px; margin-bottom:6px; display:block; }
.login-input { width:100%; padding:11px 14px; border-radius:10px; border:1.5px solid rgba(255,255,255,.1); background:rgba(255,255,255,.06); color:#fff; font-size:14px; margin-bottom:12px; font-family:"Nunito Sans",sans-serif; }
.login-input:focus { border-color:#f0a500; outline:none; }
.login-input::placeholder { color:rgba(255,255,255,.25); }
.login-submit { width:100%; padding:13px; border:none; border-radius:11px; background:linear-gradient(135deg,#f0a500,#ff8c00); color:#1e293b; font-family:"Nunito",sans-serif; font-size:15px; font-weight:900; margin-top:4px; cursor:pointer; }
.login-err { color:#f87171; font-size:13px; margin-bottom:10px; display:none; padding:8px 12px; background:rgba(248,113,113,.1); border-radius:8px; }
.login-err.show { display:block; }
.login-divider { display:flex; align-items:center; gap:10px; margin:18px 0 14px; }
.login-divider-line { flex:1; height:1px; background:rgba(255,255,255,.08); }
.login-divider-text { font-size:11px; color:rgba(255,255,255,.3); font-weight:600; }
.demo-list { display:flex; flex-direction:column; gap:7px; }
.demo-item { display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:11px; border:1px solid rgba(255,255,255,.07); background:rgba(255,255,255,.04); cursor:pointer; }
.demo-item:hover { background:rgba(255,255,255,.08); }
.demo-av { width:34px; height:34px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:800; color:#fff; flex-shrink:0; }
.demo-name { font-size:13px; font-weight:700; color:#fff; }
.demo-role { font-size:11px; color:rgba(255,255,255,.4); }
.demo-arrow { margin-left:auto; color:rgba(255,255,255,.3); }

/* FOOLDAL */
#p-fooldal { background:var(--bg); }
.page-content { flex:1; overflow-y:auto; padding:20px; }
.stats-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-bottom:22px; }
.stat-card { background:#fff; border-radius:14px; padding:16px 18px; border:1px solid var(--border); }
.stat-val { font-family:"Nunito",sans-serif; font-size:26px; font-weight:900; }
.stat-label { font-size:12px; color:var(--muted); font-weight:600; margin-top:2px; }
.section-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
.section-title { font-family:"Nunito",sans-serif; font-size:16px; font-weight:900; }
.worker-row { background:#fff; border-radius:14px; margin-bottom:12px; border:1px solid var(--border); overflow:hidden; }
.worker-row-head { padding:12px 16px; display:flex; align-items:center; gap:10px; border-bottom:1px solid var(--border); }
.worker-row-av { width:36px; height:36px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:800; color:#fff; flex-shrink:0; }
.worker-row-name { font-weight:700; font-size:14px; }
.worker-row-stats { margin-left:auto; display:flex; gap:14px; font-size:12px; font-weight:600; color:var(--muted); }
.worker-row-jobs { padding:10px 14px; display:flex; flex-direction:column; gap:8px; }
.job-card { background:var(--light); border-radius:10px; padding:11px 13px; border-left:4px solid transparent; display:flex; align-items:flex-start; gap:10px; cursor:pointer; }
.job-card.gaz { border-left-color:var(--gaz); }
.job-card.klima { border-left-color:var(--klima); }
.job-card.viz { border-left-color:var(--viz); }
.job-card.garancialis { border-left-color:var(--garancialis); }
.job-card.felmeres { border-left-color:#94a3b8; }
.job-card.kazancsere { border-left-color:#f97316; }
.job-card.egyeb { border-left-color:var(--egyeb); }
.job-card.done { 
  opacity:1; 
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%); 
  border-left-color: #16a34a !important; 
}
.job-card.done .job-card-name { color: #15803d; }
.job-card.done .job-card-ar { color: #16a34a !important; }
.job-card-body { flex:1; min-width:0; }
.job-card-top { display:flex; align-items:center; gap:8px; margin-bottom:3px; flex-wrap:wrap; }
.job-card-name { font-weight:700; font-size:14px; }
.job-card-time { font-size:12px; color:var(--muted); font-weight:600; }
.job-card-desc { font-size:12px; color:var(--muted); }
.job-card-warn { font-size:11px; color:#b45309; background:#fef3c7; padding:2px 8px; border-radius:6px; margin-top:4px; display:inline-block; }
.job-card-ar { font-family:"Nunito",sans-serif; font-size:14px; font-weight:900; flex-shrink:0; }

/* NAPTAR */
#p-naptar { background:var(--bg); }
.cal-layout { flex:1; display:flex; overflow:hidden; }
.cal-sidebar { width:220px; min-width:220px; background:#fff; border-right:1px solid var(--border); overflow-y:auto; padding:12px; }
.cal-main { flex:1; display:flex; flex-direction:column; overflow:hidden; }
.cal-toolbar { background:#fff; border-bottom:1px solid var(--border); padding:10px 16px; display:flex; align-items:center; gap:10px; flex-shrink:0; }
.cal-nav-btn { width:30px; height:30px; border:1px solid var(--border); border-radius:7px; background:#fff; font-size:13px; display:flex; align-items:center; justify-content:center; cursor:pointer; }
.cal-title { font-family:"Nunito",sans-serif; font-size:17px; font-weight:900; flex:1; }
.cal-today { padding:5px 12px; border:1px solid var(--border); border-radius:7px; background:#fff; font-size:12px; font-weight:700; cursor:pointer; }
.mini-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; }
.mini-title { font-family:"Nunito",sans-serif; font-size:12px; font-weight:800; }
.mini-nav { display:flex; gap:3px; }
.mini-btn { width:22px; height:22px; border:none; background:var(--light); border-radius:5px; font-size:11px; cursor:pointer; }
.mini-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:2px; }
.mini-dow { text-align:center; font-size:9px; font-weight:700; color:var(--muted); padding:2px 0; }
.mini-day { text-align:center; font-size:10.5px; font-weight:600; padding:4px 2px; border-radius:5px; cursor:pointer; }
.mini-day:hover { background:var(--light); }
.mini-day.today-d { background:var(--navy); color:#fff; font-weight:800; }
.mini-day.in-week { background:rgba(240,165,0,.15); }
.mini-day.other { color:#c0c9d6; }
.mini-day.has-dot { position:relative; }
.mini-day.has-dot::after { content:""; position:absolute; bottom:1px; left:50%; transform:translateX(-50%); width:3px; height:3px; border-radius:50%; background:#f0a500; }
.sb-title { font-size:10px; font-weight:800; color:var(--muted); text-transform:uppercase; letter-spacing:1px; margin:14px 0 8px; }
.sb-worker { display:flex; align-items:center; gap:7px; padding:6px 7px; border-radius:8px; cursor:pointer; margin-bottom:2px; }
.sb-worker:hover { background:var(--light); }
.sb-av { width:26px; height:26px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:9px; font-weight:800; color:#fff; }
.sb-cb { width:14px; height:14px; border-radius:3px; border:2px solid var(--border); display:flex; align-items:center; justify-content:center; font-size:9px; flex-shrink:0; }
.sb-cb.on { border-color:transparent; color:#fff; }
.kat-filter { display:flex; flex-direction:column; gap:5px; }
.kat-f-btn { display:flex; align-items:center; gap:7px; padding:6px 9px; border-radius:7px; border:1.5px solid transparent; font-size:12px; font-weight:700; cursor:pointer; background:transparent; }
.kat-f-btn.on-gaz { background:var(--gaz-bg); border-color:var(--gaz-b); color:#7c3500; }
.kat-f-btn.on-klima { background:var(--klima-bg); border-color:var(--klima-b); color:#4c1d95; }
.kat-f-btn.on-viz { background:var(--viz-bg); border-color:var(--viz-b); color:#0c4a6e; }
.kat-f-btn.on-garancialis { background:var(--garancialis-bg); border-color:var(--garancialis-b); color:#991b1b; }
.kat-f-btn.on-felmeres { background:#f1f5f9; border-color:#cbd5e1; color:#475569; }
.kat-f-btn.on-kazancsere { background:#fff7ed; border-color:#fed7aa; color:#c2410c; }
.kat-f-btn.on-egyeb { background:var(--egyeb-bg); border-color:var(--egyeb-b); color:#166534; }
.kat-f-btn.off { opacity:.35; }
.week-scroll { flex:1; overflow:auto; }
.week-grid { display:grid; grid-template-columns:52px repeat(7,1fr); min-width:600px; }
.wg-time-header { border-right:1px solid var(--border); background:#fff; position:sticky; top:0; z-index:3; }
.wg-day-header { padding:8px 6px; text-align:center; border-left:1px solid var(--border); background:#fff; position:sticky; top:0; z-index:3; cursor:pointer; }
.wg-day-header.today-col { background:#f0f9ff; }
.cal-view-toggle { display:flex; gap:4px; margin-left:auto; background:#f1f5f9; border-radius:8px; padding:3px; }
.cal-view-btn { border:none; background:transparent; padding:6px 14px; font-size:12px; font-weight:700; border-radius:6px; cursor:pointer; color:var(--muted); }
.cal-view-btn.active { background:#fff; color:var(--navy); box-shadow:0 1px 3px rgba(0,0,0,0.1); }
.day-view-col-header { padding:8px 6px; text-align:center; border-left:1px solid var(--border); background:#fff; position:sticky; top:0; z-index:3; }
.dv-worker-av { width:28px; height:28px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:800; color:#fff; margin:0 auto 4px; }
.dv-worker-name { font-size:11px; font-weight:700; color:var(--navy); }
.wg-day-name { font-size:10px; font-weight:700; color:var(--muted); text-transform:uppercase; }
.wg-day-num { font-family:"Nunito",sans-serif; font-size:18px; font-weight:900; margin-top:2px; }
.wg-day-num.today-circle { width:30px; height:30px; border-radius:50%; background:var(--navy); color:#fff; display:flex; align-items:center; justify-content:center; margin:2px auto 0; font-size:14px; }
.wg-time-col { display:flex; flex-direction:column; background:#fff; border-right:1px solid var(--border); }
.wg-time-cell { height:56px; padding:3px 6px 0; font-size:9.5px; font-weight:600; color:var(--muted); border-bottom:1px solid var(--border); flex-shrink:0; }
.wg-day-col { border-left:1px solid var(--border); position:relative; background:#fff; }
.wg-day-col.today-col { background:#fafeff; }
.wg-hour { height:56px; border-bottom:1px solid #f1f5f9; }
.wg-chip { position:absolute; left:2px; right:2px; border-radius:7px; padding:3px 6px; font-size:10.5px; cursor:pointer; border-left:3px solid transparent; overflow:hidden; z-index:2; }
.wg-chip.gaz { background:var(--gaz-bg); border-left-color:var(--gaz); }
.wg-chip.klima { background:var(--klima-bg); border-left-color:var(--klima); }
.wg-chip.viz { background:var(--viz-bg); border-left-color:var(--viz); }
.wg-chip.futes { background:var(--futes-bg); border-left-color:var(--futes); }
.wg-chip.garancialis { background:var(--garancialis-bg); border-left-color:var(--garancialis); }
.wg-chip.felmeres { background:var(--felmeres-bg); border-left-color:var(--felmeres); }
.wg-chip.kazancsere { background:#fff7ed; border-left-color:#f97316; }
.wg-chip.egyeb { background:var(--egyeb-bg); border-left-color:var(--egyeb); }
.wg-chip.done { opacity:.5; }
.wg-chip-time { font-size:9px; font-weight:700; color:var(--muted); }
.wg-chip-name { font-weight:700; font-size:10.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.wg-chip-av { position:absolute; top:3px; right:3px; width:16px; height:16px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:7px; font-weight:800; color:#fff; }
.drag-resize-handle { position:absolute; bottom:0; left:0; right:0; height:10px; cursor:ns-resize; display:flex; align-items:center; justify-content:center; }
.drag-resize-handle::after { content:''; display:block; width:24px; height:3px; background:rgba(0,0,0,0.3); border-radius:2px; }
.now-line { position:absolute; left:0; right:0; height:2px; background:#ef4444; z-index:10; pointer-events:none; }
.now-dot { width:8px; height:8px; border-radius:50%; background:#ef4444; position:absolute; left:-3px; top:-3px; }
.kat-sel { display:flex; gap:8px; }
.kat-opt { flex:1; padding:10px 8px; border:2px solid var(--border); border-radius:10px; cursor:pointer; text-align:center; font-size:12px; font-weight:700; }
.kat-opt-icon { font-size:20px; margin-bottom:4px; }
.kat-opt.s-gaz { border-color:var(--gaz); background:var(--gaz-bg); color:#92400e; }
.kat-opt.s-klima { border-color:var(--klima); background:var(--klima-bg); color:#1e40af; }
.kat-opt.s-viz { border-color:var(--viz); background:var(--viz-bg); color:#5b21b6; }
.kat-opt.s-garancialis { border-color:var(--garancialis); background:var(--garancialis-bg); color:#991b1b; }
.kat-opt.s-felmeres { border-color:#94a3b8; background:#f1f5f9; color:#475569; }
.kat-opt.s-kazancsere { border-color:#f97316; background:#fff7ed; color:#c2410c; }
.kat-opt.s-egyeb { border-color:var(--egyeb); background:var(--egyeb-bg); color:#166534; }
.time-quick { display:grid; grid-template-columns:repeat(5,1fr); gap:5px; }
.tq.foglalt { background:#fee2e2!important; color:#ef4444!important; cursor:not-allowed; opacity:0.7; }
.tq { padding:7px 2px; border:1.5px solid var(--border); border-radius:7px; text-align:center; font-size:11px; font-weight:700; cursor:pointer; }
.tq.sel { border-color:#f0a500; background:#fff8ed; }
.sz-pick { display:flex; flex-direction:column; gap:6px; }
.sz-opt { display:flex; align-items:center; gap:9px; padding:10px 12px; border:1.5px solid var(--border); border-radius:10px; cursor:pointer; }
.sz-opt.sel { border-color:#f0a500; background:#fff8ed; }
.sz-opt-av { width:30px; height:30px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:10px; font-weight:800; color:#fff; flex-shrink:0; }
.sz-opt-name { font-size:13px; font-weight:700; flex:1; }
.sz-opt-cnt { font-size:11px; color:var(--muted); }
.sz-check { color:#f0a500; display:none; font-weight:700; }
.sz-opt.sel .sz-check { display:block; }

/* MUNKALAP */
#p-munkalap { background:var(--bg); }
.ml-layout { flex:1; display:grid; grid-template-columns:400px 1fr; overflow:hidden; }
.ml-form { background:#fff; border-right:1px solid var(--border); overflow-y:auto; }
.ml-section { padding:16px 20px; border-bottom:1px solid var(--border); }
.megn-btn { padding:7px 12px; border-radius:20px; border:2px solid #e2e8f0; background:#f8fafc; font-size:12px; font-weight:700; cursor:pointer; color:#475569; transition:all .15s; }
.megn-btn.active { background:#1e293b; color:#fff; border-color:#1e293b; }
.ml-stitle { font-size:11px; font-weight:800; color:var(--muted); text-transform:uppercase; letter-spacing:1px; margin-bottom:12px; }
.ml-preview { overflow-y:auto; padding:24px; display:flex; flex-direction:column; align-items:center; }
.blokk { width:340px; background:#fff; padding:14px 12px 24px; box-shadow:0 6px 28px rgba(0,0,0,.12); border-radius:4px; font-family:"Courier New",monospace; font-size:16px; line-height:1.8; color:#000; }
.blk-c { text-align:center; }
.blk-b { font-weight:900; font-size:17px; }
.blk-lg { font-size:20px; font-weight:900; }
.blk-hr { border:none; border-top:1px dashed #aaa; margin:7px 0; }
.blk-hr2 { border:none; border-top:2px solid #000; margin:7px 0; }
.blk-row { display:flex; justify-content:space-between; font-size:11px; margin-bottom:2px; }
.blk-key { color:#333; min-width:90px; font-size:15px; font-weight:700; }
.blk-val { font-weight:900; text-align:right; font-size:15px; }
.blk-th { display:grid; grid-template-columns:1fr 50px 62px; font-size:10px; font-weight:700; border-bottom:1px solid #000; padding-bottom:3px; margin-bottom:3px; }
.blk-tr { display:grid; grid-template-columns:1fr 50px 62px; font-size:10.5px; padding:1px 0; border-bottom:1px dotted #ddd; }
.blk-total { border:2px solid #000; padding:6px 8px; margin:7px 0; border-radius:3px; }
.blk-total-row { display:flex; justify-content:space-between; font-size:11px; padding:2px 0; }
.blk-total-main { font-size:14px; font-weight:700; border-top:1px solid #000; margin-top:4px; padding-top:4px; }
.blk-sig-grid { display:grid; grid-template-columns:1fr; gap:8px; margin:10px 0; }
.blk-sig-line { border-bottom:3px solid #000; height:130px; margin-bottom:6px; display:flex; align-items:center; justify-content:center; background:#fafafa; }
.blk-sig-line img { max-height:125px; max-width:100%; width:100%; object-fit:contain; }
.blk-sig-label { font-size:13px; text-align:center; color:#444; font-weight:700; letter-spacing:1px; text-transform:uppercase; margin-bottom:4px; }
.blk-sig-name { font-size:14px; font-weight:900; text-align:center; margin-top:4px; }
.blk-jogi { font-size:13px; line-height:1.6; color:#333; margin-top:6px; text-align:justify; }
.tetel-list { display:flex; flex-direction:column; gap:6px; margin-bottom:8px; }
.tetel-row { display:grid; grid-template-columns:1fr 70px 82px 26px; gap:5px; align-items:center; }
.tetel-row input { font-size:12px; padding:6px 8px; border:1.5px solid var(--border); border-radius:7px; }
.tetel-del { width:26px; height:26px; border:1px solid var(--border); border-radius:6px; background:transparent; color:var(--muted); font-size:13px; cursor:pointer; }
.add-tetel { width:100%; padding:7px; border:1.5px dashed var(--border); border-radius:8px; background:transparent; color:var(--muted); font-size:12px; font-weight:600; cursor:pointer; }
.fizmod-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.fizmod-opt { padding:10px; border:1.5px solid var(--border); border-radius:9px; cursor:pointer; text-align:center; font-size:12px; font-weight:700; }
.fizmod-opt.on { border-color:#f0a500; background:#fff8ed; }
.fizmod-icon { font-size:18px; margin-bottom:3px; }
.sig-area { border:2px dashed var(--border); border-radius:10px; background:#fafbfc; position:relative; overflow:hidden; cursor:crosshair; touch-action:none; }
.sig-area canvas { display:block; width:100%; height:110px; }
.sig-hint { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; color:#cbd5e1; font-size:13px; font-weight:600; pointer-events:none; gap:3px; }
.sig-area.signed { border-color:#16a34a; border-style:solid; background:#f0fdf4; }
.sig-clear { font-size:11px; color:var(--red); background:none; border:none; font-weight:600; cursor:pointer; margin-top:4px; }

/* ADMIN */
#p-admin { background:var(--bg); }
#p-dashboard { background:var(--bg); height:100vh; overflow-y:auto; }
.admin-content { flex:1; padding:20px; padding-bottom:100px; }
.admin-stats { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-bottom:18px; }
#db-kpi { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-bottom:20px; }
.admin-stat { background:#fff; border-radius:12px; padding:14px 16px; border:1px solid var(--border); }
.admin-stat-val { font-family:"Nunito",sans-serif; font-size:22px; font-weight:900; }
.admin-stat-label { font-size:11px; color:var(--muted); font-weight:600; margin-top:2px; }
.users-card { background:#fff; border-radius:14px; border:1px solid var(--border); overflow:hidden; }
.user-row { display:flex; align-items:center; gap:12px; padding:13px 16px; border-bottom:1px solid var(--border); }
.user-row:last-child { border-bottom:none; }
.user-av { width:38px; height:38px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:800; color:#fff; flex-shrink:0; }
.user-name { font-size:14px; font-weight:700; }
.user-email { font-size:12px; color:var(--muted); }
.user-badge { padding:2px 9px; border-radius:20px; font-size:11px; font-weight:700; }
.badge-dispatcher { background:#e0f2fe; color:#0369a1; }
.badge-worker { background:var(--gaz-bg); color:#7c3500; }
.badge-admin { background:#fef3c7; color:#78350f; }
.user-actions { margin-left:auto; display:flex; gap:6px; }
.icon-btn { width:30px; height:30px; border-radius:8px; border:1px solid var(--border); background:transparent; font-size:14px; cursor:pointer; }

/* MOBIL */
@media (max-width:768px) {
  .topnav { padding:0 14px; }
  .nav-links, .nav-fab, .nav-exit { display:none; }
  .nav-user span:not(.nav-avatar) { display:none; }
  .bottom-nav { display:flex; }
  body { padding-bottom:72px; }
  .stats-grid { grid-template-columns:1fr 1fr; gap:10px; }
  .stat-val { font-size:20px; }
  .page-content { padding:14px; }
  .live-location-layout { grid-template-columns:1fr!important; }
  #live-map-frame { height:330px!important; }
  .cal-sidebar { display:none; }
  #p-naptar { overflow:auto; }
  .cal-layout { overflow:visible; }
  .cal-main { overflow:visible; height:auto; }
  .week-scroll { overflow-x:auto; overflow-y:visible; min-height:700px; }
  .week-grid { grid-template-columns:44px repeat(7,minmax(78px,1fr)); }
  .wg-time-cell { height:52px; font-size:9px; }
  .wg-hour { height:52px; }
  .ml-layout { grid-template-columns:1fr; overflow:visible; }
  .ml-form { overflow-y:visible; border-right:none; border-bottom:1px solid var(--border); }
  .ml-preview { padding:16px; }
  .blokk { width:100%; max-width:302px; }
  #p-munkalap { overflow-y:auto; }
  .admin-stats { grid-template-columns:1fr 1fr; }
  #db-kpi { grid-template-columns:1fr 1fr; }
  #p-dashboard .admin-content > div:nth-child(2) > div { grid-template-columns:1fr !important; }
  .overlay { align-items:flex-end; padding:0; }
  .modal { border-radius:18px 18px 0 0; max-width:100%; max-height:92vh; }
  .fgrid { grid-template-columns:1fr; }
  .fgrid .full { grid-column:1; }
}

.blokk-wrap,.blokk{display:block!important}
  @media print {
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  html, body { margin: 0 !important; padding: 0 !important; height: auto !important; }
  #p-munkalap { height: auto !important; overflow: visible !important; min-height: 0 !important; padding: 0 !important; margin: 0 !important; }
  .ml-wrap, .ml-preview, .blokk-wrap, .page { height: auto !important; overflow: visible !important; min-height: 0 !important; padding: 0 !important; margin: 0 !important; }
  body > *:not(#p-munkalap) { display: none !important; }
  #p-munkalap > *:not(.ml-wrap):not(.ml-preview):not(.blokk-wrap) { display: none !important; }
  .blokk-wrap { display: block !important; position: static !important; padding: 0 !important; margin: 0 !important; }
  .ml-preview { display: block !important; padding: 0 !important; margin: 0 !important; }
  .blokk { padding-bottom: 4mm !important; }
  /* Rollpapír - nincs lapozás, folyamatos */
  @page {
    size: 80mm auto;
    margin: 0mm 2mm;
  }
  .blokk {
    width: 76mm !important;
    max-width: 76mm !important;
    font-size: 14px !important;
    line-height: 1.65 !important;
    margin: 0 !important;
    padding: 2mm 3mm !important;
    box-shadow: none !important;
    border: none !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  /* Minden elem folyamatos - ne törje szét */
  .blokk * {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  .blk-lg { font-size: 16px !important; font-weight: 900 !important; }
  .blk-b { font-size: 14px !important; font-weight: 800 !important; }
  .blk-key { font-size: 13px !important; }
  .blk-val { font-size: 13px !important; }
  .blk-total-main span { font-size: 15px !important; font-weight: 900 !important; }
  /* Aláírás - teljes papírszélesség, max 7cm magas */
  .blk-sig-grid { grid-template-columns: 1fr !important; gap: 4mm !important; }
  .blk-sig-line {
    height: 70mm !important;
    max-height: 70mm !important;
    width: 100% !important;
    border-bottom: 4px solid #000 !important;
    background: #fafafa !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .blk-sig-line img {
    max-height: 68mm !important;
    max-width: 100% !important;
    width: 100% !important;
    height: 68mm !important;
    object-fit: contain !important;
    display: block !important;
  }
  .blk-sig-label { font-size: 12px !important; }
  .blk-sig-name { font-size: 13px !important; font-weight: 800 !important; }
  .blk-jogi { font-size: 13px !important; line-height: 1.6 !important; }
  .btn, button, .topbar, .page:not(#p-munkalap), nav { display: none !important; }
  #p-munkalap { display: block !important; }
}

/* Extracted late inline styles */
.szamla-input {
  background: #2d3748;
  border: 1px solid #4a5568;
  border-radius: 8px;
  color: #e2e8f0;
  padding: 7px 10px;
  font-size: 0.9rem;
  box-sizing: border-box;
}
.szamla-input:focus { outline: none; border-color: #3b82f6; }
.szamla-fizmod-btn {
  background: #2d3748;
  color: #94a3b8;
  border: 1px solid #4a5568;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all .15s;
}
.szamla-fizmod-btn.active {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
}
.szamla-tetel-row {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #2d3748;
  border-radius: 8px;
  padding: 8px;
  flex-wrap: wrap;
}
.szamla-tetel-nev { flex: 1; min-width: 120px; }
.szamla-tetel-ossz { color: #10b981; font-weight: 600; min-width: 80px; text-align: right; }
.szamla-del-btn {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 1rem;
  padding: 2px 6px;
}

/* Feltoltott kepek galeria */
.kep-gallery {
  position: fixed;
  inset: 0;
  z-index: 10050;
  background: rgba(3, 7, 18, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 54px 14px 46px;
  touch-action: pan-y;
}
.kep-gallery-img {
  max-width: 100%;
  max-height: calc(100vh - 120px);
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 18px 60px rgba(0,0,0,.4);
}
.kep-gallery-close {
  position: fixed;
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,.14);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.kep-gallery-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 56px;
  border: none;
  border-radius: 12px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 42px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.kep-gallery-prev { left: 10px; }
.kep-gallery-next { right: 10px; }
.kep-gallery-count {
  position: fixed;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  color: #fff;
  background: rgba(255,255,255,.14);
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 13px;
  font-weight: 800;
}
@media (max-width: 640px) {
  .kep-gallery { padding-left: 8px; padding-right: 8px; }
  .kep-gallery-nav {
    width: 36px;
    height: 48px;
    font-size: 34px;
    background: rgba(0,0,0,.24);
  }
  .kep-gallery-prev { left: 4px; }
  .kep-gallery-next { right: 4px; }
}

