/* =====================================================================
   v47: "HUD" look (Ádám chose direction A on 2026-11-13, light = C).
   Loaded AFTER style.css. Every rule is scoped with :root[data-theme] (the theme script always
   sets it), so it wins over the older rules of the same component.
   Dark: deep navy, glowing cyan lines, rotating rings. Light: pale grid, the same lines in teal.
   ===================================================================== */
:root[data-theme] {
  --field-radius: 3px;
  --font-ui: "Rajdhani", "Segoe UI", system-ui, sans-serif;
  --font-tech: "Oxanium", "Rajdhani", "Segoe UI", system-ui, sans-serif;
  --radius: 4px;
  --cut: 12px;                      /* the cut corner of panels */
  --shadow: none;
}
:root[data-theme="light"] {
  --bg: #f5f1fc;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-solid: #ffffff;
  --ink: #1d1030;
  --head: #150a26;
  --muted: #5f4b7d;
  --line: rgba(107, 47, 196, 0.30);
  --line-soft: rgba(107, 47, 196, 0.14);
  --accent: #6b2fc4;
  --accent-2: #8a4fe0;
  --accent-ink: #ffffff;
  --accent-soft: rgba(107, 47, 196, 0.10);
  --glow: 0 0 0 transparent;
  --hot: #c2412b;  --hot-soft: #fff1ed;
  --ok: #0f8a5f;   --ok-soft: #e3f7ef;
  --amber: #a15c00; --amber-soft: #fff4dc;
  --field-bg: #ffffff;
  --grid: rgba(107, 47, 196, 0.07);
}
:root[data-theme="dark"] {
  --bg: #0a0614;
  --panel: rgba(38, 16, 68, 0.45);
  --panel-solid: #1a0d2e;
  --ink: #efe6ff;
  --head: #ffffff;
  --muted: #b39fd6;
  --line: rgba(176, 124, 255, 0.32);
  --line-soft: rgba(176, 124, 255, 0.15);
  --accent: #b07cff;
  --accent-2: #c9a3ff;
  --accent-ink: #12061f;
  --accent-soft: rgba(176, 124, 255, 0.12);
  --glow: 0 0 14px rgba(176, 124, 255, 0.5);
  --hot: #ff9a80;  --hot-soft: rgba(90, 24, 16, 0.55);
  --ok: #4dffc3;   --ok-soft: rgba(10, 60, 44, 0.55);
  --amber: #ffc04d; --amber-soft: rgba(70, 48, 10, 0.55);
  --field-bg: rgba(3, 16, 26, 0.85);
  --grid: rgba(176, 124, 255, 0.05);
}

/* ---------- ground ---------- */
:root[data-theme] body {
  font-family: var(--font-ui); font-size: 16px; color: var(--ink);
  background-color: var(--bg);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px),
                    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 26px 26px; background-attachment: fixed;
}
:root[data-theme="dark"] body {
  background-image: radial-gradient(120% 80% at 70% -10%, rgba(80, 30, 140, 0.55), transparent 60%),
                    linear-gradient(var(--grid) 1px, transparent 1px),
                    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: auto, 26px 26px, 26px 26px;
}
:root[data-theme] h1, :root[data-theme] h2, :root[data-theme] h3,
:root[data-theme] .card b, :root[data-theme] .widget b, :root[data-theme] th,
:root[data-theme] button, :root[data-theme] .badge, :root[data-theme] .brand b {
  font-family: var(--font-tech);
}
:root[data-theme] a { color: var(--accent); }
:root[data-theme] ::selection { background: var(--accent); color: var(--accent-ink); }

/* ---------- panels: thin line, cut corner, translucent ---------- */
:root[data-theme] .box, :root[data-theme] .card, :root[data-theme] .widget, :root[data-theme] .auth-card,
:root[data-theme] .legal, :root[data-theme] .tip, :root[data-theme] .feat, :root[data-theme] .hello,
:root[data-theme] .daily-msg {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: none;
  color: var(--ink);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
:root[data-theme] .box { position: relative; }
:root[data-theme] .box > h2:first-child, :root[data-theme] .box h2, :root[data-theme] .box-head h2 {
  font-size: 13px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent);
}
:root[data-theme] .topbar h1 {
  font-weight: 600; font-size: 30px; letter-spacing: 0.01em; color: var(--head); text-shadow: var(--glow);
}
:root[data-theme] .address, :root[data-theme] .hint, :root[data-theme] small.sub { color: var(--muted); }

/* ---------- sidebar ---------- */
:root[data-theme] .sidebar {
  background: var(--panel); border-right: 1px solid var(--line);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
:root[data-theme] .brand b { letter-spacing: 0.22em; text-transform: uppercase; font-size: 15px; color: var(--head); }
:root[data-theme] .brand small { font-family: var(--font-tech); letter-spacing: 0.08em; color: var(--muted); }
:root[data-theme] .brand-icon.monogram {
  background: transparent; color: var(--accent); border: 1px solid var(--accent); border-radius: 50%;
  box-shadow: var(--glow), inset 0 0 12px var(--accent-soft); font-family: var(--font-tech);
}
:root[data-theme] .sidebar nav a {
  font-family: var(--font-tech); font-size: 14px; letter-spacing: 0.06em; border-radius: 2px;
  color: var(--muted); border-left: 2px solid transparent; padding-left: 12px;
}
:root[data-theme] .sidebar nav a:hover { background: var(--accent-soft); color: var(--ink); }
:root[data-theme] .sidebar nav a.active {
  background: linear-gradient(90deg, var(--accent-soft), transparent); color: var(--accent);
  border-left-color: var(--accent); box-shadow: none; text-shadow: var(--glow);
}
:root[data-theme] .nav-ic { width: 20px; height: 20px; flex: none; display: inline-grid; place-items: center; }
:root[data-theme] .nav-ic svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round; }
:root[data-theme] .nav-count { background: var(--hot); color: var(--accent-ink); font-family: var(--font-tech); border-radius: 2px; }
:root[data-theme="light"] .nav-count { color: #fff; }
:root[data-theme] .user-box { border-top: 1px solid var(--line); }
:root[data-theme] .user-box a:hover, :root[data-theme] .user-box a.active { background: var(--accent-soft); }

/* ---------- top widgets ---------- */
:root[data-theme] .widget small { font-family: var(--font-tech); letter-spacing: 0.12em; text-transform: uppercase;
  font-size: 10px; color: var(--muted); }
:root[data-theme] .widget b { color: var(--head); font-weight: 600; }
:root[data-theme] .theme-btn, :root[data-theme] .menu-toggle {
  background: var(--panel); border: 1px solid var(--line); border-radius: 50%; box-shadow: none; color: var(--accent);
}

/* ---------- cards ---------- */
:root[data-theme] .card { transition: border-color 0.2s; }
:root[data-theme] .card:hover { transform: none; border-color: var(--accent); }
:root[data-theme] .card small { font-family: var(--font-tech); text-transform: uppercase; letter-spacing: 0.12em;
  font-size: 11px; color: var(--muted); }
:root[data-theme] .card b { font-weight: 600; color: var(--head); text-shadow: var(--glow); }
:root[data-theme] .card .ic { background: transparent; border: 1px solid var(--line); border-radius: 50%; }
:root[data-theme] .card.alert { background: var(--hot-soft); border-color: var(--hot); }
:root[data-theme] .card.alert b, :root[data-theme] .card.alert small { color: var(--hot); text-shadow: none; }
:root[data-theme] .card.alert .ic { background: transparent; border-color: var(--hot); }

/* ---------- forms and buttons ---------- */
:root[data-theme] label { font-family: var(--font-tech); letter-spacing: 0.06em; color: var(--muted); }
:root[data-theme] input:not([type=checkbox]):not([type=radio]), :root[data-theme] select, :root[data-theme] textarea {
  background-color: var(--field-bg); color: var(--ink); border: 1px solid var(--line); border-radius: 3px;
  font-family: var(--font-ui); font-size: 16px;
}
:root[data-theme] input:focus, :root[data-theme] select:focus, :root[data-theme] textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--glow);
}
:root[data-theme] input[type=checkbox], :root[data-theme] input[type=radio] { accent-color: var(--accent); }
:root[data-theme] button {
  background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); border-radius: 2px;
  font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; font-size: 13px;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}
:root[data-theme] button:hover { transform: none; box-shadow: var(--glow); filter: brightness(1.08); }
:root[data-theme] button.small, :root[data-theme] .logout, :root[data-theme] .icon-btn, :root[data-theme] .chip-x {
  background: transparent; color: var(--accent); border: 1px solid var(--line);
}
:root[data-theme] button.small:hover { background: var(--accent-soft); }
:root[data-theme] .logout { border: 0; clip-path: none; text-transform: none; letter-spacing: 0.04em; color: var(--muted); }
:root[data-theme] .icon-btn { clip-path: none; border-radius: 50%; }
:root[data-theme] .icon-btn.danger, :root[data-theme] .chip-x { color: var(--hot); border-color: var(--hot); background: transparent; }
:root[data-theme] button.danger { background: var(--hot); border-color: var(--hot); color: #fff; }
:root[data-theme] .menu-toggle, :root[data-theme] .theme-btn { clip-path: none; text-transform: none; letter-spacing: 0; }

/* ---------- tables ---------- */
:root[data-theme] th { color: var(--muted); font-size: 11px; letter-spacing: 0.14em; font-weight: 600; }
:root[data-theme] th, :root[data-theme] td { border-bottom: 1px solid var(--line-soft); }
:root[data-theme] tbody tr:hover, :root[data-theme] tr:hover td { background: var(--accent-soft); }
:root[data-theme] td.num { font-family: var(--font-tech); }
:root[data-theme] td.num.pos { color: var(--ok); }

/* ---------- badges, messages, chips, pills ---------- */
:root[data-theme] .badge { border-radius: 2px; background: transparent; border: 1px solid currentColor;
  font-size: 11px; letter-spacing: 0.08em; font-weight: 600; }
:root[data-theme] .badge.green { color: var(--ok); }
:root[data-theme] .badge.orange, :root[data-theme] .badge.warn { color: var(--amber); }
:root[data-theme] .badge.red { color: var(--hot); }
:root[data-theme] .badge.blue { color: var(--accent); }
:root[data-theme] .badge.gray { color: var(--muted); }
:root[data-theme] .msg { border-radius: 2px; border: 1px solid var(--line); border-left-width: 3px; background: var(--panel); color: var(--ink); }
:root[data-theme] .msg.ok { border-color: var(--ok); background: var(--ok-soft); }
:root[data-theme] .msg.error { border-color: var(--hot); background: var(--hot-soft); }
:root[data-theme] .msg.warn { border-color: var(--amber); background: var(--amber-soft); }
:root[data-theme] .msg.info { border-color: var(--accent); background: var(--accent-soft); }
:root[data-theme] .chip { border-radius: 2px; background: var(--accent-soft); border: 1px solid var(--line-soft); }
:root[data-theme] .years a, :root[data-theme] .tabs a { font-family: var(--font-tech); letter-spacing: 0.06em;
  border-radius: 2px; box-shadow: none; background: transparent; border: 1px solid var(--line); color: var(--muted); }
:root[data-theme] .years a.active, :root[data-theme] .tabs a.active { background: var(--accent); color: var(--accent-ink);
  border-color: var(--accent); }
:root[data-theme] .tabs { background: transparent; }
:root[data-theme] .bar { background: var(--accent); box-shadow: var(--glow); border-radius: 1px; }
:root[data-theme] code { background: var(--accent-soft); border-radius: 2px; font-family: var(--font-tech); }
:root[data-theme] .reg-choice { background: var(--accent-soft); border: 1px solid var(--line); border-radius: 2px; }
:root[data-theme] .join-code { font-family: var(--font-tech); color: var(--accent); text-shadow: var(--glow); }

/* ---------- home page ---------- */
:root[data-theme] .hello { color: var(--ink); padding: 22px 24px; gap: 20px; }
:root[data-theme] .hello h2 { font-weight: 600; font-size: 30px; color: var(--head); text-shadow: var(--glow);
  text-transform: none; letter-spacing: 0.01em; }
:root[data-theme] .hello p { color: var(--muted); opacity: 1; font-size: 15px; }
:root[data-theme] .hello .avatar { border: 1px solid var(--accent); box-shadow: var(--glow); }
.hud-kicker { font-family: var(--font-tech, sans-serif); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.hud-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok, #12b886);
  box-shadow: 0 0 8px var(--ok, #12b886); animation: hud-pulse 2.4s ease-in-out infinite; }
.hud-ring { position: relative; width: 132px; height: 132px; flex: none; display: grid; place-items: center; }
.hud-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hud-ring .r-spin { transform-origin: 50% 50%; animation: hud-spin 22s linear infinite; }
.hud-ring .r-spinr { transform-origin: 50% 50%; animation: hud-spin 30s linear infinite reverse; }
.hud-ring .r-val { text-align: center; position: relative; font-family: var(--font-tech, sans-serif); }
.hud-ring .r-val b { display: block; font-size: 28px; font-weight: 700; color: var(--head); line-height: 1; text-shadow: var(--glow); }
.hud-ring .r-val small { display: block; font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
@keyframes hud-spin { to { transform: rotate(360deg); } }
@keyframes hud-pulse { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }
:root[data-theme] .daily-msg { border-left: 3px solid var(--accent); }
:root[data-theme] .daily-msg .dm-ic { background: transparent; border: 1px solid var(--line); border-radius: 50%; }
:root[data-theme] .daily-msg small { color: var(--accent); font-family: var(--font-tech); letter-spacing: 0.14em; text-transform: uppercase; }
:root[data-theme] .daily-msg p { color: var(--ink); font-style: italic; font-weight: 500; }
:root[data-theme] .celebrate, :root[data-theme] .hero-celebrate {
  background: var(--amber-soft); color: var(--ink); border: 1px solid var(--amber); border-left-width: 3px; border-radius: 2px;
}
:root[data-theme] .note { background: transparent; border: 1px solid var(--line-soft); border-left: 2px solid var(--accent);
  border-radius: 2px; color: var(--ink); }
:root[data-theme] .note:hover { background: var(--accent-soft); }
:root[data-theme] .note-go { color: var(--accent); }
:root[data-theme] .dash-title { font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }

/* ---------- login / public pages ---------- */
:root[data-theme] .auth-bg { background: transparent; }
:root[data-theme] .auth-bg span { display: none; }
:root[data-theme] .auth-bg::before, :root[data-theme] .auth-bg::after {
  content: ""; position: absolute; border-radius: 50%; border: 1px dashed var(--line); pointer-events: none;
}
:root[data-theme] .auth-bg::before { width: 760px; height: 760px; right: -220px; top: -260px;
  animation: hud-spin 60s linear infinite; }
:root[data-theme] .auth-bg::after { width: 520px; height: 520px; right: -100px; top: -140px; border-style: solid;
  border-color: var(--line-soft); border-top-color: var(--accent); animation: hud-spin 24s linear infinite reverse; }
:root[data-theme] .hero-title { background: none; color: var(--head); -webkit-text-fill-color: currentColor;
  font-family: var(--font-tech); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; text-shadow: var(--glow); }
:root[data-theme] .hero-greet { font-family: var(--font-tech); letter-spacing: 0.1em; color: var(--accent); }
:root[data-theme] .hero-lead { color: var(--ink); }
:root[data-theme] .hero-live .pill { background: var(--panel); border: 1px solid var(--line); border-radius: 2px;
  box-shadow: none; font-family: var(--font-tech); letter-spacing: 0.04em; }
:root[data-theme] .hero-quote { background: var(--panel); border-left: 3px solid var(--accent); border-radius: 2px; color: var(--ink); }
:root[data-theme] .hero-quote span { color: var(--accent); font-family: var(--font-tech); letter-spacing: 0.14em; text-transform: uppercase; }
:root[data-theme] .feat small { color: var(--muted); }
:root[data-theme] .feat-ic { background: transparent; border: 1px solid var(--line); border-radius: 50%; }
:root[data-theme] .feat.soon { background: var(--amber-soft); border-color: var(--amber); }
:root[data-theme] .auth-logo.app-logo svg { filter: drop-shadow(0 0 14px var(--accent-soft)); }
:root[data-theme] .auth-logo.app-logo b { font-family: var(--font-tech); letter-spacing: 0.3em; text-transform: uppercase; color: var(--head); }
:root[data-theme] .auth-card h1 { font-weight: 600; letter-spacing: 0.04em; color: var(--head); }
:root[data-theme] .privacy, :root[data-theme] .auth-links { color: var(--muted); }

@media (max-width: 800px) {
  :root[data-theme] .topbar h1 { font-size: 22px; }
  :root[data-theme] .hello { flex-wrap: wrap; padding: 16px; }
  :root[data-theme] .hello h2 { font-size: 22px; }
  .hud-ring { width: 108px; height: 108px; }
  .hud-ring .r-val b { font-size: 22px; }
  :root[data-theme] .auth-bg::before { width: 520px; height: 520px; right: -260px; top: -200px; }
  :root[data-theme] .auth-bg::after { width: 360px; height: 360px; right: -170px; top: -120px; }
}
@media (prefers-reduced-motion: reduce) {
  .hud-ring .r-spin, .hud-ring .r-spinr, .hud-dot,
  :root[data-theme] .auth-bg::before, :root[data-theme] .auth-bg::after { animation: none; }
}

/* v50: the GREKO-Systems mark keeps its own colours; a soft violet glow around it */
:root[data-theme] .auth-logo.app-logo svg { filter: drop-shadow(0 6px 22px rgba(120, 50, 220, 0.45)); }
:root[data-theme] .invite-link input { border-radius: 3px; }


/* =====================================================================
   v48: login page: card in the centre, moving HUD modules on the whole page behind it
   ===================================================================== */
:root[data-theme] body.auth { display: block; min-height: 100vh; min-height: 100dvh; padding: 0; overflow-x: hidden; }
.auth-center { position: relative; z-index: 2; min-height: 100vh; min-height: 100dvh; box-sizing: border-box;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  padding: 48px 16px; text-align: center; }
.auth-center .auth-card { width: 100%; max-width: 420px; text-align: left; }
.auth-center .hero-title { margin: 0; font-size: 34px; }
.auth-center .hero-greet { margin: 0; }
.auth-center .hero-live { margin: 0; justify-content: center; }
.auth-center .hero-quote { max-width: 420px; margin: 0; text-align: left; font-size: 14px; }
.auth-center .privacy { max-width: 420px; margin: 0; font-size: 12px; line-height: 1.5; }
:root[data-theme] .auth-center .auth-card {
  background: color-mix(in srgb, var(--panel-solid) 80%, transparent);
  box-shadow: 0 0 0 1px var(--line), 0 0 60px var(--accent-soft);
}

.hud-scene { position: fixed; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }
.hud-links { position: absolute; inset: 0; width: 100%; height: 100%; }
.hud-links path { fill: none; stroke: var(--accent); stroke-opacity: 0.22; stroke-width: 1.2; stroke-dasharray: 6 10;
  vector-effect: non-scaling-stroke; animation: hud-flow 14s linear infinite; }
@keyframes hud-flow { to { stroke-dashoffset: -320; } }

.hud-radar { position: absolute; left: 50%; top: 50%; width: 900px; height: 900px; transform: translate(-50%, -50%); }
.hud-radar span { position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--line-soft); }
.hud-radar span:nth-child(2) { inset: 120px; border-style: dashed; animation: hud-spin 50s linear infinite; }
.hud-radar span:nth-child(3) { inset: 240px; border-top-color: var(--accent); animation: hud-spin 22s linear infinite reverse; }
.hud-radar i { position: absolute; left: 50%; top: 50%; width: 50%; height: 2px; transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--accent), transparent); opacity: 0.35; animation: hud-spin 9s linear infinite; }

.mod { position: absolute; width: 210px; padding: 12px 14px 12px; box-sizing: border-box;
  background: var(--panel); border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); color: var(--ink);
  font-family: var(--font-tech); opacity: 0.78; animation: mod-float 12s ease-in-out infinite; }
.mod-h { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
@keyframes mod-float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(0, -14px); } }

/* positions around the edges, the centre stays free for the card */
/* two columns at the sides (left 3%, right 3%), three rows; the middle column is the card's */
.mod { width: 230px; }
.m1 { left: 3%; top: 7%; }
.m2 { right: 3%; top: 7%; animation-delay: -3s; }
.m5 { left: 3%; top: 40%; animation-delay: -8s; }
.m8 { right: 3%; top: 41%; animation-delay: -9s; }
.m3 { left: 3%; bottom: 7%; animation-delay: -6s; }
.m4 { right: 3%; bottom: 7%; animation-delay: -2s; }
.m6, .m7 { display: none; }
@media (min-width: 1700px) {
  .m6, .m7 { display: block; }
  .m7 { left: 17%; bottom: 4%; width: 250px; animation-delay: -1s; }
  .m6 { right: 17%; top: 5%; width: 200px; animation-delay: -5s; }
}

/* "moving the modules": two pairs swap places now and then */
.swap-a { animation: mod-float 12s ease-in-out infinite, swap-a 24s ease-in-out infinite; }
.swap-b { animation: mod-float 12s ease-in-out infinite -3s, swap-b 24s ease-in-out infinite; }
.swap-c { animation: mod-float 12s ease-in-out infinite -8s, swap-a 30s ease-in-out infinite 6s; }
.swap-d { animation: mod-float 12s ease-in-out infinite -5s; }
.m8 { animation: mod-float 12s ease-in-out infinite -9s, swap-b 30s ease-in-out infinite 6s; }
/* left module <-> right module: 94vw - module width (230px) between the two columns */
@keyframes swap-a { 0%, 40% { translate: 0 0; } 50%, 90% { translate: calc(94vw - 230px) 0; } 100% { translate: 0 0; } }
@keyframes swap-b { 0%, 40% { translate: 0 0; } 50%, 90% { translate: calc(-94vw + 230px) 0; } 100% { translate: 0 0; } }

.mod-ring { position: relative; width: 84px; height: 84px; display: grid; place-items: center; }
.mod-ring svg { position: absolute; inset: 0; }
.mod-ring circle { fill: none; }
.mod-ring .trk { stroke: var(--line-soft); stroke-width: 6; }
.mod-ring .val { stroke: var(--accent); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 147 214;
  transform: rotate(-90deg); transform-origin: 50% 50%; animation: ring-fill 6s ease-in-out infinite alternate; }
.mod-ring .dash { stroke: var(--accent); stroke-opacity: 0.4; stroke-width: 1; stroke-dasharray: 2 5;
  transform-origin: 50% 50%; animation: hud-spin 16s linear infinite; }
.mod-ring b { font-size: 18px; color: var(--head); }
@keyframes ring-fill { from { stroke-dasharray: 60 214; } to { stroke-dasharray: 170 214; } }
.mod-rows { display: flex; flex-direction: column; gap: 6px; font-family: var(--font-ui); font-size: 14px; }
.mod-rows span { display: flex; align-items: center; gap: 8px; }
.mod-rows em { margin-left: auto; font-style: normal; font-size: 12px; color: var(--muted); }
.mod-rows i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.mod-rows i.ok { background: var(--ok); } .mod-rows i.hot { background: var(--hot); animation: hud-pulse 1.6s ease-in-out infinite; }
.mod-bars { display: flex; align-items: flex-end; gap: 6px; height: 70px; }
.mod-bars i { flex: 1; height: var(--h); background: linear-gradient(180deg, var(--accent), transparent);
  border-top: 2px solid var(--accent); transform-origin: bottom; animation: bar-pulse 4s ease-in-out infinite; }
.mod-bars i:nth-child(2n) { animation-delay: -1.3s; } .mod-bars i:nth-child(3n) { animation-delay: -2.6s; }
.mod-bars i.hot { background: linear-gradient(180deg, var(--hot), transparent); border-top-color: var(--hot); }
@keyframes bar-pulse { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(0.72); } }
.mod-line { width: 100%; height: 46px; }
.mod-line path { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 260; stroke-dashoffset: 260;
  animation: line-draw 5s ease-in-out infinite; filter: drop-shadow(0 0 4px var(--accent)); }
@keyframes line-draw { 60%, 100% { stroke-dashoffset: 0; } }
.mod-num { font-size: 20px; color: var(--ok); margin-top: 2px; }
.mod-donut svg { width: 70px; height: 70px; transform: rotate(-90deg); animation: hud-spin 30s linear infinite; }
.mod-donut circle { fill: none; stroke-width: 9; }
.mod-donut .s1 { stroke: var(--accent); stroke-dasharray: 60 139; }
.mod-donut .s2 { stroke: var(--amber); stroke-dasharray: 40 139; stroke-dashoffset: -62; }
.mod-donut .s3 { stroke: var(--hot); stroke-dasharray: 30 139; stroke-dashoffset: -104; }
.mod-people { display: flex; gap: 6px; }
.mod-people i { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-style: normal;
  border: 1px solid var(--accent); color: var(--accent); font-size: 13px; }
.mod-sub { font-size: 11px; color: var(--muted); margin-top: 6px; letter-spacing: 0.08em; }
.mod-ticker { overflow: hidden; white-space: nowrap; font-size: 12px; letter-spacing: 0.12em; color: var(--muted); }
.mod-ticker span { display: inline-block; animation: ticker 18s linear infinite; }
@keyframes ticker { to { transform: translateX(-50%); } }
.mod-scan { position: relative; height: 62px; display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.mod-scan span { height: 6px; background: var(--line-soft); border-radius: 1px; }
.mod-scan span:nth-of-type(2) { width: 70%; } .mod-scan span:nth-of-type(3) { width: 45%; }
.mod-scan i { position: absolute; left: 0; right: 0; height: 2px; background: var(--accent); box-shadow: 0 0 10px var(--accent);
  animation: scan 2.8s ease-in-out infinite; }
@keyframes scan { 0%, 100% { top: 0; } 50% { top: calc(100% - 2px); } }
.hud-sweep { position: absolute; left: 0; right: 0; height: 120px; top: -120px;
  background: linear-gradient(180deg, transparent, var(--accent-soft), transparent); animation: sweep-down 11s linear infinite; }
@keyframes sweep-down { to { top: 110%; } }

/* phones: a lighter scene (fewer modules, smaller), the card stays readable */
@media (max-width: 1100px) {
  .m5, .m8 { display: none; }
}
@media (max-width: 800px) {
  .m1, .m2, .m5, .m6, .m7, .m8, .hud-links { display: none; }
  .mod { width: 160px; padding: 8px 10px; opacity: 0.35; }
  .m3 { left: -24px; bottom: 2%; } .m4 { right: -24px; bottom: 3%; }
  .hud-radar { width: 560px; height: 560px; }
  .auth-center { justify-content: flex-start; padding-top: 72px; }
}
@media (prefers-reduced-motion: reduce) {
  .hud-scene *, .hud-scene { animation: none !important; }
}

/* v48: top bar on computers: page title on the left, compact widgets on the same line at the right */
@media (min-width: 801px) {
  :root[data-theme] .topbar { flex-wrap: wrap; align-items: center; gap: 10px 20px; }
  :root[data-theme] .topbar .title-block { flex: 0 1 auto; min-width: 0; }
  :root[data-theme] .topbar .widgets { margin-left: auto; flex-wrap: nowrap; gap: 8px; align-items: center; justify-content: flex-end; }
  :root[data-theme] .widget { min-width: 0; padding: 5px 10px 6px; --cut: 7px; }
  :root[data-theme] .widget small { font-size: 9px; letter-spacing: 0.1em; white-space: nowrap; }
  :root[data-theme] .widget b { font-size: 14px; white-space: nowrap; }
  :root[data-theme] .widget.nameday b { font-size: 13px; }
  :root[data-theme] .view-picker select { height: 24px; font-size: 12px; padding: 0 22px 0 6px; background-position: right 6px center; }
  :root[data-theme] .topbar .theme-btn { width: 34px; height: 34px; font-size: 15px; }
}
/* if they do not fit next to the title, the widgets drop below it, still on the right */
@media (min-width: 801px) {
  :root[data-theme] .view-picker select { max-width: 150px; }
  :root[data-theme] #weather small { max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
}

/* v48: the network canvas behind everything on the login page; the old radar and link lines give way to it */
.hud-net { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.hud-radar, .hud-links, .hud-sweep { display: none; }
.hud-scene { z-index: 1; }
:root[data-theme] .auth-bg::before, :root[data-theme] .auth-bg::after { display: none; }

/* v49: no tiles on the login page any more: only the interactive network behind the card */
.hud-scene { display: none; }
.hud-net { touch-action: manipulation; }

/* v49b: the dynamic tiles are back (Ádám), but only at the two screen edges, never behind the card:
   shown from 1300 px up, 200 px wide, they swap places only up and down inside their own column */
.hud-scene { display: none; }
@media (min-width: 1300px) {
  .hud-scene { display: block; }
  .hud-scene .mod { width: 200px; opacity: 0.85; animation: mod-float 12s ease-in-out infinite; }
  .hud-scene .m1 { left: 2%; top: 6%; }
  .hud-scene .m5 { left: 2%; top: 39%; animation: mod-float 12s ease-in-out infinite -8s; }
  .hud-scene .m3 { left: 2%; top: auto; bottom: 6%; animation-delay: -6s; }
  .hud-scene .m2 { right: 2%; top: 6%; animation-delay: -3s; }
  .hud-scene .m8 { right: 2%; top: 40%; animation: mod-float 12s ease-in-out infinite -9s; }
  .hud-scene .m4 { right: 2%; top: auto; bottom: 6%; animation-delay: -2s; }
  .hud-scene .m6, .hud-scene .m7 { display: none; }
  .hud-scene .swap-a { animation: mod-float 12s ease-in-out infinite, swap-down 26s ease-in-out infinite; }
  .hud-scene .m5.swap-c { animation: mod-float 12s ease-in-out infinite -8s, swap-up 26s ease-in-out infinite; }
  .hud-scene .swap-b { animation: mod-float 12s ease-in-out infinite -3s, swap-down 32s ease-in-out infinite 5s; }
  .hud-scene .m8 { animation: mod-float 12s ease-in-out infinite -9s, swap-up 32s ease-in-out infinite 5s; }
}
@keyframes swap-down { 0%, 42% { translate: 0 0; } 50%, 92% { translate: 0 33vh; } 100% { translate: 0 0; } }
@keyframes swap-up { 0%, 42% { translate: 0 0; } 50%, 92% { translate: 0 -33vh; } 100% { translate: 0 0; } }
@media (prefers-reduced-motion: reduce) { .hud-scene .mod { animation: none !important; } }

/* v50: GREKO-Systems colours (violet) for every theme token; monogram as the mark's rounded square */
:root[data-theme] .brand-icon.monogram { border-radius: 12px; background: linear-gradient(145deg, #8a4fe0, #4a1592);
  color: #fff; border: 0; box-shadow: 0 4px 14px rgba(107, 47, 196, 0.35); }

/* v55: GREKO HOME brand: the mark for everybody in the sidebar, the wordmark on the login card, legal footer */
.brand-icon.app-mark { display: block; width: 40px; height: 40px; flex: 0 0 40px; background: none; border: 0; padding: 0; }
.brand-icon.app-mark svg { display: block; width: 40px; height: 40px; filter: drop-shadow(0 4px 12px rgba(107, 47, 196, 0.35)); }
.wordmark { display: block; font-family: Oxanium, sans-serif; letter-spacing: 0.32em; font-size: 15px; margin-top: 10px; }
.wordmark b { color: var(--head); font-weight: 700; }
.wordmark i { font-style: normal; color: var(--accent); font-weight: 700; }
.hero-title span { color: var(--accent); }
.legal-foot { margin: 28px auto 6px; max-width: 760px; font-size: 11.5px; line-height: 1.55; color: var(--muted);
  text-align: center; opacity: 0.85; }
.legal-foot a { color: inherit; text-decoration: underline; }
.auth-center .legal-foot { max-width: 460px; margin-top: 14px; }
:root[data-theme] .auth-logo.app-logo .wordmark { margin-top: 2px; }
:root[data-theme] .auth-logo.app-logo .wordmark b,
:root[data-theme] .auth-logo.app-logo .wordmark i { font-family: var(--font-tech); font-size: 22px; letter-spacing: 0.3em; text-transform: uppercase; }
:root[data-theme] .auth-logo.app-logo .wordmark i { color: var(--accent); }

/* v56: family crest */
.crest-now { display: flex; justify-content: center; margin: 6px 0 14px; }
.crest-img { display: block; filter: drop-shadow(0 6px 16px rgba(60, 20, 120, 0.35)); }
.crest-form fieldset { border: 1px solid var(--line-soft); padding: 8px 12px 10px; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.crest-form legend { font-size: 12px; color: var(--muted); padding: 0 6px; }
.crest-opt { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; }
.crest-upload { margin-top: 14px; }
.hello .home-crest { flex: 0 0 auto; }

/* v58: feedback */
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.crest-opt-row { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.feedback-form textarea { width: 100%; min-height: 120px; resize: vertical; }
.feedback-item { border: 1px solid var(--line-soft); padding: 12px 14px; margin: 10px 0; }
.feedback-item.done { opacity: 0.7; }
.feedback-item .fb-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.feedback-item .fb-head small { color: var(--muted); }
.feedback-item .fb-text { white-space: pre-wrap; margin: 8px 0; }
.feedback-close { display: flex; gap: 8px; flex-wrap: wrap; }
.feedback-close input { flex: 1 1 240px; }
.feedback-form .crest-opt-row > label.crest-opt { display: inline-flex !important; flex-direction: row !important;
  align-items: center; gap: 6px; width: auto !important; margin: 0; }
.feedback-form .crest-opt-row > label.crest-opt input { width: auto; height: auto; margin: 0; }

/* v59: phone overflow fixes (Android screenshots 2026-11-13: cards and forms cut off on the right).
   Measured in a real WebKit view at 320-390 px: grid/flex children kept their min-content width
   (charts, long buttons, file inputs, tables) and pushed the page wider than the screen. */
@media (max-width: 800px) {
  main, main > *, .grid2 > *, .cards > *, .box, .card, .widget, .auth-card, .reg-choice { min-width: 0; max-width: 100%; }
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  canvas, img, svg, video, iframe { max-width: 100%; }
  .box, .card, .auth-card, .feedback-item { overflow-wrap: anywhere; }
  .box table:not(.table-wrap table) { display: block; overflow-x: auto; max-width: 100%; }
  button, .btn, a.button { max-width: 100%; white-space: normal; height: auto; min-height: var(--field-h, 44px); }
  button.icon-btn, .icon-btn { min-height: 0; }
  .form > button, .form > div > button, .form .push-actions button, .form.vertical > button {
    white-space: normal; height: auto; min-height: var(--field-h, 46px); padding: 10px 16px; text-align: center; line-height: 1.3; }
  :root[data-theme] button { letter-spacing: 0.06em; }
  input[type=file] { display: block; width: 100%; max-width: 100%; min-width: 0; font-size: 14px; }
  /* stacked forms (login, register): fields fill the card instead of their own text width */
  .form.vertical { align-items: stretch; }
  .form.vertical > * { max-width: 100%; min-width: 0; }
  .reg-choice label, .form label.remember { white-space: normal; flex-wrap: nowrap; }
  /* "Elolvastam és elfogadom..." is one flowing sentence, not a row of flex pieces */
  .form label.remember.accept, label.remember.accept { display: block; }
  label.remember.accept input { display: inline-block; vertical-align: -2px; margin: 0 8px 0 0; }
}

/* v60: phones: tables are stacked cards (RT_JS marks them), nothing scrolls sideways, the page stays centred.
   Ádám's iPhone screenshot 2026-11-13: the own bank accounts table slid off the screen. */
html, body { max-width: 100%; overflow-x: hidden; }
@supports (overflow: clip) { html, body { overflow-x: clip; } }
@media (max-width: 800px) {
  /* iOS zooms into any field with text smaller than 16 px and the page drifts sideways: keep 16 px */
  input:not([type=checkbox]):not([type=radio]), select, textarea { font-size: 16px !important; }
  .table-wrap, .box > table, .box table:not(.table-wrap table) { overflow: visible; }
  table.rt, table.rt tbody, table.rt tr, table.rt td, table.rt th { display: block; width: 100%; max-width: 100%; }
  table.rt { border: 0; }
  table.rt tr.rt-head { display: none; }
  table.rt tr { border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; margin: 0 0 10px;
    background: var(--accent-soft, rgba(127, 127, 127, 0.06)); }
  table.rt td, table.rt th { border: 0; padding: 5px 0; white-space: normal; overflow-wrap: anywhere; text-align: left; }
  table.rt td.rt-empty, table.rt th.rt-empty { display: none; }
  table.rt .rt-first { font-weight: 600; font-size: 15px; padding-bottom: 6px; }
  table.rt [data-label] { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
  table.rt [data-label]::before { content: attr(data-label); flex: 0 0 auto; max-width: 45%; color: var(--muted);
    font-size: 12px; font-weight: 600; padding-top: 2px; }
  table.rt [data-label] > .rt-v { text-align: right; min-width: 0; }
  table.rt td.num, table.rt th.num { text-align: right; }
  table.rt td.center > .rt-v { text-align: right; }
  table.rt td.actions, table.rt td:last-child:not([data-label]) { padding-top: 8px; }
  table.rt .rt-v form.inline, table.rt .rt-v details { display: inline-flex; flex-wrap: wrap; gap: 6px; margin: 2px 6px 2px 0; max-width: 100%; }
  table.rt .rt-v form.inline input { min-width: 0; max-width: 100%; }
  table.rt code { word-break: break-all; white-space: normal; }
  table.rt small.sub { max-width: none; }
}
@media (max-width: 800px) {
  /* tab and year pickers wrap onto more lines instead of scrolling sideways */
  .tabs, .years { flex-wrap: wrap; overflow: visible; }
}

/* v60: in-app password fields are masked text fields */
input[data-pwmask] { -webkit-text-security: disc; }
