/* UPartner – Nyomda-Technika Kft. (a Flottakezelő / HR app arculata alapján) */
:root {
  --brand-900: #0f3f50;
  --brand-dark: #145469;
  --brand: #148e99;
  --brand-mid: #22abad;
  --brand-light: #3ec1c7;

  --bg: #f2f6f7;
  --surface: #ffffff;
  --surface-2: #f6fafb;
  --text: #10313d;
  --muted: #5b7480;
  --border: #d8e4e7;
  --header-bg: #ffffff;
  --accent: var(--brand);
  --accent-strong: var(--brand-dark);
  --accent-soft: #e2f4f5;
  --focus: #3ec1c7;

  --ok: #24875a;
  --ok-soft: #e3f4ec;
  --warn: #a86a00;
  --warn-bg: #fff3d6;
  --warn-line: #e7a817;
  --danger: #c23434;
  --danger-soft: #fde6e6;
  --info-soft: #e8eef0;

  --shadow: 0 1px 2px rgba(16, 49, 61, .06), 0 4px 16px rgba(16, 49, 61, .06);
  --radius: 12px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0b1b21;
  --surface: #12262d;
  --surface-2: #163038;
  --text: #e3f0f2;
  --muted: #92adb5;
  --border: #23434c;
  --header-bg: #0f2228;
  --accent: #3ec1c7;
  --accent-strong: #6fd6db;
  --accent-soft: #143c43;
  --ok: #4cc48a;
  --ok-soft: #12352a;
  --warn: #f2bd4b;
  --warn-bg: #3a2e12;
  --warn-line: #e7a817;
  --danger: #ff7b7b;
  --danger-soft: #3d1a1d;
  --info-soft: #1a3239;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 18px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Montserrat", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.2; }
h1 { font-size: 1.35rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
a { color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hidden { display: none !important; }
.logo-light { display: block; }
.logo-dark { display: none; }
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }

/* ---------- Fejléc ---------- */
.app-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
}
.header-row {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 8px 16px;
}
.header-logo img { height: 44px; width: auto; display: block; }
.header-title { display: flex; flex-direction: column; min-width: 0; }
.header-title strong { font-size: 1.05rem; color: var(--accent-strong); letter-spacing: .02em; }
.header-title span { font-size: .78rem; color: var(--muted); }
.header-spacer { flex: 1; }
.user-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent-soft); color: var(--accent-strong);
  padding: 4px 10px; border-radius: 999px; font-weight: 600; font-size: .85rem;
}
.storage-pill {
  font-size: .75rem; padding: 3px 9px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--muted); white-space: nowrap; cursor: pointer;
  background: transparent;
}
.storage-pill.ok { color: var(--ok); border-color: var(--ok); }
.storage-pill.warn { color: var(--warn); border-color: var(--warn-line); }

.icon-btn {
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: 10px; height: 38px; min-width: 38px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; font: inherit; font-size: .85rem;
}
.icon-btn:hover { border-color: var(--accent); }
.icon-btn svg { width: 18px; height: 18px; }

/* Sötét mód kapcsoló */
.theme-switch {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font-size: .8rem; color: var(--muted); user-select: none; background: none; border: 0; font-family: inherit;
}
.theme-switch .track {
  width: 44px; height: 24px; border-radius: 999px; background: var(--border); position: relative;
  transition: background .2s;
}
.theme-switch .thumb {
  position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s;
  display: flex; align-items: center; justify-content: center; font-size: 11px;
}
:root[data-theme="dark"] .theme-switch .track { background: var(--brand); }
:root[data-theme="dark"] .theme-switch .thumb { transform: translateX(20px); background: #0b1b21; }

/* Navigáció */
.nav {
  max-width: 1280px; margin: 0 auto; padding: 0 12px;
  display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav button {
  background: none; border: 0; border-bottom: 3px solid transparent;
  color: var(--muted); font: inherit; font-weight: 600; font-size: .9rem;
  padding: 10px 12px; cursor: pointer; white-space: nowrap;
}
.nav button:hover { color: var(--text); }
.nav button.active { color: var(--accent-strong); border-bottom-color: var(--brand-light); }
.nav .badge { margin-left: 6px; }

main { max-width: 1280px; margin: 0 auto; padding: 18px 16px 60px; }

/* ---------- Kártyák, rács ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px; margin-bottom: 16px;
}
.card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.card-head h2, .card-head h3 { margin: 0; }
.card-head .spacer { flex: 1; }
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin-bottom: 16px; }
.kpi {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow);
}
.kpi .label { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.kpi .value { font-size: 1.7rem; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }
.kpi.danger .value { color: var(--danger); }
.kpi.warn .value { color: var(--warn); }
.kpi.ok .value { color: var(--ok); }

/* Jármű kártya */
.vehicle-card { padding: 0; overflow: hidden; margin: 0; }
.vehicle-card .vc-top {
  padding: 14px 16px; display: flex; gap: 12px; align-items: center;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg, var(--accent-soft), transparent);
}
.plate {
  font-weight: 800; letter-spacing: .06em; font-size: 1rem;
  border: 2px solid var(--text); border-radius: 6px; padding: 2px 8px; background: var(--surface);
  white-space: nowrap;
}
.vc-name { font-weight: 600; }
.vc-sub { font-size: .8rem; color: var(--muted); }
.vc-body { padding: 10px 16px 14px; }
.status-list { list-style: none; padding: 0; margin: 0; }
.status-list li {
  display: flex; align-items: center; gap: 8px; padding: 6px 0;
  border-bottom: 1px dashed var(--border); font-size: .88rem;
}
.status-list li:last-child { border-bottom: 0; }
.status-list .lbl { flex: 1; }
.status-list .date { color: var(--muted); font-variant-numeric: tabular-nums; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--ok); }
.dot.warn { background: var(--warn-line); }
.dot.danger { background: var(--danger); }
.dot.none { background: var(--muted); opacity: .5; }

/* Jelvények */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px; font-size: .75rem; font-weight: 700; white-space: nowrap;
}
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.info { background: var(--info-soft); color: var(--muted); }
.badge.count { background: var(--danger); color: #fff; min-width: 20px; justify-content: center; }

/* Figyelmeztetések */
.alert-list { display: flex; flex-direction: column; gap: 8px; }
.alert {
  display: flex; gap: 12px; align-items: flex-start;
  border-radius: 10px; padding: 10px 12px; border: 1px solid var(--border);
  border-left: 5px solid var(--warn-line); background: var(--warn-bg);
}
.alert.danger { border-left-color: var(--danger); background: var(--danger-soft); }
.alert.info { border-left-color: var(--muted); background: var(--info-soft); }
.alert .a-main { flex: 1; min-width: 0; }
.alert .a-title { font-weight: 700; }
.alert .a-sub { font-size: .85rem; color: var(--muted); }
.alert .a-act { flex: none; }
.empty { padding: 18px; text-align: center; color: var(--muted); }

/* ---------- Űrlapok ---------- */
label.field { display: flex; flex-direction: column; gap: 4px; font-size: .82rem; font-weight: 600; color: var(--muted); }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 9px; padding: 9px 11px; min-height: 42px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: transparent; }
.form-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.btn {
  font: inherit; font-weight: 700; font-size: .9rem; border-radius: 10px; padding: 10px 16px; min-height: 42px;
  border: 1px solid transparent; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; justify-content: center;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
:root[data-theme="dark"] .btn-primary { background: var(--brand-light); color: #06262d; }
:root[data-theme="dark"] .btn-primary:hover { background: #6fd6db; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn-sm { padding: 5px 10px; min-height: 32px; font-size: .8rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.msg { margin-top: 10px; padding: 10px 12px; border-radius: 9px; font-size: .9rem; }
.msg.ok { background: var(--ok-soft); color: var(--ok); }
.msg.err { background: var(--danger-soft); color: var(--danger); }
.msg.warn { background: var(--warn-bg); color: var(--warn); }

/* ---------- Táblázatok ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
th { background: var(--surface-2); font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--surface-2); }
tfoot td { font-weight: 700; background: var(--surface-2); border-top: 2px solid var(--border); border-bottom: 0; }
td.actions { white-space: nowrap; text-align: right; }

/* Oszlopdiagram */
.bars { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 110px 1fr 90px; gap: 10px; align-items: center; font-size: .85rem; }
.bar-track { height: 18px; background: var(--surface-2); border-radius: 6px; overflow: hidden; border: 1px solid var(--border); }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-light)); border-radius: 6px; }

/* ---------- Bejelentkezés ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.login-card {
  width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; box-shadow: var(--shadow); padding: 28px 24px; text-align: center;
}
.login-card img { width: 170px; height: auto; margin: 0 auto 12px; }
.login-card h1 { color: var(--accent-strong); margin-bottom: 4px; }
.login-card form { text-align: left; margin-top: 18px; display: flex; flex-direction: column; gap: 12px; }
.login-card .theme-switch { margin-top: 18px; }

/* Fájl fogadó */
.dropzone {
  border: 2px dashed var(--border); border-radius: 12px; padding: 26px 16px; text-align: center;
  color: var(--muted); cursor: pointer; transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.over { border-color: var(--brand-light); background: var(--accent-soft); color: var(--text); }
.dropzone strong { color: var(--accent-strong); }

/* Modális ablak */
.modal-back {
  position: fixed; inset: 0; background: rgba(5, 20, 25, .55); z-index: 50;
  display: flex; align-items: flex-start; justify-content: center; padding: 40px 12px; overflow-y: auto;
}
.modal {
  background: var(--surface); border-radius: 16px; width: 100%; max-width: 760px; padding: 20px;
  border: 1px solid var(--border); box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.modal h2 { margin-bottom: 14px; }
.section-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); font-weight: 700; margin: 16px 0 8px; }

.toast {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 60;
  background: var(--brand-dark); color: #fff; padding: 10px 18px; border-radius: 10px; box-shadow: var(--shadow);
  font-weight: 600; font-size: .9rem; max-width: calc(100vw - 32px);
}
.toast.err { background: var(--danger); }

.banner {
  max-width: 1280px; margin: 12px auto 0; padding: 0 16px;
}
.banner .inner {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--text);
  border-radius: 10px; padding: 10px 14px; font-size: .9rem;
}
.banner .inner span { flex: 1; min-width: 200px; }

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.toolbar select, .toolbar input { width: auto; min-width: 140px; }

.print-head { display: none; }

/* ---------- Mobil ---------- */
@media (max-width: 640px) {
  .header-logo img { height: 38px; }
  .header-title span { display: none; }
  .theme-switch .lbl, .hide-sm { display: none; }
  main { padding: 14px 12px 60px; }
  .card { padding: 14px; }
  .bar-row { grid-template-columns: 84px 1fr 70px; }
  .kpi .value { font-size: 1.4rem; }
  .alert { flex-wrap: wrap; }
  .alert .a-main { flex: 1 1 60%; }
  .alert .a-act { flex: 1 1 100%; }
  .alert .a-act .btn { width: 100%; }
}

/* ---------- Nyomtatás / PDF ---------- */
@media print {
  :root { --bg: #fff; --surface: #fff; --surface-2: #f3f6f7; --text: #000; --muted: #444; --border: #bbb; --shadow: none; color-scheme: light; }
  body { font-size: 11px; background: #fff; }
  .app-header, .banner, .no-print, .toast, .nav { display: none !important; }
  main { padding: 0; max-width: none; }
  .card { box-shadow: none; break-inside: avoid; padding: 10px; margin-bottom: 10px; }
  .print-head { display: flex; align-items: center; gap: 14px; border-bottom: 2px solid #148e99; padding-bottom: 8px; margin-bottom: 12px; }
  .print-head img { height: 52px; }
  .print-head .logo-dark { display: none !important; }
  .print-head .logo-light { display: block !important; }
  .table-wrap { overflow: visible; border: 0; }
  th, td { padding: 4px 6px; }
  .bar-fill { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .badge, .dot { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  @page { size: A4 landscape; margin: 12mm; }
}

/* =====================================================================
   HR-nyilvántartás kiegészítések
   ===================================================================== */
.initials {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-strong); font-weight: 800; font-size: .8rem; letter-spacing: .02em;
}
.initials.lg { width: 52px; height: 52px; font-size: 1.05rem; }
.name-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.name-cell .nm { font-weight: 700; }
.name-cell .sub { font-size: .78rem; color: var(--muted); }
tr.row-click { cursor: pointer; }
.badge.brand { background: var(--accent-soft); color: var(--accent-strong); }
.badge.pend { background: #e8ecfb; color: #3a4c9c; }
:root[data-theme="dark"] .badge.pend { background: #222a4a; color: #a9b6f2; }
.alert.ok { border-left-color: var(--ok); background: var(--ok-soft); }
.alert.pend { border-left-color: #3a4c9c; background: #eef1fc; }
:root[data-theme="dark"] .alert.pend { border-left-color: #a9b6f2; background: #1d2440; }
.alert .who { font-weight: 700; min-width: 0; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  font: inherit; font-size: .8rem; font-weight: 700; border: 1px solid var(--border); background: var(--surface);
  color: var(--muted); border-radius: 999px; padding: 5px 12px; cursor: pointer;
}
.chip.active { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
:root[data-theme="dark"] .chip.active { background: var(--brand-light); border-color: var(--brand-light); color: #06262d; }

.month-nav { display: inline-flex; align-items: center; gap: 6px; }
.month-nav strong { min-width: 140px; text-align: center; font-size: 1rem; }

/* Napi lista */
.day-list { list-style: none; margin: 0; padding: 0; }
.day-list li {
  display: grid; grid-template-columns: 86px 1fr auto; gap: 6px 12px; align-items: center;
  padding: 8px 12px; border-top: 1px solid var(--border);
}
.day-list li:first-child { border-top: 0; }
.day-list .d { font-variant-numeric: tabular-nums; font-weight: 700; line-height: 1.2; }
.day-list .d span { display: block; font-weight: 500; font-size: .75rem; color: var(--muted); }
.day-list .info { display: flex; gap: 6px 12px; flex-wrap: wrap; align-items: center; min-width: 0; }
.day-list .t { font-variant-numeric: tabular-nums; }
.day-list .note { color: var(--muted); font-size: .82rem; overflow-wrap: anywhere; }
.day-list li.rest { background: var(--surface-2); }
.day-list li.rest .d { color: var(--muted); }
.expand-row td { background: var(--surface-2) !important; padding: 0; }

.num-pos { color: var(--ok); font-weight: 700; }
.num-neg { color: var(--danger); font-weight: 700; }

.person-head { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.person-head h1 { margin: 0; }
.person-head .meta { color: var(--muted); font-size: .88rem; }
.kv { display: grid; grid-template-columns: minmax(120px, 40%) 1fr; gap: 6px 12px; font-size: .9rem; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.breakdown { font-size: .85rem; color: var(--muted); margin-top: 6px; }
.big-number { font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.big-number small { font-size: .9rem; font-weight: 600; color: var(--muted); margin-left: 4px; }

.doc-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.doc-row:first-child { border-top: 0; }
.doc-row .t { font-weight: 700; }
.doc-row .s { font-size: .82rem; color: var(--muted); }

.calc-line { font-size: .88rem; color: var(--accent-strong); font-weight: 700; min-height: 1.3em; }
.hint { font-size: .8rem; color: var(--muted); font-weight: 500; }
.inline-check { display: flex; align-items: center; gap: 8px; font-size: .88rem; font-weight: 600; color: var(--text); }
.inline-check input { width: auto; min-height: 0; }
.weekgrid { display: grid; grid-template-columns: repeat(7, minmax(60px, 1fr)); gap: 8px; }
.weekgrid label.field { font-size: .75rem; }
.weekgrid input { padding: 8px 6px; text-align: center; }
@media (max-width: 640px) {
  .weekgrid { grid-template-columns: repeat(4, 1fr); }
  .day-list li { grid-template-columns: 70px 1fr; }
  .day-list li > .a { grid-column: 2; justify-self: start; }
  .month-nav strong { min-width: 110px; }
}

/* ---------- Jelenléti ív nyomtatás ---------- */
#printArea { display: none; }
@media print {
  body.printing #app, body.printing #modalBack, body.printing .toast { display: none !important; }
  body.printing #printArea { display: block; }
  @page { size: A4 portrait; margin: 11mm; }
  .sheet { break-after: page; font-size: 10px; color: #000; }
  .sheet:last-child { break-after: auto; }
  .sheet .sh-head { display: flex; align-items: center; gap: 14px; border-bottom: 2px solid #148e99; padding-bottom: 6px; margin-bottom: 8px; }
  .sheet .sh-head img { height: 46px; }
  .sheet .sh-head h1 { font-size: 16px; margin: 0; color: #145469; }
  .sheet .sh-head .r { margin-left: auto; text-align: right; font-size: 10px; }
  .sheet table { font-size: 9.5px; }
  .sheet th, .sheet td { padding: 2.5px 5px; border: 1px solid #999; }
  .sheet th { background: #e6f1f2 !important; color: #000; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .sheet tr.rest td { background: #f1f4f5 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .sheet tfoot td { background: #e6f1f2 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .sheet .sign { display: flex; justify-content: space-between; gap: 40px; margin-top: 28px; }
  .sheet .sign div { flex: 1; border-top: 1px solid #000; padding-top: 4px; text-align: center; }
  .sheet .legend { margin-top: 8px; font-size: 8.5px; color: #333; }
}

/* =====================================================================
   Telefonos csempés felület
   ===================================================================== */
.tile-wrap { max-width: 560px; margin: 0 auto; }
.hello { margin: 4px 2px 14px; }
.hello .hi { font-size: 1.45rem; font-weight: 800; color: var(--accent-strong); }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tiles-3 { grid-template-columns: repeat(3, 1fr); }
.tile {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 6px;
  min-height: 138px; padding: 16px; border-radius: 18px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); box-shadow: var(--shadow);
  font: inherit; text-align: left; cursor: pointer; position: relative; -webkit-tap-highlight-color: transparent;
  transition: transform .08s ease, border-color .15s;
}
.tile:active { transform: scale(.98); }
.tile:hover { border-color: var(--brand-light); }
.tile:focus-visible, .back-btn:focus-visible, .chip:focus-visible, .link-quiet:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.tile svg { width: 34px; height: 34px; color: var(--brand); flex: none; }
.tile .tl { font-weight: 800; font-size: 1.12rem; line-height: 1.2; }
.tile .ts { font-size: .8rem; color: var(--muted); line-height: 1.3; }
.tile.primary { background: linear-gradient(160deg, var(--brand-dark), var(--brand)); border-color: transparent; color: #fff; }
.tile.primary svg, .tile.primary .ts { color: rgba(255,255,255,.88); }
.tile.done { border-color: var(--ok); }
.tile.done svg { color: var(--ok); }
.tile.warn { border-color: var(--warn-line); background: var(--warn-bg); }
.tile.warn svg { color: var(--warn); }
.tile.wide { grid-column: 1 / -1; min-height: 76px; flex-direction: row; align-items: center; gap: 14px; margin-top: 12px; width: 100%; }
.tile.wide > span { display: flex; flex-direction: column; gap: 2px; }
.tile:disabled { opacity: .45; cursor: not-allowed; }
.day-tile { min-height: 96px; }
.hours-tile { width: 100%; min-height: 120px; align-items: center; justify-content: center; text-align: center; }
.hours-big { font-size: 2.4rem; font-weight: 800; line-height: 1; }
.tile-radio { min-height: 86px; }
.tile-radio input { position: absolute; opacity: 0; pointer-events: none; }
.tile-radio:has(input:checked) { border: 2px solid var(--brand); background: var(--accent-soft); }
.step-head { display: flex; align-items: center; gap: 12px; margin: 2px 0 14px; }
.back-btn {
  flex: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.step-eyebrow { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.step-title { font-size: 1.4rem; font-weight: 800; margin: 2px 0 0; color: var(--accent-strong); }
.wiz-sum { background: var(--accent-soft); color: var(--accent-strong); border-radius: 10px; padding: 8px 12px; font-size: .85rem; font-weight: 600; margin-bottom: 12px; }
.big-input { font-size: 1.15rem; min-height: 52px; }
.btn-block { width: 100%; min-height: 52px; font-size: 1rem; }
.chips-hours { gap: 8px; }
.chips-hours .chip { min-width: 58px; min-height: 46px; font-size: 1rem; }
.chip:disabled { opacity: .4; cursor: not-allowed; }
.link-quiet { background: none; border: 0; color: var(--muted); text-decoration: underline; font: inherit; font-size: .82rem; padding: 10px 6px; cursor: pointer; }
.done-wrap { text-align: center; padding: 30px 10px; }
.done-mark { width: 84px; height: 84px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.done-mark svg { width: 46px; height: 46px; }
.balance-card { text-align: center; }
.ot-warn { border: 1px solid var(--danger); background: var(--danger-soft); border-radius: 12px; padding: 12px 14px; font-size: .88rem; margin-bottom: 14px; }
.ot-warn ul { margin: 6px 0 0; padding-left: 18px; }
.ot-warn li { margin: 3px 0; }
.radio-list { display: flex; flex-direction: column; gap: 6px; }
.radio-list label { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; font-weight: 600; font-size: .9rem; color: var(--text); cursor: pointer; background: var(--surface-2); }
.radio-list input { width: auto; min-height: 0; margin-top: 3px; }
.radio-list label:has(input:checked) { border-color: var(--brand); background: var(--accent-soft); }
.ot-card .kv { grid-template-columns: minmax(110px, 34%) 1fr; }
.btn-danger.armed, .btn-primary.armed { background: var(--danger); border-color: var(--danger); color: #fff; }
@media (max-width: 640px) {
  .tiles-3 { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .tile { min-height: 124px; padding: 14px; }
  .day-tile { min-height: 88px; padding: 10px; }
  .hello .hi { font-size: 1.3rem; }
}
.frame-box { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); text-align: left; font-size: .88rem; }
.ledger-list { list-style: none; margin: 0; padding: 0; }
.ledger-list li { display: grid; grid-template-columns: 56px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); }
.ledger-list li:first-child { border-top: 0; }
.lg-d { font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.15; }
.lg-d span { display: block; font-size: .7rem; color: var(--muted); font-weight: 500; }
.lg-t { font-size: .84rem; min-width: 0; overflow-wrap: anywhere; }
.lg-v { text-align: right; display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }
.lg-b { font-size: .72rem; color: var(--muted); }

/* V2 – belépési adatok a dolgozó adatlapján */
.auth-box { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: var(--accent-soft); }

/* =====================================================================
   UPartner kiegészítések
   ===================================================================== */
.brand-word { font-weight: 800; letter-spacing: .01em; }
.brand-word b { color: var(--brand-light); }
.org-select { max-width: 260px; min-height: 36px; padding: 6px 10px; font-size: .85rem; font-weight: 600; }
.ctx-bar { background: var(--accent-soft); border-bottom: 1px solid var(--border); }
.ctx-bar .inner { max-width: 1280px; margin: 0 auto; padding: 6px 16px; display: flex; gap: 10px; align-items: center; font-size: .85rem; color: var(--accent-strong); font-weight: 600; flex-wrap: wrap; }
.code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.type-pill { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .8rem; }
.type-pill::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--muted); }
.type-pill.megelozo::before { background: #24875a; }
.type-pill.hibajavito::before { background: #c23434; }
.type-pill.fejleszto::before { background: #3a4c9c; }
.type-pill.none::before { background: transparent; border: 2px dashed var(--muted); }
.cls-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cls-grid.two { grid-template-columns: repeat(2, 1fr); }
.cls-opt { position: relative; display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--border); border-radius: 12px; padding: 12px; cursor: pointer; background: var(--surface); }
.cls-opt input { position: absolute; opacity: 0; pointer-events: none; }
.cls-opt strong { font-size: .95rem; }
.cls-opt span { font-size: .78rem; color: var(--muted); font-weight: 500; }
.cls-opt:has(input:checked) { border: 2px solid var(--brand); background: var(--accent-soft); padding: 11px; }
.cls-opt.red:has(input:checked) { border-color: var(--danger); background: var(--danger-soft); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 12px 18px; font-size: .86rem; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand-light); }
.timeline li::after { content: ""; position: absolute; left: 7px; top: 16px; bottom: 0; width: 2px; background: var(--border); }
.timeline li:last-child::after { display: none; }
.timeline .tm { color: var(--muted); font-size: .76rem; }
.comment { border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; margin-bottom: 8px; background: var(--surface-2); }
.comment.internal { border-style: dashed; background: var(--warn-bg); }
.comment .cm-h { font-size: .76rem; color: var(--muted); margin-bottom: 2px; }
.comment .cm-t { white-space: pre-wrap; font-size: .9rem; }
.barcode-box { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 10px; display: inline-flex; flex-direction: column; align-items: center; gap: 2px; color: #000; }
.barcode-box svg { display: block; }
.barcode-box .code { font-size: .9rem; color: #000; }
.scan-row { display: flex; gap: 8px; align-items: stretch; }
.scan-row input { font-family: ui-monospace, Consolas, monospace; font-size: 1.05rem; text-transform: uppercase; }
.scan-flash { padding: 10px 14px; border-radius: 10px; font-weight: 700; margin-top: 10px; }
.scan-flash.ok { background: var(--ok-soft); color: var(--ok); }
.scan-flash.warn { background: var(--warn-bg); color: var(--warn); }
.scan-flash.danger { background: var(--danger-soft); color: var(--danger); }
.cam-wrap video { width: 100%; max-height: 50vh; border-radius: 12px; background: #000; }
.progress { height: 10px; border-radius: 999px; background: var(--border); overflow: hidden; }
.progress > div { height: 100%; background: var(--brand); }
.org-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.org-card { text-align: left; cursor: pointer; font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.org-card:hover { border-color: var(--accent); }
.org-card .on { font-weight: 800; color: var(--accent-strong); }
.org-card .os { font-size: .8rem; color: var(--muted); }
.org-card.own { border-left: 4px solid var(--brand-light); }
.check-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.check-list label { display: flex; gap: 8px; align-items: flex-start; font-size: .9rem; font-weight: 500; }
.check-list input { width: auto; min-height: 0; margin-top: 3px; }
.first-steps { border: 2px solid var(--warn-line); background: var(--warn-bg); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; }
.first-steps h3 { color: var(--warn); font-size: .92rem; }
.pw-show { font-family: ui-monospace, Consolas, monospace; font-size: 1.5rem; font-weight: 800; letter-spacing: .08em; background: var(--accent-soft); color: var(--accent-strong); padding: 12px 16px; border-radius: 10px; text-align: center; user-select: all; }
.legend-cats { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .78rem; color: var(--muted); }
.legend-cats b { color: var(--text); }
.split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .cls-grid { grid-template-columns: 1fr; } }
.plbl-sheet { display: grid; grid-template-columns: repeat(3, 63mm); gap: 4mm 4mm; }
.plbl { width: 63mm; height: 34mm; border: 1px dashed #bbb; padding: 2mm 3mm; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; break-inside: avoid; font-family: Montserrat, Arial, sans-serif; color: #000; }
.plbl .lh { display: flex; align-items: center; gap: 2mm; font-size: 6.5pt; font-weight: 700; color: #145469; }
.plbl .lh img { height: 6mm; }
.plbl .ln { font-size: 7pt; line-height: 1.15; max-height: 2.3em; overflow: hidden; }
.plbl svg { width: 100%; height: 11mm; }
.plbl .lc { text-align: center; font-family: Consolas, monospace; font-weight: 800; font-size: 9pt; letter-spacing: .05em; }
@media print { body.printing #printArea .plbl-sheet { gap: 3mm; } }
.header-logo img.logo-dark, .login-card img.logo-dark { display: none; }
:root[data-theme="dark"] .header-logo img.logo-light, :root[data-theme="dark"] .login-card img.logo-light { display: none; }
:root[data-theme="dark"] .header-logo img.logo-dark, :root[data-theme="dark"] .login-card img.logo-dark { display: block; }
.login-card .header-logo img { width: auto; margin: 0 auto; }
@media (max-width: 640px) {
  .user-chip { display: none; }
  .header-row { gap: 8px; }
  .org-select { max-width: 150px; }
}
.btn svg { width: 18px; height: 18px; vertical-align: middle; }
.tagline-en { margin-top: 6px; font-size: .78rem; font-weight: 500; letter-spacing: .04em; color: var(--muted); opacity: .85; }
.msg.info { background: var(--accent-soft); color: var(--accent-strong); }

/* Márka: logó + jelmondat (vízió) | UPartner + alcím – élesen elválasztva */
.hdr-logo-block { display: flex; flex-direction: column; align-items: center; gap: 3px; text-decoration: none; padding-right: 14px; }
.hdr-logo-block .header-logo img { height: 40px; }
.hdr-tagline { font-size: .56rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.hdr-app-block { border-left: 2px solid var(--brand-light); padding-left: 14px; min-height: 46px; justify-content: center; }
.hdr-app-block .brand-word { font-size: 1.25rem; line-height: 1.1; }
.app-subtitle { font-size: .8rem; font-weight: 700; color: var(--accent-strong) !important; letter-spacing: .01em; }
.hdr-meta { font-size: .72rem; color: var(--muted); }
.brand-logo-block { padding-bottom: 14px; border-bottom: 2px solid var(--brand-light); margin-bottom: 14px; }
.brand-app-block h1 { margin: 0; }
.brand-app-block .app-subtitle { margin-top: 2px; font-size: .9rem; }
.tagline-en { font-size: .68rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; opacity: 1; }
@media (max-width: 900px) { .hdr-tagline { display: none; } .hdr-logo-block { padding-right: 8px; } .hdr-app-block { padding-left: 8px; } }
@media (max-width: 640px) { .app-subtitle { display: none; } }
/* v0.6: csatolmányok, aláírás, tájékoztató */
.att-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.att { position: relative; width: 120px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; cursor: pointer; background: var(--surface-2); }
.att img { width: 100%; height: 90px; object-fit: cover; display: block; background: var(--border); }
.att-ico { height: 90px; display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--accent-strong); background: var(--accent-soft); }
.att-n { font-size: .72rem; padding: 4px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-del { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; cursor: pointer; font-size: 16px; line-height: 1; }
.sign-pad { width: 100%; height: 220px; border: 2px dashed var(--brand-light); border-radius: 12px; background: #fff; touch-action: none; display: block; }
.sign-sum { font-size: .82rem; background: var(--surface-2); border-radius: 10px; padding: 8px 10px; max-height: 140px; overflow: auto; margin-bottom: 8px; }
.signoff { display: flex; gap: 12px; align-items: center; border: 1px solid var(--ok); background: var(--ok-soft); border-radius: 10px; padding: 8px 12px; margin: 8px 0; }
.signoff img { height: 60px; background: #fff; border-radius: 6px; }
.privacy-text { white-space: pre-wrap; font-size: .85rem; max-height: 50vh; overflow: auto; border: 1px solid var(--border); border-radius: 10px; padding: 12px; background: var(--surface-2); }
.mail-body { white-space: pre-wrap; font-family: inherit; font-size: .85rem; background: var(--surface-2); padding: 12px; border-radius: 10px; max-height: 60vh; overflow: auto; }
.link-btn { background: none; border: 0; color: var(--accent-strong); text-decoration: underline; cursor: pointer; font: inherit; font-size: .85rem; margin-top: 8px; }
label.btn input[type=file] { display: none; }
.lang-switch { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; background: var(--surface); cursor: pointer; padding: 0; font: inherit; }
.lang-switch span { padding: 5px 9px; font-size: .74rem; font-weight: 800; color: var(--muted); }
.lang-switch span.on { background: var(--brand); color: #fff; }
.login-toggles { display: flex; gap: 12px; align-items: center; justify-content: center; margin-top: 12px; }
/* fejléc tömörítés */
.app-header .header-row { gap: 10px; flex-wrap: nowrap; }
.hdr-logo-block .header-logo img { height: 46px; }
.hdr-tagline { white-space: normal; max-width: 132px; text-align: center; line-height: 1.25; font-size: .5rem; }
.hdr-app-block .app-subtitle { white-space: nowrap; }
.app-header .user-chip { white-space: nowrap; max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
.app-header .theme-switch .lbl { display: none; }
.lang-switch { flex-shrink: 0; }
.app-header .org-select { max-width: 220px; }
@media (max-width: 1100px) { .app-header #scanBtn span { display: none; } }
.hdr-app-block { min-width: 0; flex-shrink: 1; }
.hdr-app-block .app-subtitle { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1100px) { .app-header .org-select { max-width: 170px; } .app-header .user-chip { max-width: 120px; } }
@media (max-width: 760px) {
  .app-header .header-row { flex-wrap: wrap; row-gap: 6px; }
  .app-header .org-select { order: 10; max-width: none; width: 100%; flex-basis: 100%; }
  .app-header .user-chip { display: none; }
}
@media (max-width: 480px) { .app-header .theme-switch { display: none; } .hdr-logo-block { padding-right: 6px; } }
