/* Jelenléti Kioszk – admin felület  ·  © 2026 Tóbiás Anikó */
:root {
  --bg: #f4f6fa; --card: #fff; --text: #172033; --muted: #64708a; --line: #e2e7ef;
  --pri: #1d4ed8; --pri-d: #1e40af; --navy: #0f1b2d;
  --ok: #15803d; --ok-bg: #e8f6ed; --bad: #b91c1c; --bad-bg: #fdecec;
  --warn: #a16207; --warn-bg: #fdf5e1; --info: #1d4ed8; --info-bg: #e8effd;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
a { color: var(--pri); }
h1 { font-size: 24px; margin: 0 0 18px; letter-spacing: -.01em; }
h2 { font-size: 18px; margin: 0 0 12px; }
code { background: #eef1f6; padding: 1px 5px; border-radius: 4px; font-size: .92em; }

/* ---- Fejléc ---- */
.topbar { background: var(--navy); color: #fff; display: flex; align-items: center; gap: 18px; padding: 0 20px; min-height: 58px; flex-wrap: wrap; position: sticky; top: 0; z-index: 5; }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; white-space: nowrap; }
.logo img { width: 30px; height: 30px; border-radius: 8px; }
.nav { display: flex; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav a { color: #b9c5da; text-decoration: none; padding: 18px 12px; white-space: nowrap; border-bottom: 3px solid transparent; }
.nav a:hover { color: #fff; }
.nav a.active { color: #fff; border-bottom-color: #22c55e; }
.user { display: flex; align-items: center; gap: 14px; font-size: 14px; white-space: nowrap; }
.user .who { color: #b9c5da; text-decoration: none; }
.user .who:hover, .user .who.on { color: #fff; text-decoration: underline; }
.ghost-btn { background: #22c55e; color: #05210f; border: 0; border-radius: 8px; padding: 7px 12px; font: inherit; font-weight: 700; cursor: pointer; }
.tablet-bar { background: #fdf5e1; color: #713f12; border-bottom: 1px solid #f1dfaa; text-align: center; padding: 8px 14px; font-size: 14px; }
.tablet-bar span { font-weight: 700; }
.perm-list { display: grid; gap: 6px; margin: 6px 0 14px; }
.perm-list label { font-weight: 500 !important; font-size: 15px !important; display: flex !important; gap: 8px; align-items: center; margin: 0 !important; }
.user .ghost { color: #fff; text-decoration: none; border: 1px solid #33496d; padding: 4px 10px; border-radius: 8px; }
.inline { display: inline; margin: 0; }
button.link { background: none; border: 0; color: #fff; cursor: pointer; font: inherit; padding: 0; text-decoration: underline; }
@media (max-width: 860px) {
  .topbar { padding: 8px 14px 0; gap: 6px 14px; }
  .nav { order: 3; flex-basis: 100%; }
  .nav a { padding: 10px 10px 12px; }
  .user .who { max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
}

.page { max-width: 1240px; margin: 0 auto; padding: 26px 20px 40px; }
.credit { text-align: center; color: var(--muted); font-size: 13px; padding: 18px; }

/* ---- Kártyák, rácsok ---- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 18px; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush > h2 { padding: 16px 20px 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat .n { font-size: 30px; font-weight: 750; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .l { color: var(--muted); font-size: 13px; }
.stat.good .n { color: var(--ok); } .stat.bad .n { color: var(--bad); }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 900px) { .cols { grid-template-columns: 1fr; } }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 16px; }
@media (max-width: 640px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; text-align: right; }

/* ---- Táblázatok ---- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 650; background: #f8fafc; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fafbfd; }
td.actions { white-space: nowrap; text-align: right; }
tr.inactive td { color: var(--muted); }
tr.sum td { font-weight: 700; background: #f8fafc; }
tr.weekend td { background: #fbfbfd; }
.empty { padding: 26px; text-align: center; color: var(--muted); }

/* ---- Űrlapok ---- */
.form label { display: block; font-size: 13px; font-weight: 600; color: #39445a; margin-bottom: 12px; }
.form label.radio, .form label.check { font-weight: 500; font-size: 15px; display: flex; gap: 8px; align-items: center; }
input[type=text], input[type=password], input[type=date], input[type=time], input[type=number], input:not([type]), select, textarea {
  display: block; width: 100%; margin-top: 5px; padding: 9px 11px; border: 1px solid #cdd5e1; border-radius: 9px;
  font: inherit; background: #fff; color: var(--text); }
input:focus, select:focus, textarea:focus { outline: 2px solid #bfd3fb; border-color: var(--pri); }
textarea.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 4px; margin: 0 0 16px; }
legend { font-weight: 700; padding: 0 6px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.filters label { margin: 0; min-width: 150px; }
.days { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.days label { display: flex !important; align-items: center; gap: 4px; margin: 0 !important; padding: 6px 10px; border: 1px solid #cdd5e1; border-radius: 8px; font-weight: 500 !important; cursor: pointer; }
.hint { font-size: 12.5px; color: var(--muted); font-weight: 400; margin-top: 3px; display: block; }

/* ---- Gombok ---- */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 15px; border-radius: 9px; border: 1px solid #cdd5e1; background: #fff;
  color: var(--text); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: #f3f5f9; }
.btn.primary { background: var(--pri); border-color: var(--pri); color: #fff; }
.btn.primary:hover { background: var(--pri-d); }
.btn.danger { color: var(--bad); border-color: #efc2c2; }
.btn.danger:hover { background: var(--bad-bg); }
.btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 7px; }
.btn.big { padding: 12px 22px; font-size: 16px; }

/* ---- Jelzések ---- */
.alert { padding: 11px 15px; border-radius: 10px; margin-bottom: 14px; border: 1px solid transparent; }
.alert.ok { background: var(--ok-bg); color: #14532d; border-color: #c7e8d2; }
.alert.bad { background: var(--bad-bg); color: #7f1d1d; border-color: #f4c9c9; }
.alert.warn { background: var(--warn-bg); color: #713f12; border-color: #f1dfaa; }
.alert.info { background: var(--info-bg); color: #1e3a8a; border-color: #c9d7f8; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 650; white-space: nowrap; margin: 1px 0; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.muted { background: #eef1f6; color: var(--muted); }
.type-in { color: var(--ok); font-weight: 650; }
.type-out { color: var(--pri); font-weight: 650; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); margin-right: 6px; }

.pinbox { font-size: 44px; font-weight: 800; letter-spacing: .25em; font-variant-numeric: tabular-nums; font-family: ui-monospace, Menlo, Consolas, monospace; }
.thumb { width: 44px; height: 33px; object-fit: cover; border-radius: 5px; vertical-align: middle; cursor: zoom-in; border: 1px solid var(--line); }
.lightbox { position: fixed; inset: 0; background: rgba(10, 15, 25, .85); display: flex; align-items: center; justify-content: center; z-index: 50; cursor: zoom-out; }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 10px; }
.subnav { display: flex; gap: 6px; margin: -6px 0 18px; flex-wrap: wrap; }
.subnav a { padding: 6px 12px; border-radius: 8px; text-decoration: none; color: var(--muted); border: 1px solid var(--line); background: #fff; }
.subnav a.active { color: var(--text); border-color: #b8c3d6; font-weight: 650; }
details.edit summary { cursor: pointer; color: var(--pri); }

/* ---- Belépés / telepítés ---- */
.auth-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 24px; background: radial-gradient(120% 90% at 0% 0%, #1b3256 0%, var(--navy) 60%); }
.auth-card { background: #fff; border-radius: 16px; padding: 30px; width: 100%; max-width: 400px; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.auth-card.wide { max-width: 680px; }
.auth-card h1 { font-size: 22px; }
.auth-card .credit { padding: 18px 0 0; }
.auth-logo { width: 52px; height: 52px; border-radius: 12px; display: block; margin-bottom: 14px; }

/* ---- Nyomtatás ---- */
.print-only { display: none; }
@media print {
  body { background: #fff; font-size: 11pt; }
  .topbar, .no-print, .credit, .filters, .btn, .subnav { display: none !important; }
  .print-only { display: block; }
  .page { padding: 0; max-width: none; }
  .card { border: 0; padding: 0; margin-bottom: 14pt; break-inside: avoid-page; }
  th { background: #eee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  th, td { padding: 3pt 5pt; }
  .emp-block { break-after: page; }
  .badge { border: 1px solid #999; }
}
