@font-face { font-family: Rubik; font-weight: 300 900; font-display: swap; src: url(/fonts/latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Rubik; font-weight: 300 900; font-display: swap; src: url(/fonts/arabic.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: Rubik; font-weight: 300 900; font-display: swap; src: url(/fonts/hebrew.woff2) format('woff2'); unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }

:root {
  --bg0: #070b17; --bg1: #0b1020; --bg2: #121a33;
  --card: #141c35; --card2: #19233f; --line: #24305a; --line2: #2f3d6e;
  --text: #e6ebff; --muted: #8b95b8; --dim: #5d6890;
  --accent: #22d3c5; --accent2: #3b82f6; --accent-ink: #04201e;
  --in: #22c55e; --out: #f59e0b; --bad: #ef4444; --warn: #eab308;
  --r: 14px; --r-sm: 10px;
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, .6), 0 2px 6px -2px rgba(0, 0, 0, .4);
  --glow: 0 0 0 1px rgba(34, 211, 197, .35), 0 8px 30px -8px rgba(34, 211, 197, .45);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --tabbar: 66px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: Rubik, system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--text); font-size: 15px; line-height: 1.45;
  background: radial-gradient(1200px 600px at 80% -10%, rgba(59, 130, 246, .16), transparent 60%),
              radial-gradient(900px 500px at -10% 110%, rgba(34, 211, 197, .10), transparent 60%),
              linear-gradient(180deg, var(--bg1), var(--bg2)) fixed;
  background-color: var(--bg1);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.num, time, .tnum { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: rgba(34, 211, 197, .3); }

/* ---------- top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
  background: rgba(11, 16, 32, .72); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid rgba(47, 61, 110, .55);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .2px; min-width: 0; }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand .sub { display: block; font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: .6px; text-transform: uppercase; }
.brand .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .grow { flex: 1; }
.iconbtn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); cursor: pointer; transition: background .15s, border-color .15s, transform .15s var(--ease);
}
.iconbtn:hover { background: var(--card2); border-color: var(--line2); }
.iconbtn:active { transform: scale(.94); }
.iconbtn svg { width: 19px; height: 19px; }
.langsel { display: inline-flex; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: var(--card); }
.langsel button { border: 0; background: none; padding: 7px 10px; font-size: 13px; color: var(--muted); cursor: pointer; }
.langsel button.on { background: rgba(34, 211, 197, .14); color: var(--accent); font-weight: 600; }

/* ---------- layout ---------- */
.wrap { max-width: 520px; margin: 0 auto; padding: 18px 16px 40px; }
.dash { display: grid; grid-template-columns: 1fr; min-height: calc(100vh - 59px); }
.dash main { padding: 18px 16px calc(var(--tabbar) + 24px); min-width: 0; }
.side { display: none; }
@media (min-width: 900px) {
  .dash { grid-template-columns: 236px 1fr; }
  .side { display: flex; flex-direction: column; gap: 2px; padding: 18px 12px; border-inline-end: 1px solid rgba(47, 61, 110, .5); position: sticky; top: 59px; height: calc(100vh - 59px); overflow: auto; }
  .dash main { padding: 26px 30px 40px; }
  .tabbar { display: none !important; }
}
.side .grp { font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: .8px; padding: 14px 12px 6px; }
.navlink {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 11px; color: var(--muted); font-weight: 500;
  transition: background .15s, color .15s;
}
.navlink svg { width: 19px; height: 19px; flex: none; }
.navlink:hover { background: rgba(255, 255, 255, .03); color: var(--text); }
.navlink.on { background: linear-gradient(90deg, rgba(34, 211, 197, .16), rgba(34, 211, 197, .03)); color: var(--text); box-shadow: inset 3px 0 0 var(--accent); }
[dir=rtl] .navlink.on { background: linear-gradient(270deg, rgba(34, 211, 197, .16), rgba(34, 211, 197, .03)); box-shadow: inset -3px 0 0 var(--accent); }
.navlink .badge { margin-inline-start: auto; }

.tabbar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 25; display: flex; justify-content: space-around;
  height: calc(var(--tabbar) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: rgba(11, 16, 32, .86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid rgba(47, 61, 110, .6);
}
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; color: var(--muted); position: relative; }
.tabbar a svg { width: 22px; height: 22px; }
.tabbar a.on { color: var(--accent); }
.tabbar a .badge { position: absolute; top: 7px; inset-inline-start: calc(50% + 6px); }

.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.head h1 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -.2px; }
.head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.stack > * + * { margin-top: 14px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.spacer { flex: 1; }

/* ---------- cards ---------- */
.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .025), transparent 40%), var(--card);
  border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px;
}
.card h2 { font-size: 16px; margin: 0 0 12px; font-weight: 600; }
.card h2 .muted { font-weight: 400; }
.grid { display: grid; gap: 14px; }
.stats { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 18px; }
@media (min-width: 700px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { padding: 14px 16px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); position: relative; overflow: hidden; display: block; color: var(--text); }
.stat::after { content: ""; position: absolute; inset: auto -30% -60% auto; width: 140px; height: 140px; border-radius: 50%; background: var(--c, var(--accent)); opacity: .08; filter: blur(4px); }
.stat .k { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .7px; }
.stat .v { font-size: 30px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; color: var(--c, var(--text)); }
a.stat:hover { border-color: var(--line2); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: 12px;
  border: 1px solid var(--line2); background: var(--card2); color: var(--text); font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: transform .15s var(--ease), background .15s, border-color .15s, box-shadow .2s, opacity .15s;
}
.btn:hover { border-color: #3b4c86; background: #1e2a4c; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn svg { width: 18px; height: 18px; }
.btn.primary { background: linear-gradient(135deg, #2ee6d6, #14b8ab); border-color: transparent; color: var(--accent-ink); box-shadow: 0 8px 24px -10px rgba(34, 211, 197, .7); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { background: rgba(239, 68, 68, .12); border-color: rgba(239, 68, 68, .4); color: #fca5a5; }
.btn.danger:hover { background: rgba(239, 68, 68, .2); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn.lg { min-height: 54px; font-size: 17px; border-radius: 15px; }

/* ---------- forms ---------- */
label.f { display: block; }
label.f > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
.inp, select.inp, textarea.inp {
  width: 100%; min-height: 44px; padding: 10px 13px; border-radius: 12px; border: 1px solid var(--line); background: #0d1428;
  transition: border-color .15s, box-shadow .15s; outline: none;
}
.inp:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(34, 211, 197, .18); }
.inp[type=tel], .inp.ltr { direction: ltr; }
[dir=rtl] .inp[type=tel], [dir=rtl] .inp.ltr { text-align: right; }
select.inp { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px; background-size: 5px 5px; background-repeat: no-repeat; padding-inline-end: 34px; }
[dir=rtl] select.inp { background-position: 18px 19px, 13px 19px; }
.fields { display: grid; gap: 14px; }
@media (min-width: 640px) { .fields.two { grid-template-columns: 1fr 1fr; } }
.filters { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 16px; align-items: end; }
@media (min-width: 900px) { .filters { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid rgba(36, 48, 90, .6); cursor: pointer; }
.switch:last-child { border-bottom: 0; }
.switch input { appearance: none; width: 46px; height: 27px; border-radius: 99px; background: #2a3560; position: relative; cursor: pointer; transition: background .2s; flex: none; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 21px; height: 21px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); box-shadow: 0 2px 5px rgba(0, 0, 0, .3); }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(19px); }
[dir=rtl] .switch input:checked::after { transform: translateX(-19px); }
input[type=range] { width: 100%; accent-color: var(--accent); }
.err { color: #fca5a5; font-size: 13px; min-height: 18px; }

/* ---------- badges, chips ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: rgba(139, 149, 184, .14); color: var(--muted); white-space: nowrap; line-height: 1.6; }
.badge.in { background: rgba(34, 197, 94, .14); color: #4ade80; }
.badge.out { background: rgba(245, 158, 11, .14); color: #fbbf24; }
.badge.bad { background: rgba(239, 68, 68, .14); color: #f87171; }
.badge.acc { background: rgba(34, 211, 197, .14); color: var(--accent); }
.badge.blue { background: rgba(59, 130, 246, .16); color: #93c5fd; }
.badge.dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.count { background: var(--bad); color: #fff; min-width: 20px; justify-content: center; padding: 0 6px; font-size: 11px; }
.pulse::before { animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 currentColor; } 70% { box-shadow: 0 0 0 6px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ---------- tables / lists ---------- */
.tablewrap { overflow-x: auto; border-radius: var(--r); border: 1px solid var(--line); background: var(--card); }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
.t th { text-align: start; font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 600; padding: 12px 14px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .02); white-space: nowrap; }
.t td { padding: 12px 14px; border-bottom: 1px solid rgba(36, 48, 90, .55); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr { transition: background .12s; }
.t tbody tr:hover { background: rgba(255, 255, 255, .025); }
.t .acts { text-align: end; white-space: nowrap; }
.t td.nowrap { white-space: nowrap; }
@media (max-width: 699px) {
  .t.cards thead { display: none; }
  .t.cards, .t.cards tbody, .t.cards tr, .t.cards td { display: block; width: 100%; }
  .t.cards tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .t.cards td { padding: 3px 0; border: 0; display: flex; justify-content: space-between; gap: 10px; }
  .t.cards td[data-l]::before { content: attr(data-l); color: var(--muted); font-size: 13px; }
  .t.cards td.main { font-weight: 600; font-size: 15px; }
  .t.cards .acts { justify-content: flex-end; padding-top: 8px; }
}
.list { display: grid; gap: 10px; }
.item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.item .grow { flex: 1; min-width: 0; }
.item .t1 { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .t2 { color: var(--muted); font-size: 13px; }
.avatar { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 700; flex: none; background: linear-gradient(135deg, hsl(var(--h, 190) 70% 45% / .35), hsl(var(--h, 190) 70% 30% / .2)); color: hsl(var(--h, 190) 90% 78%); border: 1px solid hsl(var(--h, 190) 60% 50% / .35); }
.empty { text-align: center; padding: 40px 18px; color: var(--muted); }
.empty svg { width: 46px; height: 46px; opacity: .5; margin-bottom: 8px; }

/* live board */
.people { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.person { position: relative; padding: 14px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); overflow: hidden; }
.person::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--in); }
[dir=rtl] .person::before { inset: 0 0 0 auto; }
.person.long::before { background: var(--warn); }
.person .timer { font-size: 26px; font-weight: 700; margin-top: 8px; font-variant-numeric: tabular-nums; letter-spacing: .5px; }
.person .since { color: var(--muted); font-size: 13px; }

/* ---------- worker home ---------- */
.hello { margin: 8px 0 18px; }
.hello h1 { margin: 0; font-size: 26px; }
.hello p { margin: 2px 0 0; color: var(--muted); }
.status { position: relative; padding: 22px; border-radius: 20px; overflow: hidden; border: 1px solid var(--line); background: var(--card); }
.status.on { border-color: rgba(34, 197, 94, .4); background: radial-gradient(400px 200px at 100% 0, rgba(34, 197, 94, .16), transparent), var(--card); }
.status .lbl { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.status .big { font-size: 46px; font-weight: 700; letter-spacing: 1px; margin: 6px 0 0; font-variant-numeric: tabular-nums; line-height: 1.1; }
.status .meta { color: var(--muted); margin-top: 4px; }
.scanbtn {
  position: relative; display: grid; place-items: center; gap: 10px; width: 100%; margin: 20px 0; padding: 30px 20px; border-radius: 24px; cursor: pointer;
  border: 1px solid rgba(34, 211, 197, .5); color: var(--text); font-size: 20px; font-weight: 700;
  background: radial-gradient(300px 160px at 50% 0, rgba(34, 211, 197, .28), transparent), linear-gradient(180deg, #16243f, #111a33);
  box-shadow: var(--glow); transition: transform .2s var(--ease), box-shadow .2s;
}
.scanbtn:active { transform: scale(.98); }
.scanbtn .ico { width: 76px; height: 76px; border-radius: 22px; display: grid; place-items: center; background: linear-gradient(135deg, #2ee6d6, #14b8ab); color: var(--accent-ink); box-shadow: 0 10px 30px -8px rgba(34, 211, 197, .8); }
.scanbtn .ico svg { width: 40px; height: 40px; }
.scanbtn small { font-size: 13px; font-weight: 400; color: var(--muted); }
.scanbtn::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; border: 2px solid rgba(34, 211, 197, .5); animation: ring 2.4s var(--ease) infinite; pointer-events: none; }
@keyframes ring { 0% { opacity: .8; transform: scale(1); } 100% { opacity: 0; transform: scale(1.06); } }
.week { display: flex; justify-content: space-between; gap: 6px; margin-top: 12px; }
.week .d { flex: 1; text-align: center; }
.week .bar { height: 64px; border-radius: 8px; background: rgba(255, 255, 255, .04); position: relative; overflow: hidden; }
.week .bar i { position: absolute; inset: auto 0 0 0; background: linear-gradient(180deg, var(--accent), #14857c); border-radius: 8px 8px 0 0; transition: height .6s var(--ease); }
.week .d.today .bar { outline: 1px solid rgba(34, 211, 197, .5); }
.week .dl { font-size: 11px; color: var(--muted); margin-top: 5px; }
.week .dh { font-size: 11px; font-weight: 600; }

/* ---------- scanner ---------- */
.scanner { position: fixed; inset: 0; z-index: 50; background: #000; display: flex; flex-direction: column; }
.scanner video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scanner .shade { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.scanner .frame { width: min(72vw, 300px); aspect-ratio: 1; border-radius: 26px; box-shadow: 0 0 0 100vmax rgba(3, 6, 15, .62); position: relative; }
.scanner .frame::before, .scanner .frame::after { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 3px solid var(--accent); -webkit-mask: linear-gradient(#000 0 0) top/100% 22% no-repeat, linear-gradient(#000 0 0) bottom/100% 22% no-repeat; mask: linear-gradient(#000 0 0) top/100% 22% no-repeat, linear-gradient(#000 0 0) bottom/100% 22% no-repeat; }
.scanner .frame::after { -webkit-mask: linear-gradient(#000 0 0) left/22% 100% no-repeat, linear-gradient(#000 0 0) right/22% 100% no-repeat; mask: linear-gradient(#000 0 0) left/22% 100% no-repeat, linear-gradient(#000 0 0) right/22% 100% no-repeat; }
.scanner .laser { position: absolute; inset-inline: 8%; height: 2px; top: 10%; background: linear-gradient(90deg, transparent, var(--accent), transparent); box-shadow: 0 0 12px var(--accent); animation: laser 2s ease-in-out infinite alternate; }
@keyframes laser { to { top: 90%; } }
.scanner .bar { position: relative; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 14px 16px; padding-top: max(14px, env(safe-area-inset-top)); background: linear-gradient(180deg, rgba(0, 0, 0, .6), transparent); }
.scanner .hint { position: absolute; z-index: 2; bottom: 0; inset-inline: 0; padding: 22px 20px calc(30px + env(safe-area-inset-bottom)); text-align: center; background: linear-gradient(0deg, rgba(0, 0, 0, .75), transparent); }
.scanner .hint b { display: block; font-size: 18px; }
.scanner .hint span { color: #b9c2e0; font-size: 14px; }

/* ---------- punch result ---------- */
.result { min-height: calc(100vh - 140px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px 10px; }
.result h1 { font-size: 30px; margin: 22px 0 6px; }
.result .when { font-size: 54px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: 1px; line-height: 1; }
.result p { color: var(--muted); max-width: 340px; margin: 8px auto 0; }
.result .actions { margin-top: 30px; width: 100%; max-width: 340px; display: grid; gap: 10px; }
.mark { width: 128px; height: 128px; border-radius: 50%; display: grid; place-items: center; position: relative; }
.mark svg { width: 128px; height: 128px; }
.mark circle { fill: none; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 380; stroke-dashoffset: 380; animation: draw .7s var(--ease) forwards; }
.mark path { fill: none; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 100; stroke-dashoffset: 100; animation: draw .45s .45s var(--ease) forwards; }
.mark.in { color: var(--in); } .mark.out { color: var(--out); } .mark.bad { color: var(--bad); } .mark.wait { color: var(--accent); }
.mark circle, .mark path { stroke: currentColor; }
.mark::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: currentColor; opacity: .12; transform: scale(.4); animation: bloom .8s .2s var(--ease) forwards; }
.mark.bad { animation: shake .45s .7s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes bloom { to { transform: scale(1.25); opacity: 0; } }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.spin { width: 64px; height: 64px; border-radius: 50%; border: 4px solid rgba(34, 211, 197, .2); border-top-color: var(--accent); animation: rot .9s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }
.radar { position: relative; width: 140px; height: 140px; }
.radar i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; animation: radar 2.2s var(--ease) infinite; }
.radar i:nth-child(2) { animation-delay: .7s; } .radar i:nth-child(3) { animation-delay: 1.4s; }
.radar svg { position: absolute; inset: 0; margin: auto; width: 44px; height: 44px; color: var(--accent); }
@keyframes radar { 0% { transform: scale(.2); opacity: .9; } 100% { transform: scale(1); opacity: 0; } }

/* ---------- login ---------- */
.login { min-height: calc(100vh - 59px); display: grid; place-items: center; padding: 24px 16px; }
.login .card { width: 100%; max-width: 400px; padding: 28px 24px; }
.login .logo { display: grid; place-items: center; margin-bottom: 14px; }
.login .logo svg { width: 64px; height: 64px; filter: drop-shadow(0 10px 24px rgba(34, 211, 197, .35)); }
.login h1 { text-align: center; margin: 0; font-size: 24px; }
.login .sub { text-align: center; color: var(--muted); margin: 4px 0 22px; }

/* ---------- modal, toast ---------- */
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(3, 6, 15, .66); backdrop-filter: blur(3px); display: grid; place-items: end center; animation: fade .18s; }
@media (min-width: 640px) { .overlay { place-items: center; } }
.modal { width: 100%; max-width: 520px; max-height: 92vh; overflow: auto; background: var(--card); border: 1px solid var(--line2); border-radius: 20px 20px 0 0; padding: 22px 20px calc(20px + env(safe-area-inset-bottom)); box-shadow: 0 -20px 60px -20px rgba(0, 0, 0, .7); animation: up .25s var(--ease); }
@media (min-width: 640px) { .modal { border-radius: 20px; animation: pop .2s var(--ease); } }
.modal.wide { max-width: 760px; }
.modal h3 { margin: 0 0 14px; font-size: 19px; }
.modal .foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@keyframes pop { from { transform: scale(.96); opacity: 0; } }
.toasts { position: fixed; z-index: 80; inset-inline: 0; top: 70px; display: grid; justify-items: center; gap: 8px; pointer-events: none; padding: 0 14px; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 13px; background: #1b2546; border: 1px solid var(--line2); box-shadow: var(--shadow); font-weight: 500; animation: pop .2s var(--ease); max-width: 420px; }
.toast.ok { border-color: rgba(34, 197, 94, .5); } .toast.bad { border-color: rgba(239, 68, 68, .6); }
.toast svg { width: 18px; height: 18px; flex: none; }
.toast.ok svg { color: var(--in); } .toast.bad svg { color: var(--bad); }

/* skeleton */
.sk { border-radius: 10px; background: linear-gradient(90deg, rgba(255, 255, 255, .04) 25%, rgba(255, 255, 255, .08) 37%, rgba(255, 255, 255, .04) 63%); background-size: 400% 100%; animation: sk 1.3s ease infinite; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* maps */
.map { height: 320px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: #0d1428; z-index: 0; }
.map.tall { height: 380px; }
.leaflet-container { font-family: inherit; background: #0d1428; }
.leaflet-tile-pane { filter: saturate(.85) brightness(.97); }
.leaflet-control-attribution { background: rgba(11, 16, 32, .7) !important; color: var(--muted) !important; }
.leaflet-control-attribution a { color: var(--muted) !important; }
.leaflet-bar a { background: var(--card) !important; color: var(--text) !important; border-color: var(--line) !important; }

/* QR poster */
.poster { background: #fff; color: #0b1020; border-radius: 22px; padding: 34px 28px; text-align: center; max-width: 520px; margin: 0 auto; box-shadow: var(--shadow); }
.poster .pbrand { display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 800; font-size: 26px; }
.poster .pbrand svg { width: 40px; height: 40px; }
.poster .qr { width: min(100%, 380px); margin: 20px auto 10px; }
.poster .qr svg { width: 100%; height: auto; display: block; }
.poster .call { font-size: 24px; font-weight: 700; margin-top: 8px; }
.poster .langs { display: grid; gap: 2px; color: #3b4566; margin-top: 8px; font-size: 17px; }
.poster .foot { margin-top: 18px; font-size: 12px; color: #7a839f; }

/* audit */
details.diff summary { cursor: pointer; color: var(--accent); font-size: 13px; }
details.diff pre { white-space: pre-wrap; word-break: break-word; font-size: 12px; background: #0d1428; border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin: 8px 0 0; direction: ltr; text-align: left; }

.fadein { animation: fadein .25s var(--ease); }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } }

@media print {
  body { background: #fff !important; }
  .top, .side, .tabbar, .noprint, .toasts { display: none !important; }
  .dash { display: block; }
  .dash main { padding: 0 !important; }
  .poster { box-shadow: none; max-width: none; padding: 10mm; }
  .poster .qr { width: 130mm; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
/* inline icons inside text */
p > svg, .t2 > svg, .small > svg { width: 1.05em; height: 1.05em; vertical-align: -.15em; }

.inp.code { font-size: 28px; letter-spacing: 12px; text-align: center !important; direction: ltr; font-variant-numeric: tabular-nums; }
.avatar svg { width: 20px; height: 20px; }
