/* WEDA Scan v2 — Faza 47. Totul sub `.ws2`, ca să nu atingă nimic din portal. */

.ws2 {
	--bg: #0e0e10;
	--panel: #17171c;
	--panel2: #1f1f26;
	--line: #2b2b34;
	--text: #f2f2f5;
	--mute: #9a9aa8;
	--violet: #7c3aed;
	--orange: #ff7a00;
	--ok: #16a34a;
	--bad: #dc2626;
	--warn: #d97706;
	--r: 14px;
	color: var(--text);
	background: var(--bg);
	font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	font-size: 16px;
	line-height: 1.4;
	min-height: 100vh;
	min-height: 100dvh;
	-webkit-tap-highlight-color: transparent;
}
.ws2 *, .ws2 *::before, .ws2 *::after { box-sizing: border-box; }
.ws2 [hidden] { display: none !important; }
body.weda-app-fullscreen:has(.ws2) { background: #0e0e10; margin: 0; }

.ws2 a { color: inherit; }
.ws2 svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- cadrul ---------- */

.ws2-app { display: flex; flex-direction: column; padding-bottom: calc(72px + env(safe-area-inset-bottom)); }

.ws2-top {
	position: sticky; top: 0; z-index: 20;
	background: rgba(14, 14, 16, .94);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--line);
	padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
}
.ws2-top-row { display: flex; align-items: center; gap: 8px; }
.ws2-brand { font-weight: 500; letter-spacing: .02em; margin-right: auto; }
.ws2-brand b { color: var(--orange); font-weight: 700; }
.ws2-top-ev { margin-top: 6px; font-weight: 700; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws2-top-ev a { text-decoration: none; }
.ws2-top-ev span[aria-hidden] { color: var(--mute); font-size: 13px; }

.ws2-chip { font-size: 12px; padding: 3px 9px; border-radius: 99px; background: var(--panel2); color: var(--mute); white-space: nowrap; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; }
.ws2-badge { font-size: 11px; font-weight: 700; letter-spacing: .06em; padding: 3px 8px; border-radius: 6px; }
.ws2-badge--sb { background: var(--warn); color: #111; }
.ws2-m-sandbox .ws2-top { border-bottom-color: var(--warn); }

.ws2-iconbtn { background: none; border: 0; color: var(--text); padding: 6px; border-radius: 10px; cursor: pointer; }
.ws2-iconbtn.is-on { background: var(--panel2); color: var(--orange); }

/* Tema site-ului pune pe orice `<details>` padding, ramă și colțuri rotunjite
   (scrise pentru acordeoanele ei) — de acolo venea cadrul din jurul celor trei
   puncte. Se anulează aici, ca la meniul de cont din portal (`weda-app.css`). */
.ws2 .ws2-menu { position: relative; padding: 0; margin: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.ws2 .ws2-menu > summary {
	list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
	width: 40px; height: 40px; margin: -6px -10px -6px 0; padding: 0;
	border: 0; border-radius: 0; background: none; box-shadow: none; outline: none;
	color: var(--text);
}
.ws2 .ws2-menu > summary::-webkit-details-marker { display: none; }
.ws2 .ws2-menu > summary::marker { content: ""; }
.ws2 .ws2-menu > summary:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; border-radius: 8px; }
.ws2 .ws2-menu[open] > summary { color: var(--orange); }
/* Punctele: cât litera din bara de sus (~16 px înălțime totală), groase. */
.ws2 .ws2-menu > summary svg { width: 22px; height: 22px; }
.ws2 .ws2-menu svg circle { fill: currentColor; stroke: none; }
.ws2-menu-pop {
	position: absolute; right: 0; top: 40px; min-width: 240px;
	background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
	padding: 6px; box-shadow: 0 12px 30px rgba(0,0,0,.5);
}
.ws2-menu-pop a { display: block; padding: 11px 12px; border-radius: 10px; text-decoration: none; }
.ws2-menu-pop a:hover, .ws2-menu-pop a.is-on { background: var(--panel2); }
.ws2-menu-pop a.is-on { color: var(--orange); }
.ws2-menu-head { padding: 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.ws2-menu-head span { display: block; color: var(--mute); font-size: 13px; }

.ws2-main { flex: 1; width: 100%; max-width: 640px; margin: 0 auto; }
.ws2-pad { padding: 16px; }
.ws2-h { font-size: 18px; margin: 18px 0 10px; }
.ws2-h small { color: var(--mute); font-weight: 400; }
.ws2-muted { color: var(--mute); font-size: 13px; }
.ws2-empty { color: var(--mute); padding: 18px 0; }
.ws2-foot { margin-top: 18px; }

.ws2-nav {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
	display: flex; justify-content: space-around;
	background: rgba(23, 23, 28, .97); border-top: 1px solid var(--line);
	padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.ws2-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; text-decoration: none; color: var(--mute); font-size: 11px; border-radius: 10px; }
.ws2-nav a.is-on { color: var(--orange); }

.ws2-notice { margin: 12px 16px 0; padding: 12px 14px; border-radius: 12px; font-size: 14px; }
.ws2-notice--ok { background: rgba(22,163,74,.15); color: #86efac; }
.ws2-notice--err { background: rgba(220,38,38,.15); color: #fca5a5; }

/* ---------- butoane și formulare ---------- */

.ws2-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.ws2-btn--main { background: var(--orange); color: #111; width: 100%; }
.ws2-btn--ghost { background: transparent; border-color: var(--line); color: var(--text); }
.ws2-btn--danger { background: transparent; border-color: rgba(220,38,38,.5); color: #fca5a5; min-height: 38px; padding: 0 12px; font-size: 14px; }
.ws2-btn--danger:active { background: var(--bad); color: #fff; }

.ws2-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: 14px; }
.ws2-fold summary { cursor: pointer; font-weight: 600; list-style: none; }
.ws2-fold summary::-webkit-details-marker { display: none; }
.ws2-fold summary::after { content: "+"; float: right; color: var(--orange); font-weight: 700; }
.ws2-fold[open] summary::after { content: "–"; }
.ws2-fold[open] summary { margin-bottom: 12px; }

.ws2-form { display: grid; gap: 12px; }
.ws2-form label { display: grid; gap: 6px; font-size: 13px; color: var(--mute); }
.ws2-form input[type=text], .ws2-form input[type=email], .ws2-form input[type=date], .ws2-form select {
	width: 100%; min-height: 46px; padding: 0 12px; border-radius: 10px;
	border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; font-size: 16px;
}
.ws2-checks { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 0; display: grid; gap: 8px; max-height: 220px; overflow: auto; }
.ws2-checks legend { font-size: 13px; color: var(--mute); padding: 0 4px; }
.ws2-checks label { display: flex; gap: 10px; align-items: center; color: var(--text); font-size: 15px; }
.ws2-err { color: #fca5a5; font-size: 14px; margin: 0; }

.ws2-seg { display: flex; background: var(--panel); border-radius: 12px; padding: 4px; margin-bottom: 12px; }
.ws2-seg button { flex: 1; border: 0; background: none; color: var(--mute); font: inherit; padding: 9px; border-radius: 9px; cursor: pointer; }
.ws2-seg button.is-on { background: var(--panel2); color: var(--text); }

/* ---------- evenimente ---------- */

.ws2-evlist { display: grid; gap: 10px; }
.ws2-evrow { display: grid; gap: 4px; padding: 16px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); text-decoration: none; }
.ws2-evrow strong { font-size: 17px; }
.ws2-evrow span { color: var(--mute); font-size: 14px; }
.ws2-evrow.is-on { border-color: var(--orange); }

/* ---------- camera ---------- */

.ws2-scan { padding: 12px 16px 0; }
.ws2-cam { position: relative; width: 100%; aspect-ratio: 1 / 1; max-height: 58vh; margin: 0 auto; background: #000; border-radius: 20px; overflow: hidden; }
.ws2-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ws2-aim { position: absolute; inset: 16%; pointer-events: none; }
.ws2-aim i { position: absolute; width: 34px; height: 34px; border: 4px solid var(--orange); }
.ws2-aim i:nth-child(1) { left: 0; top: 0; border-right: 0; border-bottom: 0; border-radius: 10px 0 0 0; }
.ws2-aim i:nth-child(2) { right: 0; top: 0; border-left: 0; border-bottom: 0; border-radius: 0 10px 0 0; }
.ws2-aim i:nth-child(3) { left: 0; bottom: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 10px; }
.ws2-aim i:nth-child(4) { right: 0; bottom: 0; border-left: 0; border-top: 0; border-radius: 0 0 10px 0; }
.ws2-start { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; border: 0; background: rgba(14,14,16,.82); color: var(--text); font: inherit; font-weight: 600; font-size: 17px; cursor: pointer; }
.ws2-start svg { width: 44px; height: 44px; color: var(--orange); }
.ws2-camerr { position: absolute; left: 12px; right: 12px; bottom: 12px; margin: 0; padding: 10px 12px; border-radius: 10px; background: rgba(220,38,38,.9); color: #fff; font-size: 14px; }
.ws2-camtools { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; gap: 8px; }
.ws2-tool { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.ws2-tool:not(.is-on) { opacity: .55; }
.ws2-tool.is-on { color: var(--orange); }

.ws2-offline { margin-top: 10px; padding: 12px; border-radius: 12px; background: var(--bad); color: #fff; font-weight: 700; text-align: center; }

.ws2-counts { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 8px; margin-top: 12px; }
.ws2-count { background: var(--panel); border-radius: 12px; padding: 10px; text-align: center; }
.ws2-count b { display: block; font-size: 24px; line-height: 1.1; }
.ws2-count b small { font-size: 14px; color: var(--mute); font-weight: 500; }
.ws2-count > span { font-size: 12px; color: var(--mute); }
.ws2-count--ok b { color: #4ade80; }
.ws2-count--bad b { color: #f87171; }

.ws2-shiftoff { margin-top: 12px; padding: 16px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--warn); text-align: center; }

/* ---------- verdictul ---------- */

.ws2-verdict {
	position: fixed; inset: 0; z-index: 100;
	display: flex; flex-direction: column;
	text-align: center; color: #fff; cursor: default;
	animation: ws2-in .12s ease-out;
}
.ws2-verdict--ok { background: var(--ok); }
.ws2-verdict--bad { background: var(--bad); }
.ws2-verdict--warn { background: var(--warn); color: #111; }

/* Etajul de sus: TIPUL BILETULUI. Fundal propriu, ca să nu se citească drept
   o continuare a verdictului de dedesubt. */
.ws2-v-type {
	flex: 0 0 auto;
	padding: calc(18px + env(safe-area-inset-top)) 20px 18px;
	background: rgba(0, 0, 0, .28);
	border-bottom: 2px solid rgba(255, 255, 255, .35);
	font-size: clamp(30px, 10vw, 64px);
	font-weight: 800;
	line-height: 1.05;
	letter-spacing: .03em;
	text-transform: uppercase;
	overflow-wrap: anywhere;
}
.ws2-verdict--warn .ws2-v-type { background: rgba(0, 0, 0, .12); border-bottom-color: rgba(0, 0, 0, .25); }

/* Etajul din mijloc: verdictul și omul. */
.ws2-v-body { flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; min-height: 0; }
.ws2-v-ic { width: 96px; height: 96px; border-radius: 50%; border: 6px solid currentColor; margin-bottom: 18px; position: relative; flex: 0 0 auto; }
.ws2-verdict--ok .ws2-v-ic::after { content: ""; position: absolute; left: 26px; top: 14px; width: 28px; height: 48px; border: solid currentColor; border-width: 0 8px 8px 0; transform: rotate(45deg); }
.ws2-verdict--bad .ws2-v-ic::before, .ws2-verdict--bad .ws2-v-ic::after,
.ws2-verdict--warn .ws2-v-ic::before, .ws2-verdict--warn .ws2-v-ic::after { content: ""; position: absolute; left: 39px; top: 16px; width: 7px; height: 52px; background: currentColor; border-radius: 4px; }
.ws2-verdict--bad .ws2-v-ic::before, .ws2-verdict--warn .ws2-v-ic::before { transform: rotate(45deg); }
.ws2-verdict--bad .ws2-v-ic::after, .ws2-verdict--warn .ws2-v-ic::after { transform: rotate(-45deg); }
.ws2-v-title { font-size: clamp(30px, 9vw, 48px); font-weight: 800; letter-spacing: .02em; line-height: 1.05; }
.ws2-v-sub { font-size: 22px; font-weight: 600; margin-top: 12px; }
.ws2-v-meta { font-size: 16px; opacity: .85; margin-top: 8px; }

/* Etajul de jos: butonul, iar sub el bara de timp. */
.ws2-v-foot { flex: 0 0 auto; padding: 0 0 env(safe-area-inset-bottom); }
.ws2-v-next {
	display: block; width: calc(100% - 40px); margin: 0 20px 16px;
	min-height: 56px; border-radius: 14px;
	border: 2px solid currentColor; background: rgba(0, 0, 0, .18); color: inherit;
	font: inherit; font-size: 19px; font-weight: 700; cursor: pointer;
}
.ws2-verdict--warn .ws2-v-next { background: rgba(255, 255, 255, .25); }

/* Bara: TOATĂ lățimea ecranului, oricare ar fi el, și se golește de la
   dreapta spre stânga. `scaleX` lucrează în proporții, nu în pixeli — pe un
   telefon mic și pe o tabletă se scurge la fel, de la 100% la 0. */
.ws2-v-bar { height: 10px; width: 100%; background: rgba(0, 0, 0, .25); overflow: hidden; }
.ws2-v-bar i { display: block; height: 100%; width: 100%; background: #fff; transform-origin: left center; transform: scaleX(1); }
.ws2-v-bar.is-run i { animation: ws2-drain var(--ws2-ok-ms, 5000ms) linear forwards; }
@keyframes ws2-drain { from { transform: scaleX(1); } to { transform: scaleX(0); } }

@keyframes ws2-in { from { opacity: .4; transform: scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- jurnal ---------- */

.ws2-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ws2-log-row { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: start; padding: 10px 12px; background: var(--panel); border-radius: 12px; border-left: 4px solid var(--line); }
.ws2-o-ok { border-left-color: var(--ok); }
.ws2-o-bad { border-left-color: var(--bad); }
.ws2-log-at { font-variant-numeric: tabular-nums; color: var(--mute); font-size: 13px; padding-top: 2px; }
.ws2-log-mid { display: grid; gap: 2px; min-width: 0; }
.ws2-log-mid span { color: var(--mute); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws2-log-who { grid-column: 2; color: var(--mute); font-size: 12px; }
.ws2-log-empty { color: var(--mute); padding: 16px 0; }

/* ---------- live ---------- */

.ws2-live h3 { font-size: 14px; color: var(--mute); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin: 22px 0 8px; }
.ws2-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ws2-kpi { background: var(--panel); border-radius: var(--r); padding: 12px 14px; }
.ws2-kpi b { display: block; font-size: 26px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ws2-kpi b small { font-size: 16px; color: var(--mute); font-weight: 500; }
.ws2-kpi > span { font-size: 12px; color: var(--mute); }
.ws2-kpi--big { grid-column: 1 / -1; }
.ws2-kpi--big b { font-size: 40px; }
.ws2-kpi--big em { float: right; font-style: normal; font-weight: 700; color: var(--orange); margin-top: -26px; }
.ws2-bar { height: 10px; background: var(--panel2); border-radius: 6px; overflow: hidden; margin-top: 10px; }
.ws2-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--violet), var(--orange)); border-radius: 6px; transition: width .4s; }

.ws2-spark { display: flex; align-items: flex-end; gap: 3px; height: 110px; padding: 8px 8px 20px; background: var(--panel); border-radius: var(--r); }
.ws2-spark-col { flex: 1; height: 100%; display: flex; align-items: flex-end; position: relative; }
.ws2-spark-col i { display: block; width: 100%; min-height: 2px; background: var(--violet); border-radius: 3px 3px 0 0; }
.ws2-spark-col:last-child i { background: var(--orange); }
.ws2-spark-col span { position: absolute; bottom: -18px; left: 0; font-size: 10px; color: var(--mute); white-space: nowrap; }

.ws2-list { list-style: none; margin: 0; padding: 0; background: var(--panel); border-radius: var(--r); }
.ws2-list li { display: flex; justify-content: space-between; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.ws2-list li:last-child { border-bottom: 0; }
.ws2-list li.is-off { opacity: .55; }
.ws2-list b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ws2-list em { font-style: normal; }
.ws2-list em.ok, .ws2-dev-n .ok { color: #4ade80; }
.ws2-list em.bad, .ws2-dev-n .bad { color: #f87171; }
.ws2-clock { text-align: right; }

/* ---------- dispozitive și echipă ---------- */

.ws2-devs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ws2-dev { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--panel); border-radius: var(--r); }
.ws2-dev.is-off { opacity: .5; }
.ws2-dev-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.ws2-dev-main span { font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.ws2-dev-n { display: grid; text-align: right; font-variant-numeric: tabular-nums; }
.ws2-dev form { margin: 0; }

.ws2-codecard { text-align: center; }
.ws2-qr { width: 220px; height: 220px; margin: 0 auto 12px; background: #fff; border-radius: 12px; padding: 8px; }
.ws2-qr svg { width: 100%; height: 100%; stroke: none; }
.ws2-code { font-size: 34px; font-weight: 800; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.ws2-ttl { color: var(--orange); font-weight: 600; margin: 6px 0 0; }
.ws2-codecard.is-expired .ws2-qr, .ws2-codecard.is-expired .ws2-code { opacity: .2; }

/* ---------- poarta ---------- */

.ws2-gatewrap { min-height: 100vh; min-height: 100dvh; }
.ws2-gate { max-width: 440px; margin: 0 auto; padding: calc(28px + env(safe-area-inset-top)) 16px 32px; }
.ws2-gate-brand { font-size: 26px; text-align: center; margin-bottom: 22px; }
.ws2-gate-brand b { color: var(--orange); }
.ws2-codeform input[name=code] { text-align: center; font-size: 24px !important; letter-spacing: .18em; text-transform: uppercase; }
.ws2-or { display: flex; align-items: center; gap: 12px; color: var(--mute); font-size: 13px; margin: 18px 0; }
.ws2-or::before, .ws2-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.ws2-closed { display: grid; gap: 4px; padding: 14px 16px; border-radius: var(--r); background: rgba(217,119,6,.15); border: 1px solid var(--warn); margin-bottom: 14px; }
.ws2-closed span { color: var(--mute); font-size: 14px; }
.ws2-codeapp { min-height: 100vh; min-height: 100dvh; padding-bottom: calc(72px + env(safe-area-inset-bottom)); }

.ws2-fail { padding: 24px; text-align: center; }

/* Poarta: codul de acces citit cu camera (01.10.2026) */
.ws2-btn--wide { width: 100%; }
.ws2-err--gate { margin: -4px 0 14px; text-align: center; }
.ws2-gatecam { display: grid; gap: 12px; padding: 12px; }
.ws2-gatecam .ws2-cam { max-height: 62vh; }
